Documentation
¶
Index ¶
- Constants
- type Client
- func (c *Client) DeviceBindTags(tag string, req *DeviceBindTagsRequest) ([]byte, error)
- func (c *Client) DeviceCheckDeviceWithTag(tag, registrationId string) (map[string]interface{}, error)
- func (c *Client) DeviceDeleteAlias(alias string) ([]byte, error)
- func (c *Client) DeviceDeleteTag(tag string, platforms []string) ([]byte, error)
- func (c *Client) DeviceEmptyTagsRequest(registrationId string, req *DeviceSettingEmptyTagsRequest) ([]byte, error)
- func (c *Client) DeviceGetTags() (map[string]interface{}, error)
- func (c *Client) DeviceGetWithAlias(alias string, platforms []string) (map[string]interface{}, error)
- func (c *Client) DeviceRequest(registrationId string, req *DeviceSettingRequest) ([]byte, error)
- func (c *Client) DeviceView(registrationId string) (map[string]interface{}, error)
- func (c *Client) GetCidPool(count int, cidType string) (map[string]interface{}, error)
- func (c *Client) GroupPush(push *PushRequest) (map[string]interface{}, error)
- func (c *Client) Push(push *PushRequest) (map[string]interface{}, error)
- func (c *Client) ReportReceived(msgIds []string) ([]interface{}, error)
- func (c *Client) ReportStatusMessage(req *ReportStatusRequest) (map[string]interface{}, error)
- func (c *Client) ScheduleCreateTask(req *ScheduleRequest) (map[string]interface{}, error)
- func (c *Client) ScheduleDelete(id string) ([]byte, error)
- func (c *Client) ScheduleGetList(page int) (map[string]interface{}, error)
- func (c *Client) ScheduleUpdate(id string, req *ScheduleRequest) (map[string]interface{}, error)
- func (c *Client) ScheduleView(id string) (map[string]interface{}, error)
- func (c *Client) Validate(req *PushRequest) (map[string]interface{}, error)
- type DeviceBindTagsRequest
- type DeviceSettingEmptyTagsRequest
- type DeviceSettingRequest
- type DeviceSettingRequestTags
- type NotificationAndroid
- type NotificationIOS
- type NotificationWinPhone
- type Platform
- type PushAudience
- type PushMessage
- type PushNotification
- type PushOptions
- type PushRequest
- type ReportStatusRequest
- type Response
- type ScheduleRequest
- type ScheduleTrigger
- type ScheduleTriggerPeriodical
- type ScheduleTriggerSingle
- type SmsMessage
Constants ¶
View Source
const ( ScheduleTimeUnitDay = "day" ScheduleTimeUnitWeek = "week" ScheduleTimeUnitMonth = "month" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
func (*Client) DeviceBindTags ¶
func (c *Client) DeviceBindTags(tag string, req *DeviceBindTagsRequest) ([]byte, error)
func (*Client) DeviceCheckDeviceWithTag ¶
func (*Client) DeviceDeleteTag ¶
func (*Client) DeviceEmptyTagsRequest ¶
func (c *Client) DeviceEmptyTagsRequest(registrationId string, req *DeviceSettingEmptyTagsRequest) ([]byte, error)
func (*Client) DeviceGetTags ¶
func (*Client) DeviceGetWithAlias ¶
func (*Client) DeviceRequest ¶
func (c *Client) DeviceRequest(registrationId string, req *DeviceSettingRequest) ([]byte, error)
func (*Client) DeviceView ¶
func (*Client) GetCidPool ¶
func (*Client) GroupPush ¶
func (c *Client) GroupPush(push *PushRequest) (map[string]interface{}, error)
func (*Client) ReportReceived ¶
func (*Client) ReportStatusMessage ¶
func (c *Client) ReportStatusMessage(req *ReportStatusRequest) (map[string]interface{}, error)
func (*Client) ScheduleCreateTask ¶
func (c *Client) ScheduleCreateTask(req *ScheduleRequest) (map[string]interface{}, error)
func (*Client) ScheduleGetList ¶
func (*Client) ScheduleUpdate ¶
func (c *Client) ScheduleUpdate(id string, req *ScheduleRequest) (map[string]interface{}, error)
func (*Client) ScheduleView ¶
type DeviceBindTagsRequest ¶
type DeviceSettingRequest ¶
type DeviceSettingRequest struct {
Tags *DeviceSettingRequestTags `json:"tags"`
Alias string `json:"alias"`
Mobile string `json:"mobile"`
}
type NotificationAndroid ¶
type NotificationAndroid struct {
Alert string `json:"alert"`
Title string `json:"title,omitempty"`
BuilderId int `json:"builder_id,int,omitempty"`
Priority int `json:"priority,omitempty"`
Category string `json:"category,omitempty"`
Style int `json:"style,int,omitempty"`
AlertType int `json:"alert_type,int,omitempty"`
BigText string `json:"big_text,omitempty"`
Inbox map[string]interface{} `json:"inbox,omitempty"`
BigPicPath string `json:"big_pic_path,omitempty"`
Extras map[string]interface{} `json:"extras,omitempty"`
}
type NotificationIOS ¶
type NotificationIOS struct {
Alert interface{} `json:"alert"`
Sound string `json:"sound,omitempty"`
Badge int `json:"badge,int,omitempty"`
ContentAvailable bool `json:"content-available,omitempty"`
MutableContent bool `json:"mutable-content,omitempty"`
Category string `json:"category,omitempty"`
Extras map[string]interface{} `json:"extras,omitempty"`
}
type NotificationWinPhone ¶
type PushAudience ¶
type PushAudience struct {
Tag []string `json:"tag,omitempty"`
TagAnd []string `json:"tag_and,omitempty"`
TagNot []string `json:"tag_not,omitempty"`
Alias []string `json:"alias,omitempty"`
RegistrationId []string `json:"registration_id,omitempty"`
Segment []string `json:"segment,omitempty"`
ABTest []string `json:"abtest,omitempty"`
}
type PushMessage ¶
type PushNotification ¶
type PushNotification struct {
Alert string `json:"alert,omitempty"`
Android *NotificationAndroid `json:"android,omitempty"`
IOS *NotificationIOS `json:"ios,omitempty"`
WinPhone *NotificationWinPhone `json:"winphone,omitempty"`
}
type PushOptions ¶
type PushOptions struct {
SendNo int `json:"sendno,int,omitempty"`
TimeToLive int `json:"time_to_live,int,omitempty"`
OverrideMsgId int64 `json:"override_msg_id,int64,omitempty"`
ApnsProduction bool `json:"apns_production"`
ApnsCollapseId string `json:"apns_collapse_id,omitempty"`
BigPushDuration int `json:"big_push_duration,int,omitempty"`
}
type PushRequest ¶
type PushRequest struct {
Cid string `json:"cid,omitempty"`
Platform Platform `json:"platform"`
Audience *PushAudience `json:"audience,omitempty"`
Notification *PushNotification `json:"notification,omitempty"`
Message *PushMessage `json:"message,omitempty"`
SmsMessage *SmsMessage `json:"sms_message,omitempty"`
Options *PushOptions `json:"options,omitempty"`
}
type ReportStatusRequest ¶
type ScheduleRequest ¶
type ScheduleRequest struct {
Cid string `json:"cid,omitempty"`
Name string `json:"name"`
Enabled bool `json:"enabled"`
Push *PushRequest `json:"push"`
Trigger *ScheduleTrigger `json:"trigger"`
}
type ScheduleTrigger ¶
type ScheduleTrigger struct {
Single *ScheduleTriggerSingle `json:"single,omitempty"`
Periodical *ScheduleTriggerPeriodical `json:"periodical,omitempty"`
}
type ScheduleTriggerSingle ¶
type ScheduleTriggerSingle struct {
Timer string `json:"time,omitempty"`
}
type SmsMessage ¶
Click to show internal directories.
Click to hide internal directories.