provider

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2026 License: MPL-2.0 Imports: 48 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Name is the name of the provider.
	Name = "polytomic"

	PolytomicDefaultURL = "app.polytomic.com"
)

Variables

View Source
var (
	// ConnectionsMap is a map of all the connections that can be imported as
	// resources.
	ConnectionsMap = connectionsMap()

	// ConnectionDatasourcesMap is a map of all the connections that can be
	// imported as data sources.
	ConnectionDatasourcesMap = datasourcesMap()
)
View Source
var TestAccProtoV6ProviderFactories = map[string]func() (tfprotov6.ProviderServer, error){
	Name: providerserver.NewProtocol6WithError(New("test")()),
}

TestAccProtoV6ProviderFactories are used to instantiate a provider during acceptance testing. The factory function will be invoked for every Terraform CLI command executed to create a provider server to which the CLI can reattach.

Functions

func APIKey added in v1.0.0

func APIKey() bool

APIKey returns true if the test is being run using an API key, rather than a deployment key.

func GetTestAccProtoV6ProviderFactories added in v1.0.0

func GetTestAccProtoV6ProviderFactories() map[string]func() (tfprotov6.ProviderServer, error)

GetTestAccProtoV6ProviderFactories returns the provider factories for testing

func New

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

func TestAccPreCheck added in v1.0.0

func TestAccPreCheck(t *testing.T)

TestAccPreCheck performs pre-checks for acceptance testing

func TestCaseTfResource added in v1.0.0

func TestCaseTfResource(t *testing.T, tmplText string, args TestCaseTfArgs) string

TestCaseTfResource generates the Terraform configuration for a test case from the provided template.

func ToSnakeCase

func ToSnakeCase(s string) string

func ValidName added in v0.3.16

func ValidName(s string) string

A name must start with a letter or underscore and may contain only letters, digits, underscores, and dashes. e.g 100_users -> _100_users

Types

type BulkSchedule added in v0.3.39

type BulkSchedule struct {
	DayOfMonth *string `json:"day_of_month" url:"day_of_month,omitempty" tfsdk:"day_of_month"`
	DayOfWeek  *string `json:"day_of_week" url:"day_of_week,omitempty" tfsdk:"day_of_week"`
	Frequency  string  `json:"frequency" url:"frequency,omitempty" tfsdk:"frequency"`
	Hour       *string `json:"hour" url:"hour,omitempty" tfsdk:"hour"`
	Minute     *string `json:"minute" url:"minute,omitempty" tfsdk:"minute"`
	Month      *string `json:"month" url:"month,omitempty" tfsdk:"month"`
}

type Filter added in v0.3.9

type Filter struct {
	FieldID   string  `json:"field_id" tfsdk:"field_id" mapstructure:"field_id"`
	FieldType string  `json:"field_type" tfsdk:"field_type" mapstructure:"field_type"`
	Function  string  `json:"function" tfsdk:"function" mapstructure:"function"`
	Value     *string `json:"value" tfsdk:"value" mapstructure:"value"`
	Label     string  `json:"label" tfsdk:"label" mapstructure:"label"`
}

type Override added in v0.3.11

type Override struct {
	FieldID  string  `json:"field_id" tfsdk:"field_id" mapstructure:"field_id"`
	Function string  `json:"function" tfsdk:"function" mapstructure:"function"`
	Value    *string `json:"value" tfsdk:"value" mapstructure:"value"`
	Override *string `json:"override" tfsdk:"override" mapstructure:"override"`
}

type Provider added in v1.0.0

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

Provider satisfies the tfsdk.Provider interface and usually is included with all Resource and DataSource implementations.

func (*Provider) ConfigValidators added in v1.0.0

func (p *Provider) ConfigValidators(context.Context) []provider.ConfigValidator

func (*Provider) Configure added in v1.0.0

func (*Provider) DataSources added in v1.0.0

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

func (*Provider) Metadata added in v1.0.0

func (*Provider) Resources added in v1.0.0

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

func (*Provider) Schema added in v1.0.0

type ProviderData

type ProviderData struct {
	DeploymentKey types.String `tfsdk:"deployment_api_key"`
	DeploymentUrl types.String `tfsdk:"deployment_url"`

	PartnerKey types.String `tfsdk:"partner_key"`

	APIKey types.String `tfsdk:"api_key"`
}

ProviderData holds the provider configuration, which is used to construct Polytomic clients.

type Target added in v0.3.10

type Target struct {
	ConnectionID  string  `json:"connection_id" tfsdk:"connection_id" mapstructure:"connection_id"`
	Object        *string `json:"object" tfsdk:"object" mapstructure:"object"`
	SearchValues  string  `json:"search_values,omitempty" tfsdk:"search_values" mapstructure:"search_values,omitempty"`
	Configuration string  `json:"configuration,omitempty" tfsdk:"configuration" mapstructure:"configuration,omitempty"`
	NewName       *string `json:"new_name,omitempty" tfsdk:"new_name" mapstructure:"new_name"`
	FilterLogic   *string `json:"filter_logic,omitempty" tfsdk:"filter_logic" mapstructure:"filter_logic"`
}

type TestCaseTfArgs added in v1.0.0

type TestCaseTfArgs struct {
	Name   string
	APIKey bool
}

Directories

Path Synopsis
gen
internal

Jump to

Keyboard shortcuts

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