✨ updated
This commit is contained in:
12
app/core/api/repository/redisx/init.go
Normal file
12
app/core/api/repository/redisx/init.go
Normal file
@@ -0,0 +1,12 @@
|
||||
package redisx
|
||||
|
||||
import "github.com/redis/go-redis/v9"
|
||||
|
||||
func NewRedis(host, password string, db int) *redis.Client {
|
||||
rdb := redis.NewClient(&redis.Options{
|
||||
Addr: host,
|
||||
Password: password,
|
||||
DB: db,
|
||||
})
|
||||
return rdb
|
||||
}
|
6
app/core/api/repository/redisx/types/redis_token.go
Normal file
6
app/core/api/repository/redisx/types/redis_token.go
Normal file
@@ -0,0 +1,6 @@
|
||||
package types
|
||||
|
||||
type RedisToken struct {
|
||||
AccessToken string `json:"access_token"`
|
||||
UID string `json:"uid"`
|
||||
}
|
Reference in New Issue
Block a user