envy

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2019 License: MIT Imports: 5 Imported by: 0

README

env

env is for environment related items

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Env

type Env struct {
	// Environment Name (e.g. Production, QA, etc.)
	Name Name
	// multiplex router
	Router *mux.Router
	// Datastore struct containing AppDB (PostgreSQL),
	// LogDb (PostgreSQL) and CacheDB (Redis)
	DS *datastore.Datastore
	// Logger
	Logger zerolog.Logger
}

Env struct stores common environment related items

func NewEnv

func NewEnv(nme Name, lvl zerolog.Level) (*Env, error)

NewEnv initializes the Env struct

type Name

type Name uint8

Name is the environment Name int representation Using iota, 1 (Production) is the lowest, 2 (Staging) is 2nd lowest, and so on...

const (
	Production Name = iota + 1 // Production
	Staging                    // Staging
	QA                         // QA
	Dev                        // Dev
)

Name of environment.

func (Name) String

func (n Name) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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