top

package
v0.0.0-...-0e6b51b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 11, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const ERROR_NOT_FOUND = 0x0001

Variables

This section is empty.

Functions

func NewSID

func NewSID(rate int32) int64

func NewSIDWithTimestamp

func NewSIDWithTimestamp(rate int32, timestamp int64) int64

Types

type AddTask

type AddTask struct {
	Name    string      `json:"name" name:"name" title:"推荐表名"`
	Tid     int64       `json:"tid" name:"tid" title:"目标"`
	Rate    int32       `json:"rate" name:"rate" title:"权重"`
	Keyword interface{} `json:"keyword,omitempty" name:"keyword" title:"搜索关键字"`
	Time    interface{} `json:"time,omitempty" name:"time" title:"时间默认当前时间"`
	Options interface{} `json:"options,omitempty" name:"options" title:"其他数据 JSON 叠加数据"`
}

func (*AddTask) GetName

func (T *AddTask) GetName() string

func (*AddTask) GetTitle

func (T *AddTask) GetTitle() string

type BatchAddTask

type BatchAddTask struct {
	Name  string      `json:"name" name:"name" title:"推荐表名"`
	Items interface{} `json:"items,omitempty" name:"items" title:"其他数据 JSON\n[ {tid : 1, rate : 1, options:  {}, keyword:''} ]"`
}

func (*BatchAddTask) GetName

func (T *BatchAddTask) GetName() string

func (*BatchAddTask) GetTitle

func (T *BatchAddTask) GetTitle() string

type CleanTask

type CleanTask struct {
	Name  string      `json:"name" name:"name" title:"推荐表名"`
	Limit interface{} `json:"limit,omitempty" name:"limit" title:"保留最大数量"`
}

func (*CleanTask) GetName

func (T *CleanTask) GetName() string

func (*CleanTask) GetTitle

func (T *CleanTask) GetTitle() string

type CountData

type CountData struct {
	Total int32 `json:"total" name:"total" title:"总记录数"`
}

type CountTask

type CountTask struct {
	Name  string      `json:"name" name:"name" title:"推荐表名"`
	Q     interface{} `json:"q,omitempty" name:"q" title:"搜索关键字"`
	Tids  interface{} `json:"tids,omitempty" name:"tids" title:"目标ID,多个逗号分割"`
	TopId interface{} `json:"topId,omitempty" name:"topid" title:"顶部ID"`
}

func (*CountTask) GetName

func (T *CountTask) GetName() string

func (*CountTask) GetTitle

func (T *CountTask) GetTitle() string

type GetTask

type GetTask struct {
	Name string `json:"name" name:"name" title:"推荐表名"`
	Tid  int64  `json:"tid" name:"tid" title:"ID"`
}

func (*GetTask) GetName

func (T *GetTask) GetName() string

func (*GetTask) GetTitle

func (T *GetTask) GetTitle() string

type NewcountTask

type NewcountTask struct {
	Name  string      `json:"name" name:"name" title:"推荐表名"`
	TopId int64       `json:"topId" name:"topid" title:"顶部ID"`
	Q     interface{} `json:"q,omitempty" name:"q" title:"搜索关键字"`
}

func (*NewcountTask) GetName

func (T *NewcountTask) GetName() string

func (*NewcountTask) GetTitle

func (T *NewcountTask) GetTitle() string

type Page

type Page struct {
	P     int32 `json:"p" name:"p" title:"分页位置"`
	N     int32 `json:"n" name:"n" title:"单页记录数"`
	Count int32 `json:"count" name:"count" title:"总页数"`
	Total int32 `json:"total" name:"total" title:"总记录数"`
	TopId int64 `json:"topId" name:"topid" title:"顶部ID"`
}

type QueryData

type QueryData struct {
	Items []*Top `json:"items,omitempty" name:"items" title:"Top"`
	Page  *Page  `json:"page,omitempty" name:"page" title:"分页"`
}

type QueryTask

type QueryTask struct {
	Name  string      `json:"name" name:"name" title:"推荐表名"`
	Q     interface{} `json:"q,omitempty" name:"q" title:"搜索关键字"`
	Tids  interface{} `json:"tids,omitempty" name:"tids" title:"目标ID,多个逗号分割"`
	P     interface{} `json:"p,omitempty" name:"p" title:"分页位置, 从1开始, 0 不处理分页"`
	N     interface{} `json:"n,omitempty" name:"n" title:"分页大小,默认 20"`
	TopId interface{} `json:"topId,omitempty" name:"topid" title:"顶部ID"`
}

func (*QueryTask) GetName

func (T *QueryTask) GetName() string

func (*QueryTask) GetTitle

func (T *QueryTask) GetTitle() string

type RankCountTask

type RankCountTask struct {
	Name  string      `json:"name" name:"name" title:"推荐表名"`
	Q     interface{} `json:"q,omitempty" name:"q" title:"搜索关键字"`
	Tids  interface{} `json:"tids,omitempty" name:"tids" title:"目标ID,多个逗号分割"`
	TopId interface{} `json:"topId,omitempty" name:"topid" title:"顶部ID"`
}

func (*RankCountTask) GetName

func (T *RankCountTask) GetName() string

func (*RankCountTask) GetTitle

func (T *RankCountTask) GetTitle() string

type RankNewcountTask

type RankNewcountTask struct {
	Name  string      `json:"name" name:"name" title:"推荐表名"`
	Q     interface{} `json:"q,omitempty" name:"q" title:"搜索关键字"`
	TopId int64       `json:"topId" name:"topid" title:"顶部ID"`
}

func (*RankNewcountTask) GetName

func (T *RankNewcountTask) GetName() string

func (*RankNewcountTask) GetTitle

func (T *RankNewcountTask) GetTitle() string

type RankQueryTask

type RankQueryTask struct {
	Name  string      `json:"name" name:"name" title:"推荐表名"`
	Q     interface{} `json:"q,omitempty" name:"q" title:"搜索关键字"`
	Tids  interface{} `json:"tids,omitempty" name:"tids" title:"目标ID,多个逗号分割"`
	P     interface{} `json:"p,omitempty" name:"p" title:"分页位置, 从1开始, 0 不处理分页"`
	N     interface{} `json:"n,omitempty" name:"n" title:"分页大小,默认 20"`
	TopId interface{} `json:"topId,omitempty" name:"topid" title:"顶部ID"`
}

func (*RankQueryTask) GetName

func (T *RankQueryTask) GetName() string

func (*RankQueryTask) GetTitle

func (T *RankQueryTask) GetTitle() string

type RankSetTask

type RankSetTask struct {
	Name string `json:"name" name:"name" title:"推荐表名"`
	Tid  int64  `json:"tid" name:"tid" title:"目标"`
	Rank int32  `json:"rank" name:"rank" title:"排名 0 表示不指定排名"`
}

func (*RankSetTask) GetName

func (T *RankSetTask) GetName() string

func (*RankSetTask) GetTitle

func (T *RankSetTask) GetTitle() string

type RankSortTask

type RankSortTask struct {
	Name  string `json:"name" name:"name" title:"推荐表名"`
	Limit int32  `json:"limit" name:"limit" title:"限制数量"`
}

func (*RankSortTask) GetName

func (T *RankSortTask) GetName() string

func (*RankSortTask) GetTitle

func (T *RankSortTask) GetTitle() string

type RmTask

type RmTask struct {
	Name string `json:"name" name:"name" title:"推荐表名"`
	Tid  int64  `json:"tid" name:"tid" title:"目标"`
}

func (*RmTask) GetName

func (T *RmTask) GetName() string

func (*RmTask) GetTitle

func (T *RmTask) GetTitle() string

type Service

type Service struct {
}

func (*Service) Add

func (S *Service) Add(app micro.IContext, task *AddTask) (*Top, error)

func (*Service) BatchAdd

func (S *Service) BatchAdd(app micro.IContext, task *BatchAddTask) ([]*Top, error)

func (*Service) Clean

func (S *Service) Clean(app micro.IContext, task *CleanTask) (interface{}, error)

func (*Service) Count

func (S *Service) Count(app micro.IContext, task *CountTask) (*CountData, error)

func (*Service) Get

func (S *Service) Get(app micro.IContext, task *GetTask) (*Top, error)

func (*Service) GetName

func (S *Service) GetName() string

func (*Service) GetTitle

func (S *Service) GetTitle() string

func (*Service) Newcount

func (S *Service) Newcount(app micro.IContext, task *NewcountTask) (*CountData, error)

func (*Service) Query

func (S *Service) Query(app micro.IContext, task *QueryTask) (*QueryData, error)

func (*Service) RankCount

func (S *Service) RankCount(app micro.IContext, task *RankCountTask) (*CountData, error)

func (*Service) RankNewcount

func (S *Service) RankNewcount(app micro.IContext, task *RankNewcountTask) (*CountData, error)

func (*Service) RankQuery

func (S *Service) RankQuery(app micro.IContext, task *RankQueryTask) (*QueryData, error)

func (*Service) RankSet

func (S *Service) RankSet(app micro.IContext, task *RankSetTask) (*Top, error)

func (*Service) RankSort

func (S *Service) RankSort(app micro.IContext, task *RankSortTask) (interface{}, error)

func (*Service) Rm

func (S *Service) Rm(app micro.IContext, task *RmTask) (*Top, error)

func (*Service) Set

func (S *Service) Set(app micro.IContext, task *SetTask) (*Top, error)

type SetTask

type SetTask struct {
	Name    string      `json:"name" name:"name" title:"推荐表名"`
	Tid     int64       `json:"tid" name:"tid" title:"目标"`
	Keyword interface{} `json:"keyword,omitempty" name:"keyword" title:"搜索关键字"`
	Options interface{} `json:"options,omitempty" name:"options" title:"其他数据 JSON 叠加数据"`
}

func (*SetTask) GetName

func (T *SetTask) GetName() string

func (*SetTask) GetTitle

func (T *SetTask) GetTitle() string

type Top

type Top struct {
	db.Object
	Tid     int64       `json:"tid" name:"tid" title:"目标ID" index:"ASC"`
	Keyword string      `json:"keyword" name:"keyword" title:"搜索关键字" length:"2048"`
	Sid     int64       `json:"sid" name:"sid" title:"序号 降序" index:"DESC"`
	Rank    int32       `json:"rank" name:"rank" title:"排名" index:"ASC"`
	Fixed   int32       `json:"fixed" name:"fixed" title:"固定排名位置"`
	Options interface{} `json:"options,omitempty" name:"options" title:"其他数据" length:"-1"`
}

func (*Top) GetName

func (O *Top) GetName() string

func (*Top) GetTitle

func (O *Top) GetTitle() string

Jump to

Keyboard shortcuts

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