provider

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 25, 2024 License: MPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(version string) func() provider.Provider

func NewPolicyDataSource

func NewPolicyDataSource() datasource.DataSource

Types

type CspProvider

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

CspProvider defines the provider implementation.

func (*CspProvider) Configure

func (*CspProvider) DataSources

func (p *CspProvider) DataSources(ctx context.Context) []func() datasource.DataSource

func (*CspProvider) Functions

func (p *CspProvider) Functions(ctx context.Context) []func() function.Function

func (*CspProvider) Metadata

func (*CspProvider) Resources

func (p *CspProvider) Resources(ctx context.Context) []func() resource.Resource

func (*CspProvider) Schema

type Directive

type Directive struct {
	Name types.String `tfsdk:"name"`

	Keywords []types.String `tfsdk:"keywords"`
	Hosts    []types.String `tfsdk:"hosts"`
	Schemes  []types.String `tfsdk:"schemes"`
	Nonces   []types.String `tfsdk:"nonces"`
	Values   []types.String `tfsdk:"values"`

	Hashes []Hash `tfsdk:"hash"`
}

func (*Directive) GenerateDirective

func (d *Directive) GenerateDirective() string

type Hash

type Hash struct {
	Algorithm types.String `tfsdk:"algorithm"`
	Value     types.String `tfsdk:"value"`
}

type PolicyDataSource

type PolicyDataSource struct{}

PolicyDataSource defines the data source implementation.

func (*PolicyDataSource) Configure

func (*PolicyDataSource) Metadata

func (*PolicyDataSource) Read

func (*PolicyDataSource) Schema

type PolicyDataSourceModel

type PolicyDataSourceModel struct {
	Directives []Directive `tfsdk:"directive"`

	Value types.String `tfsdk:"value"`
}

PolicyDataSourceModel describes the data source data model.

func (*PolicyDataSourceModel) GeneratePolicy

func (p *PolicyDataSourceModel) GeneratePolicy() string

Jump to

Keyboard shortcuts

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