Documentation
¶
Index ¶
- Variables
- func ErrorHandling(n janice.HandlerFunc) janice.HandlerFunc
- func Recovery(n janice.HandlerFunc) janice.HandlerFunc
- func RequestLogging(n janice.HandlerFunc) janice.HandlerFunc
- func RequestTracking(n janice.HandlerFunc) janice.HandlerFunc
- type Error
- func (e *Error) Code() int
- func (e *Error) Error() string
- func (e *Error) Fields() Fields
- func (e *Error) LogFields() Fields
- func (e *Error) WithCode(code int) *Error
- func (e *Error) WithField(key string, value interface{}) *Error
- func (e *Error) WithFields(f Fields) *Error
- func (e *Error) WithLogField(key string, value interface{}) *Error
- func (e *Error) WithLogFields(f Fields) *Error
- type Fields
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func ErrorHandling ¶
func ErrorHandling(n janice.HandlerFunc) janice.HandlerFunc
ErrorHandling is an error handling middleware function
func Recovery ¶
func Recovery(n janice.HandlerFunc) janice.HandlerFunc
Recovery is a panic recovery middleware function
func RequestLogging ¶
func RequestLogging(n janice.HandlerFunc) janice.HandlerFunc
RequestLogging is a request logging middleware function
func RequestTracking ¶
func RequestTracking(n janice.HandlerFunc) janice.HandlerFunc
RequestTracking is a request tracking middleware function
Types ¶
type Error ¶
type Error struct {
// contains filtered or unexported fields
}
Error represents an error
func (*Error) WithFields ¶
WithFields adds the specified error fields
func (*Error) WithLogField ¶
WithLogField adds the specified log-only error field
func (*Error) WithLogFields ¶
WithLogFields adds the specified log-only error fields
Click to show internal directories.
Click to hide internal directories.