infrastructure

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2023 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StartAccountsRoutes

func StartAccountsRoutes(g *gin.RouterGroup)

Types

type AccountsController

type AccountsController struct {
	UseCases *application.AccountsUseCases
}

func (*AccountsController) HandleRegisterAdmin added in v0.2.0

func (controller *AccountsController) HandleRegisterAdmin(c *gin.Context)

func (*AccountsController) HandleRegisterStudent

func (controller *AccountsController) HandleRegisterStudent(c *gin.Context)

func (*AccountsController) HandleRegisterTeacher added in v0.5.0

func (controller *AccountsController) HandleRegisterTeacher(c *gin.Context)

type AccountsPostgresRepository

type AccountsPostgresRepository struct {
	Connection *sql.DB
}

func GetAccountsPgRepository

func GetAccountsPgRepository() *AccountsPostgresRepository

func (*AccountsPostgresRepository) GetUserByEmail

func (repository *AccountsPostgresRepository) GetUserByEmail(email string) (*entities.User, error)

func (*AccountsPostgresRepository) GetUserByInstitutionalId

func (repository *AccountsPostgresRepository) GetUserByInstitutionalId(id string) (*entities.User, error)

func (*AccountsPostgresRepository) GetUserByUUID added in v0.6.0

func (repository *AccountsPostgresRepository) GetUserByUUID(uuid string) (*entities.User, error)

func (*AccountsPostgresRepository) SaveAdmin added in v0.2.0

func (repository *AccountsPostgresRepository) SaveAdmin(dto dtos.RegisterUserDTO) error

func (*AccountsPostgresRepository) SaveStudent

func (repository *AccountsPostgresRepository) SaveStudent(dto dtos.RegisterUserDTO) error

func (*AccountsPostgresRepository) SaveTeacher added in v0.5.0

func (repository *AccountsPostgresRepository) SaveTeacher(dto dtos.RegisterUserDTO) error

type Argon2PasswordsHasher

type Argon2PasswordsHasher struct {
	Params *argon2id.Params
}

func GetArgon2PasswordsHasher

func GetArgon2PasswordsHasher() *Argon2PasswordsHasher

func (*Argon2PasswordsHasher) ComparePasswords

func (hasher *Argon2PasswordsHasher) ComparePasswords(password string, hashedPassword string) (bool, error)

func (*Argon2PasswordsHasher) HashPassword

func (hasher *Argon2PasswordsHasher) HashPassword(password string) (string, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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