mocks

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 MockDataStore

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

Mock of DataStore interface

func NewMockDataStore

func NewMockDataStore(ctrl *gomock.Controller) *MockDataStore

func (*MockDataStore) Delete

func (_m *MockDataStore) Delete(ctx context.Context, key string) error

func (*MockDataStore) EXPECT

func (_m *MockDataStore) EXPECT() *_MockDataStoreRecorder

func (*MockDataStore) Get

func (_m *MockDataStore) Get(ctx context.Context, key string) (map[string]string, error)

func (*MockDataStore) GetWithPrefix

func (_m *MockDataStore) GetWithPrefix(ctx context.Context, keyPrefix string) (map[string]string, error)

func (*MockDataStore) Put

func (_m *MockDataStore) Put(ctx context.Context, key string, value string) error

type MockDeploymentService added in v0.3.0

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

Mock of DeploymentService interface

func NewMockDeploymentService added in v0.3.0

func NewMockDeploymentService(ctrl *gomock.Controller) *MockDeploymentService

func (*MockDeploymentService) CreateDeployment added in v0.3.0

func (_m *MockDeploymentService) CreateDeployment(ctx context.Context, environmentName string, token string) (*types0.Deployment, error)

func (*MockDeploymentService) CreateSubDeployment added in v0.3.0

func (_m *MockDeploymentService) CreateSubDeployment(ctx context.Context, environmentName string, instanceARNs []*string) (*types0.Deployment, error)

func (*MockDeploymentService) EXPECT added in v0.3.0

func (_m *MockDeploymentService) EXPECT() *_MockDeploymentServiceRecorder

func (*MockDeploymentService) GetCurrentDeployment added in v0.3.0

func (_m *MockDeploymentService) GetCurrentDeployment(ctx context.Context, environmentName string) (*types0.Deployment, error)

func (*MockDeploymentService) GetDeployment added in v0.3.0

func (_m *MockDeploymentService) GetDeployment(ctx context.Context, environmentName string, id string) (*types0.Deployment, error)

func (*MockDeploymentService) GetInProgressDeployment added in v0.3.0

func (_m *MockDeploymentService) GetInProgressDeployment(ctx context.Context, environmentName string) (*types0.Deployment, error)

func (*MockDeploymentService) GetPendingDeployment added in v0.3.0

func (_m *MockDeploymentService) GetPendingDeployment(ctx context.Context, environmentName string) (*types0.Deployment, error)

func (*MockDeploymentService) ListDeploymentsSortedReverseChronologically added in v0.3.0

func (_m *MockDeploymentService) ListDeploymentsSortedReverseChronologically(ctx context.Context, environmentName string) ([]types0.Deployment, error)

func (*MockDeploymentService) StartDeployment added in v0.3.0

func (_m *MockDeploymentService) StartDeployment(ctx context.Context, environmentName string, instanceARNs []*string) (*types0.Deployment, error)

func (*MockDeploymentService) UpdateInProgressDeployment added in v0.3.0

func (_m *MockDeploymentService) UpdateInProgressDeployment(ctx context.Context, environmentName string, deployment *types0.Deployment) error

func (*MockDeploymentService) ValidateAndCreateDeployment added in v0.3.0

func (_m *MockDeploymentService) ValidateAndCreateDeployment(token string) (types.ValidateAndUpdateEnvironment, *types0.Deployment)

func (*MockDeploymentService) ValidateAndCreateSubDeployment added in v0.3.0

func (_m *MockDeploymentService) ValidateAndCreateSubDeployment(instanceARNs []*string) (types.ValidateAndUpdateEnvironment, *types0.Deployment)

func (*MockDeploymentService) ValidateAndStartDeployment added in v0.3.0

func (_m *MockDeploymentService) ValidateAndStartDeployment(instanceARNs []*string) (types.ValidateAndUpdateEnvironment, *types0.Deployment)

func (*MockDeploymentService) ValidateAndUpdateInProgressDeployment added in v0.3.0

func (_m *MockDeploymentService) ValidateAndUpdateInProgressDeployment(deployment *types0.Deployment) types.ValidateAndUpdateEnvironment

type MockDeploymentWorker added in v0.2.0

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

Mock of DeploymentWorker interface

func NewMockDeploymentWorker added in v0.2.0

func NewMockDeploymentWorker(ctrl *gomock.Controller) *MockDeploymentWorker

func (*MockDeploymentWorker) EXPECT added in v0.2.0

func (_m *MockDeploymentWorker) EXPECT() *_MockDeploymentWorkerRecorder

func (*MockDeploymentWorker) StartPendingDeployment added in v0.2.0

func (_m *MockDeploymentWorker) StartPendingDeployment(ctx context.Context, environmentName string) (*types.Deployment, error)

func (*MockDeploymentWorker) UpdateInProgressDeployment added in v0.2.0

func (_m *MockDeploymentWorker) UpdateInProgressDeployment(ctx context.Context, environmentName string) (*types.Deployment, error)

type MockECS

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

Mock of ECS interface

func NewMockECS

func NewMockECS(ctrl *gomock.Controller) *MockECS

func (*MockECS) DescribeCluster

func (_m *MockECS) DescribeCluster(cluster *string) (*ecs.Cluster, error)

func (*MockECS) DescribeTaskDefinition

func (_m *MockECS) DescribeTaskDefinition(taskDefinition *string) (*ecs.TaskDefinition, error)

func (*MockECS) DescribeTasks

func (_m *MockECS) DescribeTasks(cluster string, tasks []*string) (*ecs.DescribeTasksOutput, error)

func (*MockECS) EXPECT

func (_m *MockECS) EXPECT() *_MockECSRecorder

func (*MockECS) ListClusters

func (_m *MockECS) ListClusters() ([]*string, error)

func (*MockECS) ListTasks

func (_m *MockECS) ListTasks(cluster string, startedBy string) ([]*string, error)

func (*MockECS) ListTasksByInstance

func (_m *MockECS) ListTasksByInstance(cluster string, instanceARN string) ([]*string, error)

func (*MockECS) StartTask

func (_m *MockECS) StartTask(clusterArn string, containerInstances []*string, startedBy string, taskDefinition string) (*ecs.StartTaskOutput, error)

func (*MockECS) StopTask

func (_m *MockECS) StopTask(clusterArn string, taskArn string) error

type MockEnvironmentFacade added in v0.3.0

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

Mock of EnvironmentFacade interface

func NewMockEnvironmentFacade added in v0.3.0

func NewMockEnvironmentFacade(ctrl *gomock.Controller) *MockEnvironmentFacade

func (*MockEnvironmentFacade) EXPECT added in v0.3.0

func (_m *MockEnvironmentFacade) EXPECT() *_MockEnvironmentFacadeRecorder

func (*MockEnvironmentFacade) InstanceARNs added in v0.3.0

func (_m *MockEnvironmentFacade) InstanceARNs(environment *types.Environment) ([]*string, error)

type MockEnvironmentService added in v0.3.0

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

Mock of EnvironmentService interface

func NewMockEnvironmentService added in v0.3.0

func NewMockEnvironmentService(ctrl *gomock.Controller) *MockEnvironmentService

func (*MockEnvironmentService) CreateEnvironment added in v0.3.0

func (_m *MockEnvironmentService) CreateEnvironment(ctx context.Context, name string, taskDefinition string, cluster string) (*types.Environment, error)

func (*MockEnvironmentService) DeleteEnvironment added in v0.3.0

func (_m *MockEnvironmentService) DeleteEnvironment(ctx context.Context, name string) error

func (*MockEnvironmentService) EXPECT added in v0.3.0

func (_m *MockEnvironmentService) EXPECT() *_MockEnvironmentServiceRecorder

func (*MockEnvironmentService) FilterEnvironments added in v0.3.0

func (_m *MockEnvironmentService) FilterEnvironments(ctx context.Context, filterKey string, filterVal string) ([]types.Environment, error)

func (*MockEnvironmentService) GetEnvironment added in v0.3.0

func (_m *MockEnvironmentService) GetEnvironment(ctx context.Context, name string) (*types.Environment, error)

func (*MockEnvironmentService) ListEnvironments added in v0.3.0

func (_m *MockEnvironmentService) ListEnvironments(ctx context.Context) ([]types.Environment, error)

func (*MockEnvironmentService) ValidateAndCreateEnvironment added in v0.3.0

func (_m *MockEnvironmentService) ValidateAndCreateEnvironment(newEnv *types.Environment) types0.ValidateAndUpdateEnvironment

type MockEnvironmentStore

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

Mock of EnvironmentStore interface

func NewMockEnvironmentStore

func NewMockEnvironmentStore(ctrl *gomock.Controller) *MockEnvironmentStore

func (*MockEnvironmentStore) DeleteEnvironment

func (_m *MockEnvironmentStore) DeleteEnvironment(ctx context.Context, name string) error

func (*MockEnvironmentStore) EXPECT

func (_m *MockEnvironmentStore) EXPECT() *_MockEnvironmentStoreRecorder

func (*MockEnvironmentStore) GetEnvironment

func (_m *MockEnvironmentStore) GetEnvironment(ctx context.Context, name string) (*types0.Environment, error)

func (*MockEnvironmentStore) ListEnvironments

func (_m *MockEnvironmentStore) ListEnvironments(ctx context.Context) ([]types0.Environment, error)

func (*MockEnvironmentStore) PutEnvironment

func (_m *MockEnvironmentStore) PutEnvironment(ctx context.Context, name string, validateAndUpdateEnv types.ValidateAndUpdateEnvironment) error

type MockEtcdInterface

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

Mock of EtcdInterface interface

func NewMockEtcdInterface

func NewMockEtcdInterface(ctrl *gomock.Controller) *MockEtcdInterface

func (*MockEtcdInterface) Close

func (_m *MockEtcdInterface) Close() error

func (*MockEtcdInterface) Delete

func (*MockEtcdInterface) EXPECT

func (_m *MockEtcdInterface) EXPECT() *_MockEtcdInterfaceRecorder

func (*MockEtcdInterface) Get

func (*MockEtcdInterface) Put

type MockEtcdTXStore added in v0.3.0

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

Mock of EtcdTXStore interface

func NewMockEtcdTXStore added in v0.3.0

func NewMockEtcdTXStore(ctrl *gomock.Controller) *MockEtcdTXStore

func (*MockEtcdTXStore) EXPECT added in v0.3.0

func (_m *MockEtcdTXStore) EXPECT() *_MockEtcdTXStoreRecorder

func (*MockEtcdTXStore) GetV3Client added in v0.3.0

func (_m *MockEtcdTXStore) GetV3Client() *clientv3.Client

func (*MockEtcdTXStore) NewSTMRepeatable added in v0.3.0

func (_m *MockEtcdTXStore) NewSTMRepeatable(_param0 context.Context, _param1 *clientv3.Client, _param2 func(concurrency.STM) error) (*clientv3.TxnResponse, error)

type MockRoundTripper

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

Mock of RoundTripper interface

func NewMockRoundTripper

func NewMockRoundTripper(ctrl *gomock.Controller) *MockRoundTripper

func (*MockRoundTripper) EXPECT

func (_m *MockRoundTripper) EXPECT() *_MockRoundTripperRecorder

func (*MockRoundTripper) RoundTrip

func (_m *MockRoundTripper) RoundTrip(_param0 *http.Request) (*http.Response, error)

type MockSTM added in v0.3.0

type MockSTM struct {
	concurrency.STM
	// GetFunc is the interceptor for the Get() method in the STM interface
	GetFunc func(string) string
	// PutFunc is the interceptor for the Put() method in the STM interface
	PutFunc func(key string, val string, opts ...clientv3.OpOption)
}

MockSTM embeds the STM interface and provides custom interceptors for Get() and Put() methods. Since STM interface has private methods, a generated mock can't be used in its place. Hence, the intent is to use the mockSTM struct in its place.

func (*MockSTM) Get added in v0.3.0

func (stm *MockSTM) Get(key string) string

Get implements the STM.Get() method by invoking the custom interceptor method

func (*MockSTM) Put added in v0.3.0

func (stm *MockSTM) Put(key string, val string, opts ...clientv3.OpOption)

Put implements the STM.Put() method by invoking the custom interceptor method

Jump to

Keyboard shortcuts

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