user

package
v0.0.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotListeningList = errors.New("不是一个好的监听列表")

监听列表获取错误

Functions

This section is empty.

Types

type Job

type Job struct {
	// 数据库内序号
	ID     int64  `gorm:"primaryKey;autoIncrement" json:"-"`
	Patten string `form:"patten" json:"patten" yaml:"patten"`
	request.Job
}

回调任务封装

func (Job) Match

func (j Job) Match(s string) bool

匹配

func (Job) String

func (j Job) String() string

转字符串

type Jobs

type Jobs []Job

func GetJobsByRegexp

func GetJobsByRegexp(platform, uid string) (js Jobs)

正则匹配任务

func (*Jobs) Scan

func (js *Jobs) Scan(val any) error

func (*Jobs) ToString

func (js *Jobs) ToString() string

转字符串

func (Jobs) Value

func (js Jobs) Value() (driver.Value, error)

type Listening

type Listening []string

监听列表的读取实现

func (*Listening) Scan

func (l *Listening) Scan(val any) error

func (Listening) Value

func (l Listening) Value() (driver.Value, error)

type User

type User struct {
	Uid        string  `gorm:"primaryKey" json:"uid"`
	Token      string  `json:"-"`
	Permission float64 `json:"permission"`
	Jobs       `form:"jobs" json:"jobs" yaml:"jobs"`
	Listening  `form:"listening" json:"listening" yaml:"listening"`
}

用户

func (*User) LevelUP

func (u *User) LevelUP()

升级

func (*User) Make

func (u *User) Make(uid string) *User

构造函数

func (*User) Query

func (u *User) Query(token string) *User

根据 uid 查询

func (*User) Scan

func (u *User) Scan(val any) error

func (User) Value

func (u User) Value() (driver.Value, error)

Jump to

Keyboard shortcuts

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