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

func New

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

New new a Dao and return.

func (*Dao) AddUpperCountCache

func (d *Dao) AddUpperCountCache(c context.Context, mid int64, count int64) (err error)

AddUpperCountCache the count of up's archives

func (*Dao) AddUpperPassedCache

func (d *Dao) AddUpperPassedCache(c context.Context, mid int64, aids []int64, ptimes []time.Time, copyrights []int8) (err error)

AddUpperPassedCache add up paassed cache.

func (*Dao) ArcsAids

func (d *Dao) ArcsAids(c context.Context, ids []int64) (aids []int64, ptimes []time.Time, copyrights []int8, aptm map[int64]*model.AidPubTime, err error)

ArcsAids get archives by aids.

func (*Dao) DelUpperPassedCache

func (d *Dao) DelUpperPassedCache(c context.Context, mid, aid int64) (err error)

DelUpperPassedCache delete up passed cache.

func (*Dao) ExpireUpperPassedCache

func (d *Dao) ExpireUpperPassedCache(c context.Context, mid int64) (ok bool, err error)

ExpireUpperPassedCache expire up passed cache.

func (*Dao) ExpireUppersCountCache

func (d *Dao) ExpireUppersCountCache(c context.Context, mids []int64) (cachedUp, missed []int64, err error)

ExpireUppersCountCache expire ups count cache

func (*Dao) ExpireUppersPassedCache

func (d *Dao) ExpireUppersPassedCache(c context.Context, mids []int64) (res map[int64]bool, err error)

ExpireUppersPassedCache expire uppers passed cache.

func (*Dao) Staff

func (d *Dao) Staff(c context.Context, mid int64) (aids []int64, err error)

Staff get upper staff aids by mid.

func (*Dao) StaffAid

func (d *Dao) StaffAid(c context.Context, aid int64) (mids []int64, err error)

StaffAid get uppers staff mid-list by aid.

func (*Dao) Staffs

func (d *Dao) Staffs(c context.Context, mids []int64) (aidm map[int64][]int64, err error)

Staffs get uppers staff aids by mids.

func (*Dao) UpperCount

func (d *Dao) UpperCount(c context.Context, mid int64) (count int64, err error)

UpperCount get the count of archives by mid of Up.

func (*Dao) UpperCountCache

func (d *Dao) UpperCountCache(c context.Context, mid int64) (count int64, err error)

UpperCountCache get up count from cache.

func (*Dao) UpperPassed

func (d *Dao) UpperPassed(c context.Context, mid int64) (aids []int64, ptimes []time.Time, copyrights []int8, err error)

UpperPassed get upper passed archives.

func (*Dao) UpperPassedCache

func (d *Dao) UpperPassedCache(c context.Context, mid int64, start, end int) (aids []int64, err error)

UpperPassedCache get upper passed archives from cache.

func (*Dao) UppersCount

func (d *Dao) UppersCount(c context.Context, mids []int64) (uc map[int64]int64, err error)

UppersCount get mids count

func (*Dao) UppersCountCache

func (d *Dao) UppersCountCache(c context.Context, mids []int64) (cached map[int64]int64, missed []int64, err error)

UppersCountCache return uppers count cache

func (*Dao) UppersPassed

func (d *Dao) UppersPassed(c context.Context, mids []int64) (aidm map[int64][]int64, ptimes map[int64][]time.Time, copyrights map[int64][]int8, err error)

UppersPassed get uppers passed archives.

func (*Dao) UppersPassedCache

func (d *Dao) UppersPassedCache(c context.Context, mids []int64, start, end int) (aidm map[int64][]int64, err error)

UppersPassedCache get uppers passed archives from cache.

func (*Dao) UppersPassedCacheWithScore

func (d *Dao) UppersPassedCacheWithScore(c context.Context, mids []int64, start, end int) (aidm map[int64][]*model.AidPubTime, err error)

UppersPassedCacheWithScore get uppers passed archive from cache with score

Jump to

Keyboard shortcuts

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