api

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2025 License: MIT Imports: 18 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 to check if each request is correctly authorized. Returs the next http handler to be processed.

func ValidatePathParams

func ValidatePathParams(next http.Handler) http.Handler

ValidatePathParams checks if the id parameter of an endpoint is a valid number. Returs the next http handler to be processed.

Types

type APIServer

type APIServer struct {
	Port int
	// contains filtered or unexported fields
}

func (*APIServer) Run

func (server *APIServer) Run() error

Jump to

Keyboard shortcuts

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