Documentation ¶
Index ¶
- func Delete(client *golangsdk.ServiceClient, opts DeleteOpts) (err error)
- func UnbindCertificate(client *golangsdk.ServiceClient, opts CertificateOpts) (err error)
- type Certificate
- type CertificateOpts
- type CreateCertOpts
- type CreateOpts
- type DeleteOpts
- type DomainCertResp
- type DomainResp
- type UpdateOpts
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Delete ¶
func Delete(client *golangsdk.ServiceClient, opts DeleteOpts) (err error)
func UnbindCertificate ¶
func UnbindCertificate(client *golangsdk.ServiceClient, opts CertificateOpts) (err error)
Types ¶
type Certificate ¶
type Certificate struct { // Certificate ID. ID string `json:"id"` // Certificate name. Name string `json:"name"` // Certificate type. Options: // global: Global certificate. // instance: Gateway certificate. Type string `json:"type"` // Gateway ID. // If type is set to global, the default value is common. // If type is set to instance, a gateway ID is displayed. GatewayId string `json:"instance_id"` // Project ID. ProjectId string `json:"project_id"` // Creation time. CreatedAt string `json:"create_time"` // Update time. UpdatedAt string `json:"update_time"` // Certificate domain name. CommonName string `json:"common_name"` // Subject alternative names. San []string `json:"san"` // Certificate version. Version int `json:"version"` // Company or organization. Organization []string `json:"organization"` // Department. OrganizationalUnit []string `json:"organizational_unit"` // City. City []string `json:"locality"` // State or province. State []string `json:"state"` // Country or region. Country []string `json:"country"` // Start time of the certificate validity period. NotBefore string `json:"not_before"` // End time of the certificate validity period. NotAfter string `json:"not_after"` // Serial No. SerialNumber string `json:"serial_number"` // Certificate issuer. Issuer []string `json:"issuer"` // Signature algorithm. SignatureAlgorithm string `json:"signature_algorithm"` }
func GetCertificate ¶
func GetCertificate(client *golangsdk.ServiceClient, opts CertificateOpts) (*Certificate, error)
type CertificateOpts ¶
type CreateCertOpts ¶
type CreateCertOpts struct { GatewayID string `json:"-"` GroupID string `json:"-"` DomainID string `json:"-"` // Certificate content. Content string `json:"cert_content" required:"true"` // Certificate name. It can contain 4 to 50 characters, starting with a letter. // Only letters, digits, and underscores (_) are allowed. Name string `json:"name" required:"true"` // Private key. PrivateKey string `json:"private_key" required:"true"` }
type CreateOpts ¶
type CreateOpts struct { GatewayID string `json:"-"` GroupID string `json:"-"` // Minimum SSL version. TLS 1.1 and TLS 1.2 are supported. MinSslVersion string `json:"min_ssl_version,omitempty"` // Whether to enable HTTP redirection to HTTPS. // The value false means disable and true means enable. The default value is false. IsHttpRedirectToHttps *bool `json:"is_http_redirect_to_https,omitempty"` // Custom domain name. // It can contain a maximum of 255 characters and must comply with domain name specifications. UrlDomain string `json:"url_domain" required:"true"` }
type DeleteOpts ¶
type DomainCertResp ¶
type DomainCertResp struct { // Custom domain name. UrlDomain string `json:"url_domain"` // Domain ID. DomainId string `json:"id"` // CNAME resolution status. // 1: not resolved // 2: resolving // 3: resolved // 4: resolution failed Status int `json:"status"` // Minimum SSL version supported. MinSslVersion string `json:"min_ssl_version"` // Whether to enable HTTP redirection to HTTPS. // The value false means disable and true means enable. The default value is false. IsHttpRedirectToHttps bool `json:"is_http_redirect_to_https"` // Whether to enable client certificate verification. // This parameter is available only when a certificate is bound. // It is enabled by default if trusted_root_ca exists, and disabled if trusted_root_ca does not exist. VerifiedClientCertificateEnabled bool `json:"verified_client_certificate_enabled"` // Certificate name. Name string `json:"ssl_name"` // Certificate ID. ID string `json:"ssl_id"` }
func AssignCertificate ¶
func AssignCertificate(client *golangsdk.ServiceClient, opts CreateCertOpts) (*DomainCertResp, error)
type DomainResp ¶
type DomainResp struct { // Custom domain name. UrlDomain string `json:"url_domain"` // Domain ID. ID string `json:"id"` // CNAME resolution status. // 1: not resolved // 2: resolving // 3: resolved // 4: resolution failed Status int `json:"status"` // Minimum SSL version supported. MinSslVersion string `json:"min_ssl_version"` // Whether to enable HTTP redirection to HTTPS. // The value false means disable and true means enable. The default value is false. IsHttpRedirectToHttps bool `json:"is_http_redirect_to_https"` // Whether to enable client certificate verification. // This parameter is available only when a certificate is bound. // It is enabled by default if trusted_root_ca exists, and disabled if trusted_root_ca does not exist. VerifiedClientCertificateEnabled bool `json:"verified_client_certificate_enabled"` }
func Create ¶
func Create(client *golangsdk.ServiceClient, opts CreateOpts) (*DomainResp, error)
func Update ¶
func Update(client *golangsdk.ServiceClient, opts UpdateOpts) (*DomainResp, error)
type UpdateOpts ¶
type UpdateOpts struct { GatewayID string `json:"-"` GroupID string `json:"-"` DomainID string `json:"-"` // Minimum SSL version. TLS 1.1 and TLS 1.2 are supported. MinSslVersion string `json:"min_ssl_version" required:"true"` // Whether to enable HTTP redirection to HTTPS. // The value false means disable and true means enable. The default value is false. IsHttpRedirectToHttps *bool `json:"is_http_redirect_to_https,omitempty"` // Whether to enable client certificate verification. // This parameter is available only when a certificate is bound. // It is enabled by default if trusted_root_ca exists, and disabled if trusted_root_ca does not exist. VerifiedClientCertificateEnabled *bool `json:"verified_client_certificate_enabled,omitempty"` }
Click to show internal directories.
Click to hide internal directories.