errors

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2018 License: Apache-2.0 Imports: 4 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package errors contains primitives for working with oshinko errors easier.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddErrorHandler

func AddErrorHandler(next http.Handler) http.Handler

AddErrorHandler will decorate the passed handler with a wrapper which will transform error output from the go-swagger schema into the error format schema defined by the oshinko api definition.

func NewSingleErrorResponse

func NewSingleErrorResponse(status int32, title string, details string) *models.ErrorResponse

NewSingleErrorResponse creates a new error reponse object for use as a return value from a REST request.

func SingleErrorToString

func SingleErrorToString(err *models.ErrorModel) string

SingleErrorToString takes a pointer to an models.ErrorModel and returns a string with the expanded information.

Types

This section is empty.

Jump to

Keyboard shortcuts

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