article

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

Documentation

Index

Constants

View Source
const ArticleState_None = 0
View Source
const ArticleState_Recycle = 1
View Source
const ERROR_HAS_SENDED = 0x0002
View Source
const ERROR_NOT_FOUND = 0x0001
View Source
const OutboxStatus_None = 0
View Source
const OutboxStatus_Sended = 1

Variables

This section is empty.

Functions

func Prefix

func Prefix(app micro.IContext, prefix string, id int64) string

Types

type Article

type Article struct {
	db.Object
	Uid     int64       `json:"uid" name:"uid" title:"发布者ID"`
	Body    string      `json:"body" name:"body" title:"内容" length:"-1"`
	Options interface{} `json:"options,omitempty" name:"options" title:"其他数据" length:"-1"`
	Ctime   int64       `json:"ctime" name:"ctime" title:"创建时间"`
	State   int32       `json:"state" name:"state" title:"状态" index:"ASC"`
}

func (*Article) GetName

func (O *Article) GetName() string

func (*Article) GetTitle

func (O *Article) GetTitle() string

type GetTask

type GetTask struct {
	Id int64 `json:"id" name:"id" title:"动态ID"`
}

func (*GetTask) GetName

func (T *GetTask) GetName() string

func (*GetTask) GetTitle

func (T *GetTask) GetTitle() string

type Outbox

type Outbox struct {
	db.Object
	Uid     int64       `json:"uid" name:"uid" title:"发布者ID"`
	Mid     int64       `json:"mid" name:"mid" title:"动态ID"`
	Body    string      `json:"body" name:"body" title:"内容" length:"-1"`
	Options interface{} `json:"options,omitempty" name:"options" title:"其他数据" length:"-1"`
	Ctime   int64       `json:"ctime" name:"ctime" title:"创建时间"`
}

func (*Outbox) GetName

func (O *Outbox) GetName() string

func (*Outbox) GetTitle

func (O *Outbox) GetTitle() string

type OutboxCountData

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

type OutboxCountTask

type OutboxCountTask struct {
	Uid         int64       `json:"uid" name:"uid" title:"用户ID"`
	IsPublished interface{} `json:"isPublished,omitempty" name:"ispublished" title:"是否发布"`
	Q           interface{} `json:"q,omitempty" name:"q" title:"模糊匹配关键字"`
}

func (*OutboxCountTask) GetName

func (T *OutboxCountTask) GetName() string

func (*OutboxCountTask) GetTitle

func (T *OutboxCountTask) GetTitle() string

type OutboxCreateTask

type OutboxCreateTask struct {
	Uid     int64       `json:"uid" name:"uid" title:"用户ID"`
	Body    string      `json:"body" name:"body" title:"内容"`
	Options interface{} `json:"options,omitempty" name:"options" title:"其他数据 JSON 叠加数据"`
}

func (*OutboxCreateTask) GetName

func (T *OutboxCreateTask) GetName() string

func (*OutboxCreateTask) GetTitle

func (T *OutboxCreateTask) GetTitle() string

type OutboxGetTask

type OutboxGetTask struct {
	Id  int64 `json:"id" name:"id" title:"草稿ID"`
	Uid int64 `json:"uid" name:"uid" title:"用户ID"`
}

func (*OutboxGetTask) GetName

func (T *OutboxGetTask) GetName() string

func (*OutboxGetTask) GetTitle

func (T *OutboxGetTask) GetTitle() string

type OutboxQueryData

type OutboxQueryData struct {
	Items []*Outbox `json:"items,omitempty" name:"items" title:"发件"`
	Page  *Page     `json:"page,omitempty" name:"page" title:"分页"`
}

type OutboxQueryTask

type OutboxQueryTask struct {
	Uid         int64       `json:"uid" name:"uid" title:"用户ID"`
	IsPublished interface{} `json:"isPublished,omitempty" name:"ispublished" title:"是否发布"`
	Q           interface{} `json:"q,omitempty" name:"q" title:"模糊匹配关键字"`
	P           interface{} `json:"p,omitempty" name:"p" title:"分页位置, 从1开始, 0 不处理分页"`
	N           interface{} `json:"n,omitempty" name:"n" title:"分页大小,默认 20"`
}

func (*OutboxQueryTask) GetName

func (T *OutboxQueryTask) GetName() string

func (*OutboxQueryTask) GetTitle

func (T *OutboxQueryTask) GetTitle() string

type OutboxRmTask

type OutboxRmTask struct {
	Id  int64 `json:"id" name:"id" title:"草稿ID"`
	Uid int64 `json:"uid" name:"uid" title:"用户ID"`
}

func (*OutboxRmTask) GetName

func (T *OutboxRmTask) GetName() string

func (*OutboxRmTask) GetTitle

func (T *OutboxRmTask) GetTitle() string

type OutboxSendTask

type OutboxSendTask struct {
	Id  int64 `json:"id" name:"id" title:"草稿ID"`
	Uid int64 `json:"uid" name:"uid" title:"用户ID"`
}

func (*OutboxSendTask) GetName

func (T *OutboxSendTask) GetName() string

func (*OutboxSendTask) GetTitle

func (T *OutboxSendTask) GetTitle() string

type OutboxSetTask

type OutboxSetTask struct {
	Id      int64       `json:"id" name:"id" title:"草稿ID"`
	Uid     int64       `json:"uid" name:"uid" title:"用户ID"`
	Body    interface{} `json:"body,omitempty" name:"body" title:"内容"`
	Options interface{} `json:"options,omitempty" name:"options" title:"其他数据 JSON 叠加数据"`
}

func (*OutboxSetTask) GetName

func (T *OutboxSetTask) GetName() string

func (*OutboxSetTask) GetTitle

func (T *OutboxSetTask) GetTitle() string

type OutboxUpTask

type OutboxUpTask struct {
	Id      int64       `json:"id,omitempty" title:"草稿ID"`
	Uid     int64       `json:"uid,omitempty" title:"用户ID"`
	Body    interface{} `json:"body,omitempty" title:"内容"`
	Options interface{} `json:"options,omitempty" title:"其他数据 JSON 叠加数据"`
}

func (*OutboxUpTask) GetName

func (T *OutboxUpTask) GetName() string

func (*OutboxUpTask) GetTitle

func (T *OutboxUpTask) 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:"总记录数"`
}

type Service

type Service struct {
}

func (*Service) Get

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

func (*Service) GetName

func (S *Service) GetName() string

func (*Service) GetTitle

func (S *Service) GetTitle() string

func (*Service) OutboxCount

func (S *Service) OutboxCount(app micro.IContext, task *OutboxCountTask) (*OutboxCountData, error)

func (*Service) OutboxCreate

func (S *Service) OutboxCreate(app micro.IContext, task *OutboxCreateTask) (*Outbox, error)

func (*Service) OutboxGet

func (S *Service) OutboxGet(app micro.IContext, task *OutboxGetTask) (*Outbox, error)

func (*Service) OutboxQuery

func (S *Service) OutboxQuery(app micro.IContext, task *OutboxQueryTask) (*OutboxQueryData, error)

func (*Service) OutboxRm

func (S *Service) OutboxRm(app micro.IContext, task *OutboxRmTask) (*Outbox, error)

func (*Service) OutboxSend

func (S *Service) OutboxSend(app micro.IContext, task *OutboxSendTask) (*Outbox, error)

func (*Service) OutboxSet

func (S *Service) OutboxSet(app micro.IContext, task *OutboxSetTask) (*Outbox, error)

func (*Service) Set

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

func (*Service) TrashAdd

func (S *Service) TrashAdd(app micro.IContext, task *TrashAddTask) (*Article, error)

func (*Service) TrashRm

func (S *Service) TrashRm(app micro.IContext, task *TrashRmTask) (*Article, error)

type SetTask

type SetTask struct {
	Id      int64       `json:"id" name:"id" title:"动态ID"`
	State   interface{} `json:"state,omitempty" name:"state" title:"状态 多个逗号分割"`
	Body    interface{} `json:"body,omitempty" name:"body" title:"内容"`
	Options interface{} `json:"options,omitempty" name:"options" title:"其他数据 JSON 叠加数据"`
	Ctime   interface{} `json:"ctime,omitempty" name:"ctime" title:"发布时间"`
}

func (*SetTask) GetName

func (T *SetTask) GetName() string

func (*SetTask) GetTitle

func (T *SetTask) GetTitle() string

type TrashAddTask

type TrashAddTask struct {
	Id int64 `json:"id" name:"id" title:"动态ID"`
}

func (*TrashAddTask) GetName

func (T *TrashAddTask) GetName() string

func (*TrashAddTask) GetTitle

func (T *TrashAddTask) GetTitle() string

type TrashRmTask

type TrashRmTask struct {
	Id int64 `json:"id" name:"id" title:"动态ID"`
}

func (*TrashRmTask) GetName

func (T *TrashRmTask) GetName() string

func (*TrashRmTask) GetTitle

func (T *TrashRmTask) GetTitle() string

Jump to

Keyboard shortcuts

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