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