website: golang.org/x/website/internal/short Index | Files

package short

import "golang.org/x/website/internal/short"

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

Index

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). Updated 2020-07-03. Refresh now. Tools for package owners.