config

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Application = struct {
	Host      string `json:"host"`
	LogLevel  string `json:"logLevel"`
	LogFormat string `json:"logFormat"`
	Serve     Serve  `json:"serve"`
}{
	Host:      "0.0.0.0:8080",
	LogLevel:  "info",
	LogFormat: "common",
}

Application is the configuration for the application. Holds flags, parameters.

View Source
var LogWriter = zerolog.ConsoleWriter{
	Out: os.Stderr,
	FormatTimestamp: func(i interface{}) string {
		parse, _ := time.Parse(time.RFC3339, i.(string))

		return parse.Format("2006-01-02 15:04:05")
	},
}

LogWriter is a zerolog writer that writes to stdout.

Functions

func InitializeLog

func InitializeLog()

InitializeLog initializes for json or common format.

func SetLogLevel

func SetLogLevel(level string)

SetLogLevel sets the log level.

Types

type Serve

type Serve struct {
	// /var/run/docker.sock:/docker/:*,-POST,-PUT,-DELETE
	Socket []string `json:"socket"`
}

Serve is the configuration for the net connection.

Jump to

Keyboard shortcuts

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