cloud

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2020 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BigQueryServiceID     = "bigquery"
	CloudStorageServiceID = "storage"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AWS

type AWS struct {
	Region                  string `yaml:"region,omitempty"`
	DisableSSL              bool   `yaml:"disable_ssl,omitempty"`
	S3ForcePathStyle        bool   `yaml:"s3_force_path_style,omitempty"`
	S3Endpoint              string `yaml:"s3_endpoint,omitempty"`
	SQSEndpoint             string `yaml:"sqs_endpoint,omitempty"`
	AccessKeyID             string `yaml:"access_key_id,omitempty"`
	SecretAccessKey         string `yaml:"secret_access_key,omitempty"`
	DisableShardConfigState bool   `yaml:"disable_shard_config_state,omitempty"`
}

func (*AWS) BuildSession

func (c *AWS) BuildSession() *session.Session

type Base64String added in v0.2.0

type Base64String []byte

func (Base64String) Bytes added in v0.2.0

func (s Base64String) Bytes() []byte

func (Base64String) IsEmpty added in v0.2.0

func (s Base64String) IsEmpty() bool

func (Base64String) String added in v0.2.0

func (s Base64String) String() string

func (*Base64String) UnmarshalYAML added in v0.2.0

func (s *Base64String) UnmarshalYAML(unmarshal func(interface{}) error) (err error)

type Cloud

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

Cloud pools and keeps clients connected to AWS and GCP.

func New

func New(conf *Config) *Cloud

func (*Cloud) GetBigQueryClient

func (c *Cloud) GetBigQueryClient(ctx context.Context, projectID string) (*bigquery.Client, error)

func (*Cloud) GetCloudStorageClient

func (c *Cloud) GetCloudStorageClient(ctx context.Context) (*storage.Client, error)

func (*Cloud) GetS3

func (c *Cloud) GetS3() *s3.S3

func (*Cloud) GetSQS

func (c *Cloud) GetSQS() *sqs.SQS

type Config

type Config struct {
	AWS *AWS `yaml:"aws,omitempty"`
	GCP *GCP `yaml:"gcp,omitempty"`
}

func NewDefaultConfig

func NewDefaultConfig() *Config

type GCP

type GCP struct {
	WithoutAuthentication bool         `yaml:"without_authentication,omitempty"`
	BigQueryEndpoint      string       `yaml:"big_query_endpoint,omitempty"`
	CloudStorageEndpoint  string       `yaml:"cloud_storage_endpoint,omitempty"`
	Base64Credential      Base64String `yaml:"base64_credential"`
}

func (*GCP) BuildOption

func (c *GCP) BuildOption(service string) []option.ClientOption

Jump to

Keyboard shortcuts

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