Documentation ¶
Index ¶
- func CreateMock() (*sql.DB, sqlmock.Sqlmock, error)
- type ChannelRepo
- func (_m *ChannelRepo) CreateChannel(channel *model.DBChannel) error
- func (_m *ChannelRepo) GetChannelByName(name string) (*model.Channel, error)
- func (_m *ChannelRepo) GetChannelStats(channelID int) (*model.Stat, error)
- func (_m *ChannelRepo) GetChannels() ([]model.Channel, error)
- func (_m *ChannelRepo) GetChannelsByPage(page int) ([]model.Channel, error)
- type MessageRepo
- func (_m *MessageRepo) CreateMessage(message *model.DBMessage) (int, error)
- func (_m *MessageRepo) GetFullMessageByID(id int) (*model.FullMessage, error)
- func (_m *MessageRepo) GetFullMessagesByChannelIDAndPage(id int, page int) ([]model.FullMessage, error)
- func (_m *MessageRepo) GetFullMessagesByPage(page int) ([]model.FullMessage, error)
- func (_m *MessageRepo) GetFullMessagesByUserID(id int) ([]model.FullMessage, error)
- func (_m *MessageRepo) GetMessageByTitle(title string) (*model.DBMessage, error)
- func (_m *MessageRepo) GetMessagesCount() (int, error)
- func (_m *MessageRepo) GetMessagesCountByChannelID(id int) (int, error)
- type ReplyRepo
- type SavedRepo
- type UserRepo
- type WebUserRepo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateMock ¶
Types ¶
type ChannelRepo ¶
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 ¶
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 ¶
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 ¶
CreateReply provides a mock function with given fields: reply
type SavedRepo ¶
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 ¶
CreateSavedMessage provides a mock function with given fields: saved
func (*SavedRepo) DeleteSavedMessage ¶
DeleteSavedMessage provides a mock function with given fields: id
func (*SavedRepo) GetSavedMessageByID ¶
GetSavedMessageByID provides a mock function with given fields: id
type UserRepo ¶
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 ¶
CreateUser provides a mock function with given fields: user
func (*UserRepo) GetUserByID ¶
GetUserByID provides a mock function with given fields: id
type WebUserRepo ¶
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