releaseutil

package
v2.0.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2016 License: Apache-2.0 Imports: 2 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Reverse

func Reverse(list []*rspb.Release, sortFn func([]*rspb.Release))

Reverse reverses the list of releases sorted by the sort func.

func SortByDate

func SortByDate(list []*rspb.Release)

SortByDate returns the list of releases sorted by a release's last deployed time (in seconds).

func SortByName

func SortByName(list []*rspb.Release)

SortByName returns the list of releases sorted in lexicographical order.

func SortByRevision

func SortByRevision(list []*rspb.Release)

SortByRevision returns the list of releases sorted by a release's revision number (release.Version).

Types

type FilterFunc

type FilterFunc func(*rspb.Release) bool

FilterFunc returns true if the release object satisfies the predicate of the underlying filter func.

func All

func All(filters ...FilterFunc) FilterFunc

All returns a FilterFunc that filters a list of releases determined by the predicate 'f0 && f1 && ... && fn'.

func Any

func Any(filters ...FilterFunc) FilterFunc

Any returns a FilterFunc that filters a list of releases determined by the predicate 'f0 || f1 || ... || fn'.

func StatusFilter

func StatusFilter(status rspb.Status_Code) FilterFunc

StatusFilter filters a set of releases by status code.

func (FilterFunc) Check

func (fn FilterFunc) Check(rls *rspb.Release) bool

Check applies the FilterFunc to the release object.

func (FilterFunc) Filter

func (fn FilterFunc) Filter(rels []*rspb.Release) (rets []*rspb.Release)

Filter applies the filter(s) to the list of provided releases returning the list that satisfies the filtering predicate.

Jump to

Keyboard shortcuts

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