premium_domains

package
v0.0.0-...-57791d6 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2024 License: Apache-2.0 Imports: 2 Imported by: 2

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 AccessProgress

type AccessProgress struct {
	Step   int `json:"step"`
	Status int `json:"status"`
}

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

Create create a premium domain in HuaweiCloud.

type CustomPage

type CustomPage struct {
	StatusCode  string `json:"status_code,omitempty"`
	ContentType string `json:"content_type,omitempty"`
	Content     string `json:"content,omitempty"`
}

type DomainBlockPage

type DomainBlockPage struct {
	Template    string           `json:"template"`
	CustomPage  DomainCustomPage `json:"custom_page"`
	RedirectUrl string           `json:"redirect_url"`
}

type DomainCircuitBreaker

type DomainCircuitBreaker struct {
	Switch           bool    `json:"switch"`
	DeadNum          int     `json:"dead_num"`
	DeadRatio        float64 `json:"dead_ratio"`
	BlockTime        int     `json:"block_time"`
	SuperpositionNum int     `json:"superposition_num"`
	SuspendNum       int     `json:"suspend_num"`
	SusBlockTime     int     `json:"sus_block_time"`
}

type DomainCustomPage

type DomainCustomPage struct {
	StatusCode  string `json:"status_code"`
	ContentType string `json:"content_type"`
	Content     string `json:"content"`
}

type DomainTimeoutConfig

type DomainTimeoutConfig struct {
	ConnectTimeout int `json:"connect_timeout"`
	SendTimeout    int `json:"send_timeout"`
	ReadTimeout    int `json:"read_timeout"`
}

type DomainTrafficMark

type DomainTrafficMark struct {
	Sip    []string `json:"sip"`
	Cookie string   `json:"cookie"`
	Params string   `json:"params"`
}

type Flag

type Flag struct {
	Pci3ds string `json:"pci_3ds,omitempty"`
	PciDss string `json:"pci_dss,omitempty"`
}

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

Update update premium domains according to UpdatePremiumHostOpts.

type PremiumHostList

type PremiumHostList struct {
	Total int                 `json:"total"`
	Items []SimplePremiumHost `json:"items"`
}

func List

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 TimeoutConfig struct {
	ConnectTimeout *int `json:"connect_timeout,omitempty"`
	SendTimeout    *int `json:"send_timeout,omitempty"`
	ReadTimeout    *int `json:"read_timeout,omitempty"`
}

type TrafficMark

type TrafficMark struct {
	Sip    []string `json:"sip,omitempty"`
	Cookie string   `json:"cookie,omitempty"`
	Params string   `json:"params,omitempty"`
}

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.

Jump to

Keyboard shortcuts

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