Documentation ¶
Index ¶
- Variables
- type AuthSession
- type AuthUser
- type AuthUserType
- type DBTX
- type InsertSessionParams
- type InsertUserParams
- type NullAuthUserType
- type Queries
- func (q *Queries) GetUserByDocument(ctx context.Context, document string) (AuthUser, error)
- func (q *Queries) GetUserByEmail(ctx context.Context, email string) (AuthUser, error)
- func (q *Queries) InsertSession(ctx context.Context, arg InsertSessionParams) error
- func (q *Queries) InsertUser(ctx context.Context, arg InsertUserParams) error
- func (q *Queries) WithTx(tx pgx.Tx) *Queries
- type SessionRepository
- type UserRepository
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrUserNotFound = errors.New("user not found")
Functions ¶
This section is empty.
Types ¶
type AuthSession ¶
type AuthUserType ¶
type AuthUserType string
const ( AuthUserTypeDefault AuthUserType = "default" AuthUserTypeAdmin AuthUserType = "admin" )
func (*AuthUserType) Scan ¶
func (e *AuthUserType) Scan(src interface{}) error
type InsertSessionParams ¶
type InsertUserParams ¶
type NullAuthUserType ¶
type NullAuthUserType struct { AuthUserType AuthUserType Valid bool // Valid is true if AuthUserType is not NULL }
func (*NullAuthUserType) Scan ¶
func (ns *NullAuthUserType) Scan(value interface{}) error
Scan implements the Scanner interface.
type Queries ¶
type Queries struct {
// contains filtered or unexported fields
}
func (*Queries) GetUserByDocument ¶
func (*Queries) GetUserByEmail ¶
func (*Queries) InsertSession ¶
func (q *Queries) InsertSession(ctx context.Context, arg InsertSessionParams) error
func (*Queries) InsertUser ¶
func (q *Queries) InsertUser(ctx context.Context, arg InsertUserParams) error
type SessionRepository ¶
type SessionRepository struct {
// contains filtered or unexported fields
}
func NewSessionRepository ¶
func NewSessionRepository(dbPool *pgxpool.Pool) *SessionRepository
type UserRepository ¶
type UserRepository struct {
// contains filtered or unexported fields
}
func NewUserRepository ¶
func NewUserRepository(dbPool *pgxpool.Pool) *UserRepository
func (*UserRepository) GetUserByDocument ¶
func (*UserRepository) GetUserByEmail ¶
Click to show internal directories.
Click to hide internal directories.