Documentation ¶
Index ¶
- func DecodeJSONBody(w http.ResponseWriter, r *http.Request, dst interface{}) error
- func ExtractIDFromRequest(r *http.Request) uint32
- func ProcessAggregatedErrors(w http.ResponseWriter, aggregatedErr *authentication.AggregatedError) bool
- func ProcessAggregatedErrorsInTest(t *testing.T, aggregatedErr *authentication.AggregatedError) bool
- func ProcessMalformedRequest(w http.ResponseWriter, err error)
- type MalformedRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeJSONBody ¶
func DecodeJSONBody(w http.ResponseWriter, r *http.Request, dst interface{}) error
DecodeJSONBody decodes a request body in json form and returns a malformed request error type if any errors do occur
func ExtractIDFromRequest ¶
ExtractIdFromRequest takes as input a request object and extracts an id from it
func ProcessAggregatedErrors ¶
func ProcessAggregatedErrors(w http.ResponseWriter, aggregatedErr *authentication.AggregatedError) bool
ProcessAggregatedErrors processes aggregated errors
func ProcessAggregatedErrorsInTest ¶
func ProcessAggregatedErrorsInTest(t *testing.T, aggregatedErr *authentication.AggregatedError) bool
ProcessAggregatedErrorsInTest processes aggregated errors while running and writing unit test cases
func ProcessMalformedRequest ¶
func ProcessMalformedRequest(w http.ResponseWriter, err error)
ProcessMalformedRequest handles aggregated errors occuring from interactions with various external services
Types ¶
type MalformedRequest ¶
MalformedRequest is a custom error type
func (*MalformedRequest) Error ¶
func (mr *MalformedRequest) Error() string
Click to show internal directories.
Click to hide internal directories.