Documentation ¶
Index ¶
- type CreateUserParams
- type DBTX
- type Querier
- type QuerierExtended
- type Queries
- func (q *Queries) CreateUser(ctx context.Context, arg CreateUserParams) (User, error)
- func (q *Queries) DeleteUser(ctx context.Context, id uuid.UUID) error
- func (q *Queries) ReadUserByEmail(ctx context.Context, email string) (User, error)
- func (q *Queries) ReadUserByID(ctx context.Context, id uuid.UUID) (User, error)
- func (q *Queries) ReadUserByUsername(ctx context.Context, username string) (User, error)
- func (q *Queries) ReadUsers(ctx context.Context, arg ReadUsersParams) ([]User, error)
- func (q *Queries) UpdateUser(ctx context.Context, arg UpdateUserParams) (User, error)
- func (q *Queries) UpdateUserAllowIP(ctx context.Context, arg UpdateUserAllowIPParams) error
- func (q *Queries) UpdateUserAllowIPToken(ctx context.Context, arg UpdateUserAllowIPTokenParams) error
- func (q *Queries) UpdateUserDeleteToken(ctx context.Context, arg UpdateUserDeleteTokenParams) error
- func (q *Queries) UpdateUserEmailChangeToken(ctx context.Context, arg UpdateUserEmailChangeTokenParams) error
- func (q *Queries) UpdateUserEmailVerified(ctx context.Context, arg UpdateUserEmailVerifiedParams) error
- func (q *Queries) UpdateUserRecoveryToken(ctx context.Context, arg UpdateUserRecoveryTokenParams) error
- func (q *Queries) UpdateUserResetPassword(ctx context.Context, arg UpdateUserResetPasswordParams) error
- func (q *Queries) UpdateUserVerifyToken(ctx context.Context, arg UpdateUserVerifyTokenParams) error
- func (q *Queries) WithTx(tx *sql.Tx) *Queries
- type ReadUsersParams
- type SQLStore
- func (store *SQLStore) UpdateUserDeleteTokenTx(ctx context.Context, arg UpdateUserDeleteTokenTxParams) error
- func (store *SQLStore) UpdateUserEmailVerifiedTx(ctx context.Context, arg UpdateUserEmailVerifiedTxParams) error
- func (store *SQLStore) UpdateUserRecoveryTokenTx(ctx context.Context, arg UpdateUserRecoveryTokenTxParams) error
- func (store *SQLStore) UpdateUserResetPasswordTx(ctx context.Context, arg UpdateUserResetPasswordTxParams) error
- func (store *SQLStore) UpdateUserVerifyTokenTx(ctx context.Context, arg UpdateUserVerifyTokenTxParams) error
- type Store
- type UpdateUserAllowIPParams
- type UpdateUserAllowIPTokenParams
- type UpdateUserDeleteTokenParams
- type UpdateUserDeleteTokenTxParams
- type UpdateUserEmailChangeTokenParams
- type UpdateUserEmailVerifiedParams
- type UpdateUserEmailVerifiedTxParams
- type UpdateUserParams
- type UpdateUserRecoveryTokenParams
- type UpdateUserRecoveryTokenTxParams
- type UpdateUserResetPasswordParams
- type UpdateUserResetPasswordTxParams
- type UpdateUserVerifyTokenParams
- type UpdateUserVerifyTokenTxParams
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateUserParams ¶
type CreateUserParams struct { Email string `json:"email"` Username string `json:"username"` Password string `json:"password"` Firstname string `json:"firstname"` Lastname string `json:"lastname"` AllowedIps []string `json:"allowed_ips"` LastVerifySentAt time.Time `json:"last_verify_sent_at"` LastRecoverySentAt time.Time `json:"last_recovery_sent_at"` LastEmailchangeSentAt time.Time `json:"last_emailchange_sent_at"` }
type Querier ¶
type Querier interface { CreateUser(ctx context.Context, arg CreateUserParams) (User, error) DeleteUser(ctx context.Context, id uuid.UUID) error ReadUserByEmail(ctx context.Context, email string) (User, error) ReadUserByID(ctx context.Context, id uuid.UUID) (User, error) ReadUserByUsername(ctx context.Context, username string) (User, error) ReadUsers(ctx context.Context, arg ReadUsersParams) ([]User, error) UpdateUser(ctx context.Context, arg UpdateUserParams) (User, error) UpdateUserAllowIP(ctx context.Context, arg UpdateUserAllowIPParams) error UpdateUserAllowIPToken(ctx context.Context, arg UpdateUserAllowIPTokenParams) error UpdateUserDeleteToken(ctx context.Context, arg UpdateUserDeleteTokenParams) error UpdateUserEmailChangeToken(ctx context.Context, arg UpdateUserEmailChangeTokenParams) error UpdateUserEmailVerified(ctx context.Context, arg UpdateUserEmailVerifiedParams) error UpdateUserRecoveryToken(ctx context.Context, arg UpdateUserRecoveryTokenParams) error UpdateUserResetPassword(ctx context.Context, arg UpdateUserResetPasswordParams) error UpdateUserVerifyToken(ctx context.Context, arg UpdateUserVerifyTokenParams) error }
type QuerierExtended ¶
type QuerierExtended interface { UpdateUserVerifyTokenTx(ctx context.Context, arg UpdateUserVerifyTokenTxParams) error UpdateUserEmailVerifiedTx(ctx context.Context, arg UpdateUserEmailVerifiedTxParams) error UpdateUserRecoveryTokenTx(ctx context.Context, arg UpdateUserRecoveryTokenTxParams) error UpdateUserResetPasswordTx(ctx context.Context, arg UpdateUserResetPasswordTxParams) error UpdateUserDeleteTokenTx(ctx context.Context, arg UpdateUserDeleteTokenTxParams) error }
type Queries ¶
type Queries struct {
// contains filtered or unexported fields
}
func (*Queries) CreateUser ¶
func (*Queries) ReadUserByEmail ¶
func (*Queries) ReadUserByID ¶
func (*Queries) ReadUserByUsername ¶
func (*Queries) UpdateUser ¶
func (*Queries) UpdateUserAllowIP ¶
func (q *Queries) UpdateUserAllowIP(ctx context.Context, arg UpdateUserAllowIPParams) error
func (*Queries) UpdateUserAllowIPToken ¶
func (q *Queries) UpdateUserAllowIPToken(ctx context.Context, arg UpdateUserAllowIPTokenParams) error
func (*Queries) UpdateUserDeleteToken ¶
func (q *Queries) UpdateUserDeleteToken(ctx context.Context, arg UpdateUserDeleteTokenParams) error
func (*Queries) UpdateUserEmailChangeToken ¶
func (q *Queries) UpdateUserEmailChangeToken(ctx context.Context, arg UpdateUserEmailChangeTokenParams) error
func (*Queries) UpdateUserEmailVerified ¶
func (q *Queries) UpdateUserEmailVerified(ctx context.Context, arg UpdateUserEmailVerifiedParams) error
func (*Queries) UpdateUserRecoveryToken ¶
func (q *Queries) UpdateUserRecoveryToken(ctx context.Context, arg UpdateUserRecoveryTokenParams) error
func (*Queries) UpdateUserResetPassword ¶
func (q *Queries) UpdateUserResetPassword(ctx context.Context, arg UpdateUserResetPasswordParams) error
func (*Queries) UpdateUserVerifyToken ¶
func (q *Queries) UpdateUserVerifyToken(ctx context.Context, arg UpdateUserVerifyTokenParams) error
type ReadUsersParams ¶
type SQLStore ¶
type SQLStore struct { *Queries // contains filtered or unexported fields }
func (*SQLStore) UpdateUserDeleteTokenTx ¶
func (store *SQLStore) UpdateUserDeleteTokenTx(ctx context.Context, arg UpdateUserDeleteTokenTxParams) error
func (*SQLStore) UpdateUserEmailVerifiedTx ¶
func (store *SQLStore) UpdateUserEmailVerifiedTx(ctx context.Context, arg UpdateUserEmailVerifiedTxParams) error
func (*SQLStore) UpdateUserRecoveryTokenTx ¶
func (store *SQLStore) UpdateUserRecoveryTokenTx(ctx context.Context, arg UpdateUserRecoveryTokenTxParams) error
func (*SQLStore) UpdateUserResetPasswordTx ¶
func (store *SQLStore) UpdateUserResetPasswordTx(ctx context.Context, arg UpdateUserResetPasswordTxParams) error
func (*SQLStore) UpdateUserVerifyTokenTx ¶
func (store *SQLStore) UpdateUserVerifyTokenTx(ctx context.Context, arg UpdateUserVerifyTokenTxParams) error
type Store ¶
type Store interface { Querier QuerierExtended }
type UpdateUserAllowIPParams ¶
type UpdateUserDeleteTokenTxParams ¶
type UpdateUserDeleteTokenTxParams struct { UpdateUserDeleteTokenParams BeforeUpdate func() error }
type UpdateUserEmailVerifiedTxParams ¶
type UpdateUserEmailVerifiedTxParams struct { UpdateUserEmailVerifiedParams AfterUpdate func() error }
type UpdateUserParams ¶
type UpdateUserRecoveryTokenTxParams ¶
type UpdateUserRecoveryTokenTxParams struct { UpdateUserRecoveryTokenParams BeforeUpdate func() error }
type UpdateUserResetPasswordTxParams ¶
type UpdateUserResetPasswordTxParams struct { UpdateUserResetPasswordParams BeforeUpdate func() error }
type UpdateUserVerifyTokenTxParams ¶
type UpdateUserVerifyTokenTxParams struct { UpdateUserVerifyTokenParams BeforeUpdate func() error }
type User ¶
type User struct { // account id ID uuid.UUID `json:"id"` // unique email address Email string `json:"email"` // unique username Username string `json:"username"` // hashed password Password string `json:"password"` // first name Firstname string `json:"firstname"` // last name Lastname string `json:"lastname"` // email verified status EmailVerified bool `json:"email_verified"` // short lived email verification token VerifyToken string `json:"verify_token"` // last verification token sent at timestamp LastVerifySentAt time.Time `json:"last_verify_sent_at"` // short lived password recovery token RecoveryToken string `json:"recovery_token"` // last password recovery token sent at timestamp LastRecoverySentAt time.Time `json:"last_recovery_sent_at"` // short lived email change token EmailchangeToken string `json:"emailchange_token"` // last change email token sent at timestamp LastEmailchangeSentAt time.Time `json:"last_emailchange_sent_at"` // list of all allowed ip address to access this row AllowedIps []string `json:"allowed_ips"` // short lived allowip token for allowing new ipaddress AllowipToken string `json:"allowip_token"` // short lived account deletion token DeleteToken string `json:"delete_token"` // last deletion token sent at timestamp LastDeleteSentAt time.Time `json:"last_delete_sent_at"` // created at timestamp CreatedAt time.Time `json:"created_at"` // last updated at timestamp UpdatedAt time.Time `json:"updated_at"` }
Click to show internal directories.
Click to hide internal directories.