providerclient

package
v1.0.0-beta3 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2025 License: MPL-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UserAgent    = "polytomic-terraform-provider"
	ErrorSummary = "Client Error"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Provider

type Provider struct {
	DeploymentKey string
	DeploymentURL string

	PartnerKey       string
	OrganizationUser string

	APIKey string
	// contains filtered or unexported fields
}

Provider is used to construct Polytomic clients based on the configured authentication mechanism.

func GetProvider

func GetProvider(data any, diags diag.Diagnostics) *Provider

GetClient returns a Polytomic client from the provider data for the specified organization.

func NewClientProvider

func NewClientProvider(opts ...ProviderOpt) (*Provider, error)

func (*Provider) Client

func (p *Provider) Client(org string) (*ptclient.Client, error)

func (*Provider) PartnerClient

func (p *Provider) PartnerClient() (*ptclient.Client, error)

func (*Provider) Validate

func (p *Provider) Validate() error

Validate checks the provider configuration for required fields.

type ProviderOpt

type ProviderOpt func(*Provider)

func WithAPIKey

func WithAPIKey(key string) ProviderOpt

func WithDeploymentKey

func WithDeploymentKey(key string) ProviderOpt

func WithDeploymentURL

func WithDeploymentURL(url string) ProviderOpt

func WithPartnerKey

func WithPartnerKey(key, orgUser string) ProviderOpt

Jump to

Keyboard shortcuts

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