rest

package
v0.0.0-...-fb5617b Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2016 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package rest represents the REST layer

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildRouter

func BuildRouter(h Handler) *mux.Router

BuildRouter registers all routes

Types

type Error

type Error struct {
	Error  error
	Detail string
	Code   int
}

Error is self defined error type

type Handler

type Handler struct {
	*config.AppContext `inject:""`
}

Handler includes all http handler methods

func (*Handler) HealthCheck

func (rest *Handler) HealthCheck(w http.ResponseWriter, req *http.Request) *Error

HealthCheck is called by Google cloud to do health check

Jump to

Keyboard shortcuts

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