Documentation ¶
Index ¶
- Variables
- type AccessProgress
- type BlockPage
- type CircuitBreaker
- type CreateOpts
- type CreatePremiumHostRst
- type CustomPage
- type DomainBlockPage
- type DomainCircuitBreaker
- type DomainCustomPage
- type DomainTimeoutConfig
- type DomainTrafficMark
- type Flag
- type ListPremiumHostOpts
- type PremiumHost
- type PremiumHostList
- type PremiumHostProtectStatus
- type Server
- type SimplePremiumHost
- type TimeoutConfig
- type TrafficMark
- type UpdatePremiumHostOpts
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 AccessProgress ¶
type BlockPage ¶
type BlockPage struct { Template string `json:"template,omitempty"` CustomPage *CustomPage `json:"custom_page,omitempty"` RedirectUrl string `json:"redirect_url,omitempty"` }
type CircuitBreaker ¶
type CircuitBreaker struct { Switch *bool `json:"switch,omitempty"` DeadNum *int `json:"dead_num,omitempty"` DeadRatio *float64 `json:"dead_ratio,omitempty"` BlockTime *int `json:"block_time,omitempty"` SuperpositionNum *int `json:"superposition_num,omitempty"` SuspendNum *int `json:"suspend_num,omitempty"` SusBlockTime *int `json:"sus_block_time,omitempty"` }
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"` BlockPage *BlockPage `json:"block_page,omitempty"` ForwardHeaderMap map[string]string `json:"forward_header_map,omitempty"` Description string `json:"description,omitempty"` EnterpriseProjectID string `q:"enterprise_project_id" json:"-"` }
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 CustomPage ¶
type DomainBlockPage ¶
type DomainBlockPage struct { Template string `json:"template"` CustomPage DomainCustomPage `json:"custom_page"` RedirectUrl string `json:"redirect_url"` }
type DomainCircuitBreaker ¶
type DomainCustomPage ¶
type DomainTimeoutConfig ¶
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"` EnterpriseProjectID string `q:"enterprise_project_id"` }
ListPremiumHostOpts the options for querying a list of premium domains.
type PremiumHost ¶
type PremiumHost struct { Id string `json:"id"` HostName string `json:"hostname"` Protocol string `json:"protocol"` Servers []Server `json:"server"` Proxy bool `json:"proxy"` Locked int `json:"locked"` Timestamp int64 `json:"timestamp"` Tls string `json:"tls"` Cipher string `json:"cipher"` Extend map[string]string `json:"extend"` Flag map[string]string `json:"flag"` Description string `json:"description"` PolicyId string `json:"policyid"` DomainId string `json:"domainid"` ProjectId string `json:"projectid"` EnterpriseProjectId string `json:"enterprise_project_id"` CertificateId string `json:"certificateid"` CertificateName string `json:"certificatename"` ProtectStatus int `json:"protect_status"` AccessStatus int `json:"access_status"` WebTag string `json:"web_tag"` BlockPage DomainBlockPage `json:"block_page"` TrafficMark DomainTrafficMark `json:"traffic_mark"` CircuitBreaker DomainCircuitBreaker `json:"circuit_breaker"` TimeoutConfig DomainTimeoutConfig `json:"timeout_config"` ForwardHeaderMap map[string]string `json:"forward_header_map"` AccessProgress []AccessProgress `json:"access_progress"` // Deprecated AccessCode string `json:"access_code"` // Deprecated Mode string `json:"mode"` // Deprecated PoolIds []string `json:"pool_ids"` }
func Get ¶
func Get(c *golangsdk.ServiceClient, hostId string) (*PremiumHost, error)
Get get a premium domain by id.
func GetWithEpsID ¶
func GetWithEpsID(c *golangsdk.ServiceClient, hostId, epsID string) (*PremiumHost, error)
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.
func UpdateProtectStatusWithWpsID ¶
func UpdateProtectStatusWithWpsID(c *golangsdk.ServiceClient, protectStatus int, hostId, epsID string) (*PremiumHostProtectStatus, error)
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.
func DeleteWithEpsID ¶
func DeleteWithEpsID(c *golangsdk.ServiceClient, keepPolicy bool, hostId, epsID string) (*SimplePremiumHost, error)
type TimeoutConfig ¶
type TrafficMark ¶
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"` Description *string `json:"description,omitempty"` WebTag *string `json:"web_tag,omitempty"` BlockPage *BlockPage `json:"block_page,omitempty"` TrafficMark *TrafficMark `json:"traffic_mark,omitempty"` CircuitBreaker *CircuitBreaker `json:"circuit_breaker,omitempty"` TimeoutConfig *TimeoutConfig `json:"timeout_config,omitempty"` Flag *Flag `json:"flag,omitempty"` ForwardHeaderMap map[string]string `json:"forward_header_map,omitempty"` EnterpriseProjectID string `q:"enterprise_project_id" json:"-"` }
UpdatePremiumHostOpts the options for updating premium domains.
Click to show internal directories.
Click to hide internal directories.