router

package
v0.0.0-...-76c2828 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2024 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthMiddleware

func AuthMiddleware(next http.Handler) http.Handler

AuthMiddleware is a middleware that checks if the request has a valid auth token

func CorsMiddleware

func CorsMiddleware(next http.Handler) http.Handler

CorsMiddleware is a middleware that sets the CORS headers

func SetResponseTypeToJSON

func SetResponseTypeToJSON(next http.Handler) http.Handler

SetResponseTypeToJSON is a middleware sets the response type to JSON

Types

type Router

type Router struct {
	Deps *deps.Deps
	// contains filtered or unexported fields
}

func New

func New(deps *deps.Deps, db mongo.Database) *Router

func (*Router) BuildRoutes

func (router *Router) BuildRoutes() *chi.Mux

Jump to

Keyboard shortcuts

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