prize

package module
v0.0.0-...-ddc5d82 Latest Latest
Warning

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

Go to latest
Published: May 4, 2026 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

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)

Directories

Path Synopsis
examples
basic command

Jump to

Keyboard shortcuts

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