Documentation ¶
Index ¶
- Constants
- func NewSID(rate int32) int64
- func NewSIDWithTimestamp(rate int32, timestamp int64) int64
- type AddTask
- type BatchAddTask
- type CleanTask
- type CountData
- type CountTask
- type GetTask
- type NewcountTask
- type Page
- type QueryData
- type QueryTask
- type RankCountTask
- type RankNewcountTask
- type RankQueryTask
- type RankSetTask
- type RankSortTask
- type RmTask
- type Service
- func (S *Service) Add(app micro.IContext, task *AddTask) (*Top, error)
- func (S *Service) BatchAdd(app micro.IContext, task *BatchAddTask) ([]*Top, error)
- func (S *Service) Clean(app micro.IContext, task *CleanTask) (interface{}, error)
- func (S *Service) Count(app micro.IContext, task *CountTask) (*CountData, error)
- func (S *Service) Get(app micro.IContext, task *GetTask) (*Top, error)
- func (S *Service) GetName() string
- func (S *Service) GetTitle() string
- func (S *Service) Newcount(app micro.IContext, task *NewcountTask) (*CountData, error)
- func (S *Service) Query(app micro.IContext, task *QueryTask) (*QueryData, error)
- func (S *Service) RankCount(app micro.IContext, task *RankCountTask) (*CountData, error)
- func (S *Service) RankNewcount(app micro.IContext, task *RankNewcountTask) (*CountData, error)
- func (S *Service) RankQuery(app micro.IContext, task *RankQueryTask) (*QueryData, error)
- func (S *Service) RankSet(app micro.IContext, task *RankSetTask) (*Top, error)
- func (S *Service) RankSort(app micro.IContext, task *RankSortTask) (interface{}, error)
- func (S *Service) Rm(app micro.IContext, task *RmTask) (*Top, error)
- func (S *Service) Set(app micro.IContext, task *SetTask) (*Top, error)
- type SetTask
- type Top
Constants ¶
View Source
const ERROR_NOT_FOUND = 0x0001
Variables ¶
This section is empty.
Functions ¶
func NewSIDWithTimestamp ¶
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 叠加数据"` }
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:"保留最大数量"` }
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"` }
type GetTask ¶
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 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"` }
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 Service ¶
type Service struct { }
func (*Service) RankNewcount ¶
type SetTask ¶
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"` }
Source Files ¶
- AddTask.go
- BatchAddTask.go
- CleanTask.go
- CountData.go
- CountTask.go
- GetTask.go
- IMP_Add.go
- IMP_BatchAdd.go
- IMP_Clean.go
- IMP_Count.go
- IMP_Get.go
- IMP_Newcount.go
- IMP_Query.go
- IMP_RankCount.go
- IMP_RankNewcount.go
- IMP_RankQuery.go
- IMP_RankSet.go
- IMP_RankSort.go
- IMP_Rm.go
- IMP_Set.go
- NewcountTask.go
- Page.go
- QueryData.go
- QueryTask.go
- RankCountTask.go
- RankNewcountTask.go
- RankQueryTask.go
- RankSetTask.go
- RankSortTask.go
- RmTask.go
- Service.go
- SetTask.go
- Top.go
- error.go
- sid.go
Click to show internal directories.
Click to hide internal directories.