environment

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2017 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EnvironmentFacade

type EnvironmentFacade interface {
	InstanceARNs(environment *types.Environment) ([]*string, error)
}

func NewEnvironmentFacade

func NewEnvironmentFacade(css facade.ClusterState) (EnvironmentFacade, error)

type EnvironmentService

type EnvironmentService interface {
	// CreateEnvironment stores a new environment in the database
	CreateEnvironment(ctx context.Context, name string, taskDefinition string, cluster string) (*environmenttypes.Environment, error)
	// GetEnvironment gets the environment with the provided name from the database
	GetEnvironment(ctx context.Context, name string) (*environmenttypes.Environment, error)
	// DeleteEnvironment deletes the environment with the provided name from the database
	DeleteEnvironment(ctx context.Context, name string) error
	// ListEnvironments returns a list with all the existing environments
	ListEnvironments(ctx context.Context) ([]environmenttypes.Environment, error)
	// FilterEnvironments returns a list of all environments that match the filters
	FilterEnvironments(ctx context.Context, filterKey string, filterVal string) ([]environmenttypes.Environment, error)

	// This is meant to be a 'private' method to be called by exported methods. Adding it to the interface for the purpose of testing.
	// TODO: Change these to unexported methods. Currently unable to do so because mocking unexported methods with gomock fails
	// (https://github.com/golang/mock/issues/52).
	// ValidateAndCreateEnvironment is a generator function for use by CreateEnvironment().
	// It validates that the environment does not already exist before creating the new environment.
	ValidateAndCreateEnvironment(newEnv *environmenttypes.Environment) storetypes.ValidateAndUpdateEnvironment
}

Environment defines methods to handle environments

func NewEnvironmentService

func NewEnvironmentService(environmentStore store.EnvironmentStore) (EnvironmentService, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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