backend_unsupported.go 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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(refOrID string) (tp types.Plugin, err error) {
  21. return tp, errNotSupported
  22. }
  23. // Privileges pulls a plugin config and computes the privileges required to install it.
  24. func (pm *Manager) Privileges(name string, metaHeaders http.Header, authConfig *types.AuthConfig) (types.PluginPrivileges, error) {
  25. return nil, errNotSupported
  26. }
  27. // Pull pulls a plugin, check if the correct privileges are provided and install the plugin.
  28. func (pm *Manager) Pull(name string, metaHeader http.Header, authConfig *types.AuthConfig, privileges types.PluginPrivileges) error {
  29. return errNotSupported
  30. }
  31. // List displays the list of plugins and associated metadata.
  32. func (pm *Manager) List() ([]types.Plugin, error) {
  33. return nil, errNotSupported
  34. }
  35. // Push pushes a plugin to the store.
  36. func (pm *Manager) Push(name string, metaHeader http.Header, authConfig *types.AuthConfig) error {
  37. return errNotSupported
  38. }
  39. // Remove deletes plugin's root directory.
  40. func (pm *Manager) Remove(name string, config *types.PluginRmConfig) error {
  41. return errNotSupported
  42. }
  43. // Set sets plugin args
  44. func (pm *Manager) Set(name string, args []string) error {
  45. return errNotSupported
  46. }
  47. // CreateFromContext creates a plugin from the given pluginDir which contains
  48. // both the rootfs and the config.json and a repoName with optional tag.
  49. func (pm *Manager) CreateFromContext(ctx context.Context, tarCtx io.Reader, options *types.PluginCreateOptions) error {
  50. return errNotSupported
  51. }