Documentation
¶
Index ¶
- func ClearExpiredTrashPosts() error
- func ClearNavigations() error
- func ClearTrashPosts() error
- func CountPosts(q *ListPostsQuery) (int, error)
- func CountPostsByType() (*entity.PostCount, error)
- func CountPostsByUser(uid string) (int, error)
- func CountTags(keyword string) (int, error)
- func CreateNavigation(n *entity.NavigationW) error
- func CreatePost(p *entity.PostW) error
- func CreateTag(t *entity.TagW) error
- func CreateUser(u *entity.UserW) error
- func DeletePost(id string) error
- func DeletePostsByUser(uid string) error
- func DeleteTag(id string) error
- func DeleteUser(id string) error
- func GetNextPost(id string) (*entity.PostR, error)
- func GetPost(id string) (*entity.PostR, error)
- func GetPostBySlug(slug string) (*entity.PostR, error)
- func GetPreviousPost(id string) (*entity.PostR, error)
- func GetTag(id string) (*entity.TagR, error)
- func GetTagBySlug(slug string) (*entity.TagR, error)
- func GetTagsByName(names []string) ([]*entity.TagR, error)
- func GetUser(id string) (*entity.UserR, error)
- func GetUserByEmail(email string) (*entity.UserR, error)
- func IsNotFound(err error) bool
- func ListMostUsedTags() ([]*entity.TagR, error)
- func ListNavigations() ([]*entity.NavigationR, error)
- func ListPostDates() (data []string, err error)
- func ListPosts(q *ListPostsQuery) ([]*entity.PostR, error)
- func ListTags(offset, limit int, keyword string) ([]*entity.TagR, error)
- func ListTagsByPost(id string) ([]*entity.TagR, error)
- func ListUsers() ([]*entity.UserR, error)
- func PtrBool(b bool) *bool
- func TransferPosts(fromUID, toUID string) error
- func TrashPost(id string) error
- func UntrashPost(id string) error
- func UpdatePost(p *entity.PostW) error
- func UpdateTag(t *entity.TagW) error
- func UpdateUser(id, nickname, bio, email string) error
- func UpdateUserPassword(id, password string) error
- func UserExists(id string) (bool, error)
- func UserNicknameExists(nickname string) (bool, error)
- type ListPostsQuery
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClearExpiredTrashPosts ¶
func ClearExpiredTrashPosts() error
func ClearNavigations ¶
func ClearNavigations() error
func ClearTrashPosts ¶
func ClearTrashPosts() error
func CountPosts ¶
func CountPosts(q *ListPostsQuery) (int, error)
func CountPostsByType ¶
func CountPostsByUser ¶
func CreateNavigation ¶
func CreateNavigation(n *entity.NavigationW) error
func CreatePost ¶
func CreateUser ¶
func DeletePost ¶
func DeletePostsByUser ¶
func DeleteUser ¶
func IsNotFound ¶
func ListMostUsedTags ¶
func ListNavigations ¶
func ListNavigations() ([]*entity.NavigationR, error)
func ListPostDates ¶
func TransferPosts ¶
func UntrashPost ¶
func UpdatePost ¶
func UpdateUser ¶
func UpdateUserPassword ¶
func UserExists ¶
func UserNicknameExists ¶ added in v1.0.2
Types ¶
type ListPostsQuery ¶
type ListPostsQuery struct {
AuthorID string
TagID string
Title string
Query string
Visibilities []entity.Visibility
IsPublished *bool
IsTrashed *bool
PublishedYear string
PublishedMonth string
PublishedDay string
PublishedDate string
Offset int
Limit int
}
func (*ListPostsQuery) Build ¶
func (q *ListPostsQuery) Build() (query string, args []any)
Click to show internal directories.
Click to hide internal directories.