Documentation
¶
Index ¶
- Constants
- Variables
- func CtyNumberToNative(val cty.Value) (interface{}, error)
- func CtyToExpression(cv cty.Value, rng hcl.Range) hclsyntax.Expression
- func CtyToNative(val cty.Value) (interface{}, error)
- func ExpressionToCty(ref map[string]interface{}, node *Tree, v hclsyntax.Expression) (cty.Value, error)
- func NativeToCty(item interface{}) (cty.Value, error)
- type ListStruct
- type Map2Struct
- type MapStruct
- type Struct
- type Tree
- func (self *Tree) AddItem(k string, v cty.Value)
- func (self *Tree) AddNode(name string) *Tree
- func (self *Tree) AddNodes(tag string, names ...string) *Tree
- func (self *Tree) DeleteItem(k string)
- func (self *Tree) DeleteNode(name string)
- func (self *Tree) FindNode(names []string) *Tree
- func (self *Tree) GetNode(tag string, names ...string) *Tree
- func (self *Tree) Variables() map[string]cty.Value
- type Value
- func (*Value) Descriptor() ([]byte, []int)deprecated
- func (m *Value) GetKind() isValue_Kind
- func (x *Value) GetListStruct() *ListStruct
- func (x *Value) GetMap2Struct() *Map2Struct
- func (x *Value) GetMapStruct() *MapStruct
- func (x *Value) GetSingleStruct() *Struct
- func (*Value) ProtoMessage()
- func (x *Value) ProtoReflect() protoreflect.Message
- func (x *Value) Reset()
- func (x *Value) String() string
- type Value_ListStruct
- type Value_Map2Struct
- type Value_MapStruct
- type Value_SingleStruct
Constants ¶
const ( VAR = "var" ATTRIBUTES = "attributes" FUNCTIONS = "functions" )
Variables ¶
var File_proto_determined_proto protoreflect.FileDescriptor
Functions ¶
func CtyNumberToNative ¶ added in v1.7.0
func CtyToExpression ¶ added in v1.7.0
func CtyToExpression(cv cty.Value, rng hcl.Range) hclsyntax.Expression
func CtyToNative ¶ added in v1.7.0
func ExpressionToCty ¶ added in v1.7.0
func NativeToCty ¶ added in v1.7.0
Types ¶
type ListStruct ¶ added in v1.8.0
type ListStruct struct { ListFields []*Struct `protobuf:"bytes,1,rep,name=list_fields,json=listFields,proto3" json:"list_fields,omitempty"` // contains filtered or unexported fields }
func (*ListStruct) Descriptor
deprecated
added in
v1.8.0
func (*ListStruct) Descriptor() ([]byte, []int)
Deprecated: Use ListStruct.ProtoReflect.Descriptor instead.
func (*ListStruct) GetListFields ¶ added in v1.8.0
func (x *ListStruct) GetListFields() []*Struct
func (*ListStruct) ProtoMessage ¶ added in v1.8.0
func (*ListStruct) ProtoMessage()
func (*ListStruct) ProtoReflect ¶ added in v1.8.0
func (x *ListStruct) ProtoReflect() protoreflect.Message
func (*ListStruct) Reset ¶ added in v1.8.0
func (x *ListStruct) Reset()
func (*ListStruct) String ¶ added in v1.8.0
func (x *ListStruct) String() string
type Map2Struct ¶ added in v1.8.0
type Map2Struct struct { Map2Fields map[string]*MapStruct `` /* 179-byte string literal not displayed */ // contains filtered or unexported fields }
func (*Map2Struct) Descriptor
deprecated
added in
v1.8.0
func (*Map2Struct) Descriptor() ([]byte, []int)
Deprecated: Use Map2Struct.ProtoReflect.Descriptor instead.
func (*Map2Struct) GetMap2Fields ¶ added in v1.8.0
func (x *Map2Struct) GetMap2Fields() map[string]*MapStruct
func (*Map2Struct) ProtoMessage ¶ added in v1.8.0
func (*Map2Struct) ProtoMessage()
func (*Map2Struct) ProtoReflect ¶ added in v1.8.0
func (x *Map2Struct) ProtoReflect() protoreflect.Message
func (*Map2Struct) Reset ¶ added in v1.8.0
func (x *Map2Struct) Reset()
func (*Map2Struct) String ¶ added in v1.8.0
func (x *Map2Struct) String() string
type MapStruct ¶ added in v1.8.0
type MapStruct struct { MapFields map[string]*Struct `` /* 176-byte string literal not displayed */ // contains filtered or unexported fields }
func (*MapStruct) Descriptor
deprecated
added in
v1.8.0
func (*MapStruct) GetMapFields ¶ added in v1.8.0
func (*MapStruct) ProtoMessage ¶ added in v1.8.0
func (*MapStruct) ProtoMessage()
func (*MapStruct) ProtoReflect ¶ added in v1.8.0
func (x *MapStruct) ProtoReflect() protoreflect.Message
type Struct ¶ added in v1.8.0
type Struct struct { ClassName string `protobuf:"bytes,1,opt,name=ClassName,proto3" json:"ClassName,omitempty"` Fields map[string]*Value `` /* 153-byte string literal not displayed */ // contains filtered or unexported fields }
func NewStruct ¶ added in v1.8.0
NewStruct constructs a Struct from a generic Go map. v is optionally map[string]interface{}. The map values are converted using NewValue.
func (*Struct) Descriptor
deprecated
added in
v1.8.0
func (*Struct) GetClassName ¶ added in v1.8.0
func (*Struct) ProtoMessage ¶ added in v1.8.0
func (*Struct) ProtoMessage()
func (*Struct) ProtoReflect ¶ added in v1.8.0
func (x *Struct) ProtoReflect() protoreflect.Message
type Tree ¶ added in v1.7.0
type Tree struct { Name string Data sync.Map Up *Tree Downs []*Tree // contains filtered or unexported fields }
Tree is a tree structure that can be used to represent a nested structure in HCL
func DefaultTreeFunctions ¶ added in v1.10.1
DefaultTreeFunctions returns the default tree, and the map containing default functions and the default tree
func (*Tree) AddNode ¶ added in v1.7.0
AddNode adds a new node to the tree. It returns the newly created node.
func (*Tree) AddNodes ¶ added in v1.8.3
AddNodes adds a new node to the tree, and then adds the given names as children to the new node.
func (*Tree) DeleteItem ¶ added in v1.7.0
GetItem returns the item with the given key in the tree data
func (*Tree) DeleteNode ¶ added in v1.7.0
DeleteNode deletes the node with the given name.
type Value ¶ added in v1.8.0
type Value struct { // The kind of value. // // Types that are assignable to Kind: // // *Value_SingleStruct // *Value_ListStruct // *Value_MapStruct // *Value_Map2Struct Kind isValue_Kind `protobuf_oneof:"kind"` // contains filtered or unexported fields }
func NewValue ¶ added in v1.8.0
NewValue constructs a Value from generic Go interface v.
╔═══════════════════════════╤══════════════════════════════╗ ║ Go type │ Conversion ║ ╠═══════════════════════════╪══════════════════════════════╣ ║ string │ ending SingleStruct value ║ ║ []string │ ending ListStruct value ║ ║ map[string]string │ ending MapStruct value ║ ║ │ ║ ║ [2]interface{} │ SingleStruct value ║ ║ [][2]interface{} │ ListStruct value ║ ║ map[string][2]interface{} │ MapStruct value ║ ║ │ ║ ║ *Struct │ SingleStruct ║ ║ []*Struct │ ListStruct ║ ║ map[string]*Struct │ MapStruct ║ ╚═══════════════════════════╧══════════════════════════════╝
func (*Value) Descriptor
deprecated
added in
v1.8.0
func (*Value) GetListStruct ¶ added in v1.8.0
func (x *Value) GetListStruct() *ListStruct
func (*Value) GetMap2Struct ¶ added in v1.8.0
func (x *Value) GetMap2Struct() *Map2Struct
func (*Value) GetMapStruct ¶ added in v1.8.0
func (*Value) GetSingleStruct ¶ added in v1.8.0
func (*Value) ProtoMessage ¶ added in v1.8.0
func (*Value) ProtoMessage()
func (*Value) ProtoReflect ¶ added in v1.8.0
func (x *Value) ProtoReflect() protoreflect.Message
type Value_ListStruct ¶ added in v1.8.0
type Value_ListStruct struct {
ListStruct *ListStruct `protobuf:"bytes,2,opt,name=list_struct,json=listStruct,proto3,oneof"`
}
type Value_Map2Struct ¶ added in v1.8.0
type Value_Map2Struct struct {
Map2Struct *Map2Struct `protobuf:"bytes,4,opt,name=map2_struct,json=map2Struct,proto3,oneof"`
}
type Value_MapStruct ¶ added in v1.8.0
type Value_MapStruct struct {
MapStruct *MapStruct `protobuf:"bytes,3,opt,name=map_struct,json=mapStruct,proto3,oneof"`
}
type Value_SingleStruct ¶ added in v1.8.0
type Value_SingleStruct struct {
SingleStruct *Struct `protobuf:"bytes,1,opt,name=single_struct,json=singleStruct,proto3,oneof"`
}