-
Notifications
You must be signed in to change notification settings - Fork 1
/
querier.go
43 lines (38 loc) · 1.99 KB
/
querier.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// Code generated by sqlc. DO NOT EDIT.
// versions:
// sqlc v1.18.0
package models
import (
"context"
"net/netip"
"github.com/jackc/pgx/v5/pgtype"
)
type Querier interface {
AddUserRole(ctx context.Context, userID int32, roleID int32) error
AddUsersToRole(ctx context.Context, arg []AddUsersToRoleParams) (int64, error)
CheckEmailExists(ctx context.Context, email string) ([]pgtype.Text, error)
CheckUsernameExists(ctx context.Context, username string) ([]string, error)
CreatePendingUser(ctx context.Context, arg CreatePendingUserParams) (pgtype.Text, error)
CreateRole(ctx context.Context, arg CreateRoleParams) (Role, error)
CreateUser(ctx context.Context, arg CreateUserParams) (User, error)
DeletePendingUserByCookie(ctx context.Context, cookie pgtype.Text) error
DeleteRole(ctx context.Context, id int32) error
GetAdminLevel(ctx context.Context, userID int32) (GetAdminLevelRow, error)
GetGlineByIP(ctx context.Context, host string) (Gline, error)
GetRoleByID(ctx context.Context, id int32) (Role, error)
GetRoleByName(ctx context.Context, name string) (Role, error)
GetUser(ctx context.Context, arg GetUserParams) (GetUserRow, error)
GetUserByEmail(ctx context.Context, email string) (User, error)
GetUserByID(ctx context.Context, id int32) (GetUserByIDRow, error)
GetUserByUsername(ctx context.Context, username string) (User, error)
GetUserChannels(ctx context.Context, userID int32) ([]GetUserChannelsRow, error)
GetUsersByUsernames(ctx context.Context, userids []string) ([]GetUsersByUsernamesRow, error)
GetWhiteListByIP(ctx context.Context, ip netip.Addr) (Whitelist, error)
ListPendingUsers(ctx context.Context) ([]Pendinguser, error)
ListRoles(ctx context.Context) ([]Role, error)
ListUserRoles(ctx context.Context, userID int32) ([]Role, error)
RemoveUserRole(ctx context.Context, userID int32, roleID int32) error
RemoveUsersFromRole(ctx context.Context, userIds []int32, roleID int32) error
UpdateRole(ctx context.Context, arg UpdateRoleParams) error
}
var _ Querier = (*Queries)(nil)