Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetDefaultPublisher ¶
func SetDefaultPublisher(publisher Publisher)
SetDefaultPublisher 设置当前进程默认站内信发布方。
Types ¶
type Audience ¶
type Audience struct {
// Type 是受众类型。
Type basev1.MessageAudienceType
// ID 是受众编号,租户全员时为 0。
ID int64
// IncludeChildren 表示部门受众是否包含子部门。
IncludeChildren bool
}
Audience 描述站内信的单项受众规则。
type Message ¶
type Message struct {
// TenantID 是消息所属租户编号。
TenantID int64
// CategoryCode 是消息分类稳定编码。
CategoryCode string
// Title 是消息标题。
Title string
// Content 是消息正文。
Content string
// ContentFormat 是消息正文格式。
ContentFormat basev1.MessageContentFormat
// Priority 是消息优先级。
Priority basev1.MessagePriority
// ActionType 是消息动作类型。
ActionType basev1.MessageActionType
// ActionTarget 是消息动作目标。
ActionTarget string
// ActionParams 是消息动作参数 JSON。
ActionParams string
// Audiences 是消息受众规则。
Audiences []Audience
// Source 是业务来源标识。
Source string
// IdempotencyKey 是租户内来源幂等键。
IdempotencyKey string
// SenderName 是发送者显示名称。
SenderName string
// ExpiresAt 是消息过期时间戳,单位为毫秒。
ExpiresAt int64
}
Message 描述业务模块发布站内信所需的消息内容。
Click to show internal directories.
Click to hide internal directories.