config

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2021 License: MIT Imports: 4 Imported by: 21

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Configuration

type Configuration struct {
	Server   ServerConfig
	Database DatabaseConfig
}

Configuration - server and db configuration variables

func Config

func Config() Configuration

Config - load the configurations from .env

type DatabaseConfig

type DatabaseConfig struct {
	DbDriver string
	DbUser   string
	DbPass   string
	DbName   string
	DbHost   string
	DbPort   string

	DbSslmode  string
	DbTimeZone string

	DbMaxIdleConns    int
	DbMaxOpenConns    int
	DbConnMaxLifetime time.Duration
	DbLogLevel        int
}

DatabaseConfig - database variables

type ServerConfig

type ServerConfig struct {
	ServerPort string // public port of server
	ServerEnv  string
	ServerJWT  struct {
		Key    string
		Expire int
	}
	ServerHashPass struct {
		Memory      uint32
		Iterations  uint32
		Parallelism uint8
		SaltLength  uint32
		KeyLength   uint32
	}
}

ServerConfig ...

Jump to

Keyboard shortcuts

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