Documentation
¶
Index ¶
- type HandlerData
- type TypedHandler
- func (mux *TypedHandler[S, T]) UseContentEncoders(encs ...middleware.ContentEncoder)
- func (mux *TypedHandler[S, T]) UseErrorHandler(handler middleware.ErrorHandler[*HandlerData[S, T]], ...)
- func (mux *TypedHandler[S, T]) UseLog(format string, l io.Writer)
- func (mux *TypedHandler[S, T]) UseMiddleware(mws ...dispatch.Middleware[*HandlerData[S, T]])
- func (mux *TypedHandler[S, T]) UseSessionStore(store middleware.SessionStore[S], init func() S)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HandlerData ¶
type HandlerData[S middleware.Session, T any] struct { Data T Session S // contains filtered or unexported fields }
func (*HandlerData[S, T]) LoadSession ¶
func (d *HandlerData[S, T]) LoadSession(session S)
func (*HandlerData[S, T]) Request ¶
func (d *HandlerData[S, T]) Request() *http.Request
type TypedHandler ¶
type TypedHandler[S middleware.Session, T any] struct { *dispatch.TypedHandler[*HandlerData[S, T]] // contains filtered or unexported fields }
func NewTypedHandler ¶
func NewTypedHandler[S middleware.Session, T any](sessionInit func() S, fn func(*http.Request) T) *TypedHandler[S, T]
func (*TypedHandler[S, T]) UseContentEncoders ¶
func (mux *TypedHandler[S, T]) UseContentEncoders(encs ...middleware.ContentEncoder)
func (*TypedHandler[S, T]) UseErrorHandler ¶
func (mux *TypedHandler[S, T]) UseErrorHandler(handler middleware.ErrorHandler[*HandlerData[S, T]], ctn *dispatch.ContentTypeNegotiator)
func (*TypedHandler[S, T]) UseLog ¶
func (mux *TypedHandler[S, T]) UseLog(format string, l io.Writer)
func (*TypedHandler[S, T]) UseMiddleware ¶
func (mux *TypedHandler[S, T]) UseMiddleware(mws ...dispatch.Middleware[*HandlerData[S, T]])
func (*TypedHandler[S, T]) UseSessionStore ¶
func (mux *TypedHandler[S, T]) UseSessionStore(store middleware.SessionStore[S], init func() S)
Click to show internal directories.
Click to hide internal directories.