routes

package
Version: v0.0.0-...-722fd9f Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2015 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteHandler

func DeleteHandler(db database.ShortenBackend) func(http.ResponseWriter, *http.Request)

DeleteHandler generates a HTTP handler for deleting URL's given a datastore backend.

func ListHandler

func ListHandler(db database.ShortenBackend) func(http.ResponseWriter, *http.Request)

ListHandler generates a HTTP handler for listing URL's given a datastore backend.

func MetaHandler

func MetaHandler(protocol, domain string) func(http.ResponseWriter, *http.Request)

MetaHandler returns info on the protocol and the domain for our short URLs Seems a little weird, but follows react patterns

func ReadOnlyHandler

func ReadOnlyHandler() func(http.ResponseWriter, *http.Request)

ReadOnlyHandler returns a message to the user saying that they need to find the write-domain to modify things. This shouldn't be hit too often as the admin interface itself will hide the user-facing input

func RedirectHandler

func RedirectHandler(db database.ShortenBackend, domain string) func(http.ResponseWriter, *http.Request)

RedirectHandler redirects users to their desired location. Not accessed via Ajax, just by end users

func ShortenHandler

func ShortenHandler(db database.ShortenBackend) func(http.ResponseWriter, *http.Request)

ShortenHandler generates a HTTP handler for a shortening URLs given a datastore backend.

Types

This section is empty.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL