deploy

package
v0.0.0-...-02d62a9 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2024 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func RegisterResource

func RegisterResource(resourceType Namespace, name string, resource ResourceGenerator)

Types

type Cmd

type Cmd struct {
	Var        map[string]string `help:"Pass extra variables."`
	Config     string            `help:"Config file." type:"path" default:"uberfx.hcl"`
	PrintState bool              `help:"Print state. Caution: This might print sensitive information."`
}

func (*Cmd) Run

func (c *Cmd) Run() error

type Namespace

type Namespace int
const (
	NamespaceVar Namespace = iota
	NamespaceProvider
	NamespaceService
	NamespaceBuild
	NamespaceDeploy
)

func (Namespace) MarshalJSON

func (r Namespace) MarshalJSON() ([]byte, error)

func (Namespace) String

func (r Namespace) String() string

type Outputer

type Outputer interface {
	Output() cty.Value
}

type Parser

type Parser struct {
	State *State `json:"state"`
	// contains filtered or unexported fields
}

func NewParser

func NewParser(allFlags map[string]string) *Parser

func (*Parser) Decode

func (p *Parser) Decode(filename string, data []byte) error

type Registry

type Registry struct {
	ResourceGenerators map[Namespace]map[string]ResourceGenerator
}

func DefaultRegistry

func DefaultRegistry() *Registry

func NewRegistry

func NewRegistry() *Registry

func (*Registry) Add

func (r *Registry) Add(namespace Namespace, rsrcType string, rsrc ResourceGenerator) error

func (*Registry) ResourceGenerator

func (r *Registry) ResourceGenerator(namespace Namespace, rsrcType string) (ResourceGenerator, error)

type Resource

type Resource interface{}

type ResourceEntry

type ResourceEntry struct {
	ID       ResourceID `json:"id"`
	Resource Resource   `json:"resource"`
}

type ResourceGenerator

type ResourceGenerator func(body hcl.Body, ctx *hcl.EvalContext) (Resource, error)

type ResourceID

type ResourceID struct {
	Namespace Namespace `json:"namespace"`
	Type      string    `json:"type"`
	Name      string    `json:"name"`
}

func (ResourceID) MarshalJSON

func (r ResourceID) MarshalJSON() ([]byte, error)

func (ResourceID) String

func (r ResourceID) String() string

type State

type State struct {
	Resources []*ResourceEntry `json:"resources"`
}

Jump to

Keyboard shortcuts

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