initial commit

This commit is contained in:
m.zare
2026-04-10 18:25:21 +03:30
commit 77ca6c34a3
263 changed files with 34470 additions and 0 deletions

36
internal/pkg/module.go Normal file
View File

@@ -0,0 +1,36 @@
package pkg
import (
"go.uber.org/fx"
"base/internal/dto"
"base/internal/pkg/azure/azbus"
"base/internal/pkg/azure/communication"
"base/internal/pkg/database"
"base/internal/pkg/logger"
"base/internal/pkg/oauth"
"base/pkg/cache"
"base/pkg/metrics"
"base/pkg/store"
"github.com/rs/zerolog"
"gorm.io/gorm"
)
func NewLandingCache(db *gorm.DB, lg zerolog.Logger, m *metrics.Metrics) cache.Cache[dto.Landing] {
return cache.New(store.NewPostgresStore[dto.Landing](db, lg, m))
}
var Module = fx.Module(
"pkg",
fx.Provide(
logger.New,
database.NewRWDatabaseConnection,
communication.New,
oauth.New,
azbus.New,
fx.Annotate(store.NewPostgresStore[string], fx.ResultTags(`name:"verification_store"`)),
fx.Annotate(store.NewPostgresStore[string], fx.ResultTags(`name:"reset_password_store"`)),
NewLandingCache,
),
)