Help us shape the future of Go! Take the 2026 Go Developer Survey

rules

package
v1.7.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 28, 2026 License: MPL-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRulesDataSource

func NewRulesDataSource() datasource.DataSource

NewRulesDataSource returns a new instance of RulesDataSource.

Types

type OSInfoModel

type OSInfoModel struct {
	OSType         types.String `tfsdk:"os_type"`
	OSVersion      types.Int64  `tfsdk:"os_version"`
	ManagementType types.String `tfsdk:"management_type"`
}

OSInfoModel represents supported OS information for a rule.

type OsVersionModel

type OsVersionModel struct {
	OsType    types.String `tfsdk:"os_type"`
	OsVersion types.Int64  `tfsdk:"os_version"`
}

OsVersionModel represents an operating-system type and major version pair.

type RuleModel

type RuleModel struct {
	ID                      types.String   `tfsdk:"id"`
	SectionName             types.String   `tfsdk:"section_name"`
	Enabled                 types.Bool     `tfsdk:"enabled"`
	Title                   types.String   `tfsdk:"title"`
	Description             types.String   `tfsdk:"description"`
	References              []types.String `tfsdk:"references"`
	ODVValue                types.String   `tfsdk:"odv_value"`
	ODVHint                 types.String   `tfsdk:"odv_hint"`
	ODVPlaceholder          types.String   `tfsdk:"odv_placeholder"`
	ODVType                 types.String   `tfsdk:"odv_type"`
	ODVValidationMin        types.Int64    `tfsdk:"odv_validation_min"`
	ODVValidationMax        types.Int64    `tfsdk:"odv_validation_max"`
	ODVValidationEnumValues []types.String `tfsdk:"odv_validation_enum_values"`
	ODVValidationRegex      types.String   `tfsdk:"odv_validation_regex"`
	SupportedOS             []OSInfoModel  `tfsdk:"supported_os"`
	OSSpecificDefaults      types.Map      `tfsdk:"os_specific_defaults"`
	DependsOn               []types.String `tfsdk:"depends_on"`
	Reportable              types.Bool     `tfsdk:"reportable"`
	SmartCard               types.Bool     `tfsdk:"smart_card"`
}

RuleModel represents a rule in the data source, including ODV and computed fields.

type RulesDataSource

type RulesDataSource struct {
	// contains filtered or unexported fields
}

RulesDataSource implements the Terraform data source for mSCP rules.

func (*RulesDataSource) Configure

Configure sets up the API client for the data source from the provider configuration.

func (*RulesDataSource) Metadata

Metadata sets the data source type name for the Terraform provider.

func (*RulesDataSource) Read

Read implements datasource.DataSource for RulesDataSource. It fetches the list of rules from the API and sets the state.

func (*RulesDataSource) Schema

Schema sets the Terraform schema for the data source.

type RulesDataSourceModel

type RulesDataSourceModel struct {
	BaselineID          types.String     `tfsdk:"baseline_id"`
	Sources             []SourceModel    `tfsdk:"sources"`
	AvailableOsVersions []OsVersionModel `tfsdk:"available_os_versions"`
	Rules               []RuleModel      `tfsdk:"rules"`
	Timeouts            timeouts.Value   `tfsdk:"timeouts"`
}

RulesDataSourceModel represents the Terraform data source model for mSCP rules.

type SourceModel

type SourceModel struct {
	Branch   types.String `tfsdk:"branch"`
	Revision types.String `tfsdk:"revision"`
}

SourceModel represents a source branch and revision for a rule.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL