bundle

package
v0.0.0-...-2be5db1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 1, 2024 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ParamsFile = "_params.auto.tfvars.json"
	ConnsFile  = "_connections.auto.tfvars.json"
)

Variables

View Source
var MetadataSchema = parseMetadataSchema()

Functions

func ApplyAppBlockDefaults

func ApplyAppBlockDefaults(b *Bundle)

func GetConnectionEnvs

func GetConnectionEnvs(connectionName string, artifactDefinition map[string]interface{}) map[string]string

func GetConnections

func GetConnections(t *templatecache.TemplateData) error

func ParseEnvironmentVariables

func ParseEnvironmentVariables(params map[string]interface{}, query map[string]string) map[string]ParsedEnvironmentVariable

func RunPromptNew

func RunPromptNew(t *templatecache.TemplateData) error

func SetMassdriverArtifactDefinitions

func SetMassdriverArtifactDefinitions(in map[string]map[string]interface{})

SetMassdriverArtifactDefinitions sets the defs used to specify connections in a bundle

Types

type AppSpec

type AppSpec struct {
	Envs     map[string]string `json:"envs" yaml:"envs"`
	Policies []string          `json:"policies" yaml:"policies"`
	Secrets  map[string]Secret `json:"secrets" yaml:"secrets"`
}

type Bundle

type Bundle struct {
	Schema      string                 `json:"schema" yaml:"schema"`
	Name        string                 `json:"name" yaml:"name"`
	Description string                 `json:"description" yaml:"description"`
	SourceURL   string                 `json:"source_url" yaml:"source_url"`
	Type        string                 `json:"type" yaml:"type"`
	Access      string                 `json:"access" yaml:"access"`
	Steps       []Step                 `json:"steps" yaml:"steps"`
	Artifacts   map[string]interface{} `json:"artifacts" yaml:"artifacts"`
	Params      map[string]interface{} `json:"params" yaml:"params"`
	Connections map[string]interface{} `json:"connections" yaml:"connections"`
	UI          map[string]interface{} `json:"ui" yaml:"ui"`
	AppSpec     *AppSpec               `json:"app,omitempty" yaml:"app,omitempty"`
}

func Unmarshal

func Unmarshal(readDirectory string) (*Bundle, error)

func UnmarshalAndApplyDefaults

func UnmarshalAndApplyDefaults(readDirectory string) (*Bundle, error)

func (*Bundle) CombineParamsConnsMetadata

func (b *Bundle) CombineParamsConnsMetadata() map[string]interface{}

func (*Bundle) DereferenceSchemas

func (b *Bundle) DereferenceSchemas(path string, c *restclient.MassdriverClient) error

func (*Bundle) GenerateBundlePublishBody

func (b *Bundle) GenerateBundlePublishBody(srcDir string) (restclient.PublishPost, error)

func (*Bundle) IsApplication

func (b *Bundle) IsApplication() bool

func (*Bundle) IsInfrastructure

func (b *Bundle) IsInfrastructure() bool

func (*Bundle) LintEnvs

func (b *Bundle) LintEnvs() (map[string]string, error)

func (*Bundle) LintInputsMatchProvisioner

func (b *Bundle) LintInputsMatchProvisioner() error

func (*Bundle) LintMatchRequired

func (b *Bundle) LintMatchRequired() error

func (*Bundle) LintParamsConnectionsNameCollision

func (b *Bundle) LintParamsConnectionsNameCollision() error

func (*Bundle) LintSchema

func (b *Bundle) LintSchema() error

func (*Bundle) WriteSchemas

func (b *Bundle) WriteSchemas(buildPath string) error

type DereferenceTarget

type DereferenceTarget struct {
	// contains filtered or unexported fields
}

type ParsedEnvironmentVariable

type ParsedEnvironmentVariable struct {
	Error string `json:"error"`
	Value string `json:"value"`
}

type Schema

type Schema struct {
	// contains filtered or unexported fields
}

type Secret

type Secret struct {
	Required    bool   `json:"required" yaml:"required"`
	JSON        bool   `json:"json" yaml:"json"`
	Title       string `json:"title" yaml:"title"`
	Description string `json:"description" yaml:"description"`
}

type Step

type Step struct {
	Path         string                 `json:"path" yaml:"path"`
	Provisioner  string                 `json:"provisioner" yaml:"provisioner"`
	SkipOnDelete bool                   `json:"skip_on_delete,omitempty" yaml:"skip_on_delete,omitempty"`
	Config       map[string]interface{} `json:"config,omitempty" yaml:"config,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL