config

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadAllConfigs

func LoadAllConfigs(envFile string)

This function dedicated to the read env file from the project directory Expect env file path from where env will loaded using godotev package LoadAllConfigs set various configs

func LoadDBCfg

func LoadDBCfg()

LoadDBCfg loads DB configuration This load db config from env file If not it set the default value

Types

type DB

type DB struct {
	Host            string
	Port            int
	SslMode         string
	Name            string
	User            string
	Password        string
	Debug           bool
	MaxOpenConn     int
	MaxIdleConn     int
	MaxConnLifetime time.Duration
}

DB holds the DB configuration

func DBCfg

func DBCfg() *DB

DBCfg returns the default DB configuration

type NiomCli added in v0.1.8

type NiomCli struct {
	ModuleName string `json:"module_name"`
	AppName    string `json:"app_name"`
	SourceRoot string `json:"source_root"`
	ConfigFile string `json:"config_file"`
}

NiomCli holds niom-app details

func GetNiomCliConfig added in v0.1.7

func GetNiomCliConfig() *NiomCli

GetNiomCliConfig return niom-app details

Jump to

Keyboard shortcuts

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