mocks

package
v1.12.2 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2022 License: Apache-2.0 Imports: 6 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 CertificateClient

type CertificateClient struct {
	mock.Mock
}

func (*CertificateClient) AllWithOpts

func (*CertificateClient) CreateCertificate

func (*CertificateClient) Get

type LoadBalancerClient

type LoadBalancerClient struct {
	mock.Mock
}

func (*LoadBalancerClient) AddIPTarget

func (*LoadBalancerClient) AddServerTarget

func (*LoadBalancerClient) AddService

func (*LoadBalancerClient) AllWithOpts

func (*LoadBalancerClient) AttachToNetwork

func (*LoadBalancerClient) ChangeAlgorithm

func (*LoadBalancerClient) ChangeType

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) DisablePublicInterface

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

func (*LoadBalancerClient) EnablePublicInterface

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

func (*LoadBalancerClient) GetByID

func (*LoadBalancerClient) GetByName

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

func (*LoadBalancerClient) RemoveIPTarget

func (m *LoadBalancerClient) RemoveIPTarget(ctx context.Context, lb *hcloud.LoadBalancer, ip net.IP) (*hcloud.Action, *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) Update

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 RobotClient

type RobotClient struct {
	mock.Mock
}

func (*RobotClient) BootLinuxDelete

func (m *RobotClient) BootLinuxDelete(id int) (*models.Linux, error)

func (*RobotClient) BootLinuxGet

func (m *RobotClient) BootLinuxGet(id int) (*models.Linux, error)

func (*RobotClient) BootLinuxSet

func (m *RobotClient) BootLinuxSet(id int, input *models.LinuxSetInput) (*models.Linux, error)

func (*RobotClient) BootRescueDelete

func (m *RobotClient) BootRescueDelete(id int) (*models.Rescue, error)

func (*RobotClient) BootRescueGet

func (m *RobotClient) BootRescueGet(id int) (*models.Rescue, error)

func (*RobotClient) BootRescueSet

func (m *RobotClient) BootRescueSet(id int, input *models.RescueSetInput) (*models.Rescue, error)

func (*RobotClient) FailoverGet

func (m *RobotClient) FailoverGet(ip string) (*models.Failover, error)

func (*RobotClient) FailoverGetList

func (m *RobotClient) FailoverGetList() ([]models.Failover, error)

func (*RobotClient) GetVersion

func (m *RobotClient) GetVersion() string

func (*RobotClient) IPGetList

func (m *RobotClient) IPGetList() ([]models.IP, error)

func (*RobotClient) KeyGetList

func (m *RobotClient) KeyGetList() ([]models.Key, error)

func (*RobotClient) KeySet

func (m *RobotClient) KeySet(input *models.KeySetInput) (*models.Key, error)

func (*RobotClient) RDnsGet

func (m *RobotClient) RDnsGet(ip string) (*models.Rdns, error)

func (*RobotClient) RDnsGetList

func (m *RobotClient) RDnsGetList() ([]models.Rdns, error)

func (*RobotClient) ResetGet

func (m *RobotClient) ResetGet(id int) (*models.Reset, error)

func (*RobotClient) ResetSet

func (m *RobotClient) ResetSet(id int, input *models.ResetSetInput) (*models.ResetPost, error)

func (*RobotClient) ServerGet

func (m *RobotClient) ServerGet(id int) (*models.Server, error)

func (*RobotClient) ServerGetList

func (m *RobotClient) ServerGetList() ([]models.Server, error)

func (*RobotClient) ServerReverse

func (m *RobotClient) ServerReverse(id int) (*models.Cancellation, error)

func (*RobotClient) ServerSetName

func (m *RobotClient) ServerSetName(id int, input *models.ServerSetNameInput) (*models.Server, error)

func (*RobotClient) SetBaseURL

func (m *RobotClient) SetBaseURL(baseURL string)

func (*RobotClient) SetUserAgent

func (m *RobotClient) SetUserAgent(userAgent string)

func (*RobotClient) ValidateCredentials

func (m *RobotClient) ValidateCredentials() error

type ServerClient

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

ServerClient is a mock implementation of the hcloud.ServerClient

func NewServerClient

func NewServerClient(t *testing.T) *ServerClient

NewServerClient creates a new mock server client ready for use.

func (*ServerClient) All

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