api

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2024 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewApiServer

func NewApiServer(conf *conf.Conf, compileTarget utils.MultiCompilable) *http.Server

NewApiServer creates and runs a http server containing all the API endpoints for the software

`/compile` - reloads all domains, routes and redirects

func SetupTargetApis

func SetupTargetApis(r *httprouter.Router, verify mjwt.Verifier, manager *router.Manager)

Types

type AuthCallback

type AuthCallback func(rw http.ResponseWriter, req *http.Request, params httprouter.Params, b AuthClaims)

type AuthWithJsonCallback

type AuthWithJsonCallback[T any] func(rw http.ResponseWriter, req *http.Request, params httprouter.Params, b AuthClaims, t T)

Jump to

Keyboard shortcuts

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