config

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

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

Go to latest
Published: Jun 19, 2022 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ServerConfig ServerConfig
	DBConfig     DatabaseConfig
	LoggerConfig LoggerConfig
}

func LoadConfig

func LoadConfig(file string) (*Config, error)

LoadConfig loads the configuration from the given file.

type DatabaseConfig

type DatabaseConfig struct {
	DataSourceName  string
	Name            string
	MigrationFolder string
	MaxOpen         int
	MaxIdle         int
	MaxLifetime     int
}

DatabaseConfig is the database configuration

type LoggerConfig

type LoggerConfig struct {
	Development bool
	Encoding    string
	Level       string
}

LoggerConfig is the logger configuration

type ServerConfig

type ServerConfig struct {
	AppVersion       string
	Mode             string
	RoutePrefix      string
	Debug            bool
	Port             string
	TimeoutSecs      int64
	ReadTimeoutSecs  int64
	WriteTimeoutSecs int64
}

Jump to

Keyboard shortcuts

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