filters

package
v1.17.4 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Fallback = nopFilter{}

Fallback filter always returns true

Functions

This section is empty.

Types

type FilterChain added in v1.9.0

type FilterChain []types.EventFilter

func Join added in v1.9.0

func Join(head types.EventFilter, tail ...types.EventFilter) FilterChain

func (FilterChain) Check added in v1.9.0

func (c FilterChain) Check(ctx context.Context, upd *telegram.Update) (bool, error)

type PostCheckout

type PostCheckout struct {
	// contains filtered or unexported fields
}

func NewPostCheckout

func NewPostCheckout(invoicePayload string) *PostCheckout

func (*PostCheckout) Check

func (f *PostCheckout) Check(ctx context.Context, upd *telegram.Update) (bool, error)

type PreCheckout

type PreCheckout struct {
	// contains filtered or unexported fields
}

func NewPreCheckout

func NewPreCheckout(invoicePayload string) *PreCheckout

func (*PreCheckout) Check

func (f *PreCheckout) Check(ctx context.Context, upd *telegram.Update) (bool, error)

type StateFilter added in v1.9.0

type StateFilter struct {
	// contains filtered or unexported fields
}

func NewStateFilterEq added in v1.9.0

func NewStateFilterEq(sp types.StateProvider, logger zerolog.Logger, key, eq string) *StateFilter

func NewStateFilterNeq added in v1.9.0

func NewStateFilterNeq(sp types.StateProvider, logger zerolog.Logger, key, neq string) *StateFilter

func NewStateFilterWithPresent added in v1.9.0

func NewStateFilterWithPresent(sp types.StateProvider, logger zerolog.Logger, key string, present bool) *StateFilter

func (*StateFilter) Check added in v1.9.0

func (f *StateFilter) Check(ctx context.Context, upd *telegram.Update) (bool, error)

Jump to

Keyboard shortcuts

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