Documentation ¶
Index ¶
- Constants
- func MigrateDatabase(dsn string) error
- func NewCorsConfig(cfg Config) cors.Config
- func NewDatabaseConnection(dsn string) *gorm.DB
- func NewFiberConfig() fiber.Config
- func NewLoggerConfig() logger.Config
- func NewReportsConfig(db *gorm.DB, storage *s3.Storage) reports.Config
- func NewReservationsConfig(db *gorm.DB) reservations.Config
- func NewS3Config(cfg Config) s3.Config
- func NewSwaggerConfig(s *swag.Spec) swagger.Config
- func NewTransactionsConfig(db *gorm.DB) transactions.Config
- func NewUsersConfig(db *gorm.DB) users.Config
- type Config
Constants ¶
View Source
const (
API = "/api"
)
Variables ¶
This section is empty.
Functions ¶
func MigrateDatabase ¶
func NewCorsConfig ¶
func NewDatabaseConnection ¶
func NewFiberConfig ¶
func NewFiberConfig() fiber.Config
func NewLoggerConfig ¶
func NewReservationsConfig ¶
func NewReservationsConfig(db *gorm.DB) reservations.Config
func NewS3Config ¶
func NewTransactionsConfig ¶
func NewTransactionsConfig(db *gorm.DB) transactions.Config
Types ¶
type Config ¶
type Config struct { Port string `env:"BACKEND_PORT"` Host string `env:"BACKEND_HOST"` Addr string CorsOrigins string `env:"BACKEND_CORS_ORIGINS"` Database struct { Host string `env:"DB_HOST"` Port string `env:"DB_PORT"` User string `env:"DB_USER"` Pass string `env:"DB_PASS"` Name string `env:"DB_NAME"` TimeZone string `env:"DB_TIMEZONE" envDefault:"UTC"` SSLMode string `env:"DB_SSL_MODE" envDefault:"disable"` Dsn string } S3 struct { Region string `env:"S3_REGION"` Bucket string `env:"S3_BUCKET"` Endpoint string `env:"S3_ENDPOINT"` AccessKey string `env:"S3_ACCESS_KEY"` SecretAccessKey string `env:"S3_SECRET_ACCESS_KEY"` MaxAttempts int `env:"S3_MAX_ATTEMPTS" envDefault:"3"` RequestTimeout time.Duration `env:"S3_REQUEST_TIMEOUT" envDefault:"0"` } }
Click to show internal directories.
Click to hide internal directories.