Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMongoDatabase ¶
func NewMongoDatabase(m *MongoConfig) *mongo.Database
func NewRedisClient ¶
func NewRedisClient(r *RedisConfig) redis.UniversalClient
Types ¶
type EmailClient ¶
func NewEmailClient ¶
func NewEmailClient(config EmailConfig) EmailClient
type EmailConfig ¶
type InfraComponent ¶
func NewInfraComponent ¶
func NewInfraComponent(config InfraConfig) InfraComponent
type InfraConfig ¶
type InfraConfig struct { RedisConfig RedisConfig `yaml:"redis"` MongoConfig MongoConfig `yaml:"mongo"` }
type MongoConfig ¶
type MongoConfig struct { DbName string `env:"MONGO_DB" yaml:"db_name" default:"church-management"` URI string `env:"MONGO_URL" yaml:"hosts" default:"127.0.0.1:27017"` Username string `env:"MONGO_USERNAME" yaml:"username" default:""` Password string `env:"MONGO_PASSWORD" yaml:"password" default:""` }
type RedisConfig ¶
type RedisConfig struct { Hosts string `env:"REDIS_URL" yaml:"hosts" default:"127.0.0.1:6379"` Username string `env:"REDIS_USERNAME" yaml:"username" default:"default"` Password string `env:"REDIS_PASSWORD" yaml:"password" default:""` MaxRetries int `env:"REDIS_MAX_RETRIES" yaml:"maxRetries" default:"3"` ReadTimeout time.Duration `env:"REDIS_READ_TIMEOUT" yaml:"readTimeout"` WriteTimeout time.Duration `env:"REDIS_WRITE_TIMEOUT" yaml:"writeTimeout"` RouteByLatency bool `env:"REDIS_ROUTE_BY_LATENCY" yaml:"routeByLatency"` UseTLS bool `env:"REDIS_USE_TLS" yaml:"useTLS" default:"true"` }
Click to show internal directories.
Click to hide internal directories.