filter

package
v0.0.0-...-989364a Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2017 License: Apache-2.0 Imports: 4 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultFilter = new(defaultFilter)

Functions

This section is empty.

Types

type AndGroup

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

func NewAndGroup

func NewAndGroup() *AndGroup

func (*AndGroup) Append

func (fg *AndGroup) Append(filters ...Filter)

Append a new filter to the group

func (*AndGroup) Count

func (fg *AndGroup) Count() int

func (*AndGroup) Filter

func (fg *AndGroup) Filter(e *github.Event) bool

Filter will call the other filters in the group, if one of then returns false, then the AndGroup will return false, otherwise true

func (*AndGroup) String

func (fg *AndGroup) String() string

type EqualsRepository

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

func NewEqualsRepository

func NewEqualsRepository(repoName string) *EqualsRepository

func (*EqualsRepository) Filter

func (er *EqualsRepository) Filter(e *github.Event) bool

func (*EqualsRepository) String

func (er *EqualsRepository) String() string

type EqualsType

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

func NewEqualsType

func NewEqualsType(typeName string) *EqualsType

func (*EqualsType) Filter

func (er *EqualsType) Filter(e *github.Event) bool

func (*EqualsType) String

func (er *EqualsType) String() string

type Filter

type Filter interface {
	// Filter should return if the event will be reported or not
	Filter(e *github.Event) bool
}

Filter will control if the github.Event should or not be shown

type FilterGroup

type FilterGroup interface {
	Filter
	Append(...Filter)
	Count() int
}

type Not

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

func NewNot

func NewNot(f Filter) *Not

func (*Not) Filter

func (n *Not) Filter(e *github.Event) bool

func (*Not) String

func (n *Not) String() string

type OrGroup

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

func NewOrGroup

func NewOrGroup() *OrGroup

func (*OrGroup) Append

func (fg *OrGroup) Append(filters ...Filter)

Append a new filter to the group

func (*OrGroup) Count

func (fg *OrGroup) Count() int

func (*OrGroup) Filter

func (fg *OrGroup) Filter(e *github.Event) bool

Filter will call the other filters in the group, if one of then returns true, then the OrGroup will return true, otherwise false

func (*OrGroup) String

func (fg *OrGroup) String() string

type RepositoryNameRegExpFilter

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

func NewRepositoryNameRegExpFilter

func NewRepositoryNameRegExpFilter(r *regexp.Regexp) *RepositoryNameRegExpFilter

func (*RepositoryNameRegExpFilter) Filter

func (*RepositoryNameRegExpFilter) String

func (f *RepositoryNameRegExpFilter) String() string

type TypeRegExpFilter

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

func NewTypeRegExpFilter

func NewTypeRegExpFilter(r *regexp.Regexp) *TypeRegExpFilter

func (*TypeRegExpFilter) Filter

func (f *TypeRegExpFilter) Filter(e *github.Event) bool

func (*TypeRegExpFilter) String

func (f *TypeRegExpFilter) String() string

Jump to

Keyboard shortcuts

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