client

package
v0.3.5 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2021 License: MPL-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const Forbidden = 403
View Source
const QuotaExceeded = 429

Variables

This section is empty.

Functions

func AddGcpMetadata

func AddGcpMetadata(ctx context.Context, c schema.ClientMeta, r *schema.Resource) error

func Configure

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

func DeleteProjectFilter

func DeleteProjectFilter(meta schema.ClientMeta) []interface{}

func ISODateResolver added in v0.3.4

func ISODateResolver(path string) schema.ColumnResolver

func IgnoreErrorHandler

func IgnoreErrorHandler(err error) bool

func ProjectMultiplex

func ProjectMultiplex(meta schema.ClientMeta) []schema.ClientMeta

func ResolveProject

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

Types

type Client

type Client struct {

	// All gcp services initialized by client
	Services *Services
	// this is set by table client multiplexer
	ProjectId string
	// contains filtered or unexported fields
}

func NewGcpClient

func NewGcpClient(log hclog.Logger, projects []string, services *Services) *Client

func (Client) Logger

func (c Client) Logger() hclog.Logger

func (Client) Retry added in v0.2.3

func (c Client) Retry(ctx context.Context, bo gax.Backoff, f func() (stop bool, err error)) error

func (Client) RetryWithDefaultBackoff added in v0.2.3

func (c Client) RetryWithDefaultBackoff(ctx context.Context, f func() (stop bool, err error)) error

func (Client) RetryWithDefaultBackoffIgnoreErrors added in v0.2.3

func (c Client) RetryWithDefaultBackoffIgnoreErrors(ctx context.Context, f func() (stop bool, err error), ignoreCodes map[int]bool) error

type Config

type Config struct {
	ProjectFilter         string   `hcl:"project_filter,optional"`
	ProjectIDs            []string `hcl:"project_ids,optional"`
	ServiceAccountKeyJSON string   `hcl:"service_account_key_json,optional"`
}

Config defines Provider Configuration

func (Config) Example added in v0.3.0

func (c Config) Example() string

type Services

type Services struct {
	Kms             *kms.Service
	Storage         *storage.Service
	Sql             *sql.Service
	Iam             *iam.Service
	Crm             *cloudresourcemanager.Service
	CloudFunctions  *cloudfunctions.Service
	Domain          *domains.Service
	Compute         *compute.Service
	BigQuery        *bigquery.Service
	Dns             *dns.Service
	Logging         *logging.Service
	Monitoring      *monitoring.Service
	ResourceManager *cloudresourcemanager.Service
}

Jump to

Keyboard shortcuts

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