router

package
v0.0.0-...-4df811a Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthedHandler

func AuthedHandler(handler Handler) httprouter.Handle

func RegularHandler

func RegularHandler(handler func(w http.ResponseWriter, r *http.Request, params Params, Repo repo.IRepo) (int, error)) httprouter.Handle

Types

type Handler

type Handler = func(params Params, body io.ReadCloser, Repo repo.IRepo, user models.User) (Serde, int, error)

type Params

type Params struct {
	// contains filtered or unexported fields
}

func ParamsFrom

func ParamsFrom(data map[string]string) Params

func (Params) Get

func (p Params) Get(key string) string

type Route

type Route struct {
	// contains filtered or unexported fields
}

type Serde

type Serde interface {
	Serialize(out *string) error
	Deserialize(in io.Reader) error
}

Jump to

Keyboard shortcuts

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