config

package
v1.2.6 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2021 License: MIT Imports: 5 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
	Logger   LoggerConfig
}

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 LoggerConfig added in v1.2.4

type LoggerConfig struct {
	SentryDsn string
}

LoggerConfig ...

type ServerConfig

type ServerConfig struct {
	ServerPort string // public port of server
	ServerEnv  string
	ServerJWT  struct {
		AccessKey     string
		RefreshKey    string
		AccessKeyTTL  int
		RefreshKeyTTL int
	}
	ServerHashPass struct {
		Memory      uint32
		Iterations  uint32
		Parallelism uint8
		SaltLength  uint32
		KeyLength   uint32
	}
	ServerTrustedIP string
}

ServerConfig ...

Jump to

Keyboard shortcuts

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