Help us shape the future of Go! Take the 2026 Go Developer Survey

credentials

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2020 License: Apache-2.0 Imports: 2 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateOpts

type CreateOpts struct {
	UserID      string `json:"user_id"`
	Description string `json:"description"`
}

func (CreateOpts) ToCredentialCreateMap

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

type CreateOptsBuilder

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

type CreateResult

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

CreateResult is the response of a Get operations. Call its Extract method to interpret it as a Credential.

func Create

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

func Update

func Update(client *golangsdk.ServiceClient, credentialID string, opts UpdateOptsBuilder) (r CreateResult)

func (CreateResult) Extract

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

Extract provides access to the individual Flavor returned by the Get and Create functions.

type Credential

type Credential struct {
	// IAM user ID
	UserID string `json:"user_id"`

	// Description of the access key
	Description string `json:"description"`

	// Time when the access key was created
	CreateTime string `json:"create_time"`

	// Time when the access key was last used
	LastUseTime string `json:"last_use_time,omitempty"`

	// AK
	AccessKey string `json:"access"`

	// SK, returned only during creation
	SecretKey string `json:"secret,omitempty"`

	// Status of the access key, active/inactive
	Status Status `json:"status"`
}

type DeleteResult

type DeleteResult struct {
	golangsdk.ErrResult
}

DeleteResult is the response from a Delete operation. Call its ExtractErr to determine if the request succeeded or failed.

func Delete

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

type GetResult

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

GetResult is the response of a Get operations. Call its Extract method to interpret it as a Credential.

func Get

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

func (GetResult) Extract

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

Extract provides access to the individual Flavor returned by the Get and Create functions.

type ListOpts

type ListOpts struct {
	UserID string `json:"user_id,omitempty"`
}

func (ListOpts) ToCredentialListQuery

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

type ListOptsBuilder

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

type ListResult

type ListResult struct {
	golangsdk.Result
}

func List

func List(client *golangsdk.ServiceClient, opts ListOptsBuilder) (l ListResult)

func (ListResult) Extract

func (lr ListResult) Extract() ([]Credential, error)

type Status

type Status string

type UpdateOpts

type UpdateOpts struct {
	Status      string `json:"status,omitempty"`
	Description string `json:"description,omitempty"`
}

func (UpdateOpts) ToCredentialUpdateMap

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

type UpdateOptsBuilder

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

type UpdateResult

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

UpdateResult is the response from an Update operation. Call its Extract method to interpret it as a Role.

func (UpdateResult) Extract

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

Extract provides access to the individual Flavor returned by the Get and Create functions.

Jump to

Keyboard shortcuts

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