handler

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Ignore = errors.New("ignore")
	EOF    = errors.New("EOF")
)

Functions

This section is empty.

Types

type Action

type Action[V any] func(V)

type Checker

type Checker[V any] func(V) error

type FilterFn

type FilterFn[V any] func(V) bool

type Handler

type Handler[I, O any] func(I) (O, error)

func Check

func Check[V any](checker Checker[V]) Handler[V, V]

func CheckTo

func CheckTo[I, O any](checker Checker[I], handler Handler[I, O]) Handler[I, O]

func Filter

func Filter[V any](filter FilterFn[V]) Handler[V, V]

func FilterTo

func FilterTo[I, O any](filter FilterFn[I], handler Handler[I, O]) Handler[I, O]

func ForEach

func ForEach[V any](action Action[V]) Handler[V, struct{}]

func Limit

func Limit[V any](limit int) Handler[V, V]

func LimitTo

func LimitTo[I, O any](limit int, handler Handler[I, O]) Handler[I, O]

func Map

func Map[I, O any](mapper Mapper[I, O]) Handler[I, O]

func MapTo

func MapTo[I, T, O any](mapper Mapper[I, T], handler Handler[T, O]) Handler[I, O]

func Skip

func Skip[V any](skip int) Handler[V, V]

func SkipTo

func SkipTo[I, O any](skip int, handler Handler[I, O]) Handler[I, O]

type Mapper

type Mapper[I, O any] func(I) O

Jump to

Keyboard shortcuts

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