common

package
Version: v0.0.0-...-0f1ff53 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2020 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AppBuildVersion = "0.0.0"
	AppBuildHash    = "???"
	AppBuildDate    = "???"
	AppBuildMode    = "???"
)

AppBuild metadata

Variables

This section is empty.

Functions

func GetAppEnvFile

func GetAppEnvFile() (output string)

GetAppEnvFile ... location of an env file to load

func GetAppHealthPort

func GetAppHealthPort() (output string)

GetAppHealthPort ... the port to bind the health service to

func GetAppHealthPortEnabled

func GetAppHealthPortEnabled() (output string)

GetAppHealthPortEnabled ... enable the binding of a health port

func GetAppMetricsEnabled

func GetAppMetricsEnabled() (output string)

GetAppMetricsEnabled ... serve metrics endpoint

func GetAppMetricsPort

func GetAppMetricsPort() (output string)

GetAppMetricsPort ... return the port which the app should serve metrics on

func GetAppMinioAccessKey

func GetAppMinioAccessKey() (output string)

GetAppMinioAccessKey ... return the accessKey for file storage

func GetAppMinioBucket

func GetAppMinioBucket() (output string)

GetAppMinioBucket ... return the bucket for file storage

func GetAppMinioHost

func GetAppMinioHost() (output string)

GetAppMinioHost ... return the host for file storage

func GetAppMinioSecretKey

func GetAppMinioSecretKey() (output string)

GetAppMinioSecretKey ... return the secretKey for file storage

func GetAppMinioUseSSL

func GetAppMinioUseSSL() (output string)

GetAppMinioUseSSL ... return if the file storage should use SSL

func GetAppPort

func GetAppPort() (output string)

GetAppPort ... the port to serve web traffic on

func GetAppRealIPHeader

func GetAppRealIPHeader() (output string)

GetAppRealIPHeader ... the header to use instead of r.RemoteAddr

func GetAppSiteTitle

func GetAppSiteTitle() (output string)

GetAppSiteTitle ... site title to template in

func GetEnvOrDefault

func GetEnvOrDefault(envName string, defaultValue string) (output string)

GetEnvOrDefault ... given an env var return it's value, else return a default

func GetRequestIP

func GetRequestIP(r *http.Request) (requestIP string)

GetRequestIP ... returns r.RemoteAddr unless RealIPHeader is set

func Logging

func Logging(next http.Handler) http.Handler

Logging ... a basic middleware for logging

Types

This section is empty.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL