newbiedao

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

Documentation

Index

Constants

View Source
const (
	// ActivityTypeVideo type "videoall"
	ActivityTypeVideo = "videoall"
)

const text

Variables

View Source
var (
	// Categories cache categories
	Categories map[int64]*model.Category
	// RecommendUpList cache recommend up list
	RecommendUpList map[int64]map[int64]*model.RecommendUp
)

Functions

This section is empty.

Types

type Dao

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

Dao def dao struct

func New

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

New fn

func (*Dao) Close

func (d *Dao) Close()

Close close db conn

func (*Dao) GetActivities

func (d *Dao) GetActivities(c context.Context) (res []*model.Activity, err error)

GetActivities get activities

func (*Dao) GetCategories

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

GetCategories get categories

func (*Dao) GetInfo

func (d *Dao) GetInfo(c context.Context, mid int64) (res *accApi.InfoReply, err error)

GetInfo get info

func (*Dao) GetInfos

func (d *Dao) GetInfos(c context.Context, mids []int64) (res *accApi.InfosReply, err error)

GetInfos get infos

func (*Dao) GetRecommendUpList

func (d *Dao) GetRecommendUpList(c context.Context) error

GetRecommendUpList get recommend up list

func (*Dao) GetRelations

func (d *Dao) GetRelations(c context.Context, mid int64, fids []int64) (res map[int64]*model.Relation, err error)

GetRelations get relations

func (*Dao) GetVideoUp

func (d *Dao) GetVideoUp(c context.Context, aid int64) (videoUpArchive *model.VideoUpArchive, err error)

GetVideoUp get video up

func (*Dao) Ping

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

Ping ping db

Jump to

Keyboard shortcuts

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