Skip to content

Commit

Permalink
Merge branch 'master' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
jscharber committed Jul 27, 2021
2 parents aaa366d + b1929b5 commit 367886d
Show file tree
Hide file tree
Showing 422 changed files with 19,931 additions and 121,485 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ bin/
builds/
pkg/
volumes/
vendor/
logs/
.scannerwork/
.templates/
Expand Down
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@

VERSION := v1.0.0betarc2
VERSION := v1.2.0alpha
BUILD := $(shell git rev-parse --short HEAD)
PROJECTNAME := $(shell basename "$(PWD)")
PROJDIR := $(shell pwd)
Expand Down
4 changes: 4 additions & 0 deletions NOTES.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
# Release Notes for v1.0.0betarc2 - Simplify creation of roadctl definitions file

## New Features
- Arrays and objects now supported as data types

## Bug Fixes
- Correct bugs in processing multiple same level tables

## Improvements
- WIP life cycle events

## Other Changes
- GitHub and SonarCloud fields added to definitions for proper path construction

## Other Changes
- Rename templates to blueprints
Expand Down
1 change: 1 addition & 0 deletions cmd/block_events.go
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package cmd
47 changes: 47 additions & 0 deletions cmd/block_kinds.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
package cmd

const (
// FileBlock a block generated from a file
// containing a Go template
FileBlock = "FileBlock"

// CoreBlock a block that integrates core libraries
CoreBlock = "CoreBlock"

// CompositeBlock a block that integrates core libraries
CompositeBlock = "CompositeBlock"

// WebFileBlock a block generated from a file
// containing a Go template using the HTML safe
// typing processor
HTMLFileBlock = "WebFileBlock"

// DockerBlock generates a dockerfile
DockerfileBlock = "DockerfileBlock"

// DockerComposeBlock generates a docker-compose block
DockerComposeBlock = "DockerComposeBlock"

// EndpointsBlock generates HTTP endpoint routers and handlers
EndpointsBlock = "EndpointsBlock"

// FunctionBlock call a function that generates
// non template based blocks
FunctionBlock = "FunctionBlock"

// KustomizeBlock creates a kustomize configuration
// or fragments
KustomizeBlock = "KustomizeBlock"

// TemplateBlock creates a tpl fragments
TemplateBlock = "TemplateBlock"

// SkaffoldBlock creates a skaffold configuration
// or fragments
SkaffoldBlock = "SkaffoldBlock"
)

type BlockKind struct {
BlockType string
APIVersion string
}
85 changes: 85 additions & 0 deletions cmd/block_resource.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
package cmd

import (
"net/url"

"github.com/google/uuid"
)

// Types of data representations
const (
Mime_Type = iota
Avro
Protobuf
YAML
WASM
)

// BlockResource
type BlockResource struct {
// APIVersion for this object
ApiVersion string

// Kind/data representation
Kind string

// UUID unique ID for an object
UUID uuid.UUID

// LifeCycleEvents
LifeCycleEvents []Event

// Policies RBAC / ABAC including authentication
Policies []string

// Schema JSON or other object specific representation
// if the object is not self defining
Schema string

// SignatureType SHA, MD5, etc
SignatureType string

// Signature for anti-tampering
Signature string

// Mutable
Mutable bool

// Payload return payload for a resource
Payload PayloadLoader

// Events manage an event queue
Events EventInteface
}

// PayloadLoader
// Loads from either a external ULR or a pointer to the
// data
type PayloadLoader struct {
// ExternalURL nil if not set
// file:///~./mycode/artifacts/lint.txt
externalURL url.URL

dataPointer []byte
}

// Payload returns the contents of a resource
func (dl *PayloadLoader) Payload() ([]byte, error) {
if dl.dataPointer != nil {
return dl.dataPointer, nil
}

return nil, nil
// return LoadURL(externalURL)
}

type EventInteface struct {
EventBusType string
Brokers []string
ReadEvents []Event
WriteEvents []Event
}

type Event struct {
Topic string
}
Loading

0 comments on commit 367886d

Please sign in to comment.