superschema

package module
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2024 License: MPL-2.0 Imports: 17 Imported by: 0

README

terraform-plugin-framework-superschema

SuperSchema allows you to write the Terraform schema for resources and datasources in a single definition, along with a common field that enables you to define default values. SuperSchema is compatible with tfplugindocs.

This is a try to solve these issues :

  • Don't repeat yourself : common fields applied on resources and datasources.
  • Auto format attributes markdown description with validators and plan modifiers descriptions, default values...

Documentation

For more information about the SuperSchema, please refer to the documentation.

Documentation

Overview

code generated by go generate - look at type_attribute.go.tmpl for source file

code generated by go generate - look at type_attribute.go.tmpl for source file

code generated by go generate - look at type_attribute.go.tmpl for source file

code generated by go generate - look at type_attribute.go.tmpl for source file

code generated by go generate - look at type_attribute.go.tmpl for source file

code generated by go generate - look at type_attribute.go.tmpl for source file

code generated by go generate - look at type_attribute.go.tmpl for source file

code generated by go generate - look at type_attribute.go.tmpl for source file

code generated by go generate - look at type_attribute.go.tmpl for source file

code generated by go generate - look at type_attribute.go.tmpl for source file

code generated by go generate - look at type_attribute.go.tmpl for source file

code generated by go generate - look at type_attribute.go.tmpl for source file

code generated by go generate - look at type_attribute.go.tmpl for source file

code generated by go generate - look at supertype_attribute.go.tmpl for source file

code generated by go generate - look at supertype_attribute.go.tmpl for source file

code generated by go generate - look at supertype_attribute.go.tmpl for source file

code generated by go generate - look at supertype_attribute.go.tmpl for source file

code generated by go generate - look at supertype_attribute.go.tmpl for source file

code generated by go generate - look at supertype_attribute.go.tmpl for source file

code generated by go generate - look at supertype_attribute.go.tmpl for source file

code generated by go generate - look at supertype_attribute.go.tmpl for source file

code generated by go generate - look at supertype_attribute.go.tmpl for source file

code generated by go generate - look at supertype_attribute.go.tmpl for source file

code generated by go generate - look at supertype_attribute.go.tmpl for source file

code generated by go generate - look at supertype_attribute.go.tmpl for source file

code generated by go generate - look at supertype_attribute.go.tmpl for source file

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Attribute

type Attribute interface {
	IsResource() bool
	IsDataSource() bool
	GetResource(ctx context.Context) schemaR.Attribute
	GetDataSource(ctx context.Context) schemaD.Attribute
}

type Attributes

type Attributes map[string]Attribute

type BoolAttribute

type BoolAttribute struct {
	Deprecated *Deprecated
	Common     *schemaR.BoolAttribute
	Resource   *schemaR.BoolAttribute
	DataSource *schemaD.BoolAttribute
}

func (BoolAttribute) GetDataSource

func (s BoolAttribute) GetDataSource(ctx context.Context) schemaD.Attribute

func (BoolAttribute) GetResource

func (s BoolAttribute) GetResource(ctx context.Context) schemaR.Attribute

func (BoolAttribute) IsDataSource

func (s BoolAttribute) IsDataSource() bool

IsDataSource returns true if the attribute is a data source attribute.

func (BoolAttribute) IsResource

func (s BoolAttribute) IsResource() bool

IsResource returns true if the attribute is a resource attribute.

type DatasourceTimeoutAttribute

type DatasourceTimeoutAttribute struct {
	Read bool
}

type Deprecated added in v1.5.0

type Deprecated struct {
	// DeprecationMessage is the message to display in the CLI when the user
	// attempts to use the deprecated attribute.
	// This field is required.
	DeprecationMessage string

	// MarkdownDeprecationMessage is the message to display in the Documentation portal
	// when the user attempts to use the deprecated attribute.
	// This field is optional if ComputeMarkdownDeprecationMessage is false.
	MarkdownDeprecationMessage string

	// ComputeMarkdownDeprecationMessage is a flag to indicate whether the MarkdownDeprecationMessage
	// should be computed from the parameters of the Deprecated struct.
	ComputeMarkdownDeprecationMessage bool

	// Renamed is a flag to indicate whether the attribute has been renamed.
	// Removed is a flag to indicate whether the attribute has been removed.
	// One of these fields must be true.
	Renamed, Removed bool

	// FromAttributeName is the name of the attribute that has been deprecated.
	// This field is required if ComputeMarkdownDeprecationMessage is true.
	FromAttributeName string

	// TargetAttributeName is the name of the attribute that replaces the deprecated attribute.
	// TargetResourceName is the name of the resource that replaces the deprecated attribute.
	// These fields are optional if the attribute has been removed.
	TargetAttributeName, TargetResourceName string

	// TargetRelease is the release version in which the attribute was deprecated. (e.g. v1.0.0).
	// This field is Required.
	TargetRelease string
	// LinkToIssue is the link to the GitHub issue that describes the deprecation.
	// This field is optional.
	LinkToIssue string
	// LinkToResourceDoc is the link to the terraform documentation for the resource that replaces the deprecated attribute.
	// This field is optional.
	LinkToResourceDoc string
	// LinkToMilestone is the link to the GitHub milestone that describes the release in which the attribute was deprecated.
	// This field is optional.
	LinkToMilestone string

	// OnlyResource and OnlyDataSource are flags to indicate whether the deprecation message should be displayed
	// only for the resource or only for the data source.
	// If not set, the deprecation message will be displayed for both.
	OnlyResource, OnlyDataSource *bool
}

Deprecated is a struct to describe a deprecated attribute.

func (*Deprecated) GetDeprecationMessage added in v1.5.0

func (d *Deprecated) GetDeprecationMessage() string

GetDeprecationMessage returns the deprecation message for the attribute.

func (*Deprecated) GetMarkdownDeprecationMessage added in v1.5.0

func (d *Deprecated) GetMarkdownDeprecationMessage() string

GetMarkdownDeprecationMessage returns the markdown deprecation message for the attribute.

type Float64Attribute

type Float64Attribute struct {
	Deprecated *Deprecated
	Common     *schemaR.Float64Attribute
	Resource   *schemaR.Float64Attribute
	DataSource *schemaD.Float64Attribute
}

func (Float64Attribute) GetDataSource

func (s Float64Attribute) GetDataSource(ctx context.Context) schemaD.Attribute

func (Float64Attribute) GetResource

func (s Float64Attribute) GetResource(ctx context.Context) schemaR.Attribute

func (Float64Attribute) IsDataSource

func (s Float64Attribute) IsDataSource() bool

IsDataSource returns true if the attribute is a data source attribute.

func (Float64Attribute) IsResource

func (s Float64Attribute) IsResource() bool

IsResource returns true if the attribute is a resource attribute.

type Int64Attribute

type Int64Attribute struct {
	Deprecated *Deprecated
	Common     *schemaR.Int64Attribute
	Resource   *schemaR.Int64Attribute
	DataSource *schemaD.Int64Attribute
}

func (Int64Attribute) GetDataSource

func (s Int64Attribute) GetDataSource(ctx context.Context) schemaD.Attribute

func (Int64Attribute) GetResource

func (s Int64Attribute) GetResource(ctx context.Context) schemaR.Attribute

func (Int64Attribute) IsDataSource

func (s Int64Attribute) IsDataSource() bool

IsDataSource returns true if the attribute is a data source attribute.

func (Int64Attribute) IsResource

func (s Int64Attribute) IsResource() bool

IsResource returns true if the attribute is a resource attribute.

type ListAttribute

type ListAttribute struct {
	Deprecated *Deprecated
	Common     *schemaR.ListAttribute
	Resource   *schemaR.ListAttribute
	DataSource *schemaD.ListAttribute
}

func (ListAttribute) GetDataSource

func (s ListAttribute) GetDataSource(ctx context.Context) schemaD.Attribute

func (ListAttribute) GetResource

func (s ListAttribute) GetResource(ctx context.Context) schemaR.Attribute

func (ListAttribute) IsDataSource

func (s ListAttribute) IsDataSource() bool

IsDataSource returns true if the attribute is a data source attribute.

func (ListAttribute) IsResource

func (s ListAttribute) IsResource() bool

IsResource returns true if the attribute is a resource attribute.

type ListNestedAttribute

type ListNestedAttribute struct {
	Deprecated *Deprecated
	Common     *schemaR.ListNestedAttribute
	Resource   *schemaR.ListNestedAttribute
	DataSource *schemaD.ListNestedAttribute
	Attributes Attributes
}

func (ListNestedAttribute) GetDataSource

func (s ListNestedAttribute) GetDataSource(ctx context.Context) schemaD.Attribute

func (ListNestedAttribute) GetResource

func (ListNestedAttribute) IsDataSource

func (s ListNestedAttribute) IsDataSource() bool

IsDataSource returns true if the attribute is a data source attribute.

func (ListNestedAttribute) IsResource

func (s ListNestedAttribute) IsResource() bool

IsResource returns true if the attribute is a resource attribute.

type MapAttribute added in v1.3.0

type MapAttribute struct {
	Deprecated *Deprecated
	Common     *schemaR.MapAttribute
	Resource   *schemaR.MapAttribute
	DataSource *schemaD.MapAttribute
}

func (MapAttribute) GetDataSource added in v1.3.0

func (s MapAttribute) GetDataSource(ctx context.Context) schemaD.Attribute

func (MapAttribute) GetResource added in v1.3.0

func (s MapAttribute) GetResource(ctx context.Context) schemaR.Attribute

func (MapAttribute) IsDataSource added in v1.3.0

func (s MapAttribute) IsDataSource() bool

IsDataSource returns true if the attribute is a data source attribute.

func (MapAttribute) IsResource added in v1.3.0

func (s MapAttribute) IsResource() bool

IsResource returns true if the attribute is a resource attribute.

type MapNestedAttribute added in v1.3.0

type MapNestedAttribute struct {
	Deprecated *Deprecated
	Common     *schemaR.MapNestedAttribute
	Resource   *schemaR.MapNestedAttribute
	DataSource *schemaD.MapNestedAttribute
	Attributes Attributes
}

func (MapNestedAttribute) GetDataSource added in v1.3.0

func (s MapNestedAttribute) GetDataSource(ctx context.Context) schemaD.Attribute

func (MapNestedAttribute) GetResource added in v1.3.0

func (s MapNestedAttribute) GetResource(ctx context.Context) schemaR.Attribute

func (MapNestedAttribute) IsDataSource added in v1.3.0

func (s MapNestedAttribute) IsDataSource() bool

IsDataSource returns true if the attribute is a data source attribute.

func (MapNestedAttribute) IsResource added in v1.3.0

func (s MapNestedAttribute) IsResource() bool

IsResource returns true if the attribute is a resource attribute.

type NumberAttribute

type NumberAttribute struct {
	Deprecated *Deprecated
	Common     *schemaR.NumberAttribute
	Resource   *schemaR.NumberAttribute
	DataSource *schemaD.NumberAttribute
}

func (NumberAttribute) GetDataSource

func (s NumberAttribute) GetDataSource(ctx context.Context) schemaD.Attribute

func (NumberAttribute) GetResource

func (s NumberAttribute) GetResource(ctx context.Context) schemaR.Attribute

func (NumberAttribute) IsDataSource

func (s NumberAttribute) IsDataSource() bool

IsDataSource returns true if the attribute is a data source attribute.

func (NumberAttribute) IsResource

func (s NumberAttribute) IsResource() bool

IsResource returns true if the attribute is a resource attribute.

type ObjectAttribute

type ObjectAttribute struct {
	Deprecated *Deprecated
	Common     *schemaR.ObjectAttribute
	Resource   *schemaR.ObjectAttribute
	DataSource *schemaD.ObjectAttribute
}

func (ObjectAttribute) GetDataSource

func (s ObjectAttribute) GetDataSource(ctx context.Context) schemaD.Attribute

func (ObjectAttribute) GetResource

func (s ObjectAttribute) GetResource(ctx context.Context) schemaR.Attribute

func (ObjectAttribute) IsDataSource

func (s ObjectAttribute) IsDataSource() bool

IsDataSource returns true if the attribute is a data source attribute.

func (ObjectAttribute) IsResource

func (s ObjectAttribute) IsResource() bool

IsResource returns true if the attribute is a resource attribute.

type ResourceTimeoutAttribute

type ResourceTimeoutAttribute struct {
	Create bool
	Read   bool
	Delete bool
	Update bool
}

type Schema

type Schema struct {
	Deprecated Deprecated
	Common     SchemaDetails
	Resource   SchemaDetails
	DataSource SchemaDetails
	Attributes Attributes
}

func (Schema) GetDataSource

func (s Schema) GetDataSource(ctx context.Context) schemaD.Schema

func (Schema) GetResource

func (s Schema) GetResource(ctx context.Context) schemaR.Schema

type SchemaDetails

type SchemaDetails struct {
	MarkdownDescription string
	DeprecationMessage  string
}

type SetAttribute

type SetAttribute struct {
	Deprecated *Deprecated
	Common     *schemaR.SetAttribute
	Resource   *schemaR.SetAttribute
	DataSource *schemaD.SetAttribute
}

func (SetAttribute) GetDataSource

func (s SetAttribute) GetDataSource(ctx context.Context) schemaD.Attribute

func (SetAttribute) GetResource

func (s SetAttribute) GetResource(ctx context.Context) schemaR.Attribute

func (SetAttribute) IsDataSource

func (s SetAttribute) IsDataSource() bool

IsDataSource returns true if the attribute is a data source attribute.

func (SetAttribute) IsResource

func (s SetAttribute) IsResource() bool

IsResource returns true if the attribute is a resource attribute.

type SetNestedAttribute

type SetNestedAttribute struct {
	Deprecated *Deprecated
	Common     *schemaR.SetNestedAttribute
	Resource   *schemaR.SetNestedAttribute
	DataSource *schemaD.SetNestedAttribute
	Attributes Attributes
}

func (SetNestedAttribute) GetDataSource

func (s SetNestedAttribute) GetDataSource(ctx context.Context) schemaD.Attribute

func (SetNestedAttribute) GetResource

func (s SetNestedAttribute) GetResource(ctx context.Context) schemaR.Attribute

func (SetNestedAttribute) IsDataSource

func (s SetNestedAttribute) IsDataSource() bool

IsDataSource returns true if the attribute is a data source attribute.

func (SetNestedAttribute) IsResource

func (s SetNestedAttribute) IsResource() bool

IsResource returns true if the attribute is a resource attribute.

type SingleNestedAttribute

type SingleNestedAttribute struct {
	Deprecated *Deprecated
	Common     *schemaR.SingleNestedAttribute
	Resource   *schemaR.SingleNestedAttribute
	DataSource *schemaD.SingleNestedAttribute
	Attributes Attributes
}

func (SingleNestedAttribute) GetDataSource

func (s SingleNestedAttribute) GetDataSource(ctx context.Context) schemaD.Attribute

func (SingleNestedAttribute) GetResource

func (SingleNestedAttribute) IsDataSource

func (s SingleNestedAttribute) IsDataSource() bool

IsDataSource returns true if the attribute is a data source attribute.

func (SingleNestedAttribute) IsResource

func (s SingleNestedAttribute) IsResource() bool

IsResource returns true if the attribute is a resource attribute.

type StringAttribute

type StringAttribute struct {
	Deprecated *Deprecated
	Common     *schemaR.StringAttribute
	Resource   *schemaR.StringAttribute
	DataSource *schemaD.StringAttribute
}

func (StringAttribute) GetDataSource

func (s StringAttribute) GetDataSource(ctx context.Context) schemaD.Attribute

func (StringAttribute) GetResource

func (s StringAttribute) GetResource(ctx context.Context) schemaR.Attribute

func (StringAttribute) IsDataSource

func (s StringAttribute) IsDataSource() bool

IsDataSource returns true if the attribute is a data source attribute.

func (StringAttribute) IsResource

func (s StringAttribute) IsResource() bool

IsResource returns true if the attribute is a resource attribute.

type SuperBoolAttribute added in v1.4.0

type SuperBoolAttribute struct {
	Deprecated *Deprecated
	Common     *schemaR.BoolAttribute
	Resource   *schemaR.BoolAttribute
	DataSource *schemaD.BoolAttribute
}

func (SuperBoolAttribute) GetDataSource added in v1.4.0

func (s SuperBoolAttribute) GetDataSource(ctx context.Context) schemaD.Attribute

func (SuperBoolAttribute) GetResource added in v1.4.0

func (s SuperBoolAttribute) GetResource(ctx context.Context) schemaR.Attribute

func (SuperBoolAttribute) IsDataSource added in v1.4.0

func (s SuperBoolAttribute) IsDataSource() bool

IsDataSource returns true if the attribute is a data source attribute.

func (SuperBoolAttribute) IsResource added in v1.4.0

func (s SuperBoolAttribute) IsResource() bool

IsResource returns true if the attribute is a resource attribute.

type SuperFloat64Attribute added in v1.4.0

type SuperFloat64Attribute struct {
	Deprecated *Deprecated
	Common     *schemaR.Float64Attribute
	Resource   *schemaR.Float64Attribute
	DataSource *schemaD.Float64Attribute
}

func (SuperFloat64Attribute) GetDataSource added in v1.4.0

func (s SuperFloat64Attribute) GetDataSource(ctx context.Context) schemaD.Attribute

func (SuperFloat64Attribute) GetResource added in v1.4.0

func (SuperFloat64Attribute) IsDataSource added in v1.4.0

func (s SuperFloat64Attribute) IsDataSource() bool

IsDataSource returns true if the attribute is a data source attribute.

func (SuperFloat64Attribute) IsResource added in v1.4.0

func (s SuperFloat64Attribute) IsResource() bool

IsResource returns true if the attribute is a resource attribute.

type SuperInt64Attribute added in v1.4.0

type SuperInt64Attribute struct {
	Deprecated *Deprecated
	Common     *schemaR.Int64Attribute
	Resource   *schemaR.Int64Attribute
	DataSource *schemaD.Int64Attribute
}

func (SuperInt64Attribute) GetDataSource added in v1.4.0

func (s SuperInt64Attribute) GetDataSource(ctx context.Context) schemaD.Attribute

func (SuperInt64Attribute) GetResource added in v1.4.0

func (SuperInt64Attribute) IsDataSource added in v1.4.0

func (s SuperInt64Attribute) IsDataSource() bool

IsDataSource returns true if the attribute is a data source attribute.

func (SuperInt64Attribute) IsResource added in v1.4.0

func (s SuperInt64Attribute) IsResource() bool

IsResource returns true if the attribute is a resource attribute.

type SuperListAttribute added in v1.4.0

type SuperListAttribute struct {
	Deprecated *Deprecated
	Common     *schemaR.ListAttribute
	Resource   *schemaR.ListAttribute
	DataSource *schemaD.ListAttribute
}

func (SuperListAttribute) GetDataSource added in v1.4.0

func (s SuperListAttribute) GetDataSource(ctx context.Context) schemaD.Attribute

func (SuperListAttribute) GetResource added in v1.4.0

func (s SuperListAttribute) GetResource(ctx context.Context) schemaR.Attribute

func (SuperListAttribute) IsDataSource added in v1.4.0

func (s SuperListAttribute) IsDataSource() bool

IsDataSource returns true if the attribute is a data source attribute.

func (SuperListAttribute) IsResource added in v1.4.0

func (s SuperListAttribute) IsResource() bool

IsResource returns true if the attribute is a resource attribute.

type SuperListAttributeOf added in v1.7.0

type SuperListAttributeOf[T any] struct {
	Deprecated *Deprecated
	Common     *schemaR.ListAttribute
	Resource   *schemaR.ListAttribute
	DataSource *schemaD.ListAttribute
}

func (SuperListAttributeOf[T]) GetDataSource added in v1.7.0

func (s SuperListAttributeOf[T]) GetDataSource(ctx context.Context) schemaD.Attribute

func (SuperListAttributeOf[T]) GetResource added in v1.7.0

func (s SuperListAttributeOf[T]) GetResource(ctx context.Context) schemaR.Attribute

func (SuperListAttributeOf[T]) IsDataSource added in v1.7.0

func (s SuperListAttributeOf[T]) IsDataSource() bool

IsDataSource returns true if the attribute is a data source attribute.

func (SuperListAttributeOf[T]) IsResource added in v1.7.0

func (s SuperListAttributeOf[T]) IsResource() bool

IsResource returns true if the attribute is a resource attribute.

type SuperListNestedAttribute added in v1.4.0

type SuperListNestedAttribute struct {
	Deprecated *Deprecated
	Common     *schemaR.ListNestedAttribute
	Resource   *schemaR.ListNestedAttribute
	DataSource *schemaD.ListNestedAttribute
	Attributes Attributes
}

func (SuperListNestedAttribute) GetDataSource added in v1.4.0

func (SuperListNestedAttribute) GetResource added in v1.4.0

func (SuperListNestedAttribute) IsDataSource added in v1.4.0

func (s SuperListNestedAttribute) IsDataSource() bool

IsDataSource returns true if the attribute is a data source attribute.

func (SuperListNestedAttribute) IsResource added in v1.4.0

func (s SuperListNestedAttribute) IsResource() bool

IsResource returns true if the attribute is a resource attribute.

type SuperListNestedAttributeOf added in v1.6.0

type SuperListNestedAttributeOf[T any] struct {
	Deprecated *Deprecated
	Common     *schemaR.ListNestedAttribute
	Resource   *schemaR.ListNestedAttribute
	DataSource *schemaD.ListNestedAttribute
	Attributes Attributes
}

func (SuperListNestedAttributeOf[T]) GetDataSource added in v1.6.0

func (SuperListNestedAttributeOf[T]) GetResource added in v1.6.0

func (SuperListNestedAttributeOf[T]) IsDataSource added in v1.6.0

func (s SuperListNestedAttributeOf[T]) IsDataSource() bool

IsDataSource returns true if the attribute is a data source attribute.

func (SuperListNestedAttributeOf[T]) IsResource added in v1.6.0

func (s SuperListNestedAttributeOf[T]) IsResource() bool

IsResource returns true if the attribute is a resource attribute.

type SuperMapAttribute added in v1.4.0

type SuperMapAttribute struct {
	Deprecated *Deprecated
	Common     *schemaR.MapAttribute
	Resource   *schemaR.MapAttribute
	DataSource *schemaD.MapAttribute
}

func (SuperMapAttribute) GetDataSource added in v1.4.0

func (s SuperMapAttribute) GetDataSource(ctx context.Context) schemaD.Attribute

func (SuperMapAttribute) GetResource added in v1.4.0

func (s SuperMapAttribute) GetResource(ctx context.Context) schemaR.Attribute

func (SuperMapAttribute) IsDataSource added in v1.4.0

func (s SuperMapAttribute) IsDataSource() bool

IsDataSource returns true if the attribute is a data source attribute.

func (SuperMapAttribute) IsResource added in v1.4.0

func (s SuperMapAttribute) IsResource() bool

IsResource returns true if the attribute is a resource attribute.

type SuperMapAttributeOf added in v1.7.0

type SuperMapAttributeOf[T any] struct {
	Deprecated *Deprecated
	Common     *schemaR.MapAttribute
	Resource   *schemaR.MapAttribute
	DataSource *schemaD.MapAttribute
}

func (SuperMapAttributeOf[T]) GetDataSource added in v1.7.0

func (s SuperMapAttributeOf[T]) GetDataSource(ctx context.Context) schemaD.Attribute

func (SuperMapAttributeOf[T]) GetResource added in v1.7.0

func (s SuperMapAttributeOf[T]) GetResource(ctx context.Context) schemaR.Attribute

func (SuperMapAttributeOf[T]) IsDataSource added in v1.7.0

func (s SuperMapAttributeOf[T]) IsDataSource() bool

IsDataSource returns true if the attribute is a data source attribute.

func (SuperMapAttributeOf[T]) IsResource added in v1.7.0

func (s SuperMapAttributeOf[T]) IsResource() bool

IsResource returns true if the attribute is a resource attribute.

type SuperMapNestedAttribute added in v1.4.0

type SuperMapNestedAttribute struct {
	Deprecated *Deprecated
	Common     *schemaR.MapNestedAttribute
	Resource   *schemaR.MapNestedAttribute
	DataSource *schemaD.MapNestedAttribute
	Attributes Attributes
}

func (SuperMapNestedAttribute) GetDataSource added in v1.4.0

func (SuperMapNestedAttribute) GetResource added in v1.4.0

func (SuperMapNestedAttribute) IsDataSource added in v1.4.0

func (s SuperMapNestedAttribute) IsDataSource() bool

IsDataSource returns true if the attribute is a data source attribute.

func (SuperMapNestedAttribute) IsResource added in v1.4.0

func (s SuperMapNestedAttribute) IsResource() bool

IsResource returns true if the attribute is a resource attribute.

type SuperMapNestedAttributeOf added in v1.6.0

type SuperMapNestedAttributeOf[T any] struct {
	Deprecated *Deprecated
	Common     *schemaR.MapNestedAttribute
	Resource   *schemaR.MapNestedAttribute
	DataSource *schemaD.MapNestedAttribute
	Attributes Attributes
}

func (SuperMapNestedAttributeOf[T]) GetDataSource added in v1.6.0

func (s SuperMapNestedAttributeOf[T]) GetDataSource(ctx context.Context) schemaD.Attribute

func (SuperMapNestedAttributeOf[T]) GetResource added in v1.6.0

func (SuperMapNestedAttributeOf[T]) IsDataSource added in v1.6.0

func (s SuperMapNestedAttributeOf[T]) IsDataSource() bool

IsDataSource returns true if the attribute is a data source attribute.

func (SuperMapNestedAttributeOf[T]) IsResource added in v1.6.0

func (s SuperMapNestedAttributeOf[T]) IsResource() bool

IsResource returns true if the attribute is a resource attribute.

type SuperNumberAttribute added in v1.4.0

type SuperNumberAttribute struct {
	Deprecated *Deprecated
	Common     *schemaR.NumberAttribute
	Resource   *schemaR.NumberAttribute
	DataSource *schemaD.NumberAttribute
}

func (SuperNumberAttribute) GetDataSource added in v1.4.0

func (s SuperNumberAttribute) GetDataSource(ctx context.Context) schemaD.Attribute

func (SuperNumberAttribute) GetResource added in v1.4.0

func (SuperNumberAttribute) IsDataSource added in v1.4.0

func (s SuperNumberAttribute) IsDataSource() bool

IsDataSource returns true if the attribute is a data source attribute.

func (SuperNumberAttribute) IsResource added in v1.4.0

func (s SuperNumberAttribute) IsResource() bool

IsResource returns true if the attribute is a resource attribute.

type SuperObjectAttribute added in v1.4.0

type SuperObjectAttribute struct {
	Deprecated *Deprecated
	Common     *schemaR.ObjectAttribute
	Resource   *schemaR.ObjectAttribute
	DataSource *schemaD.ObjectAttribute
}

func (SuperObjectAttribute) GetDataSource added in v1.4.0

func (s SuperObjectAttribute) GetDataSource(ctx context.Context) schemaD.Attribute

func (SuperObjectAttribute) GetResource added in v1.4.0

func (SuperObjectAttribute) IsDataSource added in v1.4.0

func (s SuperObjectAttribute) IsDataSource() bool

IsDataSource returns true if the attribute is a data source attribute.

func (SuperObjectAttribute) IsResource added in v1.4.0

func (s SuperObjectAttribute) IsResource() bool

IsResource returns true if the attribute is a resource attribute.

type SuperSetAttribute added in v1.4.0

type SuperSetAttribute struct {
	Deprecated *Deprecated
	Common     *schemaR.SetAttribute
	Resource   *schemaR.SetAttribute
	DataSource *schemaD.SetAttribute
}

func (SuperSetAttribute) GetDataSource added in v1.4.0

func (s SuperSetAttribute) GetDataSource(ctx context.Context) schemaD.Attribute

func (SuperSetAttribute) GetResource added in v1.4.0

func (s SuperSetAttribute) GetResource(ctx context.Context) schemaR.Attribute

func (SuperSetAttribute) IsDataSource added in v1.4.0

func (s SuperSetAttribute) IsDataSource() bool

IsDataSource returns true if the attribute is a data source attribute.

func (SuperSetAttribute) IsResource added in v1.4.0

func (s SuperSetAttribute) IsResource() bool

IsResource returns true if the attribute is a resource attribute.

type SuperSetAttributeOf added in v1.7.0

type SuperSetAttributeOf[T any] struct {
	Deprecated *Deprecated
	Common     *schemaR.SetAttribute
	Resource   *schemaR.SetAttribute
	DataSource *schemaD.SetAttribute
}

func (SuperSetAttributeOf[T]) GetDataSource added in v1.7.0

func (s SuperSetAttributeOf[T]) GetDataSource(ctx context.Context) schemaD.Attribute

func (SuperSetAttributeOf[T]) GetResource added in v1.7.0

func (s SuperSetAttributeOf[T]) GetResource(ctx context.Context) schemaR.Attribute

func (SuperSetAttributeOf[T]) IsDataSource added in v1.7.0

func (s SuperSetAttributeOf[T]) IsDataSource() bool

IsDataSource returns true if the attribute is a data source attribute.

func (SuperSetAttributeOf[T]) IsResource added in v1.7.0

func (s SuperSetAttributeOf[T]) IsResource() bool

IsResource returns true if the attribute is a resource attribute.

type SuperSetNestedAttribute added in v1.4.0

type SuperSetNestedAttribute struct {
	Deprecated *Deprecated
	Common     *schemaR.SetNestedAttribute
	Resource   *schemaR.SetNestedAttribute
	DataSource *schemaD.SetNestedAttribute
	Attributes Attributes
}

func (SuperSetNestedAttribute) GetDataSource added in v1.4.0

func (SuperSetNestedAttribute) GetResource added in v1.4.0

func (SuperSetNestedAttribute) IsDataSource added in v1.4.0

func (s SuperSetNestedAttribute) IsDataSource() bool

IsDataSource returns true if the attribute is a data source attribute.

func (SuperSetNestedAttribute) IsResource added in v1.4.0

func (s SuperSetNestedAttribute) IsResource() bool

IsResource returns true if the attribute is a resource attribute.

type SuperSetNestedAttributeOf added in v1.6.0

type SuperSetNestedAttributeOf[T any] struct {
	Deprecated *Deprecated
	Common     *schemaR.SetNestedAttribute
	Resource   *schemaR.SetNestedAttribute
	DataSource *schemaD.SetNestedAttribute
	Attributes Attributes
}

func (SuperSetNestedAttributeOf[T]) GetDataSource added in v1.6.0

func (s SuperSetNestedAttributeOf[T]) GetDataSource(ctx context.Context) schemaD.Attribute

func (SuperSetNestedAttributeOf[T]) GetResource added in v1.6.0

func (SuperSetNestedAttributeOf[T]) IsDataSource added in v1.6.0

func (s SuperSetNestedAttributeOf[T]) IsDataSource() bool

IsDataSource returns true if the attribute is a data source attribute.

func (SuperSetNestedAttributeOf[T]) IsResource added in v1.6.0

func (s SuperSetNestedAttributeOf[T]) IsResource() bool

IsResource returns true if the attribute is a resource attribute.

type SuperSingleNestedAttribute added in v1.4.0

type SuperSingleNestedAttribute struct {
	Deprecated *Deprecated
	Common     *schemaR.SingleNestedAttribute
	Resource   *schemaR.SingleNestedAttribute
	DataSource *schemaD.SingleNestedAttribute
	Attributes Attributes
}

func (SuperSingleNestedAttribute) GetDataSource added in v1.4.0

func (SuperSingleNestedAttribute) GetResource added in v1.4.0

func (SuperSingleNestedAttribute) IsDataSource added in v1.4.0

func (s SuperSingleNestedAttribute) IsDataSource() bool

IsDataSource returns true if the attribute is a data source attribute.

func (SuperSingleNestedAttribute) IsResource added in v1.4.0

func (s SuperSingleNestedAttribute) IsResource() bool

IsResource returns true if the attribute is a resource attribute.

type SuperSingleNestedAttributeOf added in v1.6.0

type SuperSingleNestedAttributeOf[T any] struct {
	Deprecated *Deprecated
	Common     *schemaR.SingleNestedAttribute
	Resource   *schemaR.SingleNestedAttribute
	DataSource *schemaD.SingleNestedAttribute
	Attributes Attributes
}

func (SuperSingleNestedAttributeOf[T]) GetDataSource added in v1.6.0

func (SuperSingleNestedAttributeOf[T]) GetResource added in v1.6.0

func (SuperSingleNestedAttributeOf[T]) IsDataSource added in v1.6.0

func (s SuperSingleNestedAttributeOf[T]) IsDataSource() bool

IsDataSource returns true if the attribute is a data source attribute.

func (SuperSingleNestedAttributeOf[T]) IsResource added in v1.6.0

func (s SuperSingleNestedAttributeOf[T]) IsResource() bool

IsResource returns true if the attribute is a resource attribute.

type SuperStringAttribute added in v1.4.0

type SuperStringAttribute struct {
	Deprecated *Deprecated
	Common     *schemaR.StringAttribute
	Resource   *schemaR.StringAttribute
	DataSource *schemaD.StringAttribute
}

func (SuperStringAttribute) GetDataSource added in v1.4.0

func (s SuperStringAttribute) GetDataSource(ctx context.Context) schemaD.Attribute

func (SuperStringAttribute) GetResource added in v1.4.0

func (SuperStringAttribute) IsDataSource added in v1.4.0

func (s SuperStringAttribute) IsDataSource() bool

IsDataSource returns true if the attribute is a data source attribute.

func (SuperStringAttribute) IsResource added in v1.4.0

func (s SuperStringAttribute) IsResource() bool

IsResource returns true if the attribute is a resource attribute.

type TimeoutAttribute

type TimeoutAttribute struct {
	Resource   *ResourceTimeoutAttribute
	DataSource *DatasourceTimeoutAttribute
}

func (TimeoutAttribute) GetDataSource

func (s TimeoutAttribute) GetDataSource(ctx context.Context) schemaD.Attribute

func (TimeoutAttribute) GetResource

func (s TimeoutAttribute) GetResource(ctx context.Context) schemaR.Attribute

func (TimeoutAttribute) IsDataSource

func (s TimeoutAttribute) IsDataSource() bool

IsDataSource returns true if the attribute is a data source attribute.

func (TimeoutAttribute) IsResource

func (s TimeoutAttribute) IsResource() bool

IsResource returns true if the attribute is a resource attribute.

Jump to

Keyboard shortcuts

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