abstraction

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2020 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BasicLogger

type BasicLogger interface {
	Debug(msg string)
	Info(msg string)
	Warn(msg string)
	Error(msg string)
	Fatal(msg string)
	Debugf(msg string, v ...interface{})
	Infof(msg string, v ...interface{})
	Warnf(msg string, v ...interface{})
	Errorf(msg string, v ...interface{})
	Fatalf(msg string, v ...interface{})
	Trace(msg string) BasicLogger
}

BasicLogger represents a logger with basic capabilities

type FieldSet

type FieldSet map[string]interface{}

FieldSet represents a map of entry level data used for structured logging.

type LogBuilder added in v0.4.0

type LogBuilder interface {
	Setup(format string, level string)
}

LogBuilder represents a Log config facility

type Logger

type Logger interface {
	BasicLogger
	WithFields(fields FieldSet) Logger
	WithField(key string, value interface{}) Logger
	WithError(err error) BasicLogger
}

Logger represents a logger

type UnitOfWork

type UnitOfWork interface {
	Begin(ctx context.Context) error
	Complete() error
	Rollback() error
	DeferredRollback()
}

UnitOfWork defines the abstraction of the Transaction concept

Jump to

Keyboard shortcuts

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