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