feat: initial router on main function

This commit is contained in:
ericprd
2025-02-22 16:15:38 +08:00
parent e57fa3ac6c
commit 3dd84e6932
9 changed files with 150 additions and 55 deletions
+13
View File
@@ -0,0 +1,13 @@
package utils
import (
"context"
"time"
"github.com/redis/go-redis/v9"
)
func StoreToken(ctx context.Context, rdb *redis.Client, token, username string) error {
// return rdb.Set(ctx context.Context, key string, value interface{}, expiration time.Duration)
return rdb.Set(ctx, "token"+username, token, time.Hour).Err()
}