filter

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EvaluateFilterSetsOnMsgs

func EvaluateFilterSetsOnMsgs(srv *server.Connection, inputMailbox string, inputWithoutFlags []string, fallbackMailbox string, filterSet map[string]Filter) error

func GetUnsortedMsgs

func GetUnsortedMsgs(srv *server.Connection, mailbox string, withoutFlags []string) ([]*server.Message, error)

func ParseRuleSet

func ParseRuleSet(ruleSet RuleSet, headers server.MessageHeaders) (bool, error)

func RunCommands

func RunCommands(srv *server.Connection, from string, uid uint32, cmds FilterOps) error

Types

type Filter

type Filter struct {
	Commands FilterOps `yaml:"commands,flow"`
	RuleSet  RuleSet   `yaml:"rules"`
}

type FilterOps

type FilterOps map[string]interface{}

type Rule

type Rule map[string][]map[string]interface{}

type RuleSet

type RuleSet []Rule

Jump to

Keyboard shortcuts

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