app

package
v0.0.0-...-6e01d8e Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2017 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HTTPMetrics

func HTTPMetrics(appName string) echo.MiddlewareFunc

HTTPMetrics is the middleware function that logs duration of responses.

Types

type App

type App struct {
	// contains filtered or unexported fields
}

App is application with all dependencies.

func New

func New(appName string, verbose bool, hc HttpConfig, dbc *pg.DB) *App

New is a function that returns new application instance.

func (*App) Errorf

func (a *App) Errorf(format string, v ...interface{})

Errorf prints message to Stderr (app.wan variable).

func (*App) Printf

func (a *App) Printf(format string, v ...interface{})

Printf prints message to Stdout (app.log variable) if a.verbose is set.

func (*App) Run

func (a *App) Run() error

Run is a function that runs application.

type HttpConfig

type HttpConfig struct {
	Host string
	Port int
}

Jump to

Keyboard shortcuts

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