schema

package
v0.0.0-...-e6a0e0e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 8, 2022 License: MPL-2.0 Imports: 1 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Attribute

type Attribute struct {
	Type cty.Type `json:"type,omitempty"`

	Required bool `json:"required,omitempty"`
	Optional bool `json:"optional,omitempty"`
	Computed bool `json:"computed,omitempty"`
	ForceNew bool `json:"force_new,omitempty"`

	Default   interface{} `json:"default,omitempty"`
	Sensitive bool        `json:"sensitive,omitempty"`

	ConflictsWith []string `json:"conflicts_with,omitempty"`
	ExactlyOneOf  []string `json:"exactly_one_of,omitempty"`
	AtLeastOneOf  []string `json:"at_least_one_of,omitempty"`
	RequiredWith  []string `json:"required_with,omitempty"`
}

type Block

type Block struct {
	Attributes   map[string]*Attribute   `json:"attributes,omitempty"`
	NestedBlocks map[string]*NestedBlock `json:"block_types,omitempty"`
}

type NestedBlock

type NestedBlock struct {
	NestingMode NestingMode `json:"nesting_mode,omitempty"`
	Block       *Block      `json:"block,omitempty"`

	Required bool `json:"required,omitempty"`
	Optional bool `json:"optional,omitempty"`
	Computed bool `json:"computed,omitempty"`
	ForceNew bool `json:"force_new,omitempty"`

	ConflictsWith []string `json:"conflicts_with,omitempty"`
	ExactlyOneOf  []string `json:"exactly_one_of,omitempty"`
	AtLeastOneOf  []string `json:"at_least_one_of,omitempty"`
	RequiredWith  []string `json:"required_with,omitempty"`

	MinItems int `json:"min_items,omitempty"`
	MaxItems int `json:"max_items,omitempty"`
}

type NestingMode

type NestingMode int
const (
	NestingModeInvalid NestingMode = iota
	NestingSingle
	NestingGroup
	NestingList
	NestingSet
	NestingMap
)

type ProviderSchema

type ProviderSchema struct {
	Provider          *Schema              `json:"provider,omitempty"`
	ResourceSchemas   map[string]*Resource `json:"resource_schemas,omitempty"`
	DataSourceSchemas map[string]*Resource `json:"data_source_schemas,omitempty"`
}

type Resource

type Resource struct {
	SchemaVersion int    `json:"schema_version,omitempty"`
	Block         *Block `json:"block,omitempty"`
}

type Schema

type Schema struct {
	Block *Block `json:"block,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL