bootstrap

package
v0.0.0-...-811e4ca Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloseMongoDBConnection

func CloseMongoDBConnection(client *mongo.Client)

func NewMongoDatabase

func NewMongoDatabase(env *Env) *mongo.Client

Types

type Application

type Application struct {
	Env   *Env
	Mongo *mongo.Client
}

func App

func App() Application

func (*Application) CloseDBConnection

func (app *Application) CloseDBConnection()

type Env

type Env struct {
	AppEnv         string `mapstructure:"APP_ENV"`
	ServerAddress  string `mapstructure:"SERVER_ADDRESS"`
	ContextTimeout int    `mapstructure:"CONTEXT_TIMEOUT"`
	DBHost         string `mapstructure:"DB_HOST"`
	DBPort         string `mapstructure:"DB_PORT"`
	DBUser         string `mapstructure:"DB_USER"`
	DBPass         string `mapstructure:"DB_PASS"`
	DBName         string `mapstructure:"DB_NAME"`
}

func NewEnv

func NewEnv() *Env

Jump to

Keyboard shortcuts

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