card

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: 13 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 redis dao.

func New

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

New fn

func (*Dao) AvidVideoMap

func (d *Dao) AvidVideoMap(ctx context.Context, avids []int64) (avidVideoMap map[int64]*model.UpCardVideo, err error)

AvidVideoMap get <avid, video> map by avids

func (*Dao) Close

func (d *Dao) Close()

Close fn

func (*Dao) CountUpCard

func (d *Dao) CountUpCard(ctx context.Context) (total int, err error)

CountUpCard count up num

func (*Dao) GetUpInfo

func (d *Dao) GetUpInfo(ctx context.Context, mid int64) (card *model.UpCardInfo, err error)

GetUpInfo get up info by mid

func (*Dao) ListAVID

func (d *Dao) ListAVID(ctx context.Context, mid int64) (avids []int64, err error)

ListAVID list avids by mid

func (*Dao) ListUpAccount

func (d *Dao) ListUpAccount(ctx context.Context, mid int64) (accounts []*model.UpCardAccount, err error)

ListUpAccount list up accounts by mid

func (*Dao) ListUpBase

func (d *Dao) ListUpBase(c context.Context, size int, lastID int64, where string) (idMids map[int64]int64, err error)

ListUpBase list <id, mid> k-v pairs

func (*Dao) ListUpImage

func (d *Dao) ListUpImage(ctx context.Context, mid int64) (images []*model.UpCardImage, err error)

ListUpImage list up images by mid

func (*Dao) ListUpInfo

func (d *Dao) ListUpInfo(ctx context.Context, offset uint, size uint) (infos []*model.UpCardInfo, err error)

ListUpInfo page list up mids

func (*Dao) ListUpMID

func (d *Dao) ListUpMID(ctx context.Context) (mids []int64, err error)

ListUpMID list up mids

func (*Dao) ListVideoArchive

func (d *Dao) ListVideoArchive(ctx context.Context, avids []int64) (videos []*model.UpCardVideo, err error)

ListVideoArchive list videos by avids

func (*Dao) MidAccountsMap

func (d *Dao) MidAccountsMap(ctx context.Context, mids []int64) (midAccountsMap map[int64][]*model.UpCardAccount, err error)

MidAccountsMap get <mid, Accounts> map by mids

func (*Dao) MidAvidsMap

func (d *Dao) MidAvidsMap(ctx context.Context, mids []int64) (midAvidsMap map[int64][]int64, err error)

MidAvidsMap get <mid, Avids> map by mids

func (*Dao) MidImagesMap

func (d *Dao) MidImagesMap(ctx context.Context, mids []int64) (midImagesMap map[int64][]*model.UpCardImage, err error)

MidImagesMap get <mid, Images> map by mids

func (*Dao) MidUpInfoMap

func (d *Dao) MidUpInfoMap(ctx context.Context, mids []int64) (midUpInfoMap map[int64]*model.UpCardInfo, err error)

MidUpInfoMap get <mid, UpInfo> map by mids

func (*Dao) Ping

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

Ping ping cpdb

Jump to

Keyboard shortcuts

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