schema

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: MPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SchemaTypeSet    = "TypeSet"
	SchemaTypeList   = "TypeList"
	SchemaTypeMap    = "TypeMap"
	SchemaTypeInt    = "TypeInt"
	SchemaTypeString = "TypeString"
	SchemaTypeBool   = "TypeBool"
	SchemaTypeFloat  = "TypeFloat"
	SchemaTypeNumber = "TypeNumber"
	SchemaTypeObject = "TypeObject"
)

Variables

This section is empty.

Functions

func NodeIsBlock

func NodeIsBlock(input SchemaJSON) bool

Types

type ProviderJSON

type ProviderJSON struct {
	SDKProvider *sdkschema.Provider
	Provider    provider.Provider
}

func (*ProviderJSON) DataSourcesMap

func (p *ProviderJSON) DataSourcesMap() map[string]*ds_schema.Schema

func (*ProviderJSON) ResourcesMap

func (p *ProviderJSON) ResourcesMap() map[string]*rs_schema.Schema

func (*ProviderJSON) SDKDataSourcesMap

func (p *ProviderJSON) SDKDataSourcesMap() map[string]*sdkschema.Resource

func (*ProviderJSON) SDKResourcesMap

func (p *ProviderJSON) SDKResourcesMap() map[string]*sdkschema.Resource

func (*ProviderJSON) SDKSchema

func (p *ProviderJSON) SDKSchema() map[string]*sdkschema.Schema

type ProviderSchemaJSON

type ProviderSchemaJSON struct {
	Schema         map[string]SchemaJSON   `json:"schema"`
	ResourcesMap   map[string]ResourceJSON `json:"resources,omitempty"`
	DataSourcesMap map[string]ResourceJSON `json:"data_sources,omitempty"`
}

type ProviderWrapper

type ProviderWrapper struct {
	ProviderName    string              `json:"provider_name"`
	ProviderVersion string              `json:"provider_version"`
	SchemaVersion   string              `json:"schema_version"`
	ProviderSchema  *ProviderSchemaJSON `json:"provider_schema,omitempty"`
}

type ResourceJSON

type ResourceJSON struct {
	Schema      map[string]SchemaJSON `json:"schema"`
	Timeouts    *ResourceTimeoutJSON  `json:"timeouts,omitempty"`
	Description string                `json:"description,omitempty"`
	NewSince    string                `json:"new_since,omitempty"`
	Deprecated  string                `json:"deprecated,omitempty"`
}

type ResourceTimeoutJSON

type ResourceTimeoutJSON struct {
	Create int `json:"create,omitempty"`
	Read   int `json:"read,omitempty"`
	Delete int `json:"delete,omitempty"`
	Update int `json:"update,omitempty"`
}

type SchemaJSON

type SchemaJSON struct {
	Type        string      `json:"type,omitempty"`
	ConfigMode  string      `json:"config_mode,omitempty"`
	Optional    bool        `json:"optional,omitempty"`
	Required    bool        `json:"required,omitempty"`
	Default     interface{} `json:"default,omitempty"`
	Description string      `json:"description,omitempty"`
	Computed    bool        `json:"computed,omitempty"`
	ForceNew    bool        `json:"force_new,omitempty"`
	Elem        interface{} `json:"elem,omitempty"`
	MaxItems    int         `json:"max_items,omitempty"`
	MinItems    int         `json:"min_items,omitempty"`
	NewSince    string      `json:"new_since,omitempty"`
	Deprecated  string      `json:"deprecated,omitempty"`
}

func (*SchemaJSON) UnmarshalJSON

func (b *SchemaJSON) UnmarshalJSON(body []byte) error

Jump to

Keyboard shortcuts

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