filter

package
v0.6.6-alpha Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2023 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddressFilter

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

func (*AddressFilter) Execute

func (f *AddressFilter) Execute(_ context.Context, transaction *fetch.Transaction) (bool, error)

type AddressFilterOpts

type AddressFilterOpts struct {
	Cache         *sync.Map
	Logg          logf.Logger
	SystemAddress string
}

type Filter

type Filter interface {
	Execute(ctx context.Context, inputTransaction *fetch.Transaction) (next bool, err error)
}

Filter defines a read only filter which must return next as true/false or an error

func NewAddressFilter

func NewAddressFilter(o AddressFilterOpts) Filter

func NewGasFilter

func NewGasFilter(o GasFilterOpts) Filter

func NewRegisterFilter

func NewRegisterFilter(o RegisterFilterOpts) Filter

func NewTransferFilter

func NewTransferFilter(o TransferFilterOpts) Filter

type GasFilter

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

func (*GasFilter) Execute

func (f *GasFilter) Execute(_ context.Context, transaction *fetch.Transaction) (bool, error)

type GasFilterOpts

type GasFilterOpts struct {
	Logg          logf.Logger
	Pub           *pub.Pub
	SystemAddress string
}

type RegisterFilter

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

func (*RegisterFilter) Execute

func (f *RegisterFilter) Execute(_ context.Context, transaction *fetch.Transaction) (bool, error)

type RegisterFilterOpts

type RegisterFilterOpts struct {
	Logg logf.Logger
	Pub  *pub.Pub
}

type TransferFilter

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

func (*TransferFilter) Execute

func (f *TransferFilter) Execute(_ context.Context, transaction *fetch.Transaction) (bool, error)

type TransferFilterOpts

type TransferFilterOpts struct {
	Logg logf.Logger
	Pub  *pub.Pub
}

Jump to

Keyboard shortcuts

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