handlers

package
v2.0.4 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HttpHandler

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

func NewHttpHandler

func NewHttpHandler(address string, router *mux.Router, cache rscache.FileCache) *HttpHandler

func (*HttpHandler) Home

func (h *HttpHandler) Home(w http.ResponseWriter, r *http.Request)

Home serves the root `GET /` route.

func (*HttpHandler) Render

func (h *HttpHandler) Render(w http.ResponseWriter, r *http.Request)

Render serves the `POST /render` route that renders a markdown document.

func (*HttpHandler) Start

func (h *HttpHandler) Start(ctx context.Context)

Start starts the HTTP service and listens for requests.

Jump to

Keyboard shortcuts

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