cloud

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnsupportedCloudProvider = fmt.Errorf("unsupported provider, only support %s and %s", AWSProvider, TencentCloudProvider)
	ErrProviderNotTencentCloud  = errors.New("provider is not tencentcloud")
	ErrProviderNotAWS           = errors.New("provider is not aws")
	ErrEmptySecretID            = errors.New("secret_id is empty")
	ErrEmptySecretKey           = errors.New("secret_key is empty")
	ErrEmptyRegion              = errors.New("region is empty")
)

Functions

This section is empty.

Types

type CommonOption

type CommonOption struct {
	Provider  Provider
	SecretID  string
	SecretKey string
	Region    string
}

func (CommonOption) CheckAWS

func (option CommonOption) CheckAWS() error

func (CommonOption) CheckTencentCloud

func (option CommonOption) CheckTencentCloud() error

func (CommonOption) GetProvider

func (option CommonOption) GetProvider() Provider

func (CommonOption) GetRegion

func (option CommonOption) GetRegion() string

func (CommonOption) GetSecretID

func (option CommonOption) GetSecretID() string

func (CommonOption) GetSecretKey

func (option CommonOption) GetSecretKey() string

type Option

type Option interface {
	GetProvider() Provider
	GetSecretID() string
	GetSecretKey() string
	GetRegion() string

	CheckAWS() error
	CheckTencentCloud() error
}

type Provider

type Provider string
const (
	AWSProvider          Provider = "aws"
	TencentCloudProvider Provider = "tencentcloud"
)

Directories

Path Synopsis
examples

Jump to

Keyboard shortcuts

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