mock

package
v0.7.4 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2016 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FakeAwsAutoscaling

type FakeAwsAutoscaling struct {
	DescribeAutoScalingGroupsFn func() (*autoscaling.DescribeAutoScalingGroupsOutput, error)
	AttachLoadBalancersFn       func(*autoscaling.AttachLoadBalancersInput) (*autoscaling.AttachLoadBalancersOutput, error)
	DetachLoadBalancersFn       func(*autoscaling.DetachLoadBalancersInput) (*autoscaling.DetachLoadBalancersOutput, error)
}

func (*FakeAwsAutoscaling) AttachLoadBalancers

func (*FakeAwsAutoscaling) DeletePolicy

func (*FakeAwsAutoscaling) DeletePolicyRequest

func (*FakeAwsAutoscaling) DeleteTags

func (*FakeAwsAutoscaling) DeleteTagsRequest

func (*FakeAwsAutoscaling) DescribePoliciesPages

func (*FakeAwsAutoscaling) DescribeTags

func (*FakeAwsAutoscaling) DescribeTagsPages

func (*FakeAwsAutoscaling) DescribeTagsRequest

func (*FakeAwsAutoscaling) DetachLoadBalancers

func (*FakeAwsAutoscaling) EnterStandby

func (*FakeAwsAutoscaling) EnterStandbyRequest

func (*FakeAwsAutoscaling) ExecutePolicy

func (*FakeAwsAutoscaling) ExitStandby

func (*FakeAwsAutoscaling) ExitStandbyRequest

func (*FakeAwsAutoscaling) ResumeProcesses

func (*FakeAwsAutoscaling) ReturnOnDescribeAutoScalingGroups

func (f *FakeAwsAutoscaling) ReturnOnDescribeAutoScalingGroups(groups []*autoscaling.Group, err error) *FakeAwsAutoscaling

type FakeAwsELB

type FakeAwsELB struct {
	CreateLoadBalancerFn          func(*elb.CreateLoadBalancerInput) (*elb.CreateLoadBalancerOutput, error)
	DeleteLoadBalancerFn          func(*elb.DeleteLoadBalancerInput) (*elb.DeleteLoadBalancerOutput, error)
	ConfigureHealthCheckFn        func(*elb.ConfigureHealthCheckInput) (*elb.ConfigureHealthCheckOutput, error)
	DeleteLoadBalancerListenersFn func(*elb.DeleteLoadBalancerListenersInput) (*elb.DeleteLoadBalancerListenersOutput, error)
}

func (*FakeAwsELB) AddTags

func (f *FakeAwsELB) AddTags(*elb.AddTagsInput) (*elb.AddTagsOutput, error)

func (*FakeAwsELB) AddTagsRequest

func (f *FakeAwsELB) AddTagsRequest(*elb.AddTagsInput) (*request.Request, *elb.AddTagsOutput)

func (*FakeAwsELB) ConfigureHealthCheck

func (f *FakeAwsELB) ConfigureHealthCheck(input *elb.ConfigureHealthCheckInput) (*elb.ConfigureHealthCheckOutput, error)

func (*FakeAwsELB) ConfigureHealthCheckRequest

func (*FakeAwsELB) CreateLoadBalancer

func (f *FakeAwsELB) CreateLoadBalancer(input *elb.CreateLoadBalancerInput) (*elb.CreateLoadBalancerOutput, error)

func (*FakeAwsELB) CreateLoadBalancerRequest

func (*FakeAwsELB) DeleteLoadBalancer

func (f *FakeAwsELB) DeleteLoadBalancer(input *elb.DeleteLoadBalancerInput) (*elb.DeleteLoadBalancerOutput, error)

func (*FakeAwsELB) DeleteLoadBalancerListeners

func (*FakeAwsELB) DeleteLoadBalancerRequest

func (*FakeAwsELB) DescribeInstanceHealth

func (*FakeAwsELB) DescribeLoadBalancers

func (*FakeAwsELB) DescribeLoadBalancersPages

func (f *FakeAwsELB) DescribeLoadBalancersPages(*elb.DescribeLoadBalancersInput, func(*elb.DescribeLoadBalancersOutput, bool) bool) error

func (*FakeAwsELB) DescribeTags

func (*FakeAwsELB) DescribeTagsRequest

func (f *FakeAwsELB) DescribeTagsRequest(*elb.DescribeTagsInput) (*request.Request, *elb.DescribeTagsOutput)

func (*FakeAwsELB) OnConfigureHealthCheck

func (f *FakeAwsELB) OnConfigureHealthCheck(clbk func(*elb.ConfigureHealthCheckInput) (*elb.ConfigureHealthCheckOutput, error)) *FakeAwsELB

func (*FakeAwsELB) OnCreateLoadBalancer

func (f *FakeAwsELB) OnCreateLoadBalancer(clbk func(*elb.CreateLoadBalancerInput) (*elb.CreateLoadBalancerOutput, error)) *FakeAwsELB

func (*FakeAwsELB) OnDeleteLoadBalancer

func (f *FakeAwsELB) OnDeleteLoadBalancer(clbk func(*elb.DeleteLoadBalancerInput) (*elb.DeleteLoadBalancerOutput, error)) *FakeAwsELB

func (*FakeAwsELB) OnDeleteLoadBalancerListeners added in v0.5.12

func (f *FakeAwsELB) OnDeleteLoadBalancerListeners(clbk func(*elb.DeleteLoadBalancerListenersInput) (*elb.DeleteLoadBalancerListenersOutput, error)) *FakeAwsELB

func (*FakeAwsELB) RemoveTags

func (*FakeAwsELB) RemoveTagsRequest

func (f *FakeAwsELB) RemoveTagsRequest(*elb.RemoveTagsInput) (*request.Request, *elb.RemoveTagsOutput)

type FakeEtcd

type FakeEtcd struct {
	GetFn           func() (*etcd.Response, error)
	SetFn           func() (*etcd.Response, error)
	DeleteFn        func(key string) (*etcd.Response, error)
	CreateFn        func(key string, val string) (*etcd.Response, error)
	CreateInOrderFn func(val string) (*etcd.Response, error)
	UpdateFn        func(key string, val string) (*etcd.Response, error)
}

FakeEtcd is used to mock etcd operations in tests

func (*FakeEtcd) Create

func (f *FakeEtcd) Create(ctx context.Context, key, value string) (*etcd.Response, error)

Create implements the etcd.KeysAPI interface

func (*FakeEtcd) CreateInOrder

func (f *FakeEtcd) CreateInOrder(ctx context.Context, dir, value string, opts *etcd.CreateInOrderOptions) (*etcd.Response, error)

CreateInOrder implements the etcd.KeysAPI interface

func (*FakeEtcd) Delete

func (f *FakeEtcd) Delete(ctx context.Context, key string, opts *etcd.DeleteOptions) (*etcd.Response, error)

Delete implements the etcd.KeysAPI interface

func (*FakeEtcd) Get

func (f *FakeEtcd) Get(ctx context.Context, key string, opts *etcd.GetOptions) (*etcd.Response, error)

Get implements the etcd.KeysAPI interface

func (*FakeEtcd) OnCreate

func (f *FakeEtcd) OnCreate(clbk func(string, string) error) *FakeEtcd

func (*FakeEtcd) OnCreateInOrder

func (f *FakeEtcd) OnCreateInOrder(clbk func(string) (*etcd.Response, error)) *FakeEtcd

func (*FakeEtcd) OnDelete

func (f *FakeEtcd) OnDelete(clbk func(string) error) *FakeEtcd

func (*FakeEtcd) OnUpdate

func (f *FakeEtcd) OnUpdate(clbk func(string, string) error) *FakeEtcd

func (*FakeEtcd) ReturnOnGet

func (f *FakeEtcd) ReturnOnGet(r *etcd.Response, err error) *FakeEtcd

func (*FakeEtcd) ReturnValueOnGet

func (f *FakeEtcd) ReturnValueOnGet(val string, err error) *FakeEtcd

Convenience method for the usual ReturnValueOnGet

func (*FakeEtcd) ReturnValuesOnGet

func (f *FakeEtcd) ReturnValuesOnGet(vals []string, err error) *FakeEtcd

Convenience method for the usual ReturnValueOnGet

func (*FakeEtcd) Set

func (f *FakeEtcd) Set(ctx context.Context, key, value string, opts *etcd.SetOptions) (*etcd.Response, error)

Set implements the etcd.KeysAPI interface

func (*FakeEtcd) Update

func (f *FakeEtcd) Update(ctx context.Context, key, value string) (*etcd.Response, error)

Update implements the etcd.KeysAPI interface

func (*FakeEtcd) Watcher

func (f *FakeEtcd) Watcher(key string, opts *etcd.WatcherOptions) etcd.Watcher

Watcher implements the etcd.KeysAPI interface

type FakeGuber

type FakeGuber struct {
	NamespacesFn             func() guber.NamespaceCollection
	EventsFn                 func(namespace string) guber.EventCollection
	SecretsFn                func(namespace string) guber.SecretCollection
	ServicesFn               func(namespace string) guber.ServiceCollection
	ReplicationControllersFn func(namespace string) guber.ReplicationControllerCollection
	PodsFn                   func(namespace string) guber.PodCollection
	NodesFn                  func() guber.NodeCollection
}

func (*FakeGuber) Events

func (f *FakeGuber) Events(namespace string) guber.EventCollection

func (*FakeGuber) Namespaces

func (f *FakeGuber) Namespaces() guber.NamespaceCollection

func (*FakeGuber) Nodes

func (f *FakeGuber) Nodes() guber.NodeCollection

func (*FakeGuber) OnNamespaceCreate

func (f *FakeGuber) OnNamespaceCreate(clbk func(*guber.Namespace) error) *FakeGuber

func (*FakeGuber) OnNamespaceDelete

func (f *FakeGuber) OnNamespaceDelete(clbk func(string) error) *FakeGuber

func (*FakeGuber) Pods

func (f *FakeGuber) Pods(namespace string) guber.PodCollection

func (*FakeGuber) ReplicationControllers

func (f *FakeGuber) ReplicationControllers(namespace string) guber.ReplicationControllerCollection

func (*FakeGuber) ReturnOnServiceGet added in v0.5.12

func (f *FakeGuber) ReturnOnServiceGet(r *guber.Service, err error) *FakeGuber

func (*FakeGuber) Secrets

func (f *FakeGuber) Secrets(namespace string) guber.SecretCollection

func (*FakeGuber) Services

func (f *FakeGuber) Services(namespace string) guber.ServiceCollection

type FakeGuberNamespaces

type FakeGuberNamespaces struct {
	MetaFn   func() *guber.CollectionMeta
	NewFn    func() *guber.Namespace
	CreateFn func(e *guber.Namespace) (*guber.Namespace, error)
	QueryFn  func(q *guber.QueryParams) (*guber.NamespaceList, error)
	ListFn   func() (*guber.NamespaceList, error)
	GetFn    func(name string) (*guber.Namespace, error)
	UpdateFn func(name string, r *guber.Namespace) (*guber.Namespace, error)
	DeleteFn func(name string) error
}

func (*FakeGuberNamespaces) Create

func (*FakeGuberNamespaces) Delete

func (f *FakeGuberNamespaces) Delete(name string) error

func (*FakeGuberNamespaces) Get

func (f *FakeGuberNamespaces) Get(name string) (*guber.Namespace, error)

func (*FakeGuberNamespaces) List

func (*FakeGuberNamespaces) Meta

func (*FakeGuberNamespaces) New

func (*FakeGuberNamespaces) Query

func (*FakeGuberNamespaces) Update

func (f *FakeGuberNamespaces) Update(name string, r *guber.Namespace) (*guber.Namespace, error)

type FakeGuberServices added in v0.5.12

type FakeGuberServices struct {
	MetaFn   func() *guber.CollectionMeta
	NewFn    func() *guber.Service
	CreateFn func(e *guber.Service) (*guber.Service, error)
	QueryFn  func(q *guber.QueryParams) (*guber.ServiceList, error)
	ListFn   func() (*guber.ServiceList, error)
	GetFn    func(name string) (*guber.Service, error)
	UpdateFn func(name string, r *guber.Service) (*guber.Service, error)
	DeleteFn func(name string) error
}

func (*FakeGuberServices) Create added in v0.5.12

func (f *FakeGuberServices) Create(e *guber.Service) (*guber.Service, error)

func (*FakeGuberServices) Delete added in v0.5.12

func (f *FakeGuberServices) Delete(name string) error

func (*FakeGuberServices) Get added in v0.5.12

func (f *FakeGuberServices) Get(name string) (*guber.Service, error)

func (*FakeGuberServices) List added in v0.5.12

func (f *FakeGuberServices) List() (*guber.ServiceList, error)

func (*FakeGuberServices) Meta added in v0.5.12

func (*FakeGuberServices) New added in v0.5.12

func (f *FakeGuberServices) New() *guber.Service

func (*FakeGuberServices) Query added in v0.5.12

func (*FakeGuberServices) Update added in v0.5.12

func (f *FakeGuberServices) Update(name string, r *guber.Service) (*guber.Service, error)

Jump to

Keyboard shortcuts

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