app

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2019 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Application

type Application struct {
	EnvName EnvName
	// PostgreSQL database
	DS datastore.Datastore
	// Logger
	Logger zerolog.Logger
}

Application is the main server struct for Guestbook. It contains the state of the most recently read message of the day.

func ProvideApplication

func ProvideApplication(en EnvName, ds datastore.Datastore, log zerolog.Logger) *Application

ProvideApplication creates a new application struct

type EnvName

type EnvName uint8

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

const (
	Production EnvName = iota + 1 // Production (1)
	Staging                       // Staging (2)
	QA                            // QA (3)
	Dev                           // Dev (4)
)

EnvName of environment.

func (EnvName) String

func (n EnvName) String() string

Jump to

Keyboard shortcuts

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