MCPcopy Create free account

hub / github.com/Coccodrillo/apns / functions

Functions32 in github.com/Coccodrillo/apns

↓ 5 callersMethodPayloadJSON
PayloadJSON returns the current payload in JSON format.
push_notification.go:128
↓ 4 callersMethodAddPayload
AddPayload sets the "aps" payload section of the request. It also has a hack described within to deal with specific zero values.
push_notification.go:97
↓ 4 callersFunctionNewPushNotification
NewPushNotification creates and returns a PushNotification structure. It also initializes the pseudo-random identifier.
push_notification.go:87
↓ 4 callersMethodToBytes
ToBytes returns a byte array of the complete PushNotification struct. This array is what should be transmitted to the APN Service.
push_notification.go:140
↓ 4 callersFunctionmockPayload
Create a new Payload that specifies simple text, a badge counter, and a custom notification sound.
push_notification_test.go:9
↓ 3 callersMethodGet
Get returns the value of a payload key, if it exists.
push_notification.go:118
↓ 2 callersMethodConnectAndWrite
(resp *PushNotificationResponse, payload []byte)
client_mock.go:9
↓ 2 callersMethodSend
(pn *PushNotification)
client_mock.go:13
↓ 2 callersMethodSet
Set defines the value of a payload key.
push_notification.go:123
↓ 1 callersMethodConnectAndWrite
ConnectAndWrite establishes the connection to Apple and handles the transmission of your push notification, as well as waiting for a reply. In lieu o
client.go:93
↓ 1 callersFunctionNewAlertDictionary
NewAlertDictionary creates and returns an AlertDictionary structure.
push_notification.go:71
↓ 1 callersFunctionNewFeedbackResponse
NewFeedbackResponse creates and returns a FeedbackResponse structure.
feedback.go:31
↓ 1 callersFunctionNewPayload
NewPayload creates and returns a Payload structure.
push_notification.go:51
↓ 1 callersFunctionloop
Writes binary data to the client in the same manner as the Apple service would. [4 bytes, 2 bytes, 32 bytes] = 38 bytes total
mock_feedback_server.go:38
↓ 1 callersFunctionmockAlertDictionary
Create a new AlertDictionary. Apple recommends you not use the more complex alert style unless absolutely necessary.
push_notification_test.go:27
↓ 1 callersFunctionmockZeroBadgePayload
See the commentary in push_notification.go for information on why we're testing a badge of value 0.
push_notification_test.go:19
FunctionBareClient
BareClient can be used to set the contents of your certificate and key blocks manually.
client.go:39
MethodConnectAndWrite
(resp *PushNotificationResponse, payload []byte)
client.go:15
MethodListenForFeedback
ListenForFeedback connects to the Apple Feedback Service and checks for device tokens. Feedback consists of device tokens that should not be sent to
feedback.go:42
FunctionNewClient
NewClient assumes you'll be passing in paths that point to your certificate and key.
client.go:49
FunctionNewPushNotificationResponse
NewPushNotificationResponse creates and returns a new PushNotificationResponse structure; it defaults to being unsuccessful at first.
push_notification_response.go:32
MethodPayloadString
PayloadString returns the current payload in string format.
push_notification.go:133
MethodSend
(pn *PushNotification)
client.go:16
MethodSend
Send connects to the APN service and sends your push notification. Remember that if the submission is successful, Apple won't reply.
client.go:59
FunctionStartMockFeedbackServer
StartMockFeedbackServer spins up a simple stand-in for the Apple feedback service that can be used for testing purposes. Doesn't handle many errors, e
mock_feedback_server.go:16
FunctionTestAlertDictionary
(t *testing.T)
push_notification_test.go:60
FunctionTestBasicAlert
(t *testing.T)
push_notification_test.go:43
FunctionTestCustomParameters
(t *testing.T)
push_notification_test.go:79
FunctionTestLegacyConstants
These identifiers were changed to resolve golint violations. However, it's possible that legacy code may rely on them. This will help avoid springing
legacy_test.go:11
FunctionTestMockClientConnectAndWrite
(t *testing.T)
client_mock_test.go:10
FunctionTestMockClientSend
(t *testing.T)
client_mock_test.go:18
FunctionTestZeroBadgeChangesToNegativeOne
(t *testing.T)
push_notification_test.go:104