Documentation ¶
Overview ¶
The environmentmanager package defines an API end point for functions dealing with envionments. Creating, listing and sharing environments.
Index ¶
- type ConfigSource
- type EnvironmentManager
- type EnvironmentManagerAPI
- func (em *EnvironmentManagerAPI) ConfigSkeleton(args params.EnvironmentSkeletonConfigArgs) (params.EnvironConfigResult, error)
- func (em *EnvironmentManagerAPI) CreateEnvironment(args params.EnvironmentCreateArgs) (params.Environment, error)
- func (em *EnvironmentManagerAPI) ListEnvironments(user params.Entity) (params.EnvironmentList, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfigSource ¶
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 ¶
func (em *EnvironmentManagerAPI) ConfigSkeleton(args params.EnvironmentSkeletonConfigArgs) (params.EnvironConfigResult, error)
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 ¶
func (em *EnvironmentManagerAPI) CreateEnvironment(args params.EnvironmentCreateArgs) (params.Environment, error)
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.