cel

package
v0.0.0-...-e6e1f1d Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Evaluate

func Evaluate(prg Program, item Item, now time.Time) (bool, error)

Evaluate evaluates a compiled CEL program against an item.

Types

type Env

type Env struct{ *cel.Env }

func NewEnv

func NewEnv() (Env, error)

NewEnv creates a new CEL environment configured for filtering Items.

func (*Env) Compile

func (e *Env) Compile(expr string) (Program, error)

Compile compiles a CEL expression string.

type Item

type Item struct {
	URL    string
	Title  *string
	Author *string
	Tags   *string // Comma-separated, feed-defined tags for the item

	Content *string

	Published time.Time
	Updated   time.Time
}

Item fields jointly derivable from JSON and Atom feeds. This struct is a subset of the item fields stored by reader.

This package is a cel environment for filtering

type Program

type Program cel.Program

Jump to

Keyboard shortcuts

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