Help us shape the future of Go! Take the 2026 Go Developer Survey

web

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2026 License: MIT Imports: 68 Imported by: 0

Documentation

Index

Constants

View Source
const RouterMockPointBeforeWebRoutes = "before-web-routes"

Variables

View Source
var GzipMinSize = 1400 // min size to compress for the body size of response

Functions

func Home

func Home(ctx *context.Context)

Home render home page

func HomeSitemap

func HomeSitemap(ctx *context.Context)

HomeSitemap renders the main sitemap

func Metrics

func Metrics(resp http.ResponseWriter, req *http.Request)

Metrics validate auth token and render prometheus metrics

func NodeInfoLinks(ctx *context.Context)

NodeInfoLinks returns links to the node info endpoint

func OpenAPI3Json added in v1.3.0

func OpenAPI3Json(ctx *context.Context)

OpenAPI3Json render OpenAPI 3.0 json (auto-converted from Swagger 2.0)

func Routes

func Routes() *web.Router

Routes returns all web routes

func SwaggerV1Json

func SwaggerV1Json(ctx *context.Context)

SwaggerV1Json render swagger v1 json

func WebfingerQuery

func WebfingerQuery(ctx *context.Context)

WebfingerQuery returns information about a resource https://datatracker.ietf.org/doc/html/rfc7565

Types

type AuthMiddleware

type AuthMiddleware struct {
	AllowOAuth2       types.PreMiddlewareProvider
	AllowBasic        types.PreMiddlewareProvider
	MiddlewareHandler func(*context.Context)
}

Jump to

Keyboard shortcuts

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