Documentation ¶
Index ¶
- type ArticleService
- func (a *ArticleService) DeleteAllArticles() (int64, error)
- func (a *ArticleService) DeleteByID(id uint64, uid uint64) (int64, error)
- func (a *ArticleService) FetchArticleByID(id uint64) (models.Article, error)
- func (a *ArticleService) GetAllArticles() ([]models.Article, error)
- func (a *ArticleService) SaveArticle(article *models.Article) (*models.Article, error)
- func (a *ArticleService) UpdateArticle(updated *models.Article, aid int64, uid uint64) (int64, error)
- type UserService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArticleService ¶
ArticleService struct
func (*ArticleService) DeleteAllArticles ¶
func (a *ArticleService) DeleteAllArticles() (int64, error)
DeleteAllArticles func
func (*ArticleService) DeleteByID ¶
func (a *ArticleService) DeleteByID(id uint64, uid uint64) (int64, error)
DeleteByID func
func (*ArticleService) FetchArticleByID ¶
func (a *ArticleService) FetchArticleByID(id uint64) (models.Article, error)
FetchArticleByID func
func (*ArticleService) GetAllArticles ¶
func (a *ArticleService) GetAllArticles() ([]models.Article, error)
GetAllArticles returns all articles
func (*ArticleService) SaveArticle ¶
SaveArticle func
func (*ArticleService) UpdateArticle ¶
func (a *ArticleService) UpdateArticle(updated *models.Article, aid int64, uid uint64) (int64, error)
UpdateArticle func using wait groups for fun !!!!
type UserService ¶
UserService struct
func (*UserService) FindAll ¶
func (u *UserService) FindAll() ([]models.User, error)
FindAll Fetch all the Users
func (*UserService) FindUserByID ¶
func (u *UserService) FindUserByID(uid uint64) (models.User, error)
FindUserByID Fetch user by id
Click to show internal directories.
Click to hide internal directories.