This commit is contained in:
eafonyang
2026-06-05 20:15:30 +08:00
parent 8c22be4e0a
commit 99785672a5
15 changed files with 439 additions and 8 deletions
+11 -1
View File
@@ -18,6 +18,7 @@ import (
"github.com/luxsin/app-api/internal/repository"
"github.com/luxsin/app-api/internal/router"
"github.com/luxsin/app-api/internal/search"
"github.com/luxsin/app-api/internal/storage"
"github.com/luxsin/app-api/internal/task"
"github.com/luxsin/app-api/pkg/logger"
"github.com/redis/go-redis/v9"
@@ -78,7 +79,16 @@ func main() {
log.Info("device persist task disabled")
}
engine := router.New(log, db, searchClient, rdb, cfg.Equalize)
s3Storage, err := storage.NewS3Storage(context.Background(), cfg.S3)
if err != nil {
log.Fatal("s3 client init failed", zap.Error(err))
}
log.Info("s3 configured",
zap.String("bucket", cfg.S3.Bucket),
zap.String("region", cfg.S3.Region),
)
engine := router.New(log, db, searchClient, rdb, cfg.Equalize, s3Storage)
srv := &http.Server{
Addr: cfg.Addr(),