api

package
v1.7.0-uptimefronte.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Wrap

func Wrap(server *ApiServer, innerFunc ApiHandlerFunc) http.HandlerFunc

Wrap wraps a known function in a HandlerFunc and passes along the server details it needs outside of the normal scope of the http request Ths resulting function is then passed to the mux handle func (or via middleware)

Types

type ApiHandlerFunc

type ApiHandlerFunc func(server *ApiServer, w http.ResponseWriter, r *http.Request)

type ApiServer

type ApiServer struct {
	Ctx    context.Context
	DbPath string
}

func New

func New(ctx context.Context, dbPath string) *ApiServer

Jump to

Keyboard shortcuts

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