application

package
v0.0.0-...-76439fa Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2019 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// LogTimestampTag is the tag for timestamp log
	LogTimestampTag = "timestamp"
	// LogCallerTag is the tag for caller log
	LogCallerTag = "caller"
	// LogLayerTag is the tag for layer log
	LogLayerTag = "layer"
	// LogRouteTag is the tag for route log
	LogRouteTag = "route"
	// LogMessageTag is the tag for message log
	LogMessageTag = "message"
	// LogErrorTag is the tag for error log
	LogErrorTag = "error"

	// LayerApplication represents application layer
	LayerApplication = "application"
	// LayerEndpoint represents endpoint layer
	LayerEndpoint = "endpoint"
	// LayerTransport represents transport layer
	LayerTransport = "transport"

	// HTTPHeaderConetent is for http content type header
	HTTPHeaderConetent = "Content-Type"
	// HTTPContentJSON represents json conetent type
	HTTPContentJSON = "application/json"
	// HTTPContentUTF8 represents utf-8 conetent type
	HTTPContentUTF8 = "charset=utf-8"
	// HTTPHeaderBreak breaks in http header
	HTTPHeaderBreak = ";"

	// MessageListenAddress represents message for logging listen address
	MessageListenAddress = "http listening on "
	// MessageHalting represents message for halting
	MessageHalting = "halting!"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	Router          *mux.Router
	Logger          gokitLog.Logger
	AppLogger       gokitLog.Logger
	EndpointLogger  gokitLog.Logger
	TransportLogger gokitLog.Logger
	DB              database.Database
	ServerConfig    server.ServerConfig
	ErrorEncoder    gokitHttp.ServerOption
	Errs            chan error
}

App is a struct containing basic app configs

func (*App) InitApp

func (a *App) InitApp(dbConfig database.DBConfig, serverConfig server.ServerConfig) error

InitApp inits app configs

func (*App) Run

func (a *App) Run()

Run starts the app server

Jump to

Keyboard shortcuts

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