archive

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: 20 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 is archive dao.

func New

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

New new a archive dao.

func (*Dao) AddArcCache

func (d *Dao) AddArcCache(aid int64, arc *arcwar.Arc)

AddArcCache add arc cache

func (*Dao) AddRelatesCache

func (d *Dao) AddRelatesCache(aid int64, rls []*view.Relate)

AddRelatesCache add relates

func (*Dao) AddViewCache

func (d *Dao) AddViewCache(aid int64, vp *arcwar.ViewReply)

AddViewCache add view relates

func (*Dao) Archive3

func (d *Dao) Archive3(c context.Context, aid int64) (arc *arcwar.Arc, err error)

Archive3 picks one archive data

func (*Dao) Archives

func (d *Dao) Archives(c context.Context, aids []int64) (as map[int64]*arcwar.Arc, err error)

Archives multi get archives.

func (*Dao) FirstTypes

func (d *Dao) FirstTypes() (typeMap map[int32]*model.ArcType, err error)

FirstTypes returns only first level of types

func (*Dao) GetPTypeName

func (d *Dao) GetPTypeName(typeID int32) (firstName string, secondName string)

GetPTypeName get first level of types name

func (*Dao) GetView

func (d *Dao) GetView(c context.Context, aid int64) (vp *arcwar.ViewReply, err error)

GetView gets the aid's View info from Cache or RPC

func (*Dao) LoadViews

func (d *Dao) LoadViews(ctx context.Context, aids []int64) (resMetas map[int64]*arcwar.ViewReply)

LoadViews picks view meta information from Cache & RPC

func (*Dao) Progress

func (d *Dao) Progress(c context.Context, aid, mid int64) (h *view.History, err error)

Progress is archive plays progress .

func (*Dao) RelateAids

func (d *Dao) RelateAids(c context.Context, aid int64, ip string) (aids []int64, err error)

RelateAids get relate by aid

func (*Dao) RelatesCache

func (d *Dao) RelatesCache(c context.Context, aid int64) (rls []*view.Relate, err error)

RelatesCache get relates.

func (*Dao) TargetTypes

func (d *Dao) TargetTypes() (tids []int32, err error)

TargetTypes get all the ugc ranks that AI prepared for us

func (*Dao) TypeChildren

func (d *Dao) TypeChildren(typeid int32) (children []*arcwar.Tp, err error)

TypeChildren returns a first level's type children

func (*Dao) TypeInfo

func (d *Dao) TypeInfo(typeid int32) (*arcwar.Tp, error)

TypeInfo returns the type info

func (*Dao) ViewsCache

func (d *Dao) ViewsCache(c context.Context, aids []int64) (cached map[int64]*arcwar.ViewReply, missed []int64, err error)

ViewsCache pick view from cache

Jump to

Keyboard shortcuts

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