mocks

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DBTX

type DBTX struct {
	mock.Mock
}

DBTX is an autogenerated mock type for the DBTX type

func NewDBTX

func NewDBTX(t interface {
	mock.TestingT
	Cleanup(func())
}) *DBTX

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

func (*DBTX) Query

func (_m *DBTX) Query(_a0 context.Context, _a1 string, _a2 ...interface{}) (pgx.Rows, error)

Query provides a mock function with given fields: _a0, _a1, _a2

func (*DBTX) QueryRow

func (_m *DBTX) QueryRow(_a0 context.Context, _a1 string, _a2 ...interface{}) pgx.Row

QueryRow provides a mock function with given fields: _a0, _a1, _a2

type Querier

type Querier struct {
	mock.Mock
}

Querier is an autogenerated mock type for the Querier type

func NewQuerier

func NewQuerier(t interface {
	mock.TestingT
	Cleanup(func())
}) *Querier

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

func (_m *Querier) AddUserRole(ctx context.Context, userID int32, roleID int32) error

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

func (_m *Querier) CheckEmailExists(ctx context.Context, email string) ([]pgtype.Text, error)

CheckEmailExists provides a mock function with given fields: ctx, email

func (*Querier) CheckUsernameExists added in v0.0.4

func (_m *Querier) CheckUsernameExists(ctx context.Context, username string) ([]string, error)

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

func (_m *Querier) DeletePendingUserByCookie(ctx context.Context, cookie pgtype.Text) error

DeletePendingUserByCookie provides a mock function with given fields: ctx, cookie

func (*Querier) DeleteRole added in v0.0.6

func (_m *Querier) DeleteRole(ctx context.Context, id int32) error

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

func (_m *Querier) GetGlineByIP(ctx context.Context, host string) (models.Gline, error)

GetGlineByIP provides a mock function with given fields: ctx, host

func (*Querier) GetRoleByID added in v0.0.6

func (_m *Querier) GetRoleByID(ctx context.Context, id int32) (models.Role, error)

GetRoleByID provides a mock function with given fields: ctx, id

func (*Querier) GetRoleByName added in v0.0.6

func (_m *Querier) GetRoleByName(ctx context.Context, name string) (models.Role, error)

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

func (_m *Querier) GetUserByEmail(ctx context.Context, email string) (models.User, error)

GetUserByEmail provides a mock function with given fields: ctx, email

func (*Querier) GetUserByID

func (_m *Querier) GetUserByID(ctx context.Context, id int32) (models.GetUserByIDRow, error)

GetUserByID provides a mock function with given fields: ctx, id

func (*Querier) GetUserByUsername

func (_m *Querier) GetUserByUsername(ctx context.Context, username string) (models.User, error)

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

func (_m *Querier) GetWhiteListByIP(ctx context.Context, ip netip.Addr) (models.Whitelist, error)

GetWhiteListByIP provides a mock function with given fields: ctx, ip

func (*Querier) ListPendingUsers

func (_m *Querier) ListPendingUsers(ctx context.Context) ([]models.Pendinguser, error)

ListPendingUsers provides a mock function with given fields: ctx

func (*Querier) ListRoles added in v0.0.6

func (_m *Querier) ListRoles(ctx context.Context) ([]models.Role, error)

ListRoles provides a mock function with given fields: ctx

func (*Querier) ListUserRoles added in v0.0.6

func (_m *Querier) ListUserRoles(ctx context.Context, userID int32) ([]models.Role, error)

ListUserRoles provides a mock function with given fields: ctx, userID

func (*Querier) RemoveUserRole added in v0.0.6

func (_m *Querier) RemoveUserRole(ctx context.Context, userID int32, roleID int32) error

RemoveUserRole provides a mock function with given fields: ctx, userID, roleID

func (*Querier) RemoveUsersFromRole added in v0.0.6

func (_m *Querier) RemoveUsersFromRole(ctx context.Context, userIds []int32, roleID int32) error

RemoveUsersFromRole provides a mock function with given fields: ctx, userIds, roleID

func (*Querier) UpdateRole added in v0.0.6

func (_m *Querier) UpdateRole(ctx context.Context, arg models.UpdateRoleParams) error

UpdateRole provides a mock function with given fields: ctx, arg

Jump to

Keyboard shortcuts

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