volume.go 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. package types
  2. // This file was generated by the swagger tool.
  3. // Editing this file might prove futile when you re-run the swagger generate command
  4. // Volume volume
  5. // swagger:model Volume
  6. type Volume struct {
  7. // Date/Time the volume was created.
  8. CreatedAt string `json:"CreatedAt,omitempty"`
  9. // Name of the volume driver used by the volume.
  10. // Required: true
  11. Driver string `json:"Driver"`
  12. // User-defined key/value metadata.
  13. // Required: true
  14. Labels map[string]string `json:"Labels"`
  15. // Mount path of the volume on the host.
  16. // Required: true
  17. Mountpoint string `json:"Mountpoint"`
  18. // Name of the volume.
  19. // Required: true
  20. Name string `json:"Name"`
  21. // The driver specific options used when creating the volume.
  22. //
  23. // Required: true
  24. Options map[string]string `json:"Options"`
  25. // The level at which the volume exists. Either `global` for cluster-wide,
  26. // or `local` for machine level.
  27. //
  28. // Required: true
  29. Scope string `json:"Scope"`
  30. // Low-level details about the volume, provided by the volume driver.
  31. // Details are returned as a map with key/value pairs:
  32. // `{"key":"value","key2":"value2"}`.
  33. //
  34. // The `Status` field is optional, and is omitted if the volume driver
  35. // does not support this feature.
  36. //
  37. Status map[string]interface{} `json:"Status,omitempty"`
  38. // usage data
  39. UsageData *VolumeUsageData `json:"UsageData,omitempty"`
  40. }
  41. // VolumeUsageData Usage details about the volume. This information is used by the
  42. // `GET /system/df` endpoint, and omitted in other endpoints.
  43. //
  44. // swagger:model VolumeUsageData
  45. type VolumeUsageData struct {
  46. // The number of containers referencing this volume. This field
  47. // is set to `-1` if the reference-count is not available.
  48. //
  49. // Required: true
  50. RefCount int64 `json:"RefCount"`
  51. // Amount of disk space used by the volume (in bytes). This information
  52. // is only available for volumes created with the `"local"` volume
  53. // driver. For volumes created with other volume drivers, this field
  54. // is set to `-1` ("not available")
  55. //
  56. // Required: true
  57. Size int64 `json:"Size"`
  58. }