config

package
v0.0.0-...-45d5ef5 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	//EnvPrefix is a prefix to all ENV variables used in this app
	EnvPrefix = "CHARITE_DATA_DONATION"
	//APIPrefixV1 URL prefix in API version 1
	APIPrefixV1 = "/api/v1"

	//Debug is a flag used to display debug messages
	Debug = false

	// DefaultHost default host for the services
	DefaultHost = "localhost"
	// DefaultPort default port the service is served on
	DefaultPort = "4444"
	// DefaultCorsHosts default cors horst for local development
	DefaultCorsHosts = "http://localhost:3333"
	// DefaultDonationURL defines the target to forward donations for the charite
	DefaultForwardURL = ""

	// DefaultDBHost default host for the database connection
	DefaultDBHost = "localhost"
	// DefaultDBPort default port for the database connnection
	DefaultDBPort = "5444"
	// DefaultDBName default port for the database connnection
	DefaultDBName = "charite-data-donation"
	// DefaultDBUser default port for the database connnection
	DefaultDBUser = "postgres"
	// DefaultDBPassword default port for the database connnection
	DefaultDBPassword = "postgres"
	// DefaultDBSSLMode default port for the database connnection
	DefaultDBSSLMode = "disable"
)

Variables

View Source
var (
	Name      string = "charite-data-donation"
	Version   string
	Branch    string
	Commit    string
	BuildUser string
	GoVersion = runtime.Version()
)

Build information. Populated at build-time.

Functions

func CorsConfig

func CorsConfig(corsHosts []string) cors.Options

CorsConfig stores default configuration for CORS middleware

func SetupEnv

func SetupEnv()

SetupEnv configures app to read ENV variables

Types

type ErrorMessage

type ErrorMessage struct {
	Message string
	Err     error
}

ErrorMessage defines the type for the errors channel

Jump to

Keyboard shortcuts

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