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) AddUserRole(ctx context.Context, userID int32, roleID int32) error
- func (_m *Querier) AddUsersToRole(ctx context.Context, arg []models.AddUsersToRoleParams) (int64, 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) 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) DeletePendingUserByCookie(ctx context.Context, cookie pgtype.Text) error
- func (_m *Querier) DeleteRole(ctx context.Context, id int32) error
- func (_m *Querier) GetAdminLevel(ctx context.Context, userID int32) (models.GetAdminLevelRow, error)
- func (_m *Querier) GetGlineByIP(ctx context.Context, host string) (models.Gline, 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) 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) 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) RemoveUserRole(ctx context.Context, userID int32, roleID int32) error
- func (_m *Querier) RemoveUsersFromRole(ctx context.Context, userIds []int32, roleID int32) error
- func (_m *Querier) UpdateRole(ctx context.Context, arg models.UpdateRoleParams) error
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) 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) 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) 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) 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) 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) GetGlineByIP ¶ added in v0.0.3
GetGlineByIP provides a mock function with given fields: ctx, host
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) 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) 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) 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) UpdateRole ¶ added in v0.0.6
UpdateRole provides a mock function with given fields: ctx, arg