Documentation ¶
Index ¶
- func ErrorJSON(c echo.Context, httpCode int, errorCode, errorMessage string, err error) error
- func GetDetailedErrorMessage(err error) string
- func IntFromString(name string, contents string) int
- func PropogateError(err error, message string)
- func Recover() echo.MiddlewareFunc
- type FieldLogger
- type FpContext
- func (fc *FpContext) BoolFromQuery(name string, defaultValue bool) bool
- func (fc *FpContext) Float64FromQuery(name string) float64
- func (fc *FpContext) IntFromQuery(name string, defaultValue int) int
- func (fc *FpContext) Log(name string, v string)
- func (fc *FpContext) LogBool(name string, v bool)
- func (fc *FpContext) LogError(message string, err error)
- func (fc *FpContext) LogInt(name string, v int)
- func (fc *FpContext) LogInt64(name string, v int64)
- func (fc *FpContext) LogStringArray(name string, v []string)
- func (fc *FpContext) OptionalFloat64FromQuery(name string, defaultValue float64) float64
- func (fc *FpContext) RequestComplete()
- func (fc *FpContext) Time(name string, action func() error) error
- type InternalError
- type InvalidRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetDetailedErrorMessage ¶
func IntFromString ¶
func PropogateError ¶
func Recover ¶
func Recover() echo.MiddlewareFunc
Recover returns a middleware which recovers from panics anywhere in the chain and handles the control to the centralized HTTPErrorHandler.
Types ¶
type FieldLogger ¶
type FieldLogger struct {
// contains filtered or unexported fields
}
func NewFieldLogger ¶
func NewFieldLogger() *FieldLogger
type FpContext ¶
The context used for REST calls - to provide the field logger and convenience methods.
func NewFpContext ¶
func (*FpContext) BoolFromQuery ¶
func (*FpContext) Float64FromQuery ¶
func (*FpContext) IntFromQuery ¶
func (*FpContext) LogStringArray ¶
func (*FpContext) OptionalFloat64FromQuery ¶
func (*FpContext) RequestComplete ¶
func (fc *FpContext) RequestComplete()
type InternalError ¶
func (*InternalError) Error ¶
func (ie *InternalError) Error() string
type InvalidRequest ¶
func (*InvalidRequest) Error ¶
func (ir *InvalidRequest) Error() string
Click to show internal directories.
Click to hide internal directories.