certificates

package
v0.9.3 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 6 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func List added in v0.5.0

func List(c *golangsdk.ServiceClient, opts ListOptsBuilder) (p pagination.Pager)

Types

type Certificate

type Certificate struct {
	// Id of the certificate
	Id string `json:"id"`
	// Name of the certificate
	Name string `json:"name"`
	// ExpireTime - unix timestamp of certificate expiry
	ExpireTime int64 `json:"expireTime"`

	Timestamp int64 `json:"timestamp"`
}

func ExtractCertificates added in v0.5.0

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

type CertificatePage added in v0.5.0

type CertificatePage struct {
	pagination.OffsetPageBase
}

func (CertificatePage) IsEmpty added in v0.5.0

func (p CertificatePage) IsEmpty() (bool, error)

IsEmpty returns true if this Page has no items in it.

func (CertificatePage) NextPageURL added in v0.5.0

func (p CertificatePage) NextPageURL() (string, error)

type CreateOpts

type CreateOpts struct {
	// Certificate name
	Name string `json:"name" required:"true"`
	// Certificate content
	Content string `json:"content" required:"true"`
	// Private Key
	Key string `json:"key" required:"true"`
}

CreateOpts contains all the values needed to create a new certificate.

func (CreateOpts) ToCertCreateMap

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

ToCertCreateMap builds a create request body from CreateOpts.

type CreateOptsBuilder

type CreateOptsBuilder interface {
	ToCertCreateMap() (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 Certificate.

func Create

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

Create will create a new certificate based on the values in CreateOpts.

func (CreateResult) Extract

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

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

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 certificate based on its unique ID.

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 Certificate.

func Get

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

Get retrieves a particular certificate based on its unique ID.

func (GetResult) Extract

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

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

type ListOpts added in v0.5.0

type ListOpts struct {
	Offset int `q:"offset"`
	Limit  int `q:"limit"`
}

func (ListOpts) ToCertificateListQuery added in v0.5.0

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

type ListOptsBuilder added in v0.5.0

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

type UpdateOpts

type UpdateOpts struct {
	// Certificate name
	Name string `json:"name,omitempty"`
}

UpdateOpts contains all the values needed to update a certificate.

func (UpdateOpts) ToCertUpdateMap

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

ToCertUpdateMap builds a update request body from UpdateOpts.

type UpdateOptsBuilder

type UpdateOptsBuilder interface {
	ToCertUpdateMap() (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 Certificate.

func Update

func Update(c *golangsdk.ServiceClient, certID string, opts UpdateOptsBuilder) (r UpdateResult)

Update accepts a UpdateOpts struct and uses the values to update a certificate.The response code from api is 200

func (UpdateResult) Extract

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

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

Jump to

Keyboard shortcuts

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