platform

package module
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

README

The platform is used to define a common baseline for all modules/jobs running on the cluster. It provides environment-specific credential loading, a database connection, and logging with Sentry.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DB sqlbuilder.Database

DB is the global database connection object.

Functions

func DBConnStr

func DBConnStr() string

DBConnStr generates the connection string used to connect with the database.

func Error

func Error(err error, msg string, args ...interface{})

Error reports a non-fatal error.

func EstablishDBConn

func EstablishDBConn() error

EstablishDBConn establishes a connection with the database.

func Fatal

func Fatal(err error, msg string, args ...interface{})

Fatal reports a fatal error and panics.

func InProduction

func InProduction() bool

InProduction returns whether we are in a production environment.

func Info

func Info(msg string, args ...interface{})

Info logs an informational message.

func Load

func Load(key string) (string, error)

Load an environment variable from the platform.

func LoadRequired

func LoadRequired(key string) string

LoadRequired will load an environment, calling panic() if it doesn't exist.

Types

This section is empty.

Jump to

Keyboard shortcuts

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