Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Attribute ¶
type Attribute struct { // Name is the attribute name as defined in the `attribute` block label Name string `json:"name"` // Type is the type definition for the attribute Type Type `json:"type_definition"` // Default is an optional default value for this variable in case none is given. Must be a valid JSON value. Default json.RawMessage `json:"default,omitempty"` // Description is an optional attribute description Description string `json:"description,omitempty"` // ForcesRecreation specifies if a change in the attribute will force the resource recreation ForcesRecreation bool `json:"forces_recreation"` // ReadmeExample is an optional readme example to be used in the documentation ReadmeExample string `json:"readme_example,omitempty"` // Required specifies if the attribute is required Required bool `json:"required"` // Attributes is a collection of nested attributes contained in the attribute block definition Attributes []Attribute `json:"attributes,omitempty"` // Level is the nesting level of this attribute Level int `json:"-"` }
Attribute represents an `attribute` block from the input file
type Badge ¶ added in v0.0.2
type Badge struct { Image string `json:"image"` // Image is the badge's image url URL string `json:"url"` // URL is the target url for the badge Text string `json:"text"` // Text is the text label for the badge Name string `json:"name"` // Name is an identifier for the badge }
Badge represents a `badge` block on the parsed source file
type Doc ¶ added in v0.0.8
type Doc struct { // Header is the header section block from the source file Header Header // Sections is a collection of sections defined in the source file. Sections []Section `json:"sections"` // References is a collection of references defined in the source file. References []Reference `json:"references"` }
Doc represents a parsed source file.
func (Doc) AllOutputs ¶ added in v0.0.8
func (Doc) AllVariables ¶ added in v0.0.8
type Header ¶ added in v0.0.2
type Header struct { Image string `json:"image"` // Image is the image url to be displayed on the header URL string `json:"url"` // URL is the target url for the image Badges []Badge `json:"badges"` // Badges is a collection of Badge entities }
Header represents the `header` block on the parsed source file
type Output ¶ added in v0.0.7
type Output struct { // Name as defined in the `output` block label. Name string `json:"name"` // Type is a type definition for the output Type Type `json:"type_definition"` // Description is an optional output description Description string `json:"description,omitempty"` }
Output represents an `output` block from the input file.
type OutputCollection ¶ added in v0.0.8
type OutputCollection []Output
func (OutputCollection) OutputByName ¶ added in v0.0.8
func (oc OutputCollection) OutputByName(name string) (Output, bool)
type Reference ¶ added in v0.0.2
type Reference struct { Name string `json:"name"` // Name is the identifier for the reference Value string `json:"value"` // Value is the value that the reference holds }
Reference represents a `ref` block on the source document
type Section ¶
type Section struct { // Title is an optional title for the section. Title string `json:"title"` // Content is an optional text content for the section. Content string `json:"content,omitempty"` // Variables is a collection of variable definitions contained in the section block. Variables []Variable `json:"variables,omitempty"` // Ouputs is a collection of output definitions contained in the section block. Outputs []Output `json:"outputs,omitempty"` // SubSections is a collection of nested sections contained in the section block. SubSections []Section `json:"subsections,omitempty"` // Level is the nesting of this section Level int `json:"-"` // TOC is a flag for generating table of contents for nested sections TOC bool `json:"-"` }
Section represents a `section` block from the input file.
func (Section) AllOutputs ¶ added in v0.0.8
func (s Section) AllOutputs() (result OutputCollection)
func (Section) AllVariables ¶ added in v0.0.8
func (s Section) AllVariables() (result VariableCollection)
type Type ¶
type Type struct { // TFType is the specific Terraform type definition for this type TFType types.TerraformType `json:"type"` // Label is an optional label for the TerraformType Label string `json:"label"` // Nested is an optional nested type definition Nested *Type `json:"nested,omitempty"` }
Type represents a variable or attribute type with its readme and Terraform type data
func (Type) HasNestedType ¶ added in v0.0.5
type ValidationContents ¶ added in v0.0.9
type ValidationContents struct { Variables VariableCollection Outputs OutputCollection }
type Variable ¶
type Variable struct { // Name as defined in the `variable` block label. Name string `json:"name"` // Type is a type definition for the variable Type Type `json:"type_definition"` // Description is an optional variable description Description string `json:"description,omitempty"` // Default is an optional default value for this variable in case none is given. Must be a valid JSON value. Default json.RawMessage `json:"default,omitempty"` // Required specifies if the variable is required Required bool `json:"required,omitempty"` // ForcesRecreation specifies if a change in the variable triggers the recreation of the resource. ForcesRecreation bool `json:"forces_recreation,omitempty"` // ReadmeExample is an optional readme example to be used in the documentation ReadmeExample string `json:"readme_example,omitempty"` // Attributes is a collection attributes that make up the value of this variable. Attributes []Attribute `json:"attributes,omitempty"` }
Variable represents a `variable` block from the input file.
type VariableCollection ¶ added in v0.0.8
type VariableCollection []Variable
Click to show internal directories.
Click to hide internal directories.