website: Index | Files

package short

import ""

Package short implements a simple URL shortener, serving shortened urls from /s/key. An administrative handler is provided for other services to use.


Package Files

short.go tmpl.go

func AdminHandler Uses

func AdminHandler(dc *datastore.Client, mc *memcache.Client) http.HandlerFunc

AdminHandler serves an administrative interface for managing shortener entries. Be careful. It is the caller’s responsibility to ensure that the handler is only exposed to authorized users.

func RegisterHandlers Uses

func RegisterHandlers(mux *http.ServeMux, dc *datastore.Client, mc *memcache.Client)
type Link struct {
    Key, Target string

Link represents a short link.

Package short imports 11 packages (graph) and is imported by 1 packages. Updated 2021-01-15. Refresh now. Tools for package owners.