domain

package
v1.5.3 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LinkRedirectRepository

type LinkRedirectRepository interface {
	CheckLinkExists(key string) (models.Link, bool)
	Save(link *models.Link) error
}

type LoginRepository

type LoginRepository interface {
	GetUserByEmail(email string) (models.User, error)
	VerifyPassword(hashPass, plainPass string) (bool, error)
	CreateAccessToken(userID, email string) string
}

type PasswordRepository

type PasswordRepository interface {
	GetUserByID(userID string) (models.User, error)
	EncryptPassword(password string) string
	VerifyPassword(hashPass, plainPass string) (bool, error)
	Save(user *models.User) error
}

type ShortLinkRepository

type ShortLinkRepository interface {
	CreateShortLink(link *models.Link) error
	RandomShortURL() (string, string)
	CheckLinkExists(url, userID string) bool
	CheckShortLinkExists(shortURL string) bool
	CustomShortURL(key string) string
	ValidateLink(url string) bool
}

type SignUpRepository

type SignUpRepository interface {
	Create(user *models.User) error
	GetUserByEmail(email string) (models.User, error)
	CreateAccessToken(userID, email string) string
	EncryptPassword(password string) string
	SendVerifyEmail(email string) error
}

type UserRepository

type UserRepository interface {
	Create(user *models.User) error
	GetUserByEmail(email string) (models.User, error)
	GetUserByID(userID string) (models.User, error)
	GetUserWithLinks(userID string) (models.User, error)
	Delete(user *models.User) error
	EncryptPassword(password string) string
	VerifyPassword(hashPass, plainPass string) (bool, error)
	Save(user *models.User) error
	SendVerifyEmail(email string) error
	GetUserFromCache(key string) (models.User, error)
	CreateAccessToken(userID, email string) string
}

type VerifyUserRepository

type VerifyUserRepository interface {
	GetUserByEmail(email string) (models.User, error)
	GetUserFromCache(key string) (models.User, error)
	CheckUserStatus(user *models.User) bool
	Save(user *models.User) error
}

Jump to

Keyboard shortcuts

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