repositories

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2025 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommonAuthRepository

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

func NewCommonAuthRepository added in v1.0.1

func NewCommonAuthRepository(
	dbConnector db.Connector,
	logger *slog.Logger,
) *CommonAuthRepository

func (*CommonAuthRepository) Close added in v1.0.8

func (repo *CommonAuthRepository) Close() error

func (*CommonAuthRepository) CreateRefreshToken added in v0.1.0

func (repo *CommonAuthRepository) CreateRefreshToken(
	ctx context.Context,
	userID uint64,
	refreshToken string,
	ttl time.Duration,
) (uint64, error)

func (*CommonAuthRepository) ExpireRefreshToken added in v0.1.0

func (repo *CommonAuthRepository) ExpireRefreshToken(ctx context.Context, refreshToken string) error

func (*CommonAuthRepository) GetRefreshTokenByUserID added in v0.1.0

func (repo *CommonAuthRepository) GetRefreshTokenByUserID(
	ctx context.Context,
	userID uint64,
) (*entities.RefreshToken, error)

func (*CommonAuthRepository) RegisterUser

func (repo *CommonAuthRepository) RegisterUser(ctx context.Context, userData entities.RegisterUserDTO) (uint64, error)

type CommonUsersRepository

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

func NewCommonUsersRepository added in v1.0.1

func NewCommonUsersRepository(
	dbConnector db.Connector,
	logger *slog.Logger,
) *CommonUsersRepository

func (*CommonUsersRepository) Close added in v1.0.8

func (repo *CommonUsersRepository) Close() error

func (*CommonUsersRepository) GetAllUsers

func (repo *CommonUsersRepository) GetAllUsers(ctx context.Context) ([]entities.User, error)

func (*CommonUsersRepository) GetUserByEmail

func (repo *CommonUsersRepository) GetUserByEmail(ctx context.Context, email string) (*entities.User, error)

func (*CommonUsersRepository) GetUserByID

func (repo *CommonUsersRepository) GetUserByID(ctx context.Context, id uint64) (*entities.User, error)

Jump to

Keyboard shortcuts

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