Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Certificate ¶
type Certificate struct { // Certificate ID. ID string `json:"id"` // Certificate name. Name string `json:"name"` // Certificate file in PEM format. Content string `json:"content"` // Private key of the certificate in PEM format. Key string `json:"key"` // Timestamp when the certificate expire. ExpireAt int64 `json:"expire_time"` // Timestamp when the certificate is uploaded. CreatedAt int64 `json:"timestamp"` // Domain name associated with the certificate. // This parameter is returned to the response body only when the value of host in the URL request is true. BoundHosts []Hosts `json:"bind_host"` }
func Get ¶
func Get(client *golangsdk.ServiceClient, id string) (*Certificate, error)
type CertificateResponse ¶
type CertificateResponse struct { // Certificate ID. ID string `json:"id"` // Certificate name. Name string `json:"name"` // Timestamp when the certificate expires. ExpireAt int64 `json:"expire_time"` // Timestamp when the certificate is uploaded. CreatedAt int64 `json:"timestamp"` }
func Create ¶
func Create(client *golangsdk.ServiceClient, opts CreateOpts) (*CertificateResponse, error)
Create will create a new Waf Certificate on the values in CreateOpts.
type Certificates ¶
type Certificates struct { // Certificate ID. ID string `json:"id"` // Certificate name. Name string `json:"name"` // Timestamp when the certificate is uploaded. CreatedAt int64 `json:"timestamp"` }
func List ¶
func List(client *golangsdk.ServiceClient, opts ListOpts) ([]Certificates, error)
type CreateOpts ¶
type CreateOpts struct { // Certificate name. The value can contain a maximum of 64 characters. // Only digits, letters, hyphens (-), underscores (_), and periods (.) are allowed. Name string `json:"name" required:"true"` // Certificate file. Only certificates and private key files in PEM format are supported, // and the newline characters in the file must be replaced with \n. Content string `json:"content" required:"true"` // Certificate private key. // Only certificates and private key files in PEM format are supported, // and the newline characters in the files must be replaced with \n. Key string `json:"key" required:"true"` }
type Hosts ¶
type Hosts struct { // Domain name ID. // It is the unique identifier generated by WAF for a domain name when you add the domain name to WAF. ID string `json:"id"` // Domain name. Hostname string `json:"hostname"` // WAF mode of the domain name. The value is premium. WafType string `json:"waf_type"` }
type ListOpts ¶
type ListOpts struct { // Number of records on each page. // The maximum value is 100. Default value: 10 PageSize string `q:"pageSize,omitempty"` // Current page number Page string `q:"page,omitempty"` // Domain name Name string `q:"name,omitempty"` // Whether to obtain the domain name associated with the certificate. // The value can be true or false. // true: When a certificate is queried, the domain name associated with the certificate is also queried. // The returned certificate information contains the associated domain name. // false: When a certificate is queried, the domain name associated with the certificate is not queried. // The returned certificate information does not contain the associated domain name. // Default value: false // Default: false Host *bool `q:"host,omitempty"` // Certificate status. The value can be: // 0: The certificate is valid. // 1: The certificate has expired.2: The certificate will expire within one month. ExpirationStatus int `q:"exp_status,omitempty"` }
Click to show internal directories.
Click to hide internal directories.