Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var RequestOpts golangsdk.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 { //Domain name HostName string `json:"hostname" required:"true"` //Certificate ID CertificateId string `json:"certificateid,omitempty"` //The original server information Server []ServerOpts `json:"server" required:"true"` //Whether proxy is configured Proxy *bool `json:"proxy" required:"true"` //The type of the source IP header SipHeaderName string `json:"sip_header_name,omitempty"` //The HTTP request header for identifying the real source IP. SipHeaderList []string `json:"sip_header_list,omitempty"` }
CreateOpts contains all the values needed to create a new backup.
func (CreateOpts) ToDomainCreateMap ¶
func (opts CreateOpts) ToDomainCreateMap() (map[string]interface{}, error)
ToDomainCreateMap builds a create request body from CreateOpts.
type CreateOptsBuilder ¶
CreateOptsBuilder allows extensions to add additional parameters to the Create request.
type CreateResult ¶
type CreateResult struct {
// contains filtered or unexported fields
}
CreateResult represents the result of a create operation. Call its Extract method to interpret it as a Domain.
func Create ¶
func Create(c *golangsdk.ServiceClient, opts CreateOptsBuilder) (r CreateResult)
Create will create a new Domain based on the values in CreateOpts.
type DeleteResult ¶
type DeleteResult struct {
golangsdk.ErrResult
}
DeleteResult represents the result of a delete operation. Call its ExtractErr method to determine if the request succeeded or failed.
func Delete ¶
func Delete(c *golangsdk.ServiceClient, id string) (r DeleteResult)
Delete will permanently delete a particular Domain based on its unique ID.
type Domain ¶
type Domain struct { //Domain ID Id string `json:"id"` //Domain name HostName string `json:"hostname"` //Access Code AccessCode string `json:"access_code"` //CNAME value Cname string `json:"cname"` //TXT record TxtCode string `json:"txt_code"` //Sub Domain name SubDomain string `json:"sub_domain"` //Policy ID PolicyID string `json:"policy_id"` //WAF mode ProtectStatus int `json:"protect_status"` //Whether a domain name is connected to WAF AccessStatus int `json:"access_status"` //Protocol type Protocol string `json:"protocol"` //Certificate ID CertificateId string `json:"certificateid"` //The original server information Server []Server `json:"server"` //Whether proxy is configured Proxy bool `json:"proxy"` //The type of the source IP header SipHeaderName string `json:"sip_header_name"` //The HTTP request header for identifying the real source IP. SipHeaderList []string `json:"sip_header_list"` }
type GetResult ¶
type GetResult struct {
// contains filtered or unexported fields
}
GetResult represents the result of a get operation. Call its Extract method to interpret it as a Domain.
type Server ¶
type Server struct { //Protocol type of the client ClientProtocol string `json:"client_protocol" required:"true"` //Protocol used by WAF to forward client requests to the server ServerProtocol string `json:"server_protocol" required:"true"` //IP address or domain name of the web server that the client accesses. Address string `json:"address" required:"true"` //Port number used by the web server Port int `json:"port" required:"true"` }
type ServerOpts ¶
type ServerOpts struct { //Protocol type of the client ClientProtocol string `json:"client_protocol" required:"true"` //Protocol used by WAF to forward client requests to the server ServerProtocol string `json:"server_protocol" required:"true"` //IP address or domain name of the web server that the client accesses. Address string `json:"address" required:"true"` //Port number used by the web server Port string `json:"port" required:"true"` }
type UpdateOpts ¶
type UpdateOpts struct { //Certificate ID CertificateId string `json:"certificateid,omitempty"` //The original server information Server []ServerOpts `json:"server,omitempty"` //Whether proxy is configured Proxy *bool `json:"proxy,omitempty"` //The type of the source IP header SipHeaderName string `json:"sip_header_name,omitempty"` //The HTTP request header for identifying the real source IP. SipHeaderList []string `json:"sip_header_list,omitempty"` }
UpdateOpts contains all the values needed to update a Domain.
func (UpdateOpts) ToDomainUpdateMap ¶
func (opts UpdateOpts) ToDomainUpdateMap() (map[string]interface{}, error)
ToDomainUpdateMap builds a update request body from UpdateOpts.
type UpdateOptsBuilder ¶
UpdateOptsBuilder allows extensions to add additional parameters to the Update request.
type UpdateResult ¶
type UpdateResult struct {
// contains filtered or unexported fields
}
UpdateResult represents the result of a update operation. Call its Extract method to interpret it as a Domain.
func Update ¶
func Update(c *golangsdk.ServiceClient, domainID string, opts UpdateOptsBuilder) (r UpdateResult)
Update accepts a UpdateOpts struct and uses the values to update a Domain.The response code from api is 200