Documentation
¶
Index ¶
- Constants
- Variables
- func New(text string) *err
- type Err
- type Http
- func (Http) BadRequest(w http.ResponseWriter)
- func (Http) InternalServerError(w http.ResponseWriter)
- func (Http) InvalidJSON(w http.ResponseWriter)
- func (Http) InvalidXML(w http.ResponseWriter)
- func (Http) NotFound(w http.ResponseWriter)
- func (Http) NotImplemented(w http.ResponseWriter)
- func (Http) Unauthorized(w http.ResponseWriter)
Constants ¶
View Source
const ( StatusBadParameter = "Bad Parameter" StatusUnknown = "Unknown" StatusIncorrectXml = "Incorrect XML" StatusIncorrectJson = "Incorrect json" StatusNotUnique = "Not Unique" NodeNotFound = "Node not found" StatusForbidden = "Forbidden" )
Variables ¶
View Source
var ( NotLoggedMessage = errors.New("You are currently not logged in to the system, to get proper access create a new user or login with an existing user.") LoginErrorMessage = errors.New("Incorrect login or password") LogoutErrorMessage = errors.New("Some problems with logout") UnknownMessage = errors.New("Oops, error occurred: Please provide bug to github: https://github.com/lastbackend/monarch/issues") )
Functions ¶
Types ¶
type Err ¶
func BadParameter ¶
func IncorrectJSON ¶
func IncorrectXML ¶
func (*Err) Http ¶
func (e *Err) Http(w http.ResponseWriter)
type Http ¶
type Http struct {
Code int `json:"code"`
Status string `json:"status"`
Message string `json:"message"`
}
var HTTP Http
func (Http) BadRequest ¶
func (Http) BadRequest(w http.ResponseWriter)
func (Http) InternalServerError ¶
func (Http) InternalServerError(w http.ResponseWriter)
func (Http) InvalidJSON ¶
func (Http) InvalidJSON(w http.ResponseWriter)
func (Http) InvalidXML ¶
func (Http) InvalidXML(w http.ResponseWriter)
func (Http) NotFound ¶
func (Http) NotFound(w http.ResponseWriter)
func (Http) NotImplemented ¶
func (Http) NotImplemented(w http.ResponseWriter)
func (Http) Unauthorized ¶
func (Http) Unauthorized(w http.ResponseWriter)
Click to show internal directories.
Click to hide internal directories.