provider

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2024 License: MIT Imports: 21 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 NewFeatureResource

func NewFeatureResource() resource.Resource

func NewSegmentResource added in v1.6.0

func NewSegmentResource() resource.Resource

Types

type ConstraintModel

type ConstraintModel struct {
	ContextName     types.String `tfsdk:"context_name"`
	CaseInsensitive types.Bool   `tfsdk:"case_insensitive"`
	Operator        types.String `tfsdk:"operator"`
	Inverted        types.Bool   `tfsdk:"inverted"`
	Value           types.String `tfsdk:"value"`
	JsonValues      types.String `tfsdk:"values_json"`
}

type EnvironmentModel

type EnvironmentModel struct {
	Enabled    types.Bool      `tfsdk:"enabled"`
	Strategies []StrategyModel `tfsdk:"strategies"`
	Variants   []VariantModel  `tfsdk:"variants"`
}

type FeatureModel

type FeatureModel struct {
	ID             types.String                `tfsdk:"id"`
	Project        types.String                `tfsdk:"project"`
	Name           types.String                `tfsdk:"name"`
	Type           types.String                `tfsdk:"type"`
	Description    types.String                `tfsdk:"description"`
	ImpressionData types.Bool                  `tfsdk:"impression_data"`
	Environments   map[string]EnvironmentModel `tfsdk:"environments"`
}

type FeatureResource

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

func (*FeatureResource) Configure

func (*FeatureResource) Create

func (*FeatureResource) Delete

func (*FeatureResource) ImportState

func (*FeatureResource) Metadata

func (*FeatureResource) Read

func (*FeatureResource) Schema

func (*FeatureResource) Update

type FeatureResourceModel

type FeatureResourceModel struct {
	FeatureModel
}

type SegmentModel added in v1.6.0

type SegmentModel struct {
	ID          types.String      `tfsdk:"id"`
	IDInt       types.Int64       `tfsdk:"id_int"`
	Project     types.String      `tfsdk:"project"`
	Name        types.String      `tfsdk:"name"`
	Description types.String      `tfsdk:"description"`
	Constraints []ConstraintModel `tfsdk:"constraints"`
}

type SegmentResource added in v1.6.0

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

func (*SegmentResource) Configure added in v1.6.0

func (*SegmentResource) Create added in v1.6.0

func (*SegmentResource) Delete added in v1.6.0

func (*SegmentResource) ImportState added in v1.6.0

func (*SegmentResource) Metadata added in v1.6.0

func (*SegmentResource) Read added in v1.6.0

func (*SegmentResource) Schema added in v1.6.0

func (*SegmentResource) Update added in v1.6.0

type SegmentResourceModel added in v1.6.0

type SegmentResourceModel struct {
	SegmentModel
}

type StrategyModel

type StrategyModel struct {
	Id          types.String            `tfsdk:"id"`
	Name        types.String            `tfsdk:"name"`
	Disabled    types.Bool              `tfsdk:"disabled"`
	Title       types.String            `tfsdk:"title"`
	SortOrder   types.Float32           `tfsdk:"sort_order"`
	Constraints []ConstraintModel       `tfsdk:"constraints"`
	Parameters  map[string]types.String `tfsdk:"parameters"`
	Segments    []types.Float32         `tfsdk:"segments"`
	Variants    []StrategyVariantModel  `tfsdk:"variants"`
}

type StrategyVariantModel

type StrategyVariantModel struct {
	Name        types.String `tfsdk:"name"`
	Payload     types.String `tfsdk:"payload"`
	PayloadType types.String `tfsdk:"payload_type"`
	Weight      types.Int64  `tfsdk:"weight"`
	WeightType  types.String `tfsdk:"weight_type"`
	Stickiness  types.String `tfsdk:"stickiness"`
}

type UnleashProvider

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

UnleashProvider defines the provider implementation.

func (*UnleashProvider) Configure

func (*UnleashProvider) DataSources

func (p *UnleashProvider) DataSources(_ context.Context) []func() datasource.DataSource

func (*UnleashProvider) Functions

func (p *UnleashProvider) Functions(_ context.Context) []func() function.Function

func (*UnleashProvider) Metadata

func (*UnleashProvider) Resources

func (p *UnleashProvider) Resources(_ context.Context) []func() resource.Resource

func (*UnleashProvider) Schema

type UnleashProviderData added in v1.4.0

type UnleashProviderData struct {
	Client                   unleash.ClientWithResponsesInterface
	StrategyTitleIgnoreRegEx *regexp.Regexp
}

type UnleashProviderModel

type UnleashProviderModel struct {
	BaseURL                  types.String `tfsdk:"base_url"`
	AuthorizationToken       types.String `tfsdk:"authorization"`
	StrategyTitleIgnoreRegEx types.String `tfsdk:"strategy_title_ignore_regexp"`
}

UnleashProviderModel describes the provider data model.

type VariantModel

type VariantModel struct {
	Name        types.String           `tfsdk:"name"`
	Payload     types.String           `tfsdk:"payload"`
	PayloadType types.String           `tfsdk:"payload_type"`
	Weight      types.Float32          `tfsdk:"weight"`
	WeightType  types.String           `tfsdk:"weight_type"`
	Stickiness  types.String           `tfsdk:"stickiness"`
	Overrides   []VariantOverrideModel `tfsdk:"overrides"`
}

type VariantOverrideModel

type VariantOverrideModel struct {
	ContextName types.String `tfsdk:"context_name"`
	JsonValues  types.String `tfsdk:"values_json"`
}

Jump to

Keyboard shortcuts

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