config

package
v0.0.0-...-dfc44ae Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalculateChecksum

func CalculateChecksum(model interface{}) (string, error)

func Init

func Init(provider client.ConfigProvider)

func Resolve

func Resolve(data string) (string, error)

func Unmarshal

func Unmarshal(
	extension string,
	data []byte,
	model interface{},
) error

Types

type Bool

type Bool bool

func (*Bool) Bool

func (bit *Bool) Bool() bool

func (*Bool) UnmarshalJSON

func (bit *Bool) UnmarshalJSON(data []byte) error

func (*Bool) UnmarshalYAML

func (bit *Bool) UnmarshalYAML(unmarshal func(interface{}) error) error

type Config

type Config struct {
	Stacks Stacks
}

func FromPath

func FromPath(path string) (*Config, error)

type Mapper

type Mapper func(placeholder string) (string, error)

type MapperStore

type MapperStore struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewMapperStore

func NewMapperStore() *MapperStore

func (*MapperStore) Get

func (store *MapperStore) Get(prefix string) (Mapper, bool)

func (*MapperStore) Set

func (store *MapperStore) Set(prefix string, mapper Mapper)

type RawConfig

type RawConfig struct {
	Defaults RawDefaults `json:"defaults"`
	Stacks   []*RawStack `json:"stacks"`
}

type RawDefaults

type RawDefaults struct {
	ArtefactBucket String `json:"artefactBucket" yaml:"artefactBucket"`
}

type RawStack

type RawStack struct {
	Name String `json:"name"`

	Capabilities          RawStackCapabilities `json:"capabilities"`
	Parameters            RawStackParameters   `json:"parameters"`
	Region                String               `json:"region"`
	Tags                  RawStackTags         `json:"tags"`
	TerminationProtection Bool                 `json:"terminationProtection" yaml:"terminationProtection"`

	PolicyFile   String `json:"policyFile" yaml:"policyFile"`
	TemplateFile String `json:"templateFile" yaml:"templateFile"`
}

type RawStackCapabilities

type RawStackCapabilities []String

type RawStackParameter

type RawStackParameter struct {
	Key   String `json:"key"`
	Value String `json:"value"`
}

type RawStackParameters

type RawStackParameters []*RawStackParameter

type RawStackTag

type RawStackTag struct {
	Key   String `json:"key"`
	Value String `json:"value"`
}

type RawStackTags

type RawStackTags []*RawStackTag

type ResolveStack

type ResolveStack []*strings.Builder

func NewResolveStack

func NewResolveStack() ResolveStack

func (ResolveStack) Peek

func (stack ResolveStack) Peek() *strings.Builder

func (ResolveStack) Pop

func (stack ResolveStack) Pop() (ResolveStack, string)

func (ResolveStack) Push

func (stack ResolveStack) Push() ResolveStack

func (ResolveStack) String

func (stack ResolveStack) String() string

type Stack

type Stack struct {
	Name string

	Capabilities          []string
	Parameters            StackParameters
	Region                *string
	Tags                  StackTags
	TerminationProtection bool

	Policy   []byte `json:"-"`
	Template []byte `json:"-"`

	ArtefactBucket string `json:",omitempty"`
	PolicyKey      string `json:",omitempty"`
	TemplateKey    string `json:",omitempty"`

	Checksum string
}

func (*Stack) Hashable

func (stack *Stack) Hashable() interface{}

func (*Stack) ShouldUpload

func (stack *Stack) ShouldUpload() bool

func (*Stack) String

func (stack *Stack) String() string

type StackParameter

type StackParameter struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

type StackParameters

type StackParameters []*StackParameter

func (StackParameters) Contains

func (parameters StackParameters) Contains(key, value string) bool

type StackTag

type StackTag struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

type StackTags

type StackTags []*StackTag

type Stacks

type Stacks []*Stack

func (Stacks) Find

func (stacks Stacks) Find(stackName string) (*Stack, bool)

type String

type String string

func (*String) String

func (str *String) String() string

func (*String) StringPointer

func (str *String) StringPointer() *string

func (*String) UnmarshalJSON

func (str *String) UnmarshalJSON(data []byte) error

func (*String) UnmarshalYAML

func (str *String) UnmarshalYAML(unmarshal func(interface{}) error) error

Jump to

Keyboard shortcuts

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