servicehelper

package
v0.0.0-...-d933f62 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2018 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

Package servicehelper structure the construction of errors generated by services

Index

Constants

View Source
const (
	Processing      Code = 102
	BadRequest           = 400
	Unauthorized         = 401
	Forbidden            = 403
	NotFound             = 404
	AlreadyExist         = 409
	UnexpectedError      = 500
	NotImplemented       = 501
)

Code describe the status that will be generated in the BuildResponseError for the http response

Variables

This section is empty.

Functions

This section is empty.

Types

type Code

type Code uint

Code describe the status that will be generated in the BuildResponseError for the http response

type Error

type Error struct {
	Param   string
	Detail  error
	Message string
	Code    Code
}

Error describe the error object returned from services that can be passed directly to the BuildResponseError method

Jump to

Keyboard shortcuts

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