Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BasicResponse ¶
type BasicResponse struct {
// contains filtered or unexported fields
}
BasicResponse
When embedded into a Response object, this wil provide basic functionality
func (*BasicResponse) NewCode ¶
func (b *BasicResponse) NewCode(code int)
func (BasicResponse) StatusCode ¶
func (b BasicResponse) StatusCode() int
StatusCode
Returns the status code set by the NewError method
type CodedResponse ¶ added in v1.0.0
type CodedResponse interface {
NewCode(code int)
}
CodedResponse An object implementing this can track the response code from server / client. Complements kitDefaults.StatusCoder
type ErredResponse ¶ added in v1.0.0
ErredResponse An object implementing this can track the error from the server / client. Complements error interface
type ErrorResponse ¶ added in v0.2.1
type ErrorResponse struct {
// contains filtered or unexported fields
}
ErrorResponse
When embedded into a Response object, this wil provide error handling functionality
func (ErrorResponse) Error ¶ added in v0.2.1
func (b ErrorResponse) Error() string
Error
Implements error interface
func (ErrorResponse) Failed ¶ added in v0.2.1
func (b ErrorResponse) Failed() error
Failed
Implements kitDefaults.Failer
func (*ErrorResponse) NewCode ¶ added in v1.0.0
func (b *ErrorResponse) NewCode(code int)
func (*ErrorResponse) NewError ¶ added in v0.2.1
func (b *ErrorResponse) NewError(code int, format string, vars ...interface{})
NewError
Use this function when it is necessary to indicate an error result for business logic
func (ErrorResponse) StatusCode ¶ added in v1.0.0
func (b ErrorResponse) StatusCode() int
type ExpandedLogging ¶
type ExpandedLogging struct {
// contains filtered or unexported fields
}
ExpandedLogging
Added to a response, should enable additional request-scoped log values
func (*ExpandedLogging) GetAll ¶
func (l *ExpandedLogging) GetAll() map[string]interface{}
GetAll
creates defensive copy of the underlying map
func (*ExpandedLogging) Log ¶
func (l *ExpandedLogging) Log(values ...interface{})
Log
create a new log entry to be traversed later
type ExtendedLog ¶
type ExtendedLog interface {
GetAll() map[string]interface{}
}