handler

package
v0.0.0-...-52cadad Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2024 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIFunc

type APIFunc func(schema.Factory, *types.APIRequest)

type RequestHandler

type RequestHandler interface {
	http.Handler

	GetSchemas() *types2.APISchemas
	Handle(apiOp *types2.APIRequest)
}

type Server

type Server struct {
	ResponseWriters map[string]types2.ResponseWriter
	Schemas         *types2.APISchemas
	AccessControl   types2.AccessControl
	Parser          parse2.Parser
	URLParser       parse2.URLParser
}

func New

func New(cfg *rest.Config, sf schema.Factory, authMiddleware auth.Middleware, next http.Handler,
	routerFunc router.RouterFunc) (*Server, http.Handler, error)

func (*Server) CustomAPIUIResponseWriter

func (s *Server) CustomAPIUIResponseWriter(cssURL, jsURL, version writer2.StringGetter)

func (*Server) Handle

func (s *Server) Handle(apiOp *types2.APIRequest)

func (*Server) ServeHTTP

func (s *Server) ServeHTTP(rw http.ResponseWriter, req *http.Request)

Jump to

Keyboard shortcuts

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