middleware

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2026 License: MPL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Build

func Build(builder Builder, op *core.Operation) core.MiddlewareFunc

func NewBuilderModifier

func NewBuilderModifier(builder Builder) func(op *core.Operation, next func(*core.Operation))

func PrefixModifier

func PrefixModifier(prefixes []string) func(o *core.Operation, next func(*core.Operation))

func TestBuilder

func TestBuilder(builder Builder, op *core.Operation, handler func(core.Context)) func(core.Context)

func TestChain

func TestChain(middlewares core.Middlewares, handler func(core.Context)) func(core.Context)

func TestMiddleware

func TestMiddleware(mw core.MiddlewareFunc, handler func(core.Context)) func(core.Context)

Types

type Builder

type Builder interface {
	Build(op *core.Operation) core.MiddlewareFunc
}

type BuilderFunc

type BuilderFunc func(op *core.Operation) core.MiddlewareFunc

func (BuilderFunc) Build

type Group

type Group struct {
	core.API
	// contains filtered or unexported fields
}

func NewGroup

func NewGroup(api core.API, prefixes ...string) *Group

func (*Group) Adapter

func (g *Group) Adapter() core.Adapter

func (*Group) Config

func (g *Group) Config() core.Config

func (*Group) DocumentOperation

func (g *Group) DocumentOperation(op *core.Operation)

func (*Group) Group

func (g *Group) Group(prefix string) *Group

func (*Group) Marshal

func (g *Group) Marshal(w io.Writer, contentType string, v any) error

func (*Group) Middlewares

func (g *Group) Middlewares() core.Middlewares

func (*Group) Negotiate

func (g *Group) Negotiate(accept string) (string, error)

func (*Group) Transform

func (g *Group) Transform(ctx core.Context, status string, v any) (any, error)

func (*Group) Unmarshal

func (g *Group) Unmarshal(contentType string, data []byte, v any) error

func (*Group) UseMiddleware

func (g *Group) UseMiddleware(middlewares ...core.MiddlewareFunc)

func (*Group) UseModifier

func (g *Group) UseModifier(modifier func(o *core.Operation, next func(*core.Operation)))

func (*Group) UseSimpleModifier

func (g *Group) UseSimpleModifier(modifier func(o *core.Operation))

func (*Group) UseTransformer

func (g *Group) UseTransformer(transformers ...core.Transformer)

type OperationDocumenter

type OperationDocumenter interface {
	DocumentOperation(op *core.Operation)
}

Jump to

Keyboard shortcuts

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