premium_domains

package
v0.0.0-...-d823fe1 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2021 License: Apache-2.0 Imports: 1 Imported by: 1

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

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 DomainCustomPage struct {
	StatusCode  string `json:"status_code"`
	ContentType string `json:"content_type"`
	Content     string `json:"content"`
}

type DomainTrafficMark

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

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

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.

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.

Jump to

Keyboard shortcuts

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