schema

package
v0.0.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ComponentRefJSON

func ComponentRefJSON(stack, component, property string) string

Types

type Backend

type Backend struct {
	Type string                 `json:"type"`
	Data map[string]interface{} `json:"data"`
}

type Component

type Component struct {
	Name    string                 `json:"name"`
	Path    string                 `json:"path"`
	Stack   string                 `json:"stack"`
	Backend Backend                `json:"backend"`
	Vars    map[string]interface{} `json:"vars"`
}

type ComponentRef

type ComponentRef struct {
	Stack     string `json:"stack"`
	Component string `json:"component"`
	Property  string `json:"property"`
}

func TryComponentRefFromJSON

func TryComponentRefFromJSON(v any) *ComponentRef

type Config

type Config struct {
	LogLevel   string `mapstructure:"log_level"`
	Command    string `mapstructure:"tf_command"`
	StacksDir  string `mapstructure:"stacks_dir"`
	WorkDir    string `mapstructure:"work_dir"`
	UseWorkDir bool   `mapstructure:"use_work_dir"`
}

type Stack

type Stack struct {
	Path       string       `json:"path"`
	Type       string       `json:"type"`
	Name       string       `json:"name"`
	Backend    Backend      `json:"backend"`
	Components []*Component `json:"components"`
}

func NewStack

func NewStack(path string, t string) *Stack

func (*Stack) AddComponent

func (s *Stack) AddComponent(name, path string, vars map[string]interface{}) *Component

func (*Stack) ComponentByName

func (s *Stack) ComponentByName(name string) *Component

func (*Stack) Valid

func (s *Stack) Valid() bool

type Stacks

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

func (*Stacks) AddStack

func (s *Stacks) AddStack(stack *Stack) error

func (*Stacks) GetStack

func (s *Stacks) GetStack(name string) (*Stack, error)

func (*Stacks) OrderByName

func (s *Stacks) OrderByName() []*Stack

Jump to

Keyboard shortcuts

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