api

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AboutHandler

func AboutHandler(c echo.Context) error

AboutHandler handles requests to /api/v1/about/

func DisablePocketAdminAPI added in v0.2.0

func DisablePocketAdminAPI() echo.MiddlewareFunc

func GenerateNumbersHandler

func GenerateNumbersHandler(app *pocketbase.PocketBase) func(c echo.Context) error

func JSONContentTypeMiddleware

func JSONContentTypeMiddleware(next http.Handler) http.Handler

func LoggerMiddleWare

func LoggerMiddleWare(next http.Handler) http.Handler

func RootHandler

func RootHandler(routes []Route) func(c echo.Context) error

RoodHandler handles requests to /api/v1/ route

func SetupRoutes

func SetupRoutes()

SetupRoutes configures the routes for our API

Types

type Info added in v0.2.0

type Info struct {
	Name        string `json:"name"`
	Version     string `json:"version"`
	Description string `json:"description"`
}

APIInfo type holds details about API.

type Route

type Route struct {
	Path        string `json:"path"`
	Method      string `json:"method"`
	Description string `json:"description"`
}

Route type holds details about different endpoints that can be used.

Jump to

Keyboard shortcuts

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