client

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CloudClient

type CloudClient interface {
	ListEnvironments(orgId string) ([]cloudapiclient.EnvironmentOutput, int, error)
	CreateEnvironment(orgId string, params cloudapiclient.EnvironmentInput) (*cloudapiclient.EnvironmentOutput, int, error)
	DestroyEnvironment(orgId string, envId string) (int, error)

	ListOrgs() ([]cloudapiclient.OrganizationOutput, int, error)
	CreateOrg(orgId string, params cloudapiclient.OrganizationInput) (*cloudapiclient.OrganizationOutput, int, error)
	FindOrg(orgId string) (*cloudapiclient.OrganizationOutput, int, error)

	CreateAsset(orgId string, envId string, params cloudapiclient.AssetInput) (*cloudapiclient.AssetOutput, int, error)
	ListAssets(orgId string, envId string) ([]cloudapiclient.AssetOutput, int, error)
	DescribeAsset(orgId string, envId string, assetId string) (*cloudapiclient.AssetOutput, int, error)
	//ListAssetTypesForEnvironment(envId string) error
	// UpdateAsset(orgId string, envId string, assetID string, assetInput *client.AssetInput) error
	DestroyAsset(orgId string, envId string, assetID string) (int, error)

	ListOperationsByAsset(orgId string, assetId string) ([]cloudapiclient.OperationOutput, int, error)
}

CloudClient The goal of this interface is to be an abstraction layer above the cloud-api. Whenever we want to interface with the API, we should use this interface.

func NewClient

func NewClient(debug bool, host string, token string) CloudClient

NewClient - generate a new cloud api cloud_api_client

Jump to

Keyboard shortcuts

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