bundle

package
v0.0.0-...-2263012 Latest Latest
Warning

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

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

Documentation

Index

Constants

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

Variables

This section is empty.

Functions

func ApplyAppBlockDefaults

func ApplyAppBlockDefaults(b *Bundle)

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 []string)

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 Connections            `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) DereferenceSchemas

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

func (*Bundle) GenerateBundlePublishBody

func (b *Bundle) GenerateBundlePublishBody(srcDir string, fs afero.Fs) (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) LintParamsConnectionsNameCollision

func (b *Bundle) LintParamsConnectionsNameCollision() error

func (*Bundle) LintSchema

func (b *Bundle) LintSchema() error

func (*Bundle) WriteSchemas

func (b *Bundle) WriteSchemas(buildPath string, fs afero.Fs) error

type Connections

type Connections = map[string]any

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"`
}

Jump to

Keyboard shortcuts

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