clienttest

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockClient

type MockClient struct {
	mock.Mock
}

MockClient is an autogenerated mock type for the Client type

func NewMockClient

func NewMockClient(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockClient

NewMockClient creates a new instance of MockClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockClient) CheckRequestStatus

func (_m *MockClient) CheckRequestStatus(ctx context.Context, requestID string) (*ionoscloud.RequestStatus, error)

CheckRequestStatus provides a mock function with given fields: ctx, requestID

func (*MockClient) CreateLAN

func (_m *MockClient) CreateLAN(ctx context.Context, datacenterID string, properties ionoscloud.LanProperties) (string, error)

CreateLAN provides a mock function with given fields: ctx, datacenterID, properties

func (*MockClient) CreateServer

func (_m *MockClient) CreateServer(ctx context.Context, datacenterID string, properties ionoscloud.ServerProperties, entities ionoscloud.ServerEntities) (*ionoscloud.Server, string, error)

CreateServer provides a mock function with given fields: ctx, datacenterID, properties, entities

func (*MockClient) DeleteIPBlock

func (_m *MockClient) DeleteIPBlock(ctx context.Context, ipBlockID string) (string, error)

DeleteIPBlock provides a mock function with given fields: ctx, ipBlockID

func (*MockClient) DeleteLAN

func (_m *MockClient) DeleteLAN(ctx context.Context, datacenterID string, lanID string) (string, error)

DeleteLAN provides a mock function with given fields: ctx, datacenterID, lanID

func (*MockClient) DeleteServer

func (_m *MockClient) DeleteServer(ctx context.Context, datacenterID string, serverID string, deleteVolumes bool) (string, error)

DeleteServer provides a mock function with given fields: ctx, datacenterID, serverID, deleteVolumes

func (*MockClient) DeleteVolume

func (_m *MockClient) DeleteVolume(ctx context.Context, datacenterID string, volumeID string) (string, error)

DeleteVolume provides a mock function with given fields: ctx, datacenterID, volumeID

func (*MockClient) EXPECT

func (_m *MockClient) EXPECT() *MockClient_Expecter

func (*MockClient) GetDatacenterLocationByID added in v0.3.0

func (_m *MockClient) GetDatacenterLocationByID(ctx context.Context, datacenterID string) (string, error)

GetDatacenterLocationByID provides a mock function with given fields: ctx, datacenterID

func (*MockClient) GetIPBlock

func (_m *MockClient) GetIPBlock(ctx context.Context, ipBlockID string) (*ionoscloud.IpBlock, error)

GetIPBlock provides a mock function with given fields: ctx, ipBlockID

func (*MockClient) GetImage added in v0.3.0

func (_m *MockClient) GetImage(ctx context.Context, imageID string) (*ionoscloud.Image, error)

GetImage provides a mock function with given fields: ctx, imageID

func (*MockClient) GetRequests

func (_m *MockClient) GetRequests(ctx context.Context, method string, path string) ([]ionoscloud.Request, error)

GetRequests provides a mock function with given fields: ctx, method, path

func (*MockClient) GetServer

func (_m *MockClient) GetServer(ctx context.Context, datacenterID string, serverID string) (*ionoscloud.Server, error)

GetServer provides a mock function with given fields: ctx, datacenterID, serverID

func (*MockClient) ListIPBlocks

func (_m *MockClient) ListIPBlocks(ctx context.Context) (*ionoscloud.IpBlocks, error)

ListIPBlocks provides a mock function with given fields: ctx

func (*MockClient) ListLANs

func (_m *MockClient) ListLANs(ctx context.Context, datacenterID string) (*ionoscloud.Lans, error)

ListLANs provides a mock function with given fields: ctx, datacenterID

func (*MockClient) ListLabels added in v0.3.0

func (_m *MockClient) ListLabels(ctx context.Context) ([]ionoscloud.Label, error)

ListLabels provides a mock function with given fields: ctx

func (*MockClient) ListServers

func (_m *MockClient) ListServers(ctx context.Context, datacenterID string) (*ionoscloud.Servers, error)

ListServers provides a mock function with given fields: ctx, datacenterID

func (*MockClient) PatchLAN

func (_m *MockClient) PatchLAN(ctx context.Context, datacenterID string, lanID string, properties ionoscloud.LanProperties) (string, error)

PatchLAN provides a mock function with given fields: ctx, datacenterID, lanID, properties

func (*MockClient) PatchNIC

func (_m *MockClient) PatchNIC(ctx context.Context, datacenterID string, serverID string, nicID string, properties ionoscloud.NicProperties) (string, error)

PatchNIC provides a mock function with given fields: ctx, datacenterID, serverID, nicID, properties

func (*MockClient) ReserveIPBlock

func (_m *MockClient) ReserveIPBlock(ctx context.Context, name string, location string, size int32) (string, error)

ReserveIPBlock provides a mock function with given fields: ctx, name, location, size

func (*MockClient) StartServer

func (_m *MockClient) StartServer(ctx context.Context, datacenterID string, serverID string) (string, error)

StartServer provides a mock function with given fields: ctx, datacenterID, serverID

func (*MockClient) WaitForRequest

func (_m *MockClient) WaitForRequest(ctx context.Context, requestURL string) error

WaitForRequest provides a mock function with given fields: ctx, requestURL

type MockClient_CheckRequestStatus_Call

type MockClient_CheckRequestStatus_Call struct {
	*mock.Call
}

MockClient_CheckRequestStatus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CheckRequestStatus'

func (*MockClient_CheckRequestStatus_Call) Return

func (*MockClient_CheckRequestStatus_Call) Run

func (*MockClient_CheckRequestStatus_Call) RunAndReturn

type MockClient_CreateLAN_Call

type MockClient_CreateLAN_Call struct {
	*mock.Call
}

MockClient_CreateLAN_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateLAN'

func (*MockClient_CreateLAN_Call) Return

func (*MockClient_CreateLAN_Call) Run

func (_c *MockClient_CreateLAN_Call) Run(run func(ctx context.Context, datacenterID string, properties ionoscloud.LanProperties)) *MockClient_CreateLAN_Call

func (*MockClient_CreateLAN_Call) RunAndReturn

type MockClient_CreateServer_Call

type MockClient_CreateServer_Call struct {
	*mock.Call
}

MockClient_CreateServer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateServer'

func (*MockClient_CreateServer_Call) Return

func (*MockClient_CreateServer_Call) Run

type MockClient_DeleteIPBlock_Call

type MockClient_DeleteIPBlock_Call struct {
	*mock.Call
}

MockClient_DeleteIPBlock_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteIPBlock'

func (*MockClient_DeleteIPBlock_Call) Return

func (*MockClient_DeleteIPBlock_Call) Run

func (*MockClient_DeleteIPBlock_Call) RunAndReturn

type MockClient_DeleteLAN_Call

type MockClient_DeleteLAN_Call struct {
	*mock.Call
}

MockClient_DeleteLAN_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteLAN'

func (*MockClient_DeleteLAN_Call) Return

func (*MockClient_DeleteLAN_Call) Run

func (_c *MockClient_DeleteLAN_Call) Run(run func(ctx context.Context, datacenterID string, lanID string)) *MockClient_DeleteLAN_Call

func (*MockClient_DeleteLAN_Call) RunAndReturn

type MockClient_DeleteServer_Call

type MockClient_DeleteServer_Call struct {
	*mock.Call
}

MockClient_DeleteServer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteServer'

func (*MockClient_DeleteServer_Call) Return

func (*MockClient_DeleteServer_Call) Run

func (_c *MockClient_DeleteServer_Call) Run(run func(ctx context.Context, datacenterID string, serverID string, deleteVolumes bool)) *MockClient_DeleteServer_Call

func (*MockClient_DeleteServer_Call) RunAndReturn

type MockClient_DeleteVolume_Call

type MockClient_DeleteVolume_Call struct {
	*mock.Call
}

MockClient_DeleteVolume_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteVolume'

func (*MockClient_DeleteVolume_Call) Return

func (*MockClient_DeleteVolume_Call) Run

func (_c *MockClient_DeleteVolume_Call) Run(run func(ctx context.Context, datacenterID string, volumeID string)) *MockClient_DeleteVolume_Call

func (*MockClient_DeleteVolume_Call) RunAndReturn

type MockClient_Expecter

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

func (*MockClient_Expecter) CheckRequestStatus

func (_e *MockClient_Expecter) CheckRequestStatus(ctx interface{}, requestID interface{}) *MockClient_CheckRequestStatus_Call

CheckRequestStatus is a helper method to define mock.On call

  • ctx context.Context
  • requestID string

func (*MockClient_Expecter) CreateLAN

func (_e *MockClient_Expecter) CreateLAN(ctx interface{}, datacenterID interface{}, properties interface{}) *MockClient_CreateLAN_Call

CreateLAN is a helper method to define mock.On call

  • ctx context.Context
  • datacenterID string
  • properties ionoscloud.LanProperties

func (*MockClient_Expecter) CreateServer

func (_e *MockClient_Expecter) CreateServer(ctx interface{}, datacenterID interface{}, properties interface{}, entities interface{}) *MockClient_CreateServer_Call

CreateServer is a helper method to define mock.On call

  • ctx context.Context
  • datacenterID string
  • properties ionoscloud.ServerProperties
  • entities ionoscloud.ServerEntities

func (*MockClient_Expecter) DeleteIPBlock

func (_e *MockClient_Expecter) DeleteIPBlock(ctx interface{}, ipBlockID interface{}) *MockClient_DeleteIPBlock_Call

DeleteIPBlock is a helper method to define mock.On call

  • ctx context.Context
  • ipBlockID string

func (*MockClient_Expecter) DeleteLAN

func (_e *MockClient_Expecter) DeleteLAN(ctx interface{}, datacenterID interface{}, lanID interface{}) *MockClient_DeleteLAN_Call

DeleteLAN is a helper method to define mock.On call

  • ctx context.Context
  • datacenterID string
  • lanID string

func (*MockClient_Expecter) DeleteServer

func (_e *MockClient_Expecter) DeleteServer(ctx interface{}, datacenterID interface{}, serverID interface{}, deleteVolumes interface{}) *MockClient_DeleteServer_Call

DeleteServer is a helper method to define mock.On call

  • ctx context.Context
  • datacenterID string
  • serverID string
  • deleteVolumes bool

func (*MockClient_Expecter) DeleteVolume

func (_e *MockClient_Expecter) DeleteVolume(ctx interface{}, datacenterID interface{}, volumeID interface{}) *MockClient_DeleteVolume_Call

DeleteVolume is a helper method to define mock.On call

  • ctx context.Context
  • datacenterID string
  • volumeID string

func (*MockClient_Expecter) GetDatacenterLocationByID added in v0.3.0

func (_e *MockClient_Expecter) GetDatacenterLocationByID(ctx interface{}, datacenterID interface{}) *MockClient_GetDatacenterLocationByID_Call

GetDatacenterLocationByID is a helper method to define mock.On call

  • ctx context.Context
  • datacenterID string

func (*MockClient_Expecter) GetIPBlock

func (_e *MockClient_Expecter) GetIPBlock(ctx interface{}, ipBlockID interface{}) *MockClient_GetIPBlock_Call

GetIPBlock is a helper method to define mock.On call

  • ctx context.Context
  • ipBlockID string

func (*MockClient_Expecter) GetImage added in v0.3.0

func (_e *MockClient_Expecter) GetImage(ctx interface{}, imageID interface{}) *MockClient_GetImage_Call

GetImage is a helper method to define mock.On call

  • ctx context.Context
  • imageID string

func (*MockClient_Expecter) GetRequests

func (_e *MockClient_Expecter) GetRequests(ctx interface{}, method interface{}, path interface{}) *MockClient_GetRequests_Call

GetRequests is a helper method to define mock.On call

  • ctx context.Context
  • method string
  • path string

func (*MockClient_Expecter) GetServer

func (_e *MockClient_Expecter) GetServer(ctx interface{}, datacenterID interface{}, serverID interface{}) *MockClient_GetServer_Call

GetServer is a helper method to define mock.On call

  • ctx context.Context
  • datacenterID string
  • serverID string

func (*MockClient_Expecter) ListIPBlocks

func (_e *MockClient_Expecter) ListIPBlocks(ctx interface{}) *MockClient_ListIPBlocks_Call

ListIPBlocks is a helper method to define mock.On call

  • ctx context.Context

func (*MockClient_Expecter) ListLANs

func (_e *MockClient_Expecter) ListLANs(ctx interface{}, datacenterID interface{}) *MockClient_ListLANs_Call

ListLANs is a helper method to define mock.On call

  • ctx context.Context
  • datacenterID string

func (*MockClient_Expecter) ListLabels added in v0.3.0

func (_e *MockClient_Expecter) ListLabels(ctx interface{}) *MockClient_ListLabels_Call

ListLabels is a helper method to define mock.On call

  • ctx context.Context

func (*MockClient_Expecter) ListServers

func (_e *MockClient_Expecter) ListServers(ctx interface{}, datacenterID interface{}) *MockClient_ListServers_Call

ListServers is a helper method to define mock.On call

  • ctx context.Context
  • datacenterID string

func (*MockClient_Expecter) PatchLAN

func (_e *MockClient_Expecter) PatchLAN(ctx interface{}, datacenterID interface{}, lanID interface{}, properties interface{}) *MockClient_PatchLAN_Call

PatchLAN is a helper method to define mock.On call

  • ctx context.Context
  • datacenterID string
  • lanID string
  • properties ionoscloud.LanProperties

func (*MockClient_Expecter) PatchNIC

func (_e *MockClient_Expecter) PatchNIC(ctx interface{}, datacenterID interface{}, serverID interface{}, nicID interface{}, properties interface{}) *MockClient_PatchNIC_Call

PatchNIC is a helper method to define mock.On call

  • ctx context.Context
  • datacenterID string
  • serverID string
  • nicID string
  • properties ionoscloud.NicProperties

func (*MockClient_Expecter) ReserveIPBlock

func (_e *MockClient_Expecter) ReserveIPBlock(ctx interface{}, name interface{}, location interface{}, size interface{}) *MockClient_ReserveIPBlock_Call

ReserveIPBlock is a helper method to define mock.On call

  • ctx context.Context
  • name string
  • location string
  • size int32

func (*MockClient_Expecter) StartServer

func (_e *MockClient_Expecter) StartServer(ctx interface{}, datacenterID interface{}, serverID interface{}) *MockClient_StartServer_Call

StartServer is a helper method to define mock.On call

  • ctx context.Context
  • datacenterID string
  • serverID string

func (*MockClient_Expecter) WaitForRequest

func (_e *MockClient_Expecter) WaitForRequest(ctx interface{}, requestURL interface{}) *MockClient_WaitForRequest_Call

WaitForRequest is a helper method to define mock.On call

  • ctx context.Context
  • requestURL string

type MockClient_GetDatacenterLocationByID_Call added in v0.3.0

type MockClient_GetDatacenterLocationByID_Call struct {
	*mock.Call
}

MockClient_GetDatacenterLocationByID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetDatacenterLocationByID'

func (*MockClient_GetDatacenterLocationByID_Call) Return added in v0.3.0

func (*MockClient_GetDatacenterLocationByID_Call) Run added in v0.3.0

func (*MockClient_GetDatacenterLocationByID_Call) RunAndReturn added in v0.3.0

type MockClient_GetIPBlock_Call

type MockClient_GetIPBlock_Call struct {
	*mock.Call
}

MockClient_GetIPBlock_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetIPBlock'

func (*MockClient_GetIPBlock_Call) Return

func (*MockClient_GetIPBlock_Call) Run

func (_c *MockClient_GetIPBlock_Call) Run(run func(ctx context.Context, ipBlockID string)) *MockClient_GetIPBlock_Call

func (*MockClient_GetIPBlock_Call) RunAndReturn

type MockClient_GetImage_Call added in v0.3.0

type MockClient_GetImage_Call struct {
	*mock.Call
}

MockClient_GetImage_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetImage'

func (*MockClient_GetImage_Call) Return added in v0.3.0

func (*MockClient_GetImage_Call) Run added in v0.3.0

func (_c *MockClient_GetImage_Call) Run(run func(ctx context.Context, imageID string)) *MockClient_GetImage_Call

func (*MockClient_GetImage_Call) RunAndReturn added in v0.3.0

type MockClient_GetRequests_Call

type MockClient_GetRequests_Call struct {
	*mock.Call
}

MockClient_GetRequests_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetRequests'

func (*MockClient_GetRequests_Call) Return

func (*MockClient_GetRequests_Call) Run

func (*MockClient_GetRequests_Call) RunAndReturn

type MockClient_GetServer_Call

type MockClient_GetServer_Call struct {
	*mock.Call
}

MockClient_GetServer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetServer'

func (*MockClient_GetServer_Call) Return

func (*MockClient_GetServer_Call) Run

func (_c *MockClient_GetServer_Call) Run(run func(ctx context.Context, datacenterID string, serverID string)) *MockClient_GetServer_Call

func (*MockClient_GetServer_Call) RunAndReturn

type MockClient_ListIPBlocks_Call

type MockClient_ListIPBlocks_Call struct {
	*mock.Call
}

MockClient_ListIPBlocks_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListIPBlocks'

func (*MockClient_ListIPBlocks_Call) Return

func (*MockClient_ListIPBlocks_Call) Run

func (*MockClient_ListIPBlocks_Call) RunAndReturn

type MockClient_ListLANs_Call

type MockClient_ListLANs_Call struct {
	*mock.Call
}

MockClient_ListLANs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListLANs'

func (*MockClient_ListLANs_Call) Return

func (*MockClient_ListLANs_Call) Run

func (_c *MockClient_ListLANs_Call) Run(run func(ctx context.Context, datacenterID string)) *MockClient_ListLANs_Call

func (*MockClient_ListLANs_Call) RunAndReturn

type MockClient_ListLabels_Call added in v0.3.0

type MockClient_ListLabels_Call struct {
	*mock.Call
}

MockClient_ListLabels_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListLabels'

func (*MockClient_ListLabels_Call) Return added in v0.3.0

func (*MockClient_ListLabels_Call) Run added in v0.3.0

func (*MockClient_ListLabels_Call) RunAndReturn added in v0.3.0

type MockClient_ListServers_Call

type MockClient_ListServers_Call struct {
	*mock.Call
}

MockClient_ListServers_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListServers'

func (*MockClient_ListServers_Call) Return

func (*MockClient_ListServers_Call) Run

func (_c *MockClient_ListServers_Call) Run(run func(ctx context.Context, datacenterID string)) *MockClient_ListServers_Call

func (*MockClient_ListServers_Call) RunAndReturn

type MockClient_PatchLAN_Call

type MockClient_PatchLAN_Call struct {
	*mock.Call
}

MockClient_PatchLAN_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PatchLAN'

func (*MockClient_PatchLAN_Call) Return

func (*MockClient_PatchLAN_Call) Run

func (_c *MockClient_PatchLAN_Call) Run(run func(ctx context.Context, datacenterID string, lanID string, properties ionoscloud.LanProperties)) *MockClient_PatchLAN_Call

func (*MockClient_PatchLAN_Call) RunAndReturn

type MockClient_PatchNIC_Call

type MockClient_PatchNIC_Call struct {
	*mock.Call
}

MockClient_PatchNIC_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PatchNIC'

func (*MockClient_PatchNIC_Call) Return

func (*MockClient_PatchNIC_Call) Run

func (_c *MockClient_PatchNIC_Call) Run(run func(ctx context.Context, datacenterID string, serverID string, nicID string, properties ionoscloud.NicProperties)) *MockClient_PatchNIC_Call

func (*MockClient_PatchNIC_Call) RunAndReturn

type MockClient_ReserveIPBlock_Call

type MockClient_ReserveIPBlock_Call struct {
	*mock.Call
}

MockClient_ReserveIPBlock_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReserveIPBlock'

func (*MockClient_ReserveIPBlock_Call) Return

func (*MockClient_ReserveIPBlock_Call) Run

func (_c *MockClient_ReserveIPBlock_Call) Run(run func(ctx context.Context, name string, location string, size int32)) *MockClient_ReserveIPBlock_Call

func (*MockClient_ReserveIPBlock_Call) RunAndReturn

type MockClient_StartServer_Call

type MockClient_StartServer_Call struct {
	*mock.Call
}

MockClient_StartServer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'StartServer'

func (*MockClient_StartServer_Call) Return

func (*MockClient_StartServer_Call) Run

func (_c *MockClient_StartServer_Call) Run(run func(ctx context.Context, datacenterID string, serverID string)) *MockClient_StartServer_Call

func (*MockClient_StartServer_Call) RunAndReturn

type MockClient_WaitForRequest_Call

type MockClient_WaitForRequest_Call struct {
	*mock.Call
}

MockClient_WaitForRequest_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WaitForRequest'

func (*MockClient_WaitForRequest_Call) Return

func (*MockClient_WaitForRequest_Call) Run

func (*MockClient_WaitForRequest_Call) RunAndReturn

Jump to

Keyboard shortcuts

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