Documentation
¶
Index ¶
- func DiagToError(diags diag.Diagnostics) error
- func FilterAttrsInJSON(doc string, attrs []string) (string, error)
- func GetExpiryTime(typ string, loc string, ahead string, resp resty.Response) (time.Time, error)
- func ModifyBody(base, body string, compensateBaseAttrs []string) (string, error)
- func ModifyBodyForImport(base, body string) (string, error)
- func New() provider.Provider
- type DataSource
- func (d *DataSource) Configure(ctx context.Context, req datasource.ConfigureRequest, ...)
- func (d *DataSource) Metadata(ctx context.Context, req datasource.MetadataRequest, ...)
- func (d *DataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse)
- func (d *DataSource) Schema(ctx context.Context, req datasource.SchemaRequest, ...)
- type EphemeralBodyPrivateMgr
- func (m EphemeralBodyPrivateMgr) Diff(ctx context.Context, d PrivateData, ebody []byte) (bool, diag.Diagnostics)
- func (m EphemeralBodyPrivateMgr) Exists(ctx context.Context, d PrivateData) (bool, diag.Diagnostics)
- func (m EphemeralBodyPrivateMgr) GetNullBody(ctx context.Context, d PrivateData) ([]byte, diag.Diagnostics)
- func (m EphemeralBodyPrivateMgr) Set(ctx context.Context, d PrivateData, ebody []byte) (diags diag.Diagnostics)
- type EphemeralResource
- func (e *EphemeralResource) Close(ctx context.Context, req ephemeral.CloseRequest, resp *ephemeral.CloseResponse)
- func (r *EphemeralResource) Configure(ctx context.Context, req ephemeral.ConfigureRequest, ...)
- func (e *EphemeralResource) Metadata(ctx context.Context, req ephemeral.MetadataRequest, ...)
- func (e *EphemeralResource) Open(ctx context.Context, req ephemeral.OpenRequest, resp *ephemeral.OpenResponse)
- func (e *EphemeralResource) Renew(ctx context.Context, req ephemeral.RenewRequest, resp *ephemeral.RenewResponse)
- func (e *EphemeralResource) Schema(ctx context.Context, req ephemeral.SchemaRequest, ...)
- type ExpiryType
- type ObjectOrArray
- type OperationResource
- func (r *OperationResource) Configure(ctx context.Context, req resource.ConfigureRequest, ...)
- func (r *OperationResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
- func (r *OperationResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
- func (r *OperationResource) Metadata(ctx context.Context, req resource.MetadataRequest, ...)
- func (r *OperationResource) ModifyPlan(ctx context.Context, req resource.ModifyPlanRequest, ...)
- func (r *OperationResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
- func (r *OperationResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse)
- func (r *OperationResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
- func (r *OperationResource) UpgradeState(context.Context) map[int64]resource.StateUpgrader
- func (r *OperationResource) ValidateConfig(ctx context.Context, req resource.ValidateConfigRequest, ...)
- type PrivateData
- type Provider
- func (p *Provider) Configure(ctx context.Context, req provider.ConfigureRequest, ...)
- func (*Provider) DataSources(context.Context) []func() datasource.DataSource
- func (*Provider) EphemeralResources(context.Context) []func() ephemeral.EphemeralResource
- func (p *Provider) Init(ctx context.Context, config providerConfig) diag.Diagnostics
- func (*Provider) Metadata(ctx context.Context, req provider.MetadataRequest, ...)
- func (*Provider) Resources(context.Context) []func() resource.Resource
- func (*Provider) Schema(ctx context.Context, req provider.SchemaRequest, resp *provider.SchemaResponse)
- type Resource
- func (r *Resource) Configure(ctx context.Context, req resource.ConfigureRequest, ...)
- func (r Resource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
- func (r Resource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
- func (Resource) ImportState(ctx context.Context, req resource.ImportStateRequest, ...)
- func (r *Resource) Metadata(ctx context.Context, req resource.MetadataRequest, ...)
- func (r *Resource) ModifyPlan(ctx context.Context, req resource.ModifyPlanRequest, ...)
- func (r Resource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
- func (r *Resource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse)
- func (r Resource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
- func (r *Resource) UpgradeState(context.Context) map[int64]resource.StateUpgrader
- func (r *Resource) ValidateConfig(ctx context.Context, req resource.ValidateConfigRequest, ...)
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
Given a JSON object, only keep the attributes specified and remove the others.
func GetExpiryTime ¶ added in v0.17.0
func ModifyBody ¶
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 ¶
ModifyBodyForImport is similar as ModifyBody, but is based on the body from import spec, rather than from state.
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 (d *DataSource) Configure(ctx context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse)
func (*DataSource) Metadata ¶ added in v0.5.0
func (d *DataSource) Metadata(ctx context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse)
func (*DataSource) Read ¶ added in v0.5.0
func (d *DataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse)
func (*DataSource) Schema ¶ added in v0.7.0
func (d *DataSource) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse)
type EphemeralBodyPrivateMgr ¶ added in v0.19.0
type EphemeralBodyPrivateMgr struct{}
func (EphemeralBodyPrivateMgr) Diff ¶ added in v0.19.0
func (m EphemeralBodyPrivateMgr) Diff(ctx context.Context, d PrivateData, ebody []byte) (bool, diag.Diagnostics)
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 (m EphemeralBodyPrivateMgr) Exists(ctx context.Context, d PrivateData) (bool, diag.Diagnostics)
func (EphemeralBodyPrivateMgr) GetNullBody ¶ added in v0.19.0
func (m EphemeralBodyPrivateMgr) GetNullBody(ctx context.Context, d PrivateData) ([]byte, diag.Diagnostics)
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 (e *EphemeralResource) Close(ctx context.Context, req ephemeral.CloseRequest, resp *ephemeral.CloseResponse)
func (*EphemeralResource) Configure ¶ added in v0.17.0
func (r *EphemeralResource) Configure(ctx context.Context, req ephemeral.ConfigureRequest, resp *ephemeral.ConfigureResponse)
func (*EphemeralResource) Metadata ¶ added in v0.17.0
func (e *EphemeralResource) Metadata(ctx context.Context, req ephemeral.MetadataRequest, resp *ephemeral.MetadataResponse)
func (*EphemeralResource) Open ¶ added in v0.17.0
func (e *EphemeralResource) Open(ctx context.Context, req ephemeral.OpenRequest, resp *ephemeral.OpenResponse)
func (*EphemeralResource) Renew ¶ added in v0.17.0
func (e *EphemeralResource) Renew(ctx context.Context, req ephemeral.RenewRequest, resp *ephemeral.RenewResponse)
func (*EphemeralResource) Schema ¶ added in v0.17.0
func (e *EphemeralResource) Schema(ctx context.Context, req ephemeral.SchemaRequest, resp *ephemeral.SchemaResponse)
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 (r *OperationResource) Configure(ctx context.Context, req resource.ConfigureRequest, resp *resource.ConfigureResponse)
func (*OperationResource) Create ¶ added in v0.4.0
func (r *OperationResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
func (*OperationResource) Delete ¶ added in v0.4.0
func (r *OperationResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
func (*OperationResource) Metadata ¶ added in v0.5.0
func (r *OperationResource) Metadata(ctx context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse)
func (*OperationResource) ModifyPlan ¶ added in v0.19.0
func (r *OperationResource) ModifyPlan(ctx context.Context, req resource.ModifyPlanRequest, resp *resource.ModifyPlanResponse)
func (*OperationResource) Read ¶ added in v0.4.0
func (r *OperationResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
func (*OperationResource) Schema ¶ added in v0.7.0
func (r *OperationResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse)
func (*OperationResource) Update ¶ added in v0.4.0
func (r *OperationResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
func (*OperationResource) UpgradeState ¶ added in v0.14.0
func (r *OperationResource) UpgradeState(context.Context) map[int64]resource.StateUpgrader
func (*OperationResource) ValidateConfig ¶ added in v0.4.0
func (r *OperationResource) ValidateConfig(ctx context.Context, req resource.ValidateConfigRequest, resp *resource.ValidateConfigResponse)
type PrivateData ¶ added in v0.19.0
type Provider ¶ added in v0.4.0
type Provider struct {
// contains filtered or unexported fields
}
func (*Provider) Configure ¶ added in v0.4.0
func (p *Provider) Configure(ctx context.Context, req provider.ConfigureRequest, resp *provider.ConfigureResponse)
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) Metadata(ctx context.Context, req provider.MetadataRequest, resp *provider.MetadataResponse)
func (*Provider) Schema ¶ added in v0.7.0
func (*Provider) Schema(ctx context.Context, req provider.SchemaRequest, resp *provider.SchemaResponse)
type Resource ¶ added in v0.4.0
type Resource struct {
// contains filtered or unexported fields
}
func (*Resource) Configure ¶ added in v0.5.0
func (r *Resource) Configure(ctx context.Context, req resource.ConfigureRequest, resp *resource.ConfigureResponse)
func (Resource) Create ¶ added in v0.4.0
func (r Resource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
func (Resource) Delete ¶ added in v0.4.0
func (r Resource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
func (Resource) ImportState ¶ added in v0.4.0
func (Resource) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse)
func (*Resource) Metadata ¶ added in v0.5.0
func (r *Resource) Metadata(ctx context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse)
func (*Resource) ModifyPlan ¶ added in v0.8.0
func (r *Resource) ModifyPlan(ctx context.Context, req resource.ModifyPlanRequest, resp *resource.ModifyPlanResponse)
func (Resource) Read ¶ added in v0.4.0
func (r Resource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
func (*Resource) Schema ¶ added in v0.7.0
func (r *Resource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse)
func (Resource) Update ¶ added in v0.4.0
func (r Resource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
func (*Resource) UpgradeState ¶ added in v0.14.0
func (*Resource) ValidateConfig ¶ added in v0.4.0
func (r *Resource) ValidateConfig(ctx context.Context, req resource.ValidateConfigRequest, resp *resource.ValidateConfigResponse)
Source Files
¶
- api_option.go
- body.go
- data_source.go
- ephemeral_body_helpers.go
- ephemeral_body_private.go
- ephemeral_resource.go
- ephemeral_resource_expiry.go
- ephemeral_resource_private_data.go
- operation_resource.go
- operation_resource_upgrader.go
- output.go
- precheck.go
- provider.go
- resource.go
- resource_upgrader.go
- utils.go
- value_locator.go