postgres

package
v0.0.0-...-3285ba3 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2023 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SessionData

type SessionData struct {
	UserId    uint64
	Allow     bool
	CreatedAt time.Time
	UUID      string
}

type UserRepository

type UserRepository struct {
	// contains filtered or unexported fields
}

func NewUserRepository

func NewUserRepository(db *gorm.DB, rdb *redis.Client) UserRepository

func (UserRepository) AccountConfirm

func (r UserRepository) AccountConfirm(secret string) error

func (*UserRepository) CheckSession

func (r *UserRepository) CheckSession(uuid string) (bool, error)

func (UserRepository) GetUserById

func (r UserRepository) GetUserById(id uint64) (*model.User, error)

func (UserRepository) GetUserByLoginAndPassword

func (r UserRepository) GetUserByLoginAndPassword(identifier, password string) (*model.User, error)

func (*UserRepository) GetUserSessions

func (r *UserRepository) GetUserSessions(userId uint64) ([]SessionData, error)

func (UserRepository) PasswordRequest

func (r UserRepository) PasswordRequest(mail string) (*model.User, error)

func (UserRepository) PasswordReset

func (r UserRepository) PasswordReset(password, secret string) (*model.User, error)

func (UserRepository) RefreshToken

func (r UserRepository) RefreshToken(token string) (*model.UserClaims, error)

func (*UserRepository) RegisterNewSession

func (r *UserRepository) RegisterNewSession(uuid string, userId uint64) error

func (UserRepository) RegistrationUser

func (r UserRepository) RegistrationUser(login, mail, password, firstName, lastName, middleName string) (model.User, error)

func (*UserRepository) RevokeToken

func (r *UserRepository) RevokeToken(uuid string) error

func (UserRepository) UpdateConfirmationCode

func (r UserRepository) UpdateConfirmationCode(userID uint64) (*string, error)

Jump to

Keyboard shortcuts

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