config

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2024 License: MPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Logger = log.New(os.Stderr, "", log.LstdFlags)

Functions

func NewConfigContext

func NewConfigContext(ctx context.Context, value *Config) context.Context

Types

type Component

type Component struct {
	ID         ID         `json:"id"`
	Path       string     `json:"path"`
	DependsOn  []string   `json:"depends_on"`
	Variables  []Variable `json:"variables"`
	Workspaces []string   `json:"workspaces"`
	Retries    int        `json:"retries"`
}

func (Component) String

func (c Component) String() string

type Config

type Config struct {
	Component  map[ID]Component `json:"component"`
	Stack      map[ID]Stack     `json:"stack"`
	ConfigRoot string           `json:"config_root"`
	ConfigFile string           `json:"config_file"`
}

func ConfigFromContext

func ConfigFromContext(ctx context.Context) *Config

func Get

func Get(ctx context.Context, value *cue.Value, filename string) (*Config, string, error)

func Read

func Read(ctx context.Context, value *cue.Value, filename string, configFH io.Reader) (*Config, error)

type ID

type ID string

type Stack

type Stack struct {
	ID         ID          `json:"id"`
	Components []Component `json:"components"`
}

func (Stack) String

func (s Stack) String() string

type Variable

type Variable struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

func (Variable) String

func (v Variable) String() string

Jump to

Keyboard shortcuts

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