mocks

package
v1.20.0 Latest Latest
Warning

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

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

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 added in v1.9.0

type CertificateClient struct {
	mock.Mock
}

func (*CertificateClient) AllWithOpts added in v1.9.0

func (*CertificateClient) CreateCertificate added in v1.9.0

func (*CertificateClient) Get added in v1.9.0

type LoadBalancerClient

type LoadBalancerClient struct {
	mock.Mock
}

func (*LoadBalancerClient) AddIPTarget added in v1.19.0

func (*LoadBalancerClient) AddServerTarget

func (*LoadBalancerClient) AddService

func (*LoadBalancerClient) AllWithOpts added in v1.9.0

func (*LoadBalancerClient) AttachToNetwork

func (*LoadBalancerClient) ChangeAlgorithm

func (*LoadBalancerClient) ChangeDNSPtr added in v1.13.0

func (m *LoadBalancerClient) ChangeDNSPtr(
	ctx context.Context, lb *hcloud.LoadBalancer, ip string, ptr *string,
) (*hcloud.Action, *hcloud.Response, error)

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) DisablePublicInterface added in v1.9.0

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

func (*LoadBalancerClient) EnablePublicInterface added in v1.9.0

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 added in v1.19.0

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 added in v1.9.0

func (*LoadBalancerClient) UpdateService

type NetworkClient

type NetworkClient struct {
	mock.Mock
}

func (*NetworkClient) GetByID

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

type RobotClient added in v1.19.0

type RobotClient struct {
	mock.Mock
}

func (*RobotClient) BootLinuxDelete added in v1.19.0

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

func (*RobotClient) BootLinuxGet added in v1.19.0

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

func (*RobotClient) BootLinuxSet added in v1.19.0

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

func (*RobotClient) BootRescueDelete added in v1.19.0

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

func (*RobotClient) BootRescueGet added in v1.19.0

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

func (*RobotClient) BootRescueSet added in v1.19.0

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

func (*RobotClient) FailoverGet added in v1.19.0

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

func (*RobotClient) FailoverGetList added in v1.19.0

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

func (*RobotClient) GetVersion added in v1.19.0

func (m *RobotClient) GetVersion() string

func (*RobotClient) IPGetList added in v1.19.0

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

func (*RobotClient) KeyGetList added in v1.19.0

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

func (*RobotClient) KeySet added in v1.19.0

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

func (*RobotClient) RDnsGet added in v1.19.0

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

func (*RobotClient) RDnsGetList added in v1.19.0

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

func (*RobotClient) ResetGet added in v1.19.0

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

func (*RobotClient) ResetSet added in v1.19.0

func (*RobotClient) ServerGet added in v1.19.0

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

func (*RobotClient) ServerGetList added in v1.19.0

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

func (*RobotClient) ServerReverse added in v1.19.0

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

func (*RobotClient) ServerSetName added in v1.19.0

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

func (*RobotClient) SetBaseURL added in v1.19.0

func (m *RobotClient) SetBaseURL(baseURL string)

func (*RobotClient) SetUserAgent added in v1.19.0

func (m *RobotClient) SetUserAgent(userAgent string)

func (*RobotClient) ValidateCredentials added in v1.19.0

func (m *RobotClient) ValidateCredentials() 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