-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathinternal.go
73 lines (66 loc) · 3.01 KB
/
internal.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
package notificationhubs
// Internal constants
const (
apiVersionParam = "api-version"
apiVersionValue = "2015-01"
telemetryAPIVersionValue = "2016-07"
directParam = "direct"
// for connection string parsing
schemeServiceBus = "sb"
schemeDefault = "https"
paramEndpoint = "Endpoint="
paramSaasKeyName = "SharedAccessKeyName="
paramSaasKeyValue = "SharedAccessKey="
// Http methods
deleteMethod = "DELETE"
getMethod = "GET"
postMethod = "POST"
putMethod = "PUT"
patchMethod = "PATCH"
// appleRegXMLString is the XML string for registering an iOS device
// Replace {{Tags}} and {{DeviceID}} with the correct values
appleRegXMLString string = `<?xml version="1.0" encoding="utf-8"?>
<entry xmlns="http://www.w3.org/2005/Atom">
<content type="application/xml">
<AppleRegistrationDescription xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/netservices/2010/10/servicebus/connect">
<Tags>{{Tags}}</Tags>
<DeviceToken>{{DeviceID}}</DeviceToken>
</AppleRegistrationDescription>
</content>
</entry>`
// appleTemplateRegXMLString is the XML string for registering an iOS device
// Replace {{Tags}}, {{DeviceID}} and {{Template}} with the correct values
appleTemplateRegXMLString string = `<?xml version="1.0" encoding="utf-8"?>
<entry xmlns="http://www.w3.org/2005/Atom">
<content type="application/xml">
<AppleTemplateRegistrationDescription xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/netservices/2010/10/servicebus/connect">
<Tags>{{Tags}}</Tags>
<DeviceToken>{{DeviceID}}</DeviceToken>
<BodyTemplate><![CDATA[{{Template}}]]></BodyTemplate>
</AppleTemplateRegistrationDescription>
</content>
</entry>`
// gcmRegXMLString is the XML string for registering an Android device
// Replace {{Tags}} and {{DeviceID}} with the correct values
gcmRegXMLString string = `<?xml version="1.0" encoding="utf-8"?>
<entry xmlns="http://www.w3.org/2005/Atom">
<content type="application/xml">
<GcmRegistrationDescription xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/netservices/2010/10/servicebus/connect">
<Tags>{{Tags}}</Tags>
<GcmRegistrationId>{{DeviceID}}</GcmRegistrationId>
</GcmRegistrationDescription>
</content>
</entry>`
// gcmRegTemplateXMLString is the XML string for registering an Android device
// Replace {{Tags}}, {{DeviceID}} and {{Template}} with the correct values
gcmTemplateRegXMLString string = `<?xml version="1.0" encoding="utf-8"?>
<entry xmlns="http://www.w3.org/2005/Atom">
<content type="application/xml">
<GcmTemplateRegistrationDescription xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/netservices/2010/10/servicebus/connect">
<Tags>{{Tags}}</Tags>
<GcmRegistrationId>{{DeviceID}}</GcmRegistrationId>
<BodyTemplate><![CDATA[{{Template}}]]></BodyTemplate>
</GcmTemplateRegistrationDescription>
</content>
</entry>`
)