interfaces

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2024 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthRepository

type AuthRepository interface {
	RegisterUser(userData entities.RegisterUserDTO) (userID uint64, err error)
	CreateRefreshToken(userID uint64, refreshToken string, ttl time.Duration) (refreshTokenID uint64, err error)
	GetRefreshTokenByUserID(userID uint64) (*entities.RefreshToken, error)
	ExpireRefreshToken(refreshToken string) error
}

type AuthService

type AuthService interface {
	AuthRepository
}

type Controller

type Controller interface {
	Run()
	Stop()
}

type UseCases

type UseCases interface {
	GetUserByID(id uint64) (*entities.User, error)
	GetAllUsers() ([]*entities.User, error)
	RegisterUser(userData entities.RegisterUserDTO) (userID uint64, err error)
	LoginUser(userData entities.LoginUserDTO) (*entities.TokensDTO, error)
	GetMe(accessToken string) (*entities.User, error)
	RefreshTokens(refreshTokensData entities.TokensDTO) (*entities.TokensDTO, error)
}

type UsersRepository

type UsersRepository interface {
	GetUserByID(id uint64) (*entities.User, error)
	GetAllUsers() ([]*entities.User, error)
	GetUserByEmail(email string) (*entities.User, error)
}

type UsersService

type UsersService interface {
	UsersRepository
}

Jump to

Keyboard shortcuts

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