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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service struct {
	TagsCache   map[string][]*acaMdl.Tag
	TagMapCache map[int64]*acaMdl.Tag

	ResourceMapCache map[int64]struct{}
	OccCache         []*acaMdl.Occupation
	OccMapCache      map[int64]*acaMdl.Occupation
	SkillCache       []*acaMdl.Skill
	SkillMapCache    map[int64]*acaMdl.Skill
	OfficialID       int64
	EditorChoiceID   int64
	NewbCourseID     int64
	ResourceID       int64
	//for recommend
	Seed          int64
	RecommendArcs []*acaMdl.RecArchive

	//keywords
	KWsCache []interface{}
	// contains filtered or unexported fields
}

Service struct

func New

func New(c *conf.Config, rpcdaos *service.RPCDaos, p *service.Public) *Service

New get service

func (*Service) AddFeedBack

func (s *Service) AddFeedBack(c context.Context, category, course, suggest string, mid int64) (id int64, err error)

AddFeedBack add feedback.

func (*Service) Archives

func (s *Service) Archives(c context.Context, aca *academy.EsParam) (res *academy.ArchiveList, err error)

Archives get all h5 archive.

func (*Service) ArchivesWithES

func (s *Service) ArchivesWithES(c context.Context, aca *academy.EsParam) (res *academy.ArchiveList, err error)

ArchivesWithES get all archive by es.

func (*Service) Close

func (s *Service) Close()

Close dao

func (*Service) HotArchives

func (s *Service) HotArchives(c context.Context, oids []int64) (res []*academy.ArchiveMeta, err error)

HotArchives get host archives

func (*Service) Keywords

func (s *Service) Keywords(c context.Context) (res []interface{})

Keywords get keywords.

func (*Service) NewbCourse

func (s *Service) NewbCourse(c context.Context) (res []*academy.NewbCourseList, err error)

NewbCourse get new up course.

func (*Service) Occupations

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

Occupations get occ.

func (*Service) Ping

func (s *Service) Ping(c context.Context) (err error)

Ping service

func (*Service) PlayAdd

func (s *Service) PlayAdd(c context.Context, mid, aid int64, bus, watch int8) (id int64, err error)

PlayAdd add play archive by aid & mid.

func (*Service) PlayDel

func (s *Service) PlayDel(c context.Context, mid, aid int64, bus int8) (id int64, err error)

PlayDel del play archive by aid & mid & business.

func (*Service) PlayList

func (s *Service) PlayList(c context.Context, mid int64, pn, ps int) (res *academy.ArcList, err error)

PlayList get play list.

func (*Service) ProfessionSkill

func (s *Service) ProfessionSkill(c context.Context, pids, skids, sids []int64, pn, ps int, isnew bool) (res []*academy.NewbCourseList, err error)

ProfessionSkill get theme course.

func (*Service) RecommendV2

func (s *Service) RecommendV2(c context.Context, mid int64) (res []*academy.RecArcList, err error)

RecommendV2 get recommend archive.

func (*Service) TagList

func (s *Service) TagList(c context.Context) (res map[string][]*academy.Tag, err error)

TagList get all tag.

func (*Service) Tags

func (s *Service) Tags(c context.Context) (res []*academy.Tag)

Tags get all h5 tags.

func (*Service) ThemeCourse

func (s *Service) ThemeCourse(c context.Context, pids, skids, sids []int64, pn, ps int, isnew bool) (res *academy.ArcList, err error)

ThemeCourse get theme course.

func (*Service) ViewPlay

func (s *Service) ViewPlay(c context.Context, mid, aid int64, bus int8) (play *academy.Play, err error)

ViewPlay view play archive by aid & mid & business.

Jump to

Keyboard shortcuts

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