Documentation ¶
Index ¶
- func RegisterDataSource(data DataSource) func(Router) Router
- type DataSource
- type DataSourceServerAdapter
- type Router
- func (r Router) ReadDataSource(ctx context.Context, req *tfprotov6.ReadDataSourceRequest, meta tftypes.Value) (*tfprotov6.ReadDataSourceResponse, error)
- func (r Router) Schemas() map[string]*tfprotov6.Schema
- func (r Router) ValidateDataResourceConfig(ctx context.Context, req *tfprotov6.ValidateDataResourceConfigRequest, ...) (*tfprotov6.ValidateDataResourceConfigResponse, error)
- type RouterOpt
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterDataSource ¶
func RegisterDataSource(data DataSource) func(Router) Router
RegisterDataSource registers a DataSource with the Router.
Types ¶
type DataSource ¶
type DataSource interface { DataSourceServerAdapter Name() string Schema() *tfprotov6.Schema SetProviderConfig(val tftypes.Value) error }
DataSource is the DataSource.
type DataSourceServerAdapter ¶
type DataSourceServerAdapter interface { ValidateDataResourceConfig(ctx context.Context, req tfprotov6.ValidateDataResourceConfigRequest, res *tfprotov6.ValidateDataResourceConfigResponse) ReadDataSource(ctx context.Context, req tfprotov6.ReadDataSourceRequest, res *tfprotov6.ReadDataSourceResponse) }
DataSourceServerAdapter Adapter for a tfprotov6.DataSourceServer removing the error return type from all methods.
type Router ¶
type Router struct {
// contains filtered or unexported fields
}
Router routes requests to the various data resources.
func (Router) ReadDataSource ¶
func (r Router) ReadDataSource(ctx context.Context, req *tfprotov6.ReadDataSourceRequest, meta tftypes.Value) (*tfprotov6.ReadDataSourceResponse, error)
ReadDataSource refreshes the data sources state.
func (Router) ValidateDataResourceConfig ¶
func (r Router) ValidateDataResourceConfig(ctx context.Context, req *tfprotov6.ValidateDataResourceConfigRequest, meta tftypes.Value) (*tfprotov6.ValidateDataResourceConfigResponse, error)
ValidateDataResourceConfig validates the data sources config.
Click to show internal directories.
Click to hide internal directories.