Documentation ¶
Index ¶
- Constants
- func CountReadNotices() int
- func CountReadNoticesForAgent(agentId string) int
- func CountReceivedNotices(receiverId string, cond map[string]interface{}, minutes int) int
- func CountUnreadNotices() int
- func CountUnreadNoticesForAgent(agentId string) int
- func DeleteNoticesForAgent(agentId string) error
- func ExistNoticesWithHash(hash string, cond map[string]interface{}, duration time.Duration) bool
- func UpdateNoticeReceivers(id primitive.ObjectID, receiverIds []string)
- type NoticeQuery
- func (this *NoticeQuery) Action(action NoticeQueryAction) *NoticeQuery
- func (this *NoticeQuery) Agent(cond *notices.AgentCond) *NoticeQuery
- func (this *NoticeQuery) Asc(field string) *NoticeQuery
- func (this *NoticeQuery) Attr(field string, value interface{}) *NoticeQuery
- func (this *NoticeQuery) Count() (count int64, err error)
- func (this *NoticeQuery) Debug() *NoticeQuery
- func (this *NoticeQuery) Delete() error
- func (this *NoticeQuery) Desc(field string) *NoticeQuery
- func (this *NoticeQuery) Execute() (interface{}, error)
- func (this *NoticeQuery) Find() (*notices.Notice, error)
- func (this *NoticeQuery) FindAll() ([]*notices.Notice, error)
- func (this *NoticeQuery) For(field string) *NoticeQuery
- func (this *NoticeQuery) Group(group []string) *NoticeQuery
- func (this *NoticeQuery) Gt(field string, value interface{}) *NoticeQuery
- func (this *NoticeQuery) Gte(field string, value interface{}) *NoticeQuery
- func (this *NoticeQuery) Id(idString string) *NoticeQuery
- func (this *NoticeQuery) Insert(notice *notices.Notice) error
- func (this *NoticeQuery) Limit(size int64) *NoticeQuery
- func (this *NoticeQuery) Lt(field string, value interface{}) *NoticeQuery
- func (this *NoticeQuery) Lte(field string, value interface{}) *NoticeQuery
- func (this *NoticeQuery) Not(field string, value interface{}) *NoticeQuery
- func (this *NoticeQuery) Offset(offset int64) *NoticeQuery
- func (this *NoticeQuery) Op(op string, field string, value interface{})
- func (this *NoticeQuery) Proxy(cond *notices.ProxyCond) *NoticeQuery
- func (this *NoticeQuery) Update(values maps.Map) error
- type NoticeQueryAction
Constants ¶
View Source
const ( NoticeQueryActionCount = "count" NoticeQueryActionSum = "sum" NoticeQueryActionAvg = "avg" NoticeQueryActionMin = "min" NoticeQueryActionMax = "max" NoticeQueryActionFind = "find" NoticeQueryActionFindAll = "findAll" )
Variables ¶
This section is empty.
Functions ¶
func CountReceivedNotices ¶
获取某个接收人在某个时间段内接收的通知数
func CountUnreadNoticesForAgent ¶
获取某个Agent的未读通知数
func DeleteNoticesForAgent ¶ added in v0.1.2
删除Agent相关通知
func ExistNoticesWithHash ¶ added in v0.1.2
计算同样的消息数量
func UpdateNoticeReceivers ¶
更改某个通知的接收人
Types ¶
type NoticeQuery ¶
type NoticeQuery struct {
// contains filtered or unexported fields
}
func NewNoticeQuery ¶
func NewNoticeQuery() *NoticeQuery
func (*NoticeQuery) Action ¶
func (this *NoticeQuery) Action(action NoticeQueryAction) *NoticeQuery
func (*NoticeQuery) Agent ¶
func (this *NoticeQuery) Agent(cond *notices.AgentCond) *NoticeQuery
func (*NoticeQuery) Asc ¶
func (this *NoticeQuery) Asc(field string) *NoticeQuery
func (*NoticeQuery) Attr ¶
func (this *NoticeQuery) Attr(field string, value interface{}) *NoticeQuery
func (*NoticeQuery) Debug ¶
func (this *NoticeQuery) Debug() *NoticeQuery
func (*NoticeQuery) Desc ¶
func (this *NoticeQuery) Desc(field string) *NoticeQuery
func (*NoticeQuery) For ¶
func (this *NoticeQuery) For(field string) *NoticeQuery
func (*NoticeQuery) Group ¶
func (this *NoticeQuery) Group(group []string) *NoticeQuery
func (*NoticeQuery) Gt ¶
func (this *NoticeQuery) Gt(field string, value interface{}) *NoticeQuery
func (*NoticeQuery) Gte ¶
func (this *NoticeQuery) Gte(field string, value interface{}) *NoticeQuery
func (*NoticeQuery) Limit ¶
func (this *NoticeQuery) Limit(size int64) *NoticeQuery
func (*NoticeQuery) Lt ¶
func (this *NoticeQuery) Lt(field string, value interface{}) *NoticeQuery
func (*NoticeQuery) Lte ¶
func (this *NoticeQuery) Lte(field string, value interface{}) *NoticeQuery
func (*NoticeQuery) Not ¶
func (this *NoticeQuery) Not(field string, value interface{}) *NoticeQuery
func (*NoticeQuery) Offset ¶
func (this *NoticeQuery) Offset(offset int64) *NoticeQuery
func (*NoticeQuery) Op ¶
func (this *NoticeQuery) Op(op string, field string, value interface{})
func (*NoticeQuery) Proxy ¶
func (this *NoticeQuery) Proxy(cond *notices.ProxyCond) *NoticeQuery
type NoticeQueryAction ¶
type NoticeQueryAction = string
Click to show internal directories.
Click to hide internal directories.