Documentation
¶
Index ¶
- Constants
- func Init(key, secret string)
- func Send(push *JPush) (err error)
- func SendTest(push *JPush) (err error)
- type AndroidNotice
- type IOSNotice
- type JPush
- func (p *JPush) Send() error
- func (p *JPush) SendTest() error
- func (p *JPush) SetAllNotice(alert string, ext M) *JPush
- func (p *JPush) SetAudience(tag, tag_and, alias, id []string) *JPush
- func (p *JPush) SetAudienceAll() *JPush
- func (p *JPush) SetMessage(content, title, content_type string, extras M) *JPush
- func (p *JPush) SetNotification(alert string, android *AndroidNotice, ios *IOSNotice, win *WinPhoneNotice) *JPush
- func (p *JPush) SetPlatform(android, ios, winphone bool) *JPush
- func (p *JPush) SetPlatformAll() *JPush
- type Message
- type Notice
- type Option
- type WinPhoneNotice
Constants ¶
View Source
const ( JPUSH_VALIDATE = "https://api.jpush.cn/v3/push/validate" JPUSH_URL = "https://api.jpush.cn/v3/push" BASE64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AndroidNotice ¶
type JPush ¶
type JPush struct { Platform interface{} `json:"platform"` Audience interface{} `json:"audience"` Notification interface{} `json:"notification,omitempty"` Message interface{} `json:"message,omitempty"` Options *Option `json:"options,omitempty"` }
func (*JPush) SetAllNotice ¶
func (*JPush) SetAudience ¶
func (*JPush) SetAudienceAll ¶
func (*JPush) SetMessage ¶
func (*JPush) SetNotification ¶
func (p *JPush) SetNotification(alert string, android *AndroidNotice, ios *IOSNotice, win *WinPhoneNotice) *JPush
func (*JPush) SetPlatform ¶
func (*JPush) SetPlatformAll ¶
type Notice ¶
type Notice struct { Alert string `json:"alert,omitempty"` Android *AndroidNotice `json:"android,omitempty"` IOS *IOSNotice `json:"ios,omitempty"` WINPhone *WinPhoneNotice `json:"winphone,omitempty"` }
type WinPhoneNotice ¶
Click to show internal directories.
Click to hide internal directories.