provider

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2025 License: MPL-2.0 Imports: 53 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DiagToError added in v0.17.0

func DiagToError(diags diag.Diagnostics) error

func FilterAttrsInJSON added in v0.9.0

func FilterAttrsInJSON(doc string, attrs []string) (string, error)

Given a JSON object, only keep the attributes specified and remove the others.

func GetExpiryTime added in v0.17.0

func GetExpiryTime(typ string, loc string, ahead string, resp resty.Response) (time.Time, error)

func ModifyBody

func ModifyBody(base, body string, compensateBaseAttrs []string) (string, error)

ModifyBody modifies the body based on the base body, only keeps attributes that exist on both sides. If compensateBaseAttrs is set, then any attribute path element only found in the base body will be added up to the result body.

func ModifyBodyForImport

func ModifyBodyForImport(base, body string) (string, error)

ModifyBodyForImport is similar as ModifyBody, but is based on the body from import spec, rather than from state.

func New

func New() provider.Provider

Types

type DataSource added in v0.5.0

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

func (*DataSource) Configure added in v0.5.0

func (*DataSource) Metadata added in v0.5.0

func (*DataSource) Read added in v0.5.0

func (*DataSource) Schema added in v0.7.0

type EphemeralBodyPrivateMgr added in v0.19.0

type EphemeralBodyPrivateMgr struct{}

func (EphemeralBodyPrivateMgr) Diff added in v0.19.0

Diff tells whether the ephemeral_body is different than the hash stored in the private state. In case private state doesn't have the record, regard the record as "nil" (i.e. will return true if ebody is non-nil). In case private state has the record (guaranteed to be non-nil), while ebody is nil, it also returns true.

func (EphemeralBodyPrivateMgr) Exists added in v0.19.0

func (EphemeralBodyPrivateMgr) GetNullBody added in v0.19.0

GetNullBody gets the nullified ephemeral_body from the private data. If it doesn't exist, nil is returned.

func (EphemeralBodyPrivateMgr) Set added in v0.19.0

func (m EphemeralBodyPrivateMgr) Set(ctx context.Context, d PrivateData, ebody []byte) (diags diag.Diagnostics)

Set sets the hash of the ephemeral_body to the private state. If `ebody` is nil, it removes the hash from the private state.

type EphemeralResource added in v0.17.0

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

func (*EphemeralResource) Close added in v0.17.0

func (*EphemeralResource) Configure added in v0.17.0

func (*EphemeralResource) Metadata added in v0.17.0

func (*EphemeralResource) Open added in v0.17.0

func (*EphemeralResource) Renew added in v0.17.0

func (*EphemeralResource) Schema added in v0.17.0

type ExpiryType added in v0.17.0

type ExpiryType int
const (
	ExpiryTypeTime ExpiryType = iota
	ExpiryTypeDuration
)

type ObjectOrArray added in v0.12.0

type ObjectOrArray interface {
}

type OperationResource added in v0.4.0

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

func (*OperationResource) Configure added in v0.5.0

func (*OperationResource) Create added in v0.4.0

func (*OperationResource) Delete added in v0.4.0

func (*OperationResource) Metadata added in v0.5.0

func (*OperationResource) ModifyPlan added in v0.19.0

func (*OperationResource) Read added in v0.4.0

func (*OperationResource) Schema added in v0.7.0

func (*OperationResource) Update added in v0.4.0

func (*OperationResource) UpgradeState added in v0.14.0

func (*OperationResource) ValidateConfig added in v0.4.0

type PrivateData added in v0.19.0

type PrivateData interface {
	GetKey(ctx context.Context, key string) ([]byte, diag.Diagnostics)
	SetKey(ctx context.Context, key string, value []byte) diag.Diagnostics
}

type Provider added in v0.4.0

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

func (*Provider) Configure added in v0.4.0

func (*Provider) DataSources added in v0.5.0

func (*Provider) DataSources(context.Context) []func() datasource.DataSource

func (*Provider) EphemeralResources added in v0.17.0

func (*Provider) EphemeralResources(context.Context) []func() ephemeral.EphemeralResource

func (*Provider) Init added in v0.9.0

func (p *Provider) Init(ctx context.Context, config providerConfig) diag.Diagnostics

func (*Provider) Metadata added in v0.5.0

func (*Provider) Resources added in v0.5.0

func (*Provider) Resources(context.Context) []func() resource.Resource

func (*Provider) Schema added in v0.7.0

type Resource added in v0.4.0

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

func (*Resource) Configure added in v0.5.0

func (Resource) Create added in v0.4.0

func (Resource) Delete added in v0.4.0

func (Resource) ImportState added in v0.4.0

func (*Resource) Metadata added in v0.5.0

func (*Resource) ModifyPlan added in v0.8.0

func (Resource) Read added in v0.4.0

func (*Resource) Schema added in v0.7.0

func (Resource) Update added in v0.4.0

func (*Resource) UpgradeState added in v0.14.0

func (r *Resource) UpgradeState(context.Context) map[int64]resource.StateUpgrader

func (*Resource) ValidateConfig added in v0.4.0

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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