Documentation
¶
Index ¶
- Constants
- Variables
- func APIKey() bool
- func GetTestAccProtoV6ProviderFactories() map[string]func() (tfprotov6.ProviderServer, error)
- func New(version string) func() provider.Provider
- func TestAccPreCheck(t *testing.T)
- func TestCaseTfResource(t *testing.T, tmplText string, args TestCaseTfArgs) string
- func ToSnakeCase(s string) string
- func ValidName(s string) string
- type BulkSchedule
- type Filter
- type Override
- type Provider
- func (p *Provider) ConfigValidators(context.Context) []provider.ConfigValidator
- func (p *Provider) Configure(ctx context.Context, req provider.ConfigureRequest, ...)
- func (p *Provider) DataSources(ctx context.Context) []func() datasource.DataSource
- func (p *Provider) Metadata(ctx context.Context, req provider.MetadataRequest, ...)
- func (p *Provider) Resources(ctx context.Context) []func() resource.Resource
- func (p *Provider) Schema(ctx context.Context, req provider.SchemaRequest, resp *provider.SchemaResponse)
- type ProviderData
- type Target
- type TestCaseTfArgs
Constants ¶
const ( // Name is the name of the provider. Name = "polytomic" PolytomicDefaultURL = "app.polytomic.com" )
Variables ¶
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() )
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 TestAccPreCheck ¶ added in v1.0.0
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 ¶
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 (p *Provider) Configure(ctx context.Context, req provider.ConfigureRequest, resp *provider.ConfigureResponse)
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 (p *Provider) Metadata(ctx context.Context, req provider.MetadataRequest, resp *provider.MetadataResponse)
func (*Provider) Schema ¶ added in v1.0.0
func (p *Provider) Schema(ctx context.Context, req provider.SchemaRequest, resp *provider.SchemaResponse)
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"`
}