Documentation ¶
Index ¶
- func NewDataSource() datasource.DataSource
- 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 DataSourceModel
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDataSource ¶
func NewDataSource() datasource.DataSource
The NewDataSource function is a constructor for the data source. This function needs
Types ¶
type DataSource ¶
type DataSource struct {
// contains filtered or unexported fields
}
DataSource struct defines the structure for this data source.
func (*DataSource) Configure ¶
func (d *DataSource) Configure(ctx context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse)
Configure is a method of the data source interface that Terraform calls to provide the configured provider instance to the data source. It passes the DataSourceData that's been stored by the provider's ConfigureFunc.
func (*DataSource) Metadata ¶
func (d *DataSource) Metadata(ctx context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse)
Metadata provides a way to define information about the data source. This method is called by the framework to retrieve metadata about the data source.
func (*DataSource) Read ¶
func (d *DataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse)
Read method is responsible for reading an existing data source's state.
func (*DataSource) Schema ¶
func (d *DataSource) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse)
Schema provides a way to define the structure of the data source data. It is called by the framework to get the schema of the data source.