permission_api

package
v0.0.0-...-4d156b6 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2022 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

* 权限相关API

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddPermission

func AddPermission(QID int64, Level int64) error

func BanUser

func BanUser(QID int64) error

func CheckPermissions

func CheckPermissions(QID int64, minLevel int64) (bool, error)

func IsBaned

func IsBaned(QID int64) (bool, error)

func QueryLastPermission

func QueryLastPermission(QID int64) (int64, error)

func QueryPermission

func QueryPermission(QID int64) (int64, error)

func RemovePermission

func RemovePermission(QID int64) error

func ResetUserLevel

func ResetUserLevel(QID int64) error

func RestAllLevel

func RestAllLevel() error

func UnbanUser

func UnbanUser(QID int64) error

func UpdatePermission

func UpdatePermission(QID int64, Level int64) error

Types

type PermissionConfig

type PermissionConfig struct {
	MinLevel int64 `yaml:"DefaultLevel"`
}

默认权限设置结构体

Jump to

Keyboard shortcuts

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