Add appfilter and tests (#337)

add appfilter and tests
This commit is contained in:
Pedro Nasser
2016-11-24 03:46:42 -02:00
committed by GitHub
parent c307c9375b
commit 01d5a81389
7 changed files with 67 additions and 19 deletions

View File

@@ -31,9 +31,3 @@ var (
ErrDatastoreEmptyApp = errors.New("Missing app")
ErrDatastoreEmptyRoute = errors.New("Missing route")
)
func ApplyRouteFilter(route *Route, filter *RouteFilter) bool {
return (filter.Path == "" || route.Path == filter.Path) &&
(filter.AppName == "" || route.AppName == filter.AppName) &&
(filter.Image == "" || route.Image == filter.Image)
}