client

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: May 24, 2022 License: MPL-2.0 Imports: 19 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 IPAddressResolver

func IPAddressResolver(path string) schema.ColumnResolver

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 `hcl:"token,optional"`
	// SpacesRegions is a list of DO regions to fetch spaces from, if not given we execute on all regions
	SpacesRegions []string `hcl:"spaces_regions,optional"`
	// SpacesAccessKey is the secret access token generated in DO control panel
	SpacesAccessKey string `hcl:"spaces_access_key,optional"`
	// SpacesAccessKeyId is the unique identifier of the access key generated in the DO control panel
	SpacesAccessKeyId string `hcl:"spaces_access_key_id,optional"`
	// SpacesDebugLogging allows enabling AWS S3 request logging on spaces requests
	SpacesDebugLogging bool `hcl:"spaces_debug_logging,optional"`
}

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