mocks

package
v1.8.1 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2020 License: Apache-2.0 Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetLoadBalancerPtr

func GetLoadBalancerPtr(args mock.Arguments, i int) *hcloud.LoadBalancer

Types

type ActionClient

type ActionClient struct {
	mock.Mock
}

func (*ActionClient) MockWatchProgress

func (m *ActionClient) MockWatchProgress(ctx context.Context, a *hcloud.Action, err error)

func (*ActionClient) WatchProgress

func (m *ActionClient) WatchProgress(ctx context.Context, a *hcloud.Action) (<-chan int, <-chan error)

type LoadBalancerClient

type LoadBalancerClient struct {
	mock.Mock
}

func (*LoadBalancerClient) AddServerTarget

func (*LoadBalancerClient) AddService

func (*LoadBalancerClient) AttachToNetwork

func (*LoadBalancerClient) ChangeAlgorithm

func (*LoadBalancerClient) ChangeType added in v1.7.0

func (*LoadBalancerClient) Delete

func (*LoadBalancerClient) DeleteService

func (m *LoadBalancerClient) DeleteService(
	ctx context.Context, lb *hcloud.LoadBalancer, listenPort int,
) (*hcloud.Action, *hcloud.Response, error)

func (*LoadBalancerClient) DetachFromNetwork

func (*LoadBalancerClient) GetByID

func (*LoadBalancerClient) GetByName

func (m *LoadBalancerClient) GetByName(
	ctx context.Context, name string,
) (*hcloud.LoadBalancer, *hcloud.Response, error)

func (*LoadBalancerClient) RemoveServerTarget

func (m *LoadBalancerClient) RemoveServerTarget(ctx context.Context, lb *hcloud.LoadBalancer, server *hcloud.Server) (*hcloud.Action, *hcloud.Response, error)

func (*LoadBalancerClient) UpdateService

type NetworkClient

type NetworkClient struct {
	mock.Mock
}

func (*NetworkClient) GetByID

func (m *NetworkClient) GetByID(ctx context.Context, id int) (*hcloud.Network, *hcloud.Response, error)

type ServerClient added in v1.8.1

type ServerClient struct {
	mock.Mock
	T *testing.T
}

ServerClient is a mock implementation of the hcloud.ServerClient

func NewServerClient added in v1.8.1

func NewServerClient(t *testing.T) *ServerClient

NewServerClient creates a new mock server client ready for use.

func (*ServerClient) All added in v1.8.1

func (m *ServerClient) All(ctx context.Context) ([]*hcloud.Server, error)

All registers a call to obtain all servers from the Hetzner Cloud API.

Jump to

Keyboard shortcuts

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