Change all ID into string, I guess this was to avoir overflow.
authorOllivier Robert <roberto@keltia.net>
Tue, 11 Apr 2017 11:51:47 +0200
changeset 66 965586c1e3ed
parent 65 0d245f3b076f
child 67 1ff7afce37fe
Change all ID into string, I guess this was to avoir overflow.
app.go
config.go
config_test.go
test/foo.token
types.go
--- a/app.go	Tue Apr 11 11:30:23 2017 +0200
+++ b/app.go	Tue Apr 11 11:51:47 2017 +0200
@@ -16,8 +16,8 @@
 )
 
 type registerApp struct {
-	ID           int64  `json:"id"`
-	ClientID     int64  `json:"client_id"`
+	ID           string `json:"id"`
+	ClientID     string `json:"client_id"`
 	ClientSecret string `json:"client_secret"`
 }
 
--- a/config.go	Tue Apr 11 11:30:23 2017 +0200
+++ b/config.go	Tue Apr 11 11:51:47 2017 +0200
@@ -33,7 +33,7 @@
 
 // Config holds our parameters
 type Server struct {
-	ID          int64
+	ID          string
 	Name        string
 	BearerToken string
 }
--- a/config_test.go	Tue Apr 11 11:30:23 2017 +0200
+++ b/config_test.go	Tue Apr 11 11:51:47 2017 +0200
@@ -52,7 +52,7 @@
 	assert.NoError(t, err, "should be fine")
 
 	real := &Server{
-		ID:          666,
+		ID:          "666",
 		Name:        "foo",
 		BearerToken: "d3b07384d113edec49eaa6238ad5ff00",
 	}
--- a/test/foo.token	Tue Apr 11 11:30:23 2017 +0200
+++ b/test/foo.token	Tue Apr 11 11:51:47 2017 +0200
@@ -1,3 +1,3 @@
-id = 666
+id = "666"
 name = "foo"
 bearer_token = "d3b07384d113edec49eaa6238ad5ff00"
--- a/types.go	Tue Apr 11 11:30:23 2017 +0200
+++ b/types.go	Tue Apr 11 11:51:47 2017 +0200
@@ -6,7 +6,7 @@
 
 type Gondole struct {
 	Name   string
-	ID     int64
+	ID     string
 	Secret string
 }
 
@@ -23,7 +23,7 @@
 */
 
 type Account struct {
-	ID          int64
+	ID          string
 	Username    string
 	Acct        string
 	DisplayName string
@@ -43,7 +43,7 @@
 }
 
 type Attachement struct {
-	ID         int64
+	ID         string
 	Type       string
 	URL        string
 	RemoteURL  string
@@ -75,14 +75,14 @@
 }
 
 type Mention struct {
-	ID       int64
+	ID       string
 	URL      string
 	Username string
 	Acct     string
 }
 
 type Notification struct {
-	ID        int64
+	ID        string
 	Type      string
 	CreatedAt time.Time
 	Account   *Account
@@ -108,12 +108,12 @@
 }
 
 type Status struct {
-	ID                 int64
+	ID                 string
 	URI                string
 	URL                string
 	Account            *Account
-	InReplyToId        int64
-	InReplyToAccountID int64
+	InReplyToId        string
+	InReplyToAccountID string
 	Reblog             *Status
 	Content            string
 	CreatedAT          time.Time