Documentation
¶
Index ¶
- type DBTX
- func (_m *DBTX) CopyFrom(ctx context.Context, tableName pgx.Identifier, columnNames []string, ...) (int64, error)
- func (_m *DBTX) Exec(_a0 context.Context, _a1 string, _a2 ...interface{}) (pgconn.CommandTag, error)
- func (_m *DBTX) Query(_a0 context.Context, _a1 string, _a2 ...interface{}) (pgx.Rows, error)
- func (_m *DBTX) QueryRow(_a0 context.Context, _a1 string, _a2 ...interface{}) pgx.Row
- type Querier
- func (_m *Querier) AddChannelMember(ctx context.Context, arg models.AddChannelMemberParams) (models.AddChannelMemberRow, error)
- func (_m *Querier) AddUserRole(ctx context.Context, userID int32, roleID int32) error
- func (_m *Querier) AddUsersToRole(ctx context.Context, arg []models.AddUsersToRoleParams) (int64, error)
- func (_m *Querier) CheckChannelExists(ctx context.Context, id int32) (models.CheckChannelExistsRow, error)
- func (_m *Querier) CheckChannelMemberExists(ctx context.Context, channelID int32, userID int32) (models.CheckChannelMemberExistsRow, error)
- func (_m *Querier) CheckEmailExists(ctx context.Context, email string) ([]pgtype.Text, error)
- func (_m *Querier) CheckUsernameExists(ctx context.Context, username string) ([]string, error)
- func (_m *Querier) CleanupExpiredPasswordResetTokens(ctx context.Context, expiresAt int32, lastUpdated int32) error
- func (_m *Querier) CountChannelOwners(ctx context.Context, channelID int32) (int64, error)
- func (_m *Querier) CreatePasswordResetToken(ctx context.Context, arg models.CreatePasswordResetTokenParams) (models.PasswordResetToken, error)
- func (_m *Querier) CreatePendingUser(ctx context.Context, arg models.CreatePendingUserParams) (pgtype.Text, error)
- func (_m *Querier) CreateRole(ctx context.Context, arg models.CreateRoleParams) (models.Role, error)
- func (_m *Querier) CreateUser(ctx context.Context, arg models.CreateUserParams) (models.User, error)
- func (_m *Querier) DeleteExpiredPasswordResetTokens(ctx context.Context, expiresAt int32) error
- func (_m *Querier) DeletePendingUserByCookie(ctx context.Context, cookie pgtype.Text) error
- func (_m *Querier) DeleteRole(ctx context.Context, id int32) error
- func (_m *Querier) GetActivePasswordResetTokensByUserID(ctx context.Context, userID pgtype.Int4, expiresAt int32) ([]models.PasswordResetToken, error)
- func (_m *Querier) GetAdminLevel(ctx context.Context, userID int32) (models.GetAdminLevelRow, error)
- func (_m *Querier) GetChannelByID(ctx context.Context, id int32) (models.GetChannelByIDRow, error)
- func (_m *Querier) GetChannelByName(ctx context.Context, name string) (models.GetChannelByNameRow, error)
- func (_m *Querier) GetChannelDetails(ctx context.Context, id int32) (models.GetChannelDetailsRow, error)
- func (_m *Querier) GetChannelMembersByAccessLevel(ctx context.Context, channelID int32, access int32) ([]models.GetChannelMembersByAccessLevelRow, error)
- func (_m *Querier) GetChannelUserAccess(ctx context.Context, channelID int32, userID int32) (models.GetChannelUserAccessRow, error)
- func (_m *Querier) GetGlineByIP(ctx context.Context, host string) (models.Gline, error)
- func (_m *Querier) GetPasswordResetTokenByToken(ctx context.Context, token string) (models.PasswordResetToken, error)
- func (_m *Querier) GetPasswordResetTokenStats(ctx context.Context, expiresAt int32) (models.GetPasswordResetTokenStatsRow, error)
- func (_m *Querier) GetPendingUserByCookie(ctx context.Context, cookie pgtype.Text) (models.Pendinguser, error)
- func (_m *Querier) GetRoleByID(ctx context.Context, id int32) (models.Role, error)
- func (_m *Querier) GetRoleByName(ctx context.Context, name string) (models.Role, error)
- func (_m *Querier) GetUser(ctx context.Context, arg models.GetUserParams) (models.GetUserRow, error)
- func (_m *Querier) GetUserByEmail(ctx context.Context, email string) (models.User, error)
- func (_m *Querier) GetUserByID(ctx context.Context, id int32) (models.GetUserByIDRow, error)
- func (_m *Querier) GetUserByUsername(ctx context.Context, username string) (models.User, error)
- func (_m *Querier) GetUserChannelMemberships(ctx context.Context, userID int32) ([]models.GetUserChannelMembershipsRow, error)
- func (_m *Querier) GetUserChannels(ctx context.Context, userID int32) ([]models.GetUserChannelsRow, error)
- func (_m *Querier) GetUsersByUsernames(ctx context.Context, userids []string) ([]models.GetUsersByUsernamesRow, error)
- func (_m *Querier) GetWhiteListByIP(ctx context.Context, ip netip.Addr) (models.Whitelist, error)
- func (_m *Querier) InvalidateUserPasswordResetTokens(ctx context.Context, userID pgtype.Int4, lastUpdated int32) error
- func (_m *Querier) ListPendingUsers(ctx context.Context) ([]models.Pendinguser, error)
- func (_m *Querier) ListRoles(ctx context.Context) ([]models.Role, error)
- func (_m *Querier) ListUserRoles(ctx context.Context, userID int32) ([]models.Role, error)
- func (_m *Querier) MarkPasswordResetTokenAsUsed(ctx context.Context, arg models.MarkPasswordResetTokenAsUsedParams) error
- func (_m *Querier) RemoveChannelMember(ctx context.Context, arg models.RemoveChannelMemberParams) (models.RemoveChannelMemberRow, error)
- func (_m *Querier) RemoveUserRole(ctx context.Context, userID int32, roleID int32) error
- func (_m *Querier) RemoveUsersFromRole(ctx context.Context, userIds []int32, roleID int32) error
- func (_m *Querier) SearchChannels(ctx context.Context, arg models.SearchChannelsParams) ([]models.SearchChannelsRow, error)
- func (_m *Querier) SearchChannelsCount(ctx context.Context, name string) (int64, error)
- func (_m *Querier) UpdateChannelSettings(ctx context.Context, arg models.UpdateChannelSettingsParams) (models.UpdateChannelSettingsRow, error)
- func (_m *Querier) UpdateRole(ctx context.Context, arg models.UpdateRoleParams) error
- func (_m *Querier) UpdateUserFlags(ctx context.Context, arg models.UpdateUserFlagsParams) error
- func (_m *Querier) UpdateUserPassword(ctx context.Context, arg models.UpdateUserPasswordParams) error
- func (_m *Querier) UpdateUserTotpKey(ctx context.Context, arg models.UpdateUserTotpKeyParams) error
- func (_m *Querier) ValidatePasswordResetToken(ctx context.Context, token string, expiresAt int32) (models.PasswordResetToken, error)
- type ServiceInterface
- func (_m *ServiceInterface) AddChannelMember(ctx context.Context, arg models.AddChannelMemberParams) (models.AddChannelMemberRow, error)
- func (_m *ServiceInterface) AddUserRole(ctx context.Context, userID int32, roleID int32) error
- func (_m *ServiceInterface) AddUsersToRole(ctx context.Context, arg []models.AddUsersToRoleParams) (int64, error)
- func (_m *ServiceInterface) CheckChannelExists(ctx context.Context, id int32) (models.CheckChannelExistsRow, error)
- func (_m *ServiceInterface) CheckChannelMemberExists(ctx context.Context, channelID int32, userID int32) (models.CheckChannelMemberExistsRow, error)
- func (_m *ServiceInterface) CheckEmailExists(ctx context.Context, email string) ([]pgtype.Text, error)
- func (_m *ServiceInterface) CheckUsernameExists(ctx context.Context, username string) ([]string, error)
- func (_m *ServiceInterface) CleanupExpiredPasswordResetTokens(ctx context.Context, expiresAt int32, lastUpdated int32) error
- func (_m *ServiceInterface) CountChannelOwners(ctx context.Context, channelID int32) (int64, error)
- func (_m *ServiceInterface) CreatePasswordResetToken(ctx context.Context, arg models.CreatePasswordResetTokenParams) (models.PasswordResetToken, error)
- func (_m *ServiceInterface) CreatePendingUser(ctx context.Context, arg models.CreatePendingUserParams) (pgtype.Text, error)
- func (_m *ServiceInterface) CreateRole(ctx context.Context, arg models.CreateRoleParams) (models.Role, error)
- func (_m *ServiceInterface) CreateUser(ctx context.Context, arg models.CreateUserParams) (models.User, error)
- func (_m *ServiceInterface) DeleteExpiredPasswordResetTokens(ctx context.Context, expiresAt int32) error
- func (_m *ServiceInterface) DeletePendingUserByCookie(ctx context.Context, cookie pgtype.Text) error
- func (_m *ServiceInterface) DeleteRole(ctx context.Context, id int32) error
- func (_m *ServiceInterface) GetActivePasswordResetTokensByUserID(ctx context.Context, userID pgtype.Int4, expiresAt int32) ([]models.PasswordResetToken, error)
- func (_m *ServiceInterface) GetAdminLevel(ctx context.Context, userID int32) (models.GetAdminLevelRow, error)
- func (_m *ServiceInterface) GetChannelByID(ctx context.Context, id int32) (models.GetChannelByIDRow, error)
- func (_m *ServiceInterface) GetChannelByName(ctx context.Context, name string) (models.GetChannelByNameRow, error)
- func (_m *ServiceInterface) GetChannelDetails(ctx context.Context, id int32) (models.GetChannelDetailsRow, error)
- func (_m *ServiceInterface) GetChannelMembersByAccessLevel(ctx context.Context, channelID int32, access int32) ([]models.GetChannelMembersByAccessLevelRow, error)
- func (_m *ServiceInterface) GetChannelUserAccess(ctx context.Context, channelID int32, userID int32) (models.GetChannelUserAccessRow, error)
- func (_m *ServiceInterface) GetGlineByIP(ctx context.Context, host string) (models.Gline, error)
- func (_m *ServiceInterface) GetPasswordResetTokenByToken(ctx context.Context, token string) (models.PasswordResetToken, error)
- func (_m *ServiceInterface) GetPasswordResetTokenStats(ctx context.Context, expiresAt int32) (models.GetPasswordResetTokenStatsRow, error)
- func (_m *ServiceInterface) GetPendingUserByCookie(ctx context.Context, cookie pgtype.Text) (models.Pendinguser, error)
- func (_m *ServiceInterface) GetRoleByID(ctx context.Context, id int32) (models.Role, error)
- func (_m *ServiceInterface) GetRoleByName(ctx context.Context, name string) (models.Role, error)
- func (_m *ServiceInterface) GetUser(ctx context.Context, arg models.GetUserParams) (models.GetUserRow, error)
- func (_m *ServiceInterface) GetUserByEmail(ctx context.Context, email string) (models.User, error)
- func (_m *ServiceInterface) GetUserByID(ctx context.Context, id int32) (models.GetUserByIDRow, error)
- func (_m *ServiceInterface) GetUserByUsername(ctx context.Context, username string) (models.User, error)
- func (_m *ServiceInterface) GetUserChannelMemberships(ctx context.Context, userID int32) ([]models.GetUserChannelMembershipsRow, error)
- func (_m *ServiceInterface) GetUserChannels(ctx context.Context, userID int32) ([]models.GetUserChannelsRow, error)
- func (_m *ServiceInterface) GetUsersByUsernames(ctx context.Context, userids []string) ([]models.GetUsersByUsernamesRow, error)
- func (_m *ServiceInterface) GetWhiteListByIP(ctx context.Context, ip netip.Addr) (models.Whitelist, error)
- func (_m *ServiceInterface) InvalidateUserPasswordResetTokens(ctx context.Context, userID pgtype.Int4, lastUpdated int32) error
- func (_m *ServiceInterface) ListPendingUsers(ctx context.Context) ([]models.Pendinguser, error)
- func (_m *ServiceInterface) ListRoles(ctx context.Context) ([]models.Role, error)
- func (_m *ServiceInterface) ListUserRoles(ctx context.Context, userID int32) ([]models.Role, error)
- func (_m *ServiceInterface) MarkPasswordResetTokenAsUsed(ctx context.Context, arg models.MarkPasswordResetTokenAsUsedParams) error
- func (_m *ServiceInterface) RemoveChannelMember(ctx context.Context, arg models.RemoveChannelMemberParams) (models.RemoveChannelMemberRow, error)
- func (_m *ServiceInterface) RemoveUserRole(ctx context.Context, userID int32, roleID int32) error
- func (_m *ServiceInterface) RemoveUsersFromRole(ctx context.Context, userIds []int32, roleID int32) error
- func (_m *ServiceInterface) SearchChannels(ctx context.Context, arg models.SearchChannelsParams) ([]models.SearchChannelsRow, error)
- func (_m *ServiceInterface) SearchChannelsCount(ctx context.Context, name string) (int64, error)
- func (_m *ServiceInterface) UpdateChannelSettings(ctx context.Context, arg models.UpdateChannelSettingsParams) (models.UpdateChannelSettingsRow, error)
- func (_m *ServiceInterface) UpdateRole(ctx context.Context, arg models.UpdateRoleParams) error
- func (_m *ServiceInterface) UpdateUserFlags(ctx context.Context, arg models.UpdateUserFlagsParams) error
- func (_m *ServiceInterface) UpdateUserPassword(ctx context.Context, arg models.UpdateUserPasswordParams) error
- func (_m *ServiceInterface) UpdateUserTotpKey(ctx context.Context, arg models.UpdateUserTotpKeyParams) error
- func (_m *ServiceInterface) ValidatePasswordResetToken(ctx context.Context, token string, expiresAt int32) (models.PasswordResetToken, error)
- func (_m *ServiceInterface) WithTx(tx pgx.Tx) models.ServiceInterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DBTX ¶
DBTX is an autogenerated mock type for the DBTX type
func NewDBTX ¶
NewDBTX creates a new instance of DBTX. 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 (*DBTX) CopyFrom ¶ added in v0.0.6
func (_m *DBTX) CopyFrom(ctx context.Context, tableName pgx.Identifier, columnNames []string, rowSrc pgx.CopyFromSource) (int64, error)
CopyFrom provides a mock function with given fields: ctx, tableName, columnNames, rowSrc
func (*DBTX) Exec ¶
func (_m *DBTX) Exec(_a0 context.Context, _a1 string, _a2 ...interface{}) (pgconn.CommandTag, error)
Exec provides a mock function with given fields: _a0, _a1, _a2
type Querier ¶
Querier is an autogenerated mock type for the Querier type
func NewQuerier ¶
NewQuerier creates a new instance of Querier. 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 (*Querier) AddChannelMember ¶ added in v0.3.0
func (_m *Querier) AddChannelMember(ctx context.Context, arg models.AddChannelMemberParams) (models.AddChannelMemberRow, error)
AddChannelMember provides a mock function with given fields: ctx, arg
func (*Querier) AddUserRole ¶ added in v0.0.6
AddUserRole provides a mock function with given fields: ctx, userID, roleID
func (*Querier) AddUsersToRole ¶ added in v0.0.6
func (_m *Querier) AddUsersToRole(ctx context.Context, arg []models.AddUsersToRoleParams) (int64, error)
AddUsersToRole provides a mock function with given fields: ctx, arg
func (*Querier) CheckChannelExists ¶ added in v0.3.0
func (_m *Querier) CheckChannelExists(ctx context.Context, id int32) (models.CheckChannelExistsRow, error)
CheckChannelExists provides a mock function with given fields: ctx, id
func (*Querier) CheckChannelMemberExists ¶ added in v0.3.0
func (_m *Querier) CheckChannelMemberExists(ctx context.Context, channelID int32, userID int32) (models.CheckChannelMemberExistsRow, error)
CheckChannelMemberExists provides a mock function with given fields: ctx, channelID, userID
func (*Querier) CheckEmailExists ¶ added in v0.0.4
CheckEmailExists provides a mock function with given fields: ctx, email
func (*Querier) CheckUsernameExists ¶ added in v0.0.4
CheckUsernameExists provides a mock function with given fields: ctx, username
func (*Querier) CleanupExpiredPasswordResetTokens ¶ added in v0.3.0
func (_m *Querier) CleanupExpiredPasswordResetTokens(ctx context.Context, expiresAt int32, lastUpdated int32) error
CleanupExpiredPasswordResetTokens provides a mock function with given fields: ctx, expiresAt, lastUpdated
func (*Querier) CountChannelOwners ¶ added in v0.3.0
CountChannelOwners provides a mock function with given fields: ctx, channelID
func (*Querier) CreatePasswordResetToken ¶ added in v0.3.0
func (_m *Querier) CreatePasswordResetToken(ctx context.Context, arg models.CreatePasswordResetTokenParams) (models.PasswordResetToken, error)
CreatePasswordResetToken provides a mock function with given fields: ctx, arg
func (*Querier) CreatePendingUser ¶
func (_m *Querier) CreatePendingUser(ctx context.Context, arg models.CreatePendingUserParams) (pgtype.Text, error)
CreatePendingUser provides a mock function with given fields: ctx, arg
func (*Querier) CreateRole ¶ added in v0.0.6
func (_m *Querier) CreateRole(ctx context.Context, arg models.CreateRoleParams) (models.Role, error)
CreateRole provides a mock function with given fields: ctx, arg
func (*Querier) CreateUser ¶
func (_m *Querier) CreateUser(ctx context.Context, arg models.CreateUserParams) (models.User, error)
CreateUser provides a mock function with given fields: ctx, arg
func (*Querier) DeleteExpiredPasswordResetTokens ¶ added in v0.3.0
DeleteExpiredPasswordResetTokens provides a mock function with given fields: ctx, expiresAt
func (*Querier) DeletePendingUserByCookie ¶
DeletePendingUserByCookie provides a mock function with given fields: ctx, cookie
func (*Querier) DeleteRole ¶ added in v0.0.6
DeleteRole provides a mock function with given fields: ctx, id
func (*Querier) GetActivePasswordResetTokensByUserID ¶ added in v0.3.0
func (_m *Querier) GetActivePasswordResetTokensByUserID(ctx context.Context, userID pgtype.Int4, expiresAt int32) ([]models.PasswordResetToken, error)
GetActivePasswordResetTokensByUserID provides a mock function with given fields: ctx, userID, expiresAt
func (*Querier) GetAdminLevel ¶ added in v0.0.6
func (_m *Querier) GetAdminLevel(ctx context.Context, userID int32) (models.GetAdminLevelRow, error)
GetAdminLevel provides a mock function with given fields: ctx, userID
func (*Querier) GetChannelByID ¶ added in v0.3.0
GetChannelByID provides a mock function with given fields: ctx, id
func (*Querier) GetChannelByName ¶ added in v0.3.0
func (_m *Querier) GetChannelByName(ctx context.Context, name string) (models.GetChannelByNameRow, error)
GetChannelByName provides a mock function with given fields: ctx, name
func (*Querier) GetChannelDetails ¶ added in v0.3.0
func (_m *Querier) GetChannelDetails(ctx context.Context, id int32) (models.GetChannelDetailsRow, error)
GetChannelDetails provides a mock function with given fields: ctx, id
func (*Querier) GetChannelMembersByAccessLevel ¶ added in v0.3.0
func (_m *Querier) GetChannelMembersByAccessLevel(ctx context.Context, channelID int32, access int32) ([]models.GetChannelMembersByAccessLevelRow, error)
GetChannelMembersByAccessLevel provides a mock function with given fields: ctx, channelID, access
func (*Querier) GetChannelUserAccess ¶ added in v0.3.0
func (_m *Querier) GetChannelUserAccess(ctx context.Context, channelID int32, userID int32) (models.GetChannelUserAccessRow, error)
GetChannelUserAccess provides a mock function with given fields: ctx, channelID, userID
func (*Querier) GetGlineByIP ¶ added in v0.0.3
GetGlineByIP provides a mock function with given fields: ctx, host
func (*Querier) GetPasswordResetTokenByToken ¶ added in v0.3.0
func (_m *Querier) GetPasswordResetTokenByToken(ctx context.Context, token string) (models.PasswordResetToken, error)
GetPasswordResetTokenByToken provides a mock function with given fields: ctx, token
func (*Querier) GetPasswordResetTokenStats ¶ added in v0.3.0
func (_m *Querier) GetPasswordResetTokenStats(ctx context.Context, expiresAt int32) (models.GetPasswordResetTokenStatsRow, error)
GetPasswordResetTokenStats provides a mock function with given fields: ctx, expiresAt
func (*Querier) GetPendingUserByCookie ¶ added in v0.1.0
func (_m *Querier) GetPendingUserByCookie(ctx context.Context, cookie pgtype.Text) (models.Pendinguser, error)
GetPendingUserByCookie provides a mock function with given fields: ctx, cookie
func (*Querier) GetRoleByID ¶ added in v0.0.6
GetRoleByID provides a mock function with given fields: ctx, id
func (*Querier) GetRoleByName ¶ added in v0.0.6
GetRoleByName provides a mock function with given fields: ctx, name
func (*Querier) GetUser ¶ added in v0.0.6
func (_m *Querier) GetUser(ctx context.Context, arg models.GetUserParams) (models.GetUserRow, error)
GetUser provides a mock function with given fields: ctx, arg
func (*Querier) GetUserByEmail ¶
GetUserByEmail provides a mock function with given fields: ctx, email
func (*Querier) GetUserByID ¶
GetUserByID provides a mock function with given fields: ctx, id
func (*Querier) GetUserByUsername ¶
GetUserByUsername provides a mock function with given fields: ctx, username
func (*Querier) GetUserChannelMemberships ¶ added in v0.3.0
func (_m *Querier) GetUserChannelMemberships(ctx context.Context, userID int32) ([]models.GetUserChannelMembershipsRow, error)
GetUserChannelMemberships provides a mock function with given fields: ctx, userID
func (*Querier) GetUserChannels ¶
func (_m *Querier) GetUserChannels(ctx context.Context, userID int32) ([]models.GetUserChannelsRow, error)
GetUserChannels provides a mock function with given fields: ctx, userID
func (*Querier) GetUsersByUsernames ¶ added in v0.0.6
func (_m *Querier) GetUsersByUsernames(ctx context.Context, userids []string) ([]models.GetUsersByUsernamesRow, error)
GetUsersByUsernames provides a mock function with given fields: ctx, userids
func (*Querier) GetWhiteListByIP ¶ added in v0.0.3
GetWhiteListByIP provides a mock function with given fields: ctx, ip
func (*Querier) InvalidateUserPasswordResetTokens ¶ added in v0.3.0
func (_m *Querier) InvalidateUserPasswordResetTokens(ctx context.Context, userID pgtype.Int4, lastUpdated int32) error
InvalidateUserPasswordResetTokens provides a mock function with given fields: ctx, userID, lastUpdated
func (*Querier) ListPendingUsers ¶
ListPendingUsers provides a mock function with given fields: ctx
func (*Querier) ListRoles ¶ added in v0.0.6
ListRoles provides a mock function with given fields: ctx
func (*Querier) ListUserRoles ¶ added in v0.0.6
ListUserRoles provides a mock function with given fields: ctx, userID
func (*Querier) MarkPasswordResetTokenAsUsed ¶ added in v0.3.0
func (_m *Querier) MarkPasswordResetTokenAsUsed(ctx context.Context, arg models.MarkPasswordResetTokenAsUsedParams) error
MarkPasswordResetTokenAsUsed provides a mock function with given fields: ctx, arg
func (*Querier) RemoveChannelMember ¶ added in v0.3.0
func (_m *Querier) RemoveChannelMember(ctx context.Context, arg models.RemoveChannelMemberParams) (models.RemoveChannelMemberRow, error)
RemoveChannelMember provides a mock function with given fields: ctx, arg
func (*Querier) RemoveUserRole ¶ added in v0.0.6
RemoveUserRole provides a mock function with given fields: ctx, userID, roleID
func (*Querier) RemoveUsersFromRole ¶ added in v0.0.6
RemoveUsersFromRole provides a mock function with given fields: ctx, userIds, roleID
func (*Querier) SearchChannels ¶ added in v0.3.0
func (_m *Querier) SearchChannels(ctx context.Context, arg models.SearchChannelsParams) ([]models.SearchChannelsRow, error)
SearchChannels provides a mock function with given fields: ctx, arg
func (*Querier) SearchChannelsCount ¶ added in v0.3.0
SearchChannelsCount provides a mock function with given fields: ctx, name
func (*Querier) UpdateChannelSettings ¶ added in v0.3.0
func (_m *Querier) UpdateChannelSettings(ctx context.Context, arg models.UpdateChannelSettingsParams) (models.UpdateChannelSettingsRow, error)
UpdateChannelSettings provides a mock function with given fields: ctx, arg
func (*Querier) UpdateRole ¶ added in v0.0.6
UpdateRole provides a mock function with given fields: ctx, arg
func (*Querier) UpdateUserFlags ¶ added in v0.2.0
UpdateUserFlags provides a mock function with given fields: ctx, arg
func (*Querier) UpdateUserPassword ¶ added in v0.2.0
func (_m *Querier) UpdateUserPassword(ctx context.Context, arg models.UpdateUserPasswordParams) error
UpdateUserPassword provides a mock function with given fields: ctx, arg
func (*Querier) UpdateUserTotpKey ¶ added in v0.2.0
UpdateUserTotpKey provides a mock function with given fields: ctx, arg
func (*Querier) ValidatePasswordResetToken ¶ added in v0.3.0
func (_m *Querier) ValidatePasswordResetToken(ctx context.Context, token string, expiresAt int32) (models.PasswordResetToken, error)
ValidatePasswordResetToken provides a mock function with given fields: ctx, token, expiresAt
type ServiceInterface ¶ added in v0.1.0
ServiceInterface is an autogenerated mock type for the ServiceInterface type
func NewServiceInterface ¶ added in v0.1.0
func NewServiceInterface(t interface {
mock.TestingT
Cleanup(func())
}) *ServiceInterface
NewServiceInterface creates a new instance of ServiceInterface. 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 (*ServiceInterface) AddChannelMember ¶ added in v0.3.0
func (_m *ServiceInterface) AddChannelMember(ctx context.Context, arg models.AddChannelMemberParams) (models.AddChannelMemberRow, error)
AddChannelMember provides a mock function with given fields: ctx, arg
func (*ServiceInterface) AddUserRole ¶ added in v0.1.0
AddUserRole provides a mock function with given fields: ctx, userID, roleID
func (*ServiceInterface) AddUsersToRole ¶ added in v0.1.0
func (_m *ServiceInterface) AddUsersToRole(ctx context.Context, arg []models.AddUsersToRoleParams) (int64, error)
AddUsersToRole provides a mock function with given fields: ctx, arg
func (*ServiceInterface) CheckChannelExists ¶ added in v0.3.0
func (_m *ServiceInterface) CheckChannelExists(ctx context.Context, id int32) (models.CheckChannelExistsRow, error)
CheckChannelExists provides a mock function with given fields: ctx, id
func (*ServiceInterface) CheckChannelMemberExists ¶ added in v0.3.0
func (_m *ServiceInterface) CheckChannelMemberExists(ctx context.Context, channelID int32, userID int32) (models.CheckChannelMemberExistsRow, error)
CheckChannelMemberExists provides a mock function with given fields: ctx, channelID, userID
func (*ServiceInterface) CheckEmailExists ¶ added in v0.1.0
func (_m *ServiceInterface) CheckEmailExists(ctx context.Context, email string) ([]pgtype.Text, error)
CheckEmailExists provides a mock function with given fields: ctx, email
func (*ServiceInterface) CheckUsernameExists ¶ added in v0.1.0
func (_m *ServiceInterface) CheckUsernameExists(ctx context.Context, username string) ([]string, error)
CheckUsernameExists provides a mock function with given fields: ctx, username
func (*ServiceInterface) CleanupExpiredPasswordResetTokens ¶ added in v0.3.0
func (_m *ServiceInterface) CleanupExpiredPasswordResetTokens(ctx context.Context, expiresAt int32, lastUpdated int32) error
CleanupExpiredPasswordResetTokens provides a mock function with given fields: ctx, expiresAt, lastUpdated
func (*ServiceInterface) CountChannelOwners ¶ added in v0.3.0
CountChannelOwners provides a mock function with given fields: ctx, channelID
func (*ServiceInterface) CreatePasswordResetToken ¶ added in v0.3.0
func (_m *ServiceInterface) CreatePasswordResetToken(ctx context.Context, arg models.CreatePasswordResetTokenParams) (models.PasswordResetToken, error)
CreatePasswordResetToken provides a mock function with given fields: ctx, arg
func (*ServiceInterface) CreatePendingUser ¶ added in v0.1.0
func (_m *ServiceInterface) CreatePendingUser(ctx context.Context, arg models.CreatePendingUserParams) (pgtype.Text, error)
CreatePendingUser provides a mock function with given fields: ctx, arg
func (*ServiceInterface) CreateRole ¶ added in v0.1.0
func (_m *ServiceInterface) CreateRole(ctx context.Context, arg models.CreateRoleParams) (models.Role, error)
CreateRole provides a mock function with given fields: ctx, arg
func (*ServiceInterface) CreateUser ¶ added in v0.1.0
func (_m *ServiceInterface) CreateUser(ctx context.Context, arg models.CreateUserParams) (models.User, error)
CreateUser provides a mock function with given fields: ctx, arg
func (*ServiceInterface) DeleteExpiredPasswordResetTokens ¶ added in v0.3.0
func (_m *ServiceInterface) DeleteExpiredPasswordResetTokens(ctx context.Context, expiresAt int32) error
DeleteExpiredPasswordResetTokens provides a mock function with given fields: ctx, expiresAt
func (*ServiceInterface) DeletePendingUserByCookie ¶ added in v0.1.0
func (_m *ServiceInterface) DeletePendingUserByCookie(ctx context.Context, cookie pgtype.Text) error
DeletePendingUserByCookie provides a mock function with given fields: ctx, cookie
func (*ServiceInterface) DeleteRole ¶ added in v0.1.0
func (_m *ServiceInterface) DeleteRole(ctx context.Context, id int32) error
DeleteRole provides a mock function with given fields: ctx, id
func (*ServiceInterface) GetActivePasswordResetTokensByUserID ¶ added in v0.3.0
func (_m *ServiceInterface) GetActivePasswordResetTokensByUserID(ctx context.Context, userID pgtype.Int4, expiresAt int32) ([]models.PasswordResetToken, error)
GetActivePasswordResetTokensByUserID provides a mock function with given fields: ctx, userID, expiresAt
func (*ServiceInterface) GetAdminLevel ¶ added in v0.1.0
func (_m *ServiceInterface) GetAdminLevel(ctx context.Context, userID int32) (models.GetAdminLevelRow, error)
GetAdminLevel provides a mock function with given fields: ctx, userID
func (*ServiceInterface) GetChannelByID ¶ added in v0.3.0
func (_m *ServiceInterface) GetChannelByID(ctx context.Context, id int32) (models.GetChannelByIDRow, error)
GetChannelByID provides a mock function with given fields: ctx, id
func (*ServiceInterface) GetChannelByName ¶ added in v0.3.0
func (_m *ServiceInterface) GetChannelByName(ctx context.Context, name string) (models.GetChannelByNameRow, error)
GetChannelByName provides a mock function with given fields: ctx, name
func (*ServiceInterface) GetChannelDetails ¶ added in v0.3.0
func (_m *ServiceInterface) GetChannelDetails(ctx context.Context, id int32) (models.GetChannelDetailsRow, error)
GetChannelDetails provides a mock function with given fields: ctx, id
func (*ServiceInterface) GetChannelMembersByAccessLevel ¶ added in v0.3.0
func (_m *ServiceInterface) GetChannelMembersByAccessLevel(ctx context.Context, channelID int32, access int32) ([]models.GetChannelMembersByAccessLevelRow, error)
GetChannelMembersByAccessLevel provides a mock function with given fields: ctx, channelID, access
func (*ServiceInterface) GetChannelUserAccess ¶ added in v0.3.0
func (_m *ServiceInterface) GetChannelUserAccess(ctx context.Context, channelID int32, userID int32) (models.GetChannelUserAccessRow, error)
GetChannelUserAccess provides a mock function with given fields: ctx, channelID, userID
func (*ServiceInterface) GetGlineByIP ¶ added in v0.1.0
GetGlineByIP provides a mock function with given fields: ctx, host
func (*ServiceInterface) GetPasswordResetTokenByToken ¶ added in v0.3.0
func (_m *ServiceInterface) GetPasswordResetTokenByToken(ctx context.Context, token string) (models.PasswordResetToken, error)
GetPasswordResetTokenByToken provides a mock function with given fields: ctx, token
func (*ServiceInterface) GetPasswordResetTokenStats ¶ added in v0.3.0
func (_m *ServiceInterface) GetPasswordResetTokenStats(ctx context.Context, expiresAt int32) (models.GetPasswordResetTokenStatsRow, error)
GetPasswordResetTokenStats provides a mock function with given fields: ctx, expiresAt
func (*ServiceInterface) GetPendingUserByCookie ¶ added in v0.1.0
func (_m *ServiceInterface) GetPendingUserByCookie(ctx context.Context, cookie pgtype.Text) (models.Pendinguser, error)
GetPendingUserByCookie provides a mock function with given fields: ctx, cookie
func (*ServiceInterface) GetRoleByID ¶ added in v0.1.0
GetRoleByID provides a mock function with given fields: ctx, id
func (*ServiceInterface) GetRoleByName ¶ added in v0.1.0
GetRoleByName provides a mock function with given fields: ctx, name
func (*ServiceInterface) GetUser ¶ added in v0.1.0
func (_m *ServiceInterface) GetUser(ctx context.Context, arg models.GetUserParams) (models.GetUserRow, error)
GetUser provides a mock function with given fields: ctx, arg
func (*ServiceInterface) GetUserByEmail ¶ added in v0.1.0
GetUserByEmail provides a mock function with given fields: ctx, email
func (*ServiceInterface) GetUserByID ¶ added in v0.1.0
func (_m *ServiceInterface) GetUserByID(ctx context.Context, id int32) (models.GetUserByIDRow, error)
GetUserByID provides a mock function with given fields: ctx, id
func (*ServiceInterface) GetUserByUsername ¶ added in v0.1.0
func (_m *ServiceInterface) GetUserByUsername(ctx context.Context, username string) (models.User, error)
GetUserByUsername provides a mock function with given fields: ctx, username
func (*ServiceInterface) GetUserChannelMemberships ¶ added in v0.3.0
func (_m *ServiceInterface) GetUserChannelMemberships(ctx context.Context, userID int32) ([]models.GetUserChannelMembershipsRow, error)
GetUserChannelMemberships provides a mock function with given fields: ctx, userID
func (*ServiceInterface) GetUserChannels ¶ added in v0.1.0
func (_m *ServiceInterface) GetUserChannels(ctx context.Context, userID int32) ([]models.GetUserChannelsRow, error)
GetUserChannels provides a mock function with given fields: ctx, userID
func (*ServiceInterface) GetUsersByUsernames ¶ added in v0.1.0
func (_m *ServiceInterface) GetUsersByUsernames(ctx context.Context, userids []string) ([]models.GetUsersByUsernamesRow, error)
GetUsersByUsernames provides a mock function with given fields: ctx, userids
func (*ServiceInterface) GetWhiteListByIP ¶ added in v0.1.0
func (_m *ServiceInterface) GetWhiteListByIP(ctx context.Context, ip netip.Addr) (models.Whitelist, error)
GetWhiteListByIP provides a mock function with given fields: ctx, ip
func (*ServiceInterface) InvalidateUserPasswordResetTokens ¶ added in v0.3.0
func (_m *ServiceInterface) InvalidateUserPasswordResetTokens(ctx context.Context, userID pgtype.Int4, lastUpdated int32) error
InvalidateUserPasswordResetTokens provides a mock function with given fields: ctx, userID, lastUpdated
func (*ServiceInterface) ListPendingUsers ¶ added in v0.1.0
func (_m *ServiceInterface) ListPendingUsers(ctx context.Context) ([]models.Pendinguser, error)
ListPendingUsers provides a mock function with given fields: ctx
func (*ServiceInterface) ListRoles ¶ added in v0.1.0
ListRoles provides a mock function with given fields: ctx
func (*ServiceInterface) ListUserRoles ¶ added in v0.1.0
ListUserRoles provides a mock function with given fields: ctx, userID
func (*ServiceInterface) MarkPasswordResetTokenAsUsed ¶ added in v0.3.0
func (_m *ServiceInterface) MarkPasswordResetTokenAsUsed(ctx context.Context, arg models.MarkPasswordResetTokenAsUsedParams) error
MarkPasswordResetTokenAsUsed provides a mock function with given fields: ctx, arg
func (*ServiceInterface) RemoveChannelMember ¶ added in v0.3.0
func (_m *ServiceInterface) RemoveChannelMember(ctx context.Context, arg models.RemoveChannelMemberParams) (models.RemoveChannelMemberRow, error)
RemoveChannelMember provides a mock function with given fields: ctx, arg
func (*ServiceInterface) RemoveUserRole ¶ added in v0.1.0
RemoveUserRole provides a mock function with given fields: ctx, userID, roleID
func (*ServiceInterface) RemoveUsersFromRole ¶ added in v0.1.0
func (_m *ServiceInterface) RemoveUsersFromRole(ctx context.Context, userIds []int32, roleID int32) error
RemoveUsersFromRole provides a mock function with given fields: ctx, userIds, roleID
func (*ServiceInterface) SearchChannels ¶ added in v0.3.0
func (_m *ServiceInterface) SearchChannels(ctx context.Context, arg models.SearchChannelsParams) ([]models.SearchChannelsRow, error)
SearchChannels provides a mock function with given fields: ctx, arg
func (*ServiceInterface) SearchChannelsCount ¶ added in v0.3.0
SearchChannelsCount provides a mock function with given fields: ctx, name
func (*ServiceInterface) UpdateChannelSettings ¶ added in v0.3.0
func (_m *ServiceInterface) UpdateChannelSettings(ctx context.Context, arg models.UpdateChannelSettingsParams) (models.UpdateChannelSettingsRow, error)
UpdateChannelSettings provides a mock function with given fields: ctx, arg
func (*ServiceInterface) UpdateRole ¶ added in v0.1.0
func (_m *ServiceInterface) UpdateRole(ctx context.Context, arg models.UpdateRoleParams) error
UpdateRole provides a mock function with given fields: ctx, arg
func (*ServiceInterface) UpdateUserFlags ¶ added in v0.2.0
func (_m *ServiceInterface) UpdateUserFlags(ctx context.Context, arg models.UpdateUserFlagsParams) error
UpdateUserFlags provides a mock function with given fields: ctx, arg
func (*ServiceInterface) UpdateUserPassword ¶ added in v0.2.0
func (_m *ServiceInterface) UpdateUserPassword(ctx context.Context, arg models.UpdateUserPasswordParams) error
UpdateUserPassword provides a mock function with given fields: ctx, arg
func (*ServiceInterface) UpdateUserTotpKey ¶ added in v0.2.0
func (_m *ServiceInterface) UpdateUserTotpKey(ctx context.Context, arg models.UpdateUserTotpKeyParams) error
UpdateUserTotpKey provides a mock function with given fields: ctx, arg
func (*ServiceInterface) ValidatePasswordResetToken ¶ added in v0.3.0
func (_m *ServiceInterface) ValidatePasswordResetToken(ctx context.Context, token string, expiresAt int32) (models.PasswordResetToken, error)
ValidatePasswordResetToken provides a mock function with given fields: ctx, token, expiresAt
func (*ServiceInterface) WithTx ¶ added in v0.1.0
func (_m *ServiceInterface) WithTx(tx pgx.Tx) models.ServiceInterface
WithTx provides a mock function with given fields: tx