superschema

package module
v1.9.1 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2025 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

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

func (d *Deprecated) GetDeprecationMessage() string

GetDeprecationMessage returns the deprecation message for the attribute.

func (*Deprecated) GetMarkdownDeprecationMessage

func (d *Deprecated) GetMarkdownDeprecationMessage() string

GetMarkdownDeprecationMessage returns the markdown deprecation message for the attribute.

type DeprecatedResource

type DeprecatedResource struct {
	// DeprecationMessage is the message to display in the CLI when the user
	// attempts to use the deprecated resource.
	// 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 required 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 resource or datasource has been renamed.
	// Removed is a flag to indicate whether the resource or datasource has been removed.
	// One of these fields must be true.
	Renamed, Removed bool

	// TargetResourceName is the name of the resource that replaces the deprecated resource or data source.
	// These fields are required if the resource or data source has been renamed and computeMarkdownDeprecationMessage is true.
	TargetResourceName string

	// TargetRelease is the release version in which the resource or datasource 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
	// LinkToMigrationGuide is the link to the actual resource documentation.
	// This field is optional.
	LinkToMigrationGuide string
	// LinkToNewResourceDoc is the link to the terraform documentation for the resource that replaces the deprecated attribute.
	// This field is optional.
	LinkToNewResourceDoc 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
}

DeprecatedResource is a struct to describe a deprecated resource or data source.

func (*DeprecatedResource) GetDeprecationMessage

func (d *DeprecatedResource) GetDeprecationMessage() string

GetDeprecationMessage returns the deprecation message for the attribute.

func (*DeprecatedResource) GetMarkdownDeprecationMessage

func (d *DeprecatedResource) GetMarkdownDeprecationMessage(isResource bool) 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

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

func (MapAttribute) GetDataSource

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

func (MapAttribute) GetResource

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

func (MapAttribute) IsDataSource

func (s MapAttribute) IsDataSource() bool

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

func (MapAttribute) IsResource

func (s MapAttribute) IsResource() bool

IsResource returns true if the attribute is a resource attribute.

type MapNestedAttribute

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

func (MapNestedAttribute) GetDataSource

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

func (MapNestedAttribute) GetResource

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

func (MapNestedAttribute) IsDataSource

func (s MapNestedAttribute) IsDataSource() bool

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

func (MapNestedAttribute) IsResource

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 {
	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
	Deprecated          DeprecatedResource

	// Deprecated: Use Deprecated instead.
	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

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

func (SuperBoolAttribute) GetDataSource

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

func (SuperBoolAttribute) GetResource

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

func (SuperBoolAttribute) IsDataSource

func (s SuperBoolAttribute) IsDataSource() bool

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

func (SuperBoolAttribute) IsResource

func (s SuperBoolAttribute) IsResource() bool

IsResource returns true if the attribute is a resource attribute.

type SuperFloat64Attribute

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

func (SuperFloat64Attribute) GetDataSource

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

func (SuperFloat64Attribute) GetResource

func (SuperFloat64Attribute) IsDataSource

func (s SuperFloat64Attribute) IsDataSource() bool

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

func (SuperFloat64Attribute) IsResource

func (s SuperFloat64Attribute) IsResource() bool

IsResource returns true if the attribute is a resource attribute.

type SuperInt64Attribute

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

func (SuperInt64Attribute) GetDataSource

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

func (SuperInt64Attribute) GetResource

func (SuperInt64Attribute) IsDataSource

func (s SuperInt64Attribute) IsDataSource() bool

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

func (SuperInt64Attribute) IsResource

func (s SuperInt64Attribute) IsResource() bool

IsResource returns true if the attribute is a resource attribute.

type SuperListAttribute

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

func (SuperListAttribute) GetDataSource

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

func (SuperListAttribute) GetResource

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

func (SuperListAttribute) IsDataSource

func (s SuperListAttribute) IsDataSource() bool

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

func (SuperListAttribute) IsResource

func (s SuperListAttribute) IsResource() bool

IsResource returns true if the attribute is a resource attribute.

type SuperListAttributeOf

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

func (SuperListAttributeOf[T]) GetDataSource

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

func (SuperListAttributeOf[T]) GetResource

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

func (SuperListAttributeOf[T]) IsDataSource

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

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

func (SuperListAttributeOf[T]) IsResource

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

IsResource returns true if the attribute is a resource attribute.

type SuperListNestedAttribute

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

func (SuperListNestedAttribute) GetDataSource

func (SuperListNestedAttribute) GetResource

func (SuperListNestedAttribute) IsDataSource

func (s SuperListNestedAttribute) IsDataSource() bool

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

func (SuperListNestedAttribute) IsResource

func (s SuperListNestedAttribute) IsResource() bool

IsResource returns true if the attribute is a resource attribute.

type SuperListNestedAttributeOf

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

func (SuperListNestedAttributeOf[T]) GetDataSource

func (SuperListNestedAttributeOf[T]) GetResource

func (SuperListNestedAttributeOf[T]) IsDataSource

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

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

func (SuperListNestedAttributeOf[T]) IsResource

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

IsResource returns true if the attribute is a resource attribute.

type SuperMapAttribute

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

func (SuperMapAttribute) GetDataSource

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

func (SuperMapAttribute) GetResource

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

func (SuperMapAttribute) IsDataSource

func (s SuperMapAttribute) IsDataSource() bool

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

func (SuperMapAttribute) IsResource

func (s SuperMapAttribute) IsResource() bool

IsResource returns true if the attribute is a resource attribute.

type SuperMapAttributeOf

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

func (SuperMapAttributeOf[T]) GetDataSource

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

func (SuperMapAttributeOf[T]) GetResource

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

func (SuperMapAttributeOf[T]) IsDataSource

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

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

func (SuperMapAttributeOf[T]) IsResource

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

IsResource returns true if the attribute is a resource attribute.

type SuperMapNestedAttribute

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

func (SuperMapNestedAttribute) GetDataSource

func (SuperMapNestedAttribute) GetResource

func (SuperMapNestedAttribute) IsDataSource

func (s SuperMapNestedAttribute) IsDataSource() bool

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

func (SuperMapNestedAttribute) IsResource

func (s SuperMapNestedAttribute) IsResource() bool

IsResource returns true if the attribute is a resource attribute.

type SuperMapNestedAttributeOf

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

func (SuperMapNestedAttributeOf[T]) GetDataSource

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

func (SuperMapNestedAttributeOf[T]) GetResource

func (SuperMapNestedAttributeOf[T]) IsDataSource

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

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

func (SuperMapNestedAttributeOf[T]) IsResource

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

IsResource returns true if the attribute is a resource attribute.

type SuperNumberAttribute

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

func (SuperNumberAttribute) GetDataSource

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

func (SuperNumberAttribute) GetResource

func (SuperNumberAttribute) IsDataSource

func (s SuperNumberAttribute) IsDataSource() bool

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

func (SuperNumberAttribute) IsResource

func (s SuperNumberAttribute) IsResource() bool

IsResource returns true if the attribute is a resource attribute.

type SuperObjectAttribute

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

func (SuperObjectAttribute) GetDataSource

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

func (SuperObjectAttribute) GetResource

func (SuperObjectAttribute) IsDataSource

func (s SuperObjectAttribute) IsDataSource() bool

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

func (SuperObjectAttribute) IsResource

func (s SuperObjectAttribute) IsResource() bool

IsResource returns true if the attribute is a resource attribute.

type SuperSetAttribute

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

func (SuperSetAttribute) GetDataSource

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

func (SuperSetAttribute) GetResource

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

func (SuperSetAttribute) IsDataSource

func (s SuperSetAttribute) IsDataSource() bool

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

func (SuperSetAttribute) IsResource

func (s SuperSetAttribute) IsResource() bool

IsResource returns true if the attribute is a resource attribute.

type SuperSetAttributeOf

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

func (SuperSetAttributeOf[T]) GetDataSource

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

func (SuperSetAttributeOf[T]) GetResource

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

func (SuperSetAttributeOf[T]) IsDataSource

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

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

func (SuperSetAttributeOf[T]) IsResource

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

IsResource returns true if the attribute is a resource attribute.

type SuperSetNestedAttribute

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

func (SuperSetNestedAttribute) GetDataSource

func (SuperSetNestedAttribute) GetResource

func (SuperSetNestedAttribute) IsDataSource

func (s SuperSetNestedAttribute) IsDataSource() bool

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

func (SuperSetNestedAttribute) IsResource

func (s SuperSetNestedAttribute) IsResource() bool

IsResource returns true if the attribute is a resource attribute.

type SuperSetNestedAttributeOf

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

func (SuperSetNestedAttributeOf[T]) GetDataSource

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

func (SuperSetNestedAttributeOf[T]) GetResource

func (SuperSetNestedAttributeOf[T]) IsDataSource

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

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

func (SuperSetNestedAttributeOf[T]) IsResource

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

IsResource returns true if the attribute is a resource attribute.

type SuperSingleNestedAttribute

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

func (SuperSingleNestedAttribute) GetDataSource

func (SuperSingleNestedAttribute) GetResource

func (SuperSingleNestedAttribute) IsDataSource

func (s SuperSingleNestedAttribute) IsDataSource() bool

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

func (SuperSingleNestedAttribute) IsResource

func (s SuperSingleNestedAttribute) IsResource() bool

IsResource returns true if the attribute is a resource attribute.

type SuperSingleNestedAttributeOf

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

func (SuperSingleNestedAttributeOf[T]) GetDataSource

func (SuperSingleNestedAttributeOf[T]) GetResource

func (SuperSingleNestedAttributeOf[T]) IsDataSource

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

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

func (SuperSingleNestedAttributeOf[T]) IsResource

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

IsResource returns true if the attribute is a resource attribute.

type SuperStringAttribute

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

func (SuperStringAttribute) GetDataSource

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

func (SuperStringAttribute) GetResource

func (SuperStringAttribute) IsDataSource

func (s SuperStringAttribute) IsDataSource() bool

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

func (SuperStringAttribute) IsResource

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