config

package
v0.0.0-...-4b66723 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 7, 2024 License: GPL-3.0 Imports: 31 Imported by: 0

README

/internal/config

Configuration files in this directory define settings and parameters that control the behavior of the application. These settings may include database connection details, API keys, environment-specific configurations, logging settings, etc.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bootstrap

func Bootstrap(config *BootstrapConfig)

func NewDatabase

func NewDatabase(viper *viper.Viper) *gorm.DB

func NewDevelopmentLogger

func NewDevelopmentLogger() (*zap.Logger, error)

This configuration for Development env, the log will be written to the terminal!

func NewErrorHandler

func NewErrorHandler(viper *viper.Viper) fiber.ErrorHandler

func NewFiber

func NewFiber(viper *viper.Viper, options *AppOptions) *fiber.App

func NewProductionLogger

func NewProductionLogger() (*zap.Logger, error)

This configuration for Production env, the log will be written to a File!

func NewValidator

func NewValidator(viper *viper.Viper) *validator.Validate

func NewViper

func NewViper() *viper.Viper

func NewZapLog

func NewZapLog(viper *viper.Viper) *zap.Logger

Types

type AppOptions

type AppOptions struct {
	LogWriter io.Writer
}

type BootstrapConfig

type BootstrapConfig struct {
	App      *fiber.App
	Config   *viper.Viper
	Log      *zap.Logger
	Validate *validator.Validate
	DB       *gorm.DB
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL