handler

package
v0.0.0-...-124e46a Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HandleFn

type HandleFn[Update any] func(u Update) error

func WithMiddleware

func WithMiddleware[Update any](handler HandleFn[Update], mw ...Middleware[Update]) HandleFn[Update]

type Handler

type Handler[Update any] interface {
	Matcher() filter.Filter[Update]
	Handler() HandleFn[Update]
}

func NewHandler

func NewHandler[Update any](handleFn HandleFn[Update], matcher filter.Filter[Update]) Handler[Update]

type Middleware

type Middleware[Update any] func(next HandleFn[Update]) HandleFn[Update]

func CombineMiddleware

func CombineMiddleware[Update any](mw []Middleware[Update]) Middleware[Update]

Jump to

Keyboard shortcuts

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