Documentation
¶
Index ¶
- Variables
- func FeedWorkerWithNSQ(worker *Worker, nsqTopic, nsqChannel, nsqdAddr string) error
- func NotificationFromMsg(tok string, msg map[string]interface{}) (*apns.Notification, error)
- func PayloadFromMsg(msg map[string]interface{}) (*apns.Payload, error)
- type Counter
- type Hub
- type Request
- type Worker
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrBadValue = errors.New("值不合法") ErrNoClient = errors.New("client 不存在") ErrCertMissing = errors.New("cert 不能为空") ErrKeyMissing = errors.New("key 不能为空") ErrAlertMissing = errors.New("alert 不能为空") ErrBadAlert = errors.New("alert 只能是字符串") ErrBadBadge = errors.New("badge 只能是数字") ErrBadSound = errors.New("sound 只能是字符串") ErrBadFormat = errors.New("参数格式不正确") )
Functions ¶
func FeedWorkerWithNSQ ¶
func NotificationFromMsg ¶
func NotificationFromMsg(tok string, msg map[string]interface{}) (*apns.Notification, error)
Types ¶
type Request ¶
type Request struct {
Notif *apns.Notification
App string
}
func ParseRequestFromJSON ¶
sample msg body: {"expire":1438241451, "app": "appname", "token": "token-str", "payload": {"aps":{"alert":"msg","sound":"hi.caf"},"extra":2}}
Click to show internal directories.
Click to hide internal directories.