 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DockerState ¶
DockerState will attempt to transform the passed state to a valid docker state valid states are listed in the func IsValidContainerState
func IsValidDockerState ¶
IsValidDockerState will verify the provided state is a valid docker container state
Types ¶
type ContainerListContext ¶
type ContainerListContext struct {
	FilterContext
	// Counter is the container iteration index for this context
	Counter int
	// ExitCode for the passed container
	ExitCode int
	// ContainerListOptions is the filters set by the user
	*types.ContainerListOptions
	// contains filtered or unexported fields
}
    reused from docker/docker/daemon/list.go
func ValidateContainerFilters ¶
func ValidateContainerFilters(options *types.ContainerListOptions, acceptedFilters map[string]bool, unSupportedFilters map[string]bool) (*ContainerListContext, error)
ValidateContainerFilters validates that the container filters are valid docker filters / values and supported by VIC. The function reuses Docker's filter validation.
type FilterAction ¶
type FilterAction int
FilterAction represents possible results during filtering
const ( IncludeAction FilterAction = iota ExcludeAction StopAction )
func IncludeContainer ¶
func IncludeContainer(listContext *ContainerListContext, container *models.ContainerInfo) FilterAction
IncludeContainer will evaluate the filter criteria in listContext against the provided container and determine what action to take. There are three options:
- IncludeAction
- ExcludeAction
- StopAction
func IncludeImage ¶
func IncludeImage(imgFilters filters.Args, listContext *ImageListContext) FilterAction
* IncludeImage will evaluate the filter criteria in filterContext against the provided * image and determine what action to take. There are three options: * * IncludeAction * * ExcludeAction * * StopAction *
func IncludeVolume ¶
func IncludeVolume(volumeFilters filters.Args, volFilterContext *VolumeFilterContext) FilterAction
IncludeVolume evaluates volume filters and the filter context and returns an action to indicate whether to include the volume in the output or not.
type FilterContext ¶
type FilterContext struct {
	// ID of object to filter
	ID string
	// Name of object to filter
	Name string
	// BeforeID is the filter to ignore objects that appear before the one given
	BeforeID *string
	// SinceID is the filter to stop iterating
	SinceID *string
	// Labels of object to filter
	Labels map[string]string
}
    FilterContext will hold the common filter requirements
type ImageListContext ¶
type ImageListContext struct {
	FilterContext
	// Tags for an image filtered by reference
	Tags []string
	// Digests for an image filtered by reference
	Digests []string
}
    func ValidateImageFilters ¶
func ValidateImageFilters(cmdFilters filters.Args, acceptedFilters map[string]bool, unSupportedFilters map[string]bool) (*ImageListContext, error)
* ValidateImageFilters will validate the image filters are * valid docker filters / values and supported by vic. * * The function will reuse dockers filter validation *
type VolumeFilterContext ¶
type VolumeFilterContext struct {
	FilterContext
	// Dangling is the value of the dangling filter if supplied
	Dangling bool
	// Joined tells whether the volume is joined to a container or not
	Joined bool
	// Driver is the volume's driver
	Driver string
}
    VolumeFilterContext stores volume information used while filtering
       Source Files
      ¶
      Source Files
      ¶
    
- container.go
- filter.go
- image.go
- validation.go
- volume.go