mocks

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AgentService_AlgoClient added in v0.4.0

type AgentService_AlgoClient struct {
	mock.Mock
}

AgentService_AlgoClient is an autogenerated mock type for the AgentService_AlgoClient type

func NewAgentService_AlgoClient added in v0.4.0

func NewAgentService_AlgoClient(t interface {
	mock.TestingT
	Cleanup(func())
}) *AgentService_AlgoClient

NewAgentService_AlgoClient creates a new instance of AgentService_AlgoClient. 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 (*AgentService_AlgoClient) CloseAndRecv added in v0.4.0

func (_m *AgentService_AlgoClient) CloseAndRecv() (*agent.AlgoResponse, error)

CloseAndRecv provides a mock function with given fields:

func (*AgentService_AlgoClient) CloseSend added in v0.4.0

func (_m *AgentService_AlgoClient) CloseSend() error

CloseSend provides a mock function with given fields:

func (*AgentService_AlgoClient) Context added in v0.4.0

func (_m *AgentService_AlgoClient) Context() context.Context

Context provides a mock function with given fields:

func (*AgentService_AlgoClient) Header added in v0.4.0

func (_m *AgentService_AlgoClient) Header() (metadata.MD, error)

Header provides a mock function with given fields:

func (*AgentService_AlgoClient) RecvMsg added in v0.4.0

func (_m *AgentService_AlgoClient) RecvMsg(m interface{}) error

RecvMsg provides a mock function with given fields: m

func (*AgentService_AlgoClient) Send added in v0.4.0

Send provides a mock function with given fields: _a0

func (*AgentService_AlgoClient) SendMsg added in v0.4.0

func (_m *AgentService_AlgoClient) SendMsg(m interface{}) error

SendMsg provides a mock function with given fields: m

func (*AgentService_AlgoClient) Trailer added in v0.4.0

func (_m *AgentService_AlgoClient) Trailer() metadata.MD

Trailer provides a mock function with given fields:

type AgentService_DataClient added in v0.4.0

type AgentService_DataClient struct {
	mock.Mock
}

AgentService_DataClient is an autogenerated mock type for the AgentService_DataClient type

func NewAgentService_DataClient added in v0.4.0

func NewAgentService_DataClient(t interface {
	mock.TestingT
	Cleanup(func())
}) *AgentService_DataClient

NewAgentService_DataClient creates a new instance of AgentService_DataClient. 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 (*AgentService_DataClient) CloseAndRecv added in v0.4.0

func (_m *AgentService_DataClient) CloseAndRecv() (*agent.DataResponse, error)

CloseAndRecv provides a mock function with given fields:

func (*AgentService_DataClient) CloseSend added in v0.4.0

func (_m *AgentService_DataClient) CloseSend() error

CloseSend provides a mock function with given fields:

func (*AgentService_DataClient) Context added in v0.4.0

func (_m *AgentService_DataClient) Context() context.Context

Context provides a mock function with given fields:

func (*AgentService_DataClient) Header added in v0.4.0

func (_m *AgentService_DataClient) Header() (metadata.MD, error)

Header provides a mock function with given fields:

func (*AgentService_DataClient) RecvMsg added in v0.4.0

func (_m *AgentService_DataClient) RecvMsg(m interface{}) error

RecvMsg provides a mock function with given fields: m

func (*AgentService_DataClient) Send added in v0.4.0

Send provides a mock function with given fields: _a0

func (*AgentService_DataClient) SendMsg added in v0.4.0

func (_m *AgentService_DataClient) SendMsg(m interface{}) error

SendMsg provides a mock function with given fields: m

func (*AgentService_DataClient) Trailer added in v0.4.0

func (_m *AgentService_DataClient) Trailer() metadata.MD

Trailer provides a mock function with given fields:

type Service

type Service struct {
	mock.Mock
}

Service is an autogenerated mock type for the Service type

func NewService

func NewService(t interface {
	mock.TestingT
	Cleanup(func())
}) *Service

NewService creates a new instance of Service. 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 (*Service) Algo

func (_m *Service) Algo(ctx context.Context, algorithm agent.Algorithm) error

Algo provides a mock function with given fields: ctx, algorithm

func (*Service) Attestation

func (_m *Service) Attestation(ctx context.Context, reportData [64]byte, nonce [32]byte, attType config.AttestationType) ([]byte, error)

Attestation provides a mock function with given fields: ctx, reportData, nonce, attType

func (*Service) Data

func (_m *Service) Data(ctx context.Context, dataset agent.Dataset) error

Data provides a mock function with given fields: ctx, dataset

func (*Service) EXPECT added in v0.4.0

func (_m *Service) EXPECT() *Service_Expecter

func (*Service) InitComputation added in v0.5.0

func (_m *Service) InitComputation(ctx context.Context, cmp agent.Computation) error

InitComputation provides a mock function with given fields: ctx, cmp

func (*Service) Result

func (_m *Service) Result(ctx context.Context) ([]byte, error)

Result provides a mock function with given fields: ctx

func (*Service) State added in v0.5.0

func (_m *Service) State() string

State provides a mock function with given fields:

func (*Service) StopComputation added in v0.5.0

func (_m *Service) StopComputation(ctx context.Context) error

StopComputation provides a mock function with given fields: ctx

type Service_Algo_Call added in v0.4.0

type Service_Algo_Call struct {
	*mock.Call
}

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

func (*Service_Algo_Call) Return added in v0.4.0

func (_c *Service_Algo_Call) Return(_a0 error) *Service_Algo_Call

func (*Service_Algo_Call) Run added in v0.4.0

func (_c *Service_Algo_Call) Run(run func(ctx context.Context, algorithm agent.Algorithm)) *Service_Algo_Call

func (*Service_Algo_Call) RunAndReturn added in v0.4.0

func (_c *Service_Algo_Call) RunAndReturn(run func(context.Context, agent.Algorithm) error) *Service_Algo_Call

type Service_Attestation_Call added in v0.4.0

type Service_Attestation_Call struct {
	*mock.Call
}

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

func (*Service_Attestation_Call) Return added in v0.4.0

func (*Service_Attestation_Call) Run added in v0.4.0

func (_c *Service_Attestation_Call) Run(run func(ctx context.Context, reportData [64]byte, nonce [32]byte, attType config.AttestationType)) *Service_Attestation_Call

func (*Service_Attestation_Call) RunAndReturn added in v0.4.0

type Service_Data_Call added in v0.4.0

type Service_Data_Call struct {
	*mock.Call
}

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

func (*Service_Data_Call) Return added in v0.4.0

func (_c *Service_Data_Call) Return(_a0 error) *Service_Data_Call

func (*Service_Data_Call) Run added in v0.4.0

func (_c *Service_Data_Call) Run(run func(ctx context.Context, dataset agent.Dataset)) *Service_Data_Call

func (*Service_Data_Call) RunAndReturn added in v0.4.0

func (_c *Service_Data_Call) RunAndReturn(run func(context.Context, agent.Dataset) error) *Service_Data_Call

type Service_Expecter added in v0.4.0

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

func (*Service_Expecter) Algo added in v0.4.0

func (_e *Service_Expecter) Algo(ctx interface{}, algorithm interface{}) *Service_Algo_Call

Algo is a helper method to define mock.On call

  • ctx context.Context
  • algorithm agent.Algorithm

func (*Service_Expecter) Attestation added in v0.4.0

func (_e *Service_Expecter) Attestation(ctx interface{}, reportData interface{}, nonce interface{}, attType interface{}) *Service_Attestation_Call

Attestation is a helper method to define mock.On call

  • ctx context.Context
  • reportData [64]byte
  • nonce [32]byte
  • attType config.AttestationType

func (*Service_Expecter) Data added in v0.4.0

func (_e *Service_Expecter) Data(ctx interface{}, dataset interface{}) *Service_Data_Call

Data is a helper method to define mock.On call

  • ctx context.Context
  • dataset agent.Dataset

func (*Service_Expecter) InitComputation added in v0.5.0

func (_e *Service_Expecter) InitComputation(ctx interface{}, cmp interface{}) *Service_InitComputation_Call

InitComputation is a helper method to define mock.On call

  • ctx context.Context
  • cmp agent.Computation

func (*Service_Expecter) Result added in v0.4.0

func (_e *Service_Expecter) Result(ctx interface{}) *Service_Result_Call

Result is a helper method to define mock.On call

  • ctx context.Context

func (*Service_Expecter) State added in v0.5.0

func (_e *Service_Expecter) State() *Service_State_Call

State is a helper method to define mock.On call

func (*Service_Expecter) StopComputation added in v0.5.0

func (_e *Service_Expecter) StopComputation(ctx interface{}) *Service_StopComputation_Call

StopComputation is a helper method to define mock.On call

  • ctx context.Context

type Service_InitComputation_Call added in v0.5.0

type Service_InitComputation_Call struct {
	*mock.Call
}

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

func (*Service_InitComputation_Call) Return added in v0.5.0

func (*Service_InitComputation_Call) Run added in v0.5.0

func (*Service_InitComputation_Call) RunAndReturn added in v0.5.0

type Service_Result_Call added in v0.4.0

type Service_Result_Call struct {
	*mock.Call
}

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

func (*Service_Result_Call) Return added in v0.4.0

func (_c *Service_Result_Call) Return(_a0 []byte, _a1 error) *Service_Result_Call

func (*Service_Result_Call) Run added in v0.4.0

func (_c *Service_Result_Call) Run(run func(ctx context.Context)) *Service_Result_Call

func (*Service_Result_Call) RunAndReturn added in v0.4.0

func (_c *Service_Result_Call) RunAndReturn(run func(context.Context) ([]byte, error)) *Service_Result_Call

type Service_State_Call added in v0.5.0

type Service_State_Call struct {
	*mock.Call
}

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

func (*Service_State_Call) Return added in v0.5.0

func (_c *Service_State_Call) Return(_a0 string) *Service_State_Call

func (*Service_State_Call) Run added in v0.5.0

func (_c *Service_State_Call) Run(run func()) *Service_State_Call

func (*Service_State_Call) RunAndReturn added in v0.5.0

func (_c *Service_State_Call) RunAndReturn(run func() string) *Service_State_Call

type Service_StopComputation_Call added in v0.5.0

type Service_StopComputation_Call struct {
	*mock.Call
}

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

func (*Service_StopComputation_Call) Return added in v0.5.0

func (*Service_StopComputation_Call) Run added in v0.5.0

func (*Service_StopComputation_Call) RunAndReturn added in v0.5.0

Jump to

Keyboard shortcuts

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