filter

package
v0.0.0-...-793d99a Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type And

type And struct {
	Left  ItemFilter
	Right ItemFilter
}

func (*And) Match

func (filter *And) Match(i gofeed.Item) bool

type Count

type Count struct {
	Limit int
	// contains filtered or unexported fields
}

func (*Count) Match

func (filter *Count) Match(i gofeed.Item) bool

Definitionally not idempotent!

type ItemFilter

type ItemFilter interface {
	Match(gofeed.Item) bool
}

func NewRegexp

func NewRegexp(words []string) ItemFilter

TODO: Allow case-sensitive matching? TODO: Log error

func NewSince

func NewSince(when *string, now time.Time) (ItemFilter, error)

type Not

type Not struct {
	Base ItemFilter
}

func (*Not) Match

func (filter *Not) Match(i gofeed.Item) bool

type Or

type Or struct {
	Left  ItemFilter
	Right ItemFilter
}

func (*Or) Match

func (filter *Or) Match(i gofeed.Item) bool

type Regexp

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

func (*Regexp) Match

func (filter *Regexp) Match(i gofeed.Item) bool

TODO: Does not currently handle item.Categories

type Since

type Since struct {
	When time.Time
}

func (*Since) Match

func (filter *Since) Match(i gofeed.Item) bool

TODO: Allow additional arguments allowing us to also check updated times.

type True

type True struct {
}

Some basic Boolean logic types

func (*True) Match

func (filter *True) Match(i gofeed.Item) bool

Jump to

Keyboard shortcuts

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