merge doing topping and re-save file

This commit is contained in:
pakintada@gmail.com 2024-02-05 12:22:24 +07:00
parent aaa60216b2
commit 5889499a7e
5 changed files with 119 additions and 32 deletions

View file

@ -20,6 +20,7 @@ import (
"strings"
"github.com/jmoiron/sqlx"
"github.com/redis/go-redis/v9"
"github.com/go-chi/chi/v5"
"github.com/go-chi/cors"
@ -30,6 +31,7 @@ type Server struct {
server *http.Server
data *data.Data
database *sqlx.DB
cache_db *redis.Client
cfg *config.ServerConfig
oauth oauth.OAuthService
taoLogger *logger.TaoLogger
@ -44,8 +46,9 @@ func NewServer(cfg *config.ServerConfig, oauthService oauth.OAuthService) *Serve
server: &http.Server{Addr: fmt.Sprintf(":%d", cfg.ServerPort)},
data: data.NewData(taoLogger),
database: data.NewSqliteDatabase(),
cache_db: data.NewRedisClient("redis:6379", "", ""),
cfg: cfg,
oauth: oauthService,
oauth: oauth.NewOAuthService(serverCfg),
taoLogger: taoLogger,
}
}