Version: v0.0.0-...-f33bcef Latest Latest

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

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




This section is empty.


This section is empty.


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.


This section is empty.

Source Files

Jump to

Keyboard shortcuts

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