stackpath

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2020 License: MPL-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewStackPathError

func NewStackPathError(err error) error

NewStackPathError factories common StackPath error scenarios into their own error types, or returns the original error.

func Provider

func Provider() terraform.ResourceProvider

Provider returns the configured provider for managing StackPath resources.

Types

type Config

type Config struct {
	// The Stack in which all resources should be created
	StackID string

	// The Client ID that should be used to retrieve an access token. This
	// option must not be used with the access token option.
	ClientID string

	// The Client Secret that should be used to retrieve an access
	// token. This options must not be used with the access token option.
	ClientSecret string

	// The AccessToken that should be used in the request. This must not
	// be used in combination with the client ID and client secret options.
	AccessToken string

	// The base URL to use for API requests. This value must not end
	// in a trailing slash. This value will default to the official
	// StackPath API.
	BaseURL string
	// contains filtered or unexported fields
}

Config is used to configure the StackPath provider.

func (*Config) LoadAndValidate

func (c *Config) LoadAndValidate() error

LoadAndValidate will load the configuration and validate the configuration options. An error will be returned when the configuration is invalid.

type InvalidClientIDError

type InvalidClientIDError struct{}

InvalidClientSecretError models when a StackPath API OAuth 2 client ID is invalid, either due to an invalid format or because the client ID does not exist at StackPath.

func NewInvalidClientIDError

func NewInvalidClientIDError() *InvalidClientIDError

NewInvalidClientIDError wraps an existing error as an invalid client ID error.

func (*InvalidClientIDError) Error

func (e *InvalidClientIDError) Error() string

Error returns a human-readable invalid client ID error message.

type InvalidClientSecretError

type InvalidClientSecretError struct{}

InvalidClientSecretError models when a StackPath API OAuth 2 client ID is correct, but the client secret is incorrect.

func NewInvalidClientSecretError

func NewInvalidClientSecretError() *InvalidClientSecretError

NewInvalidClientSecretError wraps an existing error as an invalid client secret error.

func (*InvalidClientSecretError) Error

func (e *InvalidClientSecretError) Error() string

Error returns a human-readable invalid client secret error message.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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