Documentation
¶
Index ¶
- func ConvertFromPGTimestamptzToTime(t pgtype.Timestamptz) time.Time
- func ConvertToPGTimestamptz(t time.Time) pgtype.Timestamptz
- func SetupDatabasePool(ctx context.Context, databaseURL string) *pgxpool.Pool
- type ConfirmUserEmailParams
- type DBTX
- type InsertUserParams
- type Queries
- func (q *Queries) ConfirmUserEmail(ctx context.Context, arg ConfirmUserEmailParams) (User, error)
- func (q *Queries) DeleteToken(ctx context.Context, id uuid.UUID) error
- func (q *Queries) DeleteUser(ctx context.Context, id uuid.UUID) error
- func (q *Queries) DoesMailExists(ctx context.Context, mail string) (bool, error)
- func (q *Queries) InsertUser(ctx context.Context, arg InsertUserParams) (User, error)
- func (q *Queries) QueryTokenByHash(ctx context.Context, hash string) (Token, error)
- func (q *Queries) QueryUser(ctx context.Context, id uuid.UUID) (User, error)
- func (q *Queries) QueryUserByMail(ctx context.Context, mail string) (User, error)
- func (q *Queries) QueryUsers(ctx context.Context) ([]User, error)
- func (q *Queries) RemoveUnverifiedUsers(ctx context.Context, twoWeeksAgo pgtype.Timestamptz) error
- func (q *Queries) StoreToken(ctx context.Context, arg StoreTokenParams) error
- func (q *Queries) UpdateUser(ctx context.Context, arg UpdateUserParams) (User, error)
- func (q *Queries) WithTx(tx pgx.Tx) *Queries
- type StoreTokenParams
- type Token
- type UpdateUserParams
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertFromPGTimestamptzToTime ¶
func ConvertFromPGTimestamptzToTime(t pgtype.Timestamptz) time.Time
func ConvertToPGTimestamptz ¶
func ConvertToPGTimestamptz(t time.Time) pgtype.Timestamptz
Types ¶
type ConfirmUserEmailParams ¶
type ConfirmUserEmailParams struct { ID uuid.UUID UpdatedAt pgtype.Timestamptz MailVerifiedAt pgtype.Timestamptz }
type InsertUserParams ¶
type InsertUserParams struct { ID uuid.UUID CreatedAt pgtype.Timestamptz UpdatedAt pgtype.Timestamptz Name string Mail string Password string }
type Queries ¶
type Queries struct {
// contains filtered or unexported fields
}
func (*Queries) ConfirmUserEmail ¶
func (*Queries) DeleteToken ¶
func (*Queries) DoesMailExists ¶
func (*Queries) InsertUser ¶
func (*Queries) QueryTokenByHash ¶
func (*Queries) QueryUserByMail ¶
func (*Queries) RemoveUnverifiedUsers ¶
func (*Queries) StoreToken ¶
func (q *Queries) StoreToken(ctx context.Context, arg StoreTokenParams) error
func (*Queries) UpdateUser ¶
type StoreTokenParams ¶
type StoreTokenParams struct { ID uuid.UUID CreatedAt pgtype.Timestamptz Hash string ExpiresAt pgtype.Timestamptz Scope string UserID uuid.UUID }
type Token ¶
type Token struct { ID uuid.UUID CreatedAt pgtype.Timestamptz Hash string ExpiresAt pgtype.Timestamptz Scope string UserID uuid.UUID }
type UpdateUserParams ¶
type User ¶
type User struct { ID uuid.UUID CreatedAt pgtype.Timestamptz UpdatedAt pgtype.Timestamptz Name string Mail string MailVerifiedAt pgtype.Timestamptz Password string }
Click to show internal directories.
Click to hide internal directories.