Versions in this module Expand all Collapse all v1 v1.0.0 Jul 21, 2021 Changes in this version + const DistributionFcm + const DistributionFcmJPush + const DistributionFcmPns + const DistributionFcmSecondaryFcmPush + const DistributionFcmSecondaryPnsPush + const DistributionFirstOSPush + const DistributionJPush + const DistributionOSPush + const DistributionSecondaryPush + const ToDevice + const ToUser + const TypeAlias + const TypeRegistrationId + const VERSION + var ZONES = make(map[string]map[string]string) + type AdminAppRequest struct + AndroidPackage string + AppName string + GroupName string + type AdminAppResponse struct + AndroidPackage string + AppKey string + IsNewCreated bool + type AdminCertificateRequest struct + DevCertificateFile []byte + DevCertificatePassword string + ProCertificateFile []byte + ProCertificatePassword string + type AdminSuccessResponse struct + Success string + type Audience struct + ABTest []string + Alias []string + File *File + RegistrationID []string + Segment []string + Tag []string + TagAnd []string + TagNot []string + type Callback struct + Params CallbackParam + Type string + Url string + type CallbackParam struct + Crowd string + Href string + MessageId string + To string + ToType int32 + type DefaultResponse struct + type DeviceAliasResponse struct + RegistrationIDs []string + type DeviceModify struct + Add []string + Remove []string + type DeviceRegistrationIDRequest struct + Alias string + Mobile string + Tags *DeviceModify + type DeviceRegistrationIDResponse struct + Alias string + Mobile string + Tags []string + type DeviceStatusRequest struct + RegistrationIDs []string + type DeviceStatusResponse struct + LastOnlineTime string + Online bool + type DeviceTagsListResponse struct + Tags []string + type DeviceTagsRegistrationIDResponse struct + Result bool + type DeviceTagsRequest struct + RegistrationIDs *DeviceModify + type ErrorMessage struct + Code int + Message string + func (e ErrorMessage) Error() string + type ErrorResponse struct + Error ErrorMessage + type Fcm struct + Distribution string + DistributionFcm string + type File struct + FileId string + type GetFilesResponse struct + Files []file + TotalCount int + type GroupPush struct + func NewGroupPush(key, secret string) *GroupPush + func (j *GroupPush) GroupPush(req *PushRequest) (map[string]PushResponse, error) + func (j *GroupPush) SetAuthorization(key, secret string) + type Huawei struct + Importance string + Inbox string + LargeIcon string + OnlyUseVendorStyle bool + SmallIconURI string + Style int64 + type IconSize int + const BigPic + const LargeIcon + const SmallIcon + type ImagesByUrlsRequest struct + FcmImageURL string + HuaweiImageURL string + ImageType IconSize + ImageURL string + JiguangImageURL string + OppoImageURL string + XiaomiImageURL string + type ImagesByUrlsResponse struct + FcmImageURL string + HuaweiImageURL string + JiguangImageURL string + MediaID string + OppoImageURL string + XiaomiImageURL string + type ImagesByUrlsUpdateRequest struct + FcmImageURL string + HuaweiImageURL string + JiguangImageURL string + OppoImageURL string + XiaomiImageURL string + type JPush struct + Quota int + Remaining int + Reset int + Zone string + func NewJPush(key, secret string) *JPush + func (j *JPush) AdminApp(req **AdminAppRequest) (*AdminAppResponse, error) + func (j *JPush) AdminAppCert(appkey string, req *AdminCertificateRequest) (*AdminSuccessResponse, error) + func (j *JPush) AdminAppDelete(appkey string) (*AdminSuccessResponse, error) + func (j *JPush) DeleteFiles(fileId string) (delete bool, err error) + func (j *JPush) DeviceDeleteAlias(alias string, platforms []string) (*DefaultResponse, error) + func (j *JPush) DeviceDeleteTags(tag string, platforms []string) (*DefaultResponse, error) + func (j *JPush) DeviceGetAlias(alias string, platforms []string) (*DeviceAliasResponse, error) + func (j *JPush) DeviceGetRegistrationID(registrationID string) (*DeviceRegistrationIDResponse, error) + func (j *JPush) DeviceGetTags() (*DeviceTagsListResponse, error) + func (j *JPush) DeviceGetTagsRegistrationID(tag string, registrationID string) (*DeviceTagsRegistrationIDResponse, error) + func (j *JPush) DevicePostRegistrationID(registrationID string, req *DeviceRegistrationIDRequest) (*DefaultResponse, error) + func (j *JPush) DevicePostStatus(req *DeviceStatusRequest) (map[string]DeviceStatusResponse, error) + func (j *JPush) DevicePostTags(tag string, req *DeviceTagsRequest) (*DefaultResponse, error) + func (j *JPush) GetFiles() (files *GetFilesResponse, err error) + func (j *JPush) GetURL(key string) string + func (j *JPush) ImagesByFiles(media string, req ImagesByUrlsUpdateRequest) (*ImagesByUrlsResponse, error) + func (j *JPush) ImagesByUrls(req ImagesByUrlsRequest) (*ImagesByUrlsResponse, error) + func (j *JPush) Push(req *PushRequest) (*PushResponse, error) + func (j *JPush) PushGetCid() (*PushCIDResponse, error) + func (j *JPush) PushGetCids(count int, cidtype string) (*PushCIDResponse, error) + func (j *JPush) PushValidate(req *PushRequest) (*PushResponse, error) + func (j *JPush) ReportMessages(msgIds []string) (*ReportMessagesResponse, error) + func (j *JPush) ReportMessagesDetail(msgIds []string) ([]ReportDetailResponse, error) + func (j *JPush) ReportReceived(msgIds []string) ([]ReportReceivedResponse, error) + func (j *JPush) ReportStatus(req *ReportStatusRequest) (map[string]MessageStatus, error) + func (j *JPush) ReportUsers(timeUnit string, start time.Time, duration int) (*ReportUsersResponse, error) + func (j *JPush) Schedule(req *ScheduleRequest) (*ScheduleResponse, error) + func (j *JPush) ScheduleDelete(scheduleID string) (*DefaultResponse, error) + func (j *JPush) ScheduleGetCid() (*PushCIDResponse, error) + func (j *JPush) ScheduleID(scheduleID string) (*ScheduleResponse, error) + func (j *JPush) ScheduleIDMsgs(scheduleID string) (*ScheduleMsgsResponse, error) + func (j *JPush) SchedulePage(page int) (*SchedulePageResponse, error) + func (j *JPush) SchedulePut(scheduleID string, req *ScheduleRequest) (*ScheduleResponse, error) + func (j *JPush) SendFile(filePath string, typeInt int) (fileId string, err error) + func (j *JPush) SetAuthorization(key, secret string) + func (j *JPush) SetZone(zone string) + type Meizu struct + type MessageStatus struct + Status int + type NotificationAndroid struct + Alert string + AlertType int + BadgeAddNum int + BadgeClass string + BigPicPath string + BigText string + BuilderID int + Category string + DisplayForeground string + Extras map[string]interface{} + Inbox map[string]interface{} + Intent map[string]interface{} + LargeIcon string + Priority int + ShowBeginTime string + ShowEndTime string + SmallIconUri string + Sound string + Style int + Title string + UriAction string + UriActivity string + type NotificationIOS struct + Alert interface{} + Badge int + Category string + ContentAvailable bool + Extras map[string]interface{} + MutableContent bool + Sound string + ThreadId string + type NotificationWinPhone struct + Alert string + Extras map[string]interface{} + OpenPage string + Title string + type Oppo struct + BigPicPath string + ChannelID string + LargeIcon string + Style int64 + type Platform struct + Platforms []string + func (p *Platform) MarshalJSON() (data []byte, err error) + func (p *Platform) SetAll(all bool) + func (p *Platform) UnmarshalJSON(data []byte) error + type PushAudience struct + Aud *Audience + func (p *PushAudience) MarshalJSON() (data []byte, err error) + func (p *PushAudience) SetAll(all bool) + func (p *PushAudience) UnmarshalJSON(data []byte) error + type PushCIDResponse struct + Cids []string + type PushMessage struct + ContentType string + Extras map[string]interface{} + MsgContent string + Title string + type PushNotification struct + Alert string + Android *NotificationAndroid + IOS *NotificationIOS + WinPhone *NotificationWinPhone + type PushOptions struct + ApnsCollapseID string + ApnsProduction bool + BigPushDuration int + OverrideMsgID int64 + SendNo int + ThirdPartyChannel ThirdPartyChannel + TimeToLive int + type PushRequest struct + Audience *PushAudience + Callback *Callback + Cid string + Message *PushMessage + Notification *PushNotification + Options *PushOptions + Platform *Platform + SmsMessage *SmsMessage + type PushResponse struct + MsgID string + Sendno string + type ReportAndroidMessage struct + Click int + MsgClick int + OnlinePush int + Received int + Target int + type ReportDetailResponse struct + AndroidPns struct{ ... } + Ios struct{ ... } + Jpush struct{ ... } + MsgId string + QuickappJpush struct{ ... } + QuickappPns struct{ ... } + Winphone struct{ ... } + type ReportIOSMessage struct + ApnsReceived int + ApnsSent int + ApnsTarget int + Click int + Received int + Target int + type ReportMessagesResponse struct + Android *ReportAndroidMessage + IOS *ReportIOSMessage + MsgID string + Wp *ReportWpMessage + type ReportReceivedResponse struct + AndroidReceived int + IOSApnsReceived int + IOSApnsSent int + IOSMsgReceived int + MsgID float64 + WpMpnsSent int + type ReportStatusRequest struct + Date *ReportTime + MsgID int + RegistrationIds []string + type ReportTime time.Time + func (r *ReportTime) MarshalJSON() (data []byte, err error) + func (r *ReportTime) UnmarshalJSON(data []byte) error + type ReportUser struct + Android *ReportUserAndroid + IOS *ReportUserIOS + Time *ReportTime + type ReportUserAndroid struct + Active int + New int + Online int + type ReportUserIOS struct + Active int + New int + Online int + type ReportUsersResponse struct + Duration int + Items []ReportUser + Start *ReportTime + TimeUnit string + type ReportWpMessage struct + Click int + MpnsSent int + MpnsTarget int + type ScheduleMsgsResponse struct + Count int + MsgIDs []interface{} + type SchedulePageResponse struct + Page int + Schedules []ScheduleResponse + TotalCount int + TotalPages int + type SchedulePeriodical struct + End *ScheduleTime + Frequency int + Point []string + Start *ScheduleTime + Time string + TimeUnit string + type ScheduleRequest struct + Cid string + Enabled bool + Name string + Push *PushRequest + Trigger *ScheduleTrigger + type ScheduleResponse struct + Enabled bool + Name string + Push *PushRequest + ScheduleID string + Trigger *ScheduleTrigger + type ScheduleSingle struct + Time *ScheduleTime + type ScheduleTime time.Time + func (s *ScheduleTime) MarshalJSON() (data []byte, err error) + func (s *ScheduleTime) UnmarshalJSON(data []byte) error + type ScheduleTrigger struct + Periodical *SchedulePeriodical + Single *ScheduleSingle + type SmsMessage struct + DelayTime int + TempID float64 + TempPara map[string]interface{} + type ThirdPartyChannel struct + Fcm Fcm + Huawei Huawei + Meizu Meizu + Oppo Oppo + Vivo Vivo + Xiaomi Xiaomi + type Vivo struct + Classification int64 + PushMode int64 + type Xiaomi struct + BigText string + ChannelID string + DistributionCustomize string + LargeIcon string + SmallIconColor string + SmallIconURI string + Style int64