Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var RequestOpts = golangsdk.RequestOpts{ MoreHeaders: map[string]string{"Content-Type": "application/json", "X-Language": "en-us"}, }
Functions ¶
This section is empty.
Types ¶
type CreateOpts ¶
type CreateOpts struct { CertificateId string `json:"certificateid,omitempty"` CertificateName string `json:"certificatename,omitempty"` HostName string `json:"hostname" required:"true"` Proxy *bool `json:"proxy,omitempty"` PolicyId string `json:"policyid,omitempty"` Servers []Server `json:"server,omitempty"` }
CreatePremiumHostOpts the options for creating premium domains.
type CreatePremiumHostRst ¶
type CreatePremiumHostRst struct { Id string `json:"id"` PolicyId string `json:"policyid"` HostName string `json:"hostname"` DomainId string `json:"domainid"` ProjectId string `json:"projectid"` Protocol string `json:"protocol"` }
func Create ¶
func Create(c *golangsdk.ServiceClient, opts CreateOpts) (*CreatePremiumHostRst, error)
Create create a premium domain in HuaweiCloud.
type DomainBlockPage ¶
type DomainBlockPage struct { Template string `json:"template"` CustomPage DomainCustomPage `json:"custom_page"` RedirectUrl string `json:"redirect_url"` }
type DomainCustomPage ¶
type DomainTrafficMark ¶
type ListPremiumHostOpts ¶
type ListPremiumHostOpts struct { Page string `q:"page"` PageSize string `q:"pagesize"` HostName string `q:"hostname"` PolicyName string `q:"policyname"` ProtectStatus int `q:"protect_status"` }
ListPremiumHostOpts the options for querying a list of premium domains.
type PremiumHost ¶
type PremiumHost struct { Id string `json:"id"` PolicyId string `json:"policyid"` HostName string `json:"hostname"` DomainId string `json:"domainid"` ProjectId string `json:"project_id"` AccessCode string `json:"access_code"` Protocol string `json:"protocol"` Servers []Server `json:"server"` CertificateId string `json:"certificateid"` CertificateName string `json:"certificatename"` Tls string `json:"tls"` Cipher string `json:"cipher"` Proxy bool `json:"proxy"` Locked int `json:"locked"` ProtectStatus int `json:"protect_status"` AccessStatus int `json:"access_status"` Timestamp int64 `json:"timestamp"` BlockPage DomainBlockPage `json:"block_page"` Extend map[string]string `json:"extend"` TrafficMark DomainTrafficMark `json:"traffic_mark"` Flag map[string]string `json:"flag"` Mode string `json:"mode"` PoolIds []string `json:"pool_ids"` }
func Get ¶
func Get(c *golangsdk.ServiceClient, hostId string) (*PremiumHost, error)
Get get a premium domain by id.
func Update ¶
func Update(c *golangsdk.ServiceClient, hostId string, opts UpdatePremiumHostOpts) (*PremiumHost, error)
Update update premium domains according to UpdatePremiumHostOpts.
type PremiumHostList ¶
type PremiumHostList struct { Total int `json:"total"` Items []SimplePremiumHost `json:"items"` }
func List ¶
func List(c *golangsdk.ServiceClient, opts ListPremiumHostOpts) (*PremiumHostList, error)
List query a list of premium domains.
type PremiumHostProtectStatus ¶
type PremiumHostProtectStatus struct {
KeepPolicy bool
}
func UpdateProtectStatus ¶
func UpdateProtectStatus(c *golangsdk.ServiceClient, hostId string, protectStatus int) (*PremiumHostProtectStatus, error)
UpdateProtectStatus update the protect status of premium domain.
type Server ¶
type Server struct { FrontProtocol string `json:"front_protocol" required:"true"` BackProtocol string `json:"back_protocol" required:"true"` Address string `json:"address" required:"true"` Port int `json:"port" required:"true"` Type string `json:"type,omitempty"` VpcId string `json:"vpc_id,omitempty"` }
PremiumDomainServer the options of domain server for creating premium domains.
type SimplePremiumHost ¶
type SimplePremiumHost struct { Id string `json:"id"` Hostname string `json:"hostname"` PolicyId string `json:"policyid"` ProtectStatus int `json:"protect_status"` AccessStatus int `json:"access_status"` Flag map[string]string `json:"flag"` Mode string `json:"mode"` PoolIds []string `json:"pool_ids"` }
func Delete ¶
func Delete(c *golangsdk.ServiceClient, hostId string, keepPolicy bool) (*SimplePremiumHost, error)
Delete a premium domain by id.
type UpdatePremiumHostOpts ¶
type UpdatePremiumHostOpts struct { Proxy *bool `json:"proxy,omitempty"` CertificateId string `json:"certificateid,omitempty"` CertificateName string `json:"certificatename,omitempty"` Tls string `json:"tls,omitempty"` Cipher string `json:"cipher,omitempty"` }
UpdatePremiumHostOpts the options for updating premium domains.
Click to show internal directories.
Click to hide internal directories.