mocks

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	mock.Mock
}

Client is an autogenerated mock type for the Client type

func NewClient

func NewClient(t interface {
	mock.TestingT
	Cleanup(func())
}) *Client

NewClient creates a new instance of Client. 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 (*Client) Close

func (_m *Client) Close() error

Close provides a mock function with no fields

func (*Client) EXPECT

func (_m *Client) EXPECT() *Client_Expecter

func (*Client) Ping

func (_m *Client) Ping(ctx context.Context, in *pb.EmptyRequest, opts ...grpc.CallOption) (*pb.PingResponse, error)

Ping provides a mock function with given fields: ctx, in, opts

func (*Client) Publish

func (_m *Client) Publish(ctx context.Context, in *v2pb.CloudEvent, opts ...grpc.CallOption) (*pb.PublishResponse, error)

Publish provides a mock function with given fields: ctx, in, opts

func (*Client) PublishBatch

func (_m *Client) PublishBatch(ctx context.Context, in *pb.CloudEventBatch, opts ...grpc.CallOption) (*pb.PublishResponse, error)

PublishBatch provides a mock function with given fields: ctx, in, opts

func (*Client) StreamEvents

StreamEvents provides a mock function with given fields: ctx, opts

type Client_Close_Call

type Client_Close_Call struct {
	*mock.Call
}

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

func (*Client_Close_Call) Return

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

func (*Client_Close_Call) Run

func (_c *Client_Close_Call) Run(run func()) *Client_Close_Call

func (*Client_Close_Call) RunAndReturn

func (_c *Client_Close_Call) RunAndReturn(run func() error) *Client_Close_Call

type Client_Expecter

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

func (*Client_Expecter) Close

func (_e *Client_Expecter) Close() *Client_Close_Call

Close is a helper method to define mock.On call

func (*Client_Expecter) Ping

func (_e *Client_Expecter) Ping(ctx interface{}, in interface{}, opts ...interface{}) *Client_Ping_Call

Ping is a helper method to define mock.On call

  • ctx context.Context
  • in *pb.EmptyRequest
  • opts ...grpc.CallOption

func (*Client_Expecter) Publish

func (_e *Client_Expecter) Publish(ctx interface{}, in interface{}, opts ...interface{}) *Client_Publish_Call

Publish is a helper method to define mock.On call

  • ctx context.Context
  • in *v2pb.CloudEvent
  • opts ...grpc.CallOption

func (*Client_Expecter) PublishBatch

func (_e *Client_Expecter) PublishBatch(ctx interface{}, in interface{}, opts ...interface{}) *Client_PublishBatch_Call

PublishBatch is a helper method to define mock.On call

  • ctx context.Context
  • in *pb.CloudEventBatch
  • opts ...grpc.CallOption

func (*Client_Expecter) StreamEvents

func (_e *Client_Expecter) StreamEvents(ctx interface{}, opts ...interface{}) *Client_StreamEvents_Call

StreamEvents is a helper method to define mock.On call

  • ctx context.Context
  • opts ...grpc.CallOption

type Client_Ping_Call

type Client_Ping_Call struct {
	*mock.Call
}

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

func (*Client_Ping_Call) Return

func (_c *Client_Ping_Call) Return(_a0 *pb.PingResponse, _a1 error) *Client_Ping_Call

func (*Client_Ping_Call) Run

func (_c *Client_Ping_Call) Run(run func(ctx context.Context, in *pb.EmptyRequest, opts ...grpc.CallOption)) *Client_Ping_Call

func (*Client_Ping_Call) RunAndReturn

type Client_PublishBatch_Call

type Client_PublishBatch_Call struct {
	*mock.Call
}

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

func (*Client_PublishBatch_Call) Return

func (*Client_PublishBatch_Call) Run

func (*Client_PublishBatch_Call) RunAndReturn

type Client_Publish_Call

type Client_Publish_Call struct {
	*mock.Call
}

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

func (*Client_Publish_Call) Return

func (*Client_Publish_Call) Run

func (_c *Client_Publish_Call) Run(run func(ctx context.Context, in *v2pb.CloudEvent, opts ...grpc.CallOption)) *Client_Publish_Call

func (*Client_Publish_Call) RunAndReturn

type Client_StreamEvents_Call

type Client_StreamEvents_Call struct {
	*mock.Call
}

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

func (*Client_StreamEvents_Call) Run

Jump to

Keyboard shortcuts

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