From 93bd4f6c0babc6f54b7bc1b0d59892dc775c9d82 Mon Sep 17 00:00:00 2001 From: mountain Date: Sun, 28 May 2023 19:07:15 +0900 Subject: [PATCH] =?UTF-8?q?Authinfo=EC=9D=98=20Token=EC=9D=84=20Email?= =?UTF-8?q?=EB=A1=9C=20=EA=B5=90=EC=B2=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- authcollection.go | 11 +++++++++++ go.mod | 2 +- redis.go | 12 ------------ 3 files changed, 12 insertions(+), 13 deletions(-) diff --git a/authcollection.go b/authcollection.go index 0dc2c1c..a373d44 100644 --- a/authcollection.go +++ b/authcollection.go @@ -18,6 +18,17 @@ import ( "go.mongodb.org/mongo-driver/bson/primitive" ) +type Authinfo struct { + Accid primitive.ObjectID `bson:"_id,omitempty" json:"_id,omitempty"` + ServiceCode string `bson:"code" json:"code"` + Platform string + Uid string + Email string + Sk primitive.ObjectID + RefreshToken string `bson:"refresh_token,omitempty" json:"refresh_token,omitempty"` + Expired primitive.DateTime `bson:"_ts" json:"_ts"` +} + const ( sessionSyncChannelName = "session-sync-channel2" ) diff --git a/go.mod b/go.mod index 4503b46..f5456c3 100644 --- a/go.mod +++ b/go.mod @@ -11,6 +11,7 @@ require ( github.com/pires/go-proxyproto v0.7.0 go.mongodb.org/mongo-driver v1.11.6 golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d + golang.org/x/text v0.3.7 ) require ( @@ -25,5 +26,4 @@ require ( github.com/xdg-go/stringprep v1.0.3 // indirect github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d // indirect golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect - golang.org/x/text v0.3.7 // indirect ) diff --git a/redis.go b/redis.go index b4974c4..fd9302d 100644 --- a/redis.go +++ b/redis.go @@ -7,20 +7,8 @@ import ( "strconv" "github.com/go-redis/redis/v8" - "go.mongodb.org/mongo-driver/bson/primitive" ) -type Authinfo struct { - Accid primitive.ObjectID `bson:"_id,omitempty" json:"_id,omitempty"` - ServiceCode string `bson:"code" json:"code"` - Platform string - Uid string - Token string - Sk primitive.ObjectID - RefreshToken string `bson:"refresh_token,omitempty" json:"refresh_token,omitempty"` - Expired primitive.DateTime `bson:"_ts" json:"_ts"` -} - func newRedisClient(uri string, dbidxoffset int) *redis.Client { option, err := redis.ParseURL(uri) if err != nil {