-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: initial parsing of client payload into JSON
- Loading branch information
Dara Hayes
committed
Feb 20, 2018
1 parent
8b1580b
commit 471ed8b
Showing
3 changed files
with
16 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,25 @@ | ||
package mobile | ||
|
||
import "time" | ||
|
||
type AppConfig struct { | ||
DBConnectionString string | ||
} | ||
|
||
// ClientMetric struct is what the client payload should be parsed into | ||
// Need to figure out how to structure this | ||
type Metric struct { | ||
Timestamp time.Time `json:"timestamp"` | ||
ClientID string `json:"clientId"` | ||
Data interface{} `json:"data"` | ||
ClientTimestamp int64 `json:"timestamp"` | ||
ClientId string `json:"clientId"` | ||
App AppMetric `json:"app"` | ||
Device DeviceMetric `json:"device"` | ||
} | ||
|
||
type AppMetric struct { | ||
ID string `json:"id"` | ||
SDKVersion string `json:"sdkVersion"` | ||
AppVersion string `json:"appVersion"` | ||
} | ||
|
||
type DeviceMetric struct { | ||
Platform string `json:"platform"` | ||
PlatformVersion string `json:"platformVersion"` | ||
} |