opts.go 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. package image
  2. import "github.com/docker/docker/api/types/filters"
  3. // ImportOptions holds information to import images from the client host.
  4. type ImportOptions struct {
  5. Tag string // Tag is the name to tag this image with. This attribute is deprecated.
  6. Message string // Message is the message to tag the image with
  7. Changes []string // Changes are the raw changes to apply to this image
  8. Platform string // Platform is the target platform of the image
  9. }
  10. // CreateOptions holds information to create images.
  11. type CreateOptions struct {
  12. RegistryAuth string // RegistryAuth is the base64 encoded credentials for the registry.
  13. Platform string // Platform is the target platform of the image if it needs to be pulled from the registry.
  14. }
  15. // PullOptions holds information to pull images.
  16. type PullOptions struct {
  17. All bool
  18. RegistryAuth string // RegistryAuth is the base64 encoded credentials for the registry
  19. // PrivilegeFunc is a function that clients can supply to retry operations
  20. // after getting an authorization error. This function returns the registry
  21. // authentication header value in base64 encoded format, or an error if the
  22. // privilege request fails.
  23. //
  24. // Also see [github.com/docker/docker/api/types.RequestPrivilegeFunc].
  25. PrivilegeFunc func() (string, error)
  26. Platform string
  27. }
  28. // PushOptions holds information to push images.
  29. type PushOptions PullOptions
  30. // ListOptions holds parameters to list images with.
  31. type ListOptions struct {
  32. // All controls whether all images in the graph are filtered, or just
  33. // the heads.
  34. All bool
  35. // Filters is a JSON-encoded set of filter arguments.
  36. Filters filters.Args
  37. // SharedSize indicates whether the shared size of images should be computed.
  38. SharedSize bool
  39. // ContainerCount indicates whether container count should be computed.
  40. ContainerCount bool
  41. }
  42. // RemoveOptions holds parameters to remove images.
  43. type RemoveOptions struct {
  44. Force bool
  45. PruneChildren bool
  46. }