tenanter

package
v0.0.0-...-a156103 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoExistAliRegionId     = errors.New("region id not exist in ali")
	ErrNoExistTencentRegionId = errors.New("region id not exist in tencent")
	ErrNoExistHuaweiRegionId  = errors.New("region id not exist in huawei")
	ErrNoExistAwsRegionId     = errors.New("region id not exist in aws")
)
View Source
var (
	ErrLoadTenanterFromFile  = errors.New("load tenanter from file failed")
	ErrLoadTenanterFromOsEnv = errors.New("load tenanter from os env failed")
	ErrLoadTenanterFileEmpty = errors.New("load tenanter from file failed")
	ErrNoTenanters           = errors.New("no tenanters for the cloud")
)

Functions

func LoadCloudConfigs

func LoadCloudConfigs(configFile string) error

func LoadCloudConfigsFromFile

func LoadCloudConfigsFromFile(configFile string) error

func LoadCloudConfigsFromOsEnv

func LoadCloudConfigsFromOsEnv() error

func ShowConfigJson

func ShowConfigJson() ([]byte, error)

Types

type AccessKeyTenant

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

func (*AccessKeyTenant) AccountName

func (tenant *AccessKeyTenant) AccountName() string

func (*AccessKeyTenant) Clone

func (tenant *AccessKeyTenant) Clone() Tenanter

func (*AccessKeyTenant) GetId

func (tenant *AccessKeyTenant) GetId() string

func (*AccessKeyTenant) GetSecret

func (tenant *AccessKeyTenant) GetSecret() string

type Region

type Region interface {
	GetId() int32
	GetName() string
}

func GetAllRegionIds

func GetAllRegionIds(provider pbtenant.CloudProvider) (regions []Region)

func NewRegion

func NewRegion(provider pbtenant.CloudProvider, regionId int32) (Region, error)

type Tenanter

type Tenanter interface {
	AccountName() string
	Clone() Tenanter
}

func GetTenanters

func GetTenanters(provider pbtenant.CloudProvider) ([]Tenanter, error)

func NewTenantWithAccessKey

func NewTenantWithAccessKey(name, accessKeyId, accessKeySecret string) Tenanter

Jump to

Keyboard shortcuts

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