front

package
v0.0.0-...-0440e18 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2019 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

The Front package routes HTTP requests to an appropriately routed handler and returns a response whose Body member is a JSON-encoded API object. In case of error it will be a JSON-encoded ApiErrorBody.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Front

type Front struct {
	// contains filtered or unexported fields
}

func NewFront

func NewFront(dbi db.Dbi, status models.Status, cacheMaxAge int) Front

NewFront creates a new Front object

func (Front) Handler

func (front Front) Handler(request events.APIGatewayProxyRequest) (response events.APIGatewayProxyResponse, err error)

Front.Handler takes an APIGatewayProxyRequest and returns an APIGatewayProxyResponse with an error which should be nil

Any downstream panic should be recovered and wrapped into an ApiErrorBody, and the trace logged

Jump to

Keyboard shortcuts

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