2021-08-23 13:14:53 +00:00
|
|
|
//go:build !linux
|
2016-11-15 22:59:08 +00:00
|
|
|
// +build !linux
|
|
|
|
|
2018-02-05 21:05:59 +00:00
|
|
|
package plugin // import "github.com/docker/docker/plugin"
|
2016-11-15 22:59:08 +00:00
|
|
|
|
|
|
|
import (
|
2018-04-19 22:30:59 +00:00
|
|
|
"context"
|
2016-11-15 22:59:08 +00:00
|
|
|
"errors"
|
|
|
|
"io"
|
|
|
|
"net/http"
|
|
|
|
|
2017-01-26 00:54:18 +00:00
|
|
|
"github.com/docker/distribution/reference"
|
2016-11-15 22:59:08 +00:00
|
|
|
"github.com/docker/docker/api/types"
|
2016-11-23 12:58:15 +00:00
|
|
|
"github.com/docker/docker/api/types/filters"
|
2016-11-15 22:59:08 +00:00
|
|
|
)
|
|
|
|
|
2016-11-18 23:57:11 +00:00
|
|
|
var errNotSupported = errors.New("plugins are not supported on this platform")
|
2016-11-15 22:59:08 +00:00
|
|
|
|
|
|
|
// Disable deactivates a plugin, which implies that they cannot be used by containers.
|
2016-12-20 16:26:58 +00:00
|
|
|
func (pm *Manager) Disable(name string, config *types.PluginDisableConfig) error {
|
2016-11-18 23:57:11 +00:00
|
|
|
return errNotSupported
|
2016-11-15 22:59:08 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// Enable activates a plugin, which implies that they are ready to be used by containers.
|
2016-11-21 17:24:01 +00:00
|
|
|
func (pm *Manager) Enable(name string, config *types.PluginEnableConfig) error {
|
2016-11-18 23:57:11 +00:00
|
|
|
return errNotSupported
|
2016-11-15 22:59:08 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// Inspect examines a plugin config
|
2016-12-12 23:05:53 +00:00
|
|
|
func (pm *Manager) Inspect(refOrID string) (tp *types.Plugin, err error) {
|
|
|
|
return nil, errNotSupported
|
2016-11-15 22:59:08 +00:00
|
|
|
}
|
|
|
|
|
2016-11-24 01:29:21 +00:00
|
|
|
// Privileges pulls a plugin config and computes the privileges required to install it.
|
2016-12-12 23:05:53 +00:00
|
|
|
func (pm *Manager) Privileges(ctx context.Context, ref reference.Named, metaHeader http.Header, authConfig *types.AuthConfig) (types.PluginPrivileges, error) {
|
2016-11-18 23:57:11 +00:00
|
|
|
return nil, errNotSupported
|
2016-11-15 22:59:08 +00:00
|
|
|
}
|
|
|
|
|
2016-11-24 01:29:21 +00:00
|
|
|
// Pull pulls a plugin, check if the correct privileges are provided and install the plugin.
|
2017-06-07 17:07:01 +00:00
|
|
|
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 {
|
2016-11-24 01:29:21 +00:00
|
|
|
return errNotSupported
|
|
|
|
}
|
|
|
|
|
2017-01-29 00:54:32 +00:00
|
|
|
// Upgrade pulls a plugin, check if the correct privileges are provided and install the plugin.
|
|
|
|
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 {
|
|
|
|
return errNotSupported
|
|
|
|
}
|
|
|
|
|
2016-11-15 22:59:08 +00:00
|
|
|
// List displays the list of plugins and associated metadata.
|
2016-11-23 12:58:15 +00:00
|
|
|
func (pm *Manager) List(pluginFilters filters.Args) ([]types.Plugin, error) {
|
2016-11-18 23:57:11 +00:00
|
|
|
return nil, errNotSupported
|
2016-11-15 22:59:08 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// Push pushes a plugin to the store.
|
2016-12-12 23:05:53 +00:00
|
|
|
func (pm *Manager) Push(ctx context.Context, name string, metaHeader http.Header, authConfig *types.AuthConfig, out io.Writer) error {
|
2016-11-18 23:57:11 +00:00
|
|
|
return errNotSupported
|
2016-11-15 22:59:08 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// Remove deletes plugin's root directory.
|
|
|
|
func (pm *Manager) Remove(name string, config *types.PluginRmConfig) error {
|
2016-11-18 23:57:11 +00:00
|
|
|
return errNotSupported
|
2016-11-15 22:59:08 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// Set sets plugin args
|
|
|
|
func (pm *Manager) Set(name string, args []string) error {
|
2016-11-18 23:57:11 +00:00
|
|
|
return errNotSupported
|
2016-11-15 22:59:08 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// CreateFromContext creates a plugin from the given pluginDir which contains
|
|
|
|
// both the rootfs and the config.json and a repoName with optional tag.
|
2016-12-12 23:05:53 +00:00
|
|
|
func (pm *Manager) CreateFromContext(ctx context.Context, tarCtx io.ReadCloser, options *types.PluginCreateOptions) error {
|
2016-11-18 23:57:11 +00:00
|
|
|
return errNotSupported
|
2016-11-15 22:59:08 +00:00
|
|
|
}
|