eval

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Evaluator

type Evaluator interface {
	// Bool performs an evaluation resulting in a boolean value
	Bool(ctx context.Context, act *strava.Activity) (bool, error)

	// Eval performs an evaluation on an activity with an arbitrary result
	Eval(ctx context.Context, act *strava.Activity) (interface{}, error)
}

Evalutor performs evaluations on activities

type Filterer

type Filterer interface {
	// Filter the collection of activities by the expression returning those evaluating to true
	Filter(ctx context.Context, acts []*strava.Activity) ([]*strava.Activity, error)
}

Filterer performs activity filtering

type Mapper

type Mapper interface {
	// Map over the collection of activities producing a slice of expression evaluation values
	Map(ctx context.Context, acts []*strava.Activity) ([]interface{}, error)
}

Mapper performs activity mapping

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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