environmentmanager

package
v0.0.0-...-f19ae85 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2015 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Overview

The environmentmanager package defines an API end point for functions dealing with envionments. Creating, listing and sharing environments.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigSource

type ConfigSource interface {
	Config() (*config.Config, error)
}

ConfigSource describes a type that is able to provide config. Abstracted primarily for testing.

type EnvironmentManager

type EnvironmentManager interface {
	ConfigSkeleton(args params.EnvironmentSkeletonConfigArgs) (params.EnvironConfigResult, error)
	CreateEnvironment(args params.EnvironmentCreateArgs) (params.Environment, error)
	ListEnvironments(user params.Entity) (params.EnvironmentList, error)
}

EnvironmentManager defines the methods on the environmentmanager API end point.

type EnvironmentManagerAPI

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

EnvironmentManagerAPI implements the environment manager interface and is the concrete implementation of the api end point.

func NewEnvironmentManagerAPI

func NewEnvironmentManagerAPI(
	st *state.State,
	resources *common.Resources,
	authorizer common.Authorizer,
) (*EnvironmentManagerAPI, error)

NewEnvironmentManagerAPI creates a new api server endpoint for managing environments.

func (*EnvironmentManagerAPI) ConfigSkeleton

ConfigSkeleton returns config values to be used as a starting point for the API caller to construct a valid environment specific config. The provider and region params are there for future use, and current behaviour expects both of these to be empty.

func (*EnvironmentManagerAPI) CreateEnvironment

CreateEnvironment creates a new environment using the account and environment config specified in the args.

func (*EnvironmentManagerAPI) ListEnvironments

func (em *EnvironmentManagerAPI) ListEnvironments(user params.Entity) (params.EnvironmentList, error)

ListEnvironments returns the environments that the specified user has access to in the current server. Only that state server owner can list environments for any user (at this stage). Other users can only ask about their own environments.

Jump to

Keyboard shortcuts

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