repositories

package
v0.0.0-...-477ec14 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2024 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GormInit

func GormInit() (*gorm.DB, error)

func HashPassword

func HashPassword(password string) (string, error)

func Initialize

func Initialize(db *gorm.DB)

Types

type Postgres

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

func NewPostgres

func NewPostgres() *Postgres

func (*Postgres) DeleteUser

func (p *Postgres) DeleteUser(user *models.User) error

func (*Postgres) GetUserById

func (p *Postgres) GetUserById(user *models.User) error

func (*Postgres) GetUsers

func (p *Postgres) GetUsers(users *[]models.User) error

func (*Postgres) LoginUser

func (p *Postgres) LoginUser(user *models.User) error

func (*Postgres) RegisterUser

func (p *Postgres) RegisterUser(user *models.User) error

func (*Postgres) UpdateUserById

func (p *Postgres) UpdateUserById(id *uuid.UUID, updateItem map[string]interface{}) error

type RedisDB

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

func RedisInit

func RedisInit() *RedisDB

func (*RedisDB) AddToken

func (r *RedisDB) AddToken(refreshToken, id string) error

func (*RedisDB) ReceiverToken

func (r *RedisDB) ReceiverToken(claims *models.Claims) (string, error)

func (*RedisDB) RevokeToken

func (r *RedisDB) RevokeToken(token string) error

Jump to

Keyboard shortcuts

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