filter

package
v0.9.7 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2019 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FilterSPR

func FilterSPR(filters Filter, s spr.StandardPlacesResult) error

Types

type Filter

type Filter interface {
	HasPlacetypes(flags.PlacetypeFlag) bool
	IsCurrent(flags.ExistentialFlag) bool
	IsDeprecated(flags.ExistentialFlag) bool
	IsCeased(flags.ExistentialFlag) bool
	IsSuperseded(flags.ExistentialFlag) bool
	IsSuperseding(flags.ExistentialFlag) bool
}

func NewSPRFilterFromInputs

func NewSPRFilterFromInputs(inputs *SPRInputs) (Filter, error)

func NewSPRFilterFromQuery

func NewSPRFilterFromQuery(query url.Values) (Filter, error)

type SPRFilter

type SPRFilter struct {
	Filter
	Placetypes  []flags.PlacetypeFlag
	Current     []flags.ExistentialFlag
	Deprecated  []flags.ExistentialFlag
	Ceased      []flags.ExistentialFlag
	Superseded  []flags.ExistentialFlag
	Superseding []flags.ExistentialFlag
}

func NewSPRFilter

func NewSPRFilter() (*SPRFilter, error)

func (*SPRFilter) HasPlacetypes

func (f *SPRFilter) HasPlacetypes(fl flags.PlacetypeFlag) bool

func (*SPRFilter) IsCeased

func (f *SPRFilter) IsCeased(fl flags.ExistentialFlag) bool

func (*SPRFilter) IsCurrent

func (f *SPRFilter) IsCurrent(fl flags.ExistentialFlag) bool

func (*SPRFilter) IsDeprecated

func (f *SPRFilter) IsDeprecated(fl flags.ExistentialFlag) bool

func (*SPRFilter) IsSuperseded

func (f *SPRFilter) IsSuperseded(fl flags.ExistentialFlag) bool

func (*SPRFilter) IsSuperseding

func (f *SPRFilter) IsSuperseding(fl flags.ExistentialFlag) bool

type SPRInputs

type SPRInputs struct {
	Placetypes    []string
	IsCurrent     []string
	IsCeased      []string
	IsDeprecated  []string
	IsSuperseded  []string
	IsSuperseding []string
}

func NewSPRInputs

func NewSPRInputs() (*SPRInputs, error)

Jump to

Keyboard shortcuts

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