1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Move filters package to the API.

These filters are only use to interchange data between clients and daemons.
They don't belong to the parsers package.

Signed-off-by: David Calavera <david.calavera@gmail.com>
This commit is contained in:
David Calavera 2015-12-15 16:40:11 -05:00
parent 52fd30079a
commit e98cae4919
21 changed files with 21 additions and 20 deletions

View file

@ -9,8 +9,8 @@ import (
"github.com/docker/docker/api/client/lib" "github.com/docker/docker/api/client/lib"
"github.com/docker/docker/api/types" "github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/filters"
"github.com/docker/docker/api/types/registry" "github.com/docker/docker/api/types/registry"
"github.com/docker/docker/pkg/parsers/filters"
"github.com/docker/docker/runconfig" "github.com/docker/docker/runconfig"
) )

View file

@ -2,11 +2,11 @@ package client
import ( import (
"github.com/docker/docker/api/types" "github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/filters"
Cli "github.com/docker/docker/cli" Cli "github.com/docker/docker/cli"
"github.com/docker/docker/opts" "github.com/docker/docker/opts"
"github.com/docker/docker/pkg/jsonmessage" "github.com/docker/docker/pkg/jsonmessage"
flag "github.com/docker/docker/pkg/mflag" flag "github.com/docker/docker/pkg/mflag"
"github.com/docker/docker/pkg/parsers/filters"
) )
// CmdEvents prints a live stream of real time events from the server. // CmdEvents prints a live stream of real time events from the server.

View file

@ -8,10 +8,10 @@ import (
"github.com/docker/distribution/reference" "github.com/docker/distribution/reference"
"github.com/docker/docker/api/types" "github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/filters"
Cli "github.com/docker/docker/cli" Cli "github.com/docker/docker/cli"
"github.com/docker/docker/opts" "github.com/docker/docker/opts"
flag "github.com/docker/docker/pkg/mflag" flag "github.com/docker/docker/pkg/mflag"
"github.com/docker/docker/pkg/parsers/filters"
"github.com/docker/docker/pkg/stringid" "github.com/docker/docker/pkg/stringid"
"github.com/docker/docker/pkg/units" "github.com/docker/docker/pkg/units"
) )

View file

@ -6,7 +6,7 @@ import (
"strconv" "strconv"
"github.com/docker/docker/api/types" "github.com/docker/docker/api/types"
"github.com/docker/docker/pkg/parsers/filters" "github.com/docker/docker/api/types/filters"
) )
// ContainerList returns the list of containers in the docker host. // ContainerList returns the list of containers in the docker host.

View file

@ -6,8 +6,8 @@ import (
"time" "time"
"github.com/docker/docker/api/types" "github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/filters"
timetypes "github.com/docker/docker/api/types/time" timetypes "github.com/docker/docker/api/types/time"
"github.com/docker/docker/pkg/parsers/filters"
) )
// Events returns a stream of events in the daemon in a ReadCloser. // Events returns a stream of events in the daemon in a ReadCloser.

View file

@ -5,7 +5,7 @@ import (
"net/url" "net/url"
"github.com/docker/docker/api/types" "github.com/docker/docker/api/types"
"github.com/docker/docker/pkg/parsers/filters" "github.com/docker/docker/api/types/filters"
) )
// ImageList returns a list of images in the docker host. // ImageList returns a list of images in the docker host.

View file

@ -6,7 +6,7 @@ import (
"net/url" "net/url"
"github.com/docker/docker/api/types" "github.com/docker/docker/api/types"
"github.com/docker/docker/pkg/parsers/filters" "github.com/docker/docker/api/types/filters"
) )
// VolumeList returns the volumes configured in the docker host. // VolumeList returns the volumes configured in the docker host.

View file

@ -3,10 +3,10 @@ package client
import ( import (
"github.com/docker/docker/api/client/ps" "github.com/docker/docker/api/client/ps"
"github.com/docker/docker/api/types" "github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/filters"
Cli "github.com/docker/docker/cli" Cli "github.com/docker/docker/cli"
"github.com/docker/docker/opts" "github.com/docker/docker/opts"
flag "github.com/docker/docker/pkg/mflag" flag "github.com/docker/docker/pkg/mflag"
"github.com/docker/docker/pkg/parsers/filters"
) )
// CmdPs outputs a list of Docker containers. // CmdPs outputs a list of Docker containers.

View file

@ -5,10 +5,10 @@ import (
"text/tabwriter" "text/tabwriter"
"github.com/docker/docker/api/types" "github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/filters"
Cli "github.com/docker/docker/cli" Cli "github.com/docker/docker/cli"
"github.com/docker/docker/opts" "github.com/docker/docker/opts"
flag "github.com/docker/docker/pkg/mflag" flag "github.com/docker/docker/pkg/mflag"
"github.com/docker/docker/pkg/parsers/filters"
) )
// CmdVolume is the parent subcommand for all volume commands // CmdVolume is the parent subcommand for all volume commands

View file

@ -5,8 +5,9 @@ import (
"path/filepath" "path/filepath"
"testing" "testing"
"github.com/docker/docker/api/types"
"os" "os"
"github.com/docker/docker/api/types"
) )
type ports struct { type ports struct {

View file

@ -10,9 +10,9 @@ import (
"github.com/Sirupsen/logrus" "github.com/Sirupsen/logrus"
"github.com/docker/docker/api/server/httputils" "github.com/docker/docker/api/server/httputils"
"github.com/docker/docker/api/types" "github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/filters"
"github.com/docker/docker/api/types/network" "github.com/docker/docker/api/types/network"
"github.com/docker/docker/daemon" "github.com/docker/docker/daemon"
"github.com/docker/docker/pkg/parsers/filters"
"github.com/docker/docker/runconfig" "github.com/docker/docker/runconfig"
"github.com/docker/libnetwork" "github.com/docker/libnetwork"
) )

View file

@ -2,8 +2,8 @@ package system
import ( import (
"github.com/docker/docker/api/types" "github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/filters"
"github.com/docker/docker/pkg/jsonmessage" "github.com/docker/docker/pkg/jsonmessage"
"github.com/docker/docker/pkg/parsers/filters"
) )
// Backend is the methods that need to be implemented to provide // Backend is the methods that need to be implemented to provide

View file

@ -9,10 +9,10 @@ import (
"github.com/docker/docker/api" "github.com/docker/docker/api"
"github.com/docker/docker/api/server/httputils" "github.com/docker/docker/api/server/httputils"
"github.com/docker/docker/api/types" "github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/filters"
timetypes "github.com/docker/docker/api/types/time" timetypes "github.com/docker/docker/api/types/time"
"github.com/docker/docker/pkg/ioutils" "github.com/docker/docker/pkg/ioutils"
"github.com/docker/docker/pkg/jsonmessage" "github.com/docker/docker/pkg/jsonmessage"
"github.com/docker/docker/pkg/parsers/filters"
"golang.org/x/net/context" "golang.org/x/net/context"
) )

View file

@ -5,7 +5,7 @@ import (
"io" "io"
"net" "net"
"github.com/docker/docker/pkg/parsers/filters" "github.com/docker/docker/api/types/filters"
"github.com/docker/docker/pkg/ulimit" "github.com/docker/docker/pkg/ulimit"
"github.com/docker/docker/runconfig" "github.com/docker/docker/runconfig"
) )

View file

@ -22,6 +22,7 @@ import (
"github.com/docker/distribution/reference" "github.com/docker/distribution/reference"
"github.com/docker/docker/api" "github.com/docker/docker/api"
"github.com/docker/docker/api/types" "github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/filters"
registrytypes "github.com/docker/docker/api/types/registry" registrytypes "github.com/docker/docker/api/types/registry"
"github.com/docker/docker/container" "github.com/docker/docker/container"
"github.com/docker/docker/daemon/events" "github.com/docker/docker/daemon/events"
@ -49,7 +50,6 @@ import (
"github.com/docker/docker/pkg/mount" "github.com/docker/docker/pkg/mount"
"github.com/docker/docker/pkg/namesgenerator" "github.com/docker/docker/pkg/namesgenerator"
"github.com/docker/docker/pkg/nat" "github.com/docker/docker/pkg/nat"
"github.com/docker/docker/pkg/parsers/filters"
"github.com/docker/docker/pkg/progress" "github.com/docker/docker/pkg/progress"
"github.com/docker/docker/pkg/signal" "github.com/docker/docker/pkg/signal"
"github.com/docker/docker/pkg/streamformatter" "github.com/docker/docker/pkg/streamformatter"

View file

@ -2,8 +2,8 @@ package events
import ( import (
"github.com/docker/distribution/reference" "github.com/docker/distribution/reference"
"github.com/docker/docker/api/types/filters"
"github.com/docker/docker/pkg/jsonmessage" "github.com/docker/docker/pkg/jsonmessage"
"github.com/docker/docker/pkg/parsers/filters"
) )
// Filter can filter out docker events from a stream // Filter can filter out docker events from a stream

View file

@ -7,9 +7,9 @@ import (
"github.com/docker/distribution/reference" "github.com/docker/distribution/reference"
"github.com/docker/docker/api/types" "github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/filters"
"github.com/docker/docker/image" "github.com/docker/docker/image"
"github.com/docker/docker/layer" "github.com/docker/docker/layer"
"github.com/docker/docker/pkg/parsers/filters"
) )
var acceptedImageFilterTags = map[string]bool{ var acceptedImageFilterTags = map[string]bool{
@ -31,7 +31,7 @@ func (daemon *Daemon) Map() map[image.ID]*image.Image {
} }
// Images returns a filtered list of images. filterArgs is a JSON-encoded set // Images returns a filtered list of images. filterArgs is a JSON-encoded set
// of filter arguments which will be interpreted by pkg/parsers/filters. // of filter arguments which will be interpreted by api/types/filters.
// filter is a shell glob string applied to repository names. The argument // filter is a shell glob string applied to repository names. The argument
// named all controls whether all images in the graph are filtered, or just // named all controls whether all images in the graph are filtered, or just
// the heads. // the heads.

View file

@ -8,11 +8,11 @@ import (
"github.com/Sirupsen/logrus" "github.com/Sirupsen/logrus"
"github.com/docker/docker/api/types" "github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/filters"
"github.com/docker/docker/container" "github.com/docker/docker/container"
"github.com/docker/docker/image" "github.com/docker/docker/image"
"github.com/docker/docker/pkg/graphdb" "github.com/docker/docker/pkg/graphdb"
"github.com/docker/docker/pkg/nat" "github.com/docker/docker/pkg/nat"
"github.com/docker/docker/pkg/parsers/filters"
) )
// iterationAction represents possible outcomes happening during the container iteration. // iterationAction represents possible outcomes happening during the container iteration.

View file

@ -9,9 +9,9 @@ import (
"strings" "strings"
"github.com/docker/docker/api/types" "github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/filters"
"github.com/docker/docker/api/types/network" "github.com/docker/docker/api/types/network"
"github.com/docker/docker/pkg/integration/checker" "github.com/docker/docker/pkg/integration/checker"
"github.com/docker/docker/pkg/parsers/filters"
"github.com/go-check/check" "github.com/go-check/check"
) )