Documentation ¶
Index ¶
- Variables
- func AwsNewSession(option Option) (*session.Session, *aws.Config, error)
- type CommonOption
- func (option CommonOption) CheckAWS() error
- func (option CommonOption) CheckClusterRedis() error
- func (option CommonOption) CheckStandaloneRedis() error
- func (option CommonOption) CheckTencentCloud() error
- func (option CommonOption) GetAssumeRegion() string
- func (option CommonOption) GetAssumeRoleArn() string
- func (option CommonOption) GetProvider() Provider
- func (option CommonOption) GetRegion() string
- func (option CommonOption) GetSecretID() string
- func (option CommonOption) GetSecretKey() string
- type Option
- type Provider
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrUnsupportedCloudProvider = fmt.Errorf("unsupported provider, only support %s, %s and %s", AWSProvider, TencentCloudProvider, StandaloneRedisProvider) ErrProviderNotTencentCloud = errors.New("provider is not tencentcloud") ErrProviderNotAWS = errors.New("provider is not aws") ErrProviderNotStandaloneRedis = errors.New("provider is not standalone redis") ErrProviderNotClusterRedis = errors.New("provider is not cluster redis") ErrEmptySecretID = errors.New("secret_id is empty") ErrEmptySecretKey = errors.New("secret_key is empty") ErrEmptyRegion = errors.New("region is empty") )
Functions ¶
Types ¶
type CommonOption ¶
type CommonOption struct { Provider Provider SecretID string SecretKey string AssumeRoleArn string Region string AssumeRegion string }
func (CommonOption) CheckAWS ¶
func (option CommonOption) CheckAWS() error
func (CommonOption) CheckClusterRedis ¶ added in v1.2.0
func (option CommonOption) CheckClusterRedis() error
func (CommonOption) CheckStandaloneRedis ¶ added in v1.2.0
func (option CommonOption) CheckStandaloneRedis() error
func (CommonOption) CheckTencentCloud ¶
func (option CommonOption) CheckTencentCloud() error
func (CommonOption) GetAssumeRegion ¶ added in v1.1.3
func (option CommonOption) GetAssumeRegion() string
GetAssumeRegion 多数情况 region 和 assume region 是同一个region,全球区可能出现不一致的场景
func (CommonOption) GetAssumeRoleArn ¶ added in v1.1.3
func (option CommonOption) GetAssumeRoleArn() string
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
Click to show internal directories.
Click to hide internal directories.