Documentation ¶
Index ¶
- func GeneratePasswordHash(password string) string
- type AuthService
- type Authorization
- type Comment
- type CommentService
- func (s *CommentService) Create(idUser int, comment common.Comment) (int, error)
- func (s *CommentService) Delete(idUser, listId int) error
- func (s *CommentService) GetAll(idUser int) ([]common.Comment, error)
- func (s *CommentService) GetById(idUser, commentId int) (common.Comment, error)
- func (s *CommentService) Update(idUser, commentId int, input common.UpdateCommentInput) error
- type Service
- type User
- type UserService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GeneratePasswordHash ¶
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 common.User) (int, error)
func (*AuthService) GenerateToken ¶
func (s *AuthService) GenerateToken(username, password string) (string, error)
func (*AuthService) ParseToken ¶
func (s *AuthService) ParseToken(accessToken string) (int, error)
type Authorization ¶
type CommentService ¶
type CommentService struct {
// contains filtered or unexported fields
}
func NewCommentService ¶
func NewCommentService(repo repository.Comment) *CommentService
func (*CommentService) Delete ¶
func (s *CommentService) Delete(idUser, listId int) error
func (*CommentService) GetAll ¶
func (s *CommentService) GetAll(idUser int) ([]common.Comment, error)
func (*CommentService) GetById ¶
func (s *CommentService) GetById(idUser, commentId int) (common.Comment, error)
func (*CommentService) Update ¶
func (s *CommentService) Update(idUser, commentId int, input common.UpdateCommentInput) error
type Service ¶
type Service struct { Authorization Comment User }
func NewService ¶
func NewService(repos *repository.Repository) *Service
type UserService ¶
type UserService struct {
// contains filtered or unexported fields
}
func NewUserService ¶
func NewUserService(repo repository.User) *UserService
func (*UserService) Delete ¶
func (s *UserService) Delete(id int) error
func (*UserService) Update ¶
func (s *UserService) Update(id int, input common.UpdateUserInput) error
Click to show internal directories.
Click to hide internal directories.