Documentation
¶
Index ¶
- func NewBaselinesDataSource() datasource.DataSource
- type BaselineModel
- type BaselinesDataSource
- func (d *BaselinesDataSource) Configure(ctx context.Context, req datasource.ConfigureRequest, ...)
- func (d *BaselinesDataSource) Metadata(ctx context.Context, req datasource.MetadataRequest, ...)
- func (d *BaselinesDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse)
- func (d *BaselinesDataSource) Schema(ctx context.Context, req datasource.SchemaRequest, ...)
- type BaselinesDataSourceModel
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewBaselinesDataSource ¶
func NewBaselinesDataSource() datasource.DataSource
NewBaselinesDataSource returns a new instance of BaselinesDataSource.
Types ¶
type BaselineModel ¶
type BaselineModel struct {
ID types.String `tfsdk:"id"`
BaselineID types.String `tfsdk:"baseline_id"`
Title types.String `tfsdk:"title"`
Description types.String `tfsdk:"description"`
RuleCount types.Int64 `tfsdk:"rule_count"`
}
BaselineModel represents a single mSCP baseline in the data source.
type BaselinesDataSource ¶
type BaselinesDataSource struct {
// contains filtered or unexported fields
}
BaselinesDataSource implements the Terraform data source for mSCP baselines.
func (*BaselinesDataSource) Configure ¶
func (d *BaselinesDataSource) Configure(ctx context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse)
Configure sets up the API client for the data source from the provider configuration.
func (*BaselinesDataSource) Metadata ¶
func (d *BaselinesDataSource) Metadata(ctx context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse)
Metadata sets the data source type name for the Terraform provider.
func (*BaselinesDataSource) Read ¶
func (d *BaselinesDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse)
Read implements datasource.DataSource for BaselinesDataSource. It fetches the list of baselines from the API and sets the state.
func (*BaselinesDataSource) Schema ¶
func (d *BaselinesDataSource) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse)
Schema sets the Terraform schema for the data source.
type BaselinesDataSourceModel ¶
type BaselinesDataSourceModel struct {
Baselines []BaselineModel `tfsdk:"baselines"`
Timeouts timeouts.Value `tfsdk:"timeouts"`
}
BaselinesDataSourceModel represents the Terraform data source model for mSCP baselines.
Click to show internal directories.
Click to hide internal directories.