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: 33 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 redis,es

func (*Dao) Close

func (d *Dao) Close()

Close close the resource.

func (*Dao) Context

func (d *Dao) Context(r *image.NRGBA64) (c *freetype.Context)

Context get font for drawing

func (*Dao) CreateItemPNG

func (d *Dao) CreateItemPNG(item model.Item) (location string, err error)

CreateItemPNG make a pic for sug

func (*Dao) DelSug

func (d *Dao) DelSug(c context.Context, seasonID, itemsID int64) (err error)

DelSug del redis sug

func (*Dao) GetItem

func (d *Dao) GetItem(c context.Context, itemsID int64) (item model.Item, err error)

GetItem get mall items from db.

func (*Dao) GetMatchType

func (d *Dao) GetMatchType(c context.Context, seasonID, itemsID int64) (matchType int8, err error)

GetMatchType get match type.

func (*Dao) GetSeason

func (d *Dao) GetSeason(ctx context.Context, seasonID int64) (season model.Season, err error)

GetSeason get season from es.

func (*Dao) InsertMatch

func (d *Dao) InsertMatch(c context.Context, season model.Season, item model.Item, typeInt int8, sort int64, location string) (affect int64, err error)

InsertMatch insert match.

func (*Dao) ItemList

func (d *Dao) ItemList(ctx context.Context, params *model.SourceSearch) (itemsList []model.Items, err error)

ItemList mall items list from http.

func (*Dao) Ping

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

Ping dao ping

func (*Dao) SearchV2

func (d *Dao) SearchV2(c context.Context, params *model.Search) (list []model.SugList, err error)

SearchV2 search match from db

func (*Dao) SeasonList

func (d *Dao) SeasonList(ctx context.Context, params *model.SourceSearch) (list []model.Season, err error)

SeasonList search season list.

func (*Dao) SetItem

func (d *Dao) SetItem(c context.Context, item *model.Item, location string) (b bool, err error)

SetItem set redis item

func (*Dao) SetSug

func (d *Dao) SetSug(c context.Context, seasonID int64, ItemID int64, score int64) (err error)

SetSug set redis sug

func (*Dao) Text

func (d *Dao) Text(c *freetype.Context, s string, pt *fixed.Point26_6, size int, color image.Image, length fixed.Int26_6) (err error)

Text draw letters on pic

func (*Dao) UpdateMatch

func (d *Dao) UpdateMatch(c context.Context, season model.Season, item model.Item, typeInt int8, sugPic string) (affect int64, err error)

UpdateMatch update match.

func (*Dao) Upload

func (d *Dao) Upload(c context.Context, fileType string, fileName string, body io.Reader) (location string, err error)

Upload upload bfs.

Jump to

Keyboard shortcuts

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