keypairs

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: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteURL

func DeleteURL(c *golangsdk.ServiceClient, KeyPairName string) string

func GetURL

func GetURL(c *golangsdk.ServiceClient, KeyPairName string) string

Types

type CreateOpts

type CreateOpts struct {
	// Name is a friendly name to refer to this KeyPair in other services.
	Name string `json:"name" required:"true"`

	// PublicKey [optional] is a pregenerated OpenSSH-formatted public key.
	// If provided, this key will be imported and no new key will be created.
	PublicKey string `json:"public_key,omitempty"`
}

func (CreateOpts) ToKeyPairCreateMap

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

ToSecurityGroupsCreateMap converts CreateOpts structures to map[string]interface{}

type CreateOptsBuilder

type CreateOptsBuilder interface {
	ToKeyPairCreateMap() (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
}

func Create

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

Create create key pair

func (CreateResult) Extract

func (r CreateResult) Extract() (*common.KeyPair, error)

type DeleteResult

type DeleteResult struct {
	golangsdk.ErrResult
}

func Delete

func Delete(client *golangsdk.ServiceClient, keyPairID string) (r DeleteResult)

Delete delete the key pair

type GetResult

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

func Get

func Get(client *golangsdk.ServiceClient, keyPairID string) (r GetResult)

Get get key pair detail

func (GetResult) Extract

func (r GetResult) Extract() (*common.KeyPair, error)

type ListKeyPairsOptsBuilder

type ListKeyPairsOptsBuilder interface {
	ToListKeyPairsQuery() (string, error)
}

type ListOpts

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

func (ListOpts) ToListKeyPairsQuery

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

type ListResult

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

func List

func (ListResult) Extract

func (r ListResult) Extract() (*[]common.KeyPair, error)

Jump to

Keyboard shortcuts

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