google

package
v0.3.10-0-alpha.0 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2022 License: Apache-2.0 Imports: 42 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CLOUD_PROVIDER_GOOGLE    = api.CLOUD_PROVIDER_GOOGLE
	CLOUD_PROVIDER_GOOGLE_CN = "谷歌云"

	GOOGLE_DEFAULT_REGION = "asia-east1"

	GOOGLE_API_VERSION         = "v1"
	GOOGLE_MANAGER_API_VERSION = "v1"

	GOOGLE_STORAGE_API_VERSION    = "v1"
	GOOGLE_CLOUDBUILD_API_VERSION = "v1"
	GOOGLE_BILLING_API_VERSION    = "v1"
	GOOGLE_MONITOR_API_VERSION    = "v3"
	GOOGLE_DBINSTANCE_API_VERSION = "v1beta4"
	GOOGLE_IAM_API_VERSION        = "v1"

	GOOGLE_BIGQUERY_API_VERSION = "v2"

	GOOGLE_MANAGER_DOMAIN        = "https://cloudresourcemanager.googleapis.com"
	GOOGLE_COMPUTE_DOMAIN        = "https://www.googleapis.com/compute"
	GOOGLE_STORAGE_DOMAIN        = "https://storage.googleapis.com/storage"
	GOOGLE_CLOUDBUILD_DOMAIN     = "https://cloudbuild.googleapis.com"
	GOOGLE_STORAGE_UPLOAD_DOMAIN = "https://www.googleapis.com/upload/storage"
	GOOGLE_BILLING_DOMAIN        = "https://cloudbilling.googleapis.com"
	GOOGLE_MONITOR_DOMAIN        = "https://monitoring.googleapis.com"
	GOOGLE_DBINSTANCE_DOMAIN     = "https://www.googleapis.com/sql"
	GOOGLE_IAM_DOMAIN            = "https://iam.googleapis.com"
	GOOGLE_BIGQUERY_DOMAIN       = "https://bigquery.googleapis.com/bigquery"

	MAX_RETRY = 3
)
View Source
const (
	METADATA_SSH_KEYS                   = "ssh-keys"
	METADATA_STARTUP_SCRIPT             = "startup-script"
	METADATA_POWER_SHELL                = "sysprep-specialize-script-ps1"
	METADATA_STARTUP_SCRIPT_POWER_SHELL = "windows-startup-script-ps1"
)
View Source
const (
	OPERATION_STATUS_RUNNING = "RUNNING"
	OPERATION_STATUS_DONE    = "DONE"
)
View Source
const (
	SECGROUP_TYPE_SERVICE_ACCOUNT = "serviceAccount"
	SECGROUP_TYPE_TAG             = "tag"
)

Variables

View Source
var (
	EngineVersions = map[string]GoogleSQLVersion{
		"MYSQL_5_5":                 GoogleSQLVersion{Engine: api.DBINSTANCE_TYPE_MYSQL, Version: "5.5"},
		"MYSQL_5_6":                 GoogleSQLVersion{Engine: api.DBINSTANCE_TYPE_MYSQL, Version: "5.6"},
		"MYSQL_5_7":                 GoogleSQLVersion{Engine: api.DBINSTANCE_TYPE_MYSQL, Version: "5.7"},
		"POSTGRES_9_6":              GoogleSQLVersion{Engine: api.DBINSTANCE_TYPE_POSTGRESQL, Version: "9.6"},
		"POSTGRES_10":               GoogleSQLVersion{Engine: api.DBINSTANCE_TYPE_POSTGRESQL, Version: "10"},
		"POSTGRES_11":               GoogleSQLVersion{Engine: api.DBINSTANCE_TYPE_POSTGRESQL, Version: "11"},
		"POSTGRES_12":               GoogleSQLVersion{Engine: api.DBINSTANCE_TYPE_POSTGRESQL, Version: "12"},
		"SQLSERVER_2017_STANDARD":   GoogleSQLVersion{Engine: api.DBINSTANCE_TYPE_SQLSERVER, Version: "2017 Standard"},
		"SQLSERVER_2017_ENTERPRISE": GoogleSQLVersion{Engine: api.DBINSTANCE_TYPE_SQLSERVER, Version: "2017 Enterprise"},
		"SQLSERVER_2017_EXPRESS":    GoogleSQLVersion{Engine: api.DBINSTANCE_TYPE_SQLSERVER, Version: "2017 Express"},
		"SQLSERVER_2017_WEB":        GoogleSQLVersion{Engine: api.DBINSTANCE_TYPE_SQLSERVER, Version: "2017 Web"},
	}
	InstanceTypes = map[string]GoogleSQLType{
		"db-f1-micro": GoogleSQLType{VcpuCount: 1, VmemSizeMb: 614},
		"db-g1-small": GoogleSQLType{VcpuCount: 1, VmemSizeMb: 1740},
		"D0":          GoogleSQLType{VcpuCount: 1, VmemSizeMb: 512},
		"D1":          GoogleSQLType{VcpuCount: 1, VmemSizeMb: 1024},
		"D2":          GoogleSQLType{VcpuCount: 1, VmemSizeMb: 2048},
		"D4":          GoogleSQLType{VcpuCount: 1, VmemSizeMb: 5120},
		"D8":          GoogleSQLType{VcpuCount: 2, VmemSizeMb: 10240},
		"D16":         GoogleSQLType{VcpuCount: 4, VmemSizeMb: 10240},
		"D32":         GoogleSQLType{VcpuCount: 8, VmemSizeMb: 10240},
	}
)
View Source
var (
	MultiRegions []string = []string{"us", "eu", "asia"}
	DualRegions  []string = []string{"nam4", "eur4"}
)
View Source
var LatitudeAndLongitude = map[string]cloudprovider.SGeographicInfo{
	"asia-east1":           api.RegionTaiwan,
	"asia-east2":           api.RegionHongkong,
	"asia-northeast1":      api.RegionTokyo,
	"asia-northeast2":      api.RegionOsaka,
	"asia-northeast3":      api.RegionSeoul,
	"asia-south1":          api.RegionMumbai,
	"asia-south2":          api.RegionDelhi,
	"asia-southeast1":      api.RegionSingapore,
	"asia-southeast2":      api.RegionJakarta,
	"australia-southeast1": api.RegionSydney,
	"australia-southeast2": api.RegionMelbourne,

	"europe-north1":   api.RegionFinland,
	"europe-west1":    api.RegionBelgium,
	"europe-west2":    api.RegionLondon,
	"europe-west3":    api.RegionFrankfurt,
	"europe-west4":    api.RegionHolland,
	"europe-west6":    api.RegionZurich,
	"europe-central2": api.RegionWarsaw,

	"northamerica-northeast1": api.RegionMontreal,
	"northamerica-northeast2": api.RegionToronto,
	"southamerica-east1":      api.RegionSaoPaulo,
	"us-central1":             api.RegionIowa,
	"us-east1":                api.RegionCarolina,
	"us-east4":                api.RegionNothVirginia,
	"us-west1":                api.RegionOregon,
	"us-west2":                api.RegionLosAngeles,
	"us-west3":                api.RegionSaltLakeCity,
	"us-west4":                api.RegionLasVegas,
	"southamerica-west1":      api.RegionSantiago,
}
View Source
var RegionNames = map[string]string{
	"asia-east1":           "台湾",
	"asia-east2":           "香港",
	"asia-northeast1":      "东京",
	"asia-northeast2":      "大阪",
	"asia-northeast3":      "首尔",
	"asia-south1":          "孟买",
	"asia-south2":          "德里",
	"asia-southeast1":      "新加坡",
	"asia-southeast2":      "雅加达",
	"australia-southeast1": "悉尼",
	"australia-southeast2": "墨尔本",

	"europe-north1":   "芬兰",
	"europe-west1":    "比利时",
	"europe-west2":    "伦敦",
	"europe-west3":    "法兰克福",
	"europe-west4":    "荷兰",
	"europe-west6":    "苏黎世",
	"europe-central2": "华沙",

	"northamerica-northeast1": "蒙特利尔",
	"northamerica-northeast2": "多伦多",
	"southamerica-east1":      "圣保罗",
	"southamerica-west1":      "圣地亚哥",
	"us-central1":             "爱荷华",
	"us-east1":                "南卡罗来纳州",
	"us-east4":                "北弗吉尼亚",
	"us-west1":                "俄勒冈州",
	"us-west2":                "洛杉矶",
	"us-west3":                "盐湖城",
	"us-west4":                "拉斯维加斯",

	"us":   "美国的多区域",
	"eu":   "欧盟的多区域",
	"asia": "亚洲的多区域",

	"nam4": "爱荷华和南卡罗来纳",
	"eur4": "荷兰和芬兰",
}

Functions

This section is empty.

Types

type Abort

type Abort struct {
	HTTPStatus int64   `json:"httpStatus"`
	Percentage float64 `json:"percentage"`
}

type AccessConfig

type AccessConfig struct {
	Type        string
	Name        string
	NatIP       string
	NetworkTier string
	Kind        string
}

type Backend

type Backend struct {
	Group         string `json:"group"`
	BalancingMode string `json:"balancingMode"`
	Failover      bool   `json:"failover"`
}

type BindingCondition

type BindingCondition struct {
	Title       string
	Description string
	Expression  string
}

type ConnectionDraining

type ConnectionDraining struct {
	DrainingTimeoutSEC int64 `json:"drainingTimeoutSec"`
}

type ConsistentHash

type ConsistentHash struct {
	HTTPCookie      HTTPCookie `json:"httpCookie"`
	MinimumRingSize string     `json:"minimumRingSize"`
}

type CorsPolicy

type CorsPolicy struct {
	AllowOrigins       []string `json:"allowOrigins"`
	AllowOriginRegexes []string `json:"allowOriginRegexes"`
	AllowMethods       []string `json:"allowMethods"`
	AllowHeaders       []string `json:"allowHeaders"`
	ExposeHeaders      []string `json:"exposeHeaders"`
	MaxAge             int64    `json:"maxAge"`
	AllowCredentials   bool     `json:"allowCredentials"`
	Disabled           bool     `json:"disabled"`
}

type Delay

type Delay struct {
	FixedDelay MaxStreamDuration `json:"fixedDelay"`
	Percentage float64           `json:"percentage"`
}

type FaultInjectionPolicy

type FaultInjectionPolicy struct {
	Delay Delay `json:"delay"`
	Abort Abort `json:"abort"`
}

type GCSAcl

type GCSAcl struct {
	Kind        string
	Id          string
	SelfLink    string
	Bucket      string
	Entity      string
	Role        string
	Etag        string
	ProjectTeam map[string]string
}

type GoogleClientConfig

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

func NewGoogleClientConfig

func NewGoogleClientConfig(projectId, clientEmail, privateKeyId, privateKey string) *GoogleClientConfig

func (*GoogleClientConfig) CloudproviderConfig

func (cfg *GoogleClientConfig) CloudproviderConfig(cpcfg cloudprovider.ProviderConfig) *GoogleClientConfig

func (*GoogleClientConfig) Debug

func (cfg *GoogleClientConfig) Debug(debug bool) *GoogleClientConfig

type GoogleSQLType

type GoogleSQLType struct {
	VcpuCount  int
	VmemSizeMb int
}

type GoogleSQLVersion

type GoogleSQLVersion struct {
	Engine  string
	Version string
}

type GuestOsFeature

type GuestOsFeature struct {
	Type string
}

type HTTPCookie

type HTTPCookie struct {
	Name string `json:"name"`
	Path string `json:"path"`
	TTL  TTL    `json:"ttl"`
}

type HTTPHealthCheck

type HTTPHealthCheck struct {
	Port        int64  `json:"port"`
	Host        string `json:"host"`
	RequestPath string `json:"requestPath"`
	ProxyHeader string `json:"proxyHeader"`
	Response    string `json:"response"`
}
type Header struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

type HeaderAction

type HeaderAction struct {
	RequestHeadersToRemove  []string       `json:"requestHeadersToRemove"`
	RequestHeadersToAdd     []HeadersToAdd `json:"requestHeadersToAdd"`
	ResponseHeadersToRemove []string       `json:"responseHeadersToRemove"`
	ResponseHeadersToAdd    []HeadersToAdd `json:"responseHeadersToAdd"`
}

type HeaderMatch

type HeaderMatch struct {
	HeaderName   string     `json:"headerName"`
	ExactMatch   string     `json:"exactMatch"`
	RegexMatch   string     `json:"regexMatch"`
	RangeMatch   RangeMatch `json:"rangeMatch"`
	PresentMatch bool       `json:"presentMatch"`
	PrefixMatch  string     `json:"prefixMatch"`
	SuffixMatch  string     `json:"suffixMatch"`
	InvertMatch  bool       `json:"invertMatch"`
}

type HeadersToAdd

type HeadersToAdd struct {
	HeaderName  string `json:"headerName"`
	HeaderValue string `json:"headerValue"`
	Replace     bool   `json:"replace"`
}

type HealthChecks

type HealthChecks struct {
	SResourceBase

	CreationTimestamp  string          `json:"creationTimestamp"`
	Description        string          `json:"description"`
	CheckIntervalSEC   int64           `json:"checkIntervalSec"`
	TimeoutSEC         int64           `json:"timeoutSec"`
	UnhealthyThreshold int64           `json:"unhealthyThreshold"`
	HealthyThreshold   int64           `json:"healthyThreshold"`
	Type               string          `json:"type"`
	HTTPSHealthCheck   HTTPHealthCheck `json:"httpsHealthCheck"`
	Region             string          `json:"region"`
	Kind               string          `json:"kind"`
	Http2HealthCheck   HTTPHealthCheck `json:"http2HealthCheck"`
	TCPHealthCheck     TCPHealthCheck  `json:"tcpHealthCheck"`
	SSLHealthCheck     SSLHealthCheck  `json:"sslHealthCheck"`
	HTTPHealthCheck    HTTPHealthCheck `json:"httpHealthCheck"`
}

type HostRule

type HostRule struct {
	Description string   `json:"description"`
	Hosts       []string `json:"hosts"`
	PathMatcher string   `json:"pathMatcher"`
}

type InstanceDisk

type InstanceDisk struct {
	Type            string
	Mode            string
	Source          string
	DeviceName      string
	Index           int
	Boot            bool
	AutoDelete      bool
	Licenses        []string
	Interface       string
	GuestOsFeatures []GuestOsFeature
	Kind            string
}

type LogConfig

type LogConfig struct {
	Enable bool `json:"enable"`
}

type MatchRule

type MatchRule struct {
	PrefixMatch           string                `json:"prefixMatch"`
	FullPathMatch         string                `json:"fullPathMatch"`
	RegexMatch            string                `json:"regexMatch"`
	IgnoreCase            bool                  `json:"ignoreCase"`
	HeaderMatches         []HeaderMatch         `json:"headerMatches"`
	QueryParameterMatches []QueryParameterMatch `json:"queryParameterMatches"`
	MetadataFilters       []MetadataFilter      `json:"metadataFilters"`
}

type MaxStreamDuration

type MaxStreamDuration struct {
	Seconds string `json:"seconds"`
	Nanos   int64  `json:"nanos"`
}

type MetadataFilter

type MetadataFilter struct {
	FilterMatchCriteria string   `json:"filterMatchCriteria"`
	FilterLabels        []Header `json:"filterLabels"`
}

type MetricData

type MetricData struct {
	Resource struct {
		Labels struct {
			InstanceId string
		}
	}
	MetricKind string
	ValueType  string
	Points     []struct {
		Interval struct {
			StartTime time.Time
			EndTime   time.Time
		}
		Value MetricDataValue
	}
}

type MetricDataValue

type MetricDataValue struct {
	DoubleValue float64
	Int64Value  float64
}

func (*MetricDataValue) GetValue

func (self *MetricDataValue) GetValue() float64

type NamedPort

type NamedPort struct {
	Name string `json:"name"`
	Port int64  `json:"port"`
}

type OperationError

type OperationError struct {
	Kind    string
	Code    string
	Message string
}

type PathMatcher

type PathMatcher struct {
	Name               string       `json:"name"`
	Description        string       `json:"description"`
	DefaultService     string       `json:"defaultService"`
	DefaultRouteAction RouteAction  `json:"defaultRouteAction"`
	DefaultURLRedirect URLRedirect  `json:"defaultUrlRedirect"`
	PathRules          []PathRule   `json:"pathRules"`
	RouteRules         []RouteRule  `json:"routeRules"`
	HeaderAction       HeaderAction `json:"headerAction"`
}

type PathRule

type PathRule struct {
	Service     string      `json:"service"`
	RouteAction RouteAction `json:"routeAction"`
	URLRedirect URLRedirect `json:"urlRedirect"`
	Paths       []string    `json:"paths"`
}

type QueryParameterMatch

type QueryParameterMatch struct {
	Name         string `json:"name"`
	PresentMatch bool   `json:"presentMatch"`
	ExactMatch   string `json:"exactMatch"`
	RegexMatch   string `json:"regexMatch"`
}

type RangeMatch

type RangeMatch struct {
	RangeStart string `json:"rangeStart"`
	RangeEnd   string `json:"rangeEnd"`
}

type RequestMirrorPolicy

type RequestMirrorPolicy struct {
	BackendService string `json:"backendService"`
}

type RetryPolicy

type RetryPolicy struct {
	RetryConditions []string          `json:"retryConditions"`
	NumRetries      int64             `json:"numRetries"`
	PerTryTimeout   MaxStreamDuration `json:"perTryTimeout"`
}

type RouteAction

type RouteAction struct {
	WeightedBackendServices []WeightedBackendService `json:"weightedBackendServices"`
	URLRewrite              URLRewrite               `json:"urlRewrite"`
	Timeout                 MaxStreamDuration        `json:"timeout"`
	RetryPolicy             RetryPolicy              `json:"retryPolicy"`
	RequestMirrorPolicy     RequestMirrorPolicy      `json:"requestMirrorPolicy"`
	CorsPolicy              CorsPolicy               `json:"corsPolicy"`
	FaultInjectionPolicy    FaultInjectionPolicy     `json:"faultInjectionPolicy"`
	MaxStreamDuration       MaxStreamDuration        `json:"maxStreamDuration"`
}

type RouteRule

type RouteRule struct {
	Priority     int64        `json:"priority"`
	Description  string       `json:"description"`
	MatchRules   []MatchRule  `json:"matchRules"`
	Service      string       `json:"service"`
	RouteAction  RouteAction  `json:"routeAction"`
	URLRedirect  URLRedirect  `json:"urlRedirect"`
	HeaderAction HeaderAction `json:"headerAction"`
}

type SAddress

type SAddress struct {
	SResourceBase
	multicloud.SEipBase
	multicloud.GoogleTags

	CreationTimestamp time.Time
	Description       string
	Address           string
	Status            string
	Region            string
	Users             []string
	NetworkTier       string
	AddressType       string
	Kind              string
	// contains filtered or unexported fields
}

func (*SAddress) Associate

func (addr *SAddress) Associate(conf *cloudprovider.AssociateConfig) error

func (*SAddress) ChangeBandwidth

func (addr *SAddress) ChangeBandwidth(bw int) error

func (*SAddress) Delete

func (addr *SAddress) Delete() error

func (*SAddress) Dissociate

func (addr *SAddress) Dissociate() error

func (*SAddress) GetAssociationExternalId

func (addr *SAddress) GetAssociationExternalId() string

func (*SAddress) GetAssociationType

func (addr *SAddress) GetAssociationType() string

func (*SAddress) GetBandwidth

func (addr *SAddress) GetBandwidth() int

func (*SAddress) GetBillingType

func (addr *SAddress) GetBillingType() string

func (*SAddress) GetCreatedAt

func (addr *SAddress) GetCreatedAt() time.Time

func (*SAddress) GetExpiredAt

func (addr *SAddress) GetExpiredAt() time.Time

func (*SAddress) GetINetworkId

func (addr *SAddress) GetINetworkId() string

func (*SAddress) GetInternetChargeType

func (addr *SAddress) GetInternetChargeType() string

func (*SAddress) GetIpAddr

func (addr *SAddress) GetIpAddr() string

func (*SAddress) GetMode

func (addr *SAddress) GetMode() string

func (*SAddress) GetProjectId

func (addr *SAddress) GetProjectId() string

func (*SAddress) GetStatus

func (addr *SAddress) GetStatus() string

func (*SAddress) IsEmulated

func (addr *SAddress) IsEmulated() bool

func (*SAddress) Refresh

func (self *SAddress) Refresh() error

type SAuthorizedNetwork

type SAuthorizedNetwork struct {
	Value string
	Kind  string
	Name  string
}

type SBackendServices

type SBackendServices struct {
	SResourceBase

	CreationTimestamp    string             `json:"creationTimestamp"`
	Description          string             `json:"description"`
	Backends             []Backend          `json:"backends"`
	HealthChecks         []string           `json:"healthChecks"`
	TimeoutSEC           int64              `json:"timeoutSec"`
	Port                 int64              `json:"port"`
	Protocol             string             `json:"protocol"`
	Fingerprint          string             `json:"fingerprint"`
	PortName             string             `json:"portName"`
	SessionAffinity      string             `json:"sessionAffinity"`
	AffinityCookieTTLSEC int64              `json:"affinityCookieTtlSec"`
	Region               string             `json:"region"`
	LoadBalancingScheme  string             `json:"loadBalancingScheme"`
	ConnectionDraining   ConnectionDraining `json:"connectionDraining"`
	LocalityLBPolicy     string             `json:"localityLbPolicy"`
	ConsistentHash       ConsistentHash     `json:"consistentHash"`
	Kind                 string             `json:"kind"`
	EnableCDN            bool               `json:"enableCDN"`
	Network              string             `json:"network"`
}

type STargetProxy struct { }

type SBigQueryField

type SBigQueryField struct {
	Type string `json:"type"`
	Name string `json:"name"`
	Mode string `json:"mode"`

	Fields []SBigQueryField `json:"fields"`
}

func (SBigQueryField) Parse

type SBigQueryJobReference

type SBigQueryJobReference struct {
}

type SBigQueryResult

type SBigQueryResult struct {
	CacheHit            bool                   `json:"cacheHit"`
	JobComplete         bool                   `json:"jobComplete"`
	JobReference        SBigQueryJobReference  `json:"jobReference"`
	Kind                string                 `json:"kind"`
	Rows                []jsonutils.JSONObject `json:"rows"`
	Schema              SBigQuerySchema        `json:"schema"`
	TotalBytesProcessed int64                  `json:"totalBytesProcessed"`
	// contains filtered or unexported fields
}

func (SBigQueryResult) GetRows

func (res SBigQueryResult) GetRows() ([]jsonutils.JSONObject, error)

type SBigQuerySchema

type SBigQuerySchema struct {
	Fields []SBigQueryField `json:"fields"`
}

func (SBigQuerySchema) Parse

type SBinding

type SBinding struct {
	Role    string
	Members []string
}

type SBucket

type SBucket struct {
	multicloud.SBaseBucket
	multicloud.GoogleTags

	Kind             string
	SelfLink         string
	Name             string
	ProjectNumber    string
	Metageneration   string
	Location         string
	StorageClass     string
	Etag             string
	TimeCreated      time.Time
	Updated          time.Time
	Lifecycle        SLifecycle
	IamConfiguration SIamConfiguration
	LocationType     string
	// contains filtered or unexported fields
}

func (*SBucket) AbortMultipartUpload

func (b *SBucket) AbortMultipartUpload(ctx context.Context, key string, uploadId string) error

func (*SBucket) CompleteMultipartUpload

func (b *SBucket) CompleteMultipartUpload(ctx context.Context, key string, uploadId string, partEtags []string) error

func (*SBucket) CopyObject

func (b *SBucket) CopyObject(ctx context.Context, destKey string, srcBucket, srcKey string, cannedAcl cloudprovider.TBucketACLType, storageClassStr string, meta http.Header) error

func (*SBucket) CopyPart

func (b *SBucket) CopyPart(ctx context.Context, key string, uploadId string, partNumber int, srcBucket string, srcKey string, srcOffset int64, srcLength int64) (string, error)

func (*SBucket) DeleteObject

func (b *SBucket) DeleteObject(ctx context.Context, key string) error

func (*SBucket) GetAccessUrls

func (b *SBucket) GetAccessUrls() []cloudprovider.SBucketAccessUrl

func (*SBucket) GetAcl

func (b *SBucket) GetAcl() cloudprovider.TBucketACLType

func (*SBucket) GetCreatedAt

func (b *SBucket) GetCreatedAt() time.Time

func (*SBucket) GetGlobalId

func (b *SBucket) GetGlobalId() string

func (*SBucket) GetIRegion

func (b *SBucket) GetIRegion() cloudprovider.ICloudRegion

func (*SBucket) GetLocation

func (b *SBucket) GetLocation() string

func (*SBucket) GetName

func (b *SBucket) GetName() string

func (*SBucket) GetObject

func (b *SBucket) GetObject(ctx context.Context, key string, rangeOpt *cloudprovider.SGetObjectRange) (io.ReadCloser, error)

func (*SBucket) GetProjectId

func (b *SBucket) GetProjectId() string

func (*SBucket) GetStats

func (b *SBucket) GetStats() cloudprovider.SBucketStats

func (*SBucket) GetStorageClass

func (b *SBucket) GetStorageClass() string

func (*SBucket) GetTempUrl

func (b *SBucket) GetTempUrl(method string, key string, expire time.Duration) (string, error)

func (*SBucket) ListObjects

func (b *SBucket) ListObjects(prefix string, marker string, delimiter string, maxCount int) (cloudprovider.SListObjectResult, error)

func (*SBucket) NewMultipartUpload

func (b *SBucket) NewMultipartUpload(ctx context.Context, key string, cannedAcl cloudprovider.TBucketACLType, storageClassStr string, meta http.Header) (string, error)

func (*SBucket) PutObject

func (b *SBucket) PutObject(ctx context.Context, key string, body io.Reader, sizeBytes int64, cannedAcl cloudprovider.TBucketACLType, storageClassStr string, meta http.Header) error

func (*SBucket) SetAcl

func (b *SBucket) SetAcl(acl cloudprovider.TBucketACLType) error

func (*SBucket) UploadPart

func (b *SBucket) UploadPart(ctx context.Context, key string, uploadId string, partIndex int, part io.Reader, partSize int64, offset, totalSize int64) (string, error)

type SBucketBinding

type SBucketBinding struct {
	Role      string
	Members   []string
	Condition BindingCondition
}

type SBucketIam

type SBucketIam struct {
	Version    int
	Kind       string
	ResourceId string
	Bindings   []SBucketBinding
	Etag       string
}

type SBucketObjects

type SBucketObjects struct {
	Prefixes      []string
	Items         []SObject
	NextPageToken string
}

type SBucketPolicyOnly

type SBucketPolicyOnly struct {
	Enabled bool
}

type SCloudbuildBuild

type SCloudbuildBuild struct {
	Id     string
	Status string
	LogUrl string
}

type SCloudbuildMetadata

type SCloudbuildMetadata struct {
	Build SCloudbuildBuild
}

type SCloudbuildOperation

type SCloudbuildOperation struct {
	Name     string
	Metadata SCloudbuildMetadata
}

type SClouduser

type SClouduser struct {
	multicloud.SBaseClouduser

	Name  string
	Roles []string
	// contains filtered or unexported fields
}

func (*SClouduser) AttachCustomPolicy

func (user *SClouduser) AttachCustomPolicy(role string) error

func (*SClouduser) AttachSystemPolicy

func (user *SClouduser) AttachSystemPolicy(role string) error

func (*SClouduser) Delete

func (user *SClouduser) Delete() error

func (*SClouduser) DetachCustomPolicy

func (user *SClouduser) DetachCustomPolicy(role string) error

func (*SClouduser) DetachSystemPolicy

func (user *SClouduser) DetachSystemPolicy(role string) error

func (*SClouduser) GetEmailAddr

func (self *SClouduser) GetEmailAddr() string

func (*SClouduser) GetGlobalId

func (user *SClouduser) GetGlobalId() string

func (*SClouduser) GetICloudgroups

func (user *SClouduser) GetICloudgroups() ([]cloudprovider.ICloudgroup, error)

func (*SClouduser) GetICustomCloudpolicies

func (user *SClouduser) GetICustomCloudpolicies() ([]cloudprovider.ICloudpolicy, error)

func (*SClouduser) GetISystemCloudpolicies

func (user *SClouduser) GetISystemCloudpolicies() ([]cloudprovider.ICloudpolicy, error)

func (*SClouduser) GetInviteUrl

func (self *SClouduser) GetInviteUrl() string

func (*SClouduser) GetName

func (user *SClouduser) GetName() string

func (*SClouduser) IsConsoleLogin

func (user *SClouduser) IsConsoleLogin() bool

func (*SClouduser) ResetPassword

func (user *SClouduser) ResetPassword(password string) error

type SDBInstance

type SDBInstance struct {
	multicloud.SDBInstanceBase

	Kind                       string
	State                      string
	DatabaseVersion            string
	Settings                   SDBInstanceSetting
	Etag                       string
	MasterInstanceName         string
	IpAddresses                []SDBInstanceIpAddress
	ServerCaCert               SDBInstanceCaCert
	InstanceType               string
	Project                    string
	ServiceAccountEmailAddress string
	BackendType                string
	SelfLink                   string
	ConnectionName             string
	Name                       string
	Region                     string
	GceZone                    string
	// contains filtered or unexported fields
}

func (*SDBInstance) ChangeConfig

func (*SDBInstance) ClosePublicConnection

func (rds *SDBInstance) ClosePublicConnection() error

func (*SDBInstance) CreateAccount

func (*SDBInstance) CreateDatabase

func (*SDBInstance) CreateIBackup

func (*SDBInstance) Delete

func (rds *SDBInstance) Delete() error

func (*SDBInstance) GetBillingType

func (rds *SDBInstance) GetBillingType() string

func (*SDBInstance) GetCategory

func (rds *SDBInstance) GetCategory() string

func (*SDBInstance) GetConnectionStr

func (rds *SDBInstance) GetConnectionStr() string

func (*SDBInstance) GetCreatedAt

func (rds *SDBInstance) GetCreatedAt() time.Time

func (*SDBInstance) GetDBNetwork

func (rds *SDBInstance) GetDBNetwork() (*cloudprovider.SDBInstanceNetwork, error)

func (*SDBInstance) GetDiskSizeGB

func (rds *SDBInstance) GetDiskSizeGB() int

func (*SDBInstance) GetEngine

func (rds *SDBInstance) GetEngine() string

func (*SDBInstance) GetEngineVersion

func (rds *SDBInstance) GetEngineVersion() string

func (*SDBInstance) GetExpiredAt

func (rds *SDBInstance) GetExpiredAt() time.Time

func (*SDBInstance) GetGlobalId

func (rds *SDBInstance) GetGlobalId() string

func (*SDBInstance) GetIDBInstanceAccounts

func (rds *SDBInstance) GetIDBInstanceAccounts() ([]cloudprovider.ICloudDBInstanceAccount, error)

func (*SDBInstance) GetIDBInstanceBackups

func (rds *SDBInstance) GetIDBInstanceBackups() ([]cloudprovider.ICloudDBInstanceBackup, error)

func (*SDBInstance) GetIDBInstanceDatabases

func (rds *SDBInstance) GetIDBInstanceDatabases() ([]cloudprovider.ICloudDBInstanceDatabase, error)

func (*SDBInstance) GetIDBInstanceParameters

func (rds *SDBInstance) GetIDBInstanceParameters() ([]cloudprovider.ICloudDBInstanceParameter, error)

func (*SDBInstance) GetIVpcId

func (rds *SDBInstance) GetIVpcId() string

func (*SDBInstance) GetId

func (rds *SDBInstance) GetId() string

func (*SDBInstance) GetInstanceType

func (rds *SDBInstance) GetInstanceType() string

func (*SDBInstance) GetInternalConnectionStr

func (rds *SDBInstance) GetInternalConnectionStr() string

func (*SDBInstance) GetMaintainTime

func (rds *SDBInstance) GetMaintainTime() string

func (*SDBInstance) GetMasterInstanceId

func (rds *SDBInstance) GetMasterInstanceId() string

func (*SDBInstance) GetName

func (rds *SDBInstance) GetName() string

func (*SDBInstance) GetPort

func (rds *SDBInstance) GetPort() int

func (*SDBInstance) GetProjectId

func (rds *SDBInstance) GetProjectId() string

func (*SDBInstance) GetSecurityGroupId

func (rds *SDBInstance) GetSecurityGroupId() string

func (*SDBInstance) GetStatus

func (rds *SDBInstance) GetStatus() string

func (*SDBInstance) GetStorageType

func (rds *SDBInstance) GetStorageType() string

func (*SDBInstance) GetSysTags

func (self *SDBInstance) GetSysTags() map[string]string

func (*SDBInstance) GetTags

func (self *SDBInstance) GetTags() (map[string]string, error)

func (*SDBInstance) GetVcpuCount

func (rds *SDBInstance) GetVcpuCount() int

func (*SDBInstance) GetVmemSizeMB

func (rds *SDBInstance) GetVmemSizeMB() int

func (*SDBInstance) GetZone1Id

func (rds *SDBInstance) GetZone1Id() string

func (*SDBInstance) GetZone2Id

func (rds *SDBInstance) GetZone2Id() string

func (*SDBInstance) GetZone3Id

func (rds *SDBInstance) GetZone3Id() string

func (*SDBInstance) IsEmulated

func (rds *SDBInstance) IsEmulated() bool

func (*SDBInstance) OpenPublicConnection

func (rds *SDBInstance) OpenPublicConnection() error

func (*SDBInstance) Reboot

func (rds *SDBInstance) Reboot() error

func (*SDBInstance) RecoveryFromBackup

func (rds *SDBInstance) RecoveryFromBackup(conf *cloudprovider.SDBInstanceRecoveryConfig) error

func (*SDBInstance) Refresh

func (rds *SDBInstance) Refresh() error

func (*SDBInstance) Renew

func (rds *SDBInstance) Renew(bc billing.SBillingCycle) error

func (*SDBInstance) SetTags

func (self *SDBInstance) SetTags(tags map[string]string, replace bool) error

type SDBInstanceAccount

type SDBInstanceAccount struct {
	multicloud.SDBInstanceAccountBase
	multicloud.GoogleTags

	Kind                 string
	Etag                 string
	Name                 string
	Host                 string
	Instance             string
	SelfLink             string
	Project              string
	SqlserverUserDetails SSqlserverUserDetails
	// contains filtered or unexported fields
}

func (*SDBInstanceAccount) Delete

func (account *SDBInstanceAccount) Delete() error

func (*SDBInstanceAccount) GetHost

func (account *SDBInstanceAccount) GetHost() string

func (*SDBInstanceAccount) GetIDBInstanceAccountPrivileges

func (account *SDBInstanceAccount) GetIDBInstanceAccountPrivileges() ([]cloudprovider.ICloudDBInstanceAccountPrivilege, error)

func (*SDBInstanceAccount) GetName

func (account *SDBInstanceAccount) GetName() string

func (*SDBInstanceAccount) GrantPrivilege

func (account *SDBInstanceAccount) GrantPrivilege(database, privilege string) error

func (*SDBInstanceAccount) Refresh

func (account *SDBInstanceAccount) Refresh() error

func (*SDBInstanceAccount) ResetPassword

func (account *SDBInstanceAccount) ResetPassword(password string) error

func (*SDBInstanceAccount) RevokePrivilege

func (account *SDBInstanceAccount) RevokePrivilege(database string) error

type SDBInstanceBackup

type SDBInstanceBackup struct {
	multicloud.SDBInstanceBackupBase
	multicloud.GoogleTags

	Kind            string
	Status          string
	EnqueuedTime    string
	Id              string
	StartTime       time.Time
	EndTime         time.Time
	Type            string
	Description     string
	WindowStartTime time.Time
	Instance        string
	SelfLink        string
	Location        string
	Error           OperationError
	// contains filtered or unexported fields
}

func (*SDBInstanceBackup) Delete

func (backup *SDBInstanceBackup) Delete() error

func (*SDBInstanceBackup) GetBackupMode

func (backup *SDBInstanceBackup) GetBackupMode() string

func (*SDBInstanceBackup) GetBackupSizeMb

func (backup *SDBInstanceBackup) GetBackupSizeMb() int

func (*SDBInstanceBackup) GetDBInstanceId

func (backup *SDBInstanceBackup) GetDBInstanceId() string

func (*SDBInstanceBackup) GetDBNames

func (backup *SDBInstanceBackup) GetDBNames() string

func (*SDBInstanceBackup) GetEndTime

func (backup *SDBInstanceBackup) GetEndTime() time.Time

func (*SDBInstanceBackup) GetEngine

func (backup *SDBInstanceBackup) GetEngine() string

func (*SDBInstanceBackup) GetEngineVersion

func (backup *SDBInstanceBackup) GetEngineVersion() string

func (*SDBInstanceBackup) GetGlobalId

func (backup *SDBInstanceBackup) GetGlobalId() string

func (*SDBInstanceBackup) GetId

func (backup *SDBInstanceBackup) GetId() string

func (*SDBInstanceBackup) GetName

func (backup *SDBInstanceBackup) GetName() string

func (*SDBInstanceBackup) GetProjectId

func (backup *SDBInstanceBackup) GetProjectId() string

func (*SDBInstanceBackup) GetStartTime

func (backup *SDBInstanceBackup) GetStartTime() time.Time

func (*SDBInstanceBackup) GetStatus

func (backup *SDBInstanceBackup) GetStatus() string

func (*SDBInstanceBackup) IsEmulated

func (backup *SDBInstanceBackup) IsEmulated() bool

func (*SDBInstanceBackup) Refresh

func (backup *SDBInstanceBackup) Refresh() error

type SDBInstanceBackupConfiguration

type SDBInstanceBackupConfiguration struct {
	StartTime        string
	Kind             string
	Enabled          bool
	BinaryLogEnabled bool
}

type SDBInstanceCaCert

type SDBInstanceCaCert struct {
	Kind             string
	CertSerialNumber string
	Cert             string
	CommonName       string
	Sha1Fingerprint  string
	Instance         string
	CreateTime       time.Time
	ExpirationTime   time.Time
}

type SDBInstanceDatabase

type SDBInstanceDatabase struct {
	multicloud.SResourceBase
	multicloud.GoogleTags

	Kind                     string
	Collation                string
	Etag                     string
	Name                     string
	Instance                 string
	SelfLink                 string
	Charset                  string
	Project                  string
	SqlserverDatabaseDetails SSqlserverDatabaseDetails
	// contains filtered or unexported fields
}

func (*SDBInstanceDatabase) Delete

func (database *SDBInstanceDatabase) Delete() error

func (*SDBInstanceDatabase) GetCharacterSet

func (database *SDBInstanceDatabase) GetCharacterSet() string

func (*SDBInstanceDatabase) GetGlobalId

func (database *SDBInstanceDatabase) GetGlobalId() string

func (*SDBInstanceDatabase) GetId

func (database *SDBInstanceDatabase) GetId() string

func (*SDBInstanceDatabase) GetName

func (database *SDBInstanceDatabase) GetName() string

func (*SDBInstanceDatabase) GetStatus

func (database *SDBInstanceDatabase) GetStatus() string

func (*SDBInstanceDatabase) IsEmulated

func (database *SDBInstanceDatabase) IsEmulated() bool

func (*SDBInstanceDatabase) Refresh

func (database *SDBInstanceDatabase) Refresh() error

type SDBInstanceIpAddress

type SDBInstanceIpAddress struct {
	Type      string
	IpAddress string
}

type SDBInstanceLocationPreference

type SDBInstanceLocationPreference struct {
	Zone string
	Kind string
}

type SDBInstanceMaintenanceWindow

type SDBInstanceMaintenanceWindow struct {
	Kind string
	Hour int
	Day  int
}

type SDBInstanceParameter

type SDBInstanceParameter struct {
	Name  string
	Value string
	// contains filtered or unexported fields
}

func (*SDBInstanceParameter) GetDescription

func (parameter *SDBInstanceParameter) GetDescription() string

func (*SDBInstanceParameter) GetGlobalId

func (parameter *SDBInstanceParameter) GetGlobalId() string

func (*SDBInstanceParameter) GetKey

func (parameter *SDBInstanceParameter) GetKey() string

func (*SDBInstanceParameter) GetValue

func (parameter *SDBInstanceParameter) GetValue() string

type SDBInstanceSetting

type SDBInstanceSetting struct {
	AuthorizedGaeApplications []string
	Tier                      string
	Kind                      string
	AvailabilityType          string
	PricingPlan               string
	ReplicationType           string
	ActivationPolicy          string
	IpConfiguration           SDBInstanceSettingIpConfiguration
	LocationPreference        SDBInstanceLocationPreference
	DataDiskType              string
	MaintenanceWindow         SDBInstanceMaintenanceWindow
	BackupConfiguration       SDBInstanceBackupConfiguration
	SettingsVersion           string
	StorageAutoResizeLimit    string
	StorageAutoResize         bool
	DataDiskSizeGb            int
	DatabaseFlags             []SDBInstanceParameter
	UserLabels                map[string]string
}

type SDBInstanceSettingIpConfiguration

type SDBInstanceSettingIpConfiguration struct {
	PrivateNetwork     string
	AuthorizedNetworks []SAuthorizedNetwork
	Ipv4Enabled        bool
}

type SDailySchedule

type SDailySchedule struct {
	DaysInCycle int
	StartTime   string
	Duration    string
}

type SDayOfWeek

type SDayOfWeek struct {
	Day       string
	StartTime string
	Duration  string
}

type SDeprecated

type SDeprecated struct {
	State       string
	Replacement string
	Deprecated  bool
}

type SDisk

type SDisk struct {
	SResourceBase
	multicloud.SDisk
	multicloud.GoogleTags

	ProvisionedIops        int
	CreationTimestamp      time.Time
	SizeGB                 int
	Zone                   string
	Status                 string
	Type                   string
	SourceImage            string
	LastAttachTimestamp    time.Time
	LastDetachTimestamp    time.Time
	LabelFingerprint       string
	PhysicalBlockSizeBytes string
	ResourcePolicies       []string
	Users                  []string
	Kind                   string
	// contains filtered or unexported fields
}

func (*SDisk) CreateISnapshot

func (disk *SDisk) CreateISnapshot(ctx context.Context, name string, desc string) (cloudprovider.ICloudSnapshot, error)

func (*SDisk) Delete

func (disk *SDisk) Delete(ctx context.Context) error

func (*SDisk) GetAccessPath

func (disk *SDisk) GetAccessPath() string

func (*SDisk) GetBillingType

func (disk *SDisk) GetBillingType() string

func (*SDisk) GetCacheMode

func (disk *SDisk) GetCacheMode() string

func (*SDisk) GetCreatedAt

func (disk *SDisk) GetCreatedAt() time.Time

func (*SDisk) GetDiskFormat

func (disk *SDisk) GetDiskFormat() string

func (*SDisk) GetDiskSizeMB

func (disk *SDisk) GetDiskSizeMB() int

func (*SDisk) GetDiskType

func (disk *SDisk) GetDiskType() string

func (*SDisk) GetDriver

func (disk *SDisk) GetDriver() string

func (*SDisk) GetExpiredAt

func (disk *SDisk) GetExpiredAt() time.Time

func (*SDisk) GetExtSnapshotPolicyIds

func (disk *SDisk) GetExtSnapshotPolicyIds() ([]string, error)

func (*SDisk) GetFsFormat

func (disk *SDisk) GetFsFormat() string

func (*SDisk) GetISnapshot

func (disk *SDisk) GetISnapshot(id string) (cloudprovider.ICloudSnapshot, error)

func (*SDisk) GetISnapshots

func (disk *SDisk) GetISnapshots() ([]cloudprovider.ICloudSnapshot, error)

func (*SDisk) GetIStorage

func (disk *SDisk) GetIStorage() (cloudprovider.ICloudStorage, error)

func (*SDisk) GetIStorageId

func (disk *SDisk) GetIStorageId() string

func (*SDisk) GetIops

func (disk *SDisk) GetIops() int

func (*SDisk) GetIsAutoDelete

func (disk *SDisk) GetIsAutoDelete() bool

func (*SDisk) GetIsNonPersistent

func (disk *SDisk) GetIsNonPersistent() bool

func (*SDisk) GetMountpoint

func (disk *SDisk) GetMountpoint() string

func (*SDisk) GetProjectId

func (disk *SDisk) GetProjectId() string

func (*SDisk) GetStatus

func (disk *SDisk) GetStatus() string

func (*SDisk) GetTemplateId

func (disk *SDisk) GetTemplateId() string

func (*SDisk) IsEmulated

func (disk *SDisk) IsEmulated() bool

func (*SDisk) Rebuild

func (disk *SDisk) Rebuild(ctx context.Context) error

func (*SDisk) Refresh

func (disk *SDisk) Refresh() error

func (*SDisk) Reset

func (disk *SDisk) Reset(ctx context.Context, snapshotId string) (string, error)

func (*SDisk) Resize

func (disk *SDisk) Resize(ctx context.Context, newSizeMB int64) error

type SFirewall

type SFirewall struct {
	Id                    string
	CreationTimestamp     time.Time
	Name                  string
	Description           string
	Network               string
	Priority              int
	SourceRanges          []string
	DestinationRanges     []string
	TargetServiceAccounts []string
	TargetTags            []string
	Allowed               []SFirewallAction
	Denied                []SFirewallAction
	Direction             string
	Disabled              bool
	SelfLink              string
	Kind                  string
}

type SFirewallAction

type SFirewallAction struct {
	IPProtocol string
	Ports      []string
}

type SForwardingRule

type SForwardingRule struct {
	SResourceBase

	CreationTimestamp   string   `json:"creationTimestamp"`
	Description         string   `json:"description"`
	Region              string   `json:"region"`
	IPAddress           string   `json:"IPAddress"`
	IPProtocol          string   `json:"IPProtocol"`
	PortRange           string   `json:"portRange"`
	Target              string   `json:"target"`
	LoadBalancingScheme string   `json:"loadBalancingScheme"`
	Subnetwork          string   `json:"subnetwork"`
	Network             string   `json:"network"`
	NetworkTier         string   `json:"networkTier"`
	LabelFingerprint    string   `json:"labelFingerprint"`
	Fingerprint         string   `json:"fingerprint"`
	Kind                string   `json:"kind"`
	Ports               []string `json:"ports"`
	BackendService      string   `json:"backendService"`
}

type SGlobalNetwork

type SGlobalNetwork struct {
	multicloud.GoogleTags
	SResourceBase

	CreationTimestamp     time.Time
	Description           string
	AutoCreateSubnetworks bool
	Subnetworks           []string
	RoutingConfig         map[string]string
	Kind                  string
	// contains filtered or unexported fields
}

func (*SGlobalNetwork) Delete

func (self *SGlobalNetwork) Delete() error

func (*SGlobalNetwork) GetCreatedAt

func (self *SGlobalNetwork) GetCreatedAt() time.Time

func (*SGlobalNetwork) GetStatus

func (self *SGlobalNetwork) GetStatus() string

func (*SGlobalNetwork) IsEmulated

func (self *SGlobalNetwork) IsEmulated() bool

func (*SGlobalNetwork) Refresh

func (self *SGlobalNetwork) Refresh() error

type SGoogleClient

type SGoogleClient struct {
	*GoogleClientConfig
	// contains filtered or unexported fields
}

func NewGoogleClient

func NewGoogleClient(cfg *GoogleClientConfig) (*SGoogleClient, error)

func (*SGoogleClient) CreateGlobalNetwork

func (self *SGoogleClient) CreateGlobalNetwork(name string, desc string) (*SGlobalNetwork, error)

func (*SGoogleClient) CreateICloudGlobalVpc

func (*SGoogleClient) CreateICloudpolicy

func (*SGoogleClient) CreateIClouduser

func (*SGoogleClient) CreateRole

func (self *SGoogleClient) CreateRole(permissions []string, name, desc string) (*SRole, error)

func (*SGoogleClient) CreateSecurityGroupRule

func (self *SGoogleClient) CreateSecurityGroupRule(rule cloudprovider.SecurityRule, vpcId string, tag string, serviceAccount string) error

func (*SGoogleClient) DeleteRole

func (self *SGoogleClient) DeleteRole(id string) error

func (*SGoogleClient) DeleteSecgroupRule

func (self *SGoogleClient) DeleteSecgroupRule(rule cloudprovider.SecurityRule) error

func (*SGoogleClient) GetAccountId

func (self *SGoogleClient) GetAccountId() string

func (*SGoogleClient) GetBySelfId

func (self *SGoogleClient) GetBySelfId(id string, retval interface{}) error

func (*SGoogleClient) GetCapabilities

func (self *SGoogleClient) GetCapabilities() []string

func (*SGoogleClient) GetEcsMetrics

func (*SGoogleClient) GetFirewall

func (self *SGoogleClient) GetFirewall(id string) (*SFirewall, error)

func (*SGoogleClient) GetFirewalls

func (self *SGoogleClient) GetFirewalls(network string, maxResults int, pageToken string) ([]SFirewall, error)

func (*SGoogleClient) GetGlobalNetwork

func (cli *SGoogleClient) GetGlobalNetwork(id string) (*SGlobalNetwork, error)

func (*SGoogleClient) GetGlobalNetworks

func (cli *SGoogleClient) GetGlobalNetworks(maxResults int, pageToken string) ([]SGlobalNetwork, error)

func (*SGoogleClient) GetICloudGlobalVpcById

func (self *SGoogleClient) GetICloudGlobalVpcById(id string) (cloudprovider.ICloudGlobalVpc, error)

func (*SGoogleClient) GetICloudGlobalVpcs

func (self *SGoogleClient) GetICloudGlobalVpcs() ([]cloudprovider.ICloudGlobalVpc, error)

func (*SGoogleClient) GetIClouduserByName

func (client *SGoogleClient) GetIClouduserByName(name string) (cloudprovider.IClouduser, error)

func (*SGoogleClient) GetICloudusers

func (client *SGoogleClient) GetICloudusers() ([]cloudprovider.IClouduser, error)

func (*SGoogleClient) GetICustomCloudpolicies

func (self *SGoogleClient) GetICustomCloudpolicies() ([]cloudprovider.ICloudpolicy, error)

func (*SGoogleClient) GetIProjects

func (self *SGoogleClient) GetIProjects() ([]cloudprovider.ICloudProject, error)

func (*SGoogleClient) GetIRegionById

func (self *SGoogleClient) GetIRegionById(id string) (cloudprovider.ICloudRegion, error)

func (*SGoogleClient) GetIRegions

func (self *SGoogleClient) GetIRegions() []cloudprovider.ICloudRegion

func (*SGoogleClient) GetISystemCloudpolicies

func (self *SGoogleClient) GetISystemCloudpolicies() ([]cloudprovider.ICloudpolicy, error)

func (*SGoogleClient) GetIamPolicy

func (self *SGoogleClient) GetIamPolicy() (*SIamPolicy, error)

func (*SGoogleClient) GetMetrics

func (*SGoogleClient) GetMonitorData

func (self *SGoogleClient) GetMonitorData(metricName string, since time.Time, until time.Time) (*jsonutils.JSONArray, error)

func (*SGoogleClient) GetOperation

func (self *SGoogleClient) GetOperation(id string) (*SOperation, error)

func (*SGoogleClient) GetProject

func (cli *SGoogleClient) GetProject(id string) (*SProject, error)

func (*SGoogleClient) GetProjects

func (cli *SGoogleClient) GetProjects() ([]SProject, error)

func (*SGoogleClient) GetRegion

func (self *SGoogleClient) GetRegion(regionId string) *SRegion

func (*SGoogleClient) GetRegions

func (self *SGoogleClient) GetRegions() []SRegion

func (*SGoogleClient) GetRole

func (self *SGoogleClient) GetRole(roleId string) (*SRole, error)

func (*SGoogleClient) GetRoles

func (self *SGoogleClient) GetRoles(projectId string) ([]SRole, error)

https://cloud.google.com/iam/docs/reference/rest/v1/roles/list

func (*SGoogleClient) GetSamlSpInitiatedLoginUrl

func (self *SGoogleClient) GetSamlSpInitiatedLoginUrl(idpName string) string

func (*SGoogleClient) GetSubAccounts

func (client *SGoogleClient) GetSubAccounts() ([]cloudprovider.SSubAccount, error)

func (*SGoogleClient) Insert

func (self *SGoogleClient) Insert(resource string, body jsonutils.JSONObject, retval interface{}) error

func (*SGoogleClient) IsSupportCloudId

func (self *SGoogleClient) IsSupportCloudId() bool

func (*SGoogleClient) ListOrganizations

func (self *SGoogleClient) ListOrganizations() ([]SOrganization, error)

https://cloud.google.com/resource-manager/reference/rest/v1/organizations/search require Organization Viewer privilege

func (*SGoogleClient) SetIamPlicy

func (self *SGoogleClient) SetIamPlicy(policy *SIamPolicy) error

func (*SGoogleClient) TestIam

func (self *SGoogleClient) TestIam(permissions []string) ([]string, error)

func (*SGoogleClient) UpdateRole

func (self *SGoogleClient) UpdateRole(id string, permissions []string) error

func (*SGoogleClient) WaitOperation

func (self *SGoogleClient) WaitOperation(id string, resource, action string) (string, error)

type SHost

type SHost struct {
	multicloud.SHostBase
	// contains filtered or unexported fields
}

func (*SHost) CreateVM

func (*SHost) GetAccessIp

func (host *SHost) GetAccessIp() string

func (*SHost) GetAccessMac

func (host *SHost) GetAccessMac() string

func (*SHost) GetCpuCount

func (host *SHost) GetCpuCount() int

func (*SHost) GetCpuDesc

func (host *SHost) GetCpuDesc() string

func (*SHost) GetCpuMhz

func (host *SHost) GetCpuMhz() int

func (*SHost) GetEnabled

func (host *SHost) GetEnabled() bool

func (*SHost) GetGlobalId

func (host *SHost) GetGlobalId() string

func (*SHost) GetHostStatus

func (host *SHost) GetHostStatus() string

func (*SHost) GetHostType

func (host *SHost) GetHostType() string

func (*SHost) GetIHostNics

func (host *SHost) GetIHostNics() ([]cloudprovider.ICloudHostNetInterface, error)

func (*SHost) GetIStorageById

func (host *SHost) GetIStorageById(id string) (cloudprovider.ICloudStorage, error)

func (*SHost) GetIStorages

func (host *SHost) GetIStorages() ([]cloudprovider.ICloudStorage, error)

func (*SHost) GetIVMById

func (host *SHost) GetIVMById(id string) (cloudprovider.ICloudVM, error)

func (*SHost) GetIVMs

func (host *SHost) GetIVMs() ([]cloudprovider.ICloudVM, error)

func (*SHost) GetIWires

func (host *SHost) GetIWires() ([]cloudprovider.ICloudWire, error)

func (*SHost) GetId

func (host *SHost) GetId() string

func (*SHost) GetIsMaintenance

func (host *SHost) GetIsMaintenance() bool

func (*SHost) GetMemSizeMB

func (host *SHost) GetMemSizeMB() int

func (*SHost) GetName

func (host *SHost) GetName() string

func (*SHost) GetNodeCount

func (host *SHost) GetNodeCount() int8

func (*SHost) GetSN

func (host *SHost) GetSN() string

func (*SHost) GetStatus

func (host *SHost) GetStatus() string

func (*SHost) GetStorageSizeMB

func (host *SHost) GetStorageSizeMB() int

func (*SHost) GetStorageType

func (host *SHost) GetStorageType() string

func (*SHost) GetSysInfo

func (host *SHost) GetSysInfo() jsonutils.JSONObject

func (*SHost) GetVersion

func (host *SHost) GetVersion() string

func (*SHost) GetWire

func (host *SHost) GetWire() *SWire

func (*SHost) IsEmulated

func (host *SHost) IsEmulated() bool

func (*SHost) Refresh

func (host *SHost) Refresh() error

type SHourlySchedule

type SHourlySchedule struct {
	HoursInCycle int
	StartTime    string
	Duration     string
}

type SIamConfiguration

type SIamConfiguration struct {
	BucketPolicyOnly         SBucketPolicyOnly
	UniformBucketLevelAccess SUniformBucketLevelAccess
}

type SIamPolicy

type SIamPolicy struct {
	Version  int
	Etag     string
	Bindings []SBinding
	// contains filtered or unexported fields
}

func (*SIamPolicy) AttachPolicy

func (policy *SIamPolicy) AttachPolicy(user string, roles []string) error

func (*SIamPolicy) DeleteUser

func (policy *SIamPolicy) DeleteUser(user string) error

func (*SIamPolicy) DetachPolicy

func (policy *SIamPolicy) DetachPolicy(user, role string) error

func (*SIamPolicy) GetICloudusers

func (policy *SIamPolicy) GetICloudusers() ([]cloudprovider.IClouduser, error)

type SImage

type SImage struct {
	multicloud.SImageBase
	multicloud.GoogleTags

	SResourceBase
	Name     string
	SelfLink string
	Id       string

	CreationTimestamp time.Time
	Description       string
	SourceType        string
	RawDisk           map[string]string
	Deprecated        SDeprecated
	Status            string
	ArchiveSizeBytes  int64
	DiskSizeGb        int
	Licenses          []string
	Family            string
	LabelFingerprint  string
	GuestOsFeatures   []GuestOsFeature
	LicenseCodes      []string
	StorageLocations  []string
	Kind              string
	// contains filtered or unexported fields
}

func (*SImage) Delete

func (image *SImage) Delete(ctx context.Context) error

func (*SImage) GetBios

func (image *SImage) GetBios() cloudprovider.TBiosType

func (*SImage) GetCreatedAt

func (image *SImage) GetCreatedAt() time.Time

func (*SImage) GetFullOsName

func (image *SImage) GetFullOsName() string

func (*SImage) GetGlobalId

func (self *SImage) GetGlobalId() string

func (*SImage) GetIStoragecache

func (image *SImage) GetIStoragecache() cloudprovider.ICloudStoragecache

func (*SImage) GetId

func (self *SImage) GetId() string

func (*SImage) GetImageFormat

func (image *SImage) GetImageFormat() string

func (*SImage) GetImageStatus

func (image *SImage) GetImageStatus() string

func (*SImage) GetImageType

func (image *SImage) GetImageType() cloudprovider.TImageType

func (*SImage) GetMinOsDiskSizeGb

func (image *SImage) GetMinOsDiskSizeGb() int

func (*SImage) GetMinRamSizeMb

func (image *SImage) GetMinRamSizeMb() int

func (*SImage) GetName

func (self *SImage) GetName() string

func (*SImage) GetOsArch

func (image *SImage) GetOsArch() string

func (*SImage) GetOsDist

func (image *SImage) GetOsDist() string

func (*SImage) GetOsLang

func (image *SImage) GetOsLang() string

func (*SImage) GetOsType

func (image *SImage) GetOsType() cloudprovider.TOsType

func (*SImage) GetOsVersion

func (image *SImage) GetOsVersion() string

func (*SImage) GetSizeByte

func (image *SImage) GetSizeByte() int64

func (*SImage) GetStatus

func (image *SImage) GetStatus() string

func (*SImage) IsEmulated

func (image *SImage) IsEmulated() bool

func (*SImage) Refresh

func (image *SImage) Refresh() error

type SInstance

type SInstance struct {
	multicloud.SInstanceBase
	multicloud.GoogleTags

	SResourceBase

	CreationTimestamp  time.Time
	Description        string
	Tags               SInstanceTag
	MachineType        string
	Status             string
	Zone               string
	CanIpForward       bool
	NetworkInterfaces  []SNetworkInterface
	Disks              []InstanceDisk
	Metadata           SMetadata
	ServiceAccounts    []ServiceAccount
	Scheduling         map[string]interface{}
	CpuPlatform        string
	LabelFingerprint   string
	StartRestricted    bool
	DeletionProtection bool
	Kind               string
	// contains filtered or unexported fields
}

func (*SInstance) AssignSecurityGroup

func (instance *SInstance) AssignSecurityGroup(id string) error

func (*SInstance) AttachDisk

func (instance *SInstance) AttachDisk(ctx context.Context, diskId string) error

func (*SInstance) ChangeConfig

func (instance *SInstance) ChangeConfig(ctx context.Context, config *cloudprovider.SManagedVMChangeConfig) error

func (*SInstance) DeleteVM

func (instance *SInstance) DeleteVM(ctx context.Context) error

func (*SInstance) DeployVM

func (instance *SInstance) DeployVM(ctx context.Context, name string, username string, password string, publicKey string, deleteKeypair bool, description string) error

func (*SInstance) DetachDisk

func (instance *SInstance) DetachDisk(ctx context.Context, diskId string) error

func (*SInstance) GetBillingType

func (instance *SInstance) GetBillingType() string

func (*SInstance) GetBios

func (instance *SInstance) GetBios() cloudprovider.TBiosType

func (*SInstance) GetBootOrder

func (instance *SInstance) GetBootOrder() string

func (*SInstance) GetCreatedAt

func (instance *SInstance) GetCreatedAt() time.Time

func (*SInstance) GetError

func (instance *SInstance) GetError() error

func (*SInstance) GetExpiredAt

func (instance *SInstance) GetExpiredAt() time.Time

func (*SInstance) GetFullOsName

func (instance *SInstance) GetFullOsName() string

func (*SInstance) GetHostname

func (instance *SInstance) GetHostname() string

func (*SInstance) GetHypervisor

func (instance *SInstance) GetHypervisor() string

func (*SInstance) GetIDisks

func (instance *SInstance) GetIDisks() ([]cloudprovider.ICloudDisk, error)

func (*SInstance) GetIEIP

func (instance *SInstance) GetIEIP() (cloudprovider.ICloudEIP, error)

func (*SInstance) GetIHost

func (instance *SInstance) GetIHost() cloudprovider.ICloudHost

func (*SInstance) GetIHostId

func (instance *SInstance) GetIHostId() string

func (*SInstance) GetINics

func (instance *SInstance) GetINics() ([]cloudprovider.ICloudNic, error)

func (*SInstance) GetInstanceType

func (instance *SInstance) GetInstanceType() string

func (*SInstance) GetMachine

func (instance *SInstance) GetMachine() string

func (*SInstance) GetOsArch

func (instance *SInstance) GetOsArch() string

func (*SInstance) GetOsDist

func (instance *SInstance) GetOsDist() string

func (*SInstance) GetOsLang

func (instance *SInstance) GetOsLang() string

func (*SInstance) GetOsType

func (instance *SInstance) GetOsType() cloudprovider.TOsType

func (*SInstance) GetOsVersion

func (instance *SInstance) GetOsVersion() string

func (*SInstance) GetProjectId

func (instance *SInstance) GetProjectId() string

func (*SInstance) GetSecurityGroupIds

func (instance *SInstance) GetSecurityGroupIds() ([]string, error)

func (*SInstance) GetSerialOutput

func (instance *SInstance) GetSerialOutput(port int) (string, error)

func (*SInstance) GetStatus

func (instance *SInstance) GetStatus() string

PROVISIONING, STAGING, RUNNING, STOPPING, STOPPED, SUSPENDING, SUSPENDED, and TERMINATED.

func (*SInstance) GetVNCInfo

func (instance *SInstance) GetVNCInfo(input *cloudprovider.ServerVncInput) (*cloudprovider.ServerVncOutput, error)

func (*SInstance) GetVcpuCount

func (instance *SInstance) GetVcpuCount() int

func (*SInstance) GetVdi

func (instance *SInstance) GetVdi() string

func (*SInstance) GetVga

func (instance *SInstance) GetVga() string

func (*SInstance) GetVmemSizeMB

func (instance *SInstance) GetVmemSizeMB() int

func (*SInstance) RebuildRoot

func (instance *SInstance) RebuildRoot(ctx context.Context, desc *cloudprovider.SManagedVMRebuildRootConfig) (string, error)

func (*SInstance) Refresh

func (self *SInstance) Refresh() error

func (*SInstance) Renew

func (instance *SInstance) Renew(bc billing.SBillingCycle) error

func (*SInstance) SaveImage

func (*SInstance) SetSecurityGroups

func (instance *SInstance) SetSecurityGroups(ids []string) error

func (*SInstance) SetTags

func (self *SInstance) SetTags(tags map[string]string, replace bool) error

func (*SInstance) StartVM

func (instance *SInstance) StartVM(ctx context.Context) error

func (*SInstance) StopVM

func (instance *SInstance) StopVM(ctx context.Context, opts *cloudprovider.ServerStopOptions) error

func (*SInstance) UpdateUserData

func (instance *SInstance) UpdateUserData(userData string) error

func (*SInstance) UpdateVM

func (instance *SInstance) UpdateVM(ctx context.Context, name string) error

type SInstanceGroup

type SInstanceGroup struct {
	SResourceBase

	CreationTimestamp string      `json:"creationTimestamp"`
	Description       string      `json:"description"`
	NamedPorts        []NamedPort `json:"namedPorts"`
	Network           string      `json:"network"`
	Fingerprint       string      `json:"fingerprint"`
	Zone              string      `json:"zone"`
	Size              int64       `json:"size"`
	Region            string      `json:"region"`
	Subnetwork        string      `json:"subnetwork"`
	Kind              string      `json:"kind"`
	// contains filtered or unexported fields
}

func (*SInstanceGroup) GetInstances

func (self *SInstanceGroup) GetInstances() ([]SInstanceGroupInstance, error)

type SInstanceGroupInstance

type SInstanceGroupInstance struct {
	Instance   string      `json:"instance"`
	Status     string      `json:"status"`
	NamedPorts []NamedPort `json:"namedPorts"`
	// contains filtered or unexported fields
}

type SInstanceTag

type SInstanceTag struct {
	Items       []string
	Fingerprint string
}

type SLifecycle

type SLifecycle struct {
	Rule []SLifecycleRule
}

type SLifecycleRule

type SLifecycleRule struct {
	Action    SLifecycleRuleAction
	Condition SLifecycleRuleCondition
}

type SLifecycleRuleAction

type SLifecycleRuleAction struct {
	Type string
}

type SLifecycleRuleCondition

type SLifecycleRuleCondition struct {
	Age int
}

type SLoadBalancerBackendGroup

type SLoadBalancerBackendGroup struct {
	Id   string `json:"id"`
	Name string `json:"name"`
	// contains filtered or unexported fields
}

func (*SLoadBalancerBackendGroup) AddBackendServer

func (self *SLoadBalancerBackendGroup) AddBackendServer(serverId string, weight int, port int) (cloudprovider.ICloudLoadbalancerBackend, error)

func (*SLoadBalancerBackendGroup) Delete

func (self *SLoadBalancerBackendGroup) Delete(ctx context.Context) error

func (*SLoadBalancerBackendGroup) GetCreatedAt

func (self *SLoadBalancerBackendGroup) GetCreatedAt() time.Time

func (*SLoadBalancerBackendGroup) GetGlobalId

func (self *SLoadBalancerBackendGroup) GetGlobalId() string

func (*SLoadBalancerBackendGroup) GetHealthCheck

func (*SLoadBalancerBackendGroup) GetILoadbalancerBackendById

func (self *SLoadBalancerBackendGroup) GetILoadbalancerBackendById(backendId string) (cloudprovider.ICloudLoadbalancerBackend, error)

func (*SLoadBalancerBackendGroup) GetILoadbalancerBackends

func (self *SLoadBalancerBackendGroup) GetILoadbalancerBackends() ([]cloudprovider.ICloudLoadbalancerBackend, error)

func (*SLoadBalancerBackendGroup) GetId

func (self *SLoadBalancerBackendGroup) GetId() string

func (*SLoadBalancerBackendGroup) GetLoadbalancerBackends

func (self *SLoadBalancerBackendGroup) GetLoadbalancerBackends() ([]SLoadbalancerBackend, error)

func (*SLoadBalancerBackendGroup) GetLoadbalancerId

func (self *SLoadBalancerBackendGroup) GetLoadbalancerId() string

func (*SLoadBalancerBackendGroup) GetName

func (self *SLoadBalancerBackendGroup) GetName() string

func (*SLoadBalancerBackendGroup) GetProjectId

func (self *SLoadBalancerBackendGroup) GetProjectId() string

func (*SLoadBalancerBackendGroup) GetProtocolType

func (self *SLoadBalancerBackendGroup) GetProtocolType() string

func (*SLoadBalancerBackendGroup) GetScheduler

func (self *SLoadBalancerBackendGroup) GetScheduler() string

func (*SLoadBalancerBackendGroup) GetStatus

func (self *SLoadBalancerBackendGroup) GetStatus() string

func (*SLoadBalancerBackendGroup) GetStickySession

func (*SLoadBalancerBackendGroup) GetSysTags

func (self *SLoadBalancerBackendGroup) GetSysTags() map[string]string

func (*SLoadBalancerBackendGroup) GetTags

func (self *SLoadBalancerBackendGroup) GetTags() (map[string]string, error)

func (*SLoadBalancerBackendGroup) GetType

func (self *SLoadBalancerBackendGroup) GetType() string

func (*SLoadBalancerBackendGroup) IsDefault

func (self *SLoadBalancerBackendGroup) IsDefault() bool

func (*SLoadBalancerBackendGroup) IsEmulated

func (self *SLoadBalancerBackendGroup) IsEmulated() bool

func (*SLoadBalancerBackendGroup) Refresh

func (self *SLoadBalancerBackendGroup) Refresh() error

func (*SLoadBalancerBackendGroup) RemoveBackendServer

func (self *SLoadBalancerBackendGroup) RemoveBackendServer(serverId string, weight int, port int) error

func (*SLoadBalancerBackendGroup) SetTags

func (self *SLoadBalancerBackendGroup) SetTags(tags map[string]string, replace bool) error

func (*SLoadBalancerBackendGroup) Sync

type SLoadbalancer

type SLoadbalancer struct {
	SResourceBase
	// contains filtered or unexported fields
}

func (*SLoadbalancer) CreateILoadBalancerListener

func (*SLoadbalancer) Delete

func (self *SLoadbalancer) Delete(ctx context.Context) error

func (*SLoadbalancer) GetAddress

func (self *SLoadbalancer) GetAddress() string

对应forwardingRules地址,存在多个前端IP的情况下,只展示按拉丁字母排序最前的一个地址。其他地址需要到详情中查看 External Internal InternalManaged InternalSelfManaged Invalid UndefinedLoadBalancingScheme

func (*SLoadbalancer) GetAddressType

func (self *SLoadbalancer) GetAddressType() string

func (*SLoadbalancer) GetBackendServices

func (self *SLoadbalancer) GetBackendServices() ([]SBackendServices, error)

func (*SLoadbalancer) GetChargeType

func (self *SLoadbalancer) GetChargeType() string

func (*SLoadbalancer) GetCreatedAt

func (self *SLoadbalancer) GetCreatedAt() time.Time

func (*SLoadbalancer) GetEgressMbps

func (self *SLoadbalancer) GetEgressMbps() int

func (*SLoadbalancer) GetForwardingRules

func (self *SLoadbalancer) GetForwardingRules() ([]SForwardingRule, error)

ForwardingRule 目标是: target proxy or backend service http&https 是由target proxy 转发到后端服务

func (*SLoadbalancer) GetHTTPLoadbalancerListeners

func (self *SLoadbalancer) GetHTTPLoadbalancerListeners() ([]SLoadbalancerListener, error)

func (*SLoadbalancer) GetHealthCheckMaps

func (self *SLoadbalancer) GetHealthCheckMaps() (map[string]HealthChecks, error)

func (*SLoadbalancer) GetHealthChecks

func (self *SLoadbalancer) GetHealthChecks() ([]HealthChecks, error)

func (*SLoadbalancer) GetIEIP

func (self *SLoadbalancer) GetIEIP() (cloudprovider.ICloudEIP, error)

func (*SLoadbalancer) GetILoadBalancerBackendGroupById

func (self *SLoadbalancer) GetILoadBalancerBackendGroupById(groupId string) (cloudprovider.ICloudLoadbalancerBackendGroup, error)

func (*SLoadbalancer) GetILoadBalancerBackendGroups

func (self *SLoadbalancer) GetILoadBalancerBackendGroups() ([]cloudprovider.ICloudLoadbalancerBackendGroup, error)

func (*SLoadbalancer) GetILoadBalancerListenerById

func (self *SLoadbalancer) GetILoadBalancerListenerById(listenerId string) (cloudprovider.ICloudLoadbalancerListener, error)

func (*SLoadbalancer) GetILoadBalancerListeners

func (self *SLoadbalancer) GetILoadBalancerListeners() ([]cloudprovider.ICloudLoadbalancerListener, error)

func (*SLoadbalancer) GetInstanceGroups

func (self *SLoadbalancer) GetInstanceGroups() ([]SInstanceGroup, error)

func (*SLoadbalancer) GetInstanceGroupsMap

func (self *SLoadbalancer) GetInstanceGroupsMap() (map[string]SInstanceGroup, error)

func (*SLoadbalancer) GetLoadbalancerBackendGroups

func (self *SLoadbalancer) GetLoadbalancerBackendGroups() ([]SLoadBalancerBackendGroup, error)

func (*SLoadbalancer) GetLoadbalancerListeners

func (self *SLoadbalancer) GetLoadbalancerListeners() ([]SLoadbalancerListener, error)

func (*SLoadbalancer) GetLoadbalancerSpec

func (self *SLoadbalancer) GetLoadbalancerSpec() string

func (*SLoadbalancer) GetNetworkIds

func (self *SLoadbalancer) GetNetworkIds() []string

func (*SLoadbalancer) GetNetworkLoadbalancerListeners

func (self *SLoadbalancer) GetNetworkLoadbalancerListeners() ([]SLoadbalancerListener, error)

func (*SLoadbalancer) GetNetworkType

func (self *SLoadbalancer) GetNetworkType() string

func (*SLoadbalancer) GetProjectId

func (self *SLoadbalancer) GetProjectId() string

func (*SLoadbalancer) GetStatus

func (self *SLoadbalancer) GetStatus() string

func (*SLoadbalancer) GetSysTags

func (self *SLoadbalancer) GetSysTags() map[string]string

func (*SLoadbalancer) GetTags

func (self *SLoadbalancer) GetTags() (map[string]string, error)

func (*SLoadbalancer) GetTargetHttpProxies

func (self *SLoadbalancer) GetTargetHttpProxies() ([]STargetHttpProxy, error)

func (*SLoadbalancer) GetTargetHttpsProxies

func (self *SLoadbalancer) GetTargetHttpsProxies() ([]STargetHttpsProxy, error)

func (*SLoadbalancer) GetVpcId

func (self *SLoadbalancer) GetVpcId() string

func (*SLoadbalancer) GetZone1Id

func (self *SLoadbalancer) GetZone1Id() string

func (*SLoadbalancer) GetZoneId

func (self *SLoadbalancer) GetZoneId() string

func (*SLoadbalancer) IsEmulated

func (self *SLoadbalancer) IsEmulated() bool

func (*SLoadbalancer) Refresh

func (self *SLoadbalancer) Refresh() error

func (*SLoadbalancer) SetTags

func (self *SLoadbalancer) SetTags(tags map[string]string, replace bool) error

func (*SLoadbalancer) Start

func (self *SLoadbalancer) Start() error

func (*SLoadbalancer) Stop

func (self *SLoadbalancer) Stop() error

type SLoadbalancerBackend

type SLoadbalancerBackend struct {
	Backend SInstanceGroupInstance // backend

	Port int `json:"port"`
	// contains filtered or unexported fields
}

func (*SLoadbalancerBackend) GetBackendId

func (self *SLoadbalancerBackend) GetBackendId() string

func (*SLoadbalancerBackend) GetBackendRole

func (self *SLoadbalancerBackend) GetBackendRole() string

func (*SLoadbalancerBackend) GetBackendType

func (self *SLoadbalancerBackend) GetBackendType() string

func (*SLoadbalancerBackend) GetCreatedAt

func (self *SLoadbalancerBackend) GetCreatedAt() time.Time

func (*SLoadbalancerBackend) GetGlobalId

func (self *SLoadbalancerBackend) GetGlobalId() string

func (*SLoadbalancerBackend) GetId

func (self *SLoadbalancerBackend) GetId() string

func (*SLoadbalancerBackend) GetIpAddress

func (self *SLoadbalancerBackend) GetIpAddress() string

func (*SLoadbalancerBackend) GetName

func (self *SLoadbalancerBackend) GetName() string

func (*SLoadbalancerBackend) GetPort

func (self *SLoadbalancerBackend) GetPort() int

func (*SLoadbalancerBackend) GetProjectId

func (self *SLoadbalancerBackend) GetProjectId() string

func (*SLoadbalancerBackend) GetStatus

func (self *SLoadbalancerBackend) GetStatus() string

func (*SLoadbalancerBackend) GetSysTags

func (self *SLoadbalancerBackend) GetSysTags() map[string]string

func (*SLoadbalancerBackend) GetTags

func (self *SLoadbalancerBackend) GetTags() (map[string]string, error)

func (*SLoadbalancerBackend) GetWeight

func (self *SLoadbalancerBackend) GetWeight() int

func (*SLoadbalancerBackend) IsEmulated

func (self *SLoadbalancerBackend) IsEmulated() bool

func (*SLoadbalancerBackend) Refresh

func (self *SLoadbalancerBackend) Refresh() error

func (*SLoadbalancerBackend) SetTags

func (self *SLoadbalancerBackend) SetTags(tags map[string]string, replace bool) error

func (*SLoadbalancerBackend) SyncConf

func (self *SLoadbalancerBackend) SyncConf(ctx context.Context, port, weight int) error

type SLoadbalancerCertificate

type SLoadbalancerCertificate struct {
	SResourceBase

	ID                string      `json:"id"`
	CreationTimestamp string      `json:"creationTimestamp"`
	Certificate       string      `json:"certificate"`
	SelfManaged       SelfManaged `json:"selfManaged"`
	Type              string      `json:"type"`
	ExpireTime        time.Time   `json:"expireTime"`
	Region            string      `json:"region"`
	Kind              string      `json:"kind"`
	// contains filtered or unexported fields
}

func (*SLoadbalancerCertificate) Delete

func (self *SLoadbalancerCertificate) Delete() error

func (*SLoadbalancerCertificate) GetCommonName

func (self *SLoadbalancerCertificate) GetCommonName() string

func (*SLoadbalancerCertificate) GetCreatedAt

func (self *SLoadbalancerCertificate) GetCreatedAt() time.Time

func (*SLoadbalancerCertificate) GetExpireTime

func (self *SLoadbalancerCertificate) GetExpireTime() time.Time

func (*SLoadbalancerCertificate) GetFingerprint

func (self *SLoadbalancerCertificate) GetFingerprint() string

func (*SLoadbalancerCertificate) GetPrivateKey

func (self *SLoadbalancerCertificate) GetPrivateKey() string

func (*SLoadbalancerCertificate) GetProjectId

func (self *SLoadbalancerCertificate) GetProjectId() string

func (*SLoadbalancerCertificate) GetPublickKey

func (self *SLoadbalancerCertificate) GetPublickKey() string

func (*SLoadbalancerCertificate) GetStatus

func (self *SLoadbalancerCertificate) GetStatus() string

func (*SLoadbalancerCertificate) GetSubjectAlternativeNames

func (self *SLoadbalancerCertificate) GetSubjectAlternativeNames() string

func (*SLoadbalancerCertificate) GetSysTags

func (self *SLoadbalancerCertificate) GetSysTags() map[string]string

func (*SLoadbalancerCertificate) GetTags

func (self *SLoadbalancerCertificate) GetTags() (map[string]string, error)

func (*SLoadbalancerCertificate) IsEmulated

func (self *SLoadbalancerCertificate) IsEmulated() bool

func (*SLoadbalancerCertificate) Refresh

func (self *SLoadbalancerCertificate) Refresh() error

func (*SLoadbalancerCertificate) SetTags

func (self *SLoadbalancerCertificate) SetTags(tags map[string]string, replace bool) error

func (*SLoadbalancerCertificate) Sync

func (self *SLoadbalancerCertificate) Sync(name, privateKey, publickKey string) error

type SLoadbalancerListener

type SLoadbalancerListener struct {
	ForwardRuleName    string `json:"forward_rule_name"`
	BackendServiceName string `json:"backend_service_name"`
	Protocol           string `json:"protocol"`
	Port               string `json:"port"` // 监听端口
	// contains filtered or unexported fields
}

func (*SLoadbalancerListener) CreateILoadBalancerListenerRule

func (*SLoadbalancerListener) Delete

func (self *SLoadbalancerListener) Delete(ctx context.Context) error

func (*SLoadbalancerListener) GetAclId

func (self *SLoadbalancerListener) GetAclId() string

func (*SLoadbalancerListener) GetAclStatus

func (self *SLoadbalancerListener) GetAclStatus() string

func (*SLoadbalancerListener) GetAclType

func (self *SLoadbalancerListener) GetAclType() string

func (*SLoadbalancerListener) GetBackendConnectTimeout

func (self *SLoadbalancerListener) GetBackendConnectTimeout() int

func (*SLoadbalancerListener) GetBackendGroupId

func (self *SLoadbalancerListener) GetBackendGroupId() string

func (*SLoadbalancerListener) GetBackendServerPort

func (self *SLoadbalancerListener) GetBackendServerPort() int

func (*SLoadbalancerListener) GetCertificateId

func (self *SLoadbalancerListener) GetCertificateId() string

func (*SLoadbalancerListener) GetClientIdleTimeout

func (self *SLoadbalancerListener) GetClientIdleTimeout() int

func (*SLoadbalancerListener) GetCreatedAt

func (self *SLoadbalancerListener) GetCreatedAt() time.Time

func (*SLoadbalancerListener) GetEgressMbps

func (self *SLoadbalancerListener) GetEgressMbps() int

func (*SLoadbalancerListener) GetGlobalId

func (self *SLoadbalancerListener) GetGlobalId() string

func (*SLoadbalancerListener) GetHealthCheck

func (self *SLoadbalancerListener) GetHealthCheck() string

func (*SLoadbalancerListener) GetHealthCheckCode

func (self *SLoadbalancerListener) GetHealthCheckCode() string

func (*SLoadbalancerListener) GetHealthCheckDomain

func (self *SLoadbalancerListener) GetHealthCheckDomain() string

func (*SLoadbalancerListener) GetHealthCheckExp

func (self *SLoadbalancerListener) GetHealthCheckExp() string

func (*SLoadbalancerListener) GetHealthCheckFail

func (self *SLoadbalancerListener) GetHealthCheckFail() int

func (*SLoadbalancerListener) GetHealthCheckInterval

func (self *SLoadbalancerListener) GetHealthCheckInterval() int

func (*SLoadbalancerListener) GetHealthCheckReq

func (self *SLoadbalancerListener) GetHealthCheckReq() string

func (*SLoadbalancerListener) GetHealthCheckRise

func (self *SLoadbalancerListener) GetHealthCheckRise() int

func (*SLoadbalancerListener) GetHealthCheckTimeout

func (self *SLoadbalancerListener) GetHealthCheckTimeout() int

func (*SLoadbalancerListener) GetHealthCheckType

func (self *SLoadbalancerListener) GetHealthCheckType() string

func (*SLoadbalancerListener) GetHealthCheckURI

func (self *SLoadbalancerListener) GetHealthCheckURI() string

func (*SLoadbalancerListener) GetHealthChecks

func (self *SLoadbalancerListener) GetHealthChecks() []HealthChecks

func (*SLoadbalancerListener) GetILoadBalancerListenerRuleById

func (self *SLoadbalancerListener) GetILoadBalancerListenerRuleById(ruleId string) (cloudprovider.ICloudLoadbalancerListenerRule, error)

func (*SLoadbalancerListener) GetILoadbalancerListenerRules

func (self *SLoadbalancerListener) GetILoadbalancerListenerRules() ([]cloudprovider.ICloudLoadbalancerListenerRule, error)

func (*SLoadbalancerListener) GetId

func (self *SLoadbalancerListener) GetId() string

func (*SLoadbalancerListener) GetInstanceGroups

func (self *SLoadbalancerListener) GetInstanceGroups() ([]SInstanceGroup, error)

func (*SLoadbalancerListener) GetListenerPort

func (self *SLoadbalancerListener) GetListenerPort() int

func (*SLoadbalancerListener) GetListenerType

func (self *SLoadbalancerListener) GetListenerType() string

func (*SLoadbalancerListener) GetLoadbalancerListenerRules

func (self *SLoadbalancerListener) GetLoadbalancerListenerRules() ([]SLoadbalancerListenerRule, error)

func (*SLoadbalancerListener) GetName

func (self *SLoadbalancerListener) GetName() string

func (*SLoadbalancerListener) GetProjectId

func (self *SLoadbalancerListener) GetProjectId() string

func (*SLoadbalancerListener) GetRedirect

func (self *SLoadbalancerListener) GetRedirect() string

todo: fix me route 高级配置才有重定向,具体怎么解析?

func (*SLoadbalancerListener) GetRedirectCode

func (self *SLoadbalancerListener) GetRedirectCode() int64

func (*SLoadbalancerListener) GetRedirectHost

func (self *SLoadbalancerListener) GetRedirectHost() string

func (*SLoadbalancerListener) GetRedirectPath

func (self *SLoadbalancerListener) GetRedirectPath() string

func (*SLoadbalancerListener) GetRedirectScheme

func (self *SLoadbalancerListener) GetRedirectScheme() string

func (*SLoadbalancerListener) GetScheduler

func (self *SLoadbalancerListener) GetScheduler() string

在本地范围内使用的负载均衡算法。可能的值为:

ROUND_ROBIN:这是一个简单的策略,其中按循环顺序选择每个健康的后端。这是默认设置。 LEAST_REQUEST:一种 O(1) 算法,它选择两个随机的健康主机并选择具有较少活动请求的主机。 RING_HASH:环/模散列负载均衡器对后端实现一致的散列。该算法的特性是从一组 N 个主机中添加/删除一个主机只会影响 1/N 的请求。 RANDOM:负载均衡器随机选择一个健康的主机。 ORIGINAL_DESTINATION:根据客户端连接元数据选择后端主机,即在连接被重定向到负载均衡器之前,连接被打开到与传入连接的目标地址相同的地址。 MAGLEV:用作环形哈希负载均衡器的替代品。Maglev 不如环哈希稳定,但具有更快的表查找构建时间和主机选择时间。有关磁悬浮的更多信息,请参阅https://ai.google/research/pubs/pub44824 此字段适用于:

service_protocol 设置为 HTTP、HTTPS 或 HTTP2,并且 load_balancing_scheme 设置为 INTERNAL_MANAGED 的区域后端服务。 load_balancing_scheme 设置为 INTERNAL_SELF_MANAGED 的全局后端服务。 如果 sessionAffinity 不为 NONE,并且该字段未设置为 MAGLEV 或 RING_HASH,则会话亲缘性设置不会生效。

当后端服务被绑定到目标 gRPC 代理且 validateForProxyless 字段设置为 true 的 URL 映射引用时,仅支持默认的 ROUND_ROBIN 策略。

todo: fix me ???

func (*SLoadbalancerListener) GetStatus

func (self *SLoadbalancerListener) GetStatus() string

func (*SLoadbalancerListener) GetStickySession

func (self *SLoadbalancerListener) GetStickySession() string

func (*SLoadbalancerListener) GetStickySessionCookie

func (self *SLoadbalancerListener) GetStickySessionCookie() string

func (*SLoadbalancerListener) GetStickySessionCookieTimeout

func (self *SLoadbalancerListener) GetStickySessionCookieTimeout() int

func (*SLoadbalancerListener) GetStickySessionType

func (self *SLoadbalancerListener) GetStickySessionType() string

https://cloud.google.com/load-balancing/docs/backend-service#sessionAffinity 区域级外部 HTTP(S) 负载均衡器:

无 (NONE)
客户端 IP (CLIENT_IP)
生成的 Cookie (GENERATED_COOKIE)
标头字段 (HEADER_FIELD)
HTTP Cookie (HTTP_COOKIE)

func (*SLoadbalancerListener) GetSysTags

func (self *SLoadbalancerListener) GetSysTags() map[string]string

func (*SLoadbalancerListener) GetTLSCipherPolicy

func (self *SLoadbalancerListener) GetTLSCipherPolicy() string

func (*SLoadbalancerListener) GetTags

func (self *SLoadbalancerListener) GetTags() (map[string]string, error)

func (*SLoadbalancerListener) IsEmulated

func (self *SLoadbalancerListener) IsEmulated() bool

func (*SLoadbalancerListener) Refresh

func (self *SLoadbalancerListener) Refresh() error

func (*SLoadbalancerListener) SetTags

func (self *SLoadbalancerListener) SetTags(tags map[string]string, replace bool) error

func (*SLoadbalancerListener) Start

func (self *SLoadbalancerListener) Start() error

func (*SLoadbalancerListener) Stop

func (self *SLoadbalancerListener) Stop() error

func (*SLoadbalancerListener) Sync

func (*SLoadbalancerListener) XForwardedForEnabled

func (self *SLoadbalancerListener) XForwardedForEnabled() bool

https://cloud.google.com/load-balancing/docs/https

type SLoadbalancerListenerRule

type SLoadbalancerListenerRule struct {
	ListenerName       string `json:"listener_name"`
	BackendServiceName string `json:"backend_service_name"`
	Domain             string `json:"domain"`
	Path               string `json:"path"`
	Port               string `json:"Port"`
	// contains filtered or unexported fields
}

func (*SLoadbalancerListenerRule) Delete

func (self *SLoadbalancerListenerRule) Delete(ctx context.Context) error

func (*SLoadbalancerListenerRule) GetBackendGroupId

func (self *SLoadbalancerListenerRule) GetBackendGroupId() string

func (*SLoadbalancerListenerRule) GetCondition

func (self *SLoadbalancerListenerRule) GetCondition() string

func (*SLoadbalancerListenerRule) GetCreatedAt

func (self *SLoadbalancerListenerRule) GetCreatedAt() time.Time

func (*SLoadbalancerListenerRule) GetDomain

func (self *SLoadbalancerListenerRule) GetDomain() string

func (*SLoadbalancerListenerRule) GetGlobalId

func (self *SLoadbalancerListenerRule) GetGlobalId() string

func (*SLoadbalancerListenerRule) GetId

func (self *SLoadbalancerListenerRule) GetId() string

func (*SLoadbalancerListenerRule) GetName

func (self *SLoadbalancerListenerRule) GetName() string

func (*SLoadbalancerListenerRule) GetPath

func (self *SLoadbalancerListenerRule) GetPath() string

func (*SLoadbalancerListenerRule) GetProjectId

func (self *SLoadbalancerListenerRule) GetProjectId() string

func (*SLoadbalancerListenerRule) GetRedirect

func (self *SLoadbalancerListenerRule) GetRedirect() string

func (*SLoadbalancerListenerRule) GetRedirectCode

func (self *SLoadbalancerListenerRule) GetRedirectCode() int64

func (*SLoadbalancerListenerRule) GetRedirectHost

func (self *SLoadbalancerListenerRule) GetRedirectHost() string

func (*SLoadbalancerListenerRule) GetRedirectPath

func (self *SLoadbalancerListenerRule) GetRedirectPath() string

func (*SLoadbalancerListenerRule) GetRedirectScheme

func (self *SLoadbalancerListenerRule) GetRedirectScheme() string

func (*SLoadbalancerListenerRule) GetStatus

func (self *SLoadbalancerListenerRule) GetStatus() string

func (*SLoadbalancerListenerRule) GetSysTags

func (self *SLoadbalancerListenerRule) GetSysTags() map[string]string

func (*SLoadbalancerListenerRule) GetTags

func (self *SLoadbalancerListenerRule) GetTags() (map[string]string, error)

func (*SLoadbalancerListenerRule) IsDefault

func (self *SLoadbalancerListenerRule) IsDefault() bool

func (*SLoadbalancerListenerRule) IsEmulated

func (self *SLoadbalancerListenerRule) IsEmulated() bool

func (*SLoadbalancerListenerRule) Refresh

func (self *SLoadbalancerListenerRule) Refresh() error

func (*SLoadbalancerListenerRule) SetTags

func (self *SLoadbalancerListenerRule) SetTags(tags map[string]string, replace bool) error

type SMachineType

type SMachineType struct {
	Id                           string
	CreationTimestamp            time.Time
	Name                         string
	Description                  string
	GuestCpus                    int
	MemoryMb                     int
	ImageSpaceGb                 int
	MaximumPersistentDisks       int
	MaximumPersistentDisksSizeGb int
	Zone                         string
	SelfLink                     string
	IsSharedCpu                  bool
	Kind                         string
}

type SMetadata

type SMetadata struct {
	Fingerprint string
	Items       []SMetadataItem
}

type SMetadataItem

type SMetadataItem struct {
	Key   string
	Value string
}

type SNetwork

type SNetwork struct {
	multicloud.GoogleTags
	// contains filtered or unexported fields
}

func (*SNetwork) Delete

func (network *SNetwork) Delete() error

func (*SNetwork) GetAllocTimeoutSeconds

func (network *SNetwork) GetAllocTimeoutSeconds() int

func (*SNetwork) GetCreatedAt

func (network *SNetwork) GetCreatedAt() time.Time

func (*SNetwork) GetGateway

func (self *SNetwork) GetGateway() string

func (*SNetwork) GetGlobalId

func (self *SNetwork) GetGlobalId() string

func (*SNetwork) GetIWire

func (network *SNetwork) GetIWire() cloudprovider.ICloudWire

func (*SNetwork) GetId

func (self *SNetwork) GetId() string

func (*SNetwork) GetIpEnd

func (self *SNetwork) GetIpEnd() string

func (*SNetwork) GetIpMask

func (self *SNetwork) GetIpMask() int8

func (*SNetwork) GetIpStart

func (self *SNetwork) GetIpStart() string

func (*SNetwork) GetIsPublic

func (network *SNetwork) GetIsPublic() bool

func (*SNetwork) GetName

func (self *SNetwork) GetName() string

func (*SNetwork) GetProjectId

func (network *SNetwork) GetProjectId() string

func (*SNetwork) GetPublicScope

func (network *SNetwork) GetPublicScope() rbacutils.TRbacScope

func (*SNetwork) GetServerType

func (network *SNetwork) GetServerType() string

func (*SNetwork) GetStatus

func (network *SNetwork) GetStatus() string

func (*SNetwork) IsEmulated

func (network *SNetwork) IsEmulated() bool

func (*SNetwork) Refresh

func (self *SNetwork) Refresh() error

type SNetworkInterface

type SNetworkInterface struct {
	Network       string
	Subnetwork    string
	NetworkIP     string
	Name          string
	AccessConfigs []AccessConfig
	Fingerprint   string
	Kind          string

	cloudprovider.DummyICloudNic
	// contains filtered or unexported fields
}

func (*SNetworkInterface) GetDriver

func (nic *SNetworkInterface) GetDriver() string

func (*SNetworkInterface) GetINetworkId

func (nic *SNetworkInterface) GetINetworkId() string

func (*SNetworkInterface) GetIP

func (nic *SNetworkInterface) GetIP() string

func (*SNetworkInterface) GetId

func (nic *SNetworkInterface) GetId() string

func (*SNetworkInterface) GetMAC

func (nic *SNetworkInterface) GetMAC() string

func (*SNetworkInterface) InClassicNetwork

func (nic *SNetworkInterface) InClassicNetwork() bool

type SObject

type SObject struct {
	Id                      string
	Name                    string
	SelfLink                string
	MediaLink               string
	Bucket                  string
	Generation              string
	Metageneration          string
	ContentType             string
	ContentEncoding         string
	ContentDisposition      string
	ContentLanguage         string
	CacheControl            string
	StorageClass            string
	Size                    int64
	Md5Hash                 string
	Metadata                map[string]string
	Crc32c                  string
	Etag                    string
	TimeCreated             time.Time
	Updated                 time.Time
	TimeStorageClassUpdated time.Time
	// contains filtered or unexported fields
}

func (*SObject) GetAcl

func (o *SObject) GetAcl() cloudprovider.TBucketACLType

func (*SObject) GetETag

func (o *SObject) GetETag() string

func (*SObject) GetIBucket

func (o *SObject) GetIBucket() cloudprovider.ICloudBucket

func (*SObject) GetKey

func (o *SObject) GetKey() string

func (*SObject) GetLastModified

func (o *SObject) GetLastModified() time.Time

func (*SObject) GetMeta

func (o *SObject) GetMeta() http.Header

func (*SObject) GetSizeBytes

func (o *SObject) GetSizeBytes() int64

func (*SObject) GetStorageClass

func (o *SObject) GetStorageClass() string

func (*SObject) SetAcl

func (o *SObject) SetAcl(acl cloudprovider.TBucketACLType) error

func (*SObject) SetMeta

func (o *SObject) SetMeta(ctx context.Context, meta http.Header) error

type SOperation

type SOperation struct {
	Id            string
	Name          string
	OperationType string
	TargetLink    string
	TargetId      string
	Status        string
	User          string
	Progress      int
	InsertTime    time.Time
	StartTime     time.Time
	EndTime       time.Time
	SelfLink      string
	Region        string
	Kind          string
}

type SOrganization

type SOrganization struct {
	OrganizationId string             `json:"organizationId"`
	DisplayName    string             `json:"displayName"`
	Owner          SOrganizationOwner `json:"owner"`
	CreationTime   time.Time          `json:"creationTime"`
	LifecycleState string             `json:"lifecycleState"`
	Name           string             `json:"name"`
}

type SOrganizationOwner

type SOrganizationOwner struct {
	DirectoryCustomerId string `json:"directoryCustomerId"`
}

type SPricingExpression

type SPricingExpression struct {
	UsageUnit                string
	UsageUnitDescription     string
	BaseUnit                 string
	BaseUnitDescription      string
	BaseUnitConversionFactor string
	DisplayQuantity          int
	TieredRates              []STieredRate
}

type SProject

type SProject struct {
	multicloud.SProjectBase
	multicloud.GoogleTags
	Name           string
	CreateTime     time.Time
	LifecycleState string
	ProjectId      string
	ProjectNumber  string
}

func (*SProject) GetGlobalId

func (p *SProject) GetGlobalId() string

func (*SProject) GetId

func (p *SProject) GetId() string

func (*SProject) GetName

func (p *SProject) GetName() string

func (*SProject) GetStatus

func (p *SProject) GetStatus() string

func (*SProject) IsEmulated

func (p *SProject) IsEmulated() bool

func (*SProject) Refresh

func (p *SProject) Refresh() error

type SQuota

type SQuota struct {
	Metric string
	Limit  int
	Usage  int
	Owner  string
}

func (*SQuota) GetCurrentQuotaUsedCount

func (q *SQuota) GetCurrentQuotaUsedCount() int

func (*SQuota) GetDesc

func (q *SQuota) GetDesc() string

func (*SQuota) GetGlobalId

func (q *SQuota) GetGlobalId() string

func (*SQuota) GetMaxQuotaCount

func (q *SQuota) GetMaxQuotaCount() int

func (*SQuota) GetName

func (q *SQuota) GetName() string

func (*SQuota) GetQuotaType

func (q *SQuota) GetQuotaType() string

type SRateInfo

type SRateInfo struct {
	Info map[string]map[string]map[string]map[string]map[string]float64
}

func (*SRateInfo) GetComputePrice

func (rate *SRateInfo) GetComputePrice(regionId string) (map[string]map[string]map[string]float64, error)

func (*SRateInfo) GetCpuPrice

func (rate *SRateInfo) GetCpuPrice(regionId, cpuType string) (float64, error)

func (*SRateInfo) GetDiscount

func (rate *SRateInfo) GetDiscount(sku string) []float64

func (*SRateInfo) GetExtendMemoryGb

func (rate *SRateInfo) GetExtendMemoryGb(sku string, cpu int, memoryMb int) float64

func (*SRateInfo) GetMemoryPrice

func (rate *SRateInfo) GetMemoryPrice(regionId string, memoryType string) (float64, error)

func (*SRateInfo) GetSharedSkuPrice

func (rate *SRateInfo) GetSharedSkuPrice(regionId string, sku string) (float64, error)

func (*SRateInfo) GetSkuPrice

func (rate *SRateInfo) GetSkuPrice(regionId string, sku string, cpu, memoryMb int) (struct {
	Hour  float64
	Month float64
	Year  float64
}, error)

func (*SRateInfo) GetSkuType

func (rate *SRateInfo) GetSkuType(sku string) (string, error)

type SRegion

type SRegion struct {
	cloudprovider.SFakeOnPremiseRegion
	multicloud.SRegion

	Quotas []SQuota

	Description       string
	ID                string
	Kind              string
	Name              string
	Status            string
	SelfLink          string
	CreationTimestamp time.Time
	// contains filtered or unexported fields
}

func (*SRegion) AssociateInstanceEip

func (region *SRegion) AssociateInstanceEip(instanceId string, eip string) error

func (*SRegion) AttachDisk

func (self *SRegion) AttachDisk(instanceId, diskId string, boot bool) error

func (*SRegion) BigQuery

func (region *SRegion) BigQuery(sql string) ([]jsonutils.JSONObject, error)

func (*SRegion) BillingList

func (region *SRegion) BillingList(resource string, params map[string]string, pageSize int, pageToken string, retval interface{}) error

func (*SRegion) BillingListAll

func (region *SRegion) BillingListAll(resource string, params map[string]string, retval interface{}) error

func (*SRegion) ChangeDBInstanceConfig

func (region *SRegion) ChangeDBInstanceConfig(instanceId string, diskSizeGb int, instanceType string) error

func (*SRegion) ChangeInstanceConfig

func (region *SRegion) ChangeInstanceConfig(id string, zone string, instanceType string, cpu int, memoryMb int) error

func (*SRegion) CheckUploadRange

func (region *SRegion) CheckUploadRange(bucket string, uploadId string) error

func (*SRegion) CloudbuildInsert

func (region *SRegion) CloudbuildInsert(body jsonutils.JSONObject) error

func (*SRegion) ConvertAcl

func (region *SRegion) ConvertAcl(acls []GCSAcl) cloudprovider.TBucketACLType

func (*SRegion) CreateBucket

func (region *SRegion) CreateBucket(name string, storageClass string, acl cloudprovider.TBucketACLType) (*SBucket, error)

func (*SRegion) CreateDBInstance

func (region *SRegion) CreateDBInstance(desc *cloudprovider.SManagedDBInstanceCreateConfig) (*SDBInstance, error)

func (*SRegion) CreateDBInstanceAccount

func (region *SRegion) CreateDBInstanceAccount(instanceId string, name, password, host string) error

func (*SRegion) CreateDBInstanceBackup

func (region *SRegion) CreateDBInstanceBackup(instanceId string, name, desc string) error

func (*SRegion) CreateDatabase

func (region *SRegion) CreateDatabase(instanceId string, name, charset string) error

func (*SRegion) CreateDisk

func (region *SRegion) CreateDisk(name string, sizeGb int, zone string, storageType string, image string, desc string) (*SDisk, error)

func (*SRegion) CreateEIP

func (region *SRegion) CreateEIP(args *cloudprovider.SEip) (cloudprovider.ICloudEIP, error)

func (*SRegion) CreateEip

func (region *SRegion) CreateEip(name string, desc string) (*SAddress, error)

func (*SRegion) CreateIBucket

func (region *SRegion) CreateIBucket(name string, storageClassStr string, acl string) error

func (*SRegion) CreateISecurityGroup

func (*SRegion) CreateIVpc

func (*SRegion) CreateImage

func (region *SRegion) CreateImage(name string, desc string, bucketName string, sourceFile string) (*SImage, error)

func (*SRegion) CreateInstance

func (region *SRegion) CreateInstance(zone, name, desc, instanceType string, cpu, memoryMb int, networkId string, ipAddr, imageId string, disks []string) (*SInstance, error)

func (*SRegion) CreateRds

func (region *SRegion) CreateRds(name, engine, databaseVersion, category, instanceType, storageType string, diskSizeGb int, vpcId, zoneId, password string) (*SDBInstance, error)

func (*SRegion) CreateSnapshot

func (self *SRegion) CreateSnapshot(diskId string, name string, desc string) (*SSnapshot, error)

func (*SRegion) CreateVpc

func (self *SRegion) CreateVpc(name string, gvpcId string, cidr string, desc string) (*SVpc, error)

func (*SRegion) DBInstancePublicConnectionOperation

func (region *SRegion) DBInstancePublicConnectionOperation(instanceId string, open bool) error

func (*SRegion) Delete

func (region *SRegion) Delete(id string) error

func (*SRegion) DeleteBucket

func (region *SRegion) DeleteBucket(name string) error

func (*SRegion) DeleteDBInstance

func (region *SRegion) DeleteDBInstance(id string) error

func (*SRegion) DeleteDBInstanceAccount

func (region *SRegion) DeleteDBInstanceAccount(instanceName, user, host string) error

func (*SRegion) DeleteDBInstanceDatabase

func (region *SRegion) DeleteDBInstanceDatabase(id string) error

func (*SRegion) DeleteIBucket

func (region *SRegion) DeleteIBucket(name string) error

func (*SRegion) DeleteObject

func (region *SRegion) DeleteObject(bucket, key string) error

func (*SRegion) DetachDisk

func (region *SRegion) DetachDisk(instanceId, deviceName string) error

func (*SRegion) DissociateInstanceEip

func (self *SRegion) DissociateInstanceEip(instanceId string, eip string) error

func (*SRegion) Do

func (region *SRegion) Do(id string, action string, params map[string]string, body jsonutils.JSONObject) error

func (*SRegion) DownloadObjectRange

func (region *SRegion) DownloadObjectRange(bucket, object string, start, end int64) (io.ReadCloser, error)

func (*SRegion) Get

func (region *SRegion) Get(resourceType, id string, retval interface{}) error

func (*SRegion) GetAllAvailableImages

func (region *SRegion) GetAllAvailableImages() ([]SImage, error)

func (*SRegion) GetBucket

func (region *SRegion) GetBucket(name string) (*SBucket, error)

func (*SRegion) GetBucketAcl

func (region *SRegion) GetBucketAcl(bucket string) ([]GCSAcl, error)

func (*SRegion) GetBucketIam

func (region *SRegion) GetBucketIam(bucket string) (*SBucketIam, error)

func (*SRegion) GetBuckets

func (region *SRegion) GetBuckets(maxResults int, pageToken string) ([]SBucket, error)

func (*SRegion) GetBySelfId

func (self *SRegion) GetBySelfId(id string, retval interface{}) error

func (*SRegion) GetCapabilities

func (region *SRegion) GetCapabilities() []string

func (*SRegion) GetClient

func (region *SRegion) GetClient() *SGoogleClient

func (*SRegion) GetCloudbuildOperation

func (region *SRegion) GetCloudbuildOperation(name string) (*SCloudbuildOperation, error)

func (*SRegion) GetCreatedAt

func (self *SRegion) GetCreatedAt() time.Time

func (*SRegion) GetDBInstance

func (region *SRegion) GetDBInstance(instanceId string) (*SDBInstance, error)

func (*SRegion) GetDBInstanceAccount

func (region *SRegion) GetDBInstanceAccount(id string) (*SDBInstanceAccount, error)

func (*SRegion) GetDBInstanceAccounts

func (region *SRegion) GetDBInstanceAccounts(instance string) ([]SDBInstanceAccount, error)

func (*SRegion) GetDBInstanceBackup

func (region *SRegion) GetDBInstanceBackup(backupId string) (*SDBInstanceBackup, error)

func (*SRegion) GetDBInstanceBackups

func (region *SRegion) GetDBInstanceBackups(instanceId string) ([]SDBInstanceBackup, error)

func (*SRegion) GetDBInstanceDatabases

func (region *SRegion) GetDBInstanceDatabases(instance string) ([]SDBInstanceDatabase, error)

func (*SRegion) GetDBInstances

func (region *SRegion) GetDBInstances(maxResults int, pageToken string) ([]SDBInstance, error)

func (*SRegion) GetDisk

func (region *SRegion) GetDisk(id string) (*SDisk, error)

func (*SRegion) GetDisks

func (region *SRegion) GetDisks(zone string, storageType string, maxResults int, pageToken string) ([]SDisk, error)

func (*SRegion) GetEip

func (region *SRegion) GetEip(id string) (*SAddress, error)

func (*SRegion) GetEips

func (region *SRegion) GetEips(address string, maxResults int, pageToken string) ([]SAddress, error)

func (*SRegion) GetGeographicInfo

func (region *SRegion) GetGeographicInfo() cloudprovider.SGeographicInfo

func (*SRegion) GetGlobalHealthChecks

func (self *SRegion) GetGlobalHealthChecks(filter string) ([]HealthChecks, error)

func (*SRegion) GetGlobalId

func (region *SRegion) GetGlobalId() string

func (*SRegion) GetI18n

func (self *SRegion) GetI18n() cloudprovider.SModelI18nTable

func (*SRegion) GetIBucketById

func (region *SRegion) GetIBucketById(id string) (cloudprovider.ICloudBucket, error)

func (*SRegion) GetIBucketByName

func (region *SRegion) GetIBucketByName(name string) (cloudprovider.ICloudBucket, error)

func (*SRegion) GetIBuckets

func (region *SRegion) GetIBuckets() ([]cloudprovider.ICloudBucket, error)

func (*SRegion) GetICloudQuotas

func (region *SRegion) GetICloudQuotas() ([]cloudprovider.ICloudQuota, error)

func (*SRegion) GetIDBInstanceBackupById

func (region *SRegion) GetIDBInstanceBackupById(backupId string) (cloudprovider.ICloudDBInstanceBackup, error)

func (*SRegion) GetIDBInstanceBackups

func (region *SRegion) GetIDBInstanceBackups() ([]cloudprovider.ICloudDBInstanceBackup, error)

func (*SRegion) GetIDBInstanceById

func (region *SRegion) GetIDBInstanceById(instanceId string) (cloudprovider.ICloudDBInstance, error)

func (*SRegion) GetIDBInstances

func (region *SRegion) GetIDBInstances() ([]cloudprovider.ICloudDBInstance, error)

func (*SRegion) GetIDiskById

func (region *SRegion) GetIDiskById(id string) (cloudprovider.ICloudDisk, error)

func (*SRegion) GetIEipById

func (region *SRegion) GetIEipById(id string) (cloudprovider.ICloudEIP, error)

func (*SRegion) GetIEips

func (region *SRegion) GetIEips() ([]cloudprovider.ICloudEIP, error)

func (*SRegion) GetIHostById

func (region *SRegion) GetIHostById(id string) (cloudprovider.ICloudHost, error)

func (*SRegion) GetILoadBalancerById

func (self *SRegion) GetILoadBalancerById(loadbalancerId string) (cloudprovider.ICloudLoadbalancer, error)

func (*SRegion) GetILoadBalancerCertificateById

func (self *SRegion) GetILoadBalancerCertificateById(certId string) (cloudprovider.ICloudLoadbalancerCertificate, error)

func (*SRegion) GetILoadBalancerCertificates

func (self *SRegion) GetILoadBalancerCertificates() ([]cloudprovider.ICloudLoadbalancerCertificate, error)

func (*SRegion) GetILoadBalancers

func (self *SRegion) GetILoadBalancers() ([]cloudprovider.ICloudLoadbalancer, error)

func (*SRegion) GetISecurityGroupById

func (region *SRegion) GetISecurityGroupById(id string) (cloudprovider.ICloudSecurityGroup, error)

func (*SRegion) GetISecurityGroupByName

func (region *SRegion) GetISecurityGroupByName(opts *cloudprovider.SecurityGroupFilterOptions) (cloudprovider.ICloudSecurityGroup, error)

func (*SRegion) GetISnapshotById

func (region *SRegion) GetISnapshotById(id string) (cloudprovider.ICloudSnapshot, error)

func (*SRegion) GetISnapshotPolicies

func (region *SRegion) GetISnapshotPolicies() ([]cloudprovider.ICloudSnapshotPolicy, error)

func (*SRegion) GetISnapshotPolicyById

func (region *SRegion) GetISnapshotPolicyById(id string) (cloudprovider.ICloudSnapshotPolicy, error)

func (*SRegion) GetISnapshots

func (region *SRegion) GetISnapshots() ([]cloudprovider.ICloudSnapshot, error)

func (*SRegion) GetIStorageById

func (region *SRegion) GetIStorageById(id string) (cloudprovider.ICloudStorage, error)

func (*SRegion) GetIStoragecacheById

func (region *SRegion) GetIStoragecacheById(id string) (cloudprovider.ICloudStoragecache, error)

func (*SRegion) GetIStoragecaches

func (region *SRegion) GetIStoragecaches() ([]cloudprovider.ICloudStoragecache, error)

func (*SRegion) GetIVMById

func (region *SRegion) GetIVMById(id string) (cloudprovider.ICloudVM, error)

func (*SRegion) GetIVpcById

func (self *SRegion) GetIVpcById(id string) (cloudprovider.ICloudVpc, error)

func (*SRegion) GetIVpcs

func (self *SRegion) GetIVpcs() ([]cloudprovider.ICloudVpc, error)

func (*SRegion) GetIZoneById

func (region *SRegion) GetIZoneById(id string) (cloudprovider.ICloudZone, error)

func (*SRegion) GetIZones

func (region *SRegion) GetIZones() ([]cloudprovider.ICloudZone, error)

func (*SRegion) GetId

func (region *SRegion) GetId() string

func (*SRegion) GetImage

func (region *SRegion) GetImage(id string) (*SImage, error)

func (*SRegion) GetImages

func (region *SRegion) GetImages(project string, maxResults int, pageToken string) ([]SImage, error)

func (*SRegion) GetInstance

func (region *SRegion) GetInstance(id string) (*SInstance, error)

func (*SRegion) GetInstances

func (region *SRegion) GetInstances(zone string, maxResults int, pageToken string) ([]SInstance, error)

func (*SRegion) GetLoadbalancer

func (self *SRegion) GetLoadbalancer(resourceId string) (SLoadbalancer, error)

func (*SRegion) GetMachineType

func (region *SRegion) GetMachineType(id string) (*SMachineType, error)

func (*SRegion) GetMachineTypes

func (region *SRegion) GetMachineTypes(zone string, maxResults int, pageToken string) ([]SMachineType, error)

func (*SRegion) GetName

func (region *SRegion) GetName() string

func (*SRegion) GetObjectAcl

func (region *SRegion) GetObjectAcl(bucket string, object string) ([]GCSAcl, error)

func (*SRegion) GetObjects

func (region *SRegion) GetObjects(bucket string, prefix string, nextPageToken string, delimiter string, maxCount int) (*SBucketObjects, error)

func (*SRegion) GetProjectId

func (region *SRegion) GetProjectId() string

func (*SRegion) GetProvider

func (region *SRegion) GetProvider() string

func (*SRegion) GetRdsOperation

func (region *SRegion) GetRdsOperation(id string) (*SOperation, error)

func (*SRegion) GetRegionDisk

func (region *SRegion) GetRegionDisk(id string) (*SRegionDisk, error)

func (*SRegion) GetRegionDisks

func (region *SRegion) GetRegionDisks(storageType string, maxResults int, pageToken string) ([]SRegionDisk, error)

func (*SRegion) GetRegionStorage

func (region *SRegion) GetRegionStorage(id string) (*SRegionStorage, error)

func (*SRegion) GetRegionStorages

func (region *SRegion) GetRegionStorages(maxResults int, pageToken string) ([]SRegionStorage, error)

func (*SRegion) GetRegionalBackendServices

func (self *SRegion) GetRegionalBackendServices(filter string) ([]SBackendServices, error)

func (*SRegion) GetRegionalForwardingRule

func (self *SRegion) GetRegionalForwardingRule(filter string) ([]SForwardingRule, error)

func (*SRegion) GetRegionalHTTPLoadbalancers

func (self *SRegion) GetRegionalHTTPLoadbalancers() ([]SLoadbalancer, error)

http&https lb: urlmaps

func (*SRegion) GetRegionalHealthChecks

func (self *SRegion) GetRegionalHealthChecks(filter string) ([]HealthChecks, error)

func (*SRegion) GetRegionalInstanceGroups

func (self *SRegion) GetRegionalInstanceGroups(filter string) ([]SInstanceGroup, error)

func (*SRegion) GetRegionalLoadbalancers

func (self *SRegion) GetRegionalLoadbalancers() ([]SLoadbalancer, error)

func (*SRegion) GetRegionalSslCertificates

func (self *SRegion) GetRegionalSslCertificates(filter string) ([]SLoadbalancerCertificate, error)

func (*SRegion) GetRegionalTargetHttpProxies

func (self *SRegion) GetRegionalTargetHttpProxies(filter string) ([]STargetHttpProxy, error)

func (*SRegion) GetRegionalTargetHttpsProxies

func (self *SRegion) GetRegionalTargetHttpsProxies(filter string) ([]STargetHttpsProxy, error)

func (*SRegion) GetRegionalTcpLoadbalancers

func (self *SRegion) GetRegionalTcpLoadbalancers() ([]SLoadbalancer, error)

GET https://compute.googleapis.com/compute/v1/projects/{project}/aggregated/targetHttpProxies 前端监听

tcp lb backend type: backend service

func (*SRegion) GetRegionalUdpLoadbalancers

func (self *SRegion) GetRegionalUdpLoadbalancers() ([]SLoadbalancer, error)

udp lb backend type: backend service

func (*SRegion) GetRegionalUrlMaps

func (self *SRegion) GetRegionalUrlMaps(filter string) ([]SUrlMap, error)

As mentioned by Patrick W, there is no direct entity 'load balancer', its just a collection of components. The list seen in the UI that appears to be the load balancer is actually the url-map component, which can be seen via the API with: gcloud compute url-maps list

func (*SRegion) GetResourcePolicies

func (region *SRegion) GetResourcePolicies(maxResults int, pageToken string) ([]SResourcePolicy, error)

func (*SRegion) GetResourcePolicy

func (region *SRegion) GetResourcePolicy(id string) (*SResourcePolicy, error)

func (*SRegion) GetSerialPortOutput

func (region *SRegion) GetSerialPortOutput(id string, port int) (string, error)

func (*SRegion) GetSkuRateInfo

func (region *SRegion) GetSkuRateInfo(skus []SSkuBilling) SRateInfo

func (*SRegion) GetSnapshot

func (region *SRegion) GetSnapshot(id string) (*SSnapshot, error)

func (*SRegion) GetSnapshots

func (region *SRegion) GetSnapshots(disk string, maxResults int, pageToken string) ([]SSnapshot, error)

func (*SRegion) GetStatus

func (region *SRegion) GetStatus() string

func (*SRegion) GetStorage

func (region *SRegion) GetStorage(id string) (*SStorage, error)

func (*SRegion) GetStorages

func (region *SRegion) GetStorages(zone string, maxResults int, pageToken string) ([]SStorage, error)

func (*SRegion) GetVpc

func (self *SRegion) GetVpc(id string) (*SVpc, error)

func (*SRegion) GetVpcs

func (self *SRegion) GetVpcs() ([]SVpc, error)

func (*SRegion) GetZone

func (region *SRegion) GetZone(id string) (*SZone, error)

func (*SRegion) GetZones

func (region *SRegion) GetZones(regionId string, maxResults int, pageToken string) ([]SZone, error)

func (*SRegion) IBucketExist

func (region *SRegion) IBucketExist(name string) (bool, error)

func (*SRegion) Insert

func (self *SRegion) Insert(resource string, body jsonutils.JSONObject, retval interface{}) error

func (*SRegion) IsEmulated

func (region *SRegion) IsEmulated() bool

func (*SRegion) List

func (region *SRegion) List(resource string, params map[string]string, maxResults int, pageToken string, retval interface{}) error

func (*SRegion) ListAll

func (region *SRegion) ListAll(resource string, params map[string]string, retval interface{}) error

func (*SRegion) ListSkuBilling

func (region *SRegion) ListSkuBilling(pageSize int, pageToken string) ([]SSkuBilling, error)

func (*SRegion) NewMultipartUpload

func (region *SRegion) NewMultipartUpload(bucket, key string, cannedAcl cloudprovider.TBucketACLType, storageClassStr string, meta http.Header) (string, error)

func (*SRegion) Patch

func (region *SRegion) Patch(id string, action string, params map[string]string, body jsonutils.JSONObject) error

func (*SRegion) PutObject

func (region *SRegion) PutObject(bucket string, name string, input io.Reader, sizeBytes int64, cannedAcl cloudprovider.TBucketACLType, meta http.Header) error

func (*SRegion) RdsList

func (region *SRegion) RdsList(resource string, params map[string]string, maxResults int, pageToken string, retval interface{}) error

func (*SRegion) RdsListAll

func (region *SRegion) RdsListAll(resource string, params map[string]string, retval interface{}) error

func (*SRegion) RebuildRoot

func (region *SRegion) RebuildRoot(instanceId string, imageId string, sysDiskSizeGb int) (string, error)

func (*SRegion) RecoverFromBackup

func (region *SRegion) RecoverFromBackup(instanceName, dest string, backupId string) error

func (*SRegion) ResetInstance

func (region *SRegion) ResetInstance(id string) error

func (*SRegion) ResizeDisk

func (region *SRegion) ResizeDisk(id string, sizeGb int) error

func (*SRegion) SaveImage

func (self *SRegion) SaveImage(diskId string, opts *cloudprovider.SaveImageOptions) (*SImage, error)

func (*SRegion) SetBucketAcl

func (region *SRegion) SetBucketAcl(bucket string, acl cloudprovider.TBucketACLType) error

func (*SRegion) SetBucketIam

func (region *SRegion) SetBucketIam(bucket string, iam *SBucketIam) (*SBucketIam, error)

func (*SRegion) SetLabels

func (region *SRegion) SetLabels(id string, _labels map[string]string, labelFingerprint string) error

func (*SRegion) SetMetadata

func (region *SRegion) SetMetadata(id string, metadata SMetadata) error

func (*SRegion) SetObjectAcl

func (region *SRegion) SetObjectAcl(bucket, object string, cannedAcl cloudprovider.TBucketACLType) error

func (*SRegion) SetObjectMeta

func (region *SRegion) SetObjectMeta(bucket, object string, meta http.Header) error

func (*SRegion) SetProjectId

func (region *SRegion) SetProjectId(id string)

func (*SRegion) SetResourceTags

func (region *SRegion) SetResourceTags(id string, tags SInstanceTag) error

func (*SRegion) SetServiceAccount

func (region *SRegion) SetServiceAccount(id string, email string) error

func (*SRegion) SingedUrl

func (region *SRegion) SingedUrl(bucket, key string, method string, expire time.Duration) (string, error)

func (*SRegion) StartInstance

func (region *SRegion) StartInstance(id string) error

func (*SRegion) StopInstance

func (region *SRegion) StopInstance(id string) error

func (*SRegion) StorageDelete

func (region *SRegion) StorageDelete(id string) error

func (*SRegion) StorageDo

func (region *SRegion) StorageDo(id string, action string, params map[string]string, body jsonutils.JSONObject) error

func (*SRegion) StorageGet

func (region *SRegion) StorageGet(id string, retval interface{}) error

func (*SRegion) StorageInsert

func (region *SRegion) StorageInsert(resource string, body jsonutils.JSONObject, retval interface{}) error

func (*SRegion) StorageList

func (region *SRegion) StorageList(resource string, params map[string]string, maxResults int, pageToken string, retval interface{}) error

func (*SRegion) StorageListAll

func (region *SRegion) StorageListAll(resource string, params map[string]string, retval interface{}) error

func (*SRegion) StoragePut

func (region *SRegion) StoragePut(id string, body jsonutils.JSONObject, retval interface{}) error

func (*SRegion) UploadObject

func (region *SRegion) UploadObject(bucket string, params url.Values, header http.Header, input io.Reader) error

func (*SRegion) UploadPart

func (region *SRegion) UploadPart(bucket, uploadId string, partIndex int, offset int64, part io.Reader, partSize int64, totalSize int64) error

func (*SRegion) WaitRdsOperation

func (region *SRegion) WaitRdsOperation(id string, resource, action string) (string, error)

type SRegionDisk

type SRegionDisk struct {
	Id                     string
	CreationTimestamp      time.Time
	Name                   string
	SizeGB                 int
	Zone                   string
	Status                 string
	SelfLink               string
	Type                   string
	LastAttachTimestamp    time.Time
	LastDetachTimestamp    time.Time
	LabelFingerprint       string
	PhysicalBlockSizeBytes string
	Kind                   string
	// contains filtered or unexported fields
}

type SRegionStorage

type SRegionStorage struct {
	CreationTimestamp time.Time
	Name              string
	Description       string
	ValidDiskSize     string
	Zone              string
	SelfLink          string
	DefaultDiskSizeGb string
	Kind              string
	// contains filtered or unexported fields
}

type SResourceBase

type SResourceBase struct {
	Name     string
	SelfLink string
	Id       string
}

func (*SResourceBase) GetGlobalId

func (r *SResourceBase) GetGlobalId() string

func (*SResourceBase) GetId

func (r *SResourceBase) GetId() string

func (*SResourceBase) GetName

func (r *SResourceBase) GetName() string

type SResourcePolicy

type SResourcePolicy struct {
	SResourceBase
	multicloud.GoogleTags

	CreationTimestamp      time.Time
	Region                 string
	Status                 string
	Kind                   string
	SnapshotSchedulePolicy SSnapshotSchedulePolicy `json:"snapshotSchedulePolicy"`
	// contains filtered or unexported fields
}

func (*SResourcePolicy) GetCreatedAt

func (policy *SResourcePolicy) GetCreatedAt() time.Time

func (*SResourcePolicy) GetProjectId

func (policy *SResourcePolicy) GetProjectId() string

func (*SResourcePolicy) GetRepeatWeekdays

func (policy *SResourcePolicy) GetRepeatWeekdays() ([]int, error)

func (*SResourcePolicy) GetRetentionDays

func (policy *SResourcePolicy) GetRetentionDays() int

func (*SResourcePolicy) GetStatus

func (policy *SResourcePolicy) GetStatus() string

func (*SResourcePolicy) GetTimePoints

func (policy *SResourcePolicy) GetTimePoints() ([]int, error)

func (*SResourcePolicy) IsActivated

func (policy *SResourcePolicy) IsActivated() bool

func (*SResourcePolicy) IsEmulated

func (policy *SResourcePolicy) IsEmulated() bool

func (*SResourcePolicy) Refresh

func (policy *SResourcePolicy) Refresh() error

type SRetentionPolicy

type SRetentionPolicy struct {
	MaxRetentionDays   int
	OnSourceDiskDelete string
}

type SRole

type SRole struct {
	Name                string
	Title               string
	Description         string
	IncludedPermissions []string
	Stage               string
	Etag                string
	// contains filtered or unexported fields
}

func (*SRole) Delete

func (role *SRole) Delete() error

func (*SRole) GetDescription

func (role *SRole) GetDescription() string

func (*SRole) GetDocument

func (role *SRole) GetDocument() (*jsonutils.JSONDict, error)

func (*SRole) GetGlobalId

func (role *SRole) GetGlobalId() string

func (*SRole) GetName

func (role *SRole) GetName() string

func (*SRole) UpdateDocument

func (role *SRole) UpdateDocument(document *jsonutils.JSONDict) error

type SSLHealthCheck

type SSLHealthCheck struct {
	Port        int64  `json:"port"`
	Request     string `json:"request"`
	Response    string `json:"response"`
	ProxyHeader string `json:"proxyHeader"`
}

type SSchedule

type SSchedule struct {
	WeeklySchedule SWeeklySchedule
	DailySchedule  SDailySchedule
	HourlySchedule SHourlySchedule
}

type SSecurityGroup

type SSecurityGroup struct {
	multicloud.SSecurityGroup
	multicloud.GoogleTags

	ServiceAccount string
	Tag            string
	// contains filtered or unexported fields
}

func (*SSecurityGroup) Delete

func (secgroup *SSecurityGroup) Delete() error

func (*SSecurityGroup) GetDescription

func (secgroup *SSecurityGroup) GetDescription() string

func (*SSecurityGroup) GetGlobalId

func (secgroup *SSecurityGroup) GetGlobalId() string

func (*SSecurityGroup) GetId

func (secgroup *SSecurityGroup) GetId() string

func (*SSecurityGroup) GetName

func (secgroup *SSecurityGroup) GetName() string

func (*SSecurityGroup) GetProjectId

func (secgroup *SSecurityGroup) GetProjectId() string

func (*SSecurityGroup) GetRules

func (self *SSecurityGroup) GetRules() ([]cloudprovider.SecurityRule, error)

func (*SSecurityGroup) GetStatus

func (secgroup *SSecurityGroup) GetStatus() string

func (*SSecurityGroup) GetVpcId

func (secgroup *SSecurityGroup) GetVpcId() string

func (*SSecurityGroup) IsEmulated

func (secgroup *SSecurityGroup) IsEmulated() bool

func (*SSecurityGroup) Refresh

func (secgroup *SSecurityGroup) Refresh() error

func (*SSecurityGroup) SyncRules

func (secgroup *SSecurityGroup) SyncRules(common, inAdds, outAdds, inDels, outDels []cloudprovider.SecurityRule) error

type SSkuBilling

type SSkuBilling struct {
	Name                string
	SkuId               string
	Description         string
	Category            SkuBillingCatetory
	ServiceRegions      []string
	PricingInfo         []SkuPricingInfo
	ServiceProviderName string
}

type SSnapshot

type SSnapshot struct {
	SResourceBase
	multicloud.GoogleTags

	CreationTimestamp  time.Time
	Status             string
	SourceDisk         string
	SourceDiskId       string
	DiskSizeGb         int32
	StorageBytes       int
	StorageBytesStatus string
	Licenses           []string
	LabelFingerprint   string
	LicenseCodes       []string
	StorageLocations   []string
	Kind               string
	// contains filtered or unexported fields
}

func (*SSnapshot) Delete

func (snapshot *SSnapshot) Delete() error

func (*SSnapshot) GetCreatedAt

func (self *SSnapshot) GetCreatedAt() time.Time

func (*SSnapshot) GetDiskId

func (snapshot *SSnapshot) GetDiskId() string

func (*SSnapshot) GetDiskType

func (snapshot *SSnapshot) GetDiskType() string

func (*SSnapshot) GetProjectId

func (snapshot *SSnapshot) GetProjectId() string

func (*SSnapshot) GetSizeMb

func (snapshot *SSnapshot) GetSizeMb() int32

func (*SSnapshot) GetStatus

func (snapshot *SSnapshot) GetStatus() string

CREATING, DELETING, FAILED, READY, or UPLOADING

func (*SSnapshot) IsEmulated

func (snapshot *SSnapshot) IsEmulated() bool

func (*SSnapshot) Refresh

func (snapshot *SSnapshot) Refresh() error

type SSnapshotProperties

type SSnapshotProperties struct {
	StorageLocations []string
	GuestFlush       bool
}

type SSnapshotSchedulePolicy

type SSnapshotSchedulePolicy struct {
	Schedule           SSchedule
	RetentionPolicy    SRetentionPolicy
	SnapshotProperties SSnapshotProperties
}

type SSqlserverDatabaseDetails

type SSqlserverDatabaseDetails struct {
	CompatibilityLevel int
	RecoveryModel      string
}

type SSqlserverUserDetails

type SSqlserverUserDetails struct {
	ServerRoles []string
}

type SStorage

type SStorage struct {
	SResourceBase
	multicloud.GoogleTags

	CreationTimestamp time.Time
	Description       string
	ValidDiskSize     string
	Zone              string
	DefaultDiskSizeGb string
	Kind              string
	// contains filtered or unexported fields
}

func (*SStorage) CreateIDisk

func (storage *SStorage) CreateIDisk(conf *cloudprovider.DiskCreateConfig) (cloudprovider.ICloudDisk, error)

func (*SStorage) DisableSync

func (storage *SStorage) DisableSync() bool

func (*SStorage) GetCapacityMB

func (storage *SStorage) GetCapacityMB() int64

func (*SStorage) GetCapacityUsedMB

func (self *SStorage) GetCapacityUsedMB() int64

func (*SStorage) GetCreatedAt

func (self *SStorage) GetCreatedAt() time.Time

func (*SStorage) GetEnabled

func (storage *SStorage) GetEnabled() bool

func (*SStorage) GetIDiskById

func (storage *SStorage) GetIDiskById(id string) (cloudprovider.ICloudDisk, error)

func (*SStorage) GetIDisks

func (storage *SStorage) GetIDisks() ([]cloudprovider.ICloudDisk, error)

func (*SStorage) GetIStoragecache

func (storage *SStorage) GetIStoragecache() cloudprovider.ICloudStoragecache

func (*SStorage) GetIZone

func (storage *SStorage) GetIZone() cloudprovider.ICloudZone

func (*SStorage) GetMediumType

func (storage *SStorage) GetMediumType() string

func (*SStorage) GetMountPoint

func (storage *SStorage) GetMountPoint() string

func (*SStorage) GetName

func (storage *SStorage) GetName() string

func (*SStorage) GetStatus

func (storage *SStorage) GetStatus() string

func (*SStorage) GetStorageConf

func (storage *SStorage) GetStorageConf() jsonutils.JSONObject

func (*SStorage) GetStorageType

func (storage *SStorage) GetStorageType() string

func (*SStorage) IsEmulated

func (storage *SStorage) IsEmulated() bool

func (*SStorage) IsSysDiskStore

func (storage *SStorage) IsSysDiskStore() bool

func (*SStorage) Refresh

func (storage *SStorage) Refresh() error

type SStoragecache

type SStoragecache struct {
	multicloud.SResourceBase
	multicloud.GoogleTags
	// contains filtered or unexported fields
}

func (*SStoragecache) CreateIImage

func (cache *SStoragecache) CreateIImage(snapshoutId, imageName, osType, imageDesc string) (cloudprovider.ICloudImage, error)

func (*SStoragecache) DownloadImage

func (cache *SStoragecache) DownloadImage(userCred mcclient.TokenCredential, imageId string, extId string, path string) (jsonutils.JSONObject, error)

func (*SStoragecache) GetGlobalId

func (cache *SStoragecache) GetGlobalId() string

func (*SStoragecache) GetICloudImages

func (cache *SStoragecache) GetICloudImages() ([]cloudprovider.ICloudImage, error)

func (*SStoragecache) GetICustomizedCloudImages

func (cache *SStoragecache) GetICustomizedCloudImages() ([]cloudprovider.ICloudImage, error)

func (*SStoragecache) GetIImageById

func (cache *SStoragecache) GetIImageById(extId string) (cloudprovider.ICloudImage, error)

func (*SStoragecache) GetId

func (cache *SStoragecache) GetId() string

func (*SStoragecache) GetName

func (cache *SStoragecache) GetName() string

func (*SStoragecache) GetPath

func (cache *SStoragecache) GetPath() string

func (*SStoragecache) GetStatus

func (cache *SStoragecache) GetStatus() string

func (*SStoragecache) IsEmulated

func (cache *SStoragecache) IsEmulated() bool

func (*SStoragecache) Refresh

func (cache *SStoragecache) Refresh() error

func (*SStoragecache) UploadImage

func (cache *SStoragecache) UploadImage(ctx context.Context, userCred mcclient.TokenCredential, image *cloudprovider.SImageCreateOption, callback func(progress float32)) (string, error)

type STargetHttpProxy

type STargetHttpProxy struct {
	SResourceBase

	CreationTimestamp string `json:"creationTimestamp"`
	Description       string `json:"description"`
	URLMap            string `json:"urlMap"`
	Region            string `json:"region"`
	ProxyBind         bool   `json:"proxyBind"`
	Fingerprint       string `json:"fingerprint"`
	Kind              string `json:"kind"`
}

type STargetHttpsProxy

type STargetHttpsProxy struct {
	SResourceBase

	CreationTimestamp   string   `json:"creationTimestamp"`
	Description         string   `json:"description"`
	URLMap              string   `json:"urlMap"`
	SSLCertificates     []string `json:"sslCertificates"`
	QuicOverride        string   `json:"quicOverride"`
	SSLPolicy           string   `json:"sslPolicy"`
	Region              string   `json:"region"`
	ProxyBind           bool     `json:"proxyBind"`
	ServerTLSPolicy     string   `json:"serverTlsPolicy"`
	AuthorizationPolicy string   `json:"authorizationPolicy"`
	Fingerprint         string   `json:"fingerprint"`
	Kind                string   `json:"kind"`
}

type STieredRate

type STieredRate struct {
	StartUsageAmount int
	UnitPrice        SUnitPrice
}

type SUniformBucketLevelAccess

type SUniformBucketLevelAccess struct {
	Enabled bool
}

type SUnitPrice

type SUnitPrice struct {
	CurrencyCode string
	Units        string
	Nanos        int
}

type SUrlMap

type SUrlMap struct {
	SResourceBase

	CreationTimestamp string        `json:"creationTimestamp"`
	HostRules         []HostRule    `json:"hostRules"`
	PathMatchers      []PathMatcher `json:"pathMatchers"`
	DefaultService    string        `json:"defaultService"`
	Fingerprint       string        `json:"fingerprint"`
	Region            string        `json:"region"`
	Kind              string        `json:"kind"`
}

type SVpc

type SVpc struct {
	multicloud.SVpc
	multicloud.GoogleTags
	SResourceBase

	CreationTimestamp     time.Time
	Network               string
	IpCidrRange           string
	Region                string
	GatewayAddress        string
	Status                string
	AvailableCpuPlatforms []string
	PrivateIpGoogleAccess bool
	Fingerprint           string
	Purpose               string
	Kind                  string
	// contains filtered or unexported fields
}

func (*SVpc) Delete

func (vpc *SVpc) Delete() error

func (*SVpc) GetCidrBlock

func (vpc *SVpc) GetCidrBlock() string

func (*SVpc) GetGlobalVpcId

func (self *SVpc) GetGlobalVpcId() string

func (*SVpc) GetIRouteTableById

func (self *SVpc) GetIRouteTableById(routeTableId string) (cloudprovider.ICloudRouteTable, error)

func (*SVpc) GetIRouteTables

func (vpc *SVpc) GetIRouteTables() ([]cloudprovider.ICloudRouteTable, error)

func (*SVpc) GetISecurityGroups

func (vpc *SVpc) GetISecurityGroups() ([]cloudprovider.ICloudSecurityGroup, error)

func (*SVpc) GetIWireById

func (vpc *SVpc) GetIWireById(id string) (cloudprovider.ICloudWire, error)

func (*SVpc) GetIWires

func (vpc *SVpc) GetIWires() ([]cloudprovider.ICloudWire, error)

func (*SVpc) GetIsDefault

func (vpc *SVpc) GetIsDefault() bool

func (*SVpc) GetRegion

func (vpc *SVpc) GetRegion() cloudprovider.ICloudRegion

func (*SVpc) GetStatus

func (vpc *SVpc) GetStatus() string

func (*SVpc) IsEmulated

func (vpc *SVpc) IsEmulated() bool

func (*SVpc) Refresh

func (self *SVpc) Refresh() error

type SWeeklySchedule

type SWeeklySchedule struct {
	DayOfWeeks []SDayOfWeek
}

type SWire

type SWire struct {
	multicloud.SResourceBase
	multicloud.GoogleTags
	// contains filtered or unexported fields
}

func (*SWire) CreateINetwork

func (*SWire) GetBandwidth

func (wire *SWire) GetBandwidth() int

func (*SWire) GetCreatedAt

func (wire *SWire) GetCreatedAt() time.Time

func (*SWire) GetGlobalId

func (wire *SWire) GetGlobalId() string

func (*SWire) GetINetworkById

func (self *SWire) GetINetworkById(id string) (cloudprovider.ICloudNetwork, error)

func (*SWire) GetINetworks

func (self *SWire) GetINetworks() ([]cloudprovider.ICloudNetwork, error)

func (*SWire) GetIVpc

func (wire *SWire) GetIVpc() cloudprovider.ICloudVpc

func (*SWire) GetIZone

func (wire *SWire) GetIZone() cloudprovider.ICloudZone

func (*SWire) GetId

func (wire *SWire) GetId() string

func (*SWire) GetName

func (wire *SWire) GetName() string

func (*SWire) GetStatus

func (wire *SWire) GetStatus() string

func (*SWire) IsEmulated

func (wire *SWire) IsEmulated() bool

func (*SWire) Refresh

func (wire *SWire) Refresh() error

type SZone

type SZone struct {
	multicloud.SResourceBase
	multicloud.GoogleTags

	Description           string
	ID                    string
	Kind                  string
	Name                  string
	Region                string
	SelfLink              string
	AvailableCpuPlatforms []string
	Status                string
	// contains filtered or unexported fields
}

func (*SZone) GetGlobalId

func (zone *SZone) GetGlobalId() string

func (*SZone) GetI18n

func (zone *SZone) GetI18n() cloudprovider.SModelI18nTable

func (*SZone) GetIHostById

func (zone *SZone) GetIHostById(hostId string) (cloudprovider.ICloudHost, error)

func (*SZone) GetIHosts

func (zone *SZone) GetIHosts() ([]cloudprovider.ICloudHost, error)

func (*SZone) GetIRegion

func (zone *SZone) GetIRegion() cloudprovider.ICloudRegion

func (*SZone) GetIStorageById

func (zone *SZone) GetIStorageById(storageId string) (cloudprovider.ICloudStorage, error)

func (*SZone) GetIStorages

func (zone *SZone) GetIStorages() ([]cloudprovider.ICloudStorage, error)

func (*SZone) GetId

func (zone *SZone) GetId() string

func (*SZone) GetName

func (zone *SZone) GetName() string

func (*SZone) GetStatus

func (zone *SZone) GetStatus() string

func (*SZone) IsEmulated

func (zone *SZone) IsEmulated() bool

func (*SZone) Refresh

func (zone *SZone) Refresh() error

type SelfManaged

type SelfManaged struct {
	Certificate string `json:"certificate"`
}

type ServiceAccount

type ServiceAccount struct {
	Email string
	// contains filtered or unexported fields
}

type SkuBillingCatetory

type SkuBillingCatetory struct {
	ServiceDisplayName string
	ResourceFamily     string
	ResourceGroup      string
	UsageType          string
}

type SkuPricingInfo

type SkuPricingInfo struct {
	Summary           string
	PricingExpression SPricingExpression

	EffectiveTime time.Time
	// contains filtered or unexported fields
}

type TCPHealthCheck

type TCPHealthCheck struct {
	Port        int64  `json:"port"`
	ProxyHeader string `json:"proxyHeader"`
}

type TTL

type TTL struct {
	Seconds string `json:"seconds"`
	Nanos   int64  `json:"nanos"`
}

type Test

type Test struct {
	Description                  string   `json:"description"`
	Host                         string   `json:"host"`
	Path                         string   `json:"path"`
	Headers                      []Header `json:"headers"`
	Service                      string   `json:"service"`
	ExpectedOutputURL            string   `json:"expectedOutputUrl"`
	ExpectedRedirectResponseCode int64    `json:"expectedRedirectResponseCode"`
}

type URLRedirect

type URLRedirect struct {
	HostRedirect         string `json:"hostRedirect"`
	PathRedirect         string `json:"pathRedirect"`
	PrefixRedirect       string `json:"prefixRedirect"`
	RedirectResponseCode string `json:"redirectResponseCode"`
	HTTPSRedirect        bool   `json:"httpsRedirect"`
	StripQuery           bool   `json:"stripQuery"`
}

type URLRewrite

type URLRewrite struct {
	PathPrefixRewrite string `json:"pathPrefixRewrite"`
	HostRewrite       string `json:"hostRewrite"`
}

type WeightedBackendService

type WeightedBackendService struct {
	BackendService string       `json:"backendService"`
	Weight         int64        `json:"weight"`
	HeaderAction   HeaderAction `json:"headerAction"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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