Documentation ¶
Index ¶
- type ListPostsOrderBy
- type ListPostsQuery
- type Navigation
- type Post
- type Store
- func (s *Store) ClearNavigations(c context.Context) error
- func (s *Store) CountPosts(c context.Context, q *ListPostsQuery) (int, error)
- func (s *Store) CountPostsByUser(c context.Context, uid string) (int, error)
- func (s *Store) CountTags(c context.Context, keyword string) (int, error)
- func (s *Store) CountUsers(c context.Context) (int, error)
- func (s *Store) CreateNavigation(c context.Context, n *entity.NavigationW) error
- func (s *Store) CreatePost(c context.Context, p *entity.PostW) error
- func (s *Store) CreateTag(c context.Context, t *entity.TagW) error
- func (s *Store) CreateUser(c context.Context, u *entity.UserW) error
- func (s *Store) DeletePost(c context.Context, id string) error
- func (s *Store) DeletePostsByUser(c context.Context, id string) error
- func (s *Store) DeleteTag(id string) error
- func (s *Store) DeleteUser(c context.Context, id string) error
- func (s *Store) GetPost(c context.Context, id string) (*entity.PostR, error)
- func (s *Store) GetPostBySlug(c context.Context, slug string) (*entity.PostR, error)
- func (s *Store) GetTag(c context.Context, id string) (*entity.TagR, error)
- func (s *Store) GetTagsByName(names []string) ([]*entity.TagR, error)
- func (s *Store) GetUser(c context.Context, id string) (*entity.UserR, error)
- func (s *Store) ListNavigations(c context.Context) ([]*entity.NavigationR, error)
- func (s *Store) ListPostDates(c context.Context) (data []string, err error)
- func (s *Store) ListPosts(c context.Context, q *ListPostsQuery) ([]*entity.PostR, error)
- func (s *Store) ListTags(c context.Context, offset, limit int, keyword string) ([]*entity.TagR, error)
- func (s *Store) ListTagsByPost(c context.Context, id string) ([]*entity.TagR, error)
- func (s *Store) ListUsers(c context.Context) ([]*entity.UserR, error)
- func (s *Store) SuspendUser(c context.Context, uid string) error
- func (s *Store) TransferPosts(c context.Context, fromUserID, toUserID string) error
- func (s *Store) UnsuspendUser(c context.Context, uid string) error
- func (s *Store) UpdatePost(c context.Context, p *entity.PostW) error
- func (s *Store) UpdateTag(c context.Context, t *entity.TagW) error
- func (s *Store) UpdateUser(c context.Context, u *entity.UserW) error
- type Tag
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ListPostsOrderBy ¶
type ListPostsOrderBy string
const ( ListPostsOrderByCreatedAtDesc ListPostsOrderBy = "" ListPostsOrderByCreatedAtAsc ListPostsOrderBy = "created_at_asc" )
type ListPostsQuery ¶
type ListPostsQuery struct { AuthorID string TagID string Title string Query string Visibility entity.Visibility HasPassword *bool HasPublished *bool PublishedYear string PublishedMonth string PublishedDay string PublishedDate string OrderBy ListPostsOrderBy Offset int Limit int }
func (*ListPostsQuery) Build ¶
func (q *ListPostsQuery) Build() (query string, args []any)
type Navigation ¶
type Navigation struct {}
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
var Instance *Store
func (*Store) ClearNavigations ¶
ClearNavigations
func (*Store) CountPosts ¶
func (*Store) CountPostsByUser ¶
func (*Store) CreateNavigation ¶
CreateNavigation
func (*Store) CreatePost ¶
CreatePost
func (*Store) CreateUser ¶
CreateUser
func (*Store) DeletePost ¶
DeletePost
func (*Store) DeletePostsByUser ¶
DeletePostsByUser
func (*Store) DeleteUser ¶
DeleteUser
func (*Store) GetPostBySlug ¶
GetPostBySlug
func (*Store) GetTagsByName ¶
GetTagsByName
func (*Store) ListNavigations ¶
ListNavigations
func (*Store) ListPostDates ¶
func (*Store) ListTags ¶
func (s *Store) ListTags(c context.Context, offset, limit int, keyword string) ([]*entity.TagR, error)
ListTags
func (*Store) ListTagsByPost ¶
ListTagsByPost
func (*Store) SuspendUser ¶
SuspendUser
func (*Store) TransferPosts ¶
TransferPosts
func (*Store) UnsuspendUser ¶
SuspendUser
func (*Store) UpdatePost ¶
UpdatePost
Click to show internal directories.
Click to hide internal directories.