client

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2022 License: MPL-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const MaxItemsPerPage = 200

Variables

This section is empty.

Functions

func Configure

func Configure(logger hclog.Logger, config interface{}) (schema.ClientMeta, diag.Diagnostics)

func DOTestHelper added in v0.2.4

func DOTestHelper(t *testing.T, table *schema.Table)

func DeleteFilter

func DeleteFilter(meta schema.ClientMeta, _ *schema.Resource) []interface{}

func ErrorClassifier added in v0.5.8

func ErrorClassifier(_ schema.ClientMeta, resourceName string, err error) diag.Diagnostics

func IPAddressResolver

func IPAddressResolver(path string) schema.ColumnResolver

func IsErrorMessage added in v0.5.8

func IsErrorMessage(err error, message string) bool

func RedactError added in v0.5.8

func RedactError(e diag.Diagnostic) diag.Diagnostic

RedactError redacts a given diagnostic and returns a RedactedDiagnostic containing both original and redacted versions

func ResolveResourceIdFromUrn

func ResolveResourceIdFromUrn(_ context.Context, meta schema.ClientMeta, r *schema.Resource, c schema.Column) error

func ResolveResourceTypeFromUrn

func ResolveResourceTypeFromUrn(_ context.Context, meta schema.ClientMeta, r *schema.Resource, c schema.Column) error

func SpacesRegionMultiplex

func SpacesRegionMultiplex(client schema.ClientMeta) []schema.ClientMeta

Types

type AwsLogger

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

func (AwsLogger) Logf

func (a AwsLogger) Logf(classification logging.Classification, format string, v ...interface{})

type Client

type Client struct {
	DoClient         *godo.Client
	Regions          []string
	SpacesRegion     string
	CredentialStatus DoCredentialStruct
	S3               *s3.Client
	// contains filtered or unexported fields
}

func (*Client) Logger

func (c *Client) Logger() hclog.Logger

func (*Client) WithSpacesRegion

func (c *Client) WithSpacesRegion(region string) *Client

type Config

type Config struct {
	Token string `yaml:"token,omitempty"`
	// SpacesRegions is a list of DO regions to fetch spaces from, if not given we execute on all regions
	SpacesRegions []string `yaml:"spaces_regions,omitempty"`
	// SpacesAccessKey is the secret access token generated in DO control panel
	SpacesAccessKey string `yaml:"spaces_access_key,omitempty"`
	// SpacesAccessKeyId is the unique identifier of the access key generated in the DO control panel
	SpacesAccessKeyId string `yaml:"spaces_access_key_id,omitempty"`
	// SpacesDebugLogging allows enabling AWS S3 request logging on spaces requests
	SpacesDebugLogging bool `yaml:"spaces_debug_logging,omitempty"`
}

func (Config) Example

func (Config) Example() string

type DoCredentialStruct added in v0.3.0

type DoCredentialStruct struct {
	Api    bool
	Spaces bool
}

type SpacesCredentialsProvider

type SpacesCredentialsProvider struct {
	SpacesAccessKey   string
	SpacesAccessKeyId string
}

func (SpacesCredentialsProvider) Retrieve

type SpacesEndpointResolver

type SpacesEndpointResolver struct{}

func (SpacesEndpointResolver) ResolveEndpoint

func (SpacesEndpointResolver) ResolveEndpoint(_, region string) (aws.Endpoint, error)

Jump to

Keyboard shortcuts

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