cflib

package
v0.0.0-...-a444f70 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bool

func Bool(b bool) *bool

func CleanParameterName

func CleanParameterName(unsafes ...string) string

func Int

func Int(i int) *int

func QualifiedName

func QualifiedName(name string) string

func ResolveFunc

func ResolveFunc(raw interface{}, params Params) (string, error)

func ResourceName

func ResourceName(name string, rr cloudformation.Resource) string

func String

func String(str string) *string

func Stringf

func Stringf(str string, params ...interface{}) *string

Types

type BuiltTemplate

type BuiltTemplate struct {
	Template   *cloudformation.Template
	Parameters []*awsdeployer_pb.Parameter
}

type FuncJoin

type FuncJoin struct {
	Join   string
	Values []interface{}
}

func (*FuncJoin) MarshalJSON

func (f *FuncJoin) MarshalJSON() ([]byte, error)

func (*FuncJoin) UnmarshalJSON

func (f *FuncJoin) UnmarshalJSON(data []byte) error

type IResource

type IResource interface {
	cloudformation.Resource
	Ref() TemplateRef
	GetAtt(name string) TemplateRef
	Name() string
	DependsOn(IResource)
	Parameters() []*awsdeployer_pb.Parameter
}

type Output

type Output struct {
	Name        string
	Value       TemplateRef
	Description string
}

type ParamFunc

type ParamFunc func(key string) (string, bool)

func (ParamFunc) Get

func (pf ParamFunc) Get(key string) (string, bool)

type ParamMap

type ParamMap map[string]string

func (ParamMap) Get

func (p ParamMap) Get(key string) (string, bool)

type Params

type Params interface {
	Get(key string) (string, bool)
}

type Resource

type Resource[T cloudformation.Resource] struct {
	Resource T
	// contains filtered or unexported fields
}

func NewResource

func NewResource[T cloudformation.Resource](name string, rr T) *Resource[T]

func (Resource[T]) AWSCloudFormationType

func (rr Resource[T]) AWSCloudFormationType() string

func (*Resource[T]) AddParameter

func (rr *Resource[T]) AddParameter(param *awsdeployer_pb.Parameter)

func (*Resource[T]) DependsOn

func (rr *Resource[T]) DependsOn(b IResource)

func (Resource[T]) GetAtt

func (rr Resource[T]) GetAtt(name string) TemplateRef

func (Resource[T]) MarshalJSON

func (rr Resource[T]) MarshalJSON() ([]byte, error)

func (Resource[T]) Name

func (rr Resource[T]) Name() string

func (*Resource[T]) Override

func (rr *Resource[T]) Override(key, val string)

func (Resource[T]) Parameters

func (rr Resource[T]) Parameters() []*awsdeployer_pb.Parameter

func (Resource[T]) Ref

func (rr Resource[T]) Ref() TemplateRef

type TemplateBuilder

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

func NewTemplateBuilder

func NewTemplateBuilder() *TemplateBuilder

func (*TemplateBuilder) AddOutput

func (ss *TemplateBuilder) AddOutput(output *Output)

func (*TemplateBuilder) AddParameter

func (ss *TemplateBuilder) AddParameter(param *awsdeployer_pb.Parameter)

func (*TemplateBuilder) AddResource

func (ss *TemplateBuilder) AddResource(resource IResource)

func (*TemplateBuilder) Build

func (ss *TemplateBuilder) Build() *BuiltTemplate

type TemplateRef

type TemplateRef string

TemplateRef is a cloudformation 'string' which encodes a reference.

func Join

func Join(sep string, parts ...any) TemplateRef

func (TemplateRef) Ref

func (tr TemplateRef) Ref() string

func (TemplateRef) RefPtr

func (tr TemplateRef) RefPtr() *string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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