Documentation
¶
Index ¶
- Constants
- Variables
- func ApplyTransformations(schema map[string]any, transformations []func(map[string]any) error) error
- func EnsureBooleansHaveDefault(schema map[string]any) error
- func GetConnectionEnvs(connectionName string, artifactDefinition map[string]any) map[string]string
- func GetConnections(t *templatecache.TemplateData) error
- func ParseEnvironmentVariables(params map[string]any, query map[string]string) map[string]ParsedEnvironmentVariable
- func RunPromptNew(t *templatecache.TemplateData) error
- func SetMassdriverArtifactDefinitions(in map[string]map[string]any)
- type AppSpec
- type Bundle
- func (b *Bundle) Build(buildPath string, mdClient *client.Client) error
- func (b *Bundle) CombineParamsConnsMetadata() map[string]any
- func (b *Bundle) DereferenceSchemas(path string, mdClient *client.Client) error
- func (b *Bundle) LintInputsMatchProvisioner() LintResult
- func (b *Bundle) LintMatchRequired() LintResult
- func (b *Bundle) LintParamsConnectionsNameCollision() LintResult
- func (b *Bundle) LintSchema(mdClient *client.Client) LintResult
- func (b *Bundle) WriteSchemas(buildPath string) error
- type LintIssue
- type LintResult
- func (r *LintResult) AddError(rule, message string)
- func (r *LintResult) AddWarning(rule, message string)
- func (r *LintResult) Errors() []LintIssue
- func (r *LintResult) HasErrors() bool
- func (r *LintResult) HasIssues() bool
- func (r *LintResult) HasWarnings() bool
- func (r *LintResult) IsClean() bool
- func (r *LintResult) Merge(other LintResult)
- func (r *LintResult) Warnings() []LintIssue
- type LintSeverity
- type ParsedEnvironmentVariable
- type Publisher
- type Puller
- type Schema
- type Secret
- type Step
Constants ¶
const ( ParamsFile = "_params.auto.tfvars.json" ConnsFile = "_connections.auto.tfvars.json" )
Variables ¶
var MetadataSchema = parseMetadataSchema()
Functions ¶
func ApplyTransformations ¶
func EnsureBooleansHaveDefault ¶
EnsureBooleansHaveDefault ensures that boolean types have a default value set to false if not already defined. This is due to an oddity in RJSF where booleans without a default value are treated as undefined, which can violate 'required' constraints.
func GetConnectionEnvs ¶
func GetConnections ¶
func GetConnections(t *templatecache.TemplateData) error
func RunPromptNew ¶
func RunPromptNew(t *templatecache.TemplateData) error
func SetMassdriverArtifactDefinitions ¶
SetMassdriverArtifactDefinitions sets the defs used to specify connections in a bundle
Types ¶
type Bundle ¶
type Bundle struct {
Schema string `json:"schema,omitempty" yaml:"schema,omitempty"`
Name string `json:"name,omitempty" yaml:"name,omitempty"`
Description string `json:"description,omitempty" yaml:"description,omitempty"`
SourceURL string `json:"source_url,omitempty" yaml:"source_url,omitempty"`
Type string `json:"type,omitempty" yaml:"type,omitempty"`
Access string `json:"access,omitempty" yaml:"access,omitempty"`
Version string `json:"version,omitempty" yaml:"version,omitempty"`
Steps []Step `json:"steps,omitempty" yaml:"steps,omitempty"`
Artifacts map[string]any `json:"artifacts,omitempty" yaml:"artifacts,omitempty"`
Params map[string]any `json:"params,omitempty" yaml:"params,omitempty"`
Connections map[string]any `json:"connections,omitempty" yaml:"connections,omitempty"`
UI map[string]any `json:"ui,omitempty" yaml:"ui,omitempty"`
AppSpec *AppSpec `json:"app,omitempty" yaml:"app,omitempty"`
}
func (*Bundle) CombineParamsConnsMetadata ¶
func (*Bundle) DereferenceSchemas ¶
func (*Bundle) LintInputsMatchProvisioner ¶
func (b *Bundle) LintInputsMatchProvisioner() LintResult
func (*Bundle) LintMatchRequired ¶
func (b *Bundle) LintMatchRequired() LintResult
func (*Bundle) LintParamsConnectionsNameCollision ¶
func (b *Bundle) LintParamsConnectionsNameCollision() LintResult
func (*Bundle) LintSchema ¶
func (b *Bundle) LintSchema(mdClient *client.Client) LintResult
func (*Bundle) WriteSchemas ¶
type LintIssue ¶
type LintIssue struct {
Severity LintSeverity
Message string
Rule string // The name of the lint rule that generated this issue
}
LintIssue represents a single lint issue with its severity and message
type LintResult ¶
type LintResult struct {
Issues []LintIssue
}
LintResult holds the results of a linting operation
func (*LintResult) AddError ¶
func (r *LintResult) AddError(rule, message string)
AddError adds an error-level issue to the result
func (*LintResult) AddWarning ¶
func (r *LintResult) AddWarning(rule, message string)
AddWarning adds a warning-level issue to the result
func (*LintResult) Errors ¶
func (r *LintResult) Errors() []LintIssue
Errors returns all error-level issues
func (*LintResult) HasErrors ¶
func (r *LintResult) HasErrors() bool
HasErrors returns true if the result contains any error-level issues
func (*LintResult) HasIssues ¶
func (r *LintResult) HasIssues() bool
HasIssues returns true if the result contains any error-level issues
func (*LintResult) HasWarnings ¶
func (r *LintResult) HasWarnings() bool
HasWarnings returns true if the result contains any warning-level issues
func (*LintResult) IsClean ¶
func (r *LintResult) IsClean() bool
IsClean returns true if there are no issues at all
func (*LintResult) Merge ¶
func (r *LintResult) Merge(other LintResult)
Merge combines this result with another result
func (*LintResult) Warnings ¶
func (r *LintResult) Warnings() []LintIssue
Warnings returns all warning-level issues
type LintSeverity ¶
type LintSeverity int
LintSeverity represents the severity level of a lint issue
const ( // LintWarning represents a non-blocking issue that should be reported but not halt execution LintWarning LintSeverity = iota // LintError represents a blocking issue that should halt execution LintError )
func (LintSeverity) String ¶
func (s LintSeverity) String() string
String returns the string representation of LintSeverity
type Publisher ¶
func (*Publisher) PackageBundle ¶
type Puller ¶
func (*Puller) PullBundle ¶
type Step ¶
type Step struct {
Path string `json:"path,omitempty" yaml:"path,omitempty"`
Provisioner string `json:"provisioner,omitempty" yaml:"provisioner,omitempty"`
SkipOnDelete bool `json:"skip_on_delete,omitempty" yaml:"skip_on_delete,omitempty"`
Config map[string]any `json:"config,omitempty" yaml:"config,omitempty"`
}