Documentation ¶
Index ¶
- type ArticleItem
- type ArticleService
- func (a *ArticleService) Create(userId int, art models.Article) (int, error)
- func (a *ArticleService) Delete(userId, articleId int) error
- func (a *ArticleService) Get(userId, articleId int) (models.Article, error)
- func (a *ArticleService) SelectAll(userId int) ([]models.Article, error)
- func (a *ArticleService) Update(userId, articleId int, upArt models.UpdateArticle) error
- type AuthService
- type Authorization
- type Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArticleItem ¶
type ArticleService ¶
type ArticleService struct {
// contains filtered or unexported fields
}
func NewArticleService ¶
func NewArticleService(repo repository.ArticleItem) *ArticleService
func (*ArticleService) Delete ¶
func (a *ArticleService) Delete(userId, articleId int) error
func (*ArticleService) Get ¶
func (a *ArticleService) Get(userId, articleId int) (models.Article, error)
func (*ArticleService) SelectAll ¶
func (a *ArticleService) SelectAll(userId int) ([]models.Article, error)
func (*ArticleService) Update ¶
func (a *ArticleService) Update(userId, articleId int, upArt models.UpdateArticle) error
type AuthService ¶
type AuthService struct {
// contains filtered or unexported fields
}
func NewAuthService ¶
func NewAuthService(repo repository.Authorization) *AuthService
func (*AuthService) CreateUser ¶
func (a *AuthService) CreateUser(user models.User) (int, error)
func (*AuthService) GenerateToken ¶
func (a *AuthService) GenerateToken(email, password string) (string, error)
func (*AuthService) ParseToken ¶
func (a *AuthService) ParseToken(accessToken string) (int, error)
type Authorization ¶
type Service ¶
type Service struct { Authorization ArticleItem }
func NewService ¶
func NewService(repo *repository.Repository) *Service
Click to show internal directories.
Click to hide internal directories.