Documentation ¶
Index ¶
- type ArticleStore
- func (as *ArticleStore) AddComment(a *model.Article, c *model.Comment) error
- func (as *ArticleStore) AddFavorite(a *model.Article, userID uint) error
- func (as *ArticleStore) CreateArticle(a *model.Article) error
- func (as *ArticleStore) DeleteArticle(a *model.Article) error
- func (as *ArticleStore) DeleteComment(c *model.Comment) error
- func (as *ArticleStore) GetBySlug(s string) (*model.Article, error)
- func (as *ArticleStore) GetCommentByID(id uint) (*model.Comment, error)
- func (as *ArticleStore) GetCommentsBySlug(slug string) ([]model.Comment, error)
- func (as *ArticleStore) GetUserArticleBySlug(userID uint, slug string) (*model.Article, error)
- func (as *ArticleStore) List(offset, limit int) ([]model.Article, int, error)
- func (as *ArticleStore) ListByAuthor(username string, offset, limit int) ([]model.Article, int, error)
- func (as *ArticleStore) ListByTag(tag string, offset, limit int) ([]model.Article, int, error)
- func (as *ArticleStore) ListByWhoFavorited(username string, offset, limit int) ([]model.Article, int, error)
- func (as *ArticleStore) ListFeed(userID uint, offset, limit int) ([]model.Article, int, error)
- func (as *ArticleStore) ListTags() ([]model.Tag, error)
- func (as *ArticleStore) RemoveFavorite(a *model.Article, userID uint) error
- func (as *ArticleStore) UpdateArticle(a *model.Article, tagList []string) error
- func (as *ArticleStore) UpdateComment(c *model.Comment) error
- type UserStore
- func (us *UserStore) AddFollower(u *model.User, followerID uint) error
- func (us *UserStore) Create(u *model.User) (err error)
- func (us *UserStore) GetByEmail(e string) (*model.User, error)
- func (us *UserStore) GetByID(id uint) (*model.User, error)
- func (us *UserStore) GetByUsername(username string) (*model.User, error)
- func (us *UserStore) IsFollower(userID, followerID uint) (bool, error)
- func (us *UserStore) RemoveFollower(u *model.User, followerID uint) error
- func (us *UserStore) Update(u *model.User) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArticleStore ¶
type ArticleStore struct {
// contains filtered or unexported fields
}
ArticleStore struct
func (*ArticleStore) AddComment ¶
AddComment func
func (*ArticleStore) AddFavorite ¶
func (as *ArticleStore) AddFavorite(a *model.Article, userID uint) error
AddFavorite func
func (*ArticleStore) CreateArticle ¶
func (as *ArticleStore) CreateArticle(a *model.Article) error
CreateArticle func
func (*ArticleStore) DeleteArticle ¶
func (as *ArticleStore) DeleteArticle(a *model.Article) error
DeleteArticle func
func (*ArticleStore) DeleteComment ¶
func (as *ArticleStore) DeleteComment(c *model.Comment) error
DeleteComment func
func (*ArticleStore) GetBySlug ¶
func (as *ArticleStore) GetBySlug(s string) (*model.Article, error)
GetBySlug func
func (*ArticleStore) GetCommentByID ¶
func (as *ArticleStore) GetCommentByID(id uint) (*model.Comment, error)
GetCommentByID func
func (*ArticleStore) GetCommentsBySlug ¶
func (as *ArticleStore) GetCommentsBySlug(slug string) ([]model.Comment, error)
GetCommentsBySlug func
func (*ArticleStore) GetUserArticleBySlug ¶
GetUserArticleBySlug func
func (*ArticleStore) ListByAuthor ¶
func (as *ArticleStore) ListByAuthor(username string, offset, limit int) ([]model.Article, int, error)
ListByAuthor func
func (*ArticleStore) ListByWhoFavorited ¶
func (as *ArticleStore) ListByWhoFavorited(username string, offset, limit int) ([]model.Article, int, error)
ListByWhoFavorited func
func (*ArticleStore) ListTags ¶
func (as *ArticleStore) ListTags() ([]model.Tag, error)
ListTags func
func (*ArticleStore) RemoveFavorite ¶
func (as *ArticleStore) RemoveFavorite(a *model.Article, userID uint) error
RemoveFavorite func
func (*ArticleStore) UpdateArticle ¶
func (as *ArticleStore) UpdateArticle(a *model.Article, tagList []string) error
UpdateArticle func
func (*ArticleStore) UpdateComment ¶
func (as *ArticleStore) UpdateComment(c *model.Comment) error
UpdateComment func
type UserStore ¶
type UserStore struct {
// contains filtered or unexported fields
}
UserStore struct
func (*UserStore) AddFollower ¶
AddFollower func
func (*UserStore) GetByEmail ¶
GetByEmail func
func (*UserStore) GetByUsername ¶
GetByUsername func
func (*UserStore) IsFollower ¶
IsFollower func
func (*UserStore) RemoveFollower ¶
RemoveFollower func
Click to show internal directories.
Click to hide internal directories.