certificates

package
v0.0.0-...-63319d1 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2024 License: MPL-2.0, Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Certificate

type Certificate struct {
	Id           string `json:"id"`
	TenantId     string `json:"tenant_id"`
	AdminStateUp bool   `json:"admin_state_up"`
	Name         string `json:"name"`
	Description  string `json:"description"`
	Type         string `json:"type"`
	Domain       string `json:"domain"`
	PrivateKey   string `json:"private_key"`
	Certificate  string `json:"certificate"`
	ExpireTime   string `json:"expire_time"`
	CreateTime   string `json:"create_time"`
	UpdateTime   string `json:"update_time"`
}

Certificate the certificate detail returned by the query list.

type CertificateList

type CertificateList struct {
	// Lists the certificates. For details, see Table 4.
	Certificates []Certificate `json:"certificates"`
	// Specifies the number of certificates.
	InstanceNum int `json:"instance_num"`
}

CertificateList the struct returned by the query list.

type CreateOpts

type CreateOpts struct {
	// Specifies the certificate management status
	AdminStateUP bool `json:"admin_state_up,omitempty"`
	// Specifies the certificate name.
	// The value contains a maximum of 255 characters.
	Name string `json:"name,omitempty"`
	// Provides supplementary information about the certificate.
	// The value contains a maximum of 255 characters.
	Description string `json:"description,omitempty"`
	// Specifies the certificate type. The default value is server.
	// The value range varies depending on the protocol of the backend server group:
	// server: indicates the server certificate.
	// client: indicates the CA certificate.
	Type string `json:"type,omitempty"`
	// Specifies the domain name associated with the server certificate. The default value is null.
	Domain string `json:"domain,omitempty"`
	// Specifies the private key of the server certificate.
	PrivateKey string `json:"private_key,omitempty"`
	// Specifies the public key of the server certificate or CA certificate used to authenticate the client.
	Certificate string `json:"certificate" required:"true"`
	// Specifies the enterprise project id.
	EnterpriseProjectID string `json:"enterprise_project_id,omitempty"`
}

CreateOpts is the common options struct used in this package's Create operation.

func (CreateOpts) ToCertificateCreateMap

func (opts CreateOpts) ToCertificateCreateMap() (map[string]interface{}, error)

ToCertificateCreateMap casts a CreateOpts struct to a map.

type CreateOptsBuilder

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

CreateOptsBuilder is the interface options structs have to satisfy in order to be used in the main Create operation in this package. Since many extensions decorate or modify the common logic, it is useful for them to satisfy a basic interface in order for them to be used.

type CreateResult

type CreateResult struct {
	// contains filtered or unexported fields
}

func Create

func Create(c *golangsdk.ServiceClient, opts CreateOptsBuilder) (r CreateResult)

Create is an operation which provisions a new loadbalancer based on the configuration defined in the CreateOpts struct. Once the request is validated and progress has started on the provisioning process, a CreateResult will be returned.

Users with an admin role can create loadbalancers on behalf of other tenants by specifying a TenantID attribute different than their own.

func (CreateResult) Extract

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

type DeleteResult

type DeleteResult struct {
	golangsdk.ErrResult
}

DeleteResult represents the result of a delete operation.

func Delete

func Delete(c *golangsdk.ServiceClient, id string) (r DeleteResult)

Delete will permanently delete a particular Certificate based on its unique ID.

type GetResult

type GetResult struct {
	// contains filtered or unexported fields
}

GetResult represents the result of a get operation.

func Get

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

Get retrieves a particular Loadbalancer based on its unique ID.

func (GetResult) Extract

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

type ListOpts

type ListOpts struct {
	// Specifies the ID of the certificate from which pagination query starts, that is,
	// the ID of the last certificate on the previous page. This parameter must be used with limit.
	Marker string `q:"marker"`
	// Specifies the number of certificates on each page.
	// If this parameter is not set, all certificates are queried by default.
	Limit int `q:"limit"`
	// Specifies the page direction. The value can be true or false, and the default value is false.
	// This parameter must be used with limit.
	PageReverse *bool `q:"page_reverse"`
	// Specifies the certificate ID.
	Id string `q:"id"`
	// Specifies the certificate name.
	// The value contains a maximum of 255 characters.
	Name string `q:"name"`
	// Provides supplementary information about the certificate.
	// The value contains a maximum of 255 characters.
	Description string `q:"description"`
	// Specifies the certificate type. The default value is server.
	// The value range varies depending on the protocol of the backend server group:
	// server: indicates the server certificate.
	// client: indicates the CA certificate.
	Type string `q:"type"`
	// Specifies the domain name associated with the server certificate. The default value is null.
	Domain string `q:"domain"`
	// Specifies the private key of the server certificate.
	PrivateKey string `q:"private_key"`
	// Specifies the public key of the server certificate or CA certificate used to authenticate the client.
	Certificate string `q:"certificate"`
	// Specifies the time when the certificate was created.
	// The UTC time is in YYYY-MM-DD HH:MM:SS format.
	CreateTime string `q:"create_time"`
	// Specifies the time when the certificate was updated.
	// The UTC time is in YYYY-MM-DD HH:MM:SS format.
	UpdateTime string `q:"update_time"`
}

ListOpts parameters used to query the certificate.

func (ListOpts) ToCertificateListQuery

func (opts ListOpts) ToCertificateListQuery() (string, error)

ToCertificateListQuery formats a ListOpts into a query string.

type ListOptsBuilder

type ListOptsBuilder interface {
	ToCertificateListQuery() (string, error)
}

ListOptsBuilder allows extensions to add additional parameters to the List request.

type ListResult

type ListResult struct {
	golangsdk.Result
}

func List

func List(c *golangsdk.ServiceClient, opts ListOptsBuilder) (ListResult, error)

List query the certificate list

func (ListResult) Extract

func (r ListResult) Extract() (*CertificateList, error)

Extract extract the `Result.Body` to CertificateList

type UpdateOpts

type UpdateOpts struct {
	// Specifies the certificate management status
	AdminStateUP bool `json:"admin_state_up,omitempty"`
	// Specifies the certificate name.
	// The value contains a maximum of 255 characters.
	Name string `json:"name,omitempty"`
	// Provides supplementary information about the certificate.
	// The value contains a maximum of 255 characters.
	Description string `json:"description,omitempty"`
	// Specifies the domain name associated with the server certificate. The default value is null.
	Domain string `json:"domain,omitempty"`
	// Specifies the private key of the server certificate.
	PrivateKey string `json:"private_key,omitempty"`
	// Specifies the public key of the server certificate or CA certificate used to authenticate the client.
	Certificate string `json:"certificate,omitempty"`
}

UpdateOpts is the common options struct used in this package's Update operation.

func (UpdateOpts) ToCertificateUpdateMap

func (opts UpdateOpts) ToCertificateUpdateMap() (map[string]interface{}, error)

ToCertificateUpdateMap casts a UpdateOpts struct to a map.

type UpdateOptsBuilder

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

UpdateOptsBuilder is the interface options structs have to satisfy in order to be used in the main Update operation in this package. Since many extensions decorate or modify the common logic, it is useful for them to satisfy a basic interface in order for them to be used.

type UpdateResult

type UpdateResult struct {
	// contains filtered or unexported fields
}

func Update

func Update(c *golangsdk.ServiceClient, id string, opts UpdateOpts) (r UpdateResult)

Update is an operation which modifies the attributes of the specified Certificate.

func (UpdateResult) Extract

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

Jump to

Keyboard shortcuts

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