manager

package
v0.0.0-...-83adff0 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2020 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dao

type Dao struct {
	// contains filtered or unexported fields
}

Dao is redis dao.

func New

func New(c *conf.Config) (d *Dao)

New new a dao.

func (*Dao) AddReasonLog

func (d *Dao) AddReasonLog(c context.Context, oid int64, tp int8, cateID int64, rid int64, uid int64, tid int16, ctime, mtime time.Time) (rows int64, err error)

AddReasonLog add a reason log

func (*Dao) Close

func (d *Dao) Close()

Close close.

func (*Dao) GetNameByUID

func (d *Dao) GetNameByUID(c context.Context, uids []int64) (mcases map[int64][]interface{}, err error)

GetNameByUID 获取用户名

func (*Dao) GetUIDByName

func (d *Dao) GetUIDByName(c context.Context, name string) (uid int64, err error)

GetUIDByName 获取uid

func (*Dao) GetUserRole

func (d *Dao) GetUserRole(c context.Context, uid int64) (role int8, err error)

GetUserRole 用户角色

func (*Dao) Ping

func (d *Dao) Ping(c context.Context) (err error)

Ping ping cpdb

func (*Dao) Uids

func (d *Dao) Uids(c context.Context, names []string) (res map[string]int64, err error)

Uids get uids by unames

func (*Dao) Unames

func (d *Dao) Unames(c context.Context, uids []int64) (res map[int64]string, err error)

Unames get unames by uid

func (*Dao) UpGroups

func (d *Dao) UpGroups(c context.Context) (groups map[int64]*manager.UpGroup, err error)

UpGroups get all up groups

func (*Dao) User

func (d *Dao) User(c context.Context, id int64) (u *manager.User, err error)

User get manager user by id

Jump to

Keyboard shortcuts

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