certificates

package
v0.0.0-...-d823fe1 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2021 License: Apache-2.0 Imports: 2 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

Types

type Certificate

type Certificate struct {
	ID          string `json:"id"`
	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"`
	CreateTime  string `json:"create_time"`
	UpdateTime  string `json:"update_time"`
}

func ExtractCertificates

func ExtractCertificates(r pagination.Page) ([]Certificate, error)

ExtractCertificates accepts a Page struct, specifically a CertificatePage struct, and extracts the elements into a slice of Certificate structs. In other words, a generic collection is mapped into a relevant slice.

type CertificatePage

type CertificatePage struct {
	pagination.SinglePageBase
}

CertificatePage is the page returned by a pager when traversing over a collection of certificates.

type CreateOpts

type CreateOpts struct {
	Name        string `json:"name,omitempty"`
	Description string `json:"description,omitempty"`
	Type        string `json:"type,omitempty"`
	Domain      string `json:"domain,omitempty"`
	PrivateKey  string `json:"private_key,omitempty"`
	Certificate string `json:"certificate" required:"true"`
}

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

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 {
	ID          string `q:"id"`
	Name        string `q:"name"`
	Description string `q:"description"`
	Type        string `q:"type"`
	Domain      string `q:"domain"`
	PrivateKey  string `q:"private_key"`
	Certificate string `q:"certificate"`
	Limit       int    `q:"limit"`
	Marker      string `q:"marker"`
}

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 UpdateOpts

type UpdateOpts struct {
	Name        string `json:"name,omitempty"`
	Description string `json:"description,omitempty"`
	Domain      string `json:"domain,omitempty"`
	PrivateKey  string `json:"private_key,omitempty"`
	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