config

package
v0.0.0-...-04c0119 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadConfig

func LoadConfig(cfg *Config)

LoadConfig loads the .env file and fills the base configuration.

Types

type AppConfig

type AppConfig struct {
	Version         string
	ServerStartTime time.Time
	Config          Config
	Logger          *log.Logger
	Validator       *validator.Validate
}

AppConfig represents the shared application configuration.

type Config

type Config struct {
	Port   int
	Env    string
	Cors   []string
	Cookie struct {
		Name     string
		SameSite string
	}
	DB struct {
		DSN string
	}
	JWT []byte
}

Config represents the app's base configuration.

Jump to

Keyboard shortcuts

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