github.com/containers/podman/v4@v4.9.4/libpod/define/volume_inspect.go (about)

     1  package define
     2  
     3  import (
     4  	"time"
     5  )
     6  
     7  // InspectVolumeData is the output of Inspect() on a volume. It is matched to
     8  // the format of 'docker volume inspect'.
     9  type InspectVolumeData struct {
    10  	// Name is the name of the volume.
    11  	Name string `json:"Name"`
    12  	// Driver is the driver used to create the volume.
    13  	// If set to "local" or "", the Local driver (Podman built-in code) is
    14  	// used to service the volume; otherwise, a volume plugin with the given
    15  	// name is used to mount and manage the volume.
    16  	Driver string `json:"Driver"`
    17  	// Mountpoint is the path on the host where the volume is mounted.
    18  	Mountpoint string `json:"Mountpoint"`
    19  	// CreatedAt is the date and time the volume was created at. This is not
    20  	// stored for older Libpod volumes; if so, it will be omitted.
    21  	CreatedAt time.Time `json:"CreatedAt,omitempty"`
    22  	// Status is used to return information on the volume's current state,
    23  	// if the volume was created using a volume plugin (uses a Driver that
    24  	// is not the local driver).
    25  	// Status is provided to us by an external program, so no guarantees are
    26  	// made about its format or contents. Further, it is an optional field,
    27  	// so it may not be set even in cases where a volume plugin is in use.
    28  	Status map[string]interface{} `json:"Status,omitempty"`
    29  	// Labels includes the volume's configured labels, key:value pairs that
    30  	// can be passed during volume creation to provide information for third
    31  	// party tools.
    32  	Labels map[string]string `json:"Labels"`
    33  	// Scope is unused and provided solely for Docker compatibility. It is
    34  	// unconditionally set to "local".
    35  	Scope string `json:"Scope"`
    36  	// Options is a set of options that were used when creating the volume.
    37  	// For the Local driver, these are mount options that will be used to
    38  	// determine how a local filesystem is mounted; they are handled as
    39  	// parameters to Mount in a manner described in the volume create
    40  	// manpage.
    41  	// For non-local drivers, these are passed as-is to the volume plugin.
    42  	Options map[string]string `json:"Options"`
    43  	// UID is the UID that the volume was created with.
    44  	UID int `json:"UID,omitempty"`
    45  	// GID is the GID that the volume was created with.
    46  	GID int `json:"GID,omitempty"`
    47  	// Anonymous indicates that the volume was created as an anonymous
    48  	// volume for a specific container, and will be removed when any
    49  	// container using it is removed.
    50  	Anonymous bool `json:"Anonymous,omitempty"`
    51  	// MountCount is the number of times this volume has been mounted.
    52  	MountCount uint `json:"MountCount"`
    53  	// NeedsCopyUp indicates that the next time the volume is mounted into
    54  	NeedsCopyUp bool `json:"NeedsCopyUp,omitempty"`
    55  	// NeedsChown indicates that the next time the volume is mounted into
    56  	// a container, the container will chown the volume to the container process
    57  	// UID/GID.
    58  	NeedsChown bool `json:"NeedsChown,omitempty"`
    59  	// Timeout is the specified driver timeout if given
    60  	Timeout uint `json:"Timeout,omitempty"`
    61  	// StorageID is the ID of the container backing the volume in c/storage.
    62  	// Only used with Image Volumes.
    63  	StorageID string `json:"StorageID,omitempty"`
    64  	// LockNumber is the number of the volume's Libpod lock.
    65  	LockNumber uint32
    66  }
    67  
    68  type VolumeReload struct {
    69  	Added   []string
    70  	Removed []string
    71  	Errors  []error
    72  }