api

package
v0.0.0-...-871226d Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2023 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyBody

func CopyBody(next http.Handler) http.Handler

This exists to copy the body from the request into a context variable This is needed because the csrf middleware will consume the body, so we need a persisted version in context

func New

func New(enableCORS bool) (*chi.Mux, error)

New configures application resources and routes.

Types

type Server

type Server struct {
	*http.Server
}

Server provides an http.Server.

func NewServer

func NewServer() (*Server, error)

NewServer creates and configures an APIServer serving all application routes.

func (*Server) Start

func (srv *Server) Start()

Start runs ListenAndServe on the http.Server with graceful shutdown.

Directories

Path Synopsis
app
Package app ties together application resources and handlers.
Package app ties together application resources and handlers.

Jump to

Keyboard shortcuts

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