-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdevice_id.go
34 lines (23 loc) · 984 Bytes
/
device_id.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
// Copyright 2021-2022, the SS project owners. All rights reserved.
// Please see the OWNERS and LICENSE files for details.
package ss
////////////////////////////////////////////////////////////////////////////////
type DeviceID string
func NewDeviceID(source string) DeviceID { return DeviceID(source) }
func (id DeviceID) MarshalLogMsg(destination map[string]interface{}) {
MarshalLogMsgAttrDump(id, destination)
}
////////////////////////////////////////////////////////////////////////////////
type FirebaseCloudMessagingToken string
func NewFirebaseCloudMessagingToken(source string) FirebaseCloudMessagingToken {
return FirebaseCloudMessagingToken(source)
}
func (token FirebaseCloudMessagingToken) String() string {
return string(token)
}
func (token FirebaseCloudMessagingToken) MarshalLogMsg(
destination map[string]interface{},
) {
MarshalLogMsgAttrDump(token, destination)
}
////////////////////////////////////////////////////////////////////////////////