esports

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: 21 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) Arcs

func (d *Dao) Arcs(c context.Context, id int64, limit int) (res []*mdlesp.Arc, err error)

Arcs archives by ids.

func (*Dao) Batch

func (d *Dao) Batch(list []int64, msg string, contest *mdlesp.Contest, batchSize int, f func(users []int64, msg string, contest *mdlesp.Contest) error)

Batch 批量处理

func (*Dao) Close

func (d *Dao) Close()

Close close the resource.

func (*Dao) Contests

func (d *Dao) Contests(c context.Context, stime, etime int64) (res []*mdlesp.Contest, err error)

Contests contests by time.

func (*Dao) NoticeUser

func (d *Dao) NoticeUser(mids []int64, body string, contest *mdlesp.Contest) (err error)

NoticeUser pushs the notification to users.

func (*Dao) Ping

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

Ping ping dao

func (*Dao) SendMessage

func (d *Dao) SendMessage(mids []int64, msg string, contest *mdlesp.Contest) (err error)

SendMessage send system notify.

func (*Dao) Teams

func (d *Dao) Teams(c context.Context, homeID, awayID int64) (res []*mdlesp.Team, err error)

Teams teams by id.

func (*Dao) UpArcScore

func (d *Dao) UpArcScore(c context.Context, partArcs []*mdlesp.Arc, arcs map[int64]*arcmdl.Arc) (err error)

UpArcScore update archive score.

Jump to

Keyboard shortcuts

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