settings

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Settings

type Settings struct {
	// mysql's connection string required by the gorm mysql driver
	MySQLDSN string `envconfig:"MYSQL_DSN" required:"true"`
	// the address the web server listens on
	ServerAddr string `envconfig:"SERVER_ADDR" default:":8080"`
	// the address of the redis server
	RedisAddr string `envconfig:"REDIS_ADDR" default:":6379"`
}

func Load

func Load() (*Settings, error)

Load loads the env vars from the .env file, serializes them into a Settings struct

Jump to

Keyboard shortcuts

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