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

View Source
const (

	// StaffWhiteGroupID const
	StaffWhiteGroupID = int64(24)
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Dao

type Dao struct {
	UpClient upapi.UpClient
	// contains filtered or unexported fields
}

Dao is archive dao.

func New

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

New new a dao.

func (*Dao) Add

func (d *Dao) Add(c context.Context, ap *archive.ArcParam, ip string) (aid int64, err error)

Add add archive and videos.

func (*Dao) ApplyStaffs

func (d *Dao) ApplyStaffs(c context.Context, aid int64, ip string) (staffs []*archive.Staff, err error)

ApplyStaffs fn

func (*Dao) Close

func (d *Dao) Close()

Close close resource.

func (*Dao) DescFormat

func (d *Dao) DescFormat(c context.Context) (descFormats map[int]*archive.DescFormat, err error)

DescFormat fn

func (*Dao) Edit

func (d *Dao) Edit(c context.Context, ap *archive.ArcParam, ip string) (err error)

Edit edit archive and videos.

func (*Dao) FilenameExpires

func (d *Dao) FilenameExpires(c context.Context, vs []*archive.VideoParam) (ves []*archive.VideoExpire, err error)

FilenameExpires get filename expire time.

func (*Dao) FreshFavTypes

func (d *Dao) FreshFavTypes(c context.Context, mid int64, tp int) (err error)

FreshFavTypes fn

func (*Dao) GameList

func (d *Dao) GameList(c context.Context) (gameMap map[int64]*pordermdl.Game, err error)

GameList fn

func (*Dao) Ping

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

Ping ping success.

func (*Dao) PorderCfgList

func (d *Dao) PorderCfgList(c context.Context) (cfgs map[int64]*pordermdl.Config, err error)

PorderCfgList fn

func (*Dao) StaffTypeConfig

func (d *Dao) StaffTypeConfig(c context.Context) (isGary bool, typeConf map[int16]*archive.StaffTypeConf, err error)

StaffTypeConfig 获取联合投稿分区配置

func (*Dao) StaffUps

func (d *Dao) StaffUps(c context.Context) (ups map[int64]int64, err error)

StaffUps 联合投稿白名单

func (*Dao) TagUp

func (d *Dao) TagUp(c context.Context, aid int64, tag, ip string) (err error)

TagUp fn

func (*Dao) TypeMapping

func (d *Dao) TypeMapping(c context.Context) (rmap map[int16]*archive.Type, err error)

TypeMapping is second types opposite first types.

func (*Dao) UpSpecial

func (d *Dao) UpSpecial(c context.Context, gpid int64) (ups map[int64]int64, err error)

UpSpecial 获取UP主的特殊用户组

func (*Dao) View

func (d *Dao) View(c context.Context, aid int64, ip string) (a *archive.Archive, vs []*archive.Video, err error)

View get archive and videos.

Jump to

Keyboard shortcuts

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