filters

package
v1.4.2-0...-80e9f6f Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2015 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrorBadFormat = errors.New("bad format of filter (expected name=value)")

Functions

func ToParam

func ToParam(a Args) (string, error)

packs the Args into an string for easy transport from client to server

Types

type Args

type Args map[string][]string

func FromParam

func FromParam(p string) (Args, error)

unpacks the filter Args

func ParseFlag

func ParseFlag(arg string, prev Args) (Args, error)

Parse the argument to the filter flag. Like

`docker ps -f 'created=today' -f 'image.name=ubuntu*'`

If prev map is provided, then it is appended to, and returned. By default a new map is created.

func (Args) Match

func (filters Args) Match(field, source string) bool

func (Args) MatchKVList

func (filters Args) MatchKVList(field string, sources map[string]string) bool

Jump to

Keyboard shortcuts

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