backend_unsupported.go 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. // +build !linux
  2. package plugin
  3. import (
  4. "errors"
  5. "io"
  6. "net/http"
  7. "github.com/docker/docker/api/types"
  8. "golang.org/x/net/context"
  9. )
  10. var errNotSupported = errors.New("plugins are not supported on this platform")
  11. // Disable deactivates a plugin, which implies that they cannot be used by containers.
  12. func (pm *Manager) Disable(name string) error {
  13. return errNotSupported
  14. }
  15. // Enable activates a plugin, which implies that they are ready to be used by containers.
  16. func (pm *Manager) Enable(name string, config *types.PluginEnableConfig) error {
  17. return errNotSupported
  18. }
  19. // Inspect examines a plugin config
  20. func (pm *Manager) Inspect(name string) (tp types.Plugin, err error) {
  21. return tp, errNotSupported
  22. }
  23. // Pull pulls a plugin and computes the privileges required to install it.
  24. func (pm *Manager) Pull(name string, metaHeader http.Header, authConfig *types.AuthConfig) (types.PluginPrivileges, error) {
  25. return nil, errNotSupported
  26. }
  27. // List displays the list of plugins and associated metadata.
  28. func (pm *Manager) List() ([]types.Plugin, error) {
  29. return nil, errNotSupported
  30. }
  31. // Push pushes a plugin to the store.
  32. func (pm *Manager) Push(name string, metaHeader http.Header, authConfig *types.AuthConfig) error {
  33. return errNotSupported
  34. }
  35. // Remove deletes plugin's root directory.
  36. func (pm *Manager) Remove(name string, config *types.PluginRmConfig) error {
  37. return errNotSupported
  38. }
  39. // Set sets plugin args
  40. func (pm *Manager) Set(name string, args []string) error {
  41. return errNotSupported
  42. }
  43. // CreateFromContext creates a plugin from the given pluginDir which contains
  44. // both the rootfs and the config.json and a repoName with optional tag.
  45. func (pm *Manager) CreateFromContext(ctx context.Context, tarCtx io.Reader, options *types.PluginCreateOptions) error {
  46. return errNotSupported
  47. }