academy

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: 12 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 define

func New

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

New init dao

func (*Dao) AddFeedBack

func (d *Dao) AddFeedBack(c context.Context, f *academy.FeedBack, mid int64) (id int64, err error)

AddFeedBack add academy_feedback.

func (*Dao) Archive

func (d *Dao) Archive(c context.Context, oid int64, bs int) (a *academy.Archive, err error)

Archive get one achive.

func (*Dao) ArchiveCount

func (d *Dao) ArchiveCount(c context.Context, tids []int64, bs int) (count int, err error)

ArchiveCount get all achive count.

func (*Dao) ArchiveTagsByOids

func (d *Dao) ArchiveTagsByOids(c context.Context, oids []int64) (res map[int64][]int64, err error)

ArchiveTagsByOids get all tids by oids.

func (*Dao) ArchivesWithES

func (d *Dao) ArchivesWithES(c context.Context, aca *academy.EsParam) (res *academy.SearchResult, err error)

ArchivesWithES search archives by es.

func (*Dao) Close

func (d *Dao) Close() (err error)

Close db

func (*Dao) Keywords

func (d *Dao) Keywords(c context.Context) (res []*academy.SearchKeywords, err error)

Keywords get all keywords.

func (*Dao) LinkTags

func (d *Dao) LinkTags(c context.Context, ids []int64) (res []*academy.LinkTag, err error)

LinkTags get link tags by h5 tids.

func (*Dao) Occupations

func (d *Dao) Occupations(c context.Context) (res []*academy.Occupation, err error)

Occupations get all occupation.

func (*Dao) Ping

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

Ping db

func (*Dao) Play

func (d *Dao) Play(c context.Context, p *academy.Play) (res *academy.Play, err error)

Play get play achive info.

func (*Dao) PlayAdd

func (d *Dao) PlayAdd(c context.Context, p *academy.Play) (id int64, err error)

PlayAdd add play archive.

func (*Dao) PlayCount

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

PlayCount get all play achive count.

func (*Dao) PlayDel

func (d *Dao) PlayDel(c context.Context, p *academy.Play) (id int64, err error)

PlayDel add play archive.

func (*Dao) Plays

func (d *Dao) Plays(c context.Context, mid int64, offset, limit int) (res []*academy.Play, err error)

Plays get all play by mid.

func (*Dao) SearchArchive

func (d *Dao) SearchArchive(c context.Context, tidsMap map[int][]int64, bs int) (res []*academy.Archive, err error)

SearchArchive get all oid & tid.

func (*Dao) SkillArcCount

func (d *Dao) SkillArcCount(c context.Context, pids, skids, sids []int64) (count int, err error)

SkillArcCount get all skill achive count.

func (*Dao) SkillArcs

func (d *Dao) SkillArcs(c context.Context, pids, skids, sids []int64, offset, limit int) (res []*academy.SkillArc, err error)

SkillArcs get all SkillArc.

func (*Dao) Skills

func (d *Dao) Skills(c context.Context) (res []*academy.Skill, err error)

Skills get all Skill.

func (*Dao) Tag

func (d *Dao) Tag(c context.Context, id int64) (t *academy.Tag, err error)

Tag get one tag.

func (*Dao) TagList

func (d *Dao) TagList(c context.Context) (res map[string][]*academy.Tag, tagMap, parentChildMap map[int64]*academy.Tag, err error)

TagList get all tag from academy_tag.

func (*Dao) Tags

func (d *Dao) Tags(c context.Context, ids []int64) (res []*academy.Tag, err error)

Tags get some tags by ids.

Jump to

Keyboard shortcuts

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