Documentation ¶
Overview ¶
package www implements HTTP handlers for the whosonfirst-browser web application.
Index ¶
- func AppendStaticAssetHandlers(mux *http.ServeMux) error
- func AppendStaticAssetHandlersWithPrefix(mux *http.ServeMux, prefix string) error
- func DataHandler(root string) (http.Handler, error)
- func DefaultRasterSizes() map[string]RasterSize
- func DefaultSVGSizes() map[string]SVGSize
- func GeoJSONHandler(opts *GeoJSONHandlerOptions) (http.Handler, error)
- func GeoJSONLDHandler(opts *GeoJSONLDHandlerOptions) (http.Handler, error)
- func IDHandler(opts IDHandlerOptions) (http.Handler, error)
- func IndexHandler(opts IndexHandlerOptions) (http.Handler, error)
- func NavPlaceHandler(opts *NavPlaceHandlerOptions) (http.Handler, error)
- func NewNullHandler() http.Handler
- func RasterHandler(opts *RasterHandlerOptions) (http.Handler, error)
- func RenderTemplate(rsp gohttp.ResponseWriter, t *template.Template, vars interface{})
- func SPRHandler(opts *SPRHandlerOptions) (http.Handler, error)
- func SVGHandler(opts *SVGHandlerOptions) (http.Handler, error)
- func SearchAPIHandler(opts SearchAPIHandlerOptions) (http.Handler, error)
- func SearchHandler(opts SearchHandlerOptions) (http.Handler, error)
- func SelectHandler(opts *SelectHandlerOptions) (http.Handler, error)
- func StaticAssetsHandler() (http.Handler, error)
- func StaticAssetsHandlerWithPrefix(prefix string) (http.Handler, error)
- func StaticFileSystem() (http.FileSystem, error)
- func WebfingerHandler(opts *WebfingerHandlerOptions) (http.Handler, error)
- type Capabilities
- type Endpoints
- type ErrorVars
- type GeoJSONHandlerOptions
- type GeoJSONLDHandlerOptions
- type IDHandlerOptions
- type IDVars
- type IndexHandlerOptions
- type IndexVars
- type NavPlaceHandlerOptions
- type NotFoundVars
- type Paths
- type RasterHandlerOptions
- type RasterSize
- type SPRHandlerOptions
- type SVGHandlerOptions
- type SVGSize
- type SearchAPIHandlerOptions
- type SearchHandlerOptions
- type SearchVars
- type SelectHandlerOptions
- type WebfingerHandlerOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultRasterSizes ¶
func DefaultRasterSizes() map[string]RasterSize
func DefaultSVGSizes ¶
func GeoJSONHandler ¶
func GeoJSONHandler(opts *GeoJSONHandlerOptions) (http.Handler, error)
func GeoJSONLDHandler ¶
func GeoJSONLDHandler(opts *GeoJSONLDHandlerOptions) (http.Handler, error)
func IndexHandler ¶
func IndexHandler(opts IndexHandlerOptions) (http.Handler, error)
func NavPlaceHandler ¶
func NavPlaceHandler(opts *NavPlaceHandlerOptions) (http.Handler, error)
NavPlaceHandler will return a given record as a FeatureCollection for use by the IIIF navPlace extension, specifically as navPlace "reference" objects.
func NewNullHandler ¶
func RasterHandler ¶
func RasterHandler(opts *RasterHandlerOptions) (http.Handler, error)
func RenderTemplate ¶
func RenderTemplate(rsp gohttp.ResponseWriter, t *template.Template, vars interface{})
func SPRHandler ¶
func SPRHandler(opts *SPRHandlerOptions) (http.Handler, error)
func SVGHandler ¶
func SVGHandler(opts *SVGHandlerOptions) (http.Handler, error)
func SearchAPIHandler ¶
func SearchAPIHandler(opts SearchAPIHandlerOptions) (http.Handler, error)
func SearchHandler ¶
func SearchHandler(opts SearchHandlerOptions) (http.Handler, error)
func SelectHandler ¶
func SelectHandler(opts *SelectHandlerOptions) (http.Handler, error)
func StaticAssetsHandler ¶
func StaticFileSystem ¶
func StaticFileSystem() (http.FileSystem, error)
func WebfingerHandler ¶
func WebfingerHandler(opts *WebfingerHandlerOptions) (http.Handler, error)
Types ¶
type Capabilities ¶
type Endpoints ¶
type Endpoints struct { Index string Id string Data string Png string Svg string Spr string Search string GeoJSONLD string }
Endpoints defines a struct containing (relative) URLs for the various whosonfirst-browser web application handlers.
type GeoJSONHandlerOptions ¶
type GeoJSONLDHandlerOptions ¶
type IDHandlerOptions ¶
type IndexHandlerOptions ¶
type NavPlaceHandlerOptions ¶
type NavPlaceHandlerOptions struct {}
type NotFoundVars ¶
type NotFoundVars struct {
Endpoints *Endpoints
}
type RasterHandlerOptions ¶
type RasterHandlerOptions struct { Format string Sizes map[string]RasterSize Reader reader.Reader Logger *log.Logger }
type RasterSize ¶
type SPRHandlerOptions ¶
type SVGHandlerOptions ¶
type SearchAPIHandlerOptions ¶
type SearchAPIHandlerOptions struct { Database fulltext.FullTextDatabase EnableGeoJSON bool GeoJSONReader reader.Reader SPRPathResolver geojson.SPRPathResolver }
type SearchHandlerOptions ¶
type SearchVars ¶
type SelectHandlerOptions ¶
type WebfingerHandlerOptions ¶
type WebfingerHandlerOptions struct { Reader reader.Reader Logger *log.Logger Hostname string Paths *Paths Capabilities *Capabilities }
Click to show internal directories.
Click to hide internal directories.