-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
422 changed files
with
19,931 additions
and
121,485 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,6 +21,7 @@ bin/ | |
builds/ | ||
pkg/ | ||
volumes/ | ||
vendor/ | ||
logs/ | ||
.scannerwork/ | ||
.templates/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
package cmd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} |
Oops, something went wrong.