framework

package
v1.36.1 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IDAttribute

func IDAttribute(description string) schema.StringAttribute

func IDAttributeDefaultDescription

func IDAttributeDefaultDescription() schema.StringAttribute

Types

type BaseDataSource

type BaseDataSource struct {
	Config BaseDataSourceConfig
	Meta   *config.Config
}

BaseDataSource contains various re-usable fields and methods intended for use in data source implementations by composition.

func NewBaseDataSource

func NewBaseDataSource(cfg BaseDataSourceConfig) BaseDataSource

NewBaseDataSource returns a new instance of the BaseDataSource struct for cleaner initialization.

func (*BaseDataSource) Configure

func (*BaseDataSource) Metadata

func (*BaseDataSource) Schema

type BaseDataSourceConfig

type BaseDataSourceConfig struct {
	Name string

	// Optional
	Schema *schema.Schema
}

BaseDataSourceConfig contains all configurable base resource fields.

type BaseResource

type BaseResource struct {
	Config BaseResourceConfig
	Meta   *config.Config
}

BaseResource contains various re-usable fields and methods intended for use in resource implementations by composition.

func NewBaseResource

func NewBaseResource(cfg BaseResourceConfig) BaseResource

NewBaseResource returns a new instance of the BaseResource struct for cleaner initialization.

func (*BaseResource) Configure

func (*BaseResource) ImportState

ImportState should be overridden for resources with complex read logic (e.g. parent ID).

func (*BaseResource) Metadata

func (*BaseResource) Schema

type BaseResourceConfig

type BaseResourceConfig struct {
	Name   string
	IDAttr string

	// Optional
	Schema *schema.Schema
}

BaseResourceConfig contains all configurable base resource fields.

type WithTimeouts added in v1.29.0

type WithTimeouts struct {
	// contains filtered or unexported fields
}

WithTimeouts is intended to be embedded in resources which use the special "timeouts" nested block. See https://developer.hashicorp.com/terraform/language/resources/syntax#operation-timeouts.

func (*WithTimeouts) CreateTimeout added in v1.29.0

func (w *WithTimeouts) CreateTimeout(ctx context.Context, timeouts timeouts.Value) time.Duration

CreateTimeout returns any configured Create timeout value or the default value.

func (*WithTimeouts) DeleteTimeout added in v1.29.0

func (w *WithTimeouts) DeleteTimeout(ctx context.Context, timeouts timeouts.Value) time.Duration

DeleteTimeout returns any configured Delete timeout value or the default value.

func (*WithTimeouts) ReadTimeout added in v1.29.0

func (w *WithTimeouts) ReadTimeout(ctx context.Context, timeouts timeouts.Value) time.Duration

ReadTimeout returns any configured Read timeout value or the default value.

func (*WithTimeouts) SetDefaultCreateTimeout added in v1.29.0

func (w *WithTimeouts) SetDefaultCreateTimeout(timeout time.Duration)

SetDefaultCreateTimeout sets the resource's default Create timeout value.

func (*WithTimeouts) SetDefaultDeleteTimeout added in v1.29.0

func (w *WithTimeouts) SetDefaultDeleteTimeout(timeout time.Duration)

SetDefaultDeleteTimeout sets the resource's default Delete timeout value.

func (*WithTimeouts) SetDefaultReadTimeout added in v1.29.0

func (w *WithTimeouts) SetDefaultReadTimeout(timeout time.Duration)

SetDefaultReadTimeout sets the resource's default Read timeout value.

func (*WithTimeouts) SetDefaultUpdateTimeout added in v1.29.0

func (w *WithTimeouts) SetDefaultUpdateTimeout(timeout time.Duration)

SetDefaultUpdateTimeout sets the resource's default Update timeout value.

func (*WithTimeouts) UpdateTimeout added in v1.29.0

func (w *WithTimeouts) UpdateTimeout(ctx context.Context, timeouts timeouts.Value) time.Duration

UpdateTimeout returns any configured Update timeout value or the default value.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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