handlers

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2023 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FileServer

func FileServer(r chi.Router, path string, opener Opener)

FileServer sets up handler to serve static files within given URL path.

func Who

func Who(renewer session.Renewer) http.HandlerFunc

Who is handler, which returns JSON with user data used for authentication.

Types

type Opener added in v0.3.2

type Opener func(string) ([]byte, error)

Opener is generic function for reading files. For example: Opener can open files from filesystem or files embedded withing binary. Given string could be a path or other indicator.

Directories

Path Synopsis
api
v1

Jump to

Keyboard shortcuts

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