Documentation ¶
Index ¶
- type AuthService
- func (s *AuthService) CreateUser(user model.UserAccount) (uuid.UUID, error)
- func (s *AuthService) DeleteAccount(userId uuid.UUID) error
- func (s *AuthService) GenerateToken(userAccount model.UserAccount) (uuid.UUID, string, error)
- func (s *AuthService) GetUser(userAccount model.UserAccount) (model.User, error)
- func (s *AuthService) ParseToken(accessToken string) (uuid.UUID, error)
- type Authorization
- type Category
- type CategoryService
- func (s CategoryService) Create(category model.Category) (uuid.UUID, error)
- func (s CategoryService) DeleteById(userId, categoryId uuid.UUID) error
- func (s CategoryService) GetAll(userId uuid.UUID) ([]model.Category, error)
- func (s CategoryService) GetById(userId, categoryId uuid.UUID) (model.Category, error)
- func (s CategoryService) Update(category model.Category) error
- type Link
- type LinkService
- func (s LinkService) Create(link model.LinkUpdate) (uuid.UUID, error)
- func (s LinkService) DeleteById(userId, linkId uuid.UUID) error
- func (s LinkService) GetAll(userId uuid.UUID) ([]model.Link, error)
- func (s LinkService) GetById(userId, linkId uuid.UUID) (model.Link, error)
- func (s LinkService) Update(link model.LinkUpdate) error
- type Service
- type Statistic
- type StatisticService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthService ¶
type AuthService struct {
// contains filtered or unexported fields
}
func NewAuthService ¶
func NewAuthService(repo repository.Authorization) *AuthService
func (*AuthService) CreateUser ¶
func (s *AuthService) CreateUser(user model.UserAccount) (uuid.UUID, error)
func (*AuthService) DeleteAccount ¶
func (s *AuthService) DeleteAccount(userId uuid.UUID) error
func (*AuthService) GenerateToken ¶
func (s *AuthService) GenerateToken(userAccount model.UserAccount) (uuid.UUID, string, error)
func (*AuthService) GetUser ¶
func (s *AuthService) GetUser(userAccount model.UserAccount) (model.User, error)
func (*AuthService) ParseToken ¶
func (s *AuthService) ParseToken(accessToken string) (uuid.UUID, error)
type Authorization ¶
type Authorization interface { CreateUser(userAcc model.UserAccount) (uuid.UUID, error) GenerateToken(userAcc model.UserAccount) (uuid.UUID, string, error) GetUser(userAcc model.UserAccount) (model.User, error) ParseToken(bearerToken string) (uuid.UUID, error) DeleteAccount(userId uuid.UUID) error }
type CategoryService ¶
type CategoryService struct {
// contains filtered or unexported fields
}
func NewCategoryService ¶
func NewCategoryService(repo repository.Category) *CategoryService
func (CategoryService) DeleteById ¶
func (s CategoryService) DeleteById(userId, categoryId uuid.UUID) error
type LinkService ¶
type LinkService struct {
// contains filtered or unexported fields
}
func NewLinkService ¶
func NewLinkService(repo repository.Link) *LinkService
func (LinkService) Create ¶
func (s LinkService) Create(link model.LinkUpdate) (uuid.UUID, error)
func (LinkService) DeleteById ¶
func (s LinkService) DeleteById(userId, linkId uuid.UUID) error
func (LinkService) Update ¶
func (s LinkService) Update(link model.LinkUpdate) error
type Service ¶
type Service struct { Authorization Link Category Statistic }
func NewService ¶
func NewService(repos *repository.Repository) *Service
type StatisticService ¶
type StatisticService struct {
// contains filtered or unexported fields
}
func NewStatisticService ¶
func NewStatisticService(repo repository.Statistic) *StatisticService
Click to show internal directories.
Click to hide internal directories.