mocks

package
v0.0.0-...-5ed4770 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache struct {
	mock.Mock
}

Cache is an autogenerated mock type for the Cache type

func NewCache

func NewCache(t interface {
	mock.TestingT
	Cleanup(func())
}) *Cache

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

func (_m *Cache) Close() error

Close provides a mock function with no fields

func (*Cache) DecrConnCount

func (_m *Cache) DecrConnCount(ctx context.Context, userID string) (int64, error)

DecrConnCount provides a mock function with given fields: ctx, userID

func (*Cache) EXPECT

func (_m *Cache) EXPECT() *Cache_Expecter

func (*Cache) GetConnCount

func (_m *Cache) GetConnCount(ctx context.Context, userID string) (int64, error)

GetConnCount provides a mock function with given fields: ctx, userID

func (*Cache) GetConversationState

func (_m *Cache) GetConversationState(ctx context.Context, conversationID string) (string, error)

GetConversationState provides a mock function with given fields: ctx, conversationID

func (*Cache) GetCurrentSeq

func (_m *Cache) GetCurrentSeq(ctx context.Context, scope string, scopeID string) (uint64, error)

GetCurrentSeq provides a mock function with given fields: ctx, scope, scopeID

func (*Cache) IncrConnCount

func (_m *Cache) IncrConnCount(ctx context.Context, userID string) (int64, error)

IncrConnCount provides a mock function with given fields: ctx, userID

func (*Cache) IncrMsgID

func (_m *Cache) IncrMsgID(ctx context.Context, conversationID string) (uint64, error)

IncrMsgID provides a mock function with given fields: ctx, conversationID

func (*Cache) IncrSeq

func (_m *Cache) IncrSeq(ctx context.Context, scope string, scopeID string) (uint64, error)

IncrSeq provides a mock function with given fields: ctx, scope, scopeID

func (*Cache) IncrSeqAndMsgID

func (_m *Cache) IncrSeqAndMsgID(ctx context.Context, scope string, scopeID string, conversationID string) (uint64, uint64, error)

IncrSeqAndMsgID provides a mock function with given fields: ctx, scope, scopeID, conversationID

func (*Cache) IsHealthy

func (_m *Cache) IsHealthy(ctx context.Context) bool

IsHealthy provides a mock function with given fields: ctx

func (*Cache) Publish

func (_m *Cache) Publish(ctx context.Context, channel string, data []byte) error

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

func (*Cache) RenewConnCount

func (_m *Cache) RenewConnCount(ctx context.Context, userID string) error

RenewConnCount provides a mock function with given fields: ctx, userID

func (*Cache) SetConversationState

func (_m *Cache) SetConversationState(ctx context.Context, conversationID string, state string) error

SetConversationState provides a mock function with given fields: ctx, conversationID, state

func (*Cache) SetSeq

func (_m *Cache) SetSeq(ctx context.Context, scope string, scopeID string, val uint64) error

SetSeq provides a mock function with given fields: ctx, scope, scopeID, val

func (*Cache) Subscribe

func (_m *Cache) Subscribe(ctx context.Context, channel string) (<-chan []byte, func(), error)

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

type Cache_Close_Call

type Cache_Close_Call struct {
	*mock.Call
}

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

func (*Cache_Close_Call) Return

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

func (*Cache_Close_Call) Run

func (_c *Cache_Close_Call) Run(run func()) *Cache_Close_Call

func (*Cache_Close_Call) RunAndReturn

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

type Cache_DecrConnCount_Call

type Cache_DecrConnCount_Call struct {
	*mock.Call
}

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

func (*Cache_DecrConnCount_Call) Return

func (*Cache_DecrConnCount_Call) Run

func (*Cache_DecrConnCount_Call) RunAndReturn

type Cache_Expecter

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

func (*Cache_Expecter) Close

func (_e *Cache_Expecter) Close() *Cache_Close_Call

Close is a helper method to define mock.On call

func (*Cache_Expecter) DecrConnCount

func (_e *Cache_Expecter) DecrConnCount(ctx interface{}, userID interface{}) *Cache_DecrConnCount_Call

DecrConnCount is a helper method to define mock.On call

  • ctx context.Context
  • userID string

func (*Cache_Expecter) GetConnCount

func (_e *Cache_Expecter) GetConnCount(ctx interface{}, userID interface{}) *Cache_GetConnCount_Call

GetConnCount is a helper method to define mock.On call

  • ctx context.Context
  • userID string

func (*Cache_Expecter) GetConversationState

func (_e *Cache_Expecter) GetConversationState(ctx interface{}, conversationID interface{}) *Cache_GetConversationState_Call

GetConversationState is a helper method to define mock.On call

  • ctx context.Context
  • conversationID string

func (*Cache_Expecter) GetCurrentSeq

func (_e *Cache_Expecter) GetCurrentSeq(ctx interface{}, scope interface{}, scopeID interface{}) *Cache_GetCurrentSeq_Call

GetCurrentSeq is a helper method to define mock.On call

  • ctx context.Context
  • scope string
  • scopeID string

func (*Cache_Expecter) IncrConnCount

func (_e *Cache_Expecter) IncrConnCount(ctx interface{}, userID interface{}) *Cache_IncrConnCount_Call

IncrConnCount is a helper method to define mock.On call

  • ctx context.Context
  • userID string

func (*Cache_Expecter) IncrMsgID

func (_e *Cache_Expecter) IncrMsgID(ctx interface{}, conversationID interface{}) *Cache_IncrMsgID_Call

IncrMsgID is a helper method to define mock.On call

  • ctx context.Context
  • conversationID string

func (*Cache_Expecter) IncrSeq

func (_e *Cache_Expecter) IncrSeq(ctx interface{}, scope interface{}, scopeID interface{}) *Cache_IncrSeq_Call

IncrSeq is a helper method to define mock.On call

  • ctx context.Context
  • scope string
  • scopeID string

func (*Cache_Expecter) IncrSeqAndMsgID

func (_e *Cache_Expecter) IncrSeqAndMsgID(ctx interface{}, scope interface{}, scopeID interface{}, conversationID interface{}) *Cache_IncrSeqAndMsgID_Call

IncrSeqAndMsgID is a helper method to define mock.On call

  • ctx context.Context
  • scope string
  • scopeID string
  • conversationID string

func (*Cache_Expecter) IsHealthy

func (_e *Cache_Expecter) IsHealthy(ctx interface{}) *Cache_IsHealthy_Call

IsHealthy is a helper method to define mock.On call

  • ctx context.Context

func (*Cache_Expecter) Publish

func (_e *Cache_Expecter) Publish(ctx interface{}, channel interface{}, data interface{}) *Cache_Publish_Call

Publish is a helper method to define mock.On call

  • ctx context.Context
  • channel string
  • data []byte

func (*Cache_Expecter) RenewConnCount

func (_e *Cache_Expecter) RenewConnCount(ctx interface{}, userID interface{}) *Cache_RenewConnCount_Call

RenewConnCount is a helper method to define mock.On call

  • ctx context.Context
  • userID string

func (*Cache_Expecter) SetConversationState

func (_e *Cache_Expecter) SetConversationState(ctx interface{}, conversationID interface{}, state interface{}) *Cache_SetConversationState_Call

SetConversationState is a helper method to define mock.On call

  • ctx context.Context
  • conversationID string
  • state string

func (*Cache_Expecter) SetSeq

func (_e *Cache_Expecter) SetSeq(ctx interface{}, scope interface{}, scopeID interface{}, val interface{}) *Cache_SetSeq_Call

SetSeq is a helper method to define mock.On call

  • ctx context.Context
  • scope string
  • scopeID string
  • val uint64

func (*Cache_Expecter) Subscribe

func (_e *Cache_Expecter) Subscribe(ctx interface{}, channel interface{}) *Cache_Subscribe_Call

Subscribe is a helper method to define mock.On call

  • ctx context.Context
  • channel string

type Cache_GetConnCount_Call

type Cache_GetConnCount_Call struct {
	*mock.Call
}

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

func (*Cache_GetConnCount_Call) Return

func (*Cache_GetConnCount_Call) Run

func (_c *Cache_GetConnCount_Call) Run(run func(ctx context.Context, userID string)) *Cache_GetConnCount_Call

func (*Cache_GetConnCount_Call) RunAndReturn

type Cache_GetConversationState_Call

type Cache_GetConversationState_Call struct {
	*mock.Call
}

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

func (*Cache_GetConversationState_Call) Return

func (*Cache_GetConversationState_Call) Run

func (*Cache_GetConversationState_Call) RunAndReturn

type Cache_GetCurrentSeq_Call

type Cache_GetCurrentSeq_Call struct {
	*mock.Call
}

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

func (*Cache_GetCurrentSeq_Call) Return

func (*Cache_GetCurrentSeq_Call) Run

func (_c *Cache_GetCurrentSeq_Call) Run(run func(ctx context.Context, scope string, scopeID string)) *Cache_GetCurrentSeq_Call

func (*Cache_GetCurrentSeq_Call) RunAndReturn

type Cache_IncrConnCount_Call

type Cache_IncrConnCount_Call struct {
	*mock.Call
}

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

func (*Cache_IncrConnCount_Call) Return

func (*Cache_IncrConnCount_Call) Run

func (*Cache_IncrConnCount_Call) RunAndReturn

type Cache_IncrMsgID_Call

type Cache_IncrMsgID_Call struct {
	*mock.Call
}

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

func (*Cache_IncrMsgID_Call) Return

func (_c *Cache_IncrMsgID_Call) Return(_a0 uint64, _a1 error) *Cache_IncrMsgID_Call

func (*Cache_IncrMsgID_Call) Run

func (_c *Cache_IncrMsgID_Call) Run(run func(ctx context.Context, conversationID string)) *Cache_IncrMsgID_Call

func (*Cache_IncrMsgID_Call) RunAndReturn

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

type Cache_IncrSeqAndMsgID_Call

type Cache_IncrSeqAndMsgID_Call struct {
	*mock.Call
}

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

func (*Cache_IncrSeqAndMsgID_Call) Return

func (*Cache_IncrSeqAndMsgID_Call) Run

func (_c *Cache_IncrSeqAndMsgID_Call) Run(run func(ctx context.Context, scope string, scopeID string, conversationID string)) *Cache_IncrSeqAndMsgID_Call

func (*Cache_IncrSeqAndMsgID_Call) RunAndReturn

type Cache_IncrSeq_Call

type Cache_IncrSeq_Call struct {
	*mock.Call
}

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

func (*Cache_IncrSeq_Call) Return

func (_c *Cache_IncrSeq_Call) Return(_a0 uint64, _a1 error) *Cache_IncrSeq_Call

func (*Cache_IncrSeq_Call) Run

func (_c *Cache_IncrSeq_Call) Run(run func(ctx context.Context, scope string, scopeID string)) *Cache_IncrSeq_Call

func (*Cache_IncrSeq_Call) RunAndReturn

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

type Cache_IsHealthy_Call

type Cache_IsHealthy_Call struct {
	*mock.Call
}

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

func (*Cache_IsHealthy_Call) Return

func (*Cache_IsHealthy_Call) Run

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

func (*Cache_IsHealthy_Call) RunAndReturn

func (_c *Cache_IsHealthy_Call) RunAndReturn(run func(context.Context) bool) *Cache_IsHealthy_Call

type Cache_Publish_Call

type Cache_Publish_Call struct {
	*mock.Call
}

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

func (*Cache_Publish_Call) Return

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

func (*Cache_Publish_Call) Run

func (_c *Cache_Publish_Call) Run(run func(ctx context.Context, channel string, data []byte)) *Cache_Publish_Call

func (*Cache_Publish_Call) RunAndReturn

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

type Cache_RenewConnCount_Call

type Cache_RenewConnCount_Call struct {
	*mock.Call
}

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

func (*Cache_RenewConnCount_Call) Return

func (*Cache_RenewConnCount_Call) Run

func (*Cache_RenewConnCount_Call) RunAndReturn

type Cache_SetConversationState_Call

type Cache_SetConversationState_Call struct {
	*mock.Call
}

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

func (*Cache_SetConversationState_Call) Return

func (*Cache_SetConversationState_Call) Run

func (_c *Cache_SetConversationState_Call) Run(run func(ctx context.Context, conversationID string, state string)) *Cache_SetConversationState_Call

func (*Cache_SetConversationState_Call) RunAndReturn

type Cache_SetSeq_Call

type Cache_SetSeq_Call struct {
	*mock.Call
}

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

func (*Cache_SetSeq_Call) Return

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

func (*Cache_SetSeq_Call) Run

func (_c *Cache_SetSeq_Call) Run(run func(ctx context.Context, scope string, scopeID string, val uint64)) *Cache_SetSeq_Call

func (*Cache_SetSeq_Call) RunAndReturn

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

type Cache_Subscribe_Call

type Cache_Subscribe_Call struct {
	*mock.Call
}

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

func (*Cache_Subscribe_Call) Return

func (_c *Cache_Subscribe_Call) Return(_a0 <-chan []byte, _a1 func(), _a2 error) *Cache_Subscribe_Call

func (*Cache_Subscribe_Call) Run

func (_c *Cache_Subscribe_Call) Run(run func(ctx context.Context, channel string)) *Cache_Subscribe_Call

func (*Cache_Subscribe_Call) RunAndReturn

func (_c *Cache_Subscribe_Call) RunAndReturn(run func(context.Context, string) (<-chan []byte, func(), error)) *Cache_Subscribe_Call

Jump to

Keyboard shortcuts

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