github.com/containers/podman/v2@v2.2.2-0.20210501105131-c1e07d070c4c/pkg/domain/entities/system.go (about)

     1  package entities
     2  
     3  import (
     4  	"time"
     5  
     6  	"github.com/containers/podman/v2/libpod/define"
     7  	"github.com/docker/docker/api/types"
     8  	"github.com/spf13/cobra"
     9  )
    10  
    11  // ServiceOptions provides the input for starting an API Service
    12  type ServiceOptions struct {
    13  	URI     string         // Path to unix domain socket service should listen on
    14  	Timeout time.Duration  // duration of inactivity the service should wait before shutting down
    15  	Command *cobra.Command // CLI command provided. Used in V1 code
    16  }
    17  
    18  // SystemPruneOptions provides options to prune system.
    19  type SystemPruneOptions struct {
    20  	All    bool
    21  	Volume bool
    22  }
    23  
    24  // SystemPruneReport provides report after system prune is executed.
    25  type SystemPruneReport struct {
    26  	PodPruneReport []*PodPruneReport
    27  	*ContainerPruneReport
    28  	*ImagePruneReport
    29  	VolumePruneReport []*VolumePruneReport
    30  }
    31  
    32  // SystemMigrateOptions describes the options needed for the
    33  // cli to migrate runtimes of containers
    34  type SystemMigrateOptions struct {
    35  	NewRuntime string
    36  }
    37  
    38  // SystemDfOptions describes the options for getting df information
    39  type SystemDfOptions struct {
    40  	Format  string
    41  	Verbose bool
    42  }
    43  
    44  // SystemDfReport describes the response for df information
    45  type SystemDfReport struct {
    46  	Images     []*SystemDfImageReport
    47  	Containers []*SystemDfContainerReport
    48  	Volumes    []*SystemDfVolumeReport
    49  }
    50  
    51  // SystemDfImageReport describes an image for use with df
    52  type SystemDfImageReport struct {
    53  	Repository string
    54  	Tag        string
    55  	ImageID    string
    56  	Created    time.Time
    57  	Size       int64
    58  	SharedSize int64
    59  	UniqueSize int64
    60  	Containers int
    61  }
    62  
    63  // SystemDfContainerReport describes a container for use with df
    64  type SystemDfContainerReport struct {
    65  	ContainerID  string
    66  	Image        string
    67  	Command      []string
    68  	LocalVolumes int
    69  	Size         int64
    70  	RWSize       int64
    71  	Created      time.Time
    72  	Status       string
    73  	Names        string
    74  }
    75  
    76  // SystemDfVolumeReport describes a volume and its size
    77  type SystemDfVolumeReport struct {
    78  	VolumeName      string
    79  	Links           int
    80  	Size            int64
    81  	ReclaimableSize int64
    82  }
    83  
    84  // SystemResetOptions describes the options for resetting your
    85  // container runtime storage, etc
    86  type SystemResetOptions struct {
    87  	Force bool
    88  }
    89  
    90  // SystemVersionReport describes version information about the running Podman service
    91  type SystemVersionReport struct {
    92  	// Always populated
    93  	Client *define.Version `json:",omitempty"`
    94  	// May be populated, when in tunnel mode
    95  	Server *define.Version `json:",omitempty"`
    96  }
    97  
    98  type ComponentVersion struct {
    99  	types.Version
   100  }
   101  
   102  // ListRegistriesReport is the report when querying for a sorted list of
   103  // registries which may be contacted during certain operations.
   104  type ListRegistriesReport struct {
   105  	Registries []string
   106  }