account

package
v1.0.0-beta.26 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: Apache-2.0 Imports: 13 Imported by: 3

Documentation

Overview

Package account provides methods and message types of the account v2alpha1 API.

Index

Constants

View Source
const (
	ListSSHKeysRequestOrderByCreatedAtAsc  = ListSSHKeysRequestOrderBy("created_at_asc")
	ListSSHKeysRequestOrderByCreatedAtDesc = ListSSHKeysRequestOrderBy("created_at_desc")
	ListSSHKeysRequestOrderByUpdatedAtAsc  = ListSSHKeysRequestOrderBy("updated_at_asc")
	ListSSHKeysRequestOrderByUpdatedAtDesc = ListSSHKeysRequestOrderBy("updated_at_desc")
	ListSSHKeysRequestOrderByNameAsc       = ListSSHKeysRequestOrderBy("name_asc")
	ListSSHKeysRequestOrderByNameDesc      = ListSSHKeysRequestOrderBy("name_desc")
)

Variables

This section is empty.

Functions

This section is empty.

Types

type API

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

API: account API.

func NewAPI

func NewAPI(client *scw.Client) *API

NewAPI returns a API object from a Scaleway client.

func (*API) CreateSSHKey

func (s *API) CreateSSHKey(req *CreateSSHKeyRequest, opts ...scw.RequestOption) (*SSHKey, error)

CreateSSHKey: add an SSH key to your project.

func (*API) DeleteSSHKey

func (s *API) DeleteSSHKey(req *DeleteSSHKeyRequest, opts ...scw.RequestOption) error

DeleteSSHKey: remove an SSH key from your project.

func (*API) GetSSHKey

func (s *API) GetSSHKey(req *GetSSHKeyRequest, opts ...scw.RequestOption) (*SSHKey, error)

GetSSHKey: get an SSH key from your project.

func (*API) ListSSHKeys

func (s *API) ListSSHKeys(req *ListSSHKeysRequest, opts ...scw.RequestOption) (*ListSSHKeysResponse, error)

ListSSHKeys: list all SSH keys of your project.

func (*API) UpdateSSHKey

func (s *API) UpdateSSHKey(req *UpdateSSHKeyRequest, opts ...scw.RequestOption) (*SSHKey, error)

UpdateSSHKey: update an SSH key on your project.

type CreateSSHKeyRequest

type CreateSSHKeyRequest struct {
	// Name: the name of the SSH key.
	Name string `json:"name"`
	// PublicKey: SSH public key. Currently ssh-rsa, ssh-dss (DSA), ssh-ed25519 and ecdsa keys with NIST curves are supported.
	PublicKey string `json:"public_key"`
	// Deprecated: OrganizationID: use project_id field instead.
	// Precisely one of OrganizationID, ProjectID must be set.
	OrganizationID *string `json:"organization_id,omitempty"`
	// ProjectID: project owning the resource.
	// Precisely one of OrganizationID, ProjectID must be set.
	ProjectID *string `json:"project_id,omitempty"`
}

type DeleteSSHKeyRequest

type DeleteSSHKeyRequest struct {
	SSHKeyID string `json:"-"`
}

type GetSSHKeyRequest

type GetSSHKeyRequest struct {
	// SSHKeyID: the ID of the SSH key.
	SSHKeyID string `json:"-"`
}

type ListSSHKeysRequest

type ListSSHKeysRequest struct {
	// OrderBy: default value: created_at_asc
	OrderBy ListSSHKeysRequestOrderBy `json:"-"`

	Page *int32 `json:"-"`

	PageSize *uint32 `json:"-"`

	Name *string `json:"-"`

	OrganizationID *string `json:"-"`

	ProjectID *string `json:"-"`
}

type ListSSHKeysRequestOrderBy

type ListSSHKeysRequestOrderBy string

func (ListSSHKeysRequestOrderBy) MarshalJSON

func (enum ListSSHKeysRequestOrderBy) MarshalJSON() ([]byte, error)

func (ListSSHKeysRequestOrderBy) String

func (enum ListSSHKeysRequestOrderBy) String() string

func (*ListSSHKeysRequestOrderBy) UnmarshalJSON

func (enum *ListSSHKeysRequestOrderBy) UnmarshalJSON(data []byte) error

type ListSSHKeysResponse

type ListSSHKeysResponse struct {
	SSHKeys []*SSHKey `json:"ssh_keys"`

	TotalCount uint32 `json:"total_count"`
}

ListSSHKeysResponse: list ssh keys response.

func (*ListSSHKeysResponse) UnsafeAppend

func (r *ListSSHKeysResponse) UnsafeAppend(res interface{}) (uint32, error)

UnsafeAppend should not be used Internal usage only

func (*ListSSHKeysResponse) UnsafeGetTotalCount

func (r *ListSSHKeysResponse) UnsafeGetTotalCount() uint32

UnsafeGetTotalCount should not be used Internal usage only

type SSHKey

type SSHKey struct {
	ID string `json:"id"`

	Name string `json:"name"`

	PublicKey string `json:"public_key"`

	Fingerprint string `json:"fingerprint"`

	CreatedAt *time.Time `json:"created_at"`

	UpdatedAt *time.Time `json:"updated_at"`

	CreationInfo *SSHKeyCreationInfo `json:"creation_info"`

	OrganizationID string `json:"organization_id"`

	ProjectID string `json:"project_id"`
}

SSHKey: ssh key.

type SSHKeyCreationInfo

type SSHKeyCreationInfo struct {
	Address string `json:"address"`

	UserAgent string `json:"user_agent"`

	CountryCode string `json:"country_code"`
}

type UpdateSSHKeyRequest

type UpdateSSHKeyRequest struct {
	SSHKeyID string `json:"-"`
	// Name: name of the SSH key.
	Name *string `json:"name"`
}

Jump to

Keyboard shortcuts

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