filtering

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2022 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ActionTraceDeclarations = cel.Declarations(
	decls.NewIdent("receiver", decls.String, nil),
	decls.NewIdent("account", decls.String, nil),
	decls.NewIdent("action", decls.String, nil),

	decls.NewIdent("block_num", decls.Uint, nil),
	decls.NewIdent("block_id", decls.String, nil),
	decls.NewIdent("block_time", decls.String, nil),

	decls.NewIdent("step", decls.String, nil),
	decls.NewIdent("transaction_id", decls.String, nil),
	decls.NewIdent("transaction_index", decls.Uint, nil),
	decls.NewIdent("global_seq", decls.Uint, nil),
	decls.NewIdent("execution_index", decls.Uint, nil),

	decls.NewIdent("data", decls.NewMapType(decls.String, decls.Any), nil),
	decls.NewIdent("auth", decls.NewListType(decls.String), nil),
	decls.NewIdent("input", decls.Bool, nil),
	decls.NewIdent("notif", decls.Bool, nil),
	decls.NewIdent("scheduled", decls.Bool, nil),
	decls.NewIdent("executed", decls.Bool, nil),

	decls.NewIdent("trx_action_count", decls.Int, nil),
	decls.NewIdent("top5_trx_actors", decls.NewListType(decls.String), nil),
)

Functions

This section is empty.

Types

type ActionTraceActivation

type ActionTraceActivation struct {
	Trace    *pbcodec.ActionTrace
	TrxTrace *MemoizableTrxTrace
	StepName string
	// contains filtered or unexported fields
}

func NewActionTraceActivation

func NewActionTraceActivation(
	actionTrace *pbcodec.ActionTrace,
	trxTrace *MemoizableTrxTrace,
	stepName string,
) *ActionTraceActivation

func (*ActionTraceActivation) Parent

func (*ActionTraceActivation) ResolveName

func (a *ActionTraceActivation) ResolveName(name string) (interface{}, bool)

type BlockFilter

type BlockFilter struct {
	IncludeProgram              blocknumBasedCELFilter
	ExcludeProgram              blocknumBasedCELFilter
	SystemActionsIncludeProgram blocknumBasedCELFilter
}

func NewBlockFilter

func NewBlockFilter(includeProgramCode, excludeProgramCode, systemActionsIncludeProgramCode []string) (*BlockFilter, error)

func (*BlockFilter) String

func (f *BlockFilter) String() string

func (*BlockFilter) TransformInPlace

func (f *BlockFilter) TransformInPlace(blk *bstream.Block) error

TransformInPlace received a `bstream.Block` pointer, unpack it's native counterpart, a `pbcodec.Block` pointer in our case and transforms it in place, modifiying the pointed object. This means that future `ToNative()` calls on the bstream block will return a filtered version of this block.

*Important* This method expect that the caller will peform the transformation in lock step, there is no lock

performed by this method. It's the caller responsibility to deal with concurrency issues.

type CELFilter

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

func (*CELFilter) IsNoop

func (f *CELFilter) IsNoop() bool

type FilteringPreprocessor

type FilteringPreprocessor struct {
	Filter *BlockFilter
}

func (*FilteringPreprocessor) PreprocessBlock

func (f *FilteringPreprocessor) PreprocessBlock(blk *bstream.Block) (interface{}, error)

type KVHeap

type KVHeap []kv

func (KVHeap) Len

func (h KVHeap) Len() int

func (KVHeap) Less

func (h KVHeap) Less(i, j int) bool

func (*KVHeap) Pop

func (h *KVHeap) Pop() interface{}

func (*KVHeap) Push

func (h *KVHeap) Push(x interface{})

func (KVHeap) Swap

func (h KVHeap) Swap(i, j int)

type MemoizableTrxTrace

type MemoizableTrxTrace struct {
	TrxTrace *pbcodec.TransactionTrace
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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