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