mocks

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FiltersModeService

type FiltersModeService struct {
	mock.Mock
}

FiltersModeService is an autogenerated mock type for the filtersModeService type

func NewFiltersModeService

func NewFiltersModeService(t interface {
	mock.TestingT
	Cleanup(func())
}) *FiltersModeService

NewFiltersModeService creates a new instance of FiltersModeService. 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 (*FiltersModeService) EXPECT

func (*FiltersModeService) Map

func (_m *FiltersModeService) Map(formattedText *client.FormattedText, rule *domain.ForwardRule) string

Map provides a mock function with given fields: formattedText, rule

type FiltersModeService_Expecter

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

func (*FiltersModeService_Expecter) Map

func (_e *FiltersModeService_Expecter) Map(formattedText interface{}, rule interface{}) *FiltersModeService_Map_Call

Map is a helper method to define mock.On call

  • formattedText *client.FormattedText
  • rule *domain.ForwardRule

type FiltersModeService_Map_Call

type FiltersModeService_Map_Call struct {
	*mock.Call
}

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

func (*FiltersModeService_Map_Call) Return

func (*FiltersModeService_Map_Call) Run

func (*FiltersModeService_Map_Call) RunAndReturn

type ForwardedToService

type ForwardedToService struct {
	mock.Mock
}

ForwardedToService is an autogenerated mock type for the forwardedToService type

func NewForwardedToService

func NewForwardedToService(t interface {
	mock.TestingT
	Cleanup(func())
}) *ForwardedToService

NewForwardedToService creates a new instance of ForwardedToService. 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 (*ForwardedToService) Add

func (_m *ForwardedToService) Add(forwardedTo map[int64]bool, dstChatId int64) bool

Add provides a mock function with given fields: forwardedTo, dstChatId

func (*ForwardedToService) EXPECT

func (*ForwardedToService) Init

func (_m *ForwardedToService) Init(forwardedTo map[int64]bool, dstChatIds []int64)

Init provides a mock function with given fields: forwardedTo, dstChatIds

type ForwardedToService_Add_Call

type ForwardedToService_Add_Call struct {
	*mock.Call
}

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

func (*ForwardedToService_Add_Call) Return

func (*ForwardedToService_Add_Call) Run

func (_c *ForwardedToService_Add_Call) Run(run func(forwardedTo map[int64]bool, dstChatId int64)) *ForwardedToService_Add_Call

func (*ForwardedToService_Add_Call) RunAndReturn

func (_c *ForwardedToService_Add_Call) RunAndReturn(run func(map[int64]bool, int64) bool) *ForwardedToService_Add_Call

type ForwardedToService_Expecter

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

func (*ForwardedToService_Expecter) Add

func (_e *ForwardedToService_Expecter) Add(forwardedTo interface{}, dstChatId interface{}) *ForwardedToService_Add_Call

Add is a helper method to define mock.On call

  • forwardedTo map[int64]bool
  • dstChatId int64

func (*ForwardedToService_Expecter) Init

func (_e *ForwardedToService_Expecter) Init(forwardedTo interface{}, dstChatIds interface{}) *ForwardedToService_Init_Call

Init is a helper method to define mock.On call

  • forwardedTo map[int64]bool
  • dstChatIds []int64

type ForwardedToService_Init_Call

type ForwardedToService_Init_Call struct {
	*mock.Call
}

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

func (*ForwardedToService_Init_Call) Return

func (*ForwardedToService_Init_Call) Run

func (_c *ForwardedToService_Init_Call) Run(run func(forwardedTo map[int64]bool, dstChatIds []int64)) *ForwardedToService_Init_Call

func (*ForwardedToService_Init_Call) RunAndReturn

func (_c *ForwardedToService_Init_Call) RunAndReturn(run func(map[int64]bool, []int64)) *ForwardedToService_Init_Call

type ForwarderService

type ForwarderService struct {
	mock.Mock
}

ForwarderService is an autogenerated mock type for the forwarderService type

func NewForwarderService

func NewForwarderService(t interface {
	mock.TestingT
	Cleanup(func())
}) *ForwarderService

NewForwarderService creates a new instance of ForwarderService. 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 (*ForwarderService) EXPECT

func (*ForwarderService) ForwardMessages

func (_m *ForwarderService) ForwardMessages(messages []*client.Message, filtersMode string, srcChatId int64, dstChatId int64, isSendCopy bool, forwardRuleId string, engineConfig *domain.EngineConfig)

ForwardMessages provides a mock function with given fields: messages, filtersMode, srcChatId, dstChatId, isSendCopy, forwardRuleId, engineConfig

type ForwarderService_Expecter

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

func (*ForwarderService_Expecter) ForwardMessages

func (_e *ForwarderService_Expecter) ForwardMessages(messages interface{}, filtersMode interface{}, srcChatId interface{}, dstChatId interface{}, isSendCopy interface{}, forwardRuleId interface{}, engineConfig interface{}) *ForwarderService_ForwardMessages_Call

ForwardMessages is a helper method to define mock.On call

  • messages []*client.Message
  • filtersMode string
  • srcChatId int64
  • dstChatId int64
  • isSendCopy bool
  • forwardRuleId string
  • engineConfig *domain.EngineConfig

type ForwarderService_ForwardMessages_Call

type ForwarderService_ForwardMessages_Call struct {
	*mock.Call
}

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

func (*ForwarderService_ForwardMessages_Call) Return

func (*ForwarderService_ForwardMessages_Call) Run

func (_c *ForwarderService_ForwardMessages_Call) Run(run func(messages []*client.Message, filtersMode string, srcChatId int64, dstChatId int64, isSendCopy bool, forwardRuleId string, engineConfig *domain.EngineConfig)) *ForwarderService_ForwardMessages_Call

func (*ForwarderService_ForwardMessages_Call) RunAndReturn

type MediaAlbumService

type MediaAlbumService struct {
	mock.Mock
}

MediaAlbumService is an autogenerated mock type for the mediaAlbumService type

func NewMediaAlbumService

func NewMediaAlbumService(t interface {
	mock.TestingT
	Cleanup(func())
}) *MediaAlbumService

NewMediaAlbumService creates a new instance of MediaAlbumService. 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 (*MediaAlbumService) AddMessage

func (_m *MediaAlbumService) AddMessage(key string, message *client.Message) bool

AddMessage provides a mock function with given fields: key, message

func (*MediaAlbumService) EXPECT

func (*MediaAlbumService) GetKey

func (_m *MediaAlbumService) GetKey(forwardRuleId string, MediaAlbumId client.JsonInt64) string

GetKey provides a mock function with given fields: forwardRuleId, MediaAlbumId

func (*MediaAlbumService) GetLastReceivedDiff

func (_m *MediaAlbumService) GetLastReceivedDiff(key string) time.Duration

GetLastReceivedDiff provides a mock function with given fields: key

func (*MediaAlbumService) PopMessages

func (_m *MediaAlbumService) PopMessages(key string) []*client.Message

PopMessages provides a mock function with given fields: key

type MediaAlbumService_AddMessage_Call

type MediaAlbumService_AddMessage_Call struct {
	*mock.Call
}

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

func (*MediaAlbumService_AddMessage_Call) Return

func (*MediaAlbumService_AddMessage_Call) Run

func (*MediaAlbumService_AddMessage_Call) RunAndReturn

type MediaAlbumService_Expecter

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

func (*MediaAlbumService_Expecter) AddMessage

func (_e *MediaAlbumService_Expecter) AddMessage(key interface{}, message interface{}) *MediaAlbumService_AddMessage_Call

AddMessage is a helper method to define mock.On call

  • key string
  • message *client.Message

func (*MediaAlbumService_Expecter) GetKey

func (_e *MediaAlbumService_Expecter) GetKey(forwardRuleId interface{}, MediaAlbumId interface{}) *MediaAlbumService_GetKey_Call

GetKey is a helper method to define mock.On call

  • forwardRuleId string
  • MediaAlbumId client.JsonInt64

func (*MediaAlbumService_Expecter) GetLastReceivedDiff

func (_e *MediaAlbumService_Expecter) GetLastReceivedDiff(key interface{}) *MediaAlbumService_GetLastReceivedDiff_Call

GetLastReceivedDiff is a helper method to define mock.On call

  • key string

func (*MediaAlbumService_Expecter) PopMessages

func (_e *MediaAlbumService_Expecter) PopMessages(key interface{}) *MediaAlbumService_PopMessages_Call

PopMessages is a helper method to define mock.On call

  • key string

type MediaAlbumService_GetKey_Call

type MediaAlbumService_GetKey_Call struct {
	*mock.Call
}

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

func (*MediaAlbumService_GetKey_Call) Return

func (*MediaAlbumService_GetKey_Call) Run

func (_c *MediaAlbumService_GetKey_Call) Run(run func(forwardRuleId string, MediaAlbumId client.JsonInt64)) *MediaAlbumService_GetKey_Call

func (*MediaAlbumService_GetKey_Call) RunAndReturn

type MediaAlbumService_GetLastReceivedDiff_Call

type MediaAlbumService_GetLastReceivedDiff_Call struct {
	*mock.Call
}

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

func (*MediaAlbumService_GetLastReceivedDiff_Call) Return

func (*MediaAlbumService_GetLastReceivedDiff_Call) Run

func (*MediaAlbumService_GetLastReceivedDiff_Call) RunAndReturn

type MediaAlbumService_PopMessages_Call

type MediaAlbumService_PopMessages_Call struct {
	*mock.Call
}

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

func (*MediaAlbumService_PopMessages_Call) Return

func (*MediaAlbumService_PopMessages_Call) Run

func (*MediaAlbumService_PopMessages_Call) RunAndReturn

type MessageService

type MessageService struct {
	mock.Mock
}

MessageService is an autogenerated mock type for the messageService type

func NewMessageService

func NewMessageService(t interface {
	mock.TestingT
	Cleanup(func())
}) *MessageService

NewMessageService creates a new instance of MessageService. 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 (*MessageService) EXPECT

func (*MessageService) GetFormattedText

func (_m *MessageService) GetFormattedText(message *client.Message) *client.FormattedText

GetFormattedText provides a mock function with given fields: message

func (*MessageService) IsSystemMessage

func (_m *MessageService) IsSystemMessage(message *client.Message) bool

IsSystemMessage provides a mock function with given fields: message

type MessageService_Expecter

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

func (*MessageService_Expecter) GetFormattedText

func (_e *MessageService_Expecter) GetFormattedText(message interface{}) *MessageService_GetFormattedText_Call

GetFormattedText is a helper method to define mock.On call

  • message *client.Message

func (*MessageService_Expecter) IsSystemMessage

func (_e *MessageService_Expecter) IsSystemMessage(message interface{}) *MessageService_IsSystemMessage_Call

IsSystemMessage is a helper method to define mock.On call

  • message *client.Message

type MessageService_GetFormattedText_Call

type MessageService_GetFormattedText_Call struct {
	*mock.Call
}

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

func (*MessageService_GetFormattedText_Call) Return

func (*MessageService_GetFormattedText_Call) Run

func (*MessageService_GetFormattedText_Call) RunAndReturn

type MessageService_IsSystemMessage_Call

type MessageService_IsSystemMessage_Call struct {
	*mock.Call
}

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

func (*MessageService_IsSystemMessage_Call) Return

func (*MessageService_IsSystemMessage_Call) Run

func (*MessageService_IsSystemMessage_Call) RunAndReturn

type QueueRepo

type QueueRepo struct {
	mock.Mock
}

QueueRepo is an autogenerated mock type for the queueRepo type

func NewQueueRepo

func NewQueueRepo(t interface {
	mock.TestingT
	Cleanup(func())
}) *QueueRepo

NewQueueRepo creates a new instance of QueueRepo. 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 (*QueueRepo) Add

func (_m *QueueRepo) Add(fn func())

Add provides a mock function with given fields: fn

func (*QueueRepo) EXPECT

func (_m *QueueRepo) EXPECT() *QueueRepo_Expecter

type QueueRepo_Add_Call

type QueueRepo_Add_Call struct {
	*mock.Call
}

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

func (*QueueRepo_Add_Call) Return

func (_c *QueueRepo_Add_Call) Return() *QueueRepo_Add_Call

func (*QueueRepo_Add_Call) Run

func (_c *QueueRepo_Add_Call) Run(run func(fn func())) *QueueRepo_Add_Call

func (*QueueRepo_Add_Call) RunAndReturn

func (_c *QueueRepo_Add_Call) RunAndReturn(run func(func())) *QueueRepo_Add_Call

type QueueRepo_Expecter

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

func (*QueueRepo_Expecter) Add

func (_e *QueueRepo_Expecter) Add(fn interface{}) *QueueRepo_Add_Call

Add is a helper method to define mock.On call

  • fn func()

type StorageService

type StorageService struct {
	mock.Mock
}

StorageService is an autogenerated mock type for the storageService type

func NewStorageService

func NewStorageService(t interface {
	mock.TestingT
	Cleanup(func())
}) *StorageService

NewStorageService creates a new instance of StorageService. 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 (*StorageService) EXPECT

func (*StorageService) IncrementForwardedMessages

func (_m *StorageService) IncrementForwardedMessages(toChatId int64, date string)

IncrementForwardedMessages provides a mock function with given fields: toChatId, date

func (*StorageService) IncrementViewedMessages

func (_m *StorageService) IncrementViewedMessages(toChatId int64, date string)

IncrementViewedMessages provides a mock function with given fields: toChatId, date

type StorageService_Expecter

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

func (*StorageService_Expecter) IncrementForwardedMessages

func (_e *StorageService_Expecter) IncrementForwardedMessages(toChatId interface{}, date interface{}) *StorageService_IncrementForwardedMessages_Call

IncrementForwardedMessages is a helper method to define mock.On call

  • toChatId int64
  • date string

func (*StorageService_Expecter) IncrementViewedMessages

func (_e *StorageService_Expecter) IncrementViewedMessages(toChatId interface{}, date interface{}) *StorageService_IncrementViewedMessages_Call

IncrementViewedMessages is a helper method to define mock.On call

  • toChatId int64
  • date string

type StorageService_IncrementForwardedMessages_Call

type StorageService_IncrementForwardedMessages_Call struct {
	*mock.Call
}

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

func (*StorageService_IncrementForwardedMessages_Call) Return

func (*StorageService_IncrementForwardedMessages_Call) Run

func (*StorageService_IncrementForwardedMessages_Call) RunAndReturn

type StorageService_IncrementViewedMessages_Call

type StorageService_IncrementViewedMessages_Call struct {
	*mock.Call
}

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

func (*StorageService_IncrementViewedMessages_Call) Return

func (*StorageService_IncrementViewedMessages_Call) Run

func (*StorageService_IncrementViewedMessages_Call) RunAndReturn

type TelegramRepo

type TelegramRepo struct {
	mock.Mock
}

TelegramRepo is an autogenerated mock type for the telegramRepo type

func NewTelegramRepo

func NewTelegramRepo(t interface {
	mock.TestingT
	Cleanup(func())
}) *TelegramRepo

NewTelegramRepo creates a new instance of TelegramRepo. 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 (*TelegramRepo) DeleteMessages

func (_m *TelegramRepo) DeleteMessages(_a0 *client.DeleteMessagesRequest) (*client.Ok, error)

DeleteMessages provides a mock function with given fields: _a0

func (*TelegramRepo) EXPECT

func (_m *TelegramRepo) EXPECT() *TelegramRepo_Expecter

type TelegramRepo_DeleteMessages_Call

type TelegramRepo_DeleteMessages_Call struct {
	*mock.Call
}

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

func (*TelegramRepo_DeleteMessages_Call) Return

func (*TelegramRepo_DeleteMessages_Call) Run

func (*TelegramRepo_DeleteMessages_Call) RunAndReturn

type TelegramRepo_Expecter

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

func (*TelegramRepo_Expecter) DeleteMessages

func (_e *TelegramRepo_Expecter) DeleteMessages(_a0 interface{}) *TelegramRepo_DeleteMessages_Call

DeleteMessages is a helper method to define mock.On call

  • _a0 *client.DeleteMessagesRequest

Jump to

Keyboard shortcuts

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