handler

package
v0.0.0-...-415a882 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateHandler

func CreateHandler(config *config.Config, templates *template.Template) (http.Handler, error)

CreateHandler builds a new handler with the provided package configuration, and templates. The templates object must contain the following: index.html, package.html, and 404.html. The returned handler provides the following endpoints:

GET /
	Index page listing all packages.
GET /<name>
       Package page for the given package.
GET /<dir>
	Page listing packages under the given directory,
	assuming that there's no package with the given name.
GET /<name>/<subpkg>
	Package page for the given subpackage.

Types

This section is empty.

Jump to

Keyboard shortcuts

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