domains

package
v0.5.20 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2022 License: Apache-2.0 Imports: 2 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateOpts

type CreateOpts struct {
	// Domain name
	HostName string `json:"hostname" required:"true"`
	// Certificate ID
	CertificateId string `json:"certificate_id,omitempty"`
	// The original server information
	Server []ServerOpts `json:"server" required:"true"`
	// Whether proxy is configured
	Proxy *bool `json:"proxy" required:"true"`
	// TLS version
	TLS string `json:"tls,omitempty"`
	// Cipher suite version
	Cipher string `json:"cipher,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"`
}

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

type CreateOptsBuilder interface {
	ToDomainCreateMap() (map[string]interface{}, error)
}

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.

func (CreateResult) Extract

func (r CreateResult) Extract() (*Domain, error)

Extract is a function that accepts a result and extracts a domain.

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"`
	// TLS version
	TLS string `json:"tls"`
	// Cipher suite
	Cipher string `json:"cipher"`
	// Certificate ID
	CertificateId string `json:"certificate_id"`
	// 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.

func Get

func Get(c *golangsdk.ServiceClient, id string) (r GetResult)

Get retrieves a particular Domain based on its unique ID.

func (GetResult) Extract

func (r GetResult) Extract() (*Domain, error)

Extract is a function that accepts a result and extracts 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 int `json:"port" required:"true"`
}

type UpdateOpts

type UpdateOpts struct {
	// Certificate ID
	CertificateId string `json:"certificate_id,omitempty"`
	// The original server information
	Server []ServerOpts `json:"server,omitempty"`
	// Whether proxy is configured
	Proxy *bool `json:"proxy,omitempty"`
	// TLS version
	TLS string `json:"tls,omitempty"`
	// Cipher suite version
	Cipher string `json:"cipher,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

type UpdateOptsBuilder interface {
	ToDomainUpdateMap() (map[string]interface{}, error)
}

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

func (UpdateResult) Extract

func (r UpdateResult) Extract() (*Domain, error)

Extract is a function that accepts a result and extracts a domain.

Jump to

Keyboard shortcuts

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