legacy

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2022 License: MPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NestingMode

type NestingMode int
const (
	NestingSingle NestingMode
	NestingGroup
	NestingList
	NestingSet
	NestingMap
)

type ProviderSchema

type ProviderSchema struct {
	// The provder version. This is defined in the vcs.
	Version string

	ResourceSchemas map[string]*Schema `json:"resource_schemas,omitempty"`
}

func (*ProviderSchema) TuneTpl

func (schemas *ProviderSchema) TuneTpl(tpl []byte, rt string) ([]byte, error)

type Schema

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

type SchemaAttribute

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

	Required bool        `json:"required,omitempty"`
	Optional bool        `json:"optional,omitempty"`
	Computed bool        `json:"computed,omitempty"`
	Default  interface{} `json:"default,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 SchemaBlock

type SchemaBlock struct {
	Attributes   map[string]*SchemaAttribute `json:"attributes,omitempty"`
	NestedBlocks map[string]*SchemaBlockType `json:"block_types,omitempty"`
}

func FromProviderSchemaMap

func FromProviderSchemaMap(providerschemas map[string]*schema.Schema) *SchemaBlock

func (*SchemaBlock) ImpliedType

func (b *SchemaBlock) ImpliedType() cty.Type

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"`
	Computed bool `json:"computed,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"`
}

Jump to

Keyboard shortcuts

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