Documentation
¶
Overview ¶
Copyright 2019 Yunion
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- Constants
- Variables
- func CopyObject(ctx context.Context, blocksz int64, dstBucket ICloudBucket, dstKey string, ...) error
- func CopyPart(ctx context.Context, iDstBucket ICloudBucket, dstKey string, uploadId string, ...) (string, error)
- func DeletePrefix(ctx context.Context, bucket ICloudBucket, prefix string) error
- func FetchMetaFromHttpHeader(metaPrefix string, headers http.Header) http.Header
- func GetCheckTransport(ts *http.Transport, ...) http.RoundTripper
- func GetClientRC(provider string, info SProviderInfo) (map[string]string, error)
- func GetClouduserpolicyWithSubscriptionProviders() []string
- func GetDnsCapabilities() map[string]SDnsCapability
- func GetOnPremiseProviders() []string
- func GetPrivateProviders() []string
- func GetProviderCloudEnv(provider string) string
- func GetPublicProviders() []string
- func GetRegistedProviderIds() []string
- func GetSupportCloudIdProvider() []string
- func GetSupportCloudgroupProviders() []string
- func HashIdsMac(ids ...string) string
- func ICloudObject2JSONObject(obj ICloudObject) jsonutils.JSONObject
- func IsError(err error, errs []string) bool
- func IsSupportApp(prod ICloudProvider) bool
- func IsSupportCDN(prod ICloudProvider) bool
- func IsSupportCapability(prod ICloudProvider, capa string) bool
- func IsSupportCompute(prod ICloudProvider) bool
- func IsSupportContainer(prod ICloudProvider) bool
- func IsSupportDnsZone(prod ICloudProvider) bool
- func IsSupportElasticCache(prod ICloudProvider) bool
- func IsSupportElasticSearch(prod ICloudProvider) bool
- func IsSupportInterVpcNetwork(prod ICloudProvider) bool
- func IsSupportKafka(prod ICloudProvider) bool
- func IsSupportLoadbalancer(prod ICloudProvider) bool
- func IsSupportMiscResources(prod ICloudProvider) bool
- func IsSupportModelartsPool(prod ICloudProvider) bool
- func IsSupportMongoDB(prod ICloudProvider) bool
- func IsSupportNAS(prod ICloudProvider) bool
- func IsSupportNAT(prod ICloudProvider) bool
- func IsSupportObjectstore(prod ICloudProvider) bool
- func IsSupportPolicyValue(v1 TDnsPolicyValue, arr []TDnsPolicyValue) bool
- func IsSupportProject(prod ICloudProvider) bool
- func IsSupportQuota(prod ICloudProvider) bool
- func IsSupportRds(prod ICloudProvider) bool
- func IsSupportSSLCertificate(prod ICloudProvider) bool
- func IsSupportTablestore(prod ICloudProvider) bool
- func IsSupportWaf(prod ICloudProvider) bool
- func IsSupported(provider string) bool
- func IsUEFI(ios IOSInfo) bool
- func Makedir(ctx context.Context, bucket ICloudBucket, key string) error
- func MergeMeta(src http.Header, dst http.Header) http.Header
- func MetaToHttpHeader(metaPrefix string, meta http.Header) http.Header
- func ObjectSetMeta(ctx context.Context, bucket ICloudBucket, obj ICloudObject, meta http.Header) error
- func RegisterFactory(factory ICloudProviderFactory)
- func RetryOnError(tryFunc func() error, errs []string, maxTries int) error
- func RetryUntil(tryFunc func() (bool, error), maxTries int) error
- func SetBucketCORS(ibucket ICloudBucket, rules []SBucketCORSRule) error
- func SetTags(ctx context.Context, res ICloudResource, managerId string, ...) error
- func UploadObject(ctx context.Context, bucket ICloudBucket, key string, blocksz int64, ...) error
- func Wait(interval time.Duration, timeout time.Duration, callback func() (bool, error)) error
- func WaitCreated(interval time.Duration, timeout time.Duration, callback func() bool) error
- func WaitDeleted(res ICloudResource, interval time.Duration, timeout time.Duration) error
- func WaitDeletedWithDelay(res ICloudResource, delay time.Duration, interval time.Duration, ...) error
- func WaitMultiStatus(res ICloudResource, expects []string, interval time.Duration, ...) error
- func WaitMultiStatusWithSync(res ICloudResource, expects []string, sync func(string), ...) error
- func WaitStatus(res ICloudResource, expect string, interval time.Duration, ...) error
- func WaitStatusWithDelay(res ICloudResource, expect string, delay time.Duration, interval time.Duration, ...) error
- func WaitStatusWithInstanceErrorCheck(res ICloudResource, expect string, interval time.Duration, ...) error
- func WaitStatusWithSync(res ICloudResource, expect string, sync func(status string), ...) error
- type AccessGroupRule
- type AccessGroupRuleInfo
- type AccessGroupRuleSet
- type AssociateConfig
- type Azs
- type CacheKeyRule
- type CacheKeyRuleQueryString
- type CacheRule
- type CdnCreateOptions
- type ChangeListenerSchedulerOptions
- type DefaultAction
- type DiskCreateConfig
- type DnsRecord
- type DummyICloudNic
- func (d DummyICloudNic) AssignAddress(ipAddrs []string) error
- func (d DummyICloudNic) AssignNAddress(count int) ([]string, error)
- func (d DummyICloudNic) GetDriver() string
- func (d DummyICloudNic) GetINetworkId() string
- func (d DummyICloudNic) GetIP() string
- func (d DummyICloudNic) GetId() string
- func (d DummyICloudNic) GetMAC() string
- func (d DummyICloudNic) GetSubAddress() ([]string, error)
- func (d DummyICloudNic) InClassicNetwork() bool
- func (d DummyICloudNic) UnassignAddress(ipAddrs []string) error
- type ElasticSearchAccessInfo
- type FileSystemCraeteOptions
- type GlobalVpcCreateOptions
- type GuestDiskCreateOptions
- type IBillingResource
- type ICloudAccessGroup
- type ICloudApp
- type ICloudAppEnvironment
- type ICloudBucket
- type ICloudCDNDomain
- type ICloudDBInstance
- type ICloudDBInstanceAccount
- type ICloudDBInstanceAccountPrivilege
- type ICloudDBInstanceBackup
- type ICloudDBInstanceDatabase
- type ICloudDBInstanceParameter
- type ICloudDBInstanceSku
- type ICloudDisk
- type ICloudDnsRecord
- type ICloudDnsZone
- type ICloudEIP
- type ICloudElasticSearch
- type ICloudElasticcache
- type ICloudElasticcacheAccount
- type ICloudElasticcacheAcl
- type ICloudElasticcacheBackup
- type ICloudElasticcacheParameter
- type ICloudElasticcacheSku
- type ICloudEnabledResource
- type ICloudEvent
- type ICloudFileSystem
- type ICloudGlobalVpc
- type ICloudHost
- type ICloudHostNetInterface
- type ICloudI18nResource
- type ICloudIPv6Gateway
- type ICloudImage
- type ICloudInstanceSnapshot
- type ICloudInterVpcNetwork
- type ICloudInterVpcNetworkRoute
- type ICloudInterfaceAddress
- type ICloudInternetGateway
- type ICloudKafka
- type ICloudKubeCluster
- type ICloudKubeNode
- type ICloudKubeNodePool
- type ICloudLoadbalancer
- type ICloudLoadbalancerAcl
- type ICloudLoadbalancerBackend
- type ICloudLoadbalancerBackendGroup
- type ICloudLoadbalancerCertificate
- type ICloudLoadbalancerListener
- type ICloudLoadbalancerListenerRule
- type ICloudLoadbalancerRedirect
- type ICloudMiscResource
- type ICloudModelartsPool
- type ICloudModelartsPoolSku
- type ICloudMongoDB
- type ICloudMountTarget
- type ICloudNatDEntry
- type ICloudNatGateway
- type ICloudNatSEntry
- type ICloudNatSku
- type ICloudNetwork
- type ICloudNetworkInterface
- type ICloudNic
- type ICloudObject
- func GetAllObjects(bucket ICloudBucket, objectPrefix string, isRecursive bool) ([]ICloudObject, error)
- func GetIObject(bucket ICloudBucket, objectPrefix string) (ICloudObject, error)
- func GetPagedObjects(bucket ICloudBucket, objectPrefix string, isRecursive bool, marker string, ...) ([]ICloudObject, string, error)
- type ICloudProject
- type ICloudProvider
- type ICloudProviderFactory
- type ICloudQuota
- type ICloudRegion
- type ICloudResource
- type ICloudRoute
- type ICloudRouteTable
- type ICloudSAMLProvider
- type ICloudSSLCertificate
- type ICloudSecurityGroup
- type ICloudSku
- type ICloudSnapshot
- type ICloudSnapshotPolicy
- type ICloudStorage
- type ICloudStoragecache
- type ICloudTablestore
- type ICloudVM
- type ICloudVpc
- type ICloudVpcPeeringConnection
- type ICloudWafIPSet
- type ICloudWafInstance
- type ICloudWafRegexSet
- type ICloudWafRule
- type ICloudWafRuleGroup
- type ICloudWire
- type ICloudZone
- type ICloudgroup
- type ICloudloadbalancerHealthCheck
- type ICloudpolicy
- type ICloudrole
- type IClouduser
- type IOSInfo
- type ISecurityGroupRule
- type IVirtualResource
- type KubeClusterCreateOptions
- type KubeNodePoolCreateOptions
- type ListenerAclOptions
- type ListenerCertificateOptions
- type ListenerHealthCheckOptions
- type ListenerStickySessionOptions
- type MetricListOptions
- type MetricValue
- type MetricValues
- type ModelartsPoolChangeConfigOptions
- type ModelartsPoolCreateOption
- type NatGatewayCreateOptions
- type ProviderConfig
- type RefererRule
- type RouteSet
- type RouteTableAssociation
- type RouteTableAssociationType
- type RouteTableType
- type RuleCacheConfig
- type SAMLProviderCreateOptions
- type SAWSExtraOptions
- type SAccessGroup
- type SAccessKey
- type SBalanceInfo
- type SBaseCloudObject
- type SBaseProvider
- func (self *SBaseProvider) CreateICloudCDNDomain(opts *CdnCreateOptions) (ICloudCDNDomain, error)
- func (self *SBaseProvider) CreateICloudDnsZone(opts *SDnsZoneCreateOptions) (ICloudDnsZone, error)
- func (self *SBaseProvider) CreateICloudGlobalVpc(opts *GlobalVpcCreateOptions) (ICloudGlobalVpc, error)
- func (self *SBaseProvider) CreateICloudInterVpcNetwork(opts *SInterVpcNetworkCreateOptions) (ICloudInterVpcNetwork, error)
- func (self *SBaseProvider) CreateICloudSAMLProvider(opts *SAMLProviderCreateOptions) (ICloudSAMLProvider, error)
- func (self *SBaseProvider) CreateICloudgroup(name, desc string) (ICloudgroup, error)
- func (self *SBaseProvider) CreateICloudpolicy(opts *SCloudpolicyCreateOptions) (ICloudpolicy, error)
- func (self *SBaseProvider) CreateICloudrole(opts *SRoleCreateOptions) (ICloudrole, error)
- func (self *SBaseProvider) CreateIClouduser(conf *SClouduserCreateConfig) (IClouduser, error)
- func (self *SBaseProvider) CreateIModelartsPool(pool *ModelartsPoolCreateOption, callback func(id string)) (ICloudModelartsPool, error)
- func (self *SBaseProvider) CreateIProject(name string) (ICloudProject, error)
- func (self *SBaseProvider) CreateSubscription(SubscriptionCreateInput) error
- func (self *SBaseProvider) GetCloudRegionExternalIdPrefix() string
- func (self *SBaseProvider) GetEnrollmentAccounts() ([]SEnrollmentAccount, error)
- func (provider *SBaseProvider) GetFactory() ICloudProviderFactory
- func (self *SBaseProvider) GetICloudCDNDomainByName(name string) (ICloudCDNDomain, error)
- func (self *SBaseProvider) GetICloudCDNDomains() ([]ICloudCDNDomain, error)
- func (self *SBaseProvider) GetICloudDnsZoneById(id string) (ICloudDnsZone, error)
- func (self *SBaseProvider) GetICloudDnsZones() ([]ICloudDnsZone, error)
- func (self *SBaseProvider) GetICloudGlobalVpcById(id string) (ICloudGlobalVpc, error)
- func (self *SBaseProvider) GetICloudGlobalVpcs() ([]ICloudGlobalVpc, error)
- func (self *SBaseProvider) GetICloudInterVpcNetworkById(id string) (ICloudInterVpcNetwork, error)
- func (self *SBaseProvider) GetICloudInterVpcNetworks() ([]ICloudInterVpcNetwork, error)
- func (self *SBaseProvider) GetICloudSAMLProviders() ([]ICloudSAMLProvider, error)
- func (self *SBaseProvider) GetICloudgroupByName(name string) (ICloudgroup, error)
- func (self *SBaseProvider) GetICloudgroups() ([]ICloudgroup, error)
- func (self *SBaseProvider) GetICloudroleById(id string) (ICloudrole, error)
- func (self *SBaseProvider) GetICloudroleByName(name string) (ICloudrole, error)
- func (self *SBaseProvider) GetICloudroles() ([]ICloudrole, error)
- func (self *SBaseProvider) GetIClouduserByName(name string) (IClouduser, error)
- func (self *SBaseProvider) GetICloudusers() ([]IClouduser, error)
- func (self *SBaseProvider) GetICustomCloudpolicies() ([]ICloudpolicy, error)
- func (self *SBaseProvider) GetIModelartsPoolById(id string) (ICloudModelartsPool, error)
- func (self *SBaseProvider) GetIModelartsPoolSku() ([]ICloudModelartsPoolSku, error)
- func (self *SBaseProvider) GetIModelartsPools() ([]ICloudModelartsPool, error)
- func (self *SBaseProvider) GetISSLCertificates() ([]ICloudSSLCertificate, error)
- func (self *SBaseProvider) GetISystemCloudpolicies() ([]ICloudpolicy, error)
- func (self *SBaseProvider) GetIamLoginUrl() string
- func (self *SBaseProvider) GetMetrics(opts *MetricListOptions) ([]MetricValues, error)
- func (self *SBaseProvider) GetOnPremiseIRegion() (ICloudRegion, error)
- func (self *SBaseProvider) GetSamlEntityId() string
- func (self *SBaseProvider) GetSamlSpInitiatedLoginUrl(idpName string) string
- func (self *SBaseProvider) IsClouduserSupportPassword() bool
- type SBucketAccessUrl
- type SBucketCORSRule
- type SBucketMultipartUploads
- type SBucketPolicyStatement
- type SBucketPolicyStatementInput
- type SBucketRefererConf
- type SBucketStats
- type SBucketWebsiteConf
- type SBucketWebsiteRoutingRule
- type SCDNCache
- type SCDNCacheKeys
- type SCDNForceRedirect
- type SCDNHttps
- type SCDNMaxAge
- type SCDNRangeOriginPull
- type SCDNReferer
- type SCacheRuleCache
- type SCdnDomain
- type SCdnOrigin
- type SCdnOrigins
- type SCloudElasticCacheAccountInput
- type SCloudElasticCacheAccountResetPasswordInput
- type SCloudElasticCacheAccountUpdateInput
- type SCloudElasticCacheBackupPolicyUpdateInput
- type SCloudElasticCacheFlushInstanceInput
- type SCloudElasticCacheInput
- type SCloudObject
- type SCloudResource
- type SCloudResources
- type SCloudaccount
- type SCloudaccountCredential
- type SCloudpolicyCreateOptions
- type SCloudpolicyPermission
- type SClouduserCreateConfig
- type SDBInstanceAccountCreateConfig
- type SDBInstanceBackupCreateConfig
- type SDBInstanceDatabaseCreateConfig
- type SDBInstanceNetwork
- type SDBInstancePrivilege
- type SDBInstanceRecoveryConfig
- type SDBInstanceUpdateOptions
- type SDefaultAccount
- type SDiskInfo
- type SDistDefaultAccount
- type SDnsCapability
- type SDnsZoneCreateOptions
- type SEip
- type SEnrollmentAccount
- type SExcludeRule
- type SExcludeRules
- type SExtraIp
- type SFakeOnPremiseRegion
- func (region *SFakeOnPremiseRegion) CreateEIP(eip *SEip) (ICloudEIP, error)
- func (region *SFakeOnPremiseRegion) CreateILoadBalancer(loadbalancer *SLoadbalancerCreateOptions) (ICloudLoadbalancer, error)
- func (region *SFakeOnPremiseRegion) CreateILoadBalancerAcl(acl *SLoadbalancerAccessControlList) (ICloudLoadbalancerAcl, error)
- func (region *SFakeOnPremiseRegion) CreateILoadBalancerCertificate(cert *SLoadbalancerCertificate) (ICloudLoadbalancerCertificate, error)
- func (region *SFakeOnPremiseRegion) CreateISecurityGroup(conf *SecurityGroupCreateInput) (ICloudSecurityGroup, error)
- func (region *SFakeOnPremiseRegion) CreateIVpc(opts *VpcCreateOptions) (ICloudVpc, error)
- func (region *SFakeOnPremiseRegion) GetCloudEnv() string
- func (region *SFakeOnPremiseRegion) GetGeographicInfo() SGeographicInfo
- func (region *SFakeOnPremiseRegion) GetGlobalId() string
- func (region *SFakeOnPremiseRegion) GetIEipById(id string) (ICloudEIP, error)
- func (region *SFakeOnPremiseRegion) GetIEips() ([]ICloudEIP, error)
- func (region *SFakeOnPremiseRegion) GetILoadBalancerAclById(aclId string) (ICloudLoadbalancerAcl, error)
- func (region *SFakeOnPremiseRegion) GetILoadBalancerAcls() ([]ICloudLoadbalancerAcl, error)
- func (region *SFakeOnPremiseRegion) GetILoadBalancerById(loadbalancerId string) (ICloudLoadbalancer, error)
- func (region *SFakeOnPremiseRegion) GetILoadBalancerCertificateById(certId string) (ICloudLoadbalancerCertificate, error)
- func (region *SFakeOnPremiseRegion) GetILoadBalancerCertificates() ([]ICloudLoadbalancerCertificate, error)
- func (region *SFakeOnPremiseRegion) GetILoadBalancers() ([]ICloudLoadbalancer, error)
- func (region *SFakeOnPremiseRegion) GetISecurityGroupById(id string) (ICloudSecurityGroup, error)
- func (region *SFakeOnPremiseRegion) GetIVpcById(id string) (ICloudVpc, error)
- func (region *SFakeOnPremiseRegion) GetIVpcs() ([]ICloudVpc, error)
- func (region *SFakeOnPremiseRegion) GetIZoneById(id string) (ICloudZone, error)
- func (region *SFakeOnPremiseRegion) GetIZones() ([]ICloudZone, error)
- func (region *SFakeOnPremiseRegion) GetId() string
- func (region *SFakeOnPremiseRegion) GetName() string
- func (region *SFakeOnPremiseRegion) GetStatus() string
- func (region *SFakeOnPremiseRegion) GetSysTags() map[string]string
- func (region *SFakeOnPremiseRegion) GetTags() (map[string]string, error)
- func (region *SFakeOnPremiseRegion) IsEmulated() bool
- func (region *SFakeOnPremiseRegion) Refresh() error
- func (region *SFakeOnPremiseRegion) SetTags(tags map[string]string, replace bool) error
- type SGeographicInfo
- type SGetObjectRange
- type SHCSOEndpoints
- type SImage
- type SImageCreateOption
- type SImageExportInfo
- type SImageExportOptions
- type SInstanceCapability
- type SInstanceDeployOptions
- type SInstanceType
- type SInstanceUpdateOptions
- type SInterVpcNetworkAttachVpcOption
- type SInterVpcNetworkCreateOptions
- type SInterVpcNetworkDetachVpcOption
- type SKafkaTopic
- type SKubeconfig
- type SListObjectResult
- type SLoadbalancerAccessControlList
- type SLoadbalancerAccessControlListEntry
- type SLoadbalancerBackend
- type SLoadbalancerBackendGroup
- type SLoadbalancerCertificate
- type SLoadbalancerCreateOptions
- type SLoadbalancerHealthCheck
- type SLoadbalancerListenerCreateOptions
- type SLoadbalancerListenerRule
- type SLoadbalancerStickySession
- type SManagedDBInstanceChangeConfig
- type SManagedDBInstanceCreateConfig
- type SManagedVMChangeConfig
- type SManagedVMCreateConfig
- type SManagedVMRebuildRootConfig
- type SMaxAgeRule
- type SModelI18nEntry
- type SModelI18nTable
- type SMongoDBBackup
- type SMongoDBBackups
- type SMountTargetCreateOptions
- type SNatDRule
- type SNatSRule
- type SNetworkCreateOptions
- type SOsDefaultAccount
- type SPremiseBaseProviderFactory
- func (factory *SPremiseBaseProviderFactory) GetAccountIdEqualizer() func(origin, now string) bool
- func (factory *SPremiseBaseProviderFactory) GetClouduserMinPolicyCount() int
- func (factory *SPremiseBaseProviderFactory) GetMaxCloudEventKeepDays() int
- func (factory *SPremiseBaseProviderFactory) GetMaxCloudEventSyncDays() int
- func (factory *SPremiseBaseProviderFactory) GetProvider(providerId, providerName, url, username, password string) (ICloudProvider, error)
- func (factory *SPremiseBaseProviderFactory) GetSupportedBrands() []string
- func (factory *SPremiseBaseProviderFactory) GetSupportedDnsPolicyTypes() map[TDnsZoneType][]TDnsPolicyType
- func (factory *SPremiseBaseProviderFactory) GetSupportedDnsPolicyValues() map[TDnsPolicyType][]TDnsPolicyValue
- func (factory *SPremiseBaseProviderFactory) GetSupportedDnsTypes() map[TDnsZoneType][]TDnsType
- func (factory *SPremiseBaseProviderFactory) GetSupportedDnsZoneTypes() []TDnsZoneType
- func (factory *SPremiseBaseProviderFactory) GetTTLRange(zoneType TDnsZoneType, productType TDnsProductType) TTlRange
- func (factory *SPremiseBaseProviderFactory) IsCloudeventRegional() bool
- func (factory *SPremiseBaseProviderFactory) IsCloudpolicyWithSubscription() bool
- func (factory *SPremiseBaseProviderFactory) IsClouduserNeedInitPolicy() bool
- func (factory *SPremiseBaseProviderFactory) IsClouduserpolicyWithSubscription() bool
- func (factory *SPremiseBaseProviderFactory) IsMultiTenant() bool
- func (factory *SPremiseBaseProviderFactory) IsNeedForceAutoCreateProject() bool
- func (factory *SPremiseBaseProviderFactory) IsOnPremise() bool
- func (factory *SPremiseBaseProviderFactory) IsPublicCloud() bool
- func (factory *SPremiseBaseProviderFactory) IsSupportCloudIdService() bool
- func (factory *SPremiseBaseProviderFactory) IsSupportClouduserPolicy() bool
- func (factory *SPremiseBaseProviderFactory) IsSupportCreateCloudgroup() bool
- func (factory *SPremiseBaseProviderFactory) IsSupportCrossCloudEnvVpcPeering() bool
- func (factory *SPremiseBaseProviderFactory) IsSupportCrossRegionVpcPeering() bool
- func (factory *SPremiseBaseProviderFactory) IsSupportModifyRouteTable() bool
- func (factory *SPremiseBaseProviderFactory) IsSupportPrepaidResources() bool
- func (factory *SPremiseBaseProviderFactory) IsSupportResetClouduserPassword() bool
- func (factory *SPremiseBaseProviderFactory) IsSupportSAMLAuth() bool
- func (factory *SPremiseBaseProviderFactory) IsSupportVpcPeeringVpcCidrOverlap() bool
- func (factory *SPremiseBaseProviderFactory) IsSystemCloudpolicyUnified() bool
- func (factory *SPremiseBaseProviderFactory) NeedSyncSkuFromCloud() bool
- func (factory *SPremiseBaseProviderFactory) ValidateChangeBandwidth(instanceId string, bandwidth int64) error
- func (factory *SPremiseBaseProviderFactory) ValidateCrossRegionVpcPeeringBandWidth(bandwidth int) error
- type SPrivateCloudBaseProviderFactory
- func (factory *SPrivateCloudBaseProviderFactory) GetAccountIdEqualizer() func(origin, now string) bool
- func (factory *SPrivateCloudBaseProviderFactory) GetClouduserMinPolicyCount() int
- func (factory *SPrivateCloudBaseProviderFactory) GetMaxCloudEventKeepDays() int
- func (factory *SPrivateCloudBaseProviderFactory) GetMaxCloudEventSyncDays() int
- func (factory *SPrivateCloudBaseProviderFactory) GetProvider(providerId, providerName, url, username, password string) (ICloudProvider, error)
- func (factory *SPrivateCloudBaseProviderFactory) GetSupportedBrands() []string
- func (factory *SPrivateCloudBaseProviderFactory) GetSupportedDnsPolicyTypes() map[TDnsZoneType][]TDnsPolicyType
- func (factory *SPrivateCloudBaseProviderFactory) GetSupportedDnsPolicyValues() map[TDnsPolicyType][]TDnsPolicyValue
- func (factory *SPrivateCloudBaseProviderFactory) GetSupportedDnsTypes() map[TDnsZoneType][]TDnsType
- func (factory *SPrivateCloudBaseProviderFactory) GetSupportedDnsZoneTypes() []TDnsZoneType
- func (factory *SPrivateCloudBaseProviderFactory) GetTTLRange(zoneType TDnsZoneType, productType TDnsProductType) TTlRange
- func (factory *SPrivateCloudBaseProviderFactory) IsCloudeventRegional() bool
- func (factory *SPrivateCloudBaseProviderFactory) IsCloudpolicyWithSubscription() bool
- func (factory *SPrivateCloudBaseProviderFactory) IsClouduserNeedInitPolicy() bool
- func (factory *SPrivateCloudBaseProviderFactory) IsClouduserpolicyWithSubscription() bool
- func (factory *SPrivateCloudBaseProviderFactory) IsMultiTenant() bool
- func (factory *SPrivateCloudBaseProviderFactory) IsNeedForceAutoCreateProject() bool
- func (factory *SPrivateCloudBaseProviderFactory) IsOnPremise() bool
- func (factory *SPrivateCloudBaseProviderFactory) IsPublicCloud() bool
- func (factory *SPrivateCloudBaseProviderFactory) IsSupportCloudIdService() bool
- func (factory *SPrivateCloudBaseProviderFactory) IsSupportClouduserPolicy() bool
- func (factory *SPrivateCloudBaseProviderFactory) IsSupportCreateCloudgroup() bool
- func (factory *SPrivateCloudBaseProviderFactory) IsSupportCrossCloudEnvVpcPeering() bool
- func (factory *SPrivateCloudBaseProviderFactory) IsSupportCrossRegionVpcPeering() bool
- func (factory *SPrivateCloudBaseProviderFactory) IsSupportModifyRouteTable() bool
- func (factory *SPrivateCloudBaseProviderFactory) IsSupportPrepaidResources() bool
- func (factory *SPrivateCloudBaseProviderFactory) IsSupportResetClouduserPassword() bool
- func (factory *SPrivateCloudBaseProviderFactory) IsSupportSAMLAuth() bool
- func (factory *SPrivateCloudBaseProviderFactory) IsSupportVpcPeeringVpcCidrOverlap() bool
- func (factory *SPrivateCloudBaseProviderFactory) IsSystemCloudpolicyUnified() bool
- func (factory *SPrivateCloudBaseProviderFactory) NeedSyncSkuFromCloud() bool
- func (factory *SPrivateCloudBaseProviderFactory) ValidateChangeBandwidth(instanceId string, bandwidth int64) error
- func (factory *SPrivateCloudBaseProviderFactory) ValidateCrossRegionVpcPeeringBandWidth(bandwidth int) error
- type SPrivateZoneVpc
- type SProviderInfo
- type SPublicCloudBaseProviderFactory
- func (factory *SPublicCloudBaseProviderFactory) GetAccountIdEqualizer() func(origin, now string) bool
- func (factory *SPublicCloudBaseProviderFactory) GetClouduserMinPolicyCount() int
- func (factory *SPublicCloudBaseProviderFactory) GetMaxCloudEventKeepDays() int
- func (factory *SPublicCloudBaseProviderFactory) GetMaxCloudEventSyncDays() int
- func (factory *SPublicCloudBaseProviderFactory) GetProvider(providerId, providerName, url, username, password string) (ICloudProvider, error)
- func (factory *SPublicCloudBaseProviderFactory) GetSupportedBrands() []string
- func (factory *SPublicCloudBaseProviderFactory) GetSupportedDnsPolicyTypes() map[TDnsZoneType][]TDnsPolicyType
- func (factory *SPublicCloudBaseProviderFactory) GetSupportedDnsPolicyValues() map[TDnsPolicyType][]TDnsPolicyValue
- func (factory *SPublicCloudBaseProviderFactory) GetSupportedDnsTypes() map[TDnsZoneType][]TDnsType
- func (factory *SPublicCloudBaseProviderFactory) GetSupportedDnsZoneTypes() []TDnsZoneType
- func (factory *SPublicCloudBaseProviderFactory) GetTTLRange(zoneType TDnsZoneType, productType TDnsProductType) TTlRange
- func (factory *SPublicCloudBaseProviderFactory) IsCloudeventRegional() bool
- func (factory *SPublicCloudBaseProviderFactory) IsCloudpolicyWithSubscription() bool
- func (factory *SPublicCloudBaseProviderFactory) IsClouduserNeedInitPolicy() bool
- func (factory *SPublicCloudBaseProviderFactory) IsClouduserpolicyWithSubscription() bool
- func (factory *SPublicCloudBaseProviderFactory) IsMultiTenant() bool
- func (factory *SPublicCloudBaseProviderFactory) IsNeedForceAutoCreateProject() bool
- func (factory *SPublicCloudBaseProviderFactory) IsOnPremise() bool
- func (factory *SPublicCloudBaseProviderFactory) IsPublicCloud() bool
- func (factory *SPublicCloudBaseProviderFactory) IsSupportCloudIdService() bool
- func (factory *SPublicCloudBaseProviderFactory) IsSupportClouduserPolicy() bool
- func (factory *SPublicCloudBaseProviderFactory) IsSupportCreateCloudgroup() bool
- func (factory *SPublicCloudBaseProviderFactory) IsSupportCrossCloudEnvVpcPeering() bool
- func (factory *SPublicCloudBaseProviderFactory) IsSupportCrossRegionVpcPeering() bool
- func (factory *SPublicCloudBaseProviderFactory) IsSupportModifyRouteTable() bool
- func (factory *SPublicCloudBaseProviderFactory) IsSupportPrepaidResources() bool
- func (factory *SPublicCloudBaseProviderFactory) IsSupportResetClouduserPassword() bool
- func (factory *SPublicCloudBaseProviderFactory) IsSupportSAMLAuth() bool
- func (factory *SPublicCloudBaseProviderFactory) IsSupportVpcPeeringVpcCidrOverlap() bool
- func (factory *SPublicCloudBaseProviderFactory) IsSystemCloudpolicyUnified() bool
- func (factory *SPublicCloudBaseProviderFactory) NeedSyncSkuFromCloud() bool
- func (factory *SPublicCloudBaseProviderFactory) ValidateChangeBandwidth(instanceId string, bandwidth int64) error
- func (factory *SPublicCloudBaseProviderFactory) ValidateCrossRegionVpcPeeringBandWidth(bandwidth int) error
- type SPublicIpInfo
- type SRangeOriginPullRule
- type SRoleCreateOptions
- type SServerSku
- type SServerSkuCreateOption
- type SSubAccount
- type SSubImage
- type SVpcJointInterVpcNetworkOption
- type SWafRule
- type SWafStatement
- type SWireCreateOptions
- type SZoneInfo
- type SaveImageOptions
- type SecurityGroupCreateInput
- type SecurityGroupReference
- type SecurityGroupRuleCreateOptions
- type SecurityGroupRuleUpdateOptions
- type ServerStopOptions
- type ServerVncInput
- type ServerVncOutput
- type SnapshotPolicyInput
- type Storage
- type StorageInfo
- type SubAccounts
- type SubscriptionCreateInput
- type TBackupMethod
- type TBiosType
- type TBucketACLType
- type TCloudResources
- type TDnsPolicyType
- type TDnsPolicyValue
- type TDnsProductType
- type TDnsTTLRangeType
- type TDnsType
- type TDnsZoneType
- type TElasticipChargeType
- type TGlobalIdResource
- type TImageType
- type TMetricType
- type TMongoDBBackupMethod
- type TMongoDBBackupStatus
- type TMongoDBBackupType
- type TOsType
- type TRWAccessType
- type TResourceType
- type TTlRange
- type TUserAccessType
- type TWafAction
- type TWafMatchField
- type TWafMatchFieldValues
- type TWafOperator
- type TWafStatementCondition
- type TWafStatementType
- type TWafTextTransformation
- type TWafType
- type TagsUpdateInfo
- type TextTransformations
- type VpcCreateOptions
- type VpcPeeringConnectionCreateOptions
- type WafAddresses
- type WafCreateOptions
- type WafRegexPatterns
- type WafSourceIps
Constants ¶
const ( RWAccessTypeRW = TRWAccessType("RW") RWAccessTypeR = TRWAccessType("R") UserAccessTypeNoRootSquash = TUserAccessType("no_root_squash") UserAccessTypeRootSquash = TUserAccessType("root_squash") UserAccessTypeAllSquash = TUserAccessType("all_squash") )
const ( CloudVMStatusRunning = "running" CloudVMStatusStopping = "stopping" CloudVMStatusSuspend = "suspend" CloudVMStatusStopped = "stopped" CloudVMStatusChangeFlavor = "change_flavor" CloudVMStatusDeploying = "deploying" CloudVMStatusOther = "other" )
const ( READ_ONLY_SUFFIX = ".readonly" CLOUD_CAPABILITY_PROJECT = "project" CLOUD_CAPABILITY_COMPUTE = "compute" CLOUD_CAPABILITY_NETWORK = "network" CLOUD_CAPABILITY_SECURITY_GROUP = "security_group" CLOUD_CAPABILITY_EIP = "eip" CLOUD_CAPABILITY_SNAPSHOT_POLICY = "snapshot_policy" CLOUD_CAPABILITY_LOADBALANCER = "loadbalancer" CLOUD_CAPABILITY_OBJECTSTORE = "objectstore" CLOUD_CAPABILITY_RDS = "rds" CLOUD_CAPABILITY_CACHE = "cache" // 弹性缓存包含redis、memcached CLOUD_CAPABILITY_EVENT = "event" CLOUD_CAPABILITY_CLOUDID = "cloudid" CLOUD_CAPABILITY_DNSZONE = "dnszone" CLOUD_CAPABILITY_PUBLIC_IP = "public_ip" CLOUD_CAPABILITY_INTERVPCNETWORK = "intervpcnetwork" CLOUD_CAPABILITY_SAML_AUTH = "saml_auth" // 是否支持SAML 2.0 CLOUD_CAPABILITY_QUOTA = "quota" // 配额 CLOUD_CAPABILITY_NAT = "nat" // NAT网关 CLOUD_CAPABILITY_NAS = "nas" // NAS CLOUD_CAPABILITY_WAF = "waf" // WAF CLOUD_CAPABILITY_MONGO_DB = "mongodb" // MongoDB CLOUD_CAPABILITY_ES = "es" // ElasticSearch CLOUD_CAPABILITY_KAFKA = "kafka" // Kafka CLOUD_CAPABILITY_APP = "app" // App CLOUD_CAPABILITY_CDN = "cdn" // CDN CLOUD_CAPABILITY_CONTAINER = "container" // 容器 CLOUD_CAPABILITY_IPV6_GATEWAY = "ipv6_gateway" // IPv6网关 CLOUD_CAPABILITY_TABLESTORE = "tablestore" // 表格存储 CLOUD_CAPABILITY_MODELARTES = "modelarts" CLOUD_CAPABILITY_VPC_PEER = "vpcpeer" // 对等连接 CLOUD_CAPABILITY_MISC = "misc" CLOUD_CAPABILITY_CERT = "sslcertificates" // 证书 )
const ( CLOUD_ENV_PUBLIC_CLOUD = "public" CLOUD_ENV_PRIVATE_CLOUD = "private" CLOUD_ENV_ON_PREMISE = "onpremise" CLOUD_ENV_PRIVATE_ON_PREMISE = "private_or_onpremise" )
const ( BackupMethodLogical = TBackupMethod("Logical") BackupMethodPhysical = TBackupMethod("Physical") BackupMethodUnknown = TBackupMethod("") )
const ( PublicZone = TDnsZoneType("PublicZone") PrivateZone = TDnsZoneType("PrivateZone") )
const ( ContinuousTTlRange = TDnsTTLRangeType("ContinuousTTlRange") DiscreteTTlRange = TDnsTTLRangeType("DiscreteTTlRange") )
const ( DnsPolicyTypeSimple = TDnsPolicyType("Simple") //简单 DnsPolicyTypeByCarrier = TDnsPolicyType("ByCarrier") //运营商 DnsPolicyTypeByGeoLocation = TDnsPolicyType("ByGeoLocation") //地理区域 DnsPolicyTypeBySearchEngine = TDnsPolicyType("BySearchEngine") //搜索引擎 DnsPolicyTypeIpRange = TDnsPolicyType("IpRange") //自定义IP范围 DnsPolicyTypeWeighted = TDnsPolicyType("Weighted") //加权 DnsPolicyTypeFailover = TDnsPolicyType("Failover") //故障转移 DnsPolicyTypeMultiValueAnswer = TDnsPolicyType("MultiValueAnswer") //多值应答 DnsPolicyTypeLatency = TDnsPolicyType("Latency") //延迟 )
const ( DnsTypeA = TDnsType("A") DnsTypeAAAA = TDnsType("AAAA") DnsTypeCAA = TDnsType("CAA") DnsTypeCNAME = TDnsType("CNAME") DnsTypeMX = TDnsType("MX") DnsTypeNS = TDnsType("NS") DnsTypeSRV = TDnsType("SRV") DnsTypeSOA = TDnsType("SOA") DnsTypeTXT = TDnsType("TXT") DnsTypePTR = TDnsType("PTR") DnsTypeDS = TDnsType("DS") DnsTypeDNSKEY = TDnsType("DNSKEY") DnsTypeIPSECKEY = TDnsType("IPSECKEY") DnsTypeNAPTR = TDnsType("NAPTR") DnsTypeSPF = TDnsType("SPF") DnsTypeSSHFP = TDnsType("SSHFP") DnsTypeTLSA = TDnsType("TLSA") DnsTypeREDIRECT_URL = TDnsType("REDIRECT_URL") //显性URL转发 DnsTypeFORWARD_URL = TDnsType("FORWARD_URL") //隐性URL转发 )
const ( DnsProductEnterpriseUltimate = TDnsProductType("DP_EnterpriseUltimate") DnsProductEnterpriseStandard = TDnsProductType("DP_EnterpriseStandard") DnsProductEnterpriseBasic = TDnsProductType("DP_EnterpriseBasic") DnsProductPersonalProfessional = TDnsProductType("DP_PersonalProfessional") DnsProductFree = TDnsProductType("DP_Free") )
const ( ErrMissingParameter = errors.Error("MissingParameterError") ErrInputParameter = errors.Error("InputParameterError") ErrInvalidProvider = errors.Error("InvalidProvider") ErrNoBalancePermission = errors.Error("NoBalancePermission") ErrForbidden = errors.Error("ForbiddenError") ErrTooLarge = errors.Error("TooLargeEntity") ErrUnsupportedProtocol = errors.Error("UnsupportedProtocol") ErrInvalidAccessKey = errors.Error("InvalidAccessKey") ErrNoPermission = errors.Error("NoPermission") ErrNoSuchProvder = errors.Error("no such provider") ErrTooManyRequests = errors.Error("TooManyRequests") ErrInvalidSku = errors.Error("InvalidSku") ErrNotFound = errors.ErrNotFound ErrDuplicateId = errors.ErrDuplicateId ErrInvalidStatus = errors.ErrInvalidStatus ErrTimeout = errors.ErrTimeout ErrNotImplemented = errors.ErrNotImplemented ErrNotSupported = errors.ErrNotSupported ErrAccountReadOnly = errors.ErrAccountReadOnly ErrUnknown = errors.Error("UnknownError") )
const ( IMAGE_STATUS_ACTIVE = "active" IMAGE_STATUS_QUEUED = "queued" IMAGE_STATUS_SAVING = "saving" IMAGE_STATUS_KILLED = "killed" IMAGE_STATUS_DELETED = "deleted" ImageTypeSystem = TImageType("system") ImageTypeCustomized = TImageType("customized") ImageTypeMarket = TImageType("market") )
const ( CLOUD_SHELL = "cloud-shell" CLOUD_SHELL_WITHOUT_ENCRYPT = "cloud-shell-without-encrypt" CLOUD_CONFIG = "cloud-config" CLOUD_POWER_SHELL = "powershell" CLOUD_EC2 = "ec2" )
const ( MongoDBBackupStatusCreating = TMongoDBBackupStatus("creating") MongoDBBackupStatusAvailable = TMongoDBBackupStatus("available") MongoDBBackupStatusFailed = TMongoDBBackupStatus("failed") MongoDBBackupStatusUnknown = TMongoDBBackupStatus("unknown") MongoDBBackupMethodPhysical = TMongoDBBackupMethod("physical") MongoDBBackupMethodLogical = TMongoDBBackupMethod("logical") MongoDBBackupTypeAuto = TMongoDBBackupType("auto") MongoDBBackupTypeManual = TMongoDBBackupType("manual") )
const ( // 50 MB MAX_PUT_OBJECT_SIZEBYTES = int64(1024 * 1024 * 50) ACLPrivate = TBucketACLType(s3cli.CANNED_ACL_PRIVATE) ACLAuthRead = TBucketACLType(s3cli.CANNED_ACL_AUTH_READ) ACLPublicRead = TBucketACLType(s3cli.CANNED_ACL_PUBLIC_READ) ACLPublicReadWrite = TBucketACLType(s3cli.CANNED_ACL_PUBLIC_READ_WRITE) ACLUnknown = TBucketACLType("") META_HEADER_CACHE_CONTROL = "Cache-Control" META_HEADER_CONTENT_TYPE = "Content-Type" META_HEADER_CONTENT_DISPOSITION = "Content-Disposition" META_HEADER_CONTENT_ENCODING = "Content-Encoding" META_HEADER_CONTENT_LANGUAGE = "Content-Language" META_HEADER_CONTENT_MD5 = "Content-MD5" META_HEADER_PREFIX = "X-Yunion-Meta-" )
const ( RouteTableAssociaToRouter = RouteTableAssociationType("Router") RouteTableAssociaToSubnet = RouteTableAssociationType("Subnet") )
const ( RouteTableTypeSystem = RouteTableType("System") RouteTableTypeCustom = RouteTableType("Custom") )
const ( SAML_ENTITY_ID_ALIYUN_ROLE = "urn:alibaba:cloudcomputing" SAML_ENTITY_ID_AWS_CN = "urn:amazon:webservices:cn-north-1" SAML_ENTITY_ID_AWS = "urn:amazon:webservices" SAML_ENTITY_ID_QCLOUD = "cloud.tencent.com" SAML_ENTITY_ID_HUAWEI_CLOUD = "https://auth.huaweicloud.com/" SAML_ENTITY_ID_GOOGLE = "google.com" SAML_ENTITY_ID_AZURE = "urn:federation:MicrosoftOnline" )
const ErrAddressCountExceed = errors.Error("ErrAddressCountExceed")
const (
SET_TAGS = "set-tags"
)
Variables ¶
var ( DnsPolicyValueEmpty = TDnsPolicyValue("") DnsPolicyValueUnicom = TDnsPolicyValue("unicom") DnsPolicyValueTelecom = TDnsPolicyValue("telecom") DnsPolicyValueChinaMobile = TDnsPolicyValue("chinamobile") DnsPolicyValueCernet = TDnsPolicyValue("cernet") DnsPolicyValueDrPeng = TDnsPolicyValue("drpeng") DnsPolicyValueBtvn = TDnsPolicyValue("btvn") DnsPolicyValueOversea = TDnsPolicyValue("oversea") DnsPolicyValueMainland = TDnsPolicyValue("mainland") DnsPolicyValueNAmerica = TDnsPolicyValue("os_namerica") DnsPolicyValueEuro = TDnsPolicyValue("os_euro") DnsPolicyValueBaidu = TDnsPolicyValue("baidu") DnsPolicyValueGoogle = TDnsPolicyValue("google") DnsPolicyValueBing = TDnsPolicyValue("bing") DnsPolicyValueYoudao = TDnsPolicyValue("youdao") DnsPolicyValueSousou = TDnsPolicyValue("sousou") DnsPolicyValueSougou = TDnsPolicyValue("sougou") DnsPolicyValueQihu360 = TDnsPolicyValue("qihu360") )
var ( ElasticipChargeTypeByTraffic = TElasticipChargeType("traffic") ElasticipChargeTypeByBandwidth = TElasticipChargeType("bandwidth") )
var ( OsTypeLinux = TOsType(osprofile.OS_TYPE_LINUX) OsTypeWindows = TOsType(osprofile.OS_TYPE_WINDOWS) )
var ( BIOS = TBiosType("BIOS") UEFI = TBiosType("UEFI") )
var ( ALL_RDS_METRIC_TYPES = []TMetricType{ RDS_METRIC_TYPE_CPU_USAGE, RDS_METRIC_TYPE_MEM_USAGE, RDS_METRIC_TYPE_NET_BPS_RX, RDS_METRIC_TYPE_NET_BPS_TX, RDS_METRIC_TYPE_DISK_USAGE, RDS_METRIC_TYPE_DISK_READ_BPS, RDS_METRIC_TYPE_DISK_WRITE_BPS, RDS_METRIC_TYPE_DISK_IO_PERCENT, RDS_METRIC_TYPE_CONN_COUNT, RDS_METRIC_TYPE_CONN_ACTIVE, RDS_METRIC_TYPE_CONN_USAGE, RDS_METRIC_TYPE_CONN_FAILED, RDS_METRIC_TYPE_QPS, RDS_METRIC_TYPE_TPS, RDS_METRIC_TYPE_INNODB_READ_BPS, RDS_METRIC_TYPE_INNODB_WRITE_BPS, } ALL_HOST_METRIC_TYPES = []TMetricType{ HOST_METRIC_TYPE_CPU_USAGE, HOST_METRIC_TYPE_MEM_USAGE, HOST_METRIC_TYPE_DISK_IO_READ_BPS, HOST_METRIC_TYPE_DISK_IO_WRITE_BPS, HOST_METRIC_TYPE_NET_BPS_RX, HOST_METRIC_TYPE_NET_BPS_TX, } ALL_VM_METRIC_TYPES = []TMetricType{ VM_METRIC_TYPE_CPU_USAGE, VM_METRIC_TYPE_MEM_USAGE, VM_METRIC_TYPE_DISK_USAGE, VM_METRIC_TYPE_DISK_IO_READ_BPS, VM_METRIC_TYPE_DISK_IO_WRITE_BPS, VM_METRIC_TYPE_DISK_IO_READ_IOPS, VM_METRIC_TYPE_DISK_IO_WRITE_IOPS, VM_METRIC_TYPE_NET_BPS_RX, VM_METRIC_TYPE_NET_BPS_TX, VM_METRIC_TYPE_NET_TCP_CONNECTION, VM_METRIC_TYPE_PROCESS_NUMBER, } ALL_REDIS_METRIC_TYPES = []TMetricType{ REDIS_METRIC_TYPE_CPU_USAGE, REDIS_METRIC_TYPE_MEM_USAGE, REDIS_METRIC_TYPE_NET_BPS_RX, REDIS_METRIC_TYPE_NET_BPS_TX, REDIS_METRIC_TYPE_USED_CONN, REDIS_METRIC_TYPE_OPT_SES, REDIS_METRIC_TYPE_CACHE_KEYS, REDIS_METRIC_TYPE_CACHE_EXP_KEYS, REDIS_METRIC_TYPE_DATA_MEM_USAGE, } ALL_LB_METRIC_TYPES = []TMetricType{ LB_METRIC_TYPE_SNAT_PORT, LB_METRIC_TYPE_SNAT_CONN_COUNT, LB_METRIC_TYPE_NET_BPS_RX, LB_METRIC_TYPE_NET_BPS_TX, LB_METRIC_TYPE_HRSP_COUNT, LB_METRIC_TYPE_NET_PACKET_RX, LB_METRIC_TYPE_NET_PACKET_TX, LB_METRIC_TYPE_UNHEALTHY_SERVER_COUNT, LB_METRIC_TYPE_NET_INACTIVE_CONNECTION, LB_METRIC_TYPE_MAX_CONNECTION, LB_METRIC_TYPE_DROP_PACKET_RX, LB_METRIC_TYPE_DROP_PACKET_TX, LB_METRIC_TYPE_DROP_TRAFFIC_RX, LB_METRIC_TYPE_DROP_TRAFFIC_TX, } ALL_BUCKET_TYPES = []TMetricType{ BUCKET_METRIC_TYPE_NET_BPS_TX, BUCKET_METRIC_TYPE_NET_BPS_RX, BUCKET_METRIC_TYPE_LATECY, BUCKET_METRYC_TYPE_REQ_COUNT, BUCKET_METRIC_TYPE_REQ_5XX_COUNT, BUCKET_METRIC_TYPE_REQ_4XX_COUNT, BUCKET_METRIC_TYPE_REQ_3XX_COUNT, BUCKET_METRIC_TYPE_REQ_2XX_COUNT, BUCKET_METRIC_TYPE_STORAGE_SIZE, } ALL_K8S_NODE_TYPES = []TMetricType{ K8S_NODE_METRIC_TYPE_CPU_USAGE, K8S_NODE_METRIC_TYPE_MEM_USAGE, } ALL_EIP_TYPES = []TMetricType{ EIP_METRIC_TYPE_NET_BPS_RX, EIP_METRIC_TYPE_NET_BPS_TX, EIP_METRIC_TYPE_NET_DROP_SPEED_TX, } )
var ( WafTypeCloudFront = TWafType("CloudFront") WafTypeRegional = TWafType("Regional") WafTypeDefault = TWafType("Default") WafTypeAppGateway = TWafType("AppGateway") WafStatementTypeByteMatch = TWafStatementType("ByteMatch") WafStatementTypeGeoMatch = TWafStatementType("GeoMatch") WafStatementTypeIPSet = TWafStatementType("IPSet") WafStatementTypeLabelMatch = TWafStatementType("LabelMatch") WafStatementTypeManagedRuleGroup = TWafStatementType("ManagedRuleGroup") WafStatementTypeRate = TWafStatementType("Rate") WafStatementTypeRegexSet = TWafStatementType("RegexSet") WafStatementTypeRuleGroup = TWafStatementType("RuleGroup") WafStatementTypeSize = TWafStatementType("Size") WafStatementTypeSqliMatch = TWafStatementType("SqliMatch") WafStatementTypeXssMatch = TWafStatementType("XssMatch") WafStatementConditionAnd = TWafStatementCondition("And") WafStatementConditionOr = TWafStatementCondition("Or") WafStatementConditionNot = TWafStatementCondition("Not") WafStatementConditionNone = TWafStatementCondition("") WafActionAllow = TWafAction("Allow") WafActionBlock = TWafAction("Block") WafActionLog = TWafAction("Log") WafActionCount = TWafAction("Count") WafActionAlert = TWafAction("Alert") WafActionDetection = TWafAction("Detection") WafActionPrevention = TWafAction("Prevention") WafActionNone = TWafAction("") WafMatchFieldBody = TWafMatchField("Body") WafMatchFieldJsonBody = TWafMatchField("JsonBody") WafMatchFieldQuery = TWafMatchField("Query") WafMatchFieldMethod = TWafMatchField("Method") WafMatchFiledHeader = TWafMatchField("Header") WafMatchFiledUriPath = TWafMatchField("UriPath") WafMatchFiledPostArgs = TWafMatchField("PostArgs") WafMatchFiledCookie = TWafMatchField("Cookie") // size WafOperatorEQ = TWafOperator("EQ") WafOperatorNE = TWafOperator("NE") WafOperatorLE = TWafOperator("LE") WafOperatorLT = TWafOperator("LT") WafOperatorGE = TWafOperator("GE") WafOperatorGT = TWafOperator("GT") // string WafOperatorExactly = TWafOperator("Exactly") WafOperatorStartsWith = TWafOperator("StartsWith") WafOperatorEndsWith = TWafOperator("EndsWith") WafOperatorContains = TWafOperator("Contains") WafOperatorContainsWord = TWafOperator("ContainsWord") WafOperatorRegex = TWafOperator("Regex") WafTextTransformationNone = TWafTextTransformation("") WafTextTransformationCompressWithSpace = TWafTextTransformation("CompressWithSpace") WafTextTransformationHtmlEntityDecode = TWafTextTransformation("HtmlEntityDecode") WafTextTransformationLowercase = TWafTextTransformation("Lowercase") WafTextTransformationCmdLine = TWafTextTransformation("CmdLine") WafTextTransformationUrlDecode = TWafTextTransformation("UrlDecode") // azure WafTextTransformationTrim = TWafTextTransformation("Trim") WafTextTransformationUrlEncode = TWafTextTransformation("UrlEncode") WafTextTransformationRemoveNulls = TWafTextTransformation("RemoveNulls") )
var AwsFailovers = []TDnsPolicyValue{ TDnsPolicyValue("PRIMARY"), TDnsPolicyValue("SECONDARY"), }
var AwsGeoLocations = []TDnsPolicyValue{}/* 305 elements not displayed */
var AwsRegions = []TDnsPolicyValue{ TDnsPolicyValue("us-east-2"), TDnsPolicyValue("us-east-1"), TDnsPolicyValue("us-west-1"), TDnsPolicyValue("us-west-2"), TDnsPolicyValue("af-south-1"), TDnsPolicyValue("ap-east-1"), TDnsPolicyValue("ap-south-1"), TDnsPolicyValue("ap-northeast-3"), TDnsPolicyValue("ap-northeast-2"), TDnsPolicyValue("ap-southeast-1"), TDnsPolicyValue("ap-southeast-2"), TDnsPolicyValue("ap-northeast-1"), TDnsPolicyValue("ca-central-1"), TDnsPolicyValue("cn-north-1"), TDnsPolicyValue("cn-northwest-1"), TDnsPolicyValue("eu-central-1"), TDnsPolicyValue("eu-west-1"), TDnsPolicyValue("eu-west-2"), TDnsPolicyValue("eu-south-1"), TDnsPolicyValue("eu-west-3"), TDnsPolicyValue("eu-north-1"), TDnsPolicyValue("me-south-1"), TDnsPolicyValue("sa-east-1"), TDnsPolicyValue("us-gov-east-1"), TDnsPolicyValue("us-gov-west-1"), }
var ( SUPPORTED_DNS_TYPES = []TDnsType{ DnsTypeA, DnsTypeAAAA, DnsTypeCAA, DnsTypeCNAME, DnsTypeMX, DnsTypeNS, DnsTypeSRV, DnsTypeSOA, DnsTypeTXT, DnsTypePTR, DnsTypeDS, DnsTypeDNSKEY, DnsTypeIPSECKEY, DnsTypeNAPTR, DnsTypeSPF, DnsTypeSSHFP, DnsTypeTLSA, DnsTypeREDIRECT_URL, DnsTypeFORWARD_URL, } )
var TtlRangeAliyunEnterpriseStandard = TTlRange{RangeType: ContinuousTTlRange, TTLMinValue: 60, TTLMaxValue: 86400}
var TtlRangeAliyunEnterpriseUltimate = TTlRange{RangeType: ContinuousTTlRange, TTLMinValue: 1, TTLMaxValue: 86400}
var TtlRangeAliyunFree = TTlRange{RangeType: ContinuousTTlRange, TTLMinValue: 600, TTLMaxValue: 86400}
var TtlRangeAliyunPersonal = TTlRange{RangeType: ContinuousTTlRange, TTLMinValue: 600, TTLMaxValue: 86400}
var TtlRangeAliyunPvtz = TTlRange{RangeType: DiscreteTTlRange, AllowedTTLs: []int64{5, 10, 15, 20, 30, 60, 120, 300, 600, 1800, 3600, 43200, 86400}}
var TtlRangeQcloudEnterpriseBasic = TTlRange{RangeType: ContinuousTTlRange, TTLMinValue: 60, TTLMaxValue: 604800}
var TtlRangeQcloudEnterpriseStandard = TTlRange{RangeType: ContinuousTTlRange, TTLMinValue: 30, TTLMaxValue: 604800}
var TtlRangeQcloudEnterpriseUltimate = TTlRange{RangeType: ContinuousTTlRange, TTLMinValue: 1, TTLMaxValue: 604800}
var TtlRangeQcloudFree = TTlRange{RangeType: ContinuousTTlRange, TTLMinValue: 600, TTLMaxValue: 604800}
var TtlRangeQcloudPersonalProfessional = TTlRange{RangeType: ContinuousTTlRange, TTLMinValue: 120, TTLMaxValue: 604800}
Functions ¶
func CopyObject ¶
func CopyPart ¶
func CopyPart(ctx context.Context, iDstBucket ICloudBucket, dstKey string, uploadId string, partNumber int, iSrcBucket ICloudBucket, srcKey string, rangeOpt *SGetObjectRange, ) (string, error)
func DeletePrefix ¶
func DeletePrefix(ctx context.Context, bucket ICloudBucket, prefix string) error
func FetchMetaFromHttpHeader ¶
func GetCheckTransport ¶
func GetClientRC ¶
func GetClientRC(provider string, info SProviderInfo) (map[string]string, error)
func GetClouduserpolicyWithSubscriptionProviders ¶
func GetClouduserpolicyWithSubscriptionProviders() []string
func GetDnsCapabilities ¶
func GetDnsCapabilities() map[string]SDnsCapability
func GetOnPremiseProviders ¶
func GetOnPremiseProviders() []string
func GetPrivateProviders ¶
func GetPrivateProviders() []string
func GetProviderCloudEnv ¶
func GetPublicProviders ¶
func GetPublicProviders() []string
func GetRegistedProviderIds ¶
func GetRegistedProviderIds() []string
func GetSupportCloudIdProvider ¶
func GetSupportCloudIdProvider() []string
func GetSupportCloudgroupProviders ¶
func GetSupportCloudgroupProviders() []string
func HashIdsMac ¶
func ICloudObject2JSONObject ¶
func ICloudObject2JSONObject(obj ICloudObject) jsonutils.JSONObject
func IsSupportApp ¶
func IsSupportApp(prod ICloudProvider) bool
func IsSupportCDN ¶
func IsSupportCDN(prod ICloudProvider) bool
func IsSupportCapability ¶
func IsSupportCapability(prod ICloudProvider, capa string) bool
func IsSupportCompute ¶
func IsSupportCompute(prod ICloudProvider) bool
func IsSupportContainer ¶
func IsSupportContainer(prod ICloudProvider) bool
func IsSupportDnsZone ¶
func IsSupportDnsZone(prod ICloudProvider) bool
func IsSupportElasticCache ¶
func IsSupportElasticCache(prod ICloudProvider) bool
func IsSupportElasticSearch ¶
func IsSupportElasticSearch(prod ICloudProvider) bool
func IsSupportInterVpcNetwork ¶
func IsSupportInterVpcNetwork(prod ICloudProvider) bool
func IsSupportKafka ¶
func IsSupportKafka(prod ICloudProvider) bool
func IsSupportLoadbalancer ¶
func IsSupportLoadbalancer(prod ICloudProvider) bool
func IsSupportMiscResources ¶
func IsSupportMiscResources(prod ICloudProvider) bool
func IsSupportModelartsPool ¶
func IsSupportModelartsPool(prod ICloudProvider) bool
func IsSupportMongoDB ¶
func IsSupportMongoDB(prod ICloudProvider) bool
func IsSupportNAS ¶
func IsSupportNAS(prod ICloudProvider) bool
func IsSupportNAT ¶
func IsSupportNAT(prod ICloudProvider) bool
func IsSupportObjectstore ¶
func IsSupportObjectstore(prod ICloudProvider) bool
func IsSupportPolicyValue ¶
func IsSupportPolicyValue(v1 TDnsPolicyValue, arr []TDnsPolicyValue) bool
func IsSupportProject ¶
func IsSupportProject(prod ICloudProvider) bool
func IsSupportQuota ¶
func IsSupportQuota(prod ICloudProvider) bool
func IsSupportRds ¶
func IsSupportRds(prod ICloudProvider) bool
func IsSupportSSLCertificate ¶
func IsSupportSSLCertificate(prod ICloudProvider) bool
func IsSupportTablestore ¶
func IsSupportTablestore(prod ICloudProvider) bool
func IsSupportWaf ¶
func IsSupportWaf(prod ICloudProvider) bool
func IsSupported ¶
func ObjectSetMeta ¶
func ObjectSetMeta(ctx context.Context, bucket ICloudBucket, obj ICloudObject, meta http.Header, ) error
func RegisterFactory ¶
func RegisterFactory(factory ICloudProviderFactory)
func SetBucketCORS ¶
func SetBucketCORS(ibucket ICloudBucket, rules []SBucketCORSRule) error
func UploadObject ¶
func WaitCreated ¶
func WaitDeleted ¶
func WaitDeletedWithDelay ¶
func WaitMultiStatus ¶
func WaitMultiStatusWithSync ¶
func WaitStatus ¶
func WaitStatusWithDelay ¶
func WaitStatusWithSync ¶
Types ¶
type AccessGroupRule ¶
type AccessGroupRule struct {
Id string
ExternalId string
Priority int
RWAccessType TRWAccessType
UserAccessType TUserAccessType
Source string
}
func (AccessGroupRule) String ¶
func (self AccessGroupRule) String() string
type AccessGroupRuleInfo ¶
type AccessGroupRuleInfo struct {
MaxPriority int
MinPriority int
SupportedUserAccessType []TUserAccessType
Rules AccessGroupRuleSet
}
func GetAccessGroupRuleInfo ¶
func GetAccessGroupRuleInfo(group ICloudAccessGroup) (AccessGroupRuleInfo, error)
func (*AccessGroupRuleInfo) Sort ¶
func (self *AccessGroupRuleInfo) Sort()
type AccessGroupRuleSet ¶
type AccessGroupRuleSet []AccessGroupRule
func CompareAccessGroupRules ¶
func CompareAccessGroupRules(src, dest AccessGroupRuleInfo, debug bool) (common, added, removed AccessGroupRuleSet)
func (AccessGroupRuleSet) Len ¶
func (srs AccessGroupRuleSet) Len() int
func (AccessGroupRuleSet) Less ¶
func (srs AccessGroupRuleSet) Less(i, j int) bool
func (AccessGroupRuleSet) Swap ¶
func (srs AccessGroupRuleSet) Swap(i, j int)
type AssociateConfig ¶
type CacheKeyRule ¶
type CacheKeyRuleQueryString ¶
type CdnCreateOptions ¶
type CdnCreateOptions struct {
Domain string
ServiceType string
Area string
Origins SCdnOrigins
}
type ChangeListenerSchedulerOptions ¶
type ChangeListenerSchedulerOptions struct {
Scheduler string
ListenerStickySessionOptions
}
type DefaultAction ¶
type DefaultAction struct {
// Allow, Block, Log, Count, Alert, Detection, Prevention
Action TWafAction
// 仅Action为Allow时生效
InsertHeaders map[string]string
// 仅Action为Block时生效
Response string
// 仅Action为Block时生效
ResponseCode *int
// 仅Action为Block时生效
ResponseHeaders map[string]string
}
+onecloud:model-api-gen
func (DefaultAction) IsZero ¶
func (self DefaultAction) IsZero() bool
func (DefaultAction) String ¶
func (self DefaultAction) String() string
type DiskCreateConfig ¶
type DnsRecord ¶
type DnsRecord struct {
Desc string
DnsName string
DnsType TDnsType
DnsValue string
Enabled bool
Ttl int64
MxPriority int64
PolicyType TDnsPolicyType
PolicyValue TDnsPolicyValue
}
type DummyICloudNic ¶
type DummyICloudNic struct{}
func (DummyICloudNic) AssignAddress ¶
func (d DummyICloudNic) AssignAddress(ipAddrs []string) error
func (DummyICloudNic) AssignNAddress ¶
func (d DummyICloudNic) AssignNAddress(count int) ([]string, error)
func (DummyICloudNic) GetDriver ¶
func (d DummyICloudNic) GetDriver() string
func (DummyICloudNic) GetINetworkId ¶
func (d DummyICloudNic) GetINetworkId() string
func (DummyICloudNic) GetIP ¶
func (d DummyICloudNic) GetIP() string
func (DummyICloudNic) GetId ¶
func (d DummyICloudNic) GetId() string
func (DummyICloudNic) GetMAC ¶
func (d DummyICloudNic) GetMAC() string
func (DummyICloudNic) GetSubAddress ¶
func (d DummyICloudNic) GetSubAddress() ([]string, error)
func (DummyICloudNic) InClassicNetwork ¶
func (d DummyICloudNic) InClassicNetwork() bool
func (DummyICloudNic) UnassignAddress ¶
func (d DummyICloudNic) UnassignAddress(ipAddrs []string) error
type ElasticSearchAccessInfo ¶
type ElasticSearchAccessInfo struct {
Domain string
PrivateDomain string
Vip string
Port int
PrivatePort int
KibanaUrl string
KibanaPrivateUrl string
}
+onecloud:model-api-gen
type FileSystemCraeteOptions ¶
type GlobalVpcCreateOptions ¶
type GuestDiskCreateOptions ¶
type IBillingResource ¶
type IBillingResource interface {
GetBillingType() string
GetExpiredAt() time.Time
SetAutoRenew(bc billing.SBillingCycle) error
Renew(bc billing.SBillingCycle) error
IsAutoRenew() bool
}
type ICloudAccessGroup ¶
type ICloudAccessGroup interface {
GetGlobalId() string
GetName() string
GetDesc() string
IsDefault() bool
GetMaxPriority() int
GetMinPriority() int
GetSupporedUserAccessTypes() []TUserAccessType
GetNetworkType() string
GetFileSystemType() string
GetMountTargetCount() int
GetRules() ([]AccessGroupRule, error)
SyncRules(common, added, removed AccessGroupRuleSet) error
Delete() error
}
type ICloudApp ¶
type ICloudApp interface {
IVirtualResource
GetEnvironments() ([]ICloudAppEnvironment, error)
GetTechStack() string
GetType() string
GetKind() string
GetOsType() TOsType
}
type ICloudAppEnvironment ¶
type ICloudAppEnvironment interface {
IVirtualResource
GetInstanceType() (string, error)
GetInstanceNumber() (int, error)
}
type ICloudBucket ¶
type ICloudBucket interface {
IVirtualResource
MaxPartCount() int
MaxPartSizeBytes() int64
//GetGlobalId() string
//GetName() string
GetAcl() TBucketACLType
GetLocation() string
GetIRegion() ICloudRegion
GetStorageClass() string
GetAccessUrls() []SBucketAccessUrl
GetStats() SBucketStats
GetLimit() SBucketStats
SetLimit(limit SBucketStats) error
LimitSupport() SBucketStats
SetAcl(acl TBucketACLType) error
ListObjects(prefix string, marker string, delimiter string, maxCount int) (SListObjectResult, error)
CopyObject(ctx context.Context, destKey string, srcBucket, srcKey string, cannedAcl TBucketACLType, storageClassStr string, meta http.Header) error
GetObject(ctx context.Context, key string, rangeOpt *SGetObjectRange) (io.ReadCloser, error)
DeleteObject(ctx context.Context, keys string) error
GetTempUrl(method string, key string, expire time.Duration) (string, error)
PutObject(ctx context.Context, key string, input io.Reader, sizeBytes int64, cannedAcl TBucketACLType, storageClassStr string, meta http.Header) error
NewMultipartUpload(ctx context.Context, key string, cannedAcl TBucketACLType, storageClassStr string, meta http.Header) (string, error)
UploadPart(ctx context.Context, key string, uploadId string, partIndex int, input io.Reader, partSize int64, offset, totalSize int64) (string, error)
CopyPart(ctx context.Context, key string, uploadId string, partIndex int, srcBucketName string, srcKey string, srcOffset int64, srcLength int64) (string, error)
CompleteMultipartUpload(ctx context.Context, key string, uploadId string, partEtags []string) error
AbortMultipartUpload(ctx context.Context, key string, uploadId string) error
SetWebsite(conf SBucketWebsiteConf) error
GetWebsiteConf() (SBucketWebsiteConf, error)
DeleteWebSiteConf() error
SetCORS(rules []SBucketCORSRule) error
GetCORSRules() ([]SBucketCORSRule, error)
DeleteCORS() error
SetReferer(conf SBucketRefererConf) error
GetReferer() (SBucketRefererConf, error)
GetCdnDomains() ([]SCdnDomain, error)
GetPolicy() ([]SBucketPolicyStatement, error)
SetPolicy(policy SBucketPolicyStatementInput) error
DeletePolicy(id []string) ([]SBucketPolicyStatement, error)
ListMultipartUploads() ([]SBucketMultipartUploads, error)
}
func GetIBucketById ¶
func GetIBucketById(region ICloudRegion, name string) (ICloudBucket, error)
func GetIBucketByName ¶
func GetIBucketByName(region ICloudRegion, name string) (ICloudBucket, error)
type ICloudCDNDomain ¶
type ICloudCDNDomain interface {
IVirtualResource
GetEnabled() bool
GetArea() string
GetServiceType() string
GetCname() string
GetOrigins() *SCdnOrigins
// 是否忽略参数
GetCacheKeys() (*SCDNCacheKeys, error)
// 是否分片回源
GetRangeOriginPull() (*SCDNRangeOriginPull, error)
// 缓存配置
GetCache() (*SCDNCache, error)
// https配置
GetHTTPS() (*SCDNHttps, error)
// 强制跳转
GetForceRedirect() (*SCDNForceRedirect, error)
// 防盗链配置
GetReferer() (*SCDNReferer, error)
// 浏览器缓存配置
GetMaxAge() (*SCDNMaxAge, error)
Delete() error
}
type ICloudDBInstance ¶
type ICloudDBInstance interface {
IVirtualResource
IBillingResource
Reboot() error
GetMasterInstanceId() string
GetSecurityGroupIds() ([]string, error)
SetSecurityGroups(ids []string) error
GetPort() int
GetEngine() string
GetEngineVersion() string
//实例规格
GetInstanceType() string
GetVcpuCount() int
GetVmemSizeMB() int //MB
GetDiskSizeGB() int
GetDiskSizeUsedMB() int
//基础版、高可用?
GetCategory() string
GetStorageType() string
GetMaintainTime() string
GetConnectionStr() string
GetInternalConnectionStr() string
GetZone1Id() string
GetZone2Id() string
GetZone3Id() string
GetIVpcId() string
GetIops() int
GetDBNetworks() ([]SDBInstanceNetwork, error)
GetIDBInstanceParameters() ([]ICloudDBInstanceParameter, error)
GetIDBInstanceDatabases() ([]ICloudDBInstanceDatabase, error)
GetIDBInstanceAccounts() ([]ICloudDBInstanceAccount, error)
GetIDBInstanceBackups() ([]ICloudDBInstanceBackup, error)
ChangeConfig(ctx context.Context, config *SManagedDBInstanceChangeConfig) error
OpenPublicConnection() error
ClosePublicConnection() error
CreateDatabase(conf *SDBInstanceDatabaseCreateConfig) error
CreateAccount(conf *SDBInstanceAccountCreateConfig) error
CreateIBackup(conf *SDBInstanceBackupCreateConfig) (string, error)
RecoveryFromBackup(conf *SDBInstanceRecoveryConfig) error
Update(ctx context.Context, input SDBInstanceUpdateOptions) error
Delete() error
}
type ICloudDBInstanceAccount ¶
type ICloudDBInstanceAccount interface {
GetName() string
GetStatus() string
GetHost() string
GetIDBInstanceAccountPrivileges() ([]ICloudDBInstanceAccountPrivilege, error)
ResetPassword(password string) error
GrantPrivilege(database, privilege string) error
RevokePrivilege(database string) error
Delete() error
}
type ICloudDBInstanceBackup ¶
type ICloudDBInstanceBackup interface {
IVirtualResource
GetEngine() string
GetEngineVersion() string
GetDBInstanceId() string
GetStartTime() time.Time
GetEndTime() time.Time
GetBackupSizeMb() int
GetDBNames() string
GetBackupMode() string
GetBackupMethod() TBackupMethod
CreateICloudDBInstance(opts *SManagedDBInstanceCreateConfig) (ICloudDBInstance, error)
Delete() error
}
type ICloudDBInstanceDatabase ¶
type ICloudDBInstanceDatabase interface {
ICloudResource
GetCharacterSet() string
Delete() error
}
type ICloudDBInstanceSku ¶
type ICloudDBInstanceSku interface {
GetName() string
GetGlobalId() string
GetStatus() string
GetEngine() string
GetEngineVersion() string
GetStorageType() string
GetDiskSizeStep() int
GetMaxDiskSizeGb() int
GetMinDiskSizeGb() int
GetIOPS() int
GetTPS() int
GetQPS() int
GetMaxConnections() int
GetVcpuCount() int
GetVmemSizeMb() int
GetCategory() string
GetZone1Id() string
GetZone2Id() string
GetZone3Id() string
GetZoneId() string
}
type ICloudDisk ¶
type ICloudDisk interface {
IBillingResource
IVirtualResource
GetIStorage() (ICloudStorage, error)
GetIStorageId() string
// GetStatus() string
GetDiskFormat() string
GetDiskSizeMB() int // MB
GetIsAutoDelete() bool
GetTemplateId() string
GetDiskType() string
GetFsFormat() string
GetIsNonPersistent() bool
GetIops() int
GetDriver() string
GetCacheMode() string
GetMountpoint() string
GetAccessPath() string
Delete(ctx context.Context) error
CreateISnapshot(ctx context.Context, name string, desc string) (ICloudSnapshot, error)
GetISnapshots() ([]ICloudSnapshot, error)
Resize(ctx context.Context, newSizeMB int64) error
Reset(ctx context.Context, snapshotId string) (string, error)
Rebuild(ctx context.Context) error
GetPreallocation() string
}
type ICloudDnsRecord ¶
type ICloudDnsRecord interface {
GetGlobalId() string
GetDnsName() string
GetStatus() string
GetEnabled() bool
GetDnsType() TDnsType
GetDnsValue() string
GetTTL() int64
GetMxPriority() int64
Update(*DnsRecord) error
Enable() error
Disable() error
GetPolicyType() TDnsPolicyType
GetPolicyValue() TDnsPolicyValue
Delete() error
}
type ICloudDnsZone ¶
type ICloudDnsZone interface {
IVirtualResource
GetZoneType() TDnsZoneType
GetICloudVpcIds() ([]string, error)
AddVpc(*SPrivateZoneVpc) error
RemoveVpc(*SPrivateZoneVpc) error
GetIDnsRecords() ([]ICloudDnsRecord, error)
GetIDnsRecordById(id string) (ICloudDnsRecord, error)
AddDnsRecord(*DnsRecord) (string, error)
Delete() error
GetDnsProductType() TDnsProductType
}
type ICloudEIP ¶
type ICloudEIP interface {
IBillingResource
IVirtualResource
GetIpAddr() string
GetMode() string
GetINetworkId() string
GetAssociationType() string
GetAssociationExternalId() string
GetBandwidth() int
GetInternetChargeType() string
Delete() error
Associate(conf *AssociateConfig) error
Dissociate() error
ChangeBandwidth(bw int) error
}
type ICloudElasticSearch ¶
type ICloudElasticSearch interface {
IVirtualResource
IBillingResource
GetVersion() string
GetStorageType() string
GetDiskSizeGb() int
GetCategory() string
GetInstanceType() string
GetVcpuCount() int
GetVmemSizeGb() int
GetVpcId() string
GetNetworkId() string
GetZoneId() string
IsMultiAz() bool
GetAccessInfo() (*ElasticSearchAccessInfo, error)
Delete() error
}
type ICloudElasticcache ¶
type ICloudElasticcache interface {
IVirtualResource
IBillingResource
GetInstanceType() string
GetCapacityMB() int
GetArchType() string
GetNodeType() string
GetEngine() string
GetEngineVersion() string
GetVpcId() string
GetZoneId() string
GetNetworkType() string
GetNetworkId() string
GetBandwidth() int
GetConnections() int
GetPrivateDNS() string
GetPrivateIpAddr() string
GetPrivateConnectPort() int
GetPublicDNS() string
GetPublicIpAddr() string
GetPublicConnectPort() int
GetMaintainStartTime() string
GetMaintainEndTime() string
GetAuthMode() string
GetSecurityGroupIds() ([]string, error)
GetICloudElasticcacheAccounts() ([]ICloudElasticcacheAccount, error)
GetICloudElasticcacheAcls() ([]ICloudElasticcacheAcl, error)
GetICloudElasticcacheBackups() ([]ICloudElasticcacheBackup, error)
GetICloudElasticcacheParameters() ([]ICloudElasticcacheParameter, error)
GetICloudElasticcacheAccount(accountId string) (ICloudElasticcacheAccount, error)
GetICloudElasticcacheAcl(aclId string) (ICloudElasticcacheAcl, error)
GetICloudElasticcacheBackup(backupId string) (ICloudElasticcacheBackup, error)
Restart() error
Delete() error
ChangeInstanceSpec(spec string) error
SetMaintainTime(maintainStartTime, maintainEndTime string) error
AllocatePublicConnection(port int) (string, error) // return url & error info
ReleasePublicConnection() error
CreateAccount(account SCloudElasticCacheAccountInput) (ICloudElasticcacheAccount, error)
CreateAcl(aclName, securityIps string) (ICloudElasticcacheAcl, error)
CreateBackup(desc string) (ICloudElasticcacheBackup, error)
FlushInstance(input SCloudElasticCacheFlushInstanceInput) error
UpdateAuthMode(noPasswordAccess bool, password string) error
UpdateInstanceParameters(config jsonutils.JSONObject) error
UpdateBackupPolicy(config SCloudElasticCacheBackupPolicyUpdateInput) error
UpdateSecurityGroups(secgroupIds []string) error
}
type ICloudElasticcacheAccount ¶
type ICloudElasticcacheAccount interface {
ICloudResource
GetAccountType() string
GetAccountPrivilege() string
Delete() error
ResetPassword(input SCloudElasticCacheAccountResetPasswordInput) error
UpdateAccount(input SCloudElasticCacheAccountUpdateInput) error
}
type ICloudElasticcacheAcl ¶
type ICloudElasticcacheAcl interface {
ICloudResource
GetIpList() string
Delete() error
UpdateAcl(securityIps string) error
}
type ICloudElasticcacheSku ¶
type ICloudElasticcacheSku interface {
GetName() string
GetGlobalId() string
GetZoneId() string
GetSlaveZoneId() string
GetEngineArch() string
GetLocalCategory() string
GetPrepaidStatus() string
GetPostpaidStatus() string
GetEngine() string
GetEngineVersion() string
GetCpuArch() string
GetStorageType() string
GetMemorySizeMb() int
GetPerformanceType() string
GetNodeType() string
GetDiskSizeGb() int
GetShardNum() int
GetMaxShardNum() int
GetReplicasNum() int
GetMaxReplicasNum() int
GetMaxClients() int
GetMaxConnections() int
GetMaxInBandwidthMb() int
GetMaxMemoryMb() int
GetQps() int
}
type ICloudEnabledResource ¶
type ICloudEnabledResource interface {
ICloudResource
GetEnabled() bool
}
type ICloudEvent ¶
type ICloudFileSystem ¶
type ICloudFileSystem interface {
ICloudResource
IBillingResource
GetFileSystemType() string
GetStorageType() string
GetProtocol() string
GetCapacityGb() int64
GetUsedCapacityGb() int64
GetMountTargetCountLimit() int
GetZoneId() string
GetMountTargets() ([]ICloudMountTarget, error)
CreateMountTarget(opts *SMountTargetCreateOptions) (ICloudMountTarget, error)
Delete() error
}
type ICloudGlobalVpc ¶
type ICloudGlobalVpc interface {
ICloudResource
GetISecurityGroups() ([]ICloudSecurityGroup, error)
CreateISecurityGroup(opts *SecurityGroupCreateInput) (ICloudSecurityGroup, error)
Delete() error
}
type ICloudHost ¶
type ICloudHost interface {
ICloudResource
GetIVMs() ([]ICloudVM, error)
GetIVMById(id string) (ICloudVM, error)
// GetIWires() ([]ICloudWire, error)
GetIStorages() ([]ICloudStorage, error)
GetIStorageById(id string) (ICloudStorage, error)
// GetStatus() string // os status
GetEnabled() bool // is enabled
GetHostStatus() string // service status
GetAccessIp() string //
GetAccessMac() string //
GetSysInfo() jsonutils.JSONObject
GetSN() string
GetCpuCount() int
GetNodeCount() int8
GetCpuDesc() string
GetCpuMhz() int
GetCpuCmtbound() float32
GetCpuArchitecture() string
GetMemSizeMB() int
GetMemCmtbound() float32
GetReservedMemoryMb() int
GetStorageSizeMB() int64
GetStorageType() string
GetHostType() string
GetIsMaintenance() bool
GetVersion() string
CreateVM(desc *SManagedVMCreateConfig) (ICloudVM, error)
GetIHostNics() ([]ICloudHostNetInterface, error)
GetOvnVersion() string // just for cloudpods host
}
type ICloudHostNetInterface ¶
type ICloudHostNetInterface interface {
GetDevice() string
GetDriver() string
GetMac() string
GetVlanId() int
GetIndex() int8
IsLinkUp() tristate.TriState
GetIpAddr() string
GetMtu() int32
GetNicType() string
GetBridge() string
GetIWire() ICloudWire
}
func GetHostNetifs ¶
func GetHostNetifs(host ICloudHost, wires []ICloudWire) []ICloudHostNetInterface
type ICloudI18nResource ¶
type ICloudI18nResource interface {
GetI18n() SModelI18nTable
}
type ICloudIPv6Gateway ¶
type ICloudIPv6Gateway interface {
IVirtualResource
GetInstanceType() string
}
type ICloudImage ¶
type ICloudImage interface {
IVirtualResource
IOSInfo
Delete(ctx context.Context) error
GetIStoragecache() ICloudStoragecache
GetSizeByte() int64
GetImageType() TImageType
GetImageStatus() string
GetMinOsDiskSizeGb() int
GetMinRamSizeMb() int
GetImageFormat() string
GetPublicScope() rbacscope.TRbacScope
GetSubImages() []SSubImage
Export(opts *SImageExportOptions) ([]SImageExportInfo, error)
}
type ICloudInstanceSnapshot ¶
type ICloudInstanceSnapshot interface {
IVirtualResource
GetDescription() string
Delete() error
}
type ICloudInterVpcNetwork ¶
type ICloudInterVpcNetwork interface {
ICloudResource
GetAuthorityOwnerId() string
GetICloudVpcIds() ([]string, error)
AttachVpc(opts *SInterVpcNetworkAttachVpcOption) error
DetachVpc(opts *SInterVpcNetworkDetachVpcOption) error
Delete() error
GetIRoutes() ([]ICloudInterVpcNetworkRoute, error)
EnableRouteEntry(routeId string) error
DisableRouteEntry(routeId string) error
}
type ICloudInterfaceAddress ¶
type ICloudInternetGateway ¶
type ICloudInternetGateway interface {
ICloudResource
}
type ICloudKafka ¶
type ICloudKafka interface {
IVirtualResource
IBillingResource
GetNetworkId() string
GetVpcId() string
GetZoneId() string
GetInstanceType() string
GetVersion() string
GetDiskSizeGb() int
GetStorageType() string
GetBandwidthMb() int
GetEndpoint() string
GetMsgRetentionMinute() int
IsMultiAz() bool
GetTopics() ([]SKafkaTopic, error)
Delete() error
}
type ICloudKubeCluster ¶
type ICloudKubeCluster interface {
ICloudEnabledResource
GetKubeConfig(private bool, expireMinutes int) (*SKubeconfig, error)
GetVersion() string
GetVpcId() string
GetNetworkIds() []string
GetIKubeNodePools() ([]ICloudKubeNodePool, error)
CreateIKubeNodePool(opts *KubeNodePoolCreateOptions) (ICloudKubeNodePool, error)
GetIKubeNodes() ([]ICloudKubeNode, error)
Delete(isRetain bool) error
}
type ICloudKubeNode ¶
type ICloudKubeNode interface {
ICloudResource
GetINodePoolId() string
}
type ICloudKubeNodePool ¶
type ICloudLoadbalancer ¶
type ICloudLoadbalancer interface {
IVirtualResource
GetAddress() string
GetAddressType() string
GetNetworkType() string
GetNetworkIds() []string
GetVpcId() string
GetZoneId() string
GetZone1Id() string // first slave zone
GetLoadbalancerSpec() string
GetChargeType() string
GetEgressMbps() int
GetIEIP() (ICloudEIP, error)
Delete(ctx context.Context) error
Start() error
Stop() error
GetILoadBalancerListeners() ([]ICloudLoadbalancerListener, error)
GetILoadBalancerBackendGroups() ([]ICloudLoadbalancerBackendGroup, error)
CreateILoadBalancerBackendGroup(group *SLoadbalancerBackendGroup) (ICloudLoadbalancerBackendGroup, error)
GetILoadBalancerBackendGroupById(groupId string) (ICloudLoadbalancerBackendGroup, error)
CreateILoadBalancerListener(ctx context.Context, listener *SLoadbalancerListenerCreateOptions) (ICloudLoadbalancerListener, error)
GetILoadBalancerListenerById(listenerId string) (ICloudLoadbalancerListener, error)
}
type ICloudLoadbalancerAcl ¶
type ICloudLoadbalancerAcl interface {
IVirtualResource
GetAclListenerID() string // huawei only
GetAclEntries() []SLoadbalancerAccessControlListEntry
Sync(acl *SLoadbalancerAccessControlList) error
Delete() error
}
type ICloudLoadbalancerBackendGroup ¶
type ICloudLoadbalancerBackendGroup interface {
ICloudResource
IsDefault() bool
GetType() string
GetILoadbalancerBackends() ([]ICloudLoadbalancerBackend, error)
GetILoadbalancerBackendById(backendId string) (ICloudLoadbalancerBackend, error)
AddBackendServer(serverId string, weight int, port int) (ICloudLoadbalancerBackend, error)
RemoveBackendServer(serverId string, weight int, port int) error
Delete(ctx context.Context) error
Sync(ctx context.Context, group *SLoadbalancerBackendGroup) error
}
type ICloudLoadbalancerCertificate ¶
type ICloudLoadbalancerCertificate interface {
IVirtualResource
Sync(name, privateKey, publickKey string) error
Delete() error
GetCommonName() string
GetSubjectAlternativeNames() string
GetFingerprint() string // return value format: <algo>:<fingerprint>,比如sha1:7454a14fdb8ae1ea8b2f72e458a24a76bd23ec19
GetExpireTime() time.Time
GetPublickKey() string
GetPrivateKey() string
}
type ICloudLoadbalancerListener ¶
type ICloudLoadbalancerListener interface {
ICloudResource
GetListenerType() string
GetListenerPort() int
GetScheduler() string
GetAclStatus() string
GetAclType() string
GetAclId() string
GetEgressMbps() int
GetBackendGroupId() string
GetBackendServerPort() int
GetClientIdleTimeout() int
GetBackendConnectTimeout() int
// HTTP && HTTPS
CreateILoadBalancerListenerRule(rule *SLoadbalancerListenerRule) (ICloudLoadbalancerListenerRule, error)
GetILoadBalancerListenerRuleById(ruleId string) (ICloudLoadbalancerListenerRule, error)
GetILoadbalancerListenerRules() ([]ICloudLoadbalancerListenerRule, error)
GetStickySession() string
GetStickySessionType() string
GetStickySessionCookie() string
GetStickySessionCookieTimeout() int
XForwardedForEnabled() bool
GzipEnabled() bool
// HTTPS
GetCertificateId() string
GetTLSCipherPolicy() string
HTTP2Enabled() bool
// http redirect
ICloudLoadbalancerRedirect
ICloudloadbalancerHealthCheck
Start() error
Stop() error
ChangeScheduler(ctx context.Context, opts *ChangeListenerSchedulerOptions) error
SetHealthCheck(ctx context.Context, opts *ListenerHealthCheckOptions) error
ChangeCertificate(ctx context.Context, opts *ListenerCertificateOptions) error
SetAcl(ctx context.Context, opts *ListenerAclOptions) error
Delete(ctx context.Context) error
}
type ICloudLoadbalancerListenerRule ¶
type ICloudLoadbalancerListenerRule interface {
ICloudResource
// http redirect
ICloudLoadbalancerRedirect
IsDefault() bool
GetDomain() string
GetPath() string
GetCondition() string
GetBackendGroupId() string
Delete(ctx context.Context) error
}
type ICloudMiscResource ¶
type ICloudMiscResource interface {
IVirtualResource
GetResourceType() string
GetConfig() jsonutils.JSONObject
}
type ICloudModelartsPool ¶
type ICloudModelartsPool interface {
ICloudResource
IBillingResource
Delete() error
GetProjectId() string
GetInstanceType() string
GetWorkType() string
GetNodeCount() int
ChangeConfig(opts *ModelartsPoolChangeConfigOptions) error
GetStatusMessage() string
}
type ICloudModelartsPoolSku ¶
type ICloudMongoDB ¶
type ICloudMongoDB interface {
IVirtualResource
IBillingResource
GetVpcId() string
GetNetworkId() string
GetIpAddr() string
GetVcpuCount() int
GetVmemSizeMb() int
GetDiskSizeMb() int
GetZoneId() string
GetReplicationNum() int
GetCategory() string
GetEngine() string
GetEngineVersion() string
GetInstanceType() string
GetMaintainTime() string
GetPort() int
GetIops() int
GetMaxConnections() int
GetNetworkAddress() string
GetIBackups() ([]SMongoDBBackup, error)
Delete() error
}
type ICloudMountTarget ¶
type ICloudNatDEntry ¶
type ICloudNatDEntry interface {
ICloudResource
GetIpProtocol() string
GetExternalIp() string
GetExternalPort() int
GetInternalIp() string
GetInternalPort() int
Delete() error
}
ICloudNatDEntry describe a DNat rule which transfer externalIp:externalPort to internalIp:internalPort with IpProtocol(tcp/udp)
type ICloudNatGateway ¶
type ICloudNatGateway interface {
ICloudResource
IBillingResource
// 获取 NAT 规格
GetNatSpec() string
GetIEips() ([]ICloudEIP, error)
GetINatDTable() ([]ICloudNatDEntry, error)
GetINatSTable() ([]ICloudNatSEntry, error)
// ID is the ID of snat entry/rule or dnat entry/rule.
GetINatDEntryByID(id string) (ICloudNatDEntry, error)
GetINatSEntryByID(id string) (ICloudNatSEntry, error)
// Read the description of these two structures before using.
CreateINatDEntry(rule SNatDRule) (ICloudNatDEntry, error)
CreateINatSEntry(rule SNatSRule) (ICloudNatSEntry, error)
GetINetworkId() string
GetBandwidthMb() int
GetIpAddr() string
Delete() error
}
type ICloudNatSEntry ¶
type ICloudNatSEntry interface {
ICloudResource
GetIP() string
GetSourceCIDR() string
GetNetworkId() string
Delete() error
}
ICloudNatSEntry describe a SNat rule which transfer internalIp(GetIP()) to externalIp which from sourceCIDR
type ICloudNatSku ¶
type ICloudNetwork ¶
type ICloudNetwork interface {
IVirtualResource
GetIWire() ICloudWire
// GetStatus() string
GetIpStart() string
GetIpEnd() string
GetIpMask() int8
GetGateway() string
GetServerType() string
//GetIsPublic() bool
// 仅私有云有用,公有云无效
// 1. scope = none 非共享, network仅会属于一个项目,并且私有
// 2. scope = system 系统共享 云账号共享会跟随云账号共享,云账号非共享,会共享到network所在域
GetPublicScope() rbacscope.TRbacScope
Delete() error
GetAllocTimeoutSeconds() int
}
type ICloudNetworkInterface ¶
type ICloudNetworkInterface interface {
ICloudResource
GetMacAddress() string
GetAssociateType() string
GetAssociateId() string
GetICloudInterfaceAddresses() ([]ICloudInterfaceAddress, error)
}
type ICloudNic ¶
type ICloudNic interface {
GetId() string
GetIP() string
GetMAC() string
InClassicNetwork() bool
GetDriver() string
GetINetworkId() string
// GetSubAddress returns non-primary/secondary/alias ipv4 addresses of
// the network interface
//
// Implement it when any AssignXx ops methods are implemented
GetSubAddress() ([]string, error)
AssignNAddress(count int) ([]string, error)
AssignAddress(ipAddrs []string) error
// UnassignAddress should not return error if the network interface is
// now not present, or the addresses is not assigned to the network
// interface in the first place
UnassignAddress(ipAddrs []string) error
}
type ICloudObject ¶
type ICloudObject interface {
GetIBucket() ICloudBucket
GetKey() string
GetSizeBytes() int64
GetLastModified() time.Time
GetStorageClass() string
GetETag() string
GetMeta() http.Header
SetMeta(ctx context.Context, meta http.Header) error
GetAcl() TBucketACLType
SetAcl(acl TBucketACLType) error
}
func GetAllObjects ¶
func GetAllObjects(bucket ICloudBucket, objectPrefix string, isRecursive bool) ([]ICloudObject, error)
func GetIObject ¶
func GetIObject(bucket ICloudBucket, objectPrefix string) (ICloudObject, error)
func GetPagedObjects ¶
func GetPagedObjects(bucket ICloudBucket, objectPrefix string, isRecursive bool, marker string, maxCount int) ([]ICloudObject, string, error)
type ICloudProject ¶
type ICloudProject interface {
ICloudResource
GetDomainId() string
GetDomainName() string
GetAccountId() string
}
type ICloudProvider ¶
type ICloudProvider interface {
GetFactory() ICloudProviderFactory
GetSysInfo() (jsonutils.JSONObject, error)
GetVersion() string
GetIamLoginUrl() string
GetIRegions() []ICloudRegion
GetIProjects() ([]ICloudProject, error)
CreateIProject(name string) (ICloudProject, error)
GetIRegionById(id string) (ICloudRegion, error)
GetOnPremiseIRegion() (ICloudRegion, error)
GetBalance() (*SBalanceInfo, error)
GetSubAccounts() ([]SSubAccount, error)
GetAccountId() string
// region external id 是以provider 做为前缀.因此可以通过该判断条件过滤出同一个provider的regions列表
// 但是华为云有点特殊一个provider只对应一个region,因此需要进一步指定region名字,才能找到provider对应的region
GetCloudRegionExternalIdPrefix() string
GetStorageClasses(regionId string) []string
GetBucketCannedAcls(regionId string) []string
GetObjectCannedAcls(regionId string) []string
GetCapabilities() []string
IsClouduserSupportPassword() bool
GetICloudusers() ([]IClouduser, error)
GetISystemCloudpolicies() ([]ICloudpolicy, error)
GetICustomCloudpolicies() ([]ICloudpolicy, error)
GetICloudgroups() ([]ICloudgroup, error)
GetICloudgroupByName(name string) (ICloudgroup, error)
CreateICloudgroup(name, desc string) (ICloudgroup, error)
GetIClouduserByName(name string) (IClouduser, error)
CreateIClouduser(conf *SClouduserCreateConfig) (IClouduser, error)
CreateICloudSAMLProvider(opts *SAMLProviderCreateOptions) (ICloudSAMLProvider, error)
GetICloudSAMLProviders() ([]ICloudSAMLProvider, error)
GetICloudroles() ([]ICloudrole, error)
GetICloudroleById(id string) (ICloudrole, error)
GetICloudroleByName(name string) (ICloudrole, error)
CreateICloudrole(opts *SRoleCreateOptions) (ICloudrole, error)
CreateICloudpolicy(opts *SCloudpolicyCreateOptions) (ICloudpolicy, error)
GetEnrollmentAccounts() ([]SEnrollmentAccount, error)
CreateSubscription(SubscriptionCreateInput) error
GetSamlEntityId() string
GetICloudDnsZones() ([]ICloudDnsZone, error)
GetICloudDnsZoneById(id string) (ICloudDnsZone, error)
CreateICloudDnsZone(opts *SDnsZoneCreateOptions) (ICloudDnsZone, error)
GetICloudGlobalVpcs() ([]ICloudGlobalVpc, error)
CreateICloudGlobalVpc(opts *GlobalVpcCreateOptions) (ICloudGlobalVpc, error)
GetICloudGlobalVpcById(id string) (ICloudGlobalVpc, error)
GetICloudInterVpcNetworks() ([]ICloudInterVpcNetwork, error)
GetICloudInterVpcNetworkById(id string) (ICloudInterVpcNetwork, error)
CreateICloudInterVpcNetwork(opts *SInterVpcNetworkCreateOptions) (ICloudInterVpcNetwork, error)
GetICloudCDNDomains() ([]ICloudCDNDomain, error)
GetICloudCDNDomainByName(name string) (ICloudCDNDomain, error)
CreateICloudCDNDomain(opts *CdnCreateOptions) (ICloudCDNDomain, error)
GetMetrics(opts *MetricListOptions) ([]MetricValues, error)
GetISSLCertificates() ([]ICloudSSLCertificate, error)
}
func GetProvider ¶
func GetProvider(cfg ProviderConfig) (ICloudProvider, error)
func IsValidCloudAccount ¶
func IsValidCloudAccount(cfg ProviderConfig) (ICloudProvider, string, error)
type ICloudProviderFactory ¶
type ICloudProviderFactory interface {
GetProvider(cfg ProviderConfig) (ICloudProvider, error)
GetClientRC(SProviderInfo) (map[string]string, error)
GetId() string
GetName() string
ValidateChangeBandwidth(instanceId string, bandwidth int64) error
ValidateCreateCloudaccountData(ctx context.Context, input SCloudaccountCredential) (SCloudaccount, error)
ValidateUpdateCloudaccountCredential(ctx context.Context, input SCloudaccountCredential, cloudaccount string) (SCloudaccount, error)
GetSupportedBrands() []string
IsPublicCloud() bool
IsOnPremise() bool
IsMultiTenant() bool
IsSupportPrepaidResources() bool
NeedSyncSkuFromCloud() bool
IsCloudeventRegional() bool
GetMaxCloudEventSyncDays() int
GetMaxCloudEventKeepDays() int
IsNeedForceAutoCreateProject() bool
IsCloudpolicyWithSubscription() bool // 自定义权限属于订阅级别资源
IsClouduserpolicyWithSubscription() bool // 绑定用户权限需要指定订阅
IsSupportCloudIdService() bool
IsSupportClouduserPolicy() bool
IsSupportResetClouduserPassword() bool
GetClouduserMinPolicyCount() int
IsClouduserNeedInitPolicy() bool
IsSupportCreateCloudgroup() bool
IsSystemCloudpolicyUnified() bool // 国内国外权限是否一致
IsSupportCrossCloudEnvVpcPeering() bool
IsSupportCrossRegionVpcPeering() bool
IsSupportVpcPeeringVpcCidrOverlap() bool
ValidateCrossRegionVpcPeeringBandWidth(bandwidth int) error
IsSupportModifyRouteTable() bool
GetSupportedDnsZoneTypes() []TDnsZoneType
GetSupportedDnsTypes() map[TDnsZoneType][]TDnsType
GetSupportedDnsPolicyTypes() map[TDnsZoneType][]TDnsPolicyType
GetSupportedDnsPolicyValues() map[TDnsPolicyType][]TDnsPolicyValue
GetTTLRange(zoneType TDnsZoneType, productType TDnsProductType) TTlRange
IsSupportSAMLAuth() bool
GetAccountIdEqualizer() func(origin, now string) bool
}
func GetProviderFactory ¶
func GetProviderFactory(provider string) (ICloudProviderFactory, error)
type ICloudQuota ¶
type ICloudRegion ¶
type ICloudRegion interface {
ICloudResource
ICloudI18nResource
GetGeographicInfo() SGeographicInfo
GetIZones() ([]ICloudZone, error)
GetIVpcs() ([]ICloudVpc, error)
GetIEips() ([]ICloudEIP, error)
GetIVpcById(id string) (ICloudVpc, error)
GetIZoneById(id string) (ICloudZone, error)
GetIEipById(id string) (ICloudEIP, error)
// ICoudVM 的 GetGlobalId 接口不能panic
GetIVMs() ([]ICloudVM, error)
// Esxi没有zone,需要通过region确认vm是否被删除
GetIVMById(id string) (ICloudVM, error)
GetIDiskById(id string) (ICloudDisk, error)
// 仅返回region级别的安全组, vpc下面的安全组需要在ICloudVpc底下返回
GetISecurityGroups() ([]ICloudSecurityGroup, error)
GetISecurityGroupById(secgroupId string) (ICloudSecurityGroup, error)
CreateISecurityGroup(opts *SecurityGroupCreateInput) (ICloudSecurityGroup, error)
CreateIVpc(opts *VpcCreateOptions) (ICloudVpc, error)
CreateInternetGateway() (ICloudInternetGateway, error)
CreateEIP(eip *SEip) (ICloudEIP, error)
GetISnapshots() ([]ICloudSnapshot, error)
GetISnapshotById(snapshotId string) (ICloudSnapshot, error)
CreateSnapshotPolicy(*SnapshotPolicyInput) (string, error)
GetISnapshotPolicies() ([]ICloudSnapshotPolicy, error)
GetISnapshotPolicyById(id string) (ICloudSnapshotPolicy, error)
GetIHosts() ([]ICloudHost, error)
GetIHostById(id string) (ICloudHost, error)
GetIStorages() ([]ICloudStorage, error)
GetIStorageById(id string) (ICloudStorage, error)
GetIStoragecaches() ([]ICloudStoragecache, error)
GetIStoragecacheById(id string) (ICloudStoragecache, error)
GetILoadBalancers() ([]ICloudLoadbalancer, error)
GetILoadBalancerAcls() ([]ICloudLoadbalancerAcl, error)
GetILoadBalancerCertificates() ([]ICloudLoadbalancerCertificate, error)
GetILoadBalancerById(loadbalancerId string) (ICloudLoadbalancer, error)
GetILoadBalancerAclById(aclId string) (ICloudLoadbalancerAcl, error)
GetILoadBalancerCertificateById(certId string) (ICloudLoadbalancerCertificate, error)
CreateILoadBalancer(loadbalancer *SLoadbalancerCreateOptions) (ICloudLoadbalancer, error)
CreateILoadBalancerAcl(acl *SLoadbalancerAccessControlList) (ICloudLoadbalancerAcl, error)
CreateILoadBalancerCertificate(cert *SLoadbalancerCertificate) (ICloudLoadbalancerCertificate, error)
GetISkus() ([]ICloudSku, error)
CreateISku(opts *SServerSkuCreateOption) (ICloudSku, error)
GetICloudNatSkus() ([]ICloudNatSku, error)
GetINetworkInterfaces() ([]ICloudNetworkInterface, error)
GetIBuckets() ([]ICloudBucket, error)
CreateIBucket(name string, storageClassStr string, acl string) error
DeleteIBucket(name string) error
IBucketExist(name string) (bool, error)
GetIBucketById(name string) (ICloudBucket, error)
GetIBucketByName(name string) (ICloudBucket, error)
GetIDBInstances() ([]ICloudDBInstance, error)
GetIDBInstanceById(instanceId string) (ICloudDBInstance, error)
GetIDBInstanceBackups() ([]ICloudDBInstanceBackup, error)
GetIDBInstanceBackupById(backupId string) (ICloudDBInstanceBackup, error)
GetIDBInstanceSkus() ([]ICloudDBInstanceSku, error)
CreateIDBInstance(desc *SManagedDBInstanceCreateConfig) (ICloudDBInstance, error)
GetIElasticcaches() ([]ICloudElasticcache, error)
GetIElasticcacheSkus() ([]ICloudElasticcacheSku, error)
GetIElasticcacheById(id string) (ICloudElasticcache, error)
CreateIElasticcaches(ec *SCloudElasticCacheInput) (ICloudElasticcache, error)
GetCloudEnv() string
GetProvider() string
GetICloudEvents(start time.Time, end time.Time, withReadEvent bool) ([]ICloudEvent, error) //获取公有云操作日志接口
GetCapabilities() []string
GetICloudQuotas() ([]ICloudQuota, error)
GetICloudFileSystems() ([]ICloudFileSystem, error)
GetICloudFileSystemById(id string) (ICloudFileSystem, error)
CreateICloudFileSystem(opts *FileSystemCraeteOptions) (ICloudFileSystem, error)
GetICloudAccessGroups() ([]ICloudAccessGroup, error)
CreateICloudAccessGroup(opts *SAccessGroup) (ICloudAccessGroup, error)
GetICloudAccessGroupById(id string) (ICloudAccessGroup, error)
GetICloudWafIPSets() ([]ICloudWafIPSet, error)
GetICloudWafRegexSets() ([]ICloudWafRegexSet, error)
GetICloudWafInstances() ([]ICloudWafInstance, error)
GetICloudWafInstanceById(id string) (ICloudWafInstance, error)
CreateICloudWafInstance(opts *WafCreateOptions) (ICloudWafInstance, error)
GetICloudWafRuleGroups() ([]ICloudWafRuleGroup, error)
GetICloudMongoDBs() ([]ICloudMongoDB, error)
GetICloudMongoDBById(id string) (ICloudMongoDB, error)
GetIElasticSearchs() ([]ICloudElasticSearch, error)
GetIElasticSearchById(id string) (ICloudElasticSearch, error)
GetICloudKafkas() ([]ICloudKafka, error)
GetICloudKafkaById(id string) (ICloudKafka, error)
GetICloudApps() ([]ICloudApp, error)
GetICloudAppById(id string) (ICloudApp, error)
GetICloudKubeClusters() ([]ICloudKubeCluster, error)
GetICloudKubeClusterById(id string) (ICloudKubeCluster, error)
CreateIKubeCluster(opts *KubeClusterCreateOptions) (ICloudKubeCluster, error)
GetICloudTablestores() ([]ICloudTablestore, error)
GetIModelartsPools() ([]ICloudModelartsPool, error)
GetIModelartsPoolById(id string) (ICloudModelartsPool, error)
CreateIModelartsPool(pool *ModelartsPoolCreateOption, callback func(externalId string)) (ICloudModelartsPool, error)
GetIModelartsPoolSku() ([]ICloudModelartsPoolSku, error)
GetIMiscResources() ([]ICloudMiscResource, error)
}
type ICloudResource ¶
type ICloudResource interface {
GetId() string
GetName() string
GetGlobalId() string
GetCreatedAt() time.Time
GetDescription() string
GetStatus() string
Refresh() error
IsEmulated() bool
GetSysTags() map[string]string
GetTags() (map[string]string, error)
SetTags(tags map[string]string, replace bool) error
}
type ICloudRoute ¶
type ICloudRoute interface {
ICloudResource
GetType() string
GetCidr() string
GetNextHopType() string
GetNextHop() string
}
type ICloudRouteTable ¶
type ICloudRouteTable interface {
ICloudResource
GetAssociations() []RouteTableAssociation
GetDescription() string
GetRegionId() string
GetVpcId() string
GetType() RouteTableType
GetIRoutes() ([]ICloudRoute, error)
CreateRoute(route RouteSet) error
UpdateRoute(route RouteSet) error
RemoveRoute(route RouteSet) error
}
type ICloudSAMLProvider ¶
type ICloudSAMLProvider interface {
ICloudResource
GetMetadataDocument() (*samlutils.EntityDescriptor, error)
UpdateMetadata(samlutils.EntityDescriptor) error
GetAuthUrl(apiServer string) string
Delete() error
}
type ICloudSSLCertificate ¶
type ICloudSSLCertificate interface {
IVirtualResource
GetSans() string
GetStartDate() time.Time
GetProvince() string
GetCommon() string
GetCountry() string
GetIssuer() string
GetExpired() bool
GetEndDate() time.Time
GetFingerprint() string
GetCity() string
GetOrgName() string
GetIsUpload() bool
GetCert() string
GetKey() string
}
type ICloudSecurityGroup ¶
type ICloudSecurityGroup interface {
IVirtualResource
GetDescription() string
// 返回的优先级字段(priority)要求数字越大优先级越高, 若有默认不可修改的allow规则依然需要返回
GetRules() ([]ISecurityGroupRule, error)
GetVpcId() string
CreateRule(opts *SecurityGroupRuleCreateOptions) (ISecurityGroupRule, error)
GetReferences() ([]SecurityGroupReference, error)
Delete() error
}
type ICloudSku ¶
type ICloudSku interface {
ICloudResource
GetInstanceTypeFamily() string
GetInstanceTypeCategory() string
GetPrepaidStatus() string
GetPostpaidStatus() string
GetCpuArch() string
GetCpuCoreCount() int
GetMemorySizeMB() int
GetOsName() string
GetSysDiskResizable() bool
GetSysDiskType() string
GetSysDiskMinSizeGB() int
GetSysDiskMaxSizeGB() int
GetAttachedDiskType() string
GetAttachedDiskSizeGB() int
GetAttachedDiskCount() int
GetDataDiskTypes() string
GetDataDiskMaxCount() int
GetNicType() string
GetNicMaxCount() int
GetGpuAttachable() bool
GetGpuSpec() string
GetGpuCount() string
GetGpuMaxCount() int
Delete() error
}
type ICloudSnapshot ¶
type ICloudSnapshot interface {
IVirtualResource
GetSizeMb() int32
GetDiskId() string
GetDiskType() string
Delete() error
}
type ICloudSnapshotPolicy ¶
type ICloudStorage ¶
type ICloudStorage interface {
ICloudResource
GetIStoragecache() ICloudStoragecache
GetIZone() ICloudZone
GetIDisks() ([]ICloudDisk, error)
GetStorageType() string
GetMediumType() string
GetCapacityMB() int64 // MB
GetCapacityUsedMB() int64
GetStorageConf() jsonutils.JSONObject
GetEnabled() bool
CreateIDisk(conf *DiskCreateConfig) (ICloudDisk, error)
GetIDiskById(idStr string) (ICloudDisk, error)
GetMountPoint() string
IsSysDiskStore() bool
DisableSync() bool
}
type ICloudStoragecache ¶
type ICloudStoragecache interface {
ICloudResource
// 私有云需要实现
GetICloudImages() ([]ICloudImage, error)
// 公有云需要实现
GetICustomizedCloudImages() ([]ICloudImage, error)
GetIImageById(extId string) (ICloudImage, error)
GetPath() string
UploadImage(ctx context.Context, image *SImageCreateOption, callback func(float32)) (string, error)
}
type ICloudTablestore ¶
type ICloudTablestore interface {
IVirtualResource
}
type ICloudVM ¶
type ICloudVM interface {
IBillingResource
IVirtualResource
IOSInfo
ConvertPublicIpToEip() error
GetHostname() string
GetIHost() ICloudHost
GetIHostId() string
GetIDisks() ([]ICloudDisk, error)
GetINics() ([]ICloudNic, error)
GetIEIP() (ICloudEIP, error)
GetInternetMaxBandwidthOut() int
GetThroughput() int
GetSerialOutput(port int) (string, error) // 目前仅谷歌云windows机器会使用到此接口
GetCpuSockets() int
GetVcpuCount() int
GetVmemSizeMB() int //MB
GetBootOrder() string
GetVga() string
GetVdi() string
GetMachine() string
GetInstanceType() string
GetSecurityGroupIds() ([]string, error)
SetSecurityGroups(secgroupIds []string) error
GetHypervisor() string
StartVM(ctx context.Context) error
StopVM(ctx context.Context, opts *ServerStopOptions) error
DeleteVM(ctx context.Context) error
UpdateVM(ctx context.Context, input SInstanceUpdateOptions) error
UpdateUserData(userData string) error
RebuildRoot(ctx context.Context, config *SManagedVMRebuildRootConfig) (string, error)
DeployVM(ctx context.Context, opts *SInstanceDeployOptions) error
ChangeConfig(ctx context.Context, config *SManagedVMChangeConfig) error
GetVNCInfo(input *ServerVncInput) (*ServerVncOutput, error)
AttachDisk(ctx context.Context, diskId string) error
DetachDisk(ctx context.Context, diskId string) error
CreateDisk(ctx context.Context, opts *GuestDiskCreateOptions) (string, error)
MigrateVM(hostid string) error
LiveMigrateVM(hostid string) error
GetError() error
CreateInstanceSnapshot(ctx context.Context, name string, desc string) (ICloudInstanceSnapshot, error)
GetInstanceSnapshot(idStr string) (ICloudInstanceSnapshot, error)
GetInstanceSnapshots() ([]ICloudInstanceSnapshot, error)
ResetToInstanceSnapshot(ctx context.Context, idStr string) error
SaveImage(opts *SaveImageOptions) (ICloudImage, error)
AllocatePublicIpAddress() (string, error)
GetPowerStates() string
}
type ICloudVpc ¶
type ICloudVpc interface {
ICloudResource
GetGlobalVpcId() string
IsSupportSetExternalAccess() bool // 是否支持Attach互联网网关.
GetExternalAccessMode() string
AttachInternetGateway(igwId string) error
GetRegion() ICloudRegion
GetIsDefault() bool
GetCidrBlock() string
GetIWires() ([]ICloudWire, error)
CreateIWire(opts *SWireCreateOptions) (ICloudWire, error)
GetISecurityGroups() ([]ICloudSecurityGroup, error)
GetIRouteTables() ([]ICloudRouteTable, error)
GetIRouteTableById(routeTableId string) (ICloudRouteTable, error)
Delete() error
GetIWireById(wireId string) (ICloudWire, error)
GetINatGateways() ([]ICloudNatGateway, error)
CreateINatGateway(opts *NatGatewayCreateOptions) (ICloudNatGateway, error)
GetICloudVpcPeeringConnections() ([]ICloudVpcPeeringConnection, error)
GetICloudAccepterVpcPeeringConnections() ([]ICloudVpcPeeringConnection, error)
GetICloudVpcPeeringConnectionById(id string) (ICloudVpcPeeringConnection, error)
CreateICloudVpcPeeringConnection(opts *VpcPeeringConnectionCreateOptions) (ICloudVpcPeeringConnection, error)
AcceptICloudVpcPeeringConnection(id string) error
GetAuthorityOwnerId() string
ProposeJoinICloudInterVpcNetwork(opts *SVpcJointInterVpcNetworkOption) error
GetICloudIPv6Gateways() ([]ICloudIPv6Gateway, error)
}
type ICloudVpcPeeringConnection ¶
type ICloudVpcPeeringConnection interface {
ICloudResource
GetPeerVpcId() string
GetPeerAccountId() string
GetEnabled() bool
Delete() error
}
type ICloudWafIPSet ¶
type ICloudWafInstance ¶
type ICloudWafInstance interface {
ICloudEnabledResource
GetWafType() TWafType
GetDefaultAction() *DefaultAction
GetRules() ([]ICloudWafRule, error)
AddRule(opts *SWafRule) (ICloudWafRule, error)
// 绑定的资源列表
GetCloudResources() ([]SCloudResource, error)
Delete() error
}
type ICloudWafRegexSet ¶
type ICloudWafRule ¶
type ICloudWafRule interface {
GetName() string
GetDesc() string
GetGlobalId() string
GetPriority() int
GetAction() *DefaultAction
GetStatementCondition() TWafStatementCondition
GetStatements() ([]SWafStatement, error)
Update(opts *SWafRule) error
Delete() error
}
type ICloudWafRuleGroup ¶
type ICloudWire ¶
type ICloudWire interface {
ICloudResource
GetIVpc() ICloudVpc
GetIZone() ICloudZone
GetINetworks() ([]ICloudNetwork, error)
GetBandwidth() int
GetINetworkById(netid string) (ICloudNetwork, error)
CreateINetwork(opts *SNetworkCreateOptions) (ICloudNetwork, error)
}
type ICloudZone ¶
type ICloudZone interface {
ICloudResource
ICloudI18nResource
GetIRegion() ICloudRegion
GetIHosts() ([]ICloudHost, error)
GetIHostById(id string) (ICloudHost, error)
GetIStorages() ([]ICloudStorage, error)
GetIStorageById(id string) (ICloudStorage, error)
}
type ICloudgroup ¶
type ICloudgroup interface {
GetGlobalId() string
GetName() string
GetDescription() string
GetISystemCloudpolicies() ([]ICloudpolicy, error)
GetICustomCloudpolicies() ([]ICloudpolicy, error)
GetICloudusers() ([]IClouduser, error)
AddUser(name string) error
RemoveUser(name string) error
AttachSystemPolicy(policyName string) error
DetachSystemPolicy(policyName string) error
AttachCustomPolicy(policyName string) error
DetachCustomPolicy(policyName string) error
Delete() error
}
公有云用户组
type ICloudloadbalancerHealthCheck ¶
type ICloudloadbalancerHealthCheck interface {
GetHealthCheck() string
GetHealthCheckType() string
GetHealthCheckTimeout() int
GetHealthCheckInterval() int
GetHealthCheckRise() int
GetHealthCheckFail() int
GetHealthCheckReq() string
GetHealthCheckExp() string
// HTTP && HTTPS
GetHealthCheckDomain() string
GetHealthCheckURI() string
GetHealthCheckCode() string
}
type ICloudpolicy ¶
type ICloudpolicy interface {
GetGlobalId() string
GetName() string
GetDescription() string
GetDocument() (*jsonutils.JSONDict, error)
UpdateDocument(*jsonutils.JSONDict) error
Delete() error
}
公有云子账号权限
type ICloudrole ¶
type IClouduser ¶
type IClouduser interface {
GetGlobalId() string
GetName() string
GetEmailAddr() string
GetInviteUrl() string
GetICloudgroups() ([]ICloudgroup, error)
GetISystemCloudpolicies() ([]ICloudpolicy, error)
GetICustomCloudpolicies() ([]ICloudpolicy, error)
AttachSystemPolicy(policyName string) error
DetachSystemPolicy(policyName string) error
AttachCustomPolicy(policyName string) error
DetachCustomPolicy(policyName string) error
Delete() error
ResetPassword(password string) error
IsConsoleLogin() bool
CreateAccessKey(name string) (*SAccessKey, error)
DeleteAccessKey(accessKey string) error
GetAccessKeys() ([]SAccessKey, error)
}
公有云子账号
type ISecurityGroupRule ¶
type ISecurityGroupRule interface {
GetGlobalId() string
GetDirection() secrules.TSecurityRuleDirection
GetPriority() int
GetAction() secrules.TSecurityRuleAction
GetProtocol() string
GetPorts() string
GetDescription() string
GetCIDRs() []string
Update(opts *SecurityGroupRuleUpdateOptions) error
Delete() error
}
type IVirtualResource ¶
type IVirtualResource interface {
ICloudResource
GetProjectId() string
}
type ListenerAclOptions ¶
type ListenerCertificateOptions ¶
type ListenerCertificateOptions struct {
CertificateId string
}
type MetricListOptions ¶
type MetricListOptions struct {
ResourceType TResourceType
MetricType TMetricType
ResourceId string
// batch metric pull for tencentcloud
ResourceIds []string
RegionExtId string
StartTime time.Time
EndTime time.Time
OsType string
Interval int
// rds
Engine string
// azure 内存,磁盘使用率监控需要查询table storage,会产生额外的存储费用,默认关闭
IsSupportAzureTableStorageMetric bool
}
type MetricValue ¶
type MetricValues ¶
type MetricValues struct {
Id string
Unit string
MetricType TMetricType
Values []MetricValue
}
type ModelartsPoolChangeConfigOptions ¶
type ModelartsPoolChangeConfigOptions struct {
NodeCount int
}
type NatGatewayCreateOptions ¶
type ProviderConfig ¶
type ProviderConfig struct {
// Id, Name are properties of Cloudprovider object
Id string
Name string
// Vendor are names like Aliyun, OpenStack, etc.
Vendor string
URL string
Account string
Secret string
ReadOnly bool
AccountId string
Options *jsonutils.JSONDict
DefaultRegion string
ProxyFunc httputils.TransportProxyFunc
Debug bool
// 仅用来检测cloudpods是否纳管自身环境(system项目id)
AdminProjectId string
AliyunResourceGroupIds []string
UpdatePermission func(service, permission string)
}
func (*ProviderConfig) AdaptiveTimeoutHttpClient ¶
func (cp *ProviderConfig) AdaptiveTimeoutHttpClient() *http.Client
type RefererRule ¶
type RouteTableAssociation ¶
type RouteTableAssociation struct {
AssociationId string
AssociationType RouteTableAssociationType
AssociatedResourceId string
}
func (RouteTableAssociation) GetGlobalId ¶
func (self RouteTableAssociation) GetGlobalId() string
type RouteTableAssociationType ¶
type RouteTableAssociationType string
type RouteTableType ¶
type RouteTableType string
type RuleCacheConfig ¶
type RuleCacheConfig struct {
Cache *struct {
Enabled bool
CacheTime int
CompareMaxAge bool
IgnoreCacheControl bool
IgnoreSetCookie bool
}
NoCache *struct {
Enabled bool
Revalidate bool
}
FollowOrigin *struct {
Enabled bool
HeuristicCache struct {
Enabled bool
CacheConfig struct {
HeuristicCacheTimeSwitch bool
HeuristicCacheTime int
}
}
}
}
type SAMLProviderCreateOptions ¶
type SAMLProviderCreateOptions struct {
Name string
Metadata samlutils.EntityDescriptor
}
type SAWSExtraOptions ¶
type SAWSExtraOptions struct {
AWSAssumeRoleName string `json:"aws_assume_role_name"`
}
type SAccessGroup ¶
type SAccessKey ¶
type SBalanceInfo ¶
type SBaseCloudObject ¶
type SBaseCloudObject struct {
Key string
SizeBytes int64
StorageClass string
ETag string
LastModified time.Time
Meta http.Header
}
func (*SBaseCloudObject) GetETag ¶
func (o *SBaseCloudObject) GetETag() string
func (*SBaseCloudObject) GetKey ¶
func (o *SBaseCloudObject) GetKey() string
func (*SBaseCloudObject) GetLastModified ¶
func (o *SBaseCloudObject) GetLastModified() time.Time
func (*SBaseCloudObject) GetMeta ¶
func (o *SBaseCloudObject) GetMeta() http.Header
func (*SBaseCloudObject) GetSizeBytes ¶
func (o *SBaseCloudObject) GetSizeBytes() int64
func (*SBaseCloudObject) GetStorageClass ¶
func (o *SBaseCloudObject) GetStorageClass() string
type SBaseProvider ¶
type SBaseProvider struct {
// contains filtered or unexported fields
}
func NewBaseProvider ¶
func NewBaseProvider(factory ICloudProviderFactory) SBaseProvider
func (*SBaseProvider) CreateICloudCDNDomain ¶
func (self *SBaseProvider) CreateICloudCDNDomain(opts *CdnCreateOptions) (ICloudCDNDomain, error)
func (*SBaseProvider) CreateICloudDnsZone ¶
func (self *SBaseProvider) CreateICloudDnsZone(opts *SDnsZoneCreateOptions) (ICloudDnsZone, error)
func (*SBaseProvider) CreateICloudGlobalVpc ¶
func (self *SBaseProvider) CreateICloudGlobalVpc(opts *GlobalVpcCreateOptions) (ICloudGlobalVpc, error)
func (*SBaseProvider) CreateICloudInterVpcNetwork ¶
func (self *SBaseProvider) CreateICloudInterVpcNetwork(opts *SInterVpcNetworkCreateOptions) (ICloudInterVpcNetwork, error)
func (*SBaseProvider) CreateICloudSAMLProvider ¶
func (self *SBaseProvider) CreateICloudSAMLProvider(opts *SAMLProviderCreateOptions) (ICloudSAMLProvider, error)
func (*SBaseProvider) CreateICloudgroup ¶
func (self *SBaseProvider) CreateICloudgroup(name, desc string) (ICloudgroup, error)
func (*SBaseProvider) CreateICloudpolicy ¶
func (self *SBaseProvider) CreateICloudpolicy(opts *SCloudpolicyCreateOptions) (ICloudpolicy, error)
func (*SBaseProvider) CreateICloudrole ¶
func (self *SBaseProvider) CreateICloudrole(opts *SRoleCreateOptions) (ICloudrole, error)
func (*SBaseProvider) CreateIClouduser ¶
func (self *SBaseProvider) CreateIClouduser(conf *SClouduserCreateConfig) (IClouduser, error)
func (*SBaseProvider) CreateIModelartsPool ¶
func (self *SBaseProvider) CreateIModelartsPool(pool *ModelartsPoolCreateOption, callback func(id string)) (ICloudModelartsPool, error)
func (*SBaseProvider) CreateIProject ¶
func (self *SBaseProvider) CreateIProject(name string) (ICloudProject, error)
func (*SBaseProvider) CreateSubscription ¶
func (self *SBaseProvider) CreateSubscription(SubscriptionCreateInput) error
func (*SBaseProvider) GetCloudRegionExternalIdPrefix ¶
func (self *SBaseProvider) GetCloudRegionExternalIdPrefix() string
func (*SBaseProvider) GetEnrollmentAccounts ¶
func (self *SBaseProvider) GetEnrollmentAccounts() ([]SEnrollmentAccount, error)
func (*SBaseProvider) GetFactory ¶
func (provider *SBaseProvider) GetFactory() ICloudProviderFactory
func (*SBaseProvider) GetICloudCDNDomainByName ¶
func (self *SBaseProvider) GetICloudCDNDomainByName(name string) (ICloudCDNDomain, error)
func (*SBaseProvider) GetICloudCDNDomains ¶
func (self *SBaseProvider) GetICloudCDNDomains() ([]ICloudCDNDomain, error)
func (*SBaseProvider) GetICloudDnsZoneById ¶
func (self *SBaseProvider) GetICloudDnsZoneById(id string) (ICloudDnsZone, error)
func (*SBaseProvider) GetICloudDnsZones ¶
func (self *SBaseProvider) GetICloudDnsZones() ([]ICloudDnsZone, error)
func (*SBaseProvider) GetICloudGlobalVpcById ¶
func (self *SBaseProvider) GetICloudGlobalVpcById(id string) (ICloudGlobalVpc, error)
func (*SBaseProvider) GetICloudGlobalVpcs ¶
func (self *SBaseProvider) GetICloudGlobalVpcs() ([]ICloudGlobalVpc, error)
func (*SBaseProvider) GetICloudInterVpcNetworkById ¶
func (self *SBaseProvider) GetICloudInterVpcNetworkById(id string) (ICloudInterVpcNetwork, error)
func (*SBaseProvider) GetICloudInterVpcNetworks ¶
func (self *SBaseProvider) GetICloudInterVpcNetworks() ([]ICloudInterVpcNetwork, error)
func (*SBaseProvider) GetICloudSAMLProviders ¶
func (self *SBaseProvider) GetICloudSAMLProviders() ([]ICloudSAMLProvider, error)
func (*SBaseProvider) GetICloudgroupByName ¶
func (self *SBaseProvider) GetICloudgroupByName(name string) (ICloudgroup, error)
func (*SBaseProvider) GetICloudgroups ¶
func (self *SBaseProvider) GetICloudgroups() ([]ICloudgroup, error)
func (*SBaseProvider) GetICloudroleById ¶
func (self *SBaseProvider) GetICloudroleById(id string) (ICloudrole, error)
func (*SBaseProvider) GetICloudroleByName ¶
func (self *SBaseProvider) GetICloudroleByName(name string) (ICloudrole, error)
func (*SBaseProvider) GetICloudroles ¶
func (self *SBaseProvider) GetICloudroles() ([]ICloudrole, error)
func (*SBaseProvider) GetIClouduserByName ¶
func (self *SBaseProvider) GetIClouduserByName(name string) (IClouduser, error)
func (*SBaseProvider) GetICloudusers ¶
func (self *SBaseProvider) GetICloudusers() ([]IClouduser, error)
func (*SBaseProvider) GetICustomCloudpolicies ¶
func (self *SBaseProvider) GetICustomCloudpolicies() ([]ICloudpolicy, error)
func (*SBaseProvider) GetIModelartsPoolById ¶
func (self *SBaseProvider) GetIModelartsPoolById(id string) (ICloudModelartsPool, error)
func (*SBaseProvider) GetIModelartsPoolSku ¶
func (self *SBaseProvider) GetIModelartsPoolSku() ([]ICloudModelartsPoolSku, error)
func (*SBaseProvider) GetIModelartsPools ¶
func (self *SBaseProvider) GetIModelartsPools() ([]ICloudModelartsPool, error)
func (*SBaseProvider) GetISSLCertificates ¶
func (self *SBaseProvider) GetISSLCertificates() ([]ICloudSSLCertificate, error)
func (*SBaseProvider) GetISystemCloudpolicies ¶
func (self *SBaseProvider) GetISystemCloudpolicies() ([]ICloudpolicy, error)
func (*SBaseProvider) GetIamLoginUrl ¶
func (self *SBaseProvider) GetIamLoginUrl() string
func (*SBaseProvider) GetMetrics ¶
func (self *SBaseProvider) GetMetrics(opts *MetricListOptions) ([]MetricValues, error)
func (*SBaseProvider) GetOnPremiseIRegion ¶
func (self *SBaseProvider) GetOnPremiseIRegion() (ICloudRegion, error)
func (*SBaseProvider) GetSamlEntityId ¶
func (self *SBaseProvider) GetSamlEntityId() string
func (*SBaseProvider) GetSamlSpInitiatedLoginUrl ¶
func (self *SBaseProvider) GetSamlSpInitiatedLoginUrl(idpName string) string
func (*SBaseProvider) IsClouduserSupportPassword ¶
func (self *SBaseProvider) IsClouduserSupportPassword() bool
type SBucketAccessUrl ¶
type SBucketCORSRule ¶
type SBucketCORSRule struct {
AllowedMethods []string
// 允许的源站,可以设为*
AllowedOrigins []string
AllowedHeaders []string
MaxAgeSeconds int
ExposeHeaders []string
// 规则区别标识
Id string
}
func DeleteBucketCORS ¶
func DeleteBucketCORS(ibucket ICloudBucket, id []string) ([]SBucketCORSRule, error)
type SBucketMultipartUploads ¶
type SBucketPolicyStatement ¶
type SBucketPolicyStatement struct {
// 授权的目标主体
Principal map[string][]string `json:"Principal,omitempty"`
// 授权的行为
Action []string `json:"Action,omitempty"`
// Allow|Deny
Effect string `json:"Effect,omitempty"`
// 被授权的资源
Resource []string `json:"Resource,omitempty"`
// 触发授权的条件
Condition map[string]map[string]interface{} `json:"Condition,omitempty"`
// 解析字段,主账号id:子账号id
PrincipalId []string
// map[主账号id:子账号id]子账号名称
PrincipalNames map[string]string
// Read|ReadWrite|FullControl
CannedAction string
// 资源路径
ResourcePath []string
// 根据index 生成
Id string
}
type SBucketRefererConf ¶
type SBucketStats ¶
func GetIBucketStats ¶
func GetIBucketStats(bucket ICloudBucket) (SBucketStats, error)
func (SBucketStats) Equals ¶
func (s SBucketStats) Equals(s2 SBucketStats) bool
type SBucketWebsiteConf ¶
type SBucketWebsiteConf struct {
// 主页
Index string
// 错误时返回的文档
ErrorDocument string
// http或https
Protocol string
Rules []SBucketWebsiteRoutingRule
// 网站访问url,一般由bucketid,region等组成
Url string
}
type SCDNCache ¶
type SCDNCache struct {
RuleCache []SCacheRuleCache
}
type SCDNCacheKeys ¶
type SCDNCacheKeys struct {
// 开启关闭忽略参数
Enabled *bool
// 是否忽略大小
IgnoreCase *bool
// 分路径缓存键配置
KeyRules []CacheKeyRule
}
是否忽略参数
func (SCDNCacheKeys) IsZero ¶
func (self SCDNCacheKeys) IsZero() bool
func (SCDNCacheKeys) String ¶
func (self SCDNCacheKeys) String() string
type SCDNForceRedirect ¶
type SCDNForceRedirect struct {
// 访问强制跳转配置开关
Enabled *bool
// 访问强制跳转类型
// enmu: http, https
RedirectType string
}
func (SCDNForceRedirect) IsZero ¶
func (self SCDNForceRedirect) IsZero() bool
func (SCDNForceRedirect) String ¶
func (self SCDNForceRedirect) String() string
type SCDNMaxAge ¶
type SCDNMaxAge struct {
Enabled *bool
MaxAgeRules []SMaxAgeRule
}
浏览器缓存配置
func (SCDNMaxAge) IsZero ¶
func (self SCDNMaxAge) IsZero() bool
func (SCDNMaxAge) String ¶
func (self SCDNMaxAge) String() string
type SCDNRangeOriginPull ¶
type SCDNRangeOriginPull struct {
Enabled *bool
RangeOriginPullRules []SRangeOriginPullRule
}
是否分片回源
func (SCDNRangeOriginPull) IsZero ¶
func (self SCDNRangeOriginPull) IsZero() bool
func (SCDNRangeOriginPull) String ¶
func (self SCDNRangeOriginPull) String() string
type SCDNReferer ¶
type SCDNReferer struct {
// 是否开启防盗链
Enabled *bool
RefererRules []RefererRule
}
func (SCDNReferer) IsZero ¶
func (self SCDNReferer) IsZero() bool
func (SCDNReferer) String ¶
func (self SCDNReferer) String() string
type SCacheRuleCache ¶
type SCacheRuleCache struct {
RulePaths []string
RuleType string
Priority int
CacheConfig *RuleCacheConfig
}
type SCdnDomain ¶
type SCdnDomain struct {
// cdn加速域名
Domain string
// 状态 rejected(域名未审核)|processing(部署中)|online|offline
Status string
// 区域 mainland|overseas|global
Area string
// cdn Cname
Cname string
// 源站
Origin string
// 源站类型 domain|ip|bucket
OriginType string
}
+onecloud:model-api-gen
type SCdnOrigin ¶
type SCdnOrigin struct {
// 源站类型
// domain: 域名类型, cos:对象存储源站, ip:IP 列表作为源站
// enmu: domain, cos, ip
// required: true
Type string
// 源站地址
Origin string
// 回主源站时 Host 头部
ServerName string
// 回源协议
// enmu: http, follow, https
Protocol string
Path string
Port int
Enabled string
Priority int
}
+onecloud:model-api-gen
type SCdnOrigins ¶
type SCdnOrigins []SCdnOrigin
+onecloud:model-api-gen
func (SCdnOrigins) IsZero ¶
func (self SCdnOrigins) IsZero() bool
func (SCdnOrigins) String ¶
func (self SCdnOrigins) String() string
type SCloudElasticCacheBackupPolicyUpdateInput ¶
type SCloudElasticCacheBackupPolicyUpdateInput struct {
BackupType string // auto:自动备份 / manual:手动备份
BackupReservedDays int // 1-7
PreferredBackupPeriod string // Monday(周一) / Tuesday(周二) / Wednesday(周三) / Thursday(周四) / Friday(周五) / Saturday(周六) / Sunday(周日)
PreferredBackupTime string // 备份时间,格式:HH:mmZ-HH:mmZ
}
type SCloudElasticCacheFlushInstanceInput ¶
type SCloudElasticCacheFlushInstanceInput struct {
Password string // root账号密码. requied by qcloud
}
type SCloudElasticCacheInput ¶
type SCloudElasticCacheInput struct {
InstanceType string // 实例规格 redis.master.small.default
CapacityGB int64 // 缓存容量 华为云此项参数必选
InstanceName string // 实例名称
UserName string // redis 用户名,可选
Password string // redis 用户密码,可选
ZoneIds []string // 可用区, 可选
ChargeType string // 计费类型,可选
NodeType string // 节点类型,可选
NetworkType string // 网络类型 VPC|CLASSIC,可选
VpcId string // VPC ,可选
NetworkId string // 子网ID,可选
Engine string // Redis|Memcache
EngineVersion string // 版本类型
PrivateIpAddress string // 指定新实例的内网IP地址。
SecurityGroupIds []string // 安全组ID
EipId string // 绑定弹性IP
MaintainBegin string // 维护时间窗开始时间,格式为HH:mm:ss
MaintainEnd string // 维护时间窗结束时间,格式为HH:mm:ss
BillingCycle *billing.SBillingCycle // 包年包月
ProjectId string
Tags map[string]string
}
https://support.huaweicloud.com/api-dcs/dcs-zh-api-180423019.html https://help.aliyun.com/document_detail/60873.html?spm=a2c4g.11174283.6.715.7412dce0qSYemb
type SCloudObject ¶
type SCloudObject struct {
Key string
SizeBytes int64
StorageClass string
ETag string
LastModified time.Time
Meta http.Header
Acl string
}
func ICloudObject2Struct ¶
func ICloudObject2Struct(obj ICloudObject) SCloudObject
type SCloudResource ¶
type SCloudResources ¶
type SCloudResources struct {
Data []SCloudResource `json:",allowempty"`
Total int
}
type SCloudaccount ¶
type SCloudaccount struct {
// 账号信息,各个平台字段不尽相同,以下是各个平台账号创建所需要的字段
//
//
//
// | 云平台 |字段 | 翻译 | 是否必传 | 默认值 | 可否更新 | 获取方式 |
// | ------ |------ | ------ | --------- | -------- |-------- |-------- |
// |Aliyun |access_key_id |秘钥ID | 是 | | 是 | |
// |Aliyun |access_key_secret |秘钥Key | 是 | | 是 | |
// |Qcloud |app_id |APP ID | 是 | | 否 | |
// |Qcloud |secret_id |秘钥ID | 是 | | 是 | |
// |Qcloud |secret_key |秘钥Key | 是 | | 是 | |
// |OpenStack |project_name |用户所在项目 | 是 | | 是 | |
// |OpenStack |username |用户名 | 是 | | 是 | |
// |OpenStack |password |用户密码 | 是 | | 是 | |
// |OpenStack |auth_url |认证地址 | 是 | | 否 | |
// |OpenStack |domain_name |用户所在的域 | 否 |Default | 是 | |
// |VMware |username |用户名 | 是 | | 是 | |
// |VMware |password |密码 | 是 | | 是 | |
// |VMware |host |主机IP或域名 | 是 | | 否 | |
// |VMware |port |主机端口 | 否 |443 | 否 | |
// |Azure |directory_id |目录ID | 是 | | 否 | |
// |Azure |environment |区域 | 是 | | 否 | |
// |Azure |client_id |客户端ID | 是 | | 是 | |
// |Azure |client_secret |客户端密码 | 是 | | 是 | |
// |Huawei |access_key_id |秘钥ID | 是 | | 是 | |
// |Huawei |access_key_secret |秘钥 | 是 | | 是 | |
// |Huawei |environment |区域 | 是 | | 否 | |
// |Aws |access_key_id |秘钥ID | 是 | | 是 | |
// |Aws |access_key_secret |秘钥 | 是 | | 是 | |
// |Aws |environment |区域 | 是 | | 否 | |
// |Ucloud |access_key_id |秘钥ID | 是 | | 是 | |
// |Ucloud |access_key_secret |秘钥 | 是 | | 是 | |
// |Google |project_id |项目ID | 是 | | 否 | |
// |Google |client_email |客户端email | 是 | | 否 | |
// |Google |private_key_id |秘钥ID | 是 | | 是 | |
// |Google |private_key |秘钥Key | 是 | | 是 | |
Account string `json:"account"`
// swagger:ignore
Secret string
// 认证地址
AccessUrl string `json:"access_url"`
}
type SCloudaccountCredential ¶
type SCloudaccountCredential struct {
// 账号所在的项目 (openstack)
ProjectName string `json:"project_name"`
// 账号所在的域 (openstack)
// default: Default
DomainName string `json:"domain_name"`
// 用户名 (openstack, zstack, esxi)
Username string `json:"username"`
// 密码 (openstack, zstack, esxi)
Password string `json:"password"`
// 认证地址 (openstack,zstack)
AuthUrl string `json:"auto_url"`
// 秘钥id (Aliyun, Aws, huawei, ucloud, ctyun, zstack, s3)
AccessKeyId string `json:"access_key_id"`
// 秘钥key (Aliyun, Aws, huawei, ucloud, ctyun, zstack, s3)
AccessKeySecret string `json:"access_key_secret"`
// 环境 (Azure, Aws, huawei, ctyun, aliyun)
Environment string `json:"environment"`
// 目录ID (Azure)
DirectoryId string `json:"directory_id"`
// 客户端ID (Azure)
ClientId string `json:"client_id"`
// 客户端秘钥 (Azure)
ClientSecret string `json:"client_secret"`
// 主机IP (esxi)
Host string `json:"host"`
// 主机端口 (esxi)
Port int `json:"port"`
// 端点 (s3) 或 Apsara(飞天)
Endpoint string `json:"endpoint"`
// app id (Qcloud)
AppId string `json:"app_id"`
//秘钥ID (Qcloud)
SecretId string `json:"secret_id"`
//秘钥key (Qcloud)
SecretKey string `json:"secret_key"`
// 飞天允许的最高组织id, 默认为1
OrganizationId int `json:"organization_id"`
// Google服务账号email (gcp)
GCPClientEmail string `json:"gcp_client_email"`
// Google服务账号project id (gcp)
GCPProjectId string `json:"gcp_project_id"`
// Google服务账号秘钥id (gcp)
GCPPrivateKeyId string `json:"gcp_private_key_id"`
// Google服务账号秘钥 (gcp)
GCPPrivateKey string `json:"gcp_private_key"`
OracleTenancyOCID string `json:"oracle_tenancy_ocid"`
OracleUserOCID string `json:"oracle_user_ocid"`
OraclePrivateKey string `json:"oracle_private_key"`
// 默认区域Id, Apara及HCSO需要此参数
// example: cn-north-2
// required: true
DefaultRegion string `default:"$DEFAULT_REGION" metavar:"$DEFAULT_REGION"`
// Huawei Cloud Stack Online
*SHCSOEndpoints
}
type SCloudpolicyPermission ¶
type SClouduserCreateConfig ¶
type SDBInstanceNetwork ¶
type SDBInstancePrivilege ¶
type SDefaultAccount ¶
type SDefaultAccount struct {
Linux SOsDefaultAccount
Windows SOsDefaultAccount
}
type SDistDefaultAccount ¶
type SDnsCapability ¶
type SDnsCapability struct {
ZoneTypes []TDnsZoneType
DnsTypes map[TDnsZoneType][]TDnsType
PolicyTypes map[TDnsZoneType][]TDnsPolicyType
PolicyValues map[TDnsPolicyType][]TDnsPolicyValue
}
type SDnsZoneCreateOptions ¶
type SDnsZoneCreateOptions struct {
Name string
Desc string
ZoneType TDnsZoneType
Vpcs []SPrivateZoneVpc
}
type SEnrollmentAccount ¶
type SExcludeRule ¶
type SExcludeRule struct {
Name string
}
type SExcludeRules ¶
type SExcludeRules []SExcludeRule
func (SExcludeRules) IsZero ¶
func (self SExcludeRules) IsZero() bool
func (SExcludeRules) String ¶
func (self SExcludeRules) String() string
type SFakeOnPremiseRegion ¶
type SFakeOnPremiseRegion struct {
}
func (*SFakeOnPremiseRegion) CreateEIP ¶
func (region *SFakeOnPremiseRegion) CreateEIP(eip *SEip) (ICloudEIP, error)
func (*SFakeOnPremiseRegion) CreateILoadBalancer ¶
func (region *SFakeOnPremiseRegion) CreateILoadBalancer(loadbalancer *SLoadbalancerCreateOptions) (ICloudLoadbalancer, error)
func (*SFakeOnPremiseRegion) CreateILoadBalancerAcl ¶
func (region *SFakeOnPremiseRegion) CreateILoadBalancerAcl(acl *SLoadbalancerAccessControlList) (ICloudLoadbalancerAcl, error)
func (*SFakeOnPremiseRegion) CreateILoadBalancerCertificate ¶
func (region *SFakeOnPremiseRegion) CreateILoadBalancerCertificate(cert *SLoadbalancerCertificate) (ICloudLoadbalancerCertificate, error)
func (*SFakeOnPremiseRegion) CreateISecurityGroup ¶
func (region *SFakeOnPremiseRegion) CreateISecurityGroup(conf *SecurityGroupCreateInput) (ICloudSecurityGroup, error)
func (*SFakeOnPremiseRegion) CreateIVpc ¶
func (region *SFakeOnPremiseRegion) CreateIVpc(opts *VpcCreateOptions) (ICloudVpc, error)
func (*SFakeOnPremiseRegion) GetCloudEnv ¶
func (region *SFakeOnPremiseRegion) GetCloudEnv() string
func (*SFakeOnPremiseRegion) GetGeographicInfo ¶
func (region *SFakeOnPremiseRegion) GetGeographicInfo() SGeographicInfo
func (*SFakeOnPremiseRegion) GetGlobalId ¶
func (region *SFakeOnPremiseRegion) GetGlobalId() string
func (*SFakeOnPremiseRegion) GetIEipById ¶
func (region *SFakeOnPremiseRegion) GetIEipById(id string) (ICloudEIP, error)
func (*SFakeOnPremiseRegion) GetIEips ¶
func (region *SFakeOnPremiseRegion) GetIEips() ([]ICloudEIP, error)
func (*SFakeOnPremiseRegion) GetILoadBalancerAclById ¶
func (region *SFakeOnPremiseRegion) GetILoadBalancerAclById(aclId string) (ICloudLoadbalancerAcl, error)
func (*SFakeOnPremiseRegion) GetILoadBalancerAcls ¶
func (region *SFakeOnPremiseRegion) GetILoadBalancerAcls() ([]ICloudLoadbalancerAcl, error)
func (*SFakeOnPremiseRegion) GetILoadBalancerById ¶
func (region *SFakeOnPremiseRegion) GetILoadBalancerById(loadbalancerId string) (ICloudLoadbalancer, error)
func (*SFakeOnPremiseRegion) GetILoadBalancerCertificateById ¶
func (region *SFakeOnPremiseRegion) GetILoadBalancerCertificateById(certId string) (ICloudLoadbalancerCertificate, error)
func (*SFakeOnPremiseRegion) GetILoadBalancerCertificates ¶
func (region *SFakeOnPremiseRegion) GetILoadBalancerCertificates() ([]ICloudLoadbalancerCertificate, error)
func (*SFakeOnPremiseRegion) GetILoadBalancers ¶
func (region *SFakeOnPremiseRegion) GetILoadBalancers() ([]ICloudLoadbalancer, error)
func (*SFakeOnPremiseRegion) GetISecurityGroupById ¶
func (region *SFakeOnPremiseRegion) GetISecurityGroupById(id string) (ICloudSecurityGroup, error)
func (*SFakeOnPremiseRegion) GetIVpcById ¶
func (region *SFakeOnPremiseRegion) GetIVpcById(id string) (ICloudVpc, error)
func (*SFakeOnPremiseRegion) GetIVpcs ¶
func (region *SFakeOnPremiseRegion) GetIVpcs() ([]ICloudVpc, error)
func (*SFakeOnPremiseRegion) GetIZoneById ¶
func (region *SFakeOnPremiseRegion) GetIZoneById(id string) (ICloudZone, error)
func (*SFakeOnPremiseRegion) GetIZones ¶
func (region *SFakeOnPremiseRegion) GetIZones() ([]ICloudZone, error)
func (*SFakeOnPremiseRegion) GetId ¶
func (region *SFakeOnPremiseRegion) GetId() string
func (*SFakeOnPremiseRegion) GetName ¶
func (region *SFakeOnPremiseRegion) GetName() string
func (*SFakeOnPremiseRegion) GetStatus ¶
func (region *SFakeOnPremiseRegion) GetStatus() string
func (*SFakeOnPremiseRegion) GetSysTags ¶
func (region *SFakeOnPremiseRegion) GetSysTags() map[string]string
func (*SFakeOnPremiseRegion) GetTags ¶
func (region *SFakeOnPremiseRegion) GetTags() (map[string]string, error)
func (*SFakeOnPremiseRegion) IsEmulated ¶
func (region *SFakeOnPremiseRegion) IsEmulated() bool
func (*SFakeOnPremiseRegion) Refresh ¶
func (region *SFakeOnPremiseRegion) Refresh() error
type SGeographicInfo ¶
type SGeographicInfo struct {
// 纬度
// example: 26.647003
Latitude float32 `list:"user" update:"admin" create:"admin_optional"`
// 经度
// example: 106.630211
Longitude float32 `list:"user" update:"admin" create:"admin_optional"`
// 城市
// example: Guiyang
City string `list:"user" width:"32" update:"admin" create:"admin_optional"`
// 国家代码
// example: CN
CountryCode string `list:"user" width:"4" update:"admin" create:"admin_optional"`
}
+onecloud:model-api-gen
func (SGeographicInfo) IsEquals ¶
func (self SGeographicInfo) IsEquals(geo SGeographicInfo) bool
type SGetObjectRange ¶
func ParseRange ¶
func ParseRange(rangeStr string) SGetObjectRange
func (SGetObjectRange) SizeBytes ¶
func (r SGetObjectRange) SizeBytes() int64
func (SGetObjectRange) String ¶
func (r SGetObjectRange) String() string
type SHCSOEndpoints ¶
type SHCSOEndpoints struct {
// 华为私有云Endpoint域名
// example: hcso.com.cn
// required:true
EndpointDomain string `default:"$HUAWEI_ENDPOINT_DOMAIN" metavar:"$HUAWEI_ENDPOINT_DOMAIN"`
// 默认DNS
// example: 10.125.0.26,10.125.0.27
// required: false
DefaultSubnetDns string `default:"$HUAWEI_DEFAULT_SUBNET_DNS" metavar:"$HUAWEI_DEFAULT_SUBNET_DNS"`
// 弹性云服务
Ecs string `default:"$HUAWEI_ECS_ENDPOINT"`
// 云容器服务
Cce string `default:"$HUAWEI_CCE_ENDPOINT"`
// 弹性伸缩服务
As string `default:"$HUAWEI_AS_ENDPOINT"`
// 统一身份认证服务
Iam string `default:"$HUAWEI_IAM_ENDPOINT"`
// 镜像服务
Ims string `default:"$HUAWEI_IMS_ENDPOINT"`
// 云服务器备份服务
Csbs string `default:"$HUAWEI_CSBS_ENDPOINT"`
// 云容器实例 CCI
Cci string `default:"$HUAWEI_CCI_ENDPOINT"`
// 裸金属服务器
Bms string `default:"$HUAWEI_BMS_ENDPOINT"`
// 云硬盘 EVS
Evs string `default:"$HUAWEI_EVS_ENDPOINT"`
// 云硬盘备份 VBS
Vbs string `default:"$HUAWEI_VBS_ENDPOINT"`
// 对象存储服务 OBS
Obs string `default:"$HUAWEI_OBS_ENDPOINT"`
// 虚拟私有云 VPC
Vpc string `default:"$HUAWEI_VPC_ENDPOINT"`
// 弹性负载均衡 ELB
Elb string `default:"$HUAWEI_ELB_ENDPOINT"`
// 合作伙伴运营能力
Bss string `default:"$HUAWEI_BSS_ENDPOINT"`
// Nat网关 NAT
Nat string `default:"$HUAWEI_NAT_ENDPOINT"`
// 分布式缓存服务
Dcs string `default:"$HUAWEI_DCS_ENDPOINT"`
// 关系型数据库 RDS
Rds string `default:"$HUAWEI_RDS_ENDPOINT"`
// 云审计服务
Cts string `default:"$HUAWEI_CTS_ENDPOINT"`
// 监控服务 CloudEye
Ces string `default:"$HUAWEI_CES_ENDPOINT"`
// 企业项目
Eps string `default:"$HUAWEI_EPS_ENDPOINT"`
// 文件系统
SfsTurbo string `default:"$HUAWEI_SFS_TURBO_ENDPOINT"`
// Modelarts
Modelarts string `default:"$HUAWEI_MODELARTS_ENDPOINT"`
// contains filtered or unexported fields
}
SHCSOEndpoints 华为私有云endpoints配置
endpoint获取方式优先级: 通过参数明确指定使用指定endpoint。否则,程序根据华为云endpoint命名规则自动拼接endpoint
func (*SHCSOEndpoints) GetEndpoint ¶
func (self *SHCSOEndpoints) GetEndpoint(defaultRegion, serviceName string, region string) string
type SImage ¶
type SImage struct {
Checksum string
// ContainerFormat string
CreatedAt time.Time
Deleted bool
DiskFormat string
Id string
IsPublic bool
MinDiskMB int `json:"min_disk"`
MinRamMB int `json:"min_ram"`
Name string
Owner string
Properties map[string]string
Protected bool
SizeBytes int64 `json:"size"`
Status string
// UpdatedAt time.Time
PublicScope string
ExternalId string
// SubImages record the subImages of the guest image.
// For normal image, it's nil.
SubImages []SSubImage
// EncryptKeyId
EncryptKeyId string
}
func CloudImage2Image ¶
func CloudImage2Image(image ICloudImage) SImage
type SImageCreateOption ¶
type SImageCreateOption struct {
ImageId string
ExternalId string
ImageName string
Description string
MinDiskMb int
MinRamMb int
Checksum string
OsType string
OsArch string
OsDistribution string
OsVersion string
OsFullVersion string
GetReader func(imageId, format string) (io.Reader, int64, error)
// 镜像临时存储位置
TmpPath string
}
type SImageExportInfo ¶
type SImageExportOptions ¶
type SImageExportOptions struct {
BucketName string
}
type SInstanceCapability ¶
type SInstanceCapability struct {
Provider string
Hypervisor string
Storages Storage
DefaultAccount SDefaultAccount
}
type SInstanceDeployOptions ¶
type SInstanceType ¶
type SInstanceUpdateOptions ¶
type SKafkaTopic ¶
type SKubeconfig ¶
type SListObjectResult ¶
type SListObjectResult struct {
Objects []ICloudObject
NextMarker string
CommonPrefixes []ICloudObject
IsTruncated bool
}
type SLoadbalancerAccessControlList ¶
type SLoadbalancerAccessControlList struct {
Name string
Entrys []SLoadbalancerAccessControlListEntry
// used by huawei
ListenerId string
AccessControlEnable bool
}
type SLoadbalancerBackend ¶
type SLoadbalancerCreateOptions ¶
type SLoadbalancerCreateOptions struct {
Name string
Desc string
ZoneId string
SlaveZoneId string
VpcId string
NetworkIds []string
EipId string // eip id
Address string
AddressType string
LoadbalancerSpec string
ChargeType string
EgressMbps int
BillingCycle *billing.SBillingCycle
ProjectId string
Tags map[string]string
}
type SLoadbalancerListenerCreateOptions ¶
type SLoadbalancerListenerCreateOptions struct {
Name string
ListenerType string
ListenerPort int
BackendGroupType string
BackendGroupId string
Scheduler string
AccessControlListStatus string
AccessControlListType string
AccessControlListId string
EnableHTTP2 bool
CertificateId string
EgressMbps int
Description string
EstablishedTimeout int
ClientRequestTimeout int
ClientIdleTimeout int
BackendConnectTimeout int
BackendIdleTimeout int
ListenerHealthCheckOptions
ListenerStickySessionOptions
BackendServerPort int
XForwardedFor bool
Gzip bool
TLSCipherPolicy string
}
type SLoadbalancerListenerRule ¶
type SLoadbalancerListenerRule struct {
Name string
Domain string
Path string
BackendGroupId string
BackendGroupType string
Condition string // for aws only
Scheduler string // for qcloud only
HealthCheck string // for qcloud only
HealthCheckType string // for qcloud only
HealthCheckTimeout int // for qcloud only
HealthCheckDomain string // for qcloud only
HealthCheckHttpCode string // for qcloud only
HealthCheckURI string // for qcloud only
HealthCheckInterval int // for qcloud only
HealthCheckRise int // for qcloud only
HealthCheckFail int // for qcloud only
StickySessionCookieTimeout int // for qcloud only
}
type SManagedDBInstanceCreateConfig ¶
type SManagedDBInstanceCreateConfig struct {
Name string
Description string
StorageType string
DiskSizeGB int
SInstanceType
VcpuCount int
VmemSizeMb int
VpcId string
SecgroupIds []string
NetworkId string
Address string
Engine string
EngineVersion string
Category string
Port int
MasterInstanceId string
Password string
Username string
ProjectId string
MultiAz bool
BillingCycle *billing.SBillingCycle
Tags map[string]string
// 仅从备份恢复到新实例用到
RdsId string
BackupId string
}
type SManagedVMChangeConfig ¶
type SManagedVMCreateConfig ¶
type SManagedVMCreateConfig struct {
Name string
NameEn string
Hostname string
ExternalImageId string
ImageType string
OsType string
OsDistribution string
OsVersion string
InstanceType string // InstanceType 不为空时,直接采用InstanceType创建机器。
Cpu int
MemoryMB int
ExternalNetworkId string
ExternalVpcId string
IpAddr string
Description string
SysDisk SDiskInfo
DataDisks []SDiskInfo
KeypairName string
PublicKey string
ExternalSecgroupIds []string
Account string
Password string
UserData string
ProjectId string
EnableMonitorAgent bool
SPublicIpInfo
Tags map[string]string
BillingCycle *billing.SBillingCycle
IsNeedInjectPasswordByCloudInit bool
UserDataType string
WindowsUserDataType string
IsWindowsUserDataTypeNeedEncode bool
}
func (*SManagedVMCreateConfig) GetConfig ¶
func (vmConfig *SManagedVMCreateConfig) GetConfig(config *jsonutils.JSONDict) error
func (*SManagedVMCreateConfig) GetUserData ¶
func (vmConfig *SManagedVMCreateConfig) GetUserData() (string, error)
func (*SManagedVMCreateConfig) InjectPasswordByCloudInit ¶
func (vmConfig *SManagedVMCreateConfig) InjectPasswordByCloudInit() error
type SMaxAgeRule ¶
type SModelI18nEntry ¶
type SModelI18nEntry struct {
Value string
// contains filtered or unexported fields
}
func NewSModelI18nEntry ¶
func NewSModelI18nEntry(value string) *SModelI18nEntry
func (*SModelI18nEntry) CN ¶
func (self *SModelI18nEntry) CN(v string) *SModelI18nEntry
func (*SModelI18nEntry) EN ¶
func (self *SModelI18nEntry) EN(v string) *SModelI18nEntry
func (*SModelI18nEntry) GetKeyValue ¶
func (self *SModelI18nEntry) GetKeyValue() string
type SModelI18nTable ¶
type SModelI18nTable map[string]*SModelI18nEntry
type SMongoDBBackup ¶
type SMongoDBBackup struct {
Name string
Description string
StartTime time.Time
EndTime time.Time
Status TMongoDBBackupStatus
BackupMethod TMongoDBBackupMethod
BackupType TMongoDBBackupType
BackupSizeKb int
}
type SMongoDBBackups ¶
type SMongoDBBackups struct {
Data []SMongoDBBackup
Total int
}
type SNetworkCreateOptions ¶
type SOsDefaultAccount ¶
type SOsDefaultAccount struct {
// 默认用户名
DefaultAccount string
// 是否可更改用户名
Changeable bool
// 禁止使用的账号
DisabledAccounts []string
// 各操作系统发行版的默认用户名信息
DistAccounts []SDistDefaultAccount
}
type SPremiseBaseProviderFactory ¶
type SPremiseBaseProviderFactory struct {
// contains filtered or unexported fields
}
func (*SPremiseBaseProviderFactory) GetAccountIdEqualizer ¶
func (*SPremiseBaseProviderFactory) GetClouduserMinPolicyCount ¶
func (factory *SPremiseBaseProviderFactory) GetClouduserMinPolicyCount() int
func (*SPremiseBaseProviderFactory) GetMaxCloudEventKeepDays ¶
func (factory *SPremiseBaseProviderFactory) GetMaxCloudEventKeepDays() int
func (*SPremiseBaseProviderFactory) GetMaxCloudEventSyncDays ¶
func (factory *SPremiseBaseProviderFactory) GetMaxCloudEventSyncDays() int
func (*SPremiseBaseProviderFactory) GetProvider ¶
func (factory *SPremiseBaseProviderFactory) GetProvider(providerId, providerName, url, username, password string) (ICloudProvider, error)
func (*SPremiseBaseProviderFactory) GetSupportedBrands ¶
func (factory *SPremiseBaseProviderFactory) GetSupportedBrands() []string
func (*SPremiseBaseProviderFactory) GetSupportedDnsPolicyTypes ¶
func (factory *SPremiseBaseProviderFactory) GetSupportedDnsPolicyTypes() map[TDnsZoneType][]TDnsPolicyType
func (*SPremiseBaseProviderFactory) GetSupportedDnsPolicyValues ¶
func (factory *SPremiseBaseProviderFactory) GetSupportedDnsPolicyValues() map[TDnsPolicyType][]TDnsPolicyValue
func (*SPremiseBaseProviderFactory) GetSupportedDnsTypes ¶
func (factory *SPremiseBaseProviderFactory) GetSupportedDnsTypes() map[TDnsZoneType][]TDnsType
func (*SPremiseBaseProviderFactory) GetSupportedDnsZoneTypes ¶
func (factory *SPremiseBaseProviderFactory) GetSupportedDnsZoneTypes() []TDnsZoneType
func (*SPremiseBaseProviderFactory) GetTTLRange ¶
func (factory *SPremiseBaseProviderFactory) GetTTLRange(zoneType TDnsZoneType, productType TDnsProductType) TTlRange
func (*SPremiseBaseProviderFactory) IsCloudeventRegional ¶
func (factory *SPremiseBaseProviderFactory) IsCloudeventRegional() bool
func (*SPremiseBaseProviderFactory) IsCloudpolicyWithSubscription ¶
func (factory *SPremiseBaseProviderFactory) IsCloudpolicyWithSubscription() bool
func (*SPremiseBaseProviderFactory) IsClouduserNeedInitPolicy ¶
func (factory *SPremiseBaseProviderFactory) IsClouduserNeedInitPolicy() bool
func (*SPremiseBaseProviderFactory) IsClouduserpolicyWithSubscription ¶
func (factory *SPremiseBaseProviderFactory) IsClouduserpolicyWithSubscription() bool
func (*SPremiseBaseProviderFactory) IsMultiTenant ¶
func (factory *SPremiseBaseProviderFactory) IsMultiTenant() bool
func (*SPremiseBaseProviderFactory) IsNeedForceAutoCreateProject ¶
func (factory *SPremiseBaseProviderFactory) IsNeedForceAutoCreateProject() bool
func (*SPremiseBaseProviderFactory) IsOnPremise ¶
func (factory *SPremiseBaseProviderFactory) IsOnPremise() bool
func (*SPremiseBaseProviderFactory) IsPublicCloud ¶
func (factory *SPremiseBaseProviderFactory) IsPublicCloud() bool
func (*SPremiseBaseProviderFactory) IsSupportCloudIdService ¶
func (factory *SPremiseBaseProviderFactory) IsSupportCloudIdService() bool
func (*SPremiseBaseProviderFactory) IsSupportClouduserPolicy ¶
func (factory *SPremiseBaseProviderFactory) IsSupportClouduserPolicy() bool
func (*SPremiseBaseProviderFactory) IsSupportCreateCloudgroup ¶
func (factory *SPremiseBaseProviderFactory) IsSupportCreateCloudgroup() bool
func (*SPremiseBaseProviderFactory) IsSupportCrossCloudEnvVpcPeering ¶
func (factory *SPremiseBaseProviderFactory) IsSupportCrossCloudEnvVpcPeering() bool
func (*SPremiseBaseProviderFactory) IsSupportCrossRegionVpcPeering ¶
func (factory *SPremiseBaseProviderFactory) IsSupportCrossRegionVpcPeering() bool
func (*SPremiseBaseProviderFactory) IsSupportModifyRouteTable ¶
func (factory *SPremiseBaseProviderFactory) IsSupportModifyRouteTable() bool
func (*SPremiseBaseProviderFactory) IsSupportPrepaidResources ¶
func (factory *SPremiseBaseProviderFactory) IsSupportPrepaidResources() bool
func (*SPremiseBaseProviderFactory) IsSupportResetClouduserPassword ¶
func (factory *SPremiseBaseProviderFactory) IsSupportResetClouduserPassword() bool
func (*SPremiseBaseProviderFactory) IsSupportSAMLAuth ¶
func (factory *SPremiseBaseProviderFactory) IsSupportSAMLAuth() bool
func (*SPremiseBaseProviderFactory) IsSupportVpcPeeringVpcCidrOverlap ¶
func (factory *SPremiseBaseProviderFactory) IsSupportVpcPeeringVpcCidrOverlap() bool
func (*SPremiseBaseProviderFactory) IsSystemCloudpolicyUnified ¶
func (factory *SPremiseBaseProviderFactory) IsSystemCloudpolicyUnified() bool
func (*SPremiseBaseProviderFactory) NeedSyncSkuFromCloud ¶
func (factory *SPremiseBaseProviderFactory) NeedSyncSkuFromCloud() bool
func (*SPremiseBaseProviderFactory) ValidateChangeBandwidth ¶
func (*SPremiseBaseProviderFactory) ValidateCrossRegionVpcPeeringBandWidth ¶
type SPrivateCloudBaseProviderFactory ¶
type SPrivateCloudBaseProviderFactory struct {
// contains filtered or unexported fields
}
func (*SPrivateCloudBaseProviderFactory) GetAccountIdEqualizer ¶
func (*SPrivateCloudBaseProviderFactory) GetClouduserMinPolicyCount ¶
func (factory *SPrivateCloudBaseProviderFactory) GetClouduserMinPolicyCount() int
func (*SPrivateCloudBaseProviderFactory) GetMaxCloudEventKeepDays ¶
func (factory *SPrivateCloudBaseProviderFactory) GetMaxCloudEventKeepDays() int
func (*SPrivateCloudBaseProviderFactory) GetMaxCloudEventSyncDays ¶
func (factory *SPrivateCloudBaseProviderFactory) GetMaxCloudEventSyncDays() int
func (*SPrivateCloudBaseProviderFactory) GetProvider ¶
func (factory *SPrivateCloudBaseProviderFactory) GetProvider(providerId, providerName, url, username, password string) (ICloudProvider, error)
func (*SPrivateCloudBaseProviderFactory) GetSupportedBrands ¶
func (factory *SPrivateCloudBaseProviderFactory) GetSupportedBrands() []string
func (*SPrivateCloudBaseProviderFactory) GetSupportedDnsPolicyTypes ¶
func (factory *SPrivateCloudBaseProviderFactory) GetSupportedDnsPolicyTypes() map[TDnsZoneType][]TDnsPolicyType
func (*SPrivateCloudBaseProviderFactory) GetSupportedDnsPolicyValues ¶
func (factory *SPrivateCloudBaseProviderFactory) GetSupportedDnsPolicyValues() map[TDnsPolicyType][]TDnsPolicyValue
func (*SPrivateCloudBaseProviderFactory) GetSupportedDnsTypes ¶
func (factory *SPrivateCloudBaseProviderFactory) GetSupportedDnsTypes() map[TDnsZoneType][]TDnsType
func (*SPrivateCloudBaseProviderFactory) GetSupportedDnsZoneTypes ¶
func (factory *SPrivateCloudBaseProviderFactory) GetSupportedDnsZoneTypes() []TDnsZoneType
func (*SPrivateCloudBaseProviderFactory) GetTTLRange ¶
func (factory *SPrivateCloudBaseProviderFactory) GetTTLRange(zoneType TDnsZoneType, productType TDnsProductType) TTlRange
func (*SPrivateCloudBaseProviderFactory) IsCloudeventRegional ¶
func (factory *SPrivateCloudBaseProviderFactory) IsCloudeventRegional() bool
func (*SPrivateCloudBaseProviderFactory) IsCloudpolicyWithSubscription ¶
func (factory *SPrivateCloudBaseProviderFactory) IsCloudpolicyWithSubscription() bool
func (*SPrivateCloudBaseProviderFactory) IsClouduserNeedInitPolicy ¶
func (factory *SPrivateCloudBaseProviderFactory) IsClouduserNeedInitPolicy() bool
func (*SPrivateCloudBaseProviderFactory) IsClouduserpolicyWithSubscription ¶
func (factory *SPrivateCloudBaseProviderFactory) IsClouduserpolicyWithSubscription() bool
func (*SPrivateCloudBaseProviderFactory) IsMultiTenant ¶
func (factory *SPrivateCloudBaseProviderFactory) IsMultiTenant() bool
func (*SPrivateCloudBaseProviderFactory) IsNeedForceAutoCreateProject ¶
func (factory *SPrivateCloudBaseProviderFactory) IsNeedForceAutoCreateProject() bool
func (*SPrivateCloudBaseProviderFactory) IsOnPremise ¶
func (factory *SPrivateCloudBaseProviderFactory) IsOnPremise() bool
func (*SPrivateCloudBaseProviderFactory) IsPublicCloud ¶
func (factory *SPrivateCloudBaseProviderFactory) IsPublicCloud() bool
func (*SPrivateCloudBaseProviderFactory) IsSupportCloudIdService ¶
func (factory *SPrivateCloudBaseProviderFactory) IsSupportCloudIdService() bool
func (*SPrivateCloudBaseProviderFactory) IsSupportClouduserPolicy ¶
func (factory *SPrivateCloudBaseProviderFactory) IsSupportClouduserPolicy() bool
func (*SPrivateCloudBaseProviderFactory) IsSupportCreateCloudgroup ¶
func (factory *SPrivateCloudBaseProviderFactory) IsSupportCreateCloudgroup() bool
func (*SPrivateCloudBaseProviderFactory) IsSupportCrossCloudEnvVpcPeering ¶
func (factory *SPrivateCloudBaseProviderFactory) IsSupportCrossCloudEnvVpcPeering() bool
func (*SPrivateCloudBaseProviderFactory) IsSupportCrossRegionVpcPeering ¶
func (factory *SPrivateCloudBaseProviderFactory) IsSupportCrossRegionVpcPeering() bool
func (*SPrivateCloudBaseProviderFactory) IsSupportModifyRouteTable ¶
func (factory *SPrivateCloudBaseProviderFactory) IsSupportModifyRouteTable() bool
func (*SPrivateCloudBaseProviderFactory) IsSupportPrepaidResources ¶
func (factory *SPrivateCloudBaseProviderFactory) IsSupportPrepaidResources() bool
func (*SPrivateCloudBaseProviderFactory) IsSupportResetClouduserPassword ¶
func (factory *SPrivateCloudBaseProviderFactory) IsSupportResetClouduserPassword() bool
func (*SPrivateCloudBaseProviderFactory) IsSupportSAMLAuth ¶
func (factory *SPrivateCloudBaseProviderFactory) IsSupportSAMLAuth() bool
func (*SPrivateCloudBaseProviderFactory) IsSupportVpcPeeringVpcCidrOverlap ¶
func (factory *SPrivateCloudBaseProviderFactory) IsSupportVpcPeeringVpcCidrOverlap() bool
func (*SPrivateCloudBaseProviderFactory) IsSystemCloudpolicyUnified ¶
func (factory *SPrivateCloudBaseProviderFactory) IsSystemCloudpolicyUnified() bool
func (*SPrivateCloudBaseProviderFactory) NeedSyncSkuFromCloud ¶
func (factory *SPrivateCloudBaseProviderFactory) NeedSyncSkuFromCloud() bool
func (*SPrivateCloudBaseProviderFactory) ValidateChangeBandwidth ¶
func (*SPrivateCloudBaseProviderFactory) ValidateCrossRegionVpcPeeringBandWidth ¶
type SPrivateZoneVpc ¶
type SProviderInfo ¶
type SPublicCloudBaseProviderFactory ¶
type SPublicCloudBaseProviderFactory struct {
// contains filtered or unexported fields
}
func (*SPublicCloudBaseProviderFactory) GetAccountIdEqualizer ¶
func (*SPublicCloudBaseProviderFactory) GetClouduserMinPolicyCount ¶
func (factory *SPublicCloudBaseProviderFactory) GetClouduserMinPolicyCount() int
func (*SPublicCloudBaseProviderFactory) GetMaxCloudEventKeepDays ¶
func (factory *SPublicCloudBaseProviderFactory) GetMaxCloudEventKeepDays() int
func (*SPublicCloudBaseProviderFactory) GetMaxCloudEventSyncDays ¶
func (factory *SPublicCloudBaseProviderFactory) GetMaxCloudEventSyncDays() int
func (*SPublicCloudBaseProviderFactory) GetProvider ¶
func (factory *SPublicCloudBaseProviderFactory) GetProvider(providerId, providerName, url, username, password string) (ICloudProvider, error)
func (*SPublicCloudBaseProviderFactory) GetSupportedBrands ¶
func (factory *SPublicCloudBaseProviderFactory) GetSupportedBrands() []string
func (*SPublicCloudBaseProviderFactory) GetSupportedDnsPolicyTypes ¶
func (factory *SPublicCloudBaseProviderFactory) GetSupportedDnsPolicyTypes() map[TDnsZoneType][]TDnsPolicyType
func (*SPublicCloudBaseProviderFactory) GetSupportedDnsPolicyValues ¶
func (factory *SPublicCloudBaseProviderFactory) GetSupportedDnsPolicyValues() map[TDnsPolicyType][]TDnsPolicyValue
func (*SPublicCloudBaseProviderFactory) GetSupportedDnsTypes ¶
func (factory *SPublicCloudBaseProviderFactory) GetSupportedDnsTypes() map[TDnsZoneType][]TDnsType
func (*SPublicCloudBaseProviderFactory) GetSupportedDnsZoneTypes ¶
func (factory *SPublicCloudBaseProviderFactory) GetSupportedDnsZoneTypes() []TDnsZoneType
func (*SPublicCloudBaseProviderFactory) GetTTLRange ¶
func (factory *SPublicCloudBaseProviderFactory) GetTTLRange(zoneType TDnsZoneType, productType TDnsProductType) TTlRange
func (*SPublicCloudBaseProviderFactory) IsCloudeventRegional ¶
func (factory *SPublicCloudBaseProviderFactory) IsCloudeventRegional() bool
func (*SPublicCloudBaseProviderFactory) IsCloudpolicyWithSubscription ¶
func (factory *SPublicCloudBaseProviderFactory) IsCloudpolicyWithSubscription() bool
func (*SPublicCloudBaseProviderFactory) IsClouduserNeedInitPolicy ¶
func (factory *SPublicCloudBaseProviderFactory) IsClouduserNeedInitPolicy() bool
func (*SPublicCloudBaseProviderFactory) IsClouduserpolicyWithSubscription ¶
func (factory *SPublicCloudBaseProviderFactory) IsClouduserpolicyWithSubscription() bool
func (*SPublicCloudBaseProviderFactory) IsMultiTenant ¶
func (factory *SPublicCloudBaseProviderFactory) IsMultiTenant() bool
func (*SPublicCloudBaseProviderFactory) IsNeedForceAutoCreateProject ¶
func (factory *SPublicCloudBaseProviderFactory) IsNeedForceAutoCreateProject() bool
func (*SPublicCloudBaseProviderFactory) IsOnPremise ¶
func (factory *SPublicCloudBaseProviderFactory) IsOnPremise() bool
func (*SPublicCloudBaseProviderFactory) IsPublicCloud ¶
func (factory *SPublicCloudBaseProviderFactory) IsPublicCloud() bool
func (*SPublicCloudBaseProviderFactory) IsSupportCloudIdService ¶
func (factory *SPublicCloudBaseProviderFactory) IsSupportCloudIdService() bool
func (*SPublicCloudBaseProviderFactory) IsSupportClouduserPolicy ¶
func (factory *SPublicCloudBaseProviderFactory) IsSupportClouduserPolicy() bool
func (*SPublicCloudBaseProviderFactory) IsSupportCreateCloudgroup ¶
func (factory *SPublicCloudBaseProviderFactory) IsSupportCreateCloudgroup() bool
func (*SPublicCloudBaseProviderFactory) IsSupportCrossCloudEnvVpcPeering ¶
func (factory *SPublicCloudBaseProviderFactory) IsSupportCrossCloudEnvVpcPeering() bool
func (*SPublicCloudBaseProviderFactory) IsSupportCrossRegionVpcPeering ¶
func (factory *SPublicCloudBaseProviderFactory) IsSupportCrossRegionVpcPeering() bool
func (*SPublicCloudBaseProviderFactory) IsSupportModifyRouteTable ¶
func (factory *SPublicCloudBaseProviderFactory) IsSupportModifyRouteTable() bool
func (*SPublicCloudBaseProviderFactory) IsSupportPrepaidResources ¶
func (factory *SPublicCloudBaseProviderFactory) IsSupportPrepaidResources() bool
func (*SPublicCloudBaseProviderFactory) IsSupportResetClouduserPassword ¶
func (factory *SPublicCloudBaseProviderFactory) IsSupportResetClouduserPassword() bool
func (*SPublicCloudBaseProviderFactory) IsSupportSAMLAuth ¶
func (factory *SPublicCloudBaseProviderFactory) IsSupportSAMLAuth() bool
func (*SPublicCloudBaseProviderFactory) IsSupportVpcPeeringVpcCidrOverlap ¶
func (factory *SPublicCloudBaseProviderFactory) IsSupportVpcPeeringVpcCidrOverlap() bool
func (*SPublicCloudBaseProviderFactory) IsSystemCloudpolicyUnified ¶
func (factory *SPublicCloudBaseProviderFactory) IsSystemCloudpolicyUnified() bool
func (*SPublicCloudBaseProviderFactory) NeedSyncSkuFromCloud ¶
func (factory *SPublicCloudBaseProviderFactory) NeedSyncSkuFromCloud() bool
func (*SPublicCloudBaseProviderFactory) ValidateChangeBandwidth ¶
func (*SPublicCloudBaseProviderFactory) ValidateCrossRegionVpcPeeringBandWidth ¶
type SPublicIpInfo ¶
type SPublicIpInfo struct {
PublicIpBw int
PublicIpChargeType TElasticipChargeType
}
type SRangeOriginPullRule ¶
type SRoleCreateOptions ¶
type SServerSku ¶
type SServerSkuCreateOption ¶
type SSubAccount ¶
type SWafRule ¶
type SWafRule struct {
Name string
Desc string
Action *DefaultAction
StatementCondition TWafStatementCondition
Priority int
Statements []SWafStatement
}
type SWafStatement ¶
type SWafStatement struct {
// 管理规则组名称
ManagedRuleGroupName string `width:"64" charset:"utf8" nullable:"false" list:"user"`
// 不包含的规则列表
ExcludeRules *SExcludeRules `width:"200" charset:"utf8" nullable:"false" list:"user"`
// 表达式类别
// enmu: ByteMatch, GeoMatch, IPSet, LabelMatch, ManagedRuleGroup, Rate, RegexSet, RuleGroup, Size, SqliMatch, XssMatch
Type TWafStatementType `width:"20" charset:"ascii" nullable:"false" list:"user"`
// 是否取反操作, 仅对Azure生效
Negation bool `nullable:"false" list:"user"`
// 操作类型
// enum: EQ, NE, LE, LT, GE, GT
Operator TWafOperator `width:"20" charset:"ascii" nullable:"false" list:"user"`
// 匹配字段
// enmu: Body, JsonBody, Query, Method, Header, UriPath, PostArgs, Cookie
MatchField TWafMatchField `width:"20" charset:"utf8" nullable:"false" list:"user"`
// 匹配字段的key
MatchFieldKey string `width:"20" charset:"utf8" nullable:"false" list:"user"`
// 匹配字段的值列表
MatchFieldValues *TWafMatchFieldValues `width:"250" charset:"utf8" nullable:"false" list:"user"`
// 进行转换操作
// enmu: CompressWithSpace, HtmlEntityDecode, Lowercase, CmdLine, UrlDecode, Trim, UrlEncode, RemoveNulls
Transformations *TextTransformations `width:"250" charset:"ascii" nullable:"false" list:"user"`
ForwardedIPHeader string `width:"20" charset:"ascii" nullable:"false" list:"user"`
// 搜索字段, 仅Aws有用
SearchString string `width:"64" charset:"utf8" nullable:"false" list:"user"`
IPSetId string `width:"36" charset:"ascii" nullable:"false" list:"user"`
// 正则表达式Id, 目前只读
RegexSetId string `width:"36" charset:"ascii" nullable:"false" list:"user"`
// 自定义规则组Id, 目前只读
RuleGroupId string `width:"36" charset:"ascii" nullable:"false" list:"user"`
}
+onecloud:model-api-gen
func (SWafStatement) GetExternalId ¶
func (self SWafStatement) GetExternalId() string
func (SWafStatement) GetGlobalId ¶
func (self SWafStatement) GetGlobalId() string
type SWireCreateOptions ¶
type SaveImageOptions ¶
type SecurityGroupReference ¶
type SecurityGroupRuleCreateOptions ¶
type SecurityGroupRuleCreateOptions struct {
Desc string
Priority int
Protocol string
Ports string
Direction secrules.TSecurityRuleDirection
CIDR string
Action secrules.TSecurityRuleAction
}
func (*SecurityGroupRuleCreateOptions) String ¶
func (self *SecurityGroupRuleCreateOptions) String() string
type ServerStopOptions ¶
type ServerVncInput ¶
type ServerVncInput struct {
// 是否使用原生vnc控制台,此选项仅对openstack有效
// default: false
Origin bool `json:"origin"`
}
+onecloud:model-api-gen
type ServerVncOutput ¶
type ServerVncOutput struct {
Id string `json:"id"`
// baremetal
HostId string `json:"host_id"`
Zone string `json:"zone"`
// kvm host ip
Host string `json:"host"`
Protocol string `json:"protocol"`
Port int64 `json:"port"`
// volcengine
Region string `json:"region"`
Url string `json:"url"`
InstanceId string `json:"instance_id"`
InstanceName string `json:"instance_name"`
Password string `json:"password"`
VncPassword string `json:"vnc_password"`
OsName string `json:"os_name"`
// cloudpods
ApiServer string `json:"api_server"`
ConnectParams string `json:"connect_params"`
Session string `json:"session"`
Hypervisor string `json:"hypervisor"`
}
+onecloud:model-api-gen
type SnapshotPolicyInput ¶
type SnapshotPolicyInput struct {
RetentionDays int
RepeatWeekdays []int
TimePoints []int
Name string
Desc string
Tags map[string]string
}
func (*SnapshotPolicyInput) GetStringArrayRepeatWeekdays ¶
func (spi *SnapshotPolicyInput) GetStringArrayRepeatWeekdays() []string
func (*SnapshotPolicyInput) GetStringArrayTimePoints ¶
func (spi *SnapshotPolicyInput) GetStringArrayTimePoints() []string
type Storage ¶
type Storage struct {
DataDisk []StorageInfo
SysDisk []StorageInfo
}
type StorageInfo ¶
type SubAccounts ¶
type SubAccounts struct {
// 若输出则是全量子账号列表,若输入,代表允许同步的子账号
Accounts []SSubAccount
// 若输出是云账号查询到的区域列表,若输入,代表允许同步的区域
Cloudregions []struct {
// 输入必填
Id string
Name string
Status string
}
}
+onecloud:model-api-gen
func (SubAccounts) IsZero ¶
func (self SubAccounts) IsZero() bool
func (SubAccounts) String ¶
func (self SubAccounts) String() string
type SubscriptionCreateInput ¶
type TBackupMethod ¶
type TBackupMethod string
type TBucketACLType ¶
type TBucketACLType string
type TCloudResources ¶
type TCloudResources[T TGlobalIdResource] []T
func (TCloudResources[T]) Len ¶
func (a TCloudResources[T]) Len() int
func (TCloudResources[T]) Less ¶
func (a TCloudResources[T]) Less(i, j int) bool
func (TCloudResources[T]) Swap ¶
func (a TCloudResources[T]) Swap(i, j int)
type TDnsPolicyType ¶
type TDnsPolicyType string
type TDnsPolicyValue ¶
type TDnsPolicyValue string
type TDnsProductType ¶
type TDnsProductType string
type TDnsTTLRangeType ¶
type TDnsTTLRangeType string
type TDnsZoneType ¶
type TDnsZoneType string
type TElasticipChargeType ¶
type TElasticipChargeType string
type TGlobalIdResource ¶
type TGlobalIdResource interface {
GetGlobalId() string
}
type TImageType ¶
type TImageType string
type TMetricType ¶
type TMetricType string
const ( // RDS CPU利用率 // 支持的平台: huawei, aliyun, apsara, azure, jdcloud, qcloud, aws // 仅azure的sqlserver支持group_by = database RDS_METRIC_TYPE_CPU_USAGE TMetricType = "rds_cpu.usage_active" // RDS 内存利用率 // 支持平台: huawei, aliyun, apsara, azure, jdcloud, qcloud // 仅azure的sqlserver支持group_by = database RDS_METRIC_TYPE_MEM_USAGE TMetricType = "rds_mem.used_percent" // RDS 网络入流量 // 支持平台: huawei, aliyun, apsara, azure, aws, jdcloud, qcloud // 仅azure的sqlserver支持group_by = database RDS_METRIC_TYPE_NET_BPS_RX TMetricType = "rds_netio.bps_recv" // RDS 网络出流量 // 支持平台: huawei, aliyun, apsara, azure, aws, jdcloud, qcloud // 仅azure的sqlserver支持group_by = database RDS_METRIC_TYPE_NET_BPS_TX TMetricType = "rds_netio.bps_sent" // RDS磁盘使用率 // 支持平台: huawei, aliyun, apsara, azure, jdcloud, qcloud // 仅azure的sqlserver支持group_by = database RDS_METRIC_TYPE_DISK_USAGE TMetricType = "rds_disk.used_percent" // RDS磁盘读取IO // 支持平台: huawei RDS_METRIC_TYPE_DISK_READ_BPS TMetricType = "rds_diskio.read_bps" // RDS磁盘写IO // 支持平台: huawei RDS_METRIC_TYPE_DISK_WRITE_BPS TMetricType = "rds_diskio.write_bps" // --- // 支持平台: azure RDS_METRIC_TYPE_DISK_IO_PERCENT TMetricType = "rds_diskio.used_percent" // RDS 连接数 // 支持平台: huawei, aws, qcloud RDS_METRIC_TYPE_CONN_COUNT TMetricType = "rds_conn.used_count" // RDS 活跃连接数 // 支持平台: azure RDS_METRIC_TYPE_CONN_ACTIVE TMetricType = "rds_conn.active_count" // 连接数使用率 // 支持平台: aliyun, apsara, qcloud RDS_METRIC_TYPE_CONN_USAGE TMetricType = "rds_conn.used_percent" // 支持平台: azure // 失败连接数 RDS_METRIC_TYPE_CONN_FAILED TMetricType = "rds_conn.failed_count" METRIC_TAG_DATABASE = "database" // RDS QPS(每秒查询数) // 支持平台: huawei, qcloud, aliyun, apsara RDS_METRIC_TYPE_QPS TMetricType = "rds_qps.query_qps" // RDS TPS // 支持平台: huawei, qcloud RDS_METRIC_TYPE_TPS TMetricType = "rds_tps.trans_qps" // RDS innodb读IO // 支持平台: huawei, qcloud RDS_METRIC_TYPE_INNODB_READ_BPS TMetricType = "rds_innodb.read_bps" // RDS innodb写IO // 支持平台 huawei, qcloud RDS_METRIC_TYPE_INNODB_WRITE_BPS TMetricType = "rds_innodb.write_bps" // 虚拟机CPU使用率 // 支持平台: kvm, huawei, aliyun, apsara, azure, esxi, google, bingocloud, aws, jdcloud, ecloud, zstack, qcloud, volcengine VM_METRIC_TYPE_CPU_USAGE TMetricType = "vm_cpu.usage_active" // 虚拟机内存使用率 // 支持平台: kvm, aliyun, apsara, azure, esxi, bingocloud, jdcloud, ecloud, qcloud, volcengine VM_METRIC_TYPE_MEM_USAGE TMetricType = "vm_mem.used_percent" // 虚拟机磁盘使用率 // 支持平台: aliyun, apsara, jdcloud, azure // 支持按盘符(group_by=device)平台: aliyun, apsara VM_METRIC_TYPE_DISK_USAGE TMetricType = "vm_disk.used_percent" // 虚拟机磁盘读速率 // 支持平台: huawei, aliyun, apsara, azure, esxi, google, bingocloud, aws, jdcloud, ecloud, zstack, volcengine VM_METRIC_TYPE_DISK_IO_READ_BPS TMetricType = "vm_diskio.read_bps" // 虚拟机磁盘写速率 // 支持平台: huawei, aliyun, apsara, azure, esxi, google, bingocloud, aws, jdcloud, ecloud, zstack, volcengine VM_METRIC_TYPE_DISK_IO_WRITE_BPS TMetricType = "vm_diskio.write_bps" // 虚拟机磁盘读IOPS // 支持平台: huawei, aliyun, apsara, azure, google, bingocloud, aws, jdcloud, ecloud, zstack, volcengine VM_METRIC_TYPE_DISK_IO_READ_IOPS TMetricType = "vm_diskio.read_iops" // 虚拟机磁盘写IOPS // 支持平台: huawei, aliyun, apsara, azure, google, bingocloud, aws, jdcloud, ecloud, zstack, volcengine VM_METRIC_TYPE_DISK_IO_WRITE_IOPS TMetricType = "vm_diskio.write_iops" // 虚拟机网络入速率 // 支持平台: huawei, aliyun, apsara, azure, esxi, google, bingocloud, aws, jdcloud, ecloud, zstack, qcloud, volcengine VM_METRIC_TYPE_NET_BPS_RX TMetricType = "vm_netio.bps_recv" // 虚拟机网络出速率 // 支持平台: huawei, aliyun, apsara, azure, esxi, google, bingocloud, aws, jdcloud, ecloud, zstack, qcloud, volcengine VM_METRIC_TYPE_NET_BPS_TX TMetricType = "vm_netio.bps_sent" // 虚拟机TCP连接数 // 支持平台: aliyun, apsara, volcengine VM_METRIC_TYPE_NET_TCP_CONNECTION TMetricType = "vm_netio.tcp_connections" // 虚拟机进程监控 // 支持平台: aliyun, apsara VM_METRIC_TYPE_PROCESS_NUMBER = "vm_process.number" // 宿主机CPU使用率 // 支持平台: esxi HOST_METRIC_TYPE_CPU_USAGE TMetricType = "cpu.usage_active" // 宿主机内存使用率 // 支持平台: esxi HOST_METRIC_TYPE_MEM_USAGE TMetricType = "mem.used_percent" // 宿主机磁盘读速率 // 支持平台: esxi HOST_METRIC_TYPE_DISK_IO_READ_BPS TMetricType = "diskio.read_bps" // 宿主机磁盘写速率 // 支持平台: esxi HOST_METRIC_TYPE_DISK_IO_WRITE_BPS TMetricType = "diskio.write_bps" // 宿主机网络入速率 // 支持平台: esxi HOST_METRIC_TYPE_NET_BPS_RX TMetricType = "net.bps_recv" // 宿主机网络出速率 // 支持平台: esxi HOST_METRIC_TYPE_NET_BPS_TX TMetricType = "net.bps_sent" //宿主机磁盘读IOPS // 支持平台: bingocloud HOST_METRIC_TYPE_DISK_IO_READ_IOPS TMetricType = "diskio.read_iops" //宿主机磁盘写IOPS // 支持平台: bingocloud HOST_METRIC_TYPE_DISK_IO_WRITE_IOPS TMetricType = "diskio.write_iops" // Redis CPU使用率 // 支持平台: huawei, aliyun, azure, apsara, aws, qcloud REDIS_METRIC_TYPE_CPU_USAGE TMetricType = "dcs_cpu.usage_active" // Redis 内存使用率 // 支持平台: huawei, aliyun, azure, apsara, qcloud REDIS_METRIC_TYPE_MEM_USAGE TMetricType = "dcs_mem.used_percent" // Redis 网络入速率 // 支持平台: huawei, aliyun, apsara, qcloud REDIS_METRIC_TYPE_NET_BPS_RX TMetricType = "dcs_netio.bps_recv" // Redis 网络出速率 // 支持平台: huawei, aliyun, apsara, qcloud REDIS_METRIC_TYPE_NET_BPS_TX TMetricType = "dcs_netio.bps_sent" // Redis 网络连接数 // 支持平台: huawei, aliyun, apsara, azure, aws, qcloud REDIS_METRIC_TYPE_USED_CONN TMetricType = "dcs_conn.used_conn" // 每秒处理指令数 // 支持平台: huawei, aliyun, apsara, azure, qcloud REDIS_METRIC_TYPE_OPT_SES TMetricType = "dcs_instantopt.opt_sec" // 命中key数量 // 支持平台: huawei, aliyun, apsara, azure, qcloud REDIS_METRIC_TYPE_CACHE_KEYS TMetricType = "dcs_cachekeys.key_count" // Expired Key数量 // 支持平台: huawei, aliyun, apsara, azure, aws, qcloud REDIS_METRIC_TYPE_CACHE_EXP_KEYS TMetricType = "dcs_cachekeys.expire_key_count" // 内存使用量 // 支持平台: huawei, aliyun, azure, apsara, qcloud REDIS_METRIC_TYPE_DATA_MEM_USAGE TMetricType = "dcs_datamem.used_byte" // 支持平台: azure LB_METRIC_TYPE_SNAT_PORT TMetricType = "haproxy.used_snat_port" // 支持平台: azure LB_METRIC_TYPE_SNAT_CONN_COUNT TMetricType = "haproxy.snat_conn_count" // 入带宽速率 // 支持平台: huawei, aliyun, apsara LB_METRIC_TYPE_NET_BPS_RX TMetricType = "haproxy.bin" // 出带宽速率 // 支持平台: huawei, aliyun, apsara LB_METRIC_TYPE_NET_BPS_TX TMetricType = "haproxy.bout" // 入包速率 // 支持平台: aliyun, apsara LB_METRIC_TYPE_NET_PACKET_RX TMetricType = "haproxy.packet_rx" // 出包速率 // 支持平台: aliyun, apsara LB_METRIC_TYPE_NET_PACKET_TX TMetricType = "haproxy.packet_tx" // 非活跃连接数 // 支持平台: apsara, aliyun, huawei LB_METRIC_TYPE_NET_INACTIVE_CONNECTION = "haproxy.inactive_connection" // 活跃连接数 // 支持平台: apsara, aliyun, huawei LB_METRIC_TYPE_NET_ACTIVE_CONNECTION = "haproxy.active_connection" // 最大并发数 // 支持平台: apsara, aliyun, huawei LB_METRIC_TYPE_MAX_CONNECTION = "haproxy.max_connection" // 后端异常ECS实例个数 // 支持平台: apsara, aliyun LB_METRIC_TYPE_UNHEALTHY_SERVER_COUNT = "haproxy.unhealthy_server_count" // 状态码统计 // 支持平台: huawei, aliyun, apsara LB_METRIC_TYPE_HRSP_COUNT TMetricType = "haproxy.hrsp_Nxx" // 入方向丢弃流量 // 支持平台: aliyun LB_METRIC_TYPE_DROP_TRAFFIC_TX = "haproxy.drop_traffic_tx" // 出方向丢弃流量 // 支持平台: aliyun, apsara LB_METRIC_TYPE_DROP_TRAFFIC_RX = "haproxy.drop_traffic_rx" // 入方向丢弃包数 // 支持平台: aliyun LB_METRIC_TYPE_DROP_PACKET_TX = "haproxy.drop_packet_tx" // 出方向丢弃包数 // 支持平台: aliyun, apsara LB_METRIC_TYPE_DROP_PACKET_RX = "haproxy.drop_packet_rx" // 对象存储出速率 // 支持平台: huawei, aliyun, apsara BUCKET_METRIC_TYPE_NET_BPS_TX TMetricType = "oss_netio.bps_sent" // 对象存储入速率 // 支持平台: huawei, aliyun, apsara BUCKET_METRIC_TYPE_NET_BPS_RX TMetricType = "oss_netio.bps_recv" // 请求延时 // 支持平台: huawei, aliyun, apsara BUCKET_METRIC_TYPE_LATECY TMetricType = "oss_latency.req_late" // 总请求数量 // 支持平台: huawei, aliyun, apsara BUCKET_METRYC_TYPE_REQ_COUNT TMetricType = "oss_req.req_count" // 服务端请求错误数量 // 支持平台: aliyun, apsara, volcengine BUCKET_METRIC_TYPE_REQ_5XX_COUNT TMetricType = "oss_req.5xx_count" // 服务端请求错误数量 // 支持平台: aliyun, apsara, volcengine BUCKET_METRIC_TYPE_REQ_4XX_COUNT TMetricType = "oss_req.4xx_count" // 重定向数量 // 支持平台: aliyun, apsara, volcengine BUCKET_METRIC_TYPE_REQ_3XX_COUNT TMetricType = "oss_req.3xx_count" // 正常请求数量 // 支持平台: aliyun, apsara, volcengine BUCKET_METRIC_TYPE_REQ_2XX_COUNT TMetricType = "oss_req.2xx_count" // 存储总容量(bit) // 支持平台: aliyun, apsara BUCKET_METRIC_TYPE_STORAGE_SIZE = "oss_storage.size" METRIC_TAG_REQUST = "request" METRIC_TAG_REQUST_GET = "get" METRIC_TAG_REQUST_POST = "post" METRIC_TAG_REQUST_2XX = "2xx" METRIC_TAG_REQUST_3XX = "3xx" METRIC_TAG_REQUST_4XX = "4xx" METRIC_TAG_REQUST_5XX = "5xx" METRIC_TAG_NET_TYPE = "net_type" METRIC_TAG_NET_TYPE_INTERNET = "internet" METRIC_TAG_NET_TYPE_INTRANET = "intranet" METRIC_TAG_TYPE_DISK_TYPE = "disk_type" METRIC_TAG_TYPE_DISK_TYPE_EBS = "ebs" // 磁盘利用率 METRIC_TAG_DEVICE = "device" // 进程名称 METRIC_TAG_PROCESS_NAME = "process_name" // 状态 METRIC_TAG_STATE = "state" METRIC_TAG_NODE = "node" // k8s节点CPU使用率 // 支持平台: aliyun, azure, qcloud K8S_NODE_METRIC_TYPE_CPU_USAGE TMetricType = "k8s_node_cpu.usage_active" // k8s节点内存使用率 // 支持平台: aliyun, azure, qcloud K8S_NODE_METRIC_TYPE_MEM_USAGE TMetricType = "k8s_node_mem.used_percent" K8S_NODE_METRIC_TYPE_DISK_USAGE TMetricType = "k8s_node_disk.used_percent" K8S_NODE_METRIC_TYPE_NET_BPS_RX TMetricType = "k8s_node_netio.bps_recv" K8S_NODE_METRIC_TYPE_NET_BPS_TX TMetricType = "k8s_node_netio.bps_sent" // modelarts专属资源池监控数据 MODELARTS_POOL_METRIC_TYPE_CPU_USAGE TMetricType = "modelarts_pool_cpu.usage_percent" MODELARTS_POOL_METRIC_TYPE_MEM_USAGE TMetricType = "modelarts_pool_mem.usage_percent" MODELARTS_POOL_METRIC_TYPE_GPU_MEM_USAGE TMetricType = "modelarts_pool_gpu_mem.usage_percent" MODELARTS_POOL_METRIC_TYPE_GPU_UTIL TMetricType = "modelarts_pool_gpu_util.percent" MODELARTS_POOL_METRIC_TYPE_NPU_UTIL TMetricType = "modelarts_pool_npu_util.percent" MODELARTS_POOL_METRIC_TYPE_NPU_MEM_USAGE TMetricType = "modelarts_pool_npu_mem.usage_percent" //磁盘可用容量 MODELARTS_POOL_METRIC_TYPE_DISK_AVAILABLE_CAPACITY TMetricType = "modelarts_pool_disk.available_capacity" MODELARTS_POOL_METRIC_TYPE_DISK_CAPACITY TMetricType = "modelarts_pool_disk.capacity" MODELARTS_POOL_METRIC_TYPE_DISK_USAGE TMetricType = "modelarts_pool_disk.usage_percent" WIRE_METRIC_TYPE_CPU_USAGE TMetricType = "wire_cpu.usage_percent" WIRE_METRIC_TYPE_MEM_USAGE TMetricType = "wire_mem.usage_percent" WIRE_METRIC_TYPE_NET_RT TMetricType = "wire_net.rt" // 响应时间ms WIRE_METRIC_TYPE_NET_UNREACHABLE_RATE TMetricType = "wire_net.unreachable_rate" // 不可达率 // EIP入带宽 EIP_METRIC_TYPE_NET_BPS_RX TMetricType = "eip_net.bps_recv" // EIP出带宽 EIP_METRIC_TYPE_NET_BPS_TX TMetricType = "eip_net.bps_sent" // EIP 出方向限速丢包率 EIP_METRIC_TYPE_NET_DROP_SPEED_TX TMetricType = "eip_net.drop_speed_rx" )
func (TMetricType) Key ¶
func (key TMetricType) Key() string
func (TMetricType) Name ¶
func (key TMetricType) Name() string
type TRWAccessType ¶
type TRWAccessType string
type TResourceType ¶
type TResourceType string
const ( METRIC_RESOURCE_TYPE_RDS TResourceType = "rds" METRIC_RESOURCE_TYPE_SERVER TResourceType = "server" METRIC_RESOURCE_TYPE_HOST TResourceType = "host" METRIC_RESOURCE_TYPE_REDIS TResourceType = "redis" METRIC_RESOURCE_TYPE_LB TResourceType = "lb" METRIC_RESOURCE_TYPE_BUCKET TResourceType = "bucket" METRIC_RESOURCE_TYPE_K8S TResourceType = "k8s" METRIC_RESOURCE_TYPE_STORAGE TResourceType = "storage" METRIC_RESOURCE_TYPE_WIRE TResourceType = "wire" METRIC_RESOURCE_TYPE_CLOUD_ACCOUNT TResourceType = "cloudaccount_balance" METRIC_RESOURCE_TYPE_MODELARTS_POOL TResourceType = "modelarts" METRIC_RESOURCE_TYPE_EIP TResourceType = "eip" )
type TTlRange ¶
type TTlRange struct {
RangeType TDnsTTLRangeType
TTLMinValue int64
TTLMaxValue int64
AllowedTTLs []int64 // sorted
}
func (TTlRange) GetSuppportedTTL ¶
type TUserAccessType ¶
type TUserAccessType string
type TWafAction ¶
type TWafAction string
type TWafMatchField ¶
type TWafMatchField string
type TWafMatchFieldValues ¶
type TWafMatchFieldValues []string
func (TWafMatchFieldValues) IsZero ¶
func (self TWafMatchFieldValues) IsZero() bool
func (TWafMatchFieldValues) String ¶
func (self TWafMatchFieldValues) String() string
type TWafOperator ¶
type TWafOperator string
type TWafStatementCondition ¶
type TWafStatementCondition string
type TWafStatementType ¶
type TWafStatementType string
type TWafTextTransformation ¶
type TWafTextTransformation string
type TagsUpdateInfo ¶
func SetBucketTags ¶
func SetBucketTags(ctx context.Context, iBucket ICloudBucket, mangerId string, tags map[string]string) (TagsUpdateInfo, error)
func (TagsUpdateInfo) IsChanged ¶
func (t TagsUpdateInfo) IsChanged() bool
type TextTransformations ¶
type TextTransformations []TWafTextTransformation
func (TextTransformations) IsZero ¶
func (self TextTransformations) IsZero() bool
func (TextTransformations) String ¶
func (self TextTransformations) String() string
type VpcCreateOptions ¶
type WafAddresses ¶
type WafAddresses []string
+onecloud:model-api-gen
func (WafAddresses) IsZero ¶
func (self WafAddresses) IsZero() bool
func (WafAddresses) String ¶
func (self WafAddresses) String() string
type WafCreateOptions ¶
type WafCreateOptions struct {
Name string
Desc string
CloudResources []SCloudResource
SourceIps WafSourceIps
Type TWafType
DefaultAction *DefaultAction
}
type WafRegexPatterns ¶
type WafRegexPatterns []string
+onecloud:model-api-gen
func (WafRegexPatterns) IsZero ¶
func (self WafRegexPatterns) IsZero() bool
func (WafRegexPatterns) String ¶
func (self WafRegexPatterns) String() string
type WafSourceIps ¶
type WafSourceIps []string
Source Files
¶
- access_group.go
- cdn.go
- cloudprovider.go
- cloudrole.go
- clouduser.go
- consts.go
- dbinstance.go
- disk.go
- dnszone.go
- doc.go
- eip.go
- elasticcache.go
- elasticsearch.go
- endpoints.go
- errors.go
- extra.go
- fakeregion.go
- geoinfo.go
- globalvpc.go
- hostnetifs.go
- i18n.go
- images.go
- instance.go
- inter_vpc_network.go
- kafka.go
- kube_cluster.go
- loadbalancer.go
- loadbalanceracl.go
- loadbalancerbackend.go
- loadbalancerbackendgroup.go
- loadbalancercertificate.go
- loadbalancerlistener.go
- metrics.go
- modelarts_pool.go
- mongodb.go
- mount_target.go
- nas.go
- nat.go
- network.go
- objectstore.go
- osinfo.go
- resources.go
- resourcetags.go
- retry.go
- route_table.go
- saml.go
- securitygroup.go
- serversku.go
- snapshot_policy.go
- subaccount.go
- subscription.go
- transport.go
- vpc.go
- vpc_peering_connection.go
- waf.go
- waitstatus.go