dao

package
v0.14.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 10, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoOwner = errors.New("owner permissions cannot be revoked")

Functions

func Close

func Close() error

func ExistsPost

func ExistsPost(p *model.Post) bool

判断博文是否存在

func GetJobsByID

func GetJobsByID(uid string, id []string) (jobs []model.Job)

获取指定序号任务

func GetPosts

func GetPosts(begin, end string) (posts []model.Post)

获取起始与结束时间范围内所有博文

func GetUsers

func GetUsers(conds ...any) (users []model.User, err error)

func NewUser

func NewUser(uid string, p model.Permission) (u *model.User)

构造函数

func Open

func Open(postPath, userPath string) error

func QueryUserByAuth

func QueryUserByAuth(auth string) *model.User

根据 auth 查询

func QueryUserByUID

func QueryUserByUID(uid string) *model.User

根据 uid 查询

func RemoveJobs

func RemoveJobs(u *model.User, jobs []string) error

func SavePost

func SavePost(p *model.Post) error

func UpdatePermission

func UpdatePermission(uid string, p model.Permission) error

修改权限

func UpdateUser

func UpdateUser(u *model.User) error

func Webhook

func Webhook(p *model.Post)

回调博文

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL