mocks

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2024 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConsumeClient

type ConsumeClient struct {
	mock.Mock
}

ConsumeClient is an autogenerated mock type for the ConsumeClient type

func NewConsumeClient

func NewConsumeClient(t mockConstructorTestingTNewConsumeClient) *ConsumeClient

NewConsumeClient creates a new instance of ConsumeClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*ConsumeClient) EXPECT

func (_m *ConsumeClient) EXPECT() *ConsumeClient_Expecter

func (*ConsumeClient) Publish

func (_m *ConsumeClient) Publish(ctx context.Context, channel string, message interface{}) *redis.IntCmd

Publish provides a mock function with given fields: ctx, channel, message

func (*ConsumeClient) RPush

func (_m *ConsumeClient) RPush(ctx context.Context, key string, values ...interface{}) *redis.IntCmd

RPush provides a mock function with given fields: ctx, key, values

func (*ConsumeClient) Subscribe

func (_m *ConsumeClient) Subscribe(ctx context.Context, channels ...string) transportsredis.PubSub

Subscribe provides a mock function with given fields: ctx, channels

type ConsumeClient_Expecter

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

func (*ConsumeClient_Expecter) Publish

func (_e *ConsumeClient_Expecter) Publish(ctx interface{}, channel interface{}, message interface{}) *ConsumeClient_Publish_Call

Publish is a helper method to define mock.On call

  • ctx context.Context
  • channel string
  • message interface{}

func (*ConsumeClient_Expecter) RPush

func (_e *ConsumeClient_Expecter) RPush(ctx interface{}, key interface{}, values ...interface{}) *ConsumeClient_RPush_Call

RPush is a helper method to define mock.On call

  • ctx context.Context
  • key string
  • values ...interface{}

func (*ConsumeClient_Expecter) Subscribe

func (_e *ConsumeClient_Expecter) Subscribe(ctx interface{}, channels ...interface{}) *ConsumeClient_Subscribe_Call

Subscribe is a helper method to define mock.On call

  • ctx context.Context
  • channels ...string

type ConsumeClient_Publish_Call

type ConsumeClient_Publish_Call struct {
	*mock.Call
}

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

func (*ConsumeClient_Publish_Call) Return

func (*ConsumeClient_Publish_Call) Run

func (_c *ConsumeClient_Publish_Call) Run(run func(ctx context.Context, channel string, message interface{})) *ConsumeClient_Publish_Call

func (*ConsumeClient_Publish_Call) RunAndReturn

func (_c *ConsumeClient_Publish_Call) RunAndReturn(run func(context.Context, string, interface{}) *redis.IntCmd) *ConsumeClient_Publish_Call

type ConsumeClient_RPush_Call

type ConsumeClient_RPush_Call struct {
	*mock.Call
}

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

func (*ConsumeClient_RPush_Call) Return

func (*ConsumeClient_RPush_Call) Run

func (_c *ConsumeClient_RPush_Call) Run(run func(ctx context.Context, key string, values ...interface{})) *ConsumeClient_RPush_Call

func (*ConsumeClient_RPush_Call) RunAndReturn

func (_c *ConsumeClient_RPush_Call) RunAndReturn(run func(context.Context, string, ...interface{}) *redis.IntCmd) *ConsumeClient_RPush_Call

type ConsumeClient_Subscribe_Call

type ConsumeClient_Subscribe_Call struct {
	*mock.Call
}

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

func (*ConsumeClient_Subscribe_Call) Return

func (*ConsumeClient_Subscribe_Call) Run

func (*ConsumeClient_Subscribe_Call) RunAndReturn

type PubSub

type PubSub struct {
	mock.Mock
}

PubSub is an autogenerated mock type for the PubSub type

func NewPubSub

func NewPubSub(t mockConstructorTestingTNewPubSub) *PubSub

NewPubSub creates a new instance of PubSub. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*PubSub) Channel

func (_m *PubSub) Channel(opts ...redis.ChannelOption) <-chan *redis.Message

Channel provides a mock function with given fields: opts

func (*PubSub) Close

func (_m *PubSub) Close() error

Close provides a mock function with given fields:

func (*PubSub) EXPECT

func (_m *PubSub) EXPECT() *PubSub_Expecter

func (*PubSub) Receive

func (_m *PubSub) Receive(ctx context.Context) (interface{}, error)

Receive provides a mock function with given fields: ctx

func (*PubSub) Subscribe

func (_m *PubSub) Subscribe(ctx context.Context, channels ...string) error

Subscribe provides a mock function with given fields: ctx, channels

func (*PubSub) Unsubscribe

func (_m *PubSub) Unsubscribe(ctx context.Context, channels ...string) error

Unsubscribe provides a mock function with given fields: ctx, channels

type PubSub_Channel_Call

type PubSub_Channel_Call struct {
	*mock.Call
}

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

func (*PubSub_Channel_Call) Return

func (_c *PubSub_Channel_Call) Return(_a0 <-chan *redis.Message) *PubSub_Channel_Call

func (*PubSub_Channel_Call) Run

func (_c *PubSub_Channel_Call) Run(run func(opts ...redis.ChannelOption)) *PubSub_Channel_Call

func (*PubSub_Channel_Call) RunAndReturn

func (_c *PubSub_Channel_Call) RunAndReturn(run func(...redis.ChannelOption) <-chan *redis.Message) *PubSub_Channel_Call

type PubSub_Close_Call

type PubSub_Close_Call struct {
	*mock.Call
}

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

func (*PubSub_Close_Call) Return

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

func (*PubSub_Close_Call) Run

func (_c *PubSub_Close_Call) Run(run func()) *PubSub_Close_Call

func (*PubSub_Close_Call) RunAndReturn

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

type PubSub_Expecter

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

func (*PubSub_Expecter) Channel

func (_e *PubSub_Expecter) Channel(opts ...interface{}) *PubSub_Channel_Call

Channel is a helper method to define mock.On call

  • opts ...redis.ChannelOption

func (*PubSub_Expecter) Close

func (_e *PubSub_Expecter) Close() *PubSub_Close_Call

Close is a helper method to define mock.On call

func (*PubSub_Expecter) Receive

func (_e *PubSub_Expecter) Receive(ctx interface{}) *PubSub_Receive_Call

Receive is a helper method to define mock.On call

  • ctx context.Context

func (*PubSub_Expecter) Subscribe

func (_e *PubSub_Expecter) Subscribe(ctx interface{}, channels ...interface{}) *PubSub_Subscribe_Call

Subscribe is a helper method to define mock.On call

  • ctx context.Context
  • channels ...string

func (*PubSub_Expecter) Unsubscribe

func (_e *PubSub_Expecter) Unsubscribe(ctx interface{}, channels ...interface{}) *PubSub_Unsubscribe_Call

Unsubscribe is a helper method to define mock.On call

  • ctx context.Context
  • channels ...string

type PubSub_Receive_Call

type PubSub_Receive_Call struct {
	*mock.Call
}

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

func (*PubSub_Receive_Call) Return

func (_c *PubSub_Receive_Call) Return(_a0 interface{}, _a1 error) *PubSub_Receive_Call

func (*PubSub_Receive_Call) Run

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

func (*PubSub_Receive_Call) RunAndReturn

func (_c *PubSub_Receive_Call) RunAndReturn(run func(context.Context) (interface{}, error)) *PubSub_Receive_Call

type PubSub_Subscribe_Call

type PubSub_Subscribe_Call struct {
	*mock.Call
}

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

func (*PubSub_Subscribe_Call) Return

func (*PubSub_Subscribe_Call) Run

func (_c *PubSub_Subscribe_Call) Run(run func(ctx context.Context, channels ...string)) *PubSub_Subscribe_Call

func (*PubSub_Subscribe_Call) RunAndReturn

func (_c *PubSub_Subscribe_Call) RunAndReturn(run func(context.Context, ...string) error) *PubSub_Subscribe_Call

type PubSub_Unsubscribe_Call

type PubSub_Unsubscribe_Call struct {
	*mock.Call
}

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

func (*PubSub_Unsubscribe_Call) Return

func (*PubSub_Unsubscribe_Call) Run

func (_c *PubSub_Unsubscribe_Call) Run(run func(ctx context.Context, channels ...string)) *PubSub_Unsubscribe_Call

func (*PubSub_Unsubscribe_Call) RunAndReturn

type PublishClient

type PublishClient struct {
	mock.Mock
}

PublishClient is an autogenerated mock type for the PublishClient type

func NewPublishClient

func NewPublishClient(t mockConstructorTestingTNewPublishClient) *PublishClient

NewPublishClient creates a new instance of PublishClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*PublishClient) BRPop

func (_m *PublishClient) BRPop(ctx context.Context, timeout time.Duration, keys ...string) *redis.StringSliceCmd

BRPop provides a mock function with given fields: ctx, timeout, keys

func (*PublishClient) EXPECT

func (_m *PublishClient) EXPECT() *PublishClient_Expecter

func (*PublishClient) Publish

func (_m *PublishClient) Publish(ctx context.Context, channel string, message interface{}) *redis.IntCmd

Publish provides a mock function with given fields: ctx, channel, message

type PublishClient_BRPop_Call

type PublishClient_BRPop_Call struct {
	*mock.Call
}

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

func (*PublishClient_BRPop_Call) Return

func (*PublishClient_BRPop_Call) Run

func (_c *PublishClient_BRPop_Call) Run(run func(ctx context.Context, timeout time.Duration, keys ...string)) *PublishClient_BRPop_Call

func (*PublishClient_BRPop_Call) RunAndReturn

type PublishClient_Expecter

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

func (*PublishClient_Expecter) BRPop

func (_e *PublishClient_Expecter) BRPop(ctx interface{}, timeout interface{}, keys ...interface{}) *PublishClient_BRPop_Call

BRPop is a helper method to define mock.On call

  • ctx context.Context
  • timeout time.Duration
  • keys ...string

func (*PublishClient_Expecter) Publish

func (_e *PublishClient_Expecter) Publish(ctx interface{}, channel interface{}, message interface{}) *PublishClient_Publish_Call

Publish is a helper method to define mock.On call

  • ctx context.Context
  • channel string
  • message interface{}

type PublishClient_Publish_Call

type PublishClient_Publish_Call struct {
	*mock.Call
}

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

func (*PublishClient_Publish_Call) Return

func (*PublishClient_Publish_Call) Run

func (_c *PublishClient_Publish_Call) Run(run func(ctx context.Context, channel string, message interface{})) *PublishClient_Publish_Call

func (*PublishClient_Publish_Call) RunAndReturn

func (_c *PublishClient_Publish_Call) RunAndReturn(run func(context.Context, string, interface{}) *redis.IntCmd) *PublishClient_Publish_Call

Jump to

Keyboard shortcuts

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