endpoints

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleAlive

func HandleAlive() system.AliveHandlerFunc

HandleAlive creates and /api/alive endpoint handler via a closure.

func HandleSearch

func HandleSearch(logger *zap.SugaredLogger, shakeSearcher *shakesearch.ShakeSearcher) public.ShakeSearchHandlerFunc

HandleSearch creates a /api/search endpoint handler via a closure. It will do some basic cleaning of the query and respond with an array of results that contain some metadata.

func HandleWorks added in v0.2.0

func HandleWorks(logger *zap.SugaredLogger, shakeSearcher *shakesearch.ShakeSearcher, tmpl *template.Template) public.ShakeWorksHandlerFunc

HandleWorks creates a /api/works endpoint handler via a closure. It will create an HTML document of a snippet of the request line number of Shakespeare's works.

Types

This section is empty.

Jump to

Keyboard shortcuts

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