Documentation ¶
Index ¶
- Variables
- func CompareHashAndPassword(password, hashedPassword string) bool
- func GenerateDatabaseDSN(config *Config) string
- func GenerateJwtToken(jwtSecret string, expires time.Duration, user *entities.User) (string, error)
- func GeneratePasswordHash(password string) (string, error)
- func GetLoggerInstance() *log.Logger
- func IsUserAdmin(user *entities.User) bool
- func IsUserAuthed(user *entities.User) bool
- func VerifyToken(tokenString, jwtSecret string) (*jwt.Token, error)
- type Config
- type ContentManagementService
- type Database
- type Repositories
- type Services
- type UserRepository
- type UserService
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrMissingIsDirectoryField = errors.New("isDirectory field required") ErrMissingFileField = errors.New("file field required") ErrNotADirectory = errors.New("not a directory") ErrUsernameAlreadyExists = errors.New("username already exists") ErrDoesNotExist = errors.New("user does not exist") ErrEmailAlreadyExists = errors.New("email already exists") ErrCouldNotGeneratePasswordHash = errors.New("could not generate password hash") ErrMustNotBeAuthed = errors.New("you must not be authed") ErrMustBeAuthed = errors.New("you must be authed") )
Functions ¶
func CompareHashAndPassword ¶
func GenerateDatabaseDSN ¶
func GenerateJwtToken ¶
func GeneratePasswordHash ¶
func GetLoggerInstance ¶
func IsUserAdmin ¶
func IsUserAuthed ¶
func VerifyToken ¶
Types ¶
type Config ¶
type Repositories ¶
type Repositories struct {
UserRepository UserRepository
}
type Services ¶
type Services struct { UserService UserService ContentManagementService ContentManagementService }
type UserRepository ¶
Click to show internal directories.
Click to hide internal directories.