configure

package
v0.0.0-...-216fc9e Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2020 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// ErrCantBeZeroOrNegative indicates that an integer value cannot be zero negative, but a zero or negative value was
	// provided.
	ErrCantBeZeroOrNegative = errors.New("integer cannot be negative")
)

Functions

func DefaultCtx

func DefaultCtx() (ctx context.Context, cancel context.CancelFunc)

DefaultCtx creates a context and its cancel function using the default timeout or one provided during configuration.

Types

type Configuration

type Configuration struct {
	ErrChan         chan error
	Template        *template.Template
	Logger          *zap.SugaredLogger
	InvalidPaths    []string
	ShortID         *shortid.Shortid
	ShortIDParanoid bool
	TerseStore      storage.TerseStore
	VisitsStore     storage.VisitsStore
}

Configuration is the Go structure that contains all needed configurations gathered on startup.

func Configure

func Configure() (config Configuration, err error)

Configure gathers all startup configurations, formats them, and returns them as a Go struct.

Jump to

Keyboard shortcuts

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