Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FromHCLBody ¶
func FromHCLBody(body hcl.Body) (map[string]*SchemaAttribute, error)
func IsPrimitive ¶
func IsPrimitive(value interface{}) bool
Types ¶
type NestingMode ¶
type NestingMode int
const ( NestingSingle NestingMode NestingGroup NestingList NestingSet NestingMap )
type ProviderSchema ¶
type Schema ¶
type Schema struct {
Block *SchemaBlock `json:"block,omitempty"`
}
type SchemaAttribute ¶
type SchemaAttribute struct {
Name string `json:"name,omitempty"`
AttributeType cty.Type `json:"type,omitempty"`
Required bool `json:"required,omitempty"`
Optional bool `json:"optional,omitempty"`
Default interface{} `json:"default,omitempty"`
Content string `json:"content,omitempty"`
AttributePath string `json:"attribute_path,omitempty"`
PossibleValues []string `json:"possible_values,omitempty"`
NestingMode NestingMode `json:"nesting_mode,omitempty"`
Fields map[string]*SchemaAttribute `json:"fields,omitempty"`
ResourceOrDataSourceName string `json:"resource_or_data_source_name,omitempty"`
}
func (SchemaAttribute) MarshalJSON ¶
func (attr SchemaAttribute) MarshalJSON() ([]byte, error)
type SchemaBlock ¶
type SchemaBlock struct {
Attributes map[string]*SchemaAttribute `json:"attributes,omitempty"`
NestedBlocks map[string]*SchemaBlockType `json:"block_types,omitempty"`
}
func FromHCLFile ¶
func FromHCLFile(fileName string) (*SchemaBlock, error)
type SchemaBlockType ¶
type SchemaBlockType struct {
NestingMode NestingMode `json:"nesting_mode,omitempty"`
Block *SchemaBlock `json:"block,omitempty"`
Required bool `json:"required,omitempty"`
Optional bool `json:"optional,omitempty"`
}
type TerraformObject ¶
type TerraformObject struct {
Name string `json:"name"`
Fields map[string]*SchemaAttribute `json:"fields"`
ExampleHCL string `json:"example_hcl"`
Details string `json:"details"` // Start from first h2 header (after description)
}
type TerraformObjects ¶
type TerraformObjects map[string]*TerraformObject
Click to show internal directories.
Click to hide internal directories.