Documentation ¶
Index ¶
Constants ¶
View Source
const (
//Version string.
Version = major + "." + minor + "." + patch
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { //Port contains the port in which the application listens Port string //AppName for displaying in Monitoring AppName string //LogLevel - DEBUG or INFO or WARNING or ERROR or PANIC or FATAL LogLevel string //TestRun state if the current execution is a test execution TestRun bool // LocalTestRun state if the current execution is a test execution LocalTestRun bool //UsePrometheus to enable prometheus metrics endpoint UsePrometheus bool // EncodingRequest string used to authenticate requests EncodingRequest string }
Config contains the application's configuration values. Add here your own variables and bind it on init() function
var Values Config
Values stores the current configuration values
type Logger ¶
type Logger interface { // Debug uses fmt.Sprint to construct and log a message. Debug(args ...interface{}) // Info uses fmt.Sprint to construct and log a message. Info(args ...interface{}) // Warn uses fmt.Sprint to construct and log a message. Warn(args ...interface{}) // Error uses fmt.Sprint to construct and log a message. Error(args ...interface{}) // DPanic uses fmt.Sprint to construct and log a message. In development, the // logger then panics. (See DPanicLevel for details.) DPanic(args ...interface{}) // Panic uses fmt.Sprint to construct and log a message, then panics. Panic(args ...interface{}) // Fatal uses fmt.Sprint to construct and log a message, then calls os.Exit. Fatal(args ...interface{}) // Debugf uses fmt.Sprintf to log a templated message. Debugf(template string, args ...interface{}) // Infof uses fmt.Sprintf to log a templated message. Infof(template string, args ...interface{}) // Warnf uses fmt.Sprintf to log a templated message. Warnf(template string, args ...interface{}) // Errorf uses fmt.Sprintf to log a templated message. Errorf(template string, args ...interface{}) // DPanicf uses fmt.Sprintf to log a templated message. In development, the // logger then panics. (See DPanicLevel for details.) DPanicf(template string, args ...interface{}) // Panicf uses fmt.Sprintf to log a templated message, then panics. Panicf(template string, args ...interface{}) // Fatalf uses fmt.Sprintf to log a templated message, then calls os.Exit. Fatalf(template string, args ...interface{}) //Sync flushes the log if needed Sync() }
Logger interface defining expected methods for logging
Click to show internal directories.
Click to hide internal directories.