Versions in this module Expand all Collapse all v0 v0.0.1 May 27, 2019 Changes in this version + const MAX_TTL + const Priority_HIGH + const Priority_NORMAL + type ApnsBatchRequest struct + ApnsTokens []string + App string + Sandbox bool + func (this *ApnsBatchRequest) ToByte() ([]byte, error) + type ApnsBatchResponse struct + Error string + Results []map[string]string + Status string + StatusCode int + func (this *ApnsBatchResponse) PrintResults() + type BatchRequest struct + RegTokens []string + To string + type BatchResponse struct + Error string + Results []map[string]string + Status string + StatusCode int + func (this *BatchResponse) PrintResults() + type FcmClient struct + ApiKey string + Message FcmMsg + func NewFcmClient(apiKey string) *FcmClient + func (this *FcmClient) ApnsBatchImportRequest(apnsReq *ApnsBatchRequest) (*ApnsBatchResponse, error) + func (this *FcmClient) AppendDevices(list []string) *FcmClient + func (this *FcmClient) BatchSubscribeToTopic(tokens []string, topic string) (*BatchResponse, error) + func (this *FcmClient) BatchUnsubscribeFromTopic(tokens []string, topic string) (*BatchResponse, error) + func (this *FcmClient) GetInfo(withDetails bool, instanceIdToken string) (*InstanceIdInfoResponse, error) + func (this *FcmClient) NewFcmMsgTo(to string, body interface{}) *FcmClient + func (this *FcmClient) NewFcmRegIdsMsg(list []string, body interface{}) *FcmClient + func (this *FcmClient) NewFcmTopicMsg(to string, body map[string]string) *FcmClient + func (this *FcmClient) Send() (*FcmResponseStatus, error) + func (this *FcmClient) SetCollapseKey(val string) *FcmClient + func (this *FcmClient) SetCondition(condition string) *FcmClient + func (this *FcmClient) SetContentAvailable(isContentAvailable bool) *FcmClient + func (this *FcmClient) SetDelayWhileIdle(isDelayWhileIdle bool) *FcmClient + func (this *FcmClient) SetDryRun(drun bool) *FcmClient + func (this *FcmClient) SetMsgData(body interface{}) *FcmClient + func (this *FcmClient) SetNotificationPayload(payload *NotificationPayload) *FcmClient + func (this *FcmClient) SetPriority(p string) *FcmClient + func (this *FcmClient) SetRestrictedPackageName(pkg string) *FcmClient + func (this *FcmClient) SetTimeToLive(ttl int) *FcmClient + func (this *FcmClient) SubscribeToTopic(instanceIdToken string, topic string) (*SubscribeResponse, error) + type FcmMsg struct + CollapseKey string + Condition string + ContentAvailable bool + Data interface{} + DelayWhileIdle bool + DryRun bool + Notification NotificationPayload + Priority string + RegistrationIds []string + RestrictedPackageName string + TimeToLive int + To string + type FcmResponseStatus struct + Canonical_ids int + Err string + Fail int + MsgId int64 + MulticastId int64 + Ok bool + Results []map[string]string + RetryAfter string + StatusCode int + Success int + func (this *FcmResponseStatus) GetRetryAfterTime() (t time.Duration, e error) + func (this *FcmResponseStatus) IsTimeout() bool + func (this *FcmResponseStatus) PrintResults() + type InstanceIdInfoResponse struct + AppSigner string + Application string + ApplicationVersion string + AttestStatus string + AuthorizedEntity string + ConnectDate string + ConnectionType string + Error string + Platform string + Rel map[string]map[string]map[string]string + func (this *InstanceIdInfoResponse) PrintResults() + type NotificationPayload struct + AndroidChannelID string + Badge string + Body string + BodyLocArgs string + BodyLocKey string + Category string + ClickAction string + Color string + Icon string + MutableContent bool + Sound string + Tag string + Title string + TitleLocArgs string + TitleLocKey string + type SubscribeResponse struct + Error string + Status string + StatusCode int + func (this *SubscribeResponse) PrintResults()