cloud_accounts

package
v0.12.1 Latest Latest
Warning

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

Go to latest
Published: May 8, 2024 License: Apache-2.0 Imports: 4 Imported by: 1

Documentation

Overview

Package cloud_accounts allows CRUD operations on the Cloud Account resource.

Index

Constants

View Source
const (
	// StatusActive is the active value of the `Status` field in `CloudAccount`
	StatusActive = "active"
	// StatusDraft is the draft value of the `Status` field in `CloudAccount`
	StatusDraft = "draft"
	// StatusChangeDraft is the change draft value of the `Status` field in `CloudAccount`
	StatusChangeDraft = "change-draft"
	// StatusError is the error value of the `Status` field in `CloudAccount`
	StatusError = "error"
)

Variables

This section is empty.

Functions

func ProviderValues

func ProviderValues() []string

Types

type API

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

func NewAPI

func NewAPI(client HttpClient, taskWaiter TaskWaiter, logger Log) *API

func (*API) Create

func (a *API) Create(ctx context.Context, account CreateCloudAccount) (int, error)

Create will create a new Cloud Account and return the identifier of the new account.

func (*API) Delete

func (a *API) Delete(ctx context.Context, id int) error

Delete will delete an existing Cloud Account.

func (*API) Get

func (a *API) Get(ctx context.Context, id int) (*CloudAccount, error)

Get will retrieve an existing Cloud Account.

func (API) List

func (a API) List(ctx context.Context) ([]*CloudAccount, error)

func (*API) Update

func (a *API) Update(ctx context.Context, id int, account UpdateCloudAccount) error

Update will update certain values of an existing Cloud Account.

type CloudAccount

type CloudAccount struct {
	ID          *int    `json:"id"`
	Name        *string `json:"name,omitempty"`
	Provider    *string `json:"provider,omitempty"`
	Status      *string `json:"status,omitempty"`
	AccessKeyID *string `json:"accessKeyId,omitempty"`
}

func (CloudAccount) String

func (o CloudAccount) String() string

type CreateCloudAccount

type CreateCloudAccount struct {
	AccessKeyID     *string `json:"accessKeyId,omitempty"`
	AccessSecretKey *string `json:"accessSecretKey,omitempty"`
	ConsoleUsername *string `json:"consoleUsername,omitempty"`
	ConsolePassword *string `json:"consolePassword,omitempty"`
	Name            *string `json:"name,omitempty"`
	Provider        *string `json:"provider,omitempty"`
	SignInLoginURL  *string `json:"signInLoginUrl,omitempty"`
}

func (CreateCloudAccount) String

func (o CreateCloudAccount) String() string

type HttpClient

type HttpClient interface {
	Get(ctx context.Context, name, path string, responseBody interface{}) error
	Post(ctx context.Context, name, path string, requestBody interface{}, responseBody interface{}) error
	Put(ctx context.Context, name, path string, requestBody interface{}, responseBody interface{}) error
	Delete(ctx context.Context, name, path string, responseBody interface{}) error
}

type Log

type Log interface {
	Printf(format string, args ...interface{})
}

type NotFound

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

func (*NotFound) Error

func (f *NotFound) Error() string

type TaskWaiter added in v0.9.0

type TaskWaiter interface {
	WaitForResourceId(ctx context.Context, id string) (int, error)
	Wait(ctx context.Context, id string) error
}

type UpdateCloudAccount

type UpdateCloudAccount struct {
	AccessKeyID     *string `json:"accessKeyId,omitempty"`
	AccessSecretKey *string `json:"accessSecretKey,omitempty"`
	ConsoleUsername *string `json:"consoleUsername,omitempty"`
	ConsolePassword *string `json:"consolePassword,omitempty"`
	Name            *string `json:"name,omitempty"`
	SignInLoginURL  *string `json:"signInLoginUrl,omitempty"`
}

func (UpdateCloudAccount) String

func (o UpdateCloudAccount) String() string

Jump to

Keyboard shortcuts

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