config

package
v0.0.0-...-f10e182 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// HttpPort - http server port
	HttpPort = "PORT"
	HttpHost = "HOST"

	// DbHost - db host key
	DbHost = "DB_HOST"
	// DbPort - db port key
	DbPort = "DB_PORT"
	// DbUser - db user key
	DbUser = "DB_USER"
	// DbPass - db pass key
	DbPass = "DB_PASS"
	// DbName - db name key
	DbName = "DB_NAME"
	// DbSsl - db ssl mode key [disable/enable]
	DbSsl = "DB_SSL"

	// LogLevel - logging level
	LogLevel = "LOG_LEVEL"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	DbCredentials *DatabaseCredentials
	Http          *Http
	Logger        *Logger
}

func Init

func Init() *Config

type DatabaseCredentials

type DatabaseCredentials struct {
	Host        string
	Port        string
	Name        string
	User        string
	Pass        string
	SslMode     string
	AutoMigrate bool
}

func InitDbCredentials

func InitDbCredentials() *DatabaseCredentials

type Http

type Http struct {
	Port string
	Host string
}

func InitHttpConfig

func InitHttpConfig() *Http

InitHttpConfig - return pointer of http server config

type Logger

type Logger struct {
	Level logrus.Level
}

func InitLoggerConfig

func InitLoggerConfig() *Logger

InitLoggerConfig - return pointer of Logger config

type RedisCredentials

type RedisCredentials struct {
	Host string
	Port string
	Pass string
}

Jump to

Keyboard shortcuts

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