mock

package
v0.0.0-...-725261d Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClusterServiceMock

type ClusterServiceMock struct {
	// CreateFunc mocks the Create method.
	CreateFunc func(ctx context.Context, cluster provisioning.Cluster) (provisioning.Cluster, error)

	// DeleteByNameFunc mocks the DeleteByName method.
	DeleteByNameFunc func(ctx context.Context, name string) error

	// GetAllFunc mocks the GetAll method.
	GetAllFunc func(ctx context.Context) (provisioning.Clusters, error)

	// GetAllNamesFunc mocks the GetAllNames method.
	GetAllNamesFunc func(ctx context.Context) ([]string, error)

	// GetAllNamesWithFilterFunc mocks the GetAllNamesWithFilter method.
	GetAllNamesWithFilterFunc func(ctx context.Context, filter provisioning.ClusterFilter) ([]string, error)

	// GetAllWithFilterFunc mocks the GetAllWithFilter method.
	GetAllWithFilterFunc func(ctx context.Context, filter provisioning.ClusterFilter) (provisioning.Clusters, error)

	// GetByNameFunc mocks the GetByName method.
	GetByNameFunc func(ctx context.Context, name string) (*provisioning.Cluster, error)

	// GetEndpointFunc mocks the GetEndpoint method.
	GetEndpointFunc func(ctx context.Context, name string) (provisioning.Endpoint, error)

	// GetProvisionerConfigurationArchiveFunc mocks the GetProvisionerConfigurationArchive method.
	GetProvisionerConfigurationArchiveFunc func(ctx context.Context, name string) (io.ReadCloser, int, error)

	// RenameFunc mocks the Rename method.
	RenameFunc func(ctx context.Context, oldName string, newName string) error

	// ResyncInventoryFunc mocks the ResyncInventory method.
	ResyncInventoryFunc func(ctx context.Context) error

	// ResyncInventoryByNameFunc mocks the ResyncInventoryByName method.
	ResyncInventoryByNameFunc func(ctx context.Context, name string) error

	// SetInventorySyncersFunc mocks the SetInventorySyncers method.
	SetInventorySyncersFunc func(inventorySyncers []provisioning.InventorySyncer)

	// UpdateFunc mocks the Update method.
	UpdateFunc func(ctx context.Context, cluster provisioning.Cluster) error

	// UpdateCertificateFunc mocks the UpdateCertificate method.
	UpdateCertificateFunc func(ctx context.Context, name string, certificatePEM string, keyPEM string) error
	// contains filtered or unexported fields
}

ClusterServiceMock is a mock implementation of provisioning.ClusterService.

func TestSomethingThatUsesClusterService(t *testing.T) {

	// make and configure a mocked provisioning.ClusterService
	mockedClusterService := &ClusterServiceMock{
		CreateFunc: func(ctx context.Context, cluster provisioning.Cluster) (provisioning.Cluster, error) {
			panic("mock out the Create method")
		},
		DeleteByNameFunc: func(ctx context.Context, name string) error {
			panic("mock out the DeleteByName method")
		},
		GetAllFunc: func(ctx context.Context) (provisioning.Clusters, error) {
			panic("mock out the GetAll method")
		},
		GetAllNamesFunc: func(ctx context.Context) ([]string, error) {
			panic("mock out the GetAllNames method")
		},
		GetAllNamesWithFilterFunc: func(ctx context.Context, filter provisioning.ClusterFilter) ([]string, error) {
			panic("mock out the GetAllNamesWithFilter method")
		},
		GetAllWithFilterFunc: func(ctx context.Context, filter provisioning.ClusterFilter) (provisioning.Clusters, error) {
			panic("mock out the GetAllWithFilter method")
		},
		GetByNameFunc: func(ctx context.Context, name string) (*provisioning.Cluster, error) {
			panic("mock out the GetByName method")
		},
		GetEndpointFunc: func(ctx context.Context, name string) (provisioning.Endpoint, error) {
			panic("mock out the GetEndpoint method")
		},
		GetProvisionerConfigurationArchiveFunc: func(ctx context.Context, name string) (io.ReadCloser, int, error) {
			panic("mock out the GetProvisionerConfigurationArchive method")
		},
		RenameFunc: func(ctx context.Context, oldName string, newName string) error {
			panic("mock out the Rename method")
		},
		ResyncInventoryFunc: func(ctx context.Context) error {
			panic("mock out the ResyncInventory method")
		},
		ResyncInventoryByNameFunc: func(ctx context.Context, name string) error {
			panic("mock out the ResyncInventoryByName method")
		},
		SetInventorySyncersFunc: func(inventorySyncers []provisioning.InventorySyncer)  {
			panic("mock out the SetInventorySyncers method")
		},
		UpdateFunc: func(ctx context.Context, cluster provisioning.Cluster) error {
			panic("mock out the Update method")
		},
		UpdateCertificateFunc: func(ctx context.Context, name string, certificatePEM string, keyPEM string) error {
			panic("mock out the UpdateCertificate method")
		},
	}

	// use mockedClusterService in code that requires provisioning.ClusterService
	// and then make assertions.

}

func (*ClusterServiceMock) Create

Create calls CreateFunc.

func (*ClusterServiceMock) CreateCalls

func (mock *ClusterServiceMock) CreateCalls() []struct {
	Ctx     context.Context
	Cluster provisioning.Cluster
}

CreateCalls gets all the calls that were made to Create. Check the length with:

len(mockedClusterService.CreateCalls())

func (*ClusterServiceMock) DeleteByName

func (mock *ClusterServiceMock) DeleteByName(ctx context.Context, name string) error

DeleteByName calls DeleteByNameFunc.

func (*ClusterServiceMock) DeleteByNameCalls

func (mock *ClusterServiceMock) DeleteByNameCalls() []struct {
	Ctx  context.Context
	Name string
}

DeleteByNameCalls gets all the calls that were made to DeleteByName. Check the length with:

len(mockedClusterService.DeleteByNameCalls())

func (*ClusterServiceMock) GetAll

GetAll calls GetAllFunc.

func (*ClusterServiceMock) GetAllCalls

func (mock *ClusterServiceMock) GetAllCalls() []struct {
	Ctx context.Context
}

GetAllCalls gets all the calls that were made to GetAll. Check the length with:

len(mockedClusterService.GetAllCalls())

func (*ClusterServiceMock) GetAllNames

func (mock *ClusterServiceMock) GetAllNames(ctx context.Context) ([]string, error)

GetAllNames calls GetAllNamesFunc.

func (*ClusterServiceMock) GetAllNamesCalls

func (mock *ClusterServiceMock) GetAllNamesCalls() []struct {
	Ctx context.Context
}

GetAllNamesCalls gets all the calls that were made to GetAllNames. Check the length with:

len(mockedClusterService.GetAllNamesCalls())

func (*ClusterServiceMock) GetAllNamesWithFilter

func (mock *ClusterServiceMock) GetAllNamesWithFilter(ctx context.Context, filter provisioning.ClusterFilter) ([]string, error)

GetAllNamesWithFilter calls GetAllNamesWithFilterFunc.

func (*ClusterServiceMock) GetAllNamesWithFilterCalls

func (mock *ClusterServiceMock) GetAllNamesWithFilterCalls() []struct {
	Ctx    context.Context
	Filter provisioning.ClusterFilter
}

GetAllNamesWithFilterCalls gets all the calls that were made to GetAllNamesWithFilter. Check the length with:

len(mockedClusterService.GetAllNamesWithFilterCalls())

func (*ClusterServiceMock) GetAllWithFilter

func (mock *ClusterServiceMock) GetAllWithFilter(ctx context.Context, filter provisioning.ClusterFilter) (provisioning.Clusters, error)

GetAllWithFilter calls GetAllWithFilterFunc.

func (*ClusterServiceMock) GetAllWithFilterCalls

func (mock *ClusterServiceMock) GetAllWithFilterCalls() []struct {
	Ctx    context.Context
	Filter provisioning.ClusterFilter
}

GetAllWithFilterCalls gets all the calls that were made to GetAllWithFilter. Check the length with:

len(mockedClusterService.GetAllWithFilterCalls())

func (*ClusterServiceMock) GetByName

func (mock *ClusterServiceMock) GetByName(ctx context.Context, name string) (*provisioning.Cluster, error)

GetByName calls GetByNameFunc.

func (*ClusterServiceMock) GetByNameCalls

func (mock *ClusterServiceMock) GetByNameCalls() []struct {
	Ctx  context.Context
	Name string
}

GetByNameCalls gets all the calls that were made to GetByName. Check the length with:

len(mockedClusterService.GetByNameCalls())

func (*ClusterServiceMock) GetEndpoint

func (mock *ClusterServiceMock) GetEndpoint(ctx context.Context, name string) (provisioning.Endpoint, error)

GetEndpoint calls GetEndpointFunc.

func (*ClusterServiceMock) GetEndpointCalls

func (mock *ClusterServiceMock) GetEndpointCalls() []struct {
	Ctx  context.Context
	Name string
}

GetEndpointCalls gets all the calls that were made to GetEndpoint. Check the length with:

len(mockedClusterService.GetEndpointCalls())

func (*ClusterServiceMock) GetProvisionerConfigurationArchive

func (mock *ClusterServiceMock) GetProvisionerConfigurationArchive(ctx context.Context, name string) (io.ReadCloser, int, error)

GetProvisionerConfigurationArchive calls GetProvisionerConfigurationArchiveFunc.

func (*ClusterServiceMock) GetProvisionerConfigurationArchiveCalls

func (mock *ClusterServiceMock) GetProvisionerConfigurationArchiveCalls() []struct {
	Ctx  context.Context
	Name string
}

GetProvisionerConfigurationArchiveCalls gets all the calls that were made to GetProvisionerConfigurationArchive. Check the length with:

len(mockedClusterService.GetProvisionerConfigurationArchiveCalls())

func (*ClusterServiceMock) Rename

func (mock *ClusterServiceMock) Rename(ctx context.Context, oldName string, newName string) error

Rename calls RenameFunc.

func (*ClusterServiceMock) RenameCalls

func (mock *ClusterServiceMock) RenameCalls() []struct {
	Ctx     context.Context
	OldName string
	NewName string
}

RenameCalls gets all the calls that were made to Rename. Check the length with:

len(mockedClusterService.RenameCalls())

func (*ClusterServiceMock) ResyncInventory

func (mock *ClusterServiceMock) ResyncInventory(ctx context.Context) error

ResyncInventory calls ResyncInventoryFunc.

func (*ClusterServiceMock) ResyncInventoryByName

func (mock *ClusterServiceMock) ResyncInventoryByName(ctx context.Context, name string) error

ResyncInventoryByName calls ResyncInventoryByNameFunc.

func (*ClusterServiceMock) ResyncInventoryByNameCalls

func (mock *ClusterServiceMock) ResyncInventoryByNameCalls() []struct {
	Ctx  context.Context
	Name string
}

ResyncInventoryByNameCalls gets all the calls that were made to ResyncInventoryByName. Check the length with:

len(mockedClusterService.ResyncInventoryByNameCalls())

func (*ClusterServiceMock) ResyncInventoryCalls

func (mock *ClusterServiceMock) ResyncInventoryCalls() []struct {
	Ctx context.Context
}

ResyncInventoryCalls gets all the calls that were made to ResyncInventory. Check the length with:

len(mockedClusterService.ResyncInventoryCalls())

func (*ClusterServiceMock) SetInventorySyncers

func (mock *ClusterServiceMock) SetInventorySyncers(inventorySyncers []provisioning.InventorySyncer)

SetInventorySyncers calls SetInventorySyncersFunc.

func (*ClusterServiceMock) SetInventorySyncersCalls

func (mock *ClusterServiceMock) SetInventorySyncersCalls() []struct {
	InventorySyncers []provisioning.InventorySyncer
}

SetInventorySyncersCalls gets all the calls that were made to SetInventorySyncers. Check the length with:

len(mockedClusterService.SetInventorySyncersCalls())

func (*ClusterServiceMock) Update

func (mock *ClusterServiceMock) Update(ctx context.Context, cluster provisioning.Cluster) error

Update calls UpdateFunc.

func (*ClusterServiceMock) UpdateCalls

func (mock *ClusterServiceMock) UpdateCalls() []struct {
	Ctx     context.Context
	Cluster provisioning.Cluster
}

UpdateCalls gets all the calls that were made to Update. Check the length with:

len(mockedClusterService.UpdateCalls())

func (*ClusterServiceMock) UpdateCertificate

func (mock *ClusterServiceMock) UpdateCertificate(ctx context.Context, name string, certificatePEM string, keyPEM string) error

UpdateCertificate calls UpdateCertificateFunc.

func (*ClusterServiceMock) UpdateCertificateCalls

func (mock *ClusterServiceMock) UpdateCertificateCalls() []struct {
	Ctx            context.Context
	Name           string
	CertificatePEM string
	KeyPEM         string
}

UpdateCertificateCalls gets all the calls that were made to UpdateCertificate. Check the length with:

len(mockedClusterService.UpdateCertificateCalls())

type ClusterTemplateServiceMock

type ClusterTemplateServiceMock struct {
	// CreateFunc mocks the Create method.
	CreateFunc func(ctx context.Context, clusterTemplate provisioning.ClusterTemplate) (provisioning.ClusterTemplate, error)

	// DeleteByNameFunc mocks the DeleteByName method.
	DeleteByNameFunc func(ctx context.Context, name string) error

	// GetAllFunc mocks the GetAll method.
	GetAllFunc func(ctx context.Context) (provisioning.ClusterTemplates, error)

	// GetAllNamesFunc mocks the GetAllNames method.
	GetAllNamesFunc func(ctx context.Context) ([]string, error)

	// GetByNameFunc mocks the GetByName method.
	GetByNameFunc func(ctx context.Context, name string) (*provisioning.ClusterTemplate, error)

	// RenameFunc mocks the Rename method.
	RenameFunc func(ctx context.Context, oldName string, newName string) error

	// UpdateFunc mocks the Update method.
	UpdateFunc func(ctx context.Context, clusterTemplate provisioning.ClusterTemplate) error
	// contains filtered or unexported fields
}

ClusterTemplateServiceMock is a mock implementation of provisioning.ClusterTemplateService.

func TestSomethingThatUsesClusterTemplateService(t *testing.T) {

	// make and configure a mocked provisioning.ClusterTemplateService
	mockedClusterTemplateService := &ClusterTemplateServiceMock{
		CreateFunc: func(ctx context.Context, clusterTemplate provisioning.ClusterTemplate) (provisioning.ClusterTemplate, error) {
			panic("mock out the Create method")
		},
		DeleteByNameFunc: func(ctx context.Context, name string) error {
			panic("mock out the DeleteByName method")
		},
		GetAllFunc: func(ctx context.Context) (provisioning.ClusterTemplates, error) {
			panic("mock out the GetAll method")
		},
		GetAllNamesFunc: func(ctx context.Context) ([]string, error) {
			panic("mock out the GetAllNames method")
		},
		GetByNameFunc: func(ctx context.Context, name string) (*provisioning.ClusterTemplate, error) {
			panic("mock out the GetByName method")
		},
		RenameFunc: func(ctx context.Context, oldName string, newName string) error {
			panic("mock out the Rename method")
		},
		UpdateFunc: func(ctx context.Context, clusterTemplate provisioning.ClusterTemplate) error {
			panic("mock out the Update method")
		},
	}

	// use mockedClusterTemplateService in code that requires provisioning.ClusterTemplateService
	// and then make assertions.

}

func (*ClusterTemplateServiceMock) Create

Create calls CreateFunc.

func (*ClusterTemplateServiceMock) CreateCalls

func (mock *ClusterTemplateServiceMock) CreateCalls() []struct {
	Ctx             context.Context
	ClusterTemplate provisioning.ClusterTemplate
}

CreateCalls gets all the calls that were made to Create. Check the length with:

len(mockedClusterTemplateService.CreateCalls())

func (*ClusterTemplateServiceMock) DeleteByName

func (mock *ClusterTemplateServiceMock) DeleteByName(ctx context.Context, name string) error

DeleteByName calls DeleteByNameFunc.

func (*ClusterTemplateServiceMock) DeleteByNameCalls

func (mock *ClusterTemplateServiceMock) DeleteByNameCalls() []struct {
	Ctx  context.Context
	Name string
}

DeleteByNameCalls gets all the calls that were made to DeleteByName. Check the length with:

len(mockedClusterTemplateService.DeleteByNameCalls())

func (*ClusterTemplateServiceMock) GetAll

GetAll calls GetAllFunc.

func (*ClusterTemplateServiceMock) GetAllCalls

func (mock *ClusterTemplateServiceMock) GetAllCalls() []struct {
	Ctx context.Context
}

GetAllCalls gets all the calls that were made to GetAll. Check the length with:

len(mockedClusterTemplateService.GetAllCalls())

func (*ClusterTemplateServiceMock) GetAllNames

func (mock *ClusterTemplateServiceMock) GetAllNames(ctx context.Context) ([]string, error)

GetAllNames calls GetAllNamesFunc.

func (*ClusterTemplateServiceMock) GetAllNamesCalls

func (mock *ClusterTemplateServiceMock) GetAllNamesCalls() []struct {
	Ctx context.Context
}

GetAllNamesCalls gets all the calls that were made to GetAllNames. Check the length with:

len(mockedClusterTemplateService.GetAllNamesCalls())

func (*ClusterTemplateServiceMock) GetByName

GetByName calls GetByNameFunc.

func (*ClusterTemplateServiceMock) GetByNameCalls

func (mock *ClusterTemplateServiceMock) GetByNameCalls() []struct {
	Ctx  context.Context
	Name string
}

GetByNameCalls gets all the calls that were made to GetByName. Check the length with:

len(mockedClusterTemplateService.GetByNameCalls())

func (*ClusterTemplateServiceMock) Rename

func (mock *ClusterTemplateServiceMock) Rename(ctx context.Context, oldName string, newName string) error

Rename calls RenameFunc.

func (*ClusterTemplateServiceMock) RenameCalls

func (mock *ClusterTemplateServiceMock) RenameCalls() []struct {
	Ctx     context.Context
	OldName string
	NewName string
}

RenameCalls gets all the calls that were made to Rename. Check the length with:

len(mockedClusterTemplateService.RenameCalls())

func (*ClusterTemplateServiceMock) Update

func (mock *ClusterTemplateServiceMock) Update(ctx context.Context, clusterTemplate provisioning.ClusterTemplate) error

Update calls UpdateFunc.

func (*ClusterTemplateServiceMock) UpdateCalls

func (mock *ClusterTemplateServiceMock) UpdateCalls() []struct {
	Ctx             context.Context
	ClusterTemplate provisioning.ClusterTemplate
}

UpdateCalls gets all the calls that were made to Update. Check the length with:

len(mockedClusterTemplateService.UpdateCalls())

type InventorySyncerMock

type InventorySyncerMock struct {
	// SyncClusterFunc mocks the SyncCluster method.
	SyncClusterFunc func(ctx context.Context, cluster string) error
	// contains filtered or unexported fields
}

InventorySyncerMock is a mock implementation of provisioning.InventorySyncer.

func TestSomethingThatUsesInventorySyncer(t *testing.T) {

	// make and configure a mocked provisioning.InventorySyncer
	mockedInventorySyncer := &InventorySyncerMock{
		SyncClusterFunc: func(ctx context.Context, cluster string) error {
			panic("mock out the SyncCluster method")
		},
	}

	// use mockedInventorySyncer in code that requires provisioning.InventorySyncer
	// and then make assertions.

}

func (*InventorySyncerMock) SyncCluster

func (mock *InventorySyncerMock) SyncCluster(ctx context.Context, cluster string) error

SyncCluster calls SyncClusterFunc.

func (*InventorySyncerMock) SyncClusterCalls

func (mock *InventorySyncerMock) SyncClusterCalls() []struct {
	Ctx     context.Context
	Cluster string
}

SyncClusterCalls gets all the calls that were made to SyncCluster. Check the length with:

len(mockedInventorySyncer.SyncClusterCalls())

type ServerServiceMock

type ServerServiceMock struct {
	// CreateFunc mocks the Create method.
	CreateFunc func(ctx context.Context, token uuid.UUID, server provisioning.Server) (provisioning.Server, error)

	// DeleteByNameFunc mocks the DeleteByName method.
	DeleteByNameFunc func(ctx context.Context, name string) error

	// GetAllFunc mocks the GetAll method.
	GetAllFunc func(ctx context.Context) (provisioning.Servers, error)

	// GetAllNamesFunc mocks the GetAllNames method.
	GetAllNamesFunc func(ctx context.Context) ([]string, error)

	// GetAllNamesWithFilterFunc mocks the GetAllNamesWithFilter method.
	GetAllNamesWithFilterFunc func(ctx context.Context, filter provisioning.ServerFilter) ([]string, error)

	// GetAllWithFilterFunc mocks the GetAllWithFilter method.
	GetAllWithFilterFunc func(ctx context.Context, filter provisioning.ServerFilter) (provisioning.Servers, error)

	// GetByNameFunc mocks the GetByName method.
	GetByNameFunc func(ctx context.Context, name string) (*provisioning.Server, error)

	// PollServersFunc mocks the PollServers method.
	PollServersFunc func(ctx context.Context, serverStatus api.ServerStatus, updateServerConfiguration bool) error

	// RenameFunc mocks the Rename method.
	RenameFunc func(ctx context.Context, oldName string, newName string) error

	// SelfUpdateFunc mocks the SelfUpdate method.
	SelfUpdateFunc func(ctx context.Context, serverUpdate provisioning.ServerSelfUpdate) error

	// UpdateFunc mocks the Update method.
	UpdateFunc func(ctx context.Context, server provisioning.Server) error

	// UpdateSystemNetworkFunc mocks the UpdateSystemNetwork method.
	UpdateSystemNetworkFunc func(ctx context.Context, name string, networkConfig provisioning.ServerSystemNetwork) error
	// contains filtered or unexported fields
}

ServerServiceMock is a mock implementation of provisioning.ServerService.

func TestSomethingThatUsesServerService(t *testing.T) {

	// make and configure a mocked provisioning.ServerService
	mockedServerService := &ServerServiceMock{
		CreateFunc: func(ctx context.Context, token uuid.UUID, server provisioning.Server) (provisioning.Server, error) {
			panic("mock out the Create method")
		},
		DeleteByNameFunc: func(ctx context.Context, name string) error {
			panic("mock out the DeleteByName method")
		},
		GetAllFunc: func(ctx context.Context) (provisioning.Servers, error) {
			panic("mock out the GetAll method")
		},
		GetAllNamesFunc: func(ctx context.Context) ([]string, error) {
			panic("mock out the GetAllNames method")
		},
		GetAllNamesWithFilterFunc: func(ctx context.Context, filter provisioning.ServerFilter) ([]string, error) {
			panic("mock out the GetAllNamesWithFilter method")
		},
		GetAllWithFilterFunc: func(ctx context.Context, filter provisioning.ServerFilter) (provisioning.Servers, error) {
			panic("mock out the GetAllWithFilter method")
		},
		GetByNameFunc: func(ctx context.Context, name string) (*provisioning.Server, error) {
			panic("mock out the GetByName method")
		},
		PollServersFunc: func(ctx context.Context, serverStatus api.ServerStatus, updateServerConfiguration bool) error {
			panic("mock out the PollServers method")
		},
		RenameFunc: func(ctx context.Context, oldName string, newName string) error {
			panic("mock out the Rename method")
		},
		SelfUpdateFunc: func(ctx context.Context, serverUpdate provisioning.ServerSelfUpdate) error {
			panic("mock out the SelfUpdate method")
		},
		UpdateFunc: func(ctx context.Context, server provisioning.Server) error {
			panic("mock out the Update method")
		},
		UpdateSystemNetworkFunc: func(ctx context.Context, name string, networkConfig provisioning.ServerSystemNetwork) error {
			panic("mock out the UpdateSystemNetwork method")
		},
	}

	// use mockedServerService in code that requires provisioning.ServerService
	// and then make assertions.

}

func (*ServerServiceMock) Create

func (mock *ServerServiceMock) Create(ctx context.Context, token uuid.UUID, server provisioning.Server) (provisioning.Server, error)

Create calls CreateFunc.

func (*ServerServiceMock) CreateCalls

func (mock *ServerServiceMock) CreateCalls() []struct {
	Ctx    context.Context
	Token  uuid.UUID
	Server provisioning.Server
}

CreateCalls gets all the calls that were made to Create. Check the length with:

len(mockedServerService.CreateCalls())

func (*ServerServiceMock) DeleteByName

func (mock *ServerServiceMock) DeleteByName(ctx context.Context, name string) error

DeleteByName calls DeleteByNameFunc.

func (*ServerServiceMock) DeleteByNameCalls

func (mock *ServerServiceMock) DeleteByNameCalls() []struct {
	Ctx  context.Context
	Name string
}

DeleteByNameCalls gets all the calls that were made to DeleteByName. Check the length with:

len(mockedServerService.DeleteByNameCalls())

func (*ServerServiceMock) GetAll

GetAll calls GetAllFunc.

func (*ServerServiceMock) GetAllCalls

func (mock *ServerServiceMock) GetAllCalls() []struct {
	Ctx context.Context
}

GetAllCalls gets all the calls that were made to GetAll. Check the length with:

len(mockedServerService.GetAllCalls())

func (*ServerServiceMock) GetAllNames

func (mock *ServerServiceMock) GetAllNames(ctx context.Context) ([]string, error)

GetAllNames calls GetAllNamesFunc.

func (*ServerServiceMock) GetAllNamesCalls

func (mock *ServerServiceMock) GetAllNamesCalls() []struct {
	Ctx context.Context
}

GetAllNamesCalls gets all the calls that were made to GetAllNames. Check the length with:

len(mockedServerService.GetAllNamesCalls())

func (*ServerServiceMock) GetAllNamesWithFilter

func (mock *ServerServiceMock) GetAllNamesWithFilter(ctx context.Context, filter provisioning.ServerFilter) ([]string, error)

GetAllNamesWithFilter calls GetAllNamesWithFilterFunc.

func (*ServerServiceMock) GetAllNamesWithFilterCalls

func (mock *ServerServiceMock) GetAllNamesWithFilterCalls() []struct {
	Ctx    context.Context
	Filter provisioning.ServerFilter
}

GetAllNamesWithFilterCalls gets all the calls that were made to GetAllNamesWithFilter. Check the length with:

len(mockedServerService.GetAllNamesWithFilterCalls())

func (*ServerServiceMock) GetAllWithFilter

func (mock *ServerServiceMock) GetAllWithFilter(ctx context.Context, filter provisioning.ServerFilter) (provisioning.Servers, error)

GetAllWithFilter calls GetAllWithFilterFunc.

func (*ServerServiceMock) GetAllWithFilterCalls

func (mock *ServerServiceMock) GetAllWithFilterCalls() []struct {
	Ctx    context.Context
	Filter provisioning.ServerFilter
}

GetAllWithFilterCalls gets all the calls that were made to GetAllWithFilter. Check the length with:

len(mockedServerService.GetAllWithFilterCalls())

func (*ServerServiceMock) GetByName

func (mock *ServerServiceMock) GetByName(ctx context.Context, name string) (*provisioning.Server, error)

GetByName calls GetByNameFunc.

func (*ServerServiceMock) GetByNameCalls

func (mock *ServerServiceMock) GetByNameCalls() []struct {
	Ctx  context.Context
	Name string
}

GetByNameCalls gets all the calls that were made to GetByName. Check the length with:

len(mockedServerService.GetByNameCalls())

func (*ServerServiceMock) PollServers

func (mock *ServerServiceMock) PollServers(ctx context.Context, serverStatus api.ServerStatus, updateServerConfiguration bool) error

PollServers calls PollServersFunc.

func (*ServerServiceMock) PollServersCalls

func (mock *ServerServiceMock) PollServersCalls() []struct {
	Ctx                       context.Context
	ServerStatus              api.ServerStatus
	UpdateServerConfiguration bool
}

PollServersCalls gets all the calls that were made to PollServers. Check the length with:

len(mockedServerService.PollServersCalls())

func (*ServerServiceMock) Rename

func (mock *ServerServiceMock) Rename(ctx context.Context, oldName string, newName string) error

Rename calls RenameFunc.

func (*ServerServiceMock) RenameCalls

func (mock *ServerServiceMock) RenameCalls() []struct {
	Ctx     context.Context
	OldName string
	NewName string
}

RenameCalls gets all the calls that were made to Rename. Check the length with:

len(mockedServerService.RenameCalls())

func (*ServerServiceMock) SelfUpdate

func (mock *ServerServiceMock) SelfUpdate(ctx context.Context, serverUpdate provisioning.ServerSelfUpdate) error

SelfUpdate calls SelfUpdateFunc.

func (*ServerServiceMock) SelfUpdateCalls

func (mock *ServerServiceMock) SelfUpdateCalls() []struct {
	Ctx          context.Context
	ServerUpdate provisioning.ServerSelfUpdate
}

SelfUpdateCalls gets all the calls that were made to SelfUpdate. Check the length with:

len(mockedServerService.SelfUpdateCalls())

func (*ServerServiceMock) Update

func (mock *ServerServiceMock) Update(ctx context.Context, server provisioning.Server) error

Update calls UpdateFunc.

func (*ServerServiceMock) UpdateCalls

func (mock *ServerServiceMock) UpdateCalls() []struct {
	Ctx    context.Context
	Server provisioning.Server
}

UpdateCalls gets all the calls that were made to Update. Check the length with:

len(mockedServerService.UpdateCalls())

func (*ServerServiceMock) UpdateSystemNetwork

func (mock *ServerServiceMock) UpdateSystemNetwork(ctx context.Context, name string, networkConfig provisioning.ServerSystemNetwork) error

UpdateSystemNetwork calls UpdateSystemNetworkFunc.

func (*ServerServiceMock) UpdateSystemNetworkCalls

func (mock *ServerServiceMock) UpdateSystemNetworkCalls() []struct {
	Ctx           context.Context
	Name          string
	NetworkConfig provisioning.ServerSystemNetwork
}

UpdateSystemNetworkCalls gets all the calls that were made to UpdateSystemNetwork. Check the length with:

len(mockedServerService.UpdateSystemNetworkCalls())

type TokenServiceMock

type TokenServiceMock struct {
	// ConsumeFunc mocks the Consume method.
	ConsumeFunc func(ctx context.Context, id uuid.UUID) error

	// CreateFunc mocks the Create method.
	CreateFunc func(ctx context.Context, token provisioning.Token) (provisioning.Token, error)

	// CreateTokenSeedFunc mocks the CreateTokenSeed method.
	CreateTokenSeedFunc func(ctx context.Context, tokenSeedConfig provisioning.TokenSeed) (provisioning.TokenSeed, error)

	// DeleteByUUIDFunc mocks the DeleteByUUID method.
	DeleteByUUIDFunc func(ctx context.Context, id uuid.UUID) error

	// DeleteTokenSeedByNameFunc mocks the DeleteTokenSeedByName method.
	DeleteTokenSeedByNameFunc func(ctx context.Context, id uuid.UUID, name string) error

	// GetAllFunc mocks the GetAll method.
	GetAllFunc func(ctx context.Context) (provisioning.Tokens, error)

	// GetAllUUIDsFunc mocks the GetAllUUIDs method.
	GetAllUUIDsFunc func(ctx context.Context) ([]uuid.UUID, error)

	// GetByUUIDFunc mocks the GetByUUID method.
	GetByUUIDFunc func(ctx context.Context, id uuid.UUID) (*provisioning.Token, error)

	// GetPreSeedImageFunc mocks the GetPreSeedImage method.
	GetPreSeedImageFunc func(ctx context.Context, id uuid.UUID, imageType api.ImageType, architecture api.Architecture, seedConfig provisioning.TokenImageSeedConfigs) (io.ReadCloser, error)

	// GetTokenImageFromTokenSeedFunc mocks the GetTokenImageFromTokenSeed method.
	GetTokenImageFromTokenSeedFunc func(ctx context.Context, id uuid.UUID, name string, imageType api.ImageType, architecture api.Architecture) (io.ReadCloser, error)

	// GetTokenSeedAllFunc mocks the GetTokenSeedAll method.
	GetTokenSeedAllFunc func(ctx context.Context, id uuid.UUID) (provisioning.TokenSeeds, error)

	// GetTokenSeedAllNamesFunc mocks the GetTokenSeedAllNames method.
	GetTokenSeedAllNamesFunc func(ctx context.Context, id uuid.UUID) ([]string, error)

	// GetTokenSeedByNameFunc mocks the GetTokenSeedByName method.
	GetTokenSeedByNameFunc func(ctx context.Context, id uuid.UUID, name string) (*provisioning.TokenSeed, error)

	// UpdateFunc mocks the Update method.
	UpdateFunc func(ctx context.Context, token provisioning.Token) error

	// UpdateTokenSeedFunc mocks the UpdateTokenSeed method.
	UpdateTokenSeedFunc func(ctx context.Context, tokenSeed provisioning.TokenSeed) error
	// contains filtered or unexported fields
}

TokenServiceMock is a mock implementation of provisioning.TokenService.

func TestSomethingThatUsesTokenService(t *testing.T) {

	// make and configure a mocked provisioning.TokenService
	mockedTokenService := &TokenServiceMock{
		ConsumeFunc: func(ctx context.Context, id uuid.UUID) error {
			panic("mock out the Consume method")
		},
		CreateFunc: func(ctx context.Context, token provisioning.Token) (provisioning.Token, error) {
			panic("mock out the Create method")
		},
		CreateTokenSeedFunc: func(ctx context.Context, tokenSeedConfig provisioning.TokenSeed) (provisioning.TokenSeed, error) {
			panic("mock out the CreateTokenSeed method")
		},
		DeleteByUUIDFunc: func(ctx context.Context, id uuid.UUID) error {
			panic("mock out the DeleteByUUID method")
		},
		DeleteTokenSeedByNameFunc: func(ctx context.Context, id uuid.UUID, name string) error {
			panic("mock out the DeleteTokenSeedByName method")
		},
		GetAllFunc: func(ctx context.Context) (provisioning.Tokens, error) {
			panic("mock out the GetAll method")
		},
		GetAllUUIDsFunc: func(ctx context.Context) ([]uuid.UUID, error) {
			panic("mock out the GetAllUUIDs method")
		},
		GetByUUIDFunc: func(ctx context.Context, id uuid.UUID) (*provisioning.Token, error) {
			panic("mock out the GetByUUID method")
		},
		GetPreSeedImageFunc: func(ctx context.Context, id uuid.UUID, imageType api.ImageType, architecture api.Architecture, seedConfig provisioning.TokenImageSeedConfigs) (io.ReadCloser, error) {
			panic("mock out the GetPreSeedImage method")
		},
		GetTokenImageFromTokenSeedFunc: func(ctx context.Context, id uuid.UUID, name string, imageType api.ImageType, architecture api.Architecture) (io.ReadCloser, error) {
			panic("mock out the GetTokenImageFromTokenSeed method")
		},
		GetTokenSeedAllFunc: func(ctx context.Context, id uuid.UUID) (provisioning.TokenSeeds, error) {
			panic("mock out the GetTokenSeedAll method")
		},
		GetTokenSeedAllNamesFunc: func(ctx context.Context, id uuid.UUID) ([]string, error) {
			panic("mock out the GetTokenSeedAllNames method")
		},
		GetTokenSeedByNameFunc: func(ctx context.Context, id uuid.UUID, name string) (*provisioning.TokenSeed, error) {
			panic("mock out the GetTokenSeedByName method")
		},
		UpdateFunc: func(ctx context.Context, token provisioning.Token) error {
			panic("mock out the Update method")
		},
		UpdateTokenSeedFunc: func(ctx context.Context, tokenSeed provisioning.TokenSeed) error {
			panic("mock out the UpdateTokenSeed method")
		},
	}

	// use mockedTokenService in code that requires provisioning.TokenService
	// and then make assertions.

}

func (*TokenServiceMock) Consume

func (mock *TokenServiceMock) Consume(ctx context.Context, id uuid.UUID) error

Consume calls ConsumeFunc.

func (*TokenServiceMock) ConsumeCalls

func (mock *TokenServiceMock) ConsumeCalls() []struct {
	Ctx context.Context
	ID  uuid.UUID
}

ConsumeCalls gets all the calls that were made to Consume. Check the length with:

len(mockedTokenService.ConsumeCalls())

func (*TokenServiceMock) Create

Create calls CreateFunc.

func (*TokenServiceMock) CreateCalls

func (mock *TokenServiceMock) CreateCalls() []struct {
	Ctx   context.Context
	Token provisioning.Token
}

CreateCalls gets all the calls that were made to Create. Check the length with:

len(mockedTokenService.CreateCalls())

func (*TokenServiceMock) CreateTokenSeed

func (mock *TokenServiceMock) CreateTokenSeed(ctx context.Context, tokenSeedConfig provisioning.TokenSeed) (provisioning.TokenSeed, error)

CreateTokenSeed calls CreateTokenSeedFunc.

func (*TokenServiceMock) CreateTokenSeedCalls

func (mock *TokenServiceMock) CreateTokenSeedCalls() []struct {
	Ctx             context.Context
	TokenSeedConfig provisioning.TokenSeed
}

CreateTokenSeedCalls gets all the calls that were made to CreateTokenSeed. Check the length with:

len(mockedTokenService.CreateTokenSeedCalls())

func (*TokenServiceMock) DeleteByUUID

func (mock *TokenServiceMock) DeleteByUUID(ctx context.Context, id uuid.UUID) error

DeleteByUUID calls DeleteByUUIDFunc.

func (*TokenServiceMock) DeleteByUUIDCalls

func (mock *TokenServiceMock) DeleteByUUIDCalls() []struct {
	Ctx context.Context
	ID  uuid.UUID
}

DeleteByUUIDCalls gets all the calls that were made to DeleteByUUID. Check the length with:

len(mockedTokenService.DeleteByUUIDCalls())

func (*TokenServiceMock) DeleteTokenSeedByName

func (mock *TokenServiceMock) DeleteTokenSeedByName(ctx context.Context, id uuid.UUID, name string) error

DeleteTokenSeedByName calls DeleteTokenSeedByNameFunc.

func (*TokenServiceMock) DeleteTokenSeedByNameCalls

func (mock *TokenServiceMock) DeleteTokenSeedByNameCalls() []struct {
	Ctx  context.Context
	ID   uuid.UUID
	Name string
}

DeleteTokenSeedByNameCalls gets all the calls that were made to DeleteTokenSeedByName. Check the length with:

len(mockedTokenService.DeleteTokenSeedByNameCalls())

func (*TokenServiceMock) GetAll

GetAll calls GetAllFunc.

func (*TokenServiceMock) GetAllCalls

func (mock *TokenServiceMock) GetAllCalls() []struct {
	Ctx context.Context
}

GetAllCalls gets all the calls that were made to GetAll. Check the length with:

len(mockedTokenService.GetAllCalls())

func (*TokenServiceMock) GetAllUUIDs

func (mock *TokenServiceMock) GetAllUUIDs(ctx context.Context) ([]uuid.UUID, error)

GetAllUUIDs calls GetAllUUIDsFunc.

func (*TokenServiceMock) GetAllUUIDsCalls

func (mock *TokenServiceMock) GetAllUUIDsCalls() []struct {
	Ctx context.Context
}

GetAllUUIDsCalls gets all the calls that were made to GetAllUUIDs. Check the length with:

len(mockedTokenService.GetAllUUIDsCalls())

func (*TokenServiceMock) GetByUUID

func (mock *TokenServiceMock) GetByUUID(ctx context.Context, id uuid.UUID) (*provisioning.Token, error)

GetByUUID calls GetByUUIDFunc.

func (*TokenServiceMock) GetByUUIDCalls

func (mock *TokenServiceMock) GetByUUIDCalls() []struct {
	Ctx context.Context
	ID  uuid.UUID
}

GetByUUIDCalls gets all the calls that were made to GetByUUID. Check the length with:

len(mockedTokenService.GetByUUIDCalls())

func (*TokenServiceMock) GetPreSeedImage

func (mock *TokenServiceMock) GetPreSeedImage(ctx context.Context, id uuid.UUID, imageType api.ImageType, architecture api.Architecture, seedConfig provisioning.TokenImageSeedConfigs) (io.ReadCloser, error)

GetPreSeedImage calls GetPreSeedImageFunc.

func (*TokenServiceMock) GetPreSeedImageCalls

func (mock *TokenServiceMock) GetPreSeedImageCalls() []struct {
	Ctx          context.Context
	ID           uuid.UUID
	ImageType    api.ImageType
	Architecture api.Architecture
	SeedConfig   provisioning.TokenImageSeedConfigs
}

GetPreSeedImageCalls gets all the calls that were made to GetPreSeedImage. Check the length with:

len(mockedTokenService.GetPreSeedImageCalls())

func (*TokenServiceMock) GetTokenImageFromTokenSeed

func (mock *TokenServiceMock) GetTokenImageFromTokenSeed(ctx context.Context, id uuid.UUID, name string, imageType api.ImageType, architecture api.Architecture) (io.ReadCloser, error)

GetTokenImageFromTokenSeed calls GetTokenImageFromTokenSeedFunc.

func (*TokenServiceMock) GetTokenImageFromTokenSeedCalls

func (mock *TokenServiceMock) GetTokenImageFromTokenSeedCalls() []struct {
	Ctx          context.Context
	ID           uuid.UUID
	Name         string
	ImageType    api.ImageType
	Architecture api.Architecture
}

GetTokenImageFromTokenSeedCalls gets all the calls that were made to GetTokenImageFromTokenSeed. Check the length with:

len(mockedTokenService.GetTokenImageFromTokenSeedCalls())

func (*TokenServiceMock) GetTokenSeedAll

func (mock *TokenServiceMock) GetTokenSeedAll(ctx context.Context, id uuid.UUID) (provisioning.TokenSeeds, error)

GetTokenSeedAll calls GetTokenSeedAllFunc.

func (*TokenServiceMock) GetTokenSeedAllCalls

func (mock *TokenServiceMock) GetTokenSeedAllCalls() []struct {
	Ctx context.Context
	ID  uuid.UUID
}

GetTokenSeedAllCalls gets all the calls that were made to GetTokenSeedAll. Check the length with:

len(mockedTokenService.GetTokenSeedAllCalls())

func (*TokenServiceMock) GetTokenSeedAllNames

func (mock *TokenServiceMock) GetTokenSeedAllNames(ctx context.Context, id uuid.UUID) ([]string, error)

GetTokenSeedAllNames calls GetTokenSeedAllNamesFunc.

func (*TokenServiceMock) GetTokenSeedAllNamesCalls

func (mock *TokenServiceMock) GetTokenSeedAllNamesCalls() []struct {
	Ctx context.Context
	ID  uuid.UUID
}

GetTokenSeedAllNamesCalls gets all the calls that were made to GetTokenSeedAllNames. Check the length with:

len(mockedTokenService.GetTokenSeedAllNamesCalls())

func (*TokenServiceMock) GetTokenSeedByName

func (mock *TokenServiceMock) GetTokenSeedByName(ctx context.Context, id uuid.UUID, name string) (*provisioning.TokenSeed, error)

GetTokenSeedByName calls GetTokenSeedByNameFunc.

func (*TokenServiceMock) GetTokenSeedByNameCalls

func (mock *TokenServiceMock) GetTokenSeedByNameCalls() []struct {
	Ctx  context.Context
	ID   uuid.UUID
	Name string
}

GetTokenSeedByNameCalls gets all the calls that were made to GetTokenSeedByName. Check the length with:

len(mockedTokenService.GetTokenSeedByNameCalls())

func (*TokenServiceMock) Update

func (mock *TokenServiceMock) Update(ctx context.Context, token provisioning.Token) error

Update calls UpdateFunc.

func (*TokenServiceMock) UpdateCalls

func (mock *TokenServiceMock) UpdateCalls() []struct {
	Ctx   context.Context
	Token provisioning.Token
}

UpdateCalls gets all the calls that were made to Update. Check the length with:

len(mockedTokenService.UpdateCalls())

func (*TokenServiceMock) UpdateTokenSeed

func (mock *TokenServiceMock) UpdateTokenSeed(ctx context.Context, tokenSeed provisioning.TokenSeed) error

UpdateTokenSeed calls UpdateTokenSeedFunc.

func (*TokenServiceMock) UpdateTokenSeedCalls

func (mock *TokenServiceMock) UpdateTokenSeedCalls() []struct {
	Ctx       context.Context
	TokenSeed provisioning.TokenSeed
}

UpdateTokenSeedCalls gets all the calls that were made to UpdateTokenSeed. Check the length with:

len(mockedTokenService.UpdateTokenSeedCalls())

type UpdateServiceMock

type UpdateServiceMock struct {
	// CleanupAllFunc mocks the CleanupAll method.
	CleanupAllFunc func(ctx context.Context) error

	// CreateFromArchiveFunc mocks the CreateFromArchive method.
	CreateFromArchiveFunc func(ctx context.Context, tarReader *tar.Reader) (uuid.UUID, error)

	// GetAllFunc mocks the GetAll method.
	GetAllFunc func(ctx context.Context) (provisioning.Updates, error)

	// GetAllUUIDsFunc mocks the GetAllUUIDs method.
	GetAllUUIDsFunc func(ctx context.Context) ([]uuid.UUID, error)

	// GetAllUUIDsWithFilterFunc mocks the GetAllUUIDsWithFilter method.
	GetAllUUIDsWithFilterFunc func(ctx context.Context, filter provisioning.UpdateFilter) ([]uuid.UUID, error)

	// GetAllWithFilterFunc mocks the GetAllWithFilter method.
	GetAllWithFilterFunc func(ctx context.Context, filter provisioning.UpdateFilter) (provisioning.Updates, error)

	// GetByUUIDFunc mocks the GetByUUID method.
	GetByUUIDFunc func(ctx context.Context, id uuid.UUID) (*provisioning.Update, error)

	// GetUpdateAllFilesFunc mocks the GetUpdateAllFiles method.
	GetUpdateAllFilesFunc func(ctx context.Context, id uuid.UUID) (provisioning.UpdateFiles, error)

	// GetUpdateFileByFilenameFunc mocks the GetUpdateFileByFilename method.
	GetUpdateFileByFilenameFunc func(ctx context.Context, id uuid.UUID, filename string) (io.ReadCloser, int, error)

	// RefreshFunc mocks the Refresh method.
	RefreshFunc func(ctx context.Context) error
	// contains filtered or unexported fields
}

UpdateServiceMock is a mock implementation of provisioning.UpdateService.

func TestSomethingThatUsesUpdateService(t *testing.T) {

	// make and configure a mocked provisioning.UpdateService
	mockedUpdateService := &UpdateServiceMock{
		CleanupAllFunc: func(ctx context.Context) error {
			panic("mock out the CleanupAll method")
		},
		CreateFromArchiveFunc: func(ctx context.Context, tarReader *tar.Reader) (uuid.UUID, error) {
			panic("mock out the CreateFromArchive method")
		},
		GetAllFunc: func(ctx context.Context) (provisioning.Updates, error) {
			panic("mock out the GetAll method")
		},
		GetAllUUIDsFunc: func(ctx context.Context) ([]uuid.UUID, error) {
			panic("mock out the GetAllUUIDs method")
		},
		GetAllUUIDsWithFilterFunc: func(ctx context.Context, filter provisioning.UpdateFilter) ([]uuid.UUID, error) {
			panic("mock out the GetAllUUIDsWithFilter method")
		},
		GetAllWithFilterFunc: func(ctx context.Context, filter provisioning.UpdateFilter) (provisioning.Updates, error) {
			panic("mock out the GetAllWithFilter method")
		},
		GetByUUIDFunc: func(ctx context.Context, id uuid.UUID) (*provisioning.Update, error) {
			panic("mock out the GetByUUID method")
		},
		GetUpdateAllFilesFunc: func(ctx context.Context, id uuid.UUID) (provisioning.UpdateFiles, error) {
			panic("mock out the GetUpdateAllFiles method")
		},
		GetUpdateFileByFilenameFunc: func(ctx context.Context, id uuid.UUID, filename string) (io.ReadCloser, int, error) {
			panic("mock out the GetUpdateFileByFilename method")
		},
		RefreshFunc: func(ctx context.Context) error {
			panic("mock out the Refresh method")
		},
	}

	// use mockedUpdateService in code that requires provisioning.UpdateService
	// and then make assertions.

}

func (*UpdateServiceMock) CleanupAll

func (mock *UpdateServiceMock) CleanupAll(ctx context.Context) error

CleanupAll calls CleanupAllFunc.

func (*UpdateServiceMock) CleanupAllCalls

func (mock *UpdateServiceMock) CleanupAllCalls() []struct {
	Ctx context.Context
}

CleanupAllCalls gets all the calls that were made to CleanupAll. Check the length with:

len(mockedUpdateService.CleanupAllCalls())

func (*UpdateServiceMock) CreateFromArchive

func (mock *UpdateServiceMock) CreateFromArchive(ctx context.Context, tarReader *tar.Reader) (uuid.UUID, error)

CreateFromArchive calls CreateFromArchiveFunc.

func (*UpdateServiceMock) CreateFromArchiveCalls

func (mock *UpdateServiceMock) CreateFromArchiveCalls() []struct {
	Ctx       context.Context
	TarReader *tar.Reader
}

CreateFromArchiveCalls gets all the calls that were made to CreateFromArchive. Check the length with:

len(mockedUpdateService.CreateFromArchiveCalls())

func (*UpdateServiceMock) GetAll

GetAll calls GetAllFunc.

func (*UpdateServiceMock) GetAllCalls

func (mock *UpdateServiceMock) GetAllCalls() []struct {
	Ctx context.Context
}

GetAllCalls gets all the calls that were made to GetAll. Check the length with:

len(mockedUpdateService.GetAllCalls())

func (*UpdateServiceMock) GetAllUUIDs

func (mock *UpdateServiceMock) GetAllUUIDs(ctx context.Context) ([]uuid.UUID, error)

GetAllUUIDs calls GetAllUUIDsFunc.

func (*UpdateServiceMock) GetAllUUIDsCalls

func (mock *UpdateServiceMock) GetAllUUIDsCalls() []struct {
	Ctx context.Context
}

GetAllUUIDsCalls gets all the calls that were made to GetAllUUIDs. Check the length with:

len(mockedUpdateService.GetAllUUIDsCalls())

func (*UpdateServiceMock) GetAllUUIDsWithFilter

func (mock *UpdateServiceMock) GetAllUUIDsWithFilter(ctx context.Context, filter provisioning.UpdateFilter) ([]uuid.UUID, error)

GetAllUUIDsWithFilter calls GetAllUUIDsWithFilterFunc.

func (*UpdateServiceMock) GetAllUUIDsWithFilterCalls

func (mock *UpdateServiceMock) GetAllUUIDsWithFilterCalls() []struct {
	Ctx    context.Context
	Filter provisioning.UpdateFilter
}

GetAllUUIDsWithFilterCalls gets all the calls that were made to GetAllUUIDsWithFilter. Check the length with:

len(mockedUpdateService.GetAllUUIDsWithFilterCalls())

func (*UpdateServiceMock) GetAllWithFilter

func (mock *UpdateServiceMock) GetAllWithFilter(ctx context.Context, filter provisioning.UpdateFilter) (provisioning.Updates, error)

GetAllWithFilter calls GetAllWithFilterFunc.

func (*UpdateServiceMock) GetAllWithFilterCalls

func (mock *UpdateServiceMock) GetAllWithFilterCalls() []struct {
	Ctx    context.Context
	Filter provisioning.UpdateFilter
}

GetAllWithFilterCalls gets all the calls that were made to GetAllWithFilter. Check the length with:

len(mockedUpdateService.GetAllWithFilterCalls())

func (*UpdateServiceMock) GetByUUID

func (mock *UpdateServiceMock) GetByUUID(ctx context.Context, id uuid.UUID) (*provisioning.Update, error)

GetByUUID calls GetByUUIDFunc.

func (*UpdateServiceMock) GetByUUIDCalls

func (mock *UpdateServiceMock) GetByUUIDCalls() []struct {
	Ctx context.Context
	ID  uuid.UUID
}

GetByUUIDCalls gets all the calls that were made to GetByUUID. Check the length with:

len(mockedUpdateService.GetByUUIDCalls())

func (*UpdateServiceMock) GetUpdateAllFiles

func (mock *UpdateServiceMock) GetUpdateAllFiles(ctx context.Context, id uuid.UUID) (provisioning.UpdateFiles, error)

GetUpdateAllFiles calls GetUpdateAllFilesFunc.

func (*UpdateServiceMock) GetUpdateAllFilesCalls

func (mock *UpdateServiceMock) GetUpdateAllFilesCalls() []struct {
	Ctx context.Context
	ID  uuid.UUID
}

GetUpdateAllFilesCalls gets all the calls that were made to GetUpdateAllFiles. Check the length with:

len(mockedUpdateService.GetUpdateAllFilesCalls())

func (*UpdateServiceMock) GetUpdateFileByFilename

func (mock *UpdateServiceMock) GetUpdateFileByFilename(ctx context.Context, id uuid.UUID, filename string) (io.ReadCloser, int, error)

GetUpdateFileByFilename calls GetUpdateFileByFilenameFunc.

func (*UpdateServiceMock) GetUpdateFileByFilenameCalls

func (mock *UpdateServiceMock) GetUpdateFileByFilenameCalls() []struct {
	Ctx      context.Context
	ID       uuid.UUID
	Filename string
}

GetUpdateFileByFilenameCalls gets all the calls that were made to GetUpdateFileByFilename. Check the length with:

len(mockedUpdateService.GetUpdateFileByFilenameCalls())

func (*UpdateServiceMock) Refresh

func (mock *UpdateServiceMock) Refresh(ctx context.Context) error

Refresh calls RefreshFunc.

func (*UpdateServiceMock) RefreshCalls

func (mock *UpdateServiceMock) RefreshCalls() []struct {
	Ctx context.Context
}

RefreshCalls gets all the calls that were made to Refresh. Check the length with:

len(mockedUpdateService.RefreshCalls())

Jump to

Keyboard shortcuts

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