creative

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

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BgmData

type BgmData struct {
	Data string `json:"data"`
}

type Dao

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

Dao is creative dao.

func New

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

New init api url

func (*Dao) AddCacheBgmData

func (d *Dao) AddCacheBgmData(c context.Context, aid, cid, mtype int64, val *BgmData) (err error)

AddCacheBgmData 这里也支持自定义注释 会替换默认的注释

func (*Dao) AllByTypes

func (d *Dao) AllByTypes(c context.Context, tyInts []int) (vss []*version.Version, err error)

AllByTypes fn

func (*Dao) AllOperByTypeSQL

func (d *Dao) AllOperByTypeSQL(c context.Context, tys []string) (ops []*operation.Operation, err error)

AllOperByTypeSQL fn

func (*Dao) BgmData

func (d *Dao) BgmData(c context.Context, aid, cid, mtype int64, cache bool) (res *BgmData, err error)

BgmData get data from cache if miss will call source method, then add to cache.

func (*Dao) CacheBgmData

func (d *Dao) CacheBgmData(c context.Context, aid, cid, mtype int64) (res *BgmData, err error)

CacheBgmData get data from mc

func (*Dao) Close

func (d *Dao) Close() (err error)

Close creativeDb

func (*Dao) DelCacheBgmData

func (d *Dao) DelCacheBgmData(c context.Context, aid, cid, mtype int64) (err error)

DelCacheBgmData delete data from mc

func (*Dao) LatestByType

func (d *Dao) LatestByType(c context.Context, tid int) (vs *version.Version, err error)

LatestByType fn

func (*Dao) Operations

func (d *Dao) Operations(c context.Context, tys []string) (ops []*operation.Operation, err error)

Operations get all operations.

func (*Dao) Ping

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

Ping creativeDb

func (*Dao) RawBgmData

func (d *Dao) RawBgmData(c context.Context, aid, cid, mtype int64) (data *BgmData, err error)

RawBgmData fn

func (*Dao) Tool

func (d *Dao) Tool(c context.Context, ty string) (ops []*operation.Operation, err error)

Tool get all tool.

func (*Dao) Types

func (d *Dao) Types(c context.Context) (tops []*archive.Type, langs map[string][]*archive.Type, typeMap map[int16]*archive.Type, err error)

Types get all Types from creative database.

Jump to

Keyboard shortcuts

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