aliyun_resources

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2022 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ChargeTypePrepaid  = "prepaid"
	ChargeTypePostPaid = "postpaid"
)
View Source
const (
	TagPrefixCluster = "dice-cluster"
	TagPrefixProject = "dice-project"
)
View Source
const (
	CloudSourceExpireDays             = 10
	CloudSourceRunning                = "Running"
	CloudSourceStopped                = "Stopped"
	CloudSourceExpired                = "Expired"
	CloudSourceBeforeExpired          = "BeforeExpired"
	CloudSourceBeforeExpiredInTenDays = "BeforeExpired (10 days)"
)
View Source
const (
	CloudVendorAliCloud           CloudVendor = "alicloud"
	CloudResourceOverviewJsPrefix             = "/dice/ops/resource_overview"
	CloudResourcePrefix                       = "/dice/ops"

	ResourceOverview = "resource_overview"
	ResourceRegions  = "regions"
)

Variables

View Source
var DefaultPageOption = PageOption{
	PageSize:   &defaultPageSize,
	PageNumber: &defaultPageNum,
}
View Source
var PageSizeOneOption = PageOption{
	PageSize:   &pageSizeOne,
	PageNumber: &defaultPageNum,
}

Functions

func GenClusterTag

func GenClusterTag(cluster string) (key string, value string)

func GenProjectTag

func GenProjectTag(projectID string) (key string, value string)

func GetProjectClusterName

func GetProjectClusterName(ctx Context, projid string, workspace string) (clusterName, projectName string, err error)

func ProcessFailedRecord

func ProcessFailedRecord(ctx Context, source string, addonID string, record *dbclient.Record,
	detail *apistructs.CreateCloudResourceRecord, err error)

func PutCachedRegions

func PutCachedRegions(ak_ctx Context, regions *CachedRegionIDs)

func UpdateGlobalCachedRegions

func UpdateGlobalCachedRegions(regions *CachedRegionIDs)

Types

type AccessKeySecret

type AccessKeySecret struct {
	OrgID        string
	Vendor       string
	Region       string
	AccessKeyID  string
	AccessSecret string
}

type CachedRegionIDs

type CachedRegionIDs struct {
	ECS                 []string
	VPC                 []string
	LastUpdateTimestamp int64
}

func ActiveRegionIDs

func ActiveRegionIDs(ctx Context) CachedRegionIDs

func GetCachedRegions

func GetCachedRegions(ak_ctx Context) *CachedRegionIDs

type CloudResourceType

type CloudResourceType string
const (
	CloudResourceTypeCompute CloudResourceType = "Compute"
	CloudResourceTypeNetwork CloudResourceType = "Network"
	CloudResourceTypeStorage CloudResourceType = "Storage"
	CloudResourceTypeAddon   CloudResourceType = "Addon"
)

func (CloudResourceType) String

func (c CloudResourceType) String() string

type CloudVendor

type CloudVendor string

func (CloudVendor) String

func (c CloudVendor) String() string

type Context

type Context struct {
	AccessKeySecret
	VpcID    string
	DB       *dbclient.DBClient
	Bdl      *bundle.Bundle
	JS       jsonstore.JsonStore
	CachedJs jsonstore.JsonStore
}

type PageOption

type PageOption struct {
	PageSize   *int
	PageNumber *int
}

type ResponsePager

type ResponsePager struct {
	TotalCount int
	PageSize   int
	PageNumber int
}

type TagResourceType

type TagResourceType string
const (
	TagResourceTypeVpc         TagResourceType = "VPC"
	TagResourceTypeVsw         TagResourceType = "VSWITCH"
	TagResourceTypeEip         TagResourceType = "EIP"
	TagResourceTypeRedis       TagResourceType = "REDIS"
	TagResourceTypeOss         TagResourceType = "OSS"
	TagResourceTypeRDS         TagResourceType = "RDS"
	TagResourceTypeECS         TagResourceType = "ECS"
	TagResourceTypeOnsInstance TagResourceType = "ONS"
	TagResourceTypeOnsGroup    TagResourceType = "ONS_GROUP"
	TagResourceTypeOnsTopic    TagResourceType = "ONS_TOPIC"

	TagResourceTypeOnsInstanceTag TagResourceType = "INSTANCE"
	TagResourceTypeOnsGroupTag    TagResourceType = "GROUP"
	TagResourceTypeOnsTopicTag    TagResourceType = "TOPIC"
)

func (TagResourceType) String

func (t TagResourceType) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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