Documentation
¶
Index ¶
- Constants
- func NewIOS(alert string) *iOS
- type Android
- type Audience
- func (a *Audience) AddAlias(alias string) *Audience
- func (a *Audience) AddCond(key, value string) *Audience
- func (a *Audience) AddRegistrationID(id string) *Audience
- func (a *Audience) AddTadAnd(tagAnd string) *Audience
- func (a *Audience) AddTag(tag string) *Audience
- func (a *Audience) Value() interface{}
- type AudienceTarget
- type Builder
- type Extras
- type Message
- type NamedValue
- type Notification
- type Options
- type Platform
- type PushPayload
- func (p *PushPayload) AddMessage(m *Message) *PushPayload
- func (p *PushPayload) AddNotification(n *Notification) *PushPayload
- func (p *PushPayload) AddOptions(o *Options) *PushPayload
- func (p *PushPayload) Build(key string, comp interface{}) *PushPayload
- func (p *PushPayload) ToJSONString() (string, error)
- type SMS
- type TypePlatform
- type WinPhone
Constants ¶
View Source
const ( // PlatformAndroid . PlatformAndroid TypePlatform = "android" // PlatformIOS . PlatformIOS TypePlatform = "ios" // PlatformWinPhone . PlatformWinPhone TypePlatform = "winphone" // ALL . ALL string = "all" // ALIAS . ALIAS string = "alias" // ALERT . ALERT string = "alert" // AUDIENCE . AUDIENCE string = "audience" // ApnsProduction is the apns production. ApnsProduction string = "apns_production" // BuilderID . BuilderID string = "builder_id" // ContentType . ContentType string = "content_type" // EXTRAS . EXTRAS string = "extras" // IosBadge . IosBadge string = "badge" // IosSound . IosSound string = "sound" // IosContentAvailable . IosContentAvailable string = "content-available" // MaxIosLength . MaxIosLength int = 220 // MaxContentLength of the message. MaxContentLength int = 1200 // MESSAGE . MESSAGE string = "message" // MsgContent . MsgContent string = "msg_content" // NOTIFICATION . NOTIFICATION string = "notification" // OverrideMsgID fileter the message by message id. OverrideMsgID string = "override_msg_id" // OPTIONS . OPTIONS string = "options" // PLATFORM . PLATFORM string = "platform" // SENDNO . SENDNO string = "sendno" // TAG . TAG string = "tag" // TagAnd . TagAnd string = "tag_and" // TITLE . TITLE string = "title" // TTL . TTL string = "time_to_live" // REGISTRATION . REGISTRATION string = "registration_id" // WpOpenPage . WpOpenPage string = "_open_page" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AudienceTarget ¶
type AudienceTarget struct { AudienceType string `json:"audienceType"` Values []string `json:"values"` }
AudienceTarget .
type Builder ¶
type Builder struct { Title string `json:"title"` MsgContent string `json:"msgContent"` ContentType string `json:"contentType"` Extras map[string]string `json:"extrasBuilder"` NumberExtrasBuilder map[string]int64 `json:"numberExtrasBuilder"` BooleanExtrasBuilder map[string]bool `json:"booleanExtrasBuilder"` JSONExtrasBuilder map[string]string `json:"jsonExtrasBuilder"` CustomData map[string]interface{} `json:"customData"` }
Builder .
type Notification ¶
type Notification NamedValue
Notification .
func (*Notification) AddAndroid ¶
func (n *Notification) AddAndroid(android *Android) *Notification
AddAndroid .
func (*Notification) AddWinPhone ¶
func (n *Notification) AddWinPhone(wp *WinPhone) *Notification
AddWinPhone .
type Options ¶
type Options NamedValue
Options .
func (*Options) AddApnsProduction ¶
AddApnsProduction .
func (*Options) AddOverrideMsgID ¶
AddOverrideMsgID .
type Platform ¶
type Platform []TypePlatform
Platform .
func (*Platform) AddPlatform ¶
func (p *Platform) AddPlatform(platform ...TypePlatform) *Platform
AddPlatform .
type PushPayload ¶
type PushPayload NamedValue
PushPayload .
func (*PushPayload) AddMessage ¶
func (p *PushPayload) AddMessage(m *Message) *PushPayload
AddMessage .
func (*PushPayload) AddNotification ¶
func (p *PushPayload) AddNotification(n *Notification) *PushPayload
AddNotification .
func (*PushPayload) AddOptions ¶
func (p *PushPayload) AddOptions(o *Options) *PushPayload
AddOptions .
func (*PushPayload) Build ¶
func (p *PushPayload) Build(key string, comp interface{}) *PushPayload
Build .
func (*PushPayload) ToJSONString ¶
func (p *PushPayload) ToJSONString() (string, error)
ToJSONString .
Click to show internal directories.
Click to hide internal directories.