Documentation ¶
Overview ¶
Package spec contains types and functions used for parsing, and validating a Specification.
Index ¶
Constants ¶
View Source
const (
Version0_1 = "0.1"
)
Variables ¶
View Source
var ( //go:embed v0.1/schema.json JSONSchemaVersion0_1 []byte )
Functions ¶
Types ¶
type Request ¶
type Request struct { Create RequestType `json:"create,omitempty"` Read RequestType `json:"read"` Update []*RequestType `json:"update"` Delete RequestType `json:"delete"` }
type RequestBody ¶
type RequestType ¶
type RequestType struct { Parameters []string `json:"parameters,omitempty"` RequestBody *RequestBody `json:"request_body,omitempty"` Response string `json:"response,omitempty"` }
type Specification ¶
type Specification struct { // DataSources defines a slice of datasource.DataSource type. DataSources datasource.DataSources `json:"datasources,omitempty"` // Provider defines an instance of the provider.Provider type. Provider *provider.Provider `json:"provider,omitempty"` // Resources defines a slice of resource.Resource type. Resources resource.Resources `json:"resources,omitempty"` // Request(Parameters, Body) struct for CRUD Requests Requests `json:"requests,omitempty"` // Version defines the Provider Code Specification JSON schema version Version string `json:"version,omitempty"` }
Specification defines the data source(s), provider, and resource(s) for a Terraform provider.
Click to show internal directories.
Click to hide internal directories.