instanceconfig

package
v1.0.0-beta3 Latest Latest
Warning

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

Go to latest
Published: May 11, 2020 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create(params CreateParams) (*models.IDResponse, error)

Create creates a new instance configuration.

func Delete

func Delete(params DeleteParams) error

Delete deletes an already existing instance configuration.

func Get

Get obtains an instance configuration from an ID

func List

func List(params ListParams) ([]*models.InstanceConfiguration, error)

List returns an array of all instance configurations

func NewConfig

func NewConfig(source io.Reader) (*models.InstanceConfiguration, error)

NewConfig creates a new InstanceConfiguration from an io.Reader containing a JSON payload.

func PullToFolder

func PullToFolder(params PullToFolderParams) error

PullToFolder downloads instance configs and save them in a local folder

func Update

func Update(params UpdateParams) error

Update overwrites an already existing instance configuration.

Types

type CreateParams

type CreateParams struct {
	*api.API
	Config *models.InstanceConfiguration
}

CreateParams is used to create a new instance configuration.

func (CreateParams) Validate

func (params CreateParams) Validate() error

Validate ensures that the parameters are correct.

type DeleteParams

type DeleteParams struct {
	*api.API
	ID string
}

DeleteParams is used to delete an instance configuration from its ID.

func (DeleteParams) Validate

func (params DeleteParams) Validate() error

Validate ensures that the parameters are correct.

type GetParams

type GetParams struct {
	*api.API
	ID string
}

GetParams is used to obtain an instance configuration from an ID.

func (GetParams) Validate

func (params GetParams) Validate() error

Validate ensures that the parameters are correct.

type InstanceConfigurationOperation

type InstanceConfigurationOperation uint

InstanceConfigurationOperation define an operation needed for the iC.

const (
	// InstanceConfigurationOperationNone No operation needed on IC
	InstanceConfigurationOperationNone InstanceConfigurationOperation = 0
	// InstanceConfigurationOperationUpdate update IC
	InstanceConfigurationOperationUpdate InstanceConfigurationOperation = 1
	// InstanceConfigurationOperationCreate create IC
	InstanceConfigurationOperationCreate InstanceConfigurationOperation = 2
)

func (InstanceConfigurationOperation) String

func (InstanceConfigurationOperation) Valid

Valid check validity of instance configuration action

type ListParams

type ListParams struct {
	*api.API
}

ListParams is used to list all of the available instance configurations.

func (ListParams) Validate

func (params ListParams) Validate() error

Validate ensures that the parameters are correct.

type PullToFolderParams

type PullToFolderParams struct {
	*api.API
	Folder string
}

PullToFolderParams is used to store all available instance configurations in a local folder.

func (PullToFolderParams) Validate

func (params PullToFolderParams) Validate() error

Validate ensures that the parameters are correct.

type UpdateParams

type UpdateParams struct {
	*api.API
	ID     string
	Config *models.InstanceConfiguration
}

UpdateParams is used to overwrite an existing instance configuration.

func (UpdateParams) Validate

func (params UpdateParams) Validate() error

Validate ensures that the parameters are correct.

Jump to

Keyboard shortcuts

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