routex

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2026 License: MIT Imports: 19 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrOpenAPIForbidden = status.Wrap(fmt.Errorf("openapi is forbidden"), httpx.STATUS__FORBIDDEN)
	ErrOpenAPINotFound  = status.Wrap(fmt.Errorf("openapi view not found"), httpx.STATUS__NOTFOUND)
)

Functions

func ForbidOpenAPI

func ForbidOpenAPI()

func NewHandler

func NewHandler(r httpx.Router, service string, middleware ...httpx.Middleware) (http.Handler, error)

func SetOpenAPIViewContents

func SetOpenAPIViewContents(u httpx.Upgrader)

Types

type OpenAPI

type OpenAPI struct {
	httpx.MethodGet
}

func (*OpenAPI) Output

func (o *OpenAPI) Output(ctx context.Context) (any, error)

func (*OpenAPI) ResponseContentType

func (o *OpenAPI) ResponseContentType() string

type OpenAPIProvider

type OpenAPIProvider interface {
	OpenAPI() *openapi.OpenAPI
}

type OpenAPIView

type OpenAPIView struct {
	httpx.MethodGet `path:"/_view/{href...}"`
}

func (*OpenAPIView) Output

func (o *OpenAPIView) Output(ctx context.Context) (any, error)

Jump to

Keyboard shortcuts

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