routes

package
v0.0.0-...-10de872 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRouter

func NewRouter(config *Config) http.Handler

NewRouter returns a new http.Handler for serving

Types

type Config

type Config struct {
	DB         userdb.UserDB
	SessionKey []byte
	Salt       string
}

Config supplies needed information about the router

type Route

type Route struct {
	Path    string
	Methods []string
	Handler routeHandler
	Auth    bool
}

Route represents a single web route

Jump to

Keyboard shortcuts

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