mc

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: 7 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 dao

func New

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

New init mysql db

func (*Dao) Close

func (d *Dao) Close()

Close close the resource.

func (*Dao) ConsumerOff

func (d *Dao) ConsumerOff(c context.Context, opt *common.BaseOptions) (err error)

ConsumerOff .

func (*Dao) ConsumerOn

func (d *Dao) ConsumerOn(c context.Context, opt *common.BaseOptions) (err error)

ConsumerOn 登入

func (*Dao) DelRole

func (d *Dao) DelRole(c context.Context, bizid, flowid int64, uids []int64) (err error)

DelRole .

func (*Dao) GetRole

func (d *Dao) GetRole(c context.Context, opt *common.BaseOptions) (role int8, uname string, err error)

GetRole TODO 目前缓存组长组员,以后扩展到存管理员

func (*Dao) IsConsumerOn

func (d *Dao) IsConsumerOn(c context.Context, opt *common.BaseOptions) (isOn bool, err error)

IsConsumerOn .

func (*Dao) Ping

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

Ping dao ping

func (*Dao) SetRole

func (d *Dao) SetRole(c context.Context, opt *common.BaseOptions, role int8) (err error)

SetRole .

type Role

type Role struct {
	Role  int8   `json:"role"`
	Uname string `json:"uname"`
}

Role .

Jump to

Keyboard shortcuts

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