response

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2021 License: MIT Imports: 2 Imported by: 0

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 ErrorResponse added in v0.2.1

type ErrorResponse struct {
	BasicResponse
	// 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) 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

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{}
}

Jump to

Keyboard shortcuts

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