Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContainsDynamicTemplate ¶
ContainsDynamicTemplate reports whether the template syntax supported by CTS to load from env, Consul KV, and Vault is within s.
func ContainsVaultSecret ¶
ContainsVaultSecret reports whether the template syntax to fetch secrets from Vault is within s.
Types ¶
type NamedBlock ¶
type NamedBlock struct { Name string Variables Variables // contains filtered or unexported fields }
NamedBlock represents an HCL block with one label and an arbitrary number of attributes of varying types.
block "name" { attr = "str" count = 10 }
func LoadDynamicConfig ¶
func LoadDynamicConfig(ctx context.Context, w tmpls.Watcher, r tmpls.Resolver, config map[string]interface{}) (NamedBlock, error)
LoadDynamicConfig converts a decoding of HCL named blocks into a struct representation with cty types and fetches dynamic values with templated configuration.
func NewNamedBlock ¶
func NewNamedBlock(b map[string]interface{}) NamedBlock
NewNamedBlock converts a decoding of an HCL named block into a struct representation with cty types.
func NewNamedBlockTest ¶
func NewNamedBlockTest(b map[string]interface{}) NamedBlock
NewNamedBlockTest is used to simplify testing
func NewNamedBlocksTest ¶
func NewNamedBlocksTest(rawBlocks []map[string]interface{}) []NamedBlock
NewNamedBlocksTest is used to simplify testing
func (*NamedBlock) Copy ¶
func (b *NamedBlock) Copy() NamedBlock
Copy creates a copy of the NamedBlock with a shallow copy of the raw config
func (*NamedBlock) ObjectType ¶
func (b *NamedBlock) ObjectType() *cty.Type
ObjectType converts the named block to an Object
func (*NamedBlock) ObjectVal ¶
func (b *NamedBlock) ObjectVal() *cty.Value
func (NamedBlock) RawConfig ¶
func (b NamedBlock) RawConfig() map[string]interface{}
func (*NamedBlock) SortedAttributes ¶
func (b *NamedBlock) SortedAttributes() []string
SortedAttributes returns a list of sorted attribute names