logger

package
v0.1.19 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterErrors

func RegisterErrors(m map[error]int)

Types

type Cloud

type Cloud interface {
	Log(e logging.Entry)
}

type Fields

type Fields map[string]interface{}

type Logger

type Logger struct {
	// contains filtered or unexported fields
}

func New

func New(l Cloud) Logger

func (Logger) Log

func (l Logger) Log(v logging.Severity, m string, f Fields)

func (Logger) LogResponse

func (l Logger) LogResponse(w http.ResponseWriter, r *http.Request, s int)

func (Logger) LogResponseMessage

func (l Logger) LogResponseMessage(w http.ResponseWriter, r *http.Request, s int, m string)

func (Logger) LogServiceError

func (l Logger) LogServiceError(w http.ResponseWriter, r *http.Request, e error)

type ValidationError

type ValidationError struct {
	Root    error
	Rewrite [2]string
	Details validator.ValidationErrors
}

func FailValidation

func FailValidation(root, details error) *ValidationError

func (*ValidationError) Error

func (e *ValidationError) Error() string

func (*ValidationError) RewritePrefix added in v0.1.8

func (e *ValidationError) RewritePrefix(original, updated string)

func (*ValidationError) RewritesPrefix added in v0.1.8

func (e *ValidationError) RewritesPrefix() bool

Jump to

Keyboard shortcuts

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