config

package
v0.0.0-...-b9a08a6 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// PORT specifies the port where the server will be listening
	// Required for dev, and prod
	PORT = "PORT"

	// ENV specifies the environment where the server will be running
	// Required for dev, and prod
	ENV = "ENV"

	// DB_URI specifies the URI for the database
	// Required for dev, and prod
	DB_URI = "DB_URI"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type EnvConfig

type EnvConfig struct {
	// contains filtered or unexported fields
}

EnvConfig is the configuration for the environment variables

var (
	// EnvVars is the struct holding the environment variables
	EnvVars *EnvConfig = newEnvConfig()
)

func (*EnvConfig) Get

func (e *EnvConfig) Get(key string) string

Get returns the value of a specific environment variable

func (*EnvConfig) GetDBURI

func (e *EnvConfig) GetDBURI() string

GetDBURI returns the URI for the database

func (*EnvConfig) GetEnv

func (e *EnvConfig) GetEnv() string

GetEnv returns the environment where the server will be running

func (*EnvConfig) GetPort

func (e *EnvConfig) GetPort() string

GetPort returns the port where the server will be listening

Jump to

Keyboard shortcuts

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