Documentation
¶
Index ¶
Constants ¶
View Source
const InternalTokenHeader = "X-Internal-Token"
InternalTokenHeader is the header key for internal service authentication.
View Source
const (
// NotifyBotUIDValue is the static UID for the notification system bot.
NotifyBotUIDValue = "notification"
)
Variables ¶
This section is empty.
Functions ¶
func NotifyBotUID ¶
func NotifyBotUID() string
NotifyBotUID returns the static notification bot UID.
Types ¶
type BatchNotifyReq ¶
type BatchNotifyReq struct {
Notifications []NotifyReq `json:"notifications" binding:"required"`
}
BatchNotifyReq 批量通知请求
type BatchNotifyResp ¶
type BatchNotifyResp struct {
Results []BatchNotifyResult `json:"results"`
HasErrors bool `json:"has_errors"`
}
BatchNotifyResp 批量通知响应
type BatchNotifyResult ¶
type BatchNotifyResult struct {
NotifyResp
Error string `json:"error,omitempty"`
}
BatchNotifyResult 批量通知中单条结果
type NotifyReq ¶
type NotifyReq struct {
SpaceID string `json:"space_id" binding:"required"`
Service string `json:"service" binding:"required"`
Event string `json:"event"`
Targets []string `json:"targets" binding:"required"`
ActorUID string `json:"actor_uid"`
Payload map[string]interface{} `json:"payload" binding:"required"`
}
NotifyReq 通知请求
type NotifyResp ¶
type NotifyResp struct {
Delivered []string `json:"delivered"`
Filtered map[string]string `json:"filtered"`
}
NotifyResp 单条通知响应
Click to show internal directories.
Click to hide internal directories.