Documentation ¶
Index ¶
- Constants
- func TagClassMap(ty int) (s string)
- func TagClassify() map[int]string
- func Trees(data interface{}, idFieldStr, pidFieldStr, chFieldStr string) (res []interface{})
- type ArcList
- type ArcMeta
- type Archive
- type ArchiveList
- type ArchiveMeta
- type ArchivePage
- type ArchiveTag
- type CourseRec
- type Drawn
- type EsArc
- type EsPage
- type EsParam
- type FeedBack
- type H5Conf
- type KV
- type LinkTag
- type NewbCourseList
- type Occupation
- type Person
- type Play
- type RecArcList
- type RecArchive
- type RecConf
- type Recommend
- type SearchKeywords
- type SearchResult
- type Skill
- type SkillArc
- type Tag
- type Video
Constants ¶
const ( //Course 教程级别 Course //Operation 运营标签 Operation //Classify 分类标签 Classify //ArticleClass 专栏分类 ArticleClass //H5 移动端tag分类 H5 //RecommendTag 推荐理由 RecommendTag //BusinessForAll //所有类型稿件 BusinessForAll = 0 //BusinessForArchive //视频稿件 BusinessForArchive = 1 //BusinessForArticle //专栏稿件 BusinessForArticle = 2 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ArcList ¶
type ArcList struct { Items []*ArcMeta `json:"items"` Page *ArchivePage `json:"page"` }
ArcList for archive list.
type ArcMeta ¶
type ArcMeta struct { AID int64 `json:"aid"` MID int64 `json:"mid"` Cover string `json:"cover"` Title string `json:"title"` Type string `json:"type"` Duration int64 `json:"duration,omitempty"` PlayTime time.Time `json:"play_time"` //历史课程上次学习时间 Watch int8 `json:"watch"` //标记是否观看过 ArcStat *api.Stat `json:"arc_stat,omitempty"` Skill *SkillArc `json:"-"` Business int8 `json:"business"` Tags map[string][]*Tag `json:"tags,omitempty"` }
ArcMeta for skill arc meta.
type Archive ¶
type Archive struct { ID int64 `json:"id"` OID int64 `json:"oid"` State int8 `json:"-"` Business int `json:"business"` CTime time.Time `json:"-"` MTime time.Time `json:"-"` TIDs []int64 `json:"-"` }
Archive for academy achive & article.
type ArchiveList ¶
type ArchiveList struct { Items []*ArchiveMeta `json:"items"` Page *ArchivePage `json:"page"` }
ArchiveList for archive list.
type ArchiveMeta ¶
type ArchiveMeta struct { OID int64 `json:"oid"` MID int64 `json:"mid"` State int32 `json:"state"` Forbid int8 `json:"forbid"` Cover string `json:"cover"` Type string `json:"type"` Title string `json:"title"` HighLightTitle string `json:"highlight_title"` UName string `json:"uname"` Face string `json:"face"` Comment string `json:"comment"` CTime time.Time `json:"-"` MTime time.Time `json:"-"` Tags map[string][]*Tag `json:"tags"` Duration int64 `json:"duration"` ArcStat *api.Stat `json:"arc_stat,omitempty"` ArtStat *mdlArt.Stats `json:"art_stat,omitempty"` Business int `json:"business"` Rights api.Rights `json:"rights,omitempty"` }
ArchiveMeta for archive meta.
type ArchivePage ¶
ArchivePage for archive pagination.
type ArchiveTag ¶
type ArchiveTag struct { ID int64 `json:"id"` OID int64 `json:"oid"` TID int64 `json:"tid"` State int8 `json:"-"` CTime time.Time `json:"-"` MTime time.Time `json:"-"` }
ArchiveTag for academy achive & tag relation .
type CourseRec ¶
type CourseRec struct { ID int64 `json:"id"` Rank int64 `json:"rank"` Shoot *KV `json:"shoot"` Scene *KV `json:"scene"` Edit *KV `json:"edit"` Mmd *KV `json:"mmd"` Sing *KV `json:"sing"` Bang *KV `json:"bang"` Other *KV `json:"other"` }
CourseRec for course rec
type Drawn ¶
type Drawn struct { ID int64 `json:"id"` Rank int64 `json:"rank"` MobilePlan *KV `json:"mobile_plan"` ScreenPlan *KV `json:"screen_plan"` RecordPlan *KV `json:"record_plan"` Other *KV `json:"other"` }
Drawn for Drawn rec
type EsArc ¶
type EsArc struct { OID int64 `json:"oid"` TID []int64 `json:"tid"` Business int `json:"business"` Title []string `json:"title"` //highlight }
EsArc for search archive.
type EsParam ¶
type EsParam struct { OID int64 Tid []int64 TidsMap map[int][]int64 Business int Pn int Ps int Keyword string Order string IP string Seed int64 //支持h5随机推荐 Duration int //支持h5时长筛选 }
EsParam for es page.
type FeedBack ¶
type FeedBack struct { // MID int64 `json:"mid"` //TODO Category string `json:"category"` Course string `json:"course"` Suggest string `json:"suggest"` CTime time.Time `json:"ctime"` MTime time.Time `json:"mtime"` }
FeedBack for user advise.
type H5Conf ¶
type H5Conf struct { //OfficialID 官方推荐id OfficialID int64 //EditorChoiceID 编辑精选id EditorChoiceID int64 //NewbCourseID 新人课程id NewbCourseID int64 //ResourceID 资源管理位id 防重复 ResourceID int64 }
H5Conf for h5 conf.
type NewbCourseList ¶
type NewbCourseList struct { Items []*ArcMeta `json:"items"` Title string `json:"title"` TID int64 `json:"tid"` }
NewbCourseList for NewbCourse list.
type Occupation ¶
type Occupation struct { ID int64 `json:"id"` Rank int64 `json:"rank"` Name string `json:"name"` Desc string `json:"desc"` MainStep string `json:"main_step"` MainSoftWare string `json:"main_software"` Logo string `json:"logo"` }
Occupation for occupation.
type Play ¶
type Play struct { MID int64 `json:"mid"` AID int64 `json:"aid"` Business int8 `json:"business"` Watch int8 `json:"watch"` CTime time.Time `json:"ctime"` MTime time.Time `json:"mtime"` }
Play for academy play list.
type RecArcList ¶
type RecArcList struct { Items []*RecArchive `json:"items"` Name string `json:"name"` TID int64 `json:"tid"` }
RecArcList for recommend archive list.
type RecArchive ¶
type RecArchive struct { OID int64 `json:"oid"` MID int64 `json:"mid"` Cover string `json:"cover"` Title string `json:"title"` Business int `json:"business,omitempty"` //只针对标签课程 Duration int64 `json:"duration,omitempty"` ArcStat *api.Stat `json:"arc_stat,omitempty"` ArtStat *mdlArt.Stats `json:"art_stat,omitempty"` Tags map[string][]*Tag `json:"tags,omitempty"` }
RecArchive for archive.
type Recommend ¶
type Recommend struct { Course *CourseRec `json:"course"` Drawn *Drawn `json:"drawn"` Video *Video `json:"video"` Person *Person `json:"person"` }
Recommend for all type
type SearchKeywords ¶
type SearchKeywords struct { ID int64 `json:"id"` Rank int64 `json:"rank"` ParentID int64 `json:"parent_id"` State int8 `json:"state"` Name string `json:"name"` Comment string `json:"comment"` CTime string `json:"-"` MTime string `json:"-"` Count int `json:"count,omitempty"` Children []*SearchKeywords `json:"children,omitempty"` }
SearchKeywords for academy h5 search keywords.
type SearchResult ¶
SearchResult archive list from search.
type Skill ¶
type Skill struct { ID int64 `json:"id"` OID int64 `json:"oid"` Name string `json:"name"` Desc string `json:"desc"` }
Skill for Skill.
type SkillArc ¶
type SkillArc struct { ID int64 `json:"id"` AID int64 `json:"aid"` Type int `json:"type"` PID int64 `json:"pid"` SkID int64 `json:"skid"` SID int64 `json:"sid"` }
SkillArc for Skill.
type Tag ¶
type Tag struct { ID int64 `json:"id"` ParentID int64 `json:"parent_id"` Type int8 `json:"type"` State int8 `json:"-"` Business int8 `json:"-"` Name string `json:"name"` Desc string `json:"-"` CTime time.Time `json:"-"` MTime time.Time `json:"-"` Children []*Tag `json:"children,omitempty"` }
Tag for academy tag.