presenter

package
v0.0.0-...-50a8012 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// ErrInvalidString is a message to be displayed to user wrapped in error
	ErrInvalidString error
)

Functions

func HealthHandler

func HealthHandler(w http.ResponseWriter, r *http.Request)

HealthHandler displays health status of the service. Status NoContent (204) is returned if service is working as expected. Status InternalServerError (500) is returned in case of general errors.

func HelloHandler

func HelloHandler(w http.ResponseWriter, r *http.Request)

HelloHandler says hello Status OK (200) is returned for successfuly saying hello. Status NotAcceptable (406) is returned for unacceptable input. Status UnprocessableEntity (422) is returned for invalid input. Status InternalServerError (500) is returned in case of general errors.

func SetRoutes

func SetRoutes(r routes.Routes)

SetRoutes sets the routes from main

Types

type ErrStruct

type ErrStruct struct {
	Msg string `json:"errorMessage" example:"A horrible, terrible, absolutely awful error"`
}

ErrStruct contains errorMessage

type MsgStruct

type MsgStruct struct {
	Msg string `json:"message" example:"A message"`
}

MsgStruct contains a message

Jump to

Keyboard shortcuts

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