settings

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2018 License: MIT Imports: 9 Imported by: 14

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildTime added in v0.2.0

func BuildTime() string

BuildTime of application

func G

func G() *viper.Viper

G global config

func HTTPServer

func HTTPServer(key string, router http.Handler) (shutdownTimeout time.Duration, server *http.Server)

HTTPServer creates an instance of web-server for passed router

func Init

func Init(appName, appVersion, appBuildTime, filename string) error

Init settings

func Logger

func Logger() *logger.Config

Logger config

func ORM

func ORM() (*orm.DB, error)

ORM connection

func Redis

func Redis() (*redis.Client, error)

Redis connection

func Version added in v0.2.0

func Version() string

Version of application

func Worker added in v0.3.0

func Worker(name string, job worker.Job) (*worker.Worker, error)

Worker returns workers instance by config settings looking to `workers.<name>` config key

Types

This section is empty.

Jump to

Keyboard shortcuts

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