Documentation
¶
Index ¶
- Constants
- func GetAPIResource() testsupport.GetAPIResourceFunc[hcloud.Zone]
- func NewDataSource() datasource.DataSource
- func NewDataSourceList() datasource.DataSource
- func NewIDNAFunction() function.Function
- func NewResource() resource.Resource
- type DData
- type DDataList
- type DataSource
- func (d *DataSource) ConfigValidators(_ context.Context) []datasource.ConfigValidator
- func (d *DataSource) Configure(_ context.Context, req datasource.ConfigureRequest, ...)
- func (d *DataSource) Metadata(_ context.Context, _ datasource.MetadataRequest, ...)
- func (d *DataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse)
- func (d *DataSource) Schema(_ context.Context, _ datasource.SchemaRequest, resp *datasource.SchemaResponse)
- type DataSourceList
- func (d *DataSourceList) Configure(_ context.Context, req datasource.ConfigureRequest, ...)
- func (d *DataSourceList) Metadata(_ context.Context, _ datasource.MetadataRequest, ...)
- func (d *DataSourceList) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse)
- func (d *DataSourceList) Schema(_ context.Context, _ datasource.SchemaRequest, resp *datasource.SchemaResponse)
- type IDNAFunction
- func (f *IDNAFunction) Definition(_ context.Context, _ function.DefinitionRequest, ...)
- func (f *IDNAFunction) Metadata(_ context.Context, _ function.MetadataRequest, resp *function.MetadataResponse)
- func (f *IDNAFunction) Run(ctx context.Context, req function.RunRequest, resp *function.RunResponse)
- type RData
- type Resource
- func (r *Resource) Configure(_ 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 (r *Resource) ImportState(ctx context.Context, req resource.ImportStateRequest, ...)
- func (r *Resource) Metadata(_ context.Context, _ resource.MetadataRequest, resp *resource.MetadataResponse)
- func (r *Resource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
- func (r *Resource) Schema(_ context.Context, _ resource.SchemaRequest, resp *resource.SchemaResponse)
- func (r *Resource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
- func (r *Resource) ValidateConfig(ctx context.Context, req resource.ValidateConfigRequest, ...)
Constants ¶
const DataSourceListType = "hcloud_zones"
DataSourceListType is the type name of the Hetzner Cloud Zones data source.
const DataSourceType = "hcloud_zone"
DataSourceType is the type name of the Hetzner Cloud Zone data source.
const ResourceType = "hcloud_zone"
ResourceType is the type name of the Hetzner Cloud Zone resource.
Variables ¶
This section is empty.
Functions ¶
func GetAPIResource ¶
func GetAPIResource() testsupport.GetAPIResourceFunc[hcloud.Zone]
GetAPIResource returns a testsupport.GetAPIResourceFunc for hcloud.Zone.
func NewDataSource ¶
func NewDataSource() datasource.DataSource
func NewDataSourceList ¶
func NewDataSourceList() datasource.DataSource
func NewIDNAFunction ¶
func NewResource ¶
Types ¶
type DData ¶
type DData struct {
testtemplate.DataCommon
ID string
Name string
Type string
LabelSelector string
}
DData defines the fields for the "testdata/d/hcloud_zone" template.
type DDataList ¶
type DDataList struct {
testtemplate.DataCommon
LabelSelector string
}
DDataList defines the fields for the "testdata/d/hcloud_zones" template.
type DataSource ¶
type DataSource struct {
// contains filtered or unexported fields
}
func (*DataSource) ConfigValidators ¶
func (d *DataSource) ConfigValidators(_ context.Context) []datasource.ConfigValidator
ConfigValidators returns a list of ConfigValidators. Each ConfigValidator's Validate method will be called when validating the data source.
func (*DataSource) Configure ¶
func (d *DataSource) Configure(_ context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse)
Configure enables provider-level data or clients to be set in the provider-defined DataSource type. It is separately executed for each ReadDataSource RPC.
func (*DataSource) Metadata ¶
func (d *DataSource) Metadata(_ context.Context, _ datasource.MetadataRequest, resp *datasource.MetadataResponse)
Metadata should return the full name of the data source.
func (*DataSource) Read ¶
func (d *DataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse)
Read is called when the provider must read data source values in order to update state. Config values should be read from the ReadRequest and new state values set on the ReadResponse.
func (*DataSource) Schema ¶
func (d *DataSource) Schema(_ context.Context, _ datasource.SchemaRequest, resp *datasource.SchemaResponse)
Schema should return the schema for this data source.
type DataSourceList ¶
type DataSourceList struct {
// contains filtered or unexported fields
}
func (*DataSourceList) Configure ¶
func (d *DataSourceList) Configure(_ context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse)
Configure enables provider-level data or clients to be set in the provider-defined DataSource type. It is separately executed for each ReadDataSource RPC.
func (*DataSourceList) Metadata ¶
func (d *DataSourceList) Metadata(_ context.Context, _ datasource.MetadataRequest, resp *datasource.MetadataResponse)
Metadata should return the full name of the data source.
func (*DataSourceList) Read ¶
func (d *DataSourceList) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse)
Read is called when the provider must read data source values in order to update state. Config values should be read from the ReadRequest and new state values set on the ReadResponse.
func (*DataSourceList) Schema ¶
func (d *DataSourceList) Schema(_ context.Context, _ datasource.SchemaRequest, resp *datasource.SchemaResponse)
Schema should return the schema for this data source.
type IDNAFunction ¶
type IDNAFunction struct{}
func (*IDNAFunction) Definition ¶
func (f *IDNAFunction) Definition(_ context.Context, _ function.DefinitionRequest, resp *function.DefinitionResponse)
func (*IDNAFunction) Metadata ¶
func (f *IDNAFunction) Metadata(_ context.Context, _ function.MetadataRequest, resp *function.MetadataResponse)
func (*IDNAFunction) Run ¶
func (f *IDNAFunction) Run(ctx context.Context, req function.RunRequest, resp *function.RunResponse)
type RData ¶
type RData struct {
testtemplate.DataCommon
schema.Zone
Raw string
}
RData defines the fields for the "testdata/r/hcloud_zone" template.
type Resource ¶
type Resource struct {
// contains filtered or unexported fields
}
func (*Resource) Configure ¶
func (r *Resource) Configure(_ context.Context, req resource.ConfigureRequest, resp *resource.ConfigureResponse)
Configure enables provider-level data or clients to be set in the provider-defined DataSource type. It is separately executed for each ReadDataSource RPC.
func (*Resource) Create ¶
func (r *Resource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
func (*Resource) Delete ¶
func (r *Resource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
func (*Resource) ImportState ¶
func (r *Resource) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse)
func (*Resource) Metadata ¶
func (r *Resource) Metadata(_ context.Context, _ resource.MetadataRequest, resp *resource.MetadataResponse)
Metadata should return the full name of the data source.
func (*Resource) Read ¶
func (r *Resource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
func (*Resource) Schema ¶
func (r *Resource) Schema(_ context.Context, _ resource.SchemaRequest, resp *resource.SchemaResponse)
func (*Resource) Update ¶
func (r *Resource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
func (*Resource) ValidateConfig ¶
func (r *Resource) ValidateConfig(ctx context.Context, req resource.ValidateConfigRequest, resp *resource.ValidateConfigResponse)