github.com/flavio/docker@v0.1.3-0.20170117145210-f63d1a6eec47/plugin/backend_unsupported.go (about) 1 // +build !linux 2 3 package plugin 4 5 import ( 6 "errors" 7 "io" 8 "net/http" 9 10 "github.com/docker/docker/api/types" 11 "github.com/docker/docker/reference" 12 "golang.org/x/net/context" 13 ) 14 15 var errNotSupported = errors.New("plugins are not supported on this platform") 16 17 // Disable deactivates a plugin, which implies that they cannot be used by containers. 18 func (pm *Manager) Disable(name string, config *types.PluginDisableConfig) error { 19 return errNotSupported 20 } 21 22 // Enable activates a plugin, which implies that they are ready to be used by containers. 23 func (pm *Manager) Enable(name string, config *types.PluginEnableConfig) error { 24 return errNotSupported 25 } 26 27 // Inspect examines a plugin config 28 func (pm *Manager) Inspect(refOrID string) (tp *types.Plugin, err error) { 29 return nil, errNotSupported 30 } 31 32 // Privileges pulls a plugin config and computes the privileges required to install it. 33 func (pm *Manager) Privileges(ctx context.Context, ref reference.Named, metaHeader http.Header, authConfig *types.AuthConfig) (types.PluginPrivileges, error) { 34 return nil, errNotSupported 35 } 36 37 // Pull pulls a plugin, check if the correct privileges are provided and install the plugin. 38 func (pm *Manager) Pull(ctx context.Context, ref reference.Named, name string, metaHeader http.Header, authConfig *types.AuthConfig, privileges types.PluginPrivileges, out io.Writer) error { 39 return errNotSupported 40 } 41 42 // List displays the list of plugins and associated metadata. 43 func (pm *Manager) List() ([]types.Plugin, error) { 44 return nil, errNotSupported 45 } 46 47 // Push pushes a plugin to the store. 48 func (pm *Manager) Push(ctx context.Context, name string, metaHeader http.Header, authConfig *types.AuthConfig, out io.Writer) error { 49 return errNotSupported 50 } 51 52 // Remove deletes plugin's root directory. 53 func (pm *Manager) Remove(name string, config *types.PluginRmConfig) error { 54 return errNotSupported 55 } 56 57 // Set sets plugin args 58 func (pm *Manager) Set(name string, args []string) error { 59 return errNotSupported 60 } 61 62 // CreateFromContext creates a plugin from the given pluginDir which contains 63 // both the rootfs and the config.json and a repoName with optional tag. 64 func (pm *Manager) CreateFromContext(ctx context.Context, tarCtx io.ReadCloser, options *types.PluginCreateOptions) error { 65 return errNotSupported 66 }