routex

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2026 License: MIT Imports: 19 Imported by: 0

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