Documentation ¶
Overview ¶
Documentable wrapper types form
Index ¶
- func Decode(body hcl.Body, spec RootSpec, ctx *hcl.EvalContext) (val cty.Value, diags diagnostics.Diag)
- func ItemName(s Spec) string
- func RenderDoc(spec RootSpec, blockName string, labels ...string) string
- type AttrSpec
- func (a *AttrSpec) DocComment() hclwrite.Tokens
- func (a *AttrSpec) HcldecSpec() (res hcldec.Spec)
- func (a *AttrSpec) KeyForObjectSpec() string
- func (a *AttrSpec) ValidateSpec() (diags diagnostics.Diag)
- func (a *AttrSpec) ValidateValue(val cty.Value) (diags hcl.Diagnostics)
- func (a *AttrSpec) WriteDoc(w *hclwrite.Body)
- type BlockSpec
- type KeyForObjectSpec
- type ObjDumpSpec
- type ObjectSpec
- type ObjectSpecChild
- type OpaqueSpec
- type RootSpec
- type Spec
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Decode ¶
func Decode(body hcl.Body, spec RootSpec, ctx *hcl.EvalContext) (val cty.Value, diags diagnostics.Diag)
Wrapper over hcldec.Decode.
Types ¶
type AttrSpec ¶
type AttrSpec struct { Name string Type cty.Type DefaultVal cty.Value ExampleVal cty.Value Doc string Constraints constraint.Constraints // If set then value must be one of the specified values OneOf constraint.OneOf // For numbers - min value; for collections - min number of elements; for strings - min length MinInclusive cty.Value // For numbers - max value; for collections - max number of elements; for strings - max length MaxInclusive cty.Value // If specified – a deprecation warning would appear if an attribute is specified and non-null Deprecated string // If set then the value is hidden in logs Secret bool }
AttrSpec represents the attribute value (hcldec.AttrSpec).
func (*AttrSpec) DocComment ¶
func (*AttrSpec) HcldecSpec ¶
func (*AttrSpec) KeyForObjectSpec ¶
func (*AttrSpec) ValidateSpec ¶
func (a *AttrSpec) ValidateSpec() (diags diagnostics.Diag)
func (*AttrSpec) ValidateValue ¶
type BlockSpec ¶
type BlockSpec struct { Name string Nested Spec Doc string Required bool // contains filtered or unexported fields }
BlockSpec represents a nested block (hcldec.BlockSpec).
func (*BlockSpec) HcldecSpec ¶
func (*BlockSpec) KeyForObjectSpec ¶
func (*BlockSpec) ValidateSpec ¶
func (b *BlockSpec) ValidateSpec() (errs diagnostics.Diag)
type KeyForObjectSpec ¶
type KeyForObjectSpec struct { Spec // contains filtered or unexported fields }
Sets the name of Spec to be used as the key of hcldec.ObjectSpec.
func UnderKey ¶
func UnderKey(key string, spec Spec) *KeyForObjectSpec
Specifies the key to be used in object spec
func (*KeyForObjectSpec) KeyForObjectSpec ¶
func (ns *KeyForObjectSpec) KeyForObjectSpec() string
type ObjDumpSpec ¶
type ObjDumpSpec struct { Doc string // contains filtered or unexported fields }
Root-only spec
func (*ObjDumpSpec) HcldecSpec ¶
func (o *ObjDumpSpec) HcldecSpec() hcldec.Spec
func (*ObjDumpSpec) IsEmpty ¶
func (*ObjDumpSpec) IsEmpty() bool
func (*ObjDumpSpec) ValidateSpec ¶
func (*ObjDumpSpec) ValidateSpec() (errs diagnostics.Diag)
func (*ObjDumpSpec) WriteDoc ¶
func (o *ObjDumpSpec) WriteDoc(w *hclwrite.Body)
type ObjectSpec ¶
type ObjectSpec []ObjectSpecChild
Wraps hcldec.ObjectSpec
func (ObjectSpec) HcldecSpec ¶
func (o ObjectSpec) HcldecSpec() hcldec.Spec
func (ObjectSpec) IsEmpty ¶
func (o ObjectSpec) IsEmpty() bool
func (ObjectSpec) ValidateSpec ¶
func (o ObjectSpec) ValidateSpec() (errs diagnostics.Diag)
func (ObjectSpec) WriteDoc ¶
func (o ObjectSpec) WriteDoc(w *hclwrite.Body)
type ObjectSpecChild ¶
Represents types that could be included as children in Object.
type OpaqueSpec ¶
OpaqueSpec adds an ability to use any hcldec.Spec (without automatic documentation generation).
func (*OpaqueSpec) HcldecSpec ¶
func (o *OpaqueSpec) HcldecSpec() hcldec.Spec
func (*OpaqueSpec) ValidateSpec ¶
func (*OpaqueSpec) ValidateSpec() (errs diagnostics.Diag)
func (*OpaqueSpec) WriteDoc ¶
func (o *OpaqueSpec) WriteDoc(w *hclwrite.Body)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.