config

package
v0.0.0-...-73c8273 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2025 License: Apache-2.0 Imports: 41 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bootstrap

func Bootstrap(config *BootstrapConfig) error

func GracefulShutdown

func GracefulShutdown(e *echo.Echo, log *logrus.Logger, shutdownTimeout time.Duration)

GracefulShutdown handles the graceful shutdown of the Echo server

func NewDatabase

func NewDatabase(viper *viper.Viper, log *logrus.Logger) *gorm.DB

NewDatabase creates a new database connection

func NewEcho

func NewEcho() (*echo.Echo, *logrus.Logger)

func NewGomail

func NewGomail(viper *viper.Viper, log *logrus.Logger) *g.ImplGomail

NewGomail creates a new gomail client

func NewJWT

func NewJWT(viper *viper.Viper) *jwt.JWTConfig

func NewLogrus

func NewLogrus(viper *viper.Viper) *logrus.Logger

NewLogrus creates a new logrus logger

func NewRedisClient

func NewRedisClient(viper *viper.Viper, log *logrus.Logger) *cache.ImplCache

NewRedisClient creates a new redis client

func NewValidator

func NewValidator() *validator.Validate

func NewViper

func NewViper() *viper.Viper

func NewXendit

func NewXendit(viper *viper.Viper) *xendit.APIClient

NewXendit creates a new xendit client

Types

type BootstrapConfig

type BootstrapConfig struct {
	DB       *gorm.DB
	Cache    *cache.ImplCache
	App      *echo.Echo
	Log      *logrus.Logger
	Validate *validator.Validate
	JWT      *jwt.JWTConfig
	Viper    *viper.Viper
	Xendit   *xendit.APIClient
	Gomail   *gomail.ImplGomail
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳