infra

package
v0.0.0-...-2764f1d Latest Latest
Warning

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

Go to latest
Published: May 8, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateServer

func CreateServer(router *mux.Router) *http.Server

CreateServer create a new http server

func Getenv

func Getenv(key string, defvalue string) string

func Setenv

func Setenv(key string, value string)

Types

type Logger

type Logger struct {
	Log *zap.Logger
}

Logger represents a logger

func CreateLogger

func CreateLogger(level int) (*Logger, error)

CreateLogger creates a logger instance for all components

func GetLogger

func GetLogger() (*Logger, error)

func (*Logger) WithFields

func (l *Logger) WithFields(fields ...zap.Field) *zap.Logger

WithFields creates an entry from the standard logger and adds multiple fields to it

Jump to

Keyboard shortcuts

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