Documentation ¶
Overview ¶
Package cloud_accounts allows CRUD operations on the Cloud Account resource.
Index ¶
- Constants
- func ProviderValues() []string
- type API
- func (a *API) Create(ctx context.Context, account CreateCloudAccount) (int, error)
- func (a *API) Delete(ctx context.Context, id int) error
- func (a *API) Get(ctx context.Context, id int) (*CloudAccount, error)
- func (a API) List(ctx context.Context) ([]*CloudAccount, error)
- func (a *API) Update(ctx context.Context, id int, account UpdateCloudAccount) error
- type CloudAccount
- type CreateCloudAccount
- type HttpClient
- type Log
- type NotFound
- type TaskWaiter
- type UpdateCloudAccount
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 ¶
Create will create a new Cloud Account and return the identifier of the new 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 TaskWaiter ¶ added in v0.9.0
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
Click to show internal directories.
Click to hide internal directories.