checker

package
v1.24.0 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2025 License: MIT Imports: 4 Imported by: 2

Documentation

Overview

Package checker defines the Checker interface and a helper utility to avoid import cycles.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Func added in v1.24.0

type Func func(*http.Request) (bool, error)

func (Func) Check added in v1.24.0

func (f Func) Check(r *http.Request) (bool, error)

func (Func) Hash added in v1.24.0

func (f Func) Hash() string

type Impl

type Impl interface {
	Check(*http.Request) (bool, error)
	Hash() string
}

type List

type List []Impl

func (List) Check

func (l List) Check(r *http.Request) (bool, error)

Check runs each checker in the list against the request. It returns true only if *all* checkers return true (AND semantics). If any checker returns an error, the function returns false and the error.

func (List) Hash

func (l List) Hash() string

Jump to

Keyboard shortcuts

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