dao

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: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FilterAreaAccount = "BBQ_account"
	FilterAreaVideo   = "BBQ_video"
	FilterAreaReply   = "BBQ_reply"
	FilterAreaSearch  = "BBQ_search"
	FilterAreaDanmu   = "BBQ_danmu"
	FilterLevel       = 20
)

用于filter

Variables

This section is empty.

Functions

This section is empty.

Types

type CursorValue

type CursorValue struct {
	Offset int32 `json:"offset"`
}

CursorValue .

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) ContentGet

func (d *Dao) ContentGet(ctx context.Context, req *api.ListBulletReq) (res []*api.Bullet, err error)

ContentGet .

func (*Dao) ContentList

func (d *Dao) ContentList(ctx context.Context, req *api.ListBulletReq) (res *api.ListBulletReply, err error)

ContentList 用于返回弹幕列表

func (*Dao) ContentPost

func (d *Dao) ContentPost(ctx context.Context, req *api.Bullet) (dmid int64, err error)

ContentPost .

func (*Dao) Filter

func (d *Dao) Filter(ctx context.Context, content string, area string) (level int32, err error)

Filter .

func (*Dao) PhoneCheck

func (d *Dao) PhoneCheck(c context.Context, mid int64) (telStatus int32, err error)

PhoneCheck .

func (*Dao) Ping

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

Ping dao ping

func (*Dao) VideoBase

func (d *Dao) VideoBase(c context.Context, svid int64) (res *video.VideoBase, err error)

VideoBase 获取单个svid的VideoBase,不存在则会返回error

Jump to

Keyboard shortcuts

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