Documentation ¶ Overview ¶ Package handlers provides HTTP request handlers. Index ¶ func GetShortHandler(store storage.Storage, index Index) http.Handler func SetShortHandler(store storage.Storage) http.Handler type Index func NewIndex(path string) (Index, error) func (i Index) ServeHTTP(w http.ResponseWriter, r *http.Request) Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func GetShortHandler ¶ func GetShortHandler(store storage.Storage, index Index) http.Handler func SetShortHandler ¶ func SetShortHandler(store storage.Storage) http.Handler Types ¶ type Index ¶ type Index struct { Short string Error error // contains filtered or unexported fields } func NewIndex ¶ func NewIndex(path string) (Index, error) func (Index) ServeHTTP ¶ func (i Index) ServeHTTP(w http.ResponseWriter, r *http.Request) Source Files ¶ View all Source files api.go index.go Click to show internal directories. Click to hide internal directories.