mocks

package
v0.0.0-...-71e9963 Latest Latest
Warning

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

Go to latest
Published: May 13, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateMock

func CreateMock() (*sql.DB, sqlmock.Sqlmock, error)

Types

type ChannelRepo

type ChannelRepo struct {
	mock.Mock
}

ChannelRepo is an autogenerated mock type for the ChannelRepo type

func NewChannelRepo

func NewChannelRepo(t mockConstructorTestingTNewChannelRepo) *ChannelRepo

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

func (*ChannelRepo) CreateChannel

func (_m *ChannelRepo) CreateChannel(channel *model.DBChannel) error

CreateChannel provides a mock function with given fields: channel

func (*ChannelRepo) GetChannelByName

func (_m *ChannelRepo) GetChannelByName(name string) (*model.Channel, error)

GetChannelByName provides a mock function with given fields: name

func (*ChannelRepo) GetChannelStats

func (_m *ChannelRepo) GetChannelStats(channelID int) (*model.Stat, error)

GetChannelStats provides a mock function with given fields: channelID

func (*ChannelRepo) GetChannels

func (_m *ChannelRepo) GetChannels() ([]model.Channel, error)

GetChannels provides a mock function with given fields:

func (*ChannelRepo) GetChannelsByPage

func (_m *ChannelRepo) GetChannelsByPage(page int) ([]model.Channel, error)

GetChannelsByPage provides a mock function with given fields: page

type MessageRepo

type MessageRepo struct {
	mock.Mock
}

MessageRepo is an autogenerated mock type for the MessageRepo type

func NewMessageRepo

func NewMessageRepo(t mockConstructorTestingTNewMessageRepo) *MessageRepo

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

func (*MessageRepo) CreateMessage

func (_m *MessageRepo) CreateMessage(message *model.DBMessage) (int, error)

CreateMessage provides a mock function with given fields: message

func (*MessageRepo) GetFullMessageByID

func (_m *MessageRepo) GetFullMessageByID(id int) (*model.FullMessage, error)

GetFullMessageByID provides a mock function with given fields: id

func (*MessageRepo) GetFullMessagesByChannelIDAndPage

func (_m *MessageRepo) GetFullMessagesByChannelIDAndPage(id int, page int) ([]model.FullMessage, error)

GetFullMessagesByChannelIDAndPage provides a mock function with given fields: id, page

func (*MessageRepo) GetFullMessagesByPage

func (_m *MessageRepo) GetFullMessagesByPage(page int) ([]model.FullMessage, error)

GetFullMessagesByPage provides a mock function with given fields: page

func (*MessageRepo) GetFullMessagesByUserID

func (_m *MessageRepo) GetFullMessagesByUserID(id int) ([]model.FullMessage, error)

GetFullMessagesByUserID provides a mock function with given fields: id

func (*MessageRepo) GetMessageByTitle

func (_m *MessageRepo) GetMessageByTitle(title string) (*model.DBMessage, error)

GetMessageByTitle provides a mock function with given fields: title

func (*MessageRepo) GetMessagesCount

func (_m *MessageRepo) GetMessagesCount() (int, error)

GetMessagesCount provides a mock function with given fields:

func (*MessageRepo) GetMessagesCountByChannelID

func (_m *MessageRepo) GetMessagesCountByChannelID(id int) (int, error)

GetMessagesCountByChannelID provides a mock function with given fields: id

type ReplyRepo

type ReplyRepo struct {
	mock.Mock
}

ReplyRepo is an autogenerated mock type for the ReplyRepo type

func NewReplyRepo

func NewReplyRepo(t mockConstructorTestingTNewReplyRepo) *ReplyRepo

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

func (*ReplyRepo) CreateReply

func (_m *ReplyRepo) CreateReply(reply *model.DBReply) error

CreateReply provides a mock function with given fields: reply

func (*ReplyRepo) GetFullRepliesByMessageID

func (_m *ReplyRepo) GetFullRepliesByMessageID(id int) ([]model.FullReply, error)

GetFullRepliesByMessageID provides a mock function with given fields: id

type SavedRepo

type SavedRepo struct {
	mock.Mock
}

SavedRepo is an autogenerated mock type for the SavedRepo type

func NewSavedRepo

func NewSavedRepo(t mockConstructorTestingTNewSavedRepo) *SavedRepo

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

func (*SavedRepo) CreateSavedMessage

func (_m *SavedRepo) CreateSavedMessage(saved *model.Saved) error

CreateSavedMessage provides a mock function with given fields: saved

func (*SavedRepo) DeleteSavedMessage

func (_m *SavedRepo) DeleteSavedMessage(id int) error

DeleteSavedMessage provides a mock function with given fields: id

func (*SavedRepo) GetSavedMessageByID

func (_m *SavedRepo) GetSavedMessageByID(id int) (*model.Saved, error)

GetSavedMessageByID provides a mock function with given fields: id

func (*SavedRepo) GetSavedMessages

func (_m *SavedRepo) GetSavedMessages(userID int) ([]model.Saved, error)

GetSavedMessages provides a mock function with given fields: userID

type UserRepo

type UserRepo struct {
	mock.Mock
}

UserRepo is an autogenerated mock type for the UserRepo type

func NewUserRepo

func NewUserRepo(t mockConstructorTestingTNewUserRepo) *UserRepo

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

func (*UserRepo) CreateUser

func (_m *UserRepo) CreateUser(user *model.User) (int, error)

CreateUser provides a mock function with given fields: user

func (*UserRepo) GetUserByID

func (_m *UserRepo) GetUserByID(id int) (*model.User, error)

GetUserByID provides a mock function with given fields: id

func (*UserRepo) GetUserByUsername

func (_m *UserRepo) GetUserByUsername(username string) (*model.User, error)

GetUserByUsername provides a mock function with given fields: username

type WebUserRepo

type WebUserRepo struct {
	mock.Mock
}

WebUserRepo is an autogenerated mock type for the WebUserRepo type

func NewWebUserRepo

func NewWebUserRepo(t mockConstructorTestingTNewWebUserRepo) *WebUserRepo

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

func (*WebUserRepo) CreateWebUser

func (_m *WebUserRepo) CreateWebUser(user *model.WebUser) error

CreateWebUser provides a mock function with given fields: user

func (*WebUserRepo) GetWebUserByEmail

func (_m *WebUserRepo) GetWebUserByEmail(email string) (*model.WebUser, error)

GetWebUserByEmail provides a mock function with given fields: email

Jump to

Keyboard shortcuts

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