add initial application structure with configuration, logging, and health check endpoints

This commit is contained in:
kever
2026-01-14 23:58:00 +08:00
commit fed727e593
31 changed files with 770 additions and 0 deletions

17
internal/infra/cache/redis.go vendored Normal file
View File

@@ -0,0 +1,17 @@
package cache
import (
"github.com/redis/go-redis/v9"
"epic-ent/internal/config"
)
func NewRedis(cfg *config.Config) (*redis.Client, error) {
rdb := redis.NewClient(&redis.Options{
Addr: cfg.Redis.Addr,
Password: cfg.Redis.Password,
DB: cfg.Redis.DB,
})
return rdb, nil
}