2016-11-15 17:59:08 -05:00
|
|
|
// +build !linux
|
|
|
|
|
|
|
|
package plugin
|
|
|
|
|
|
|
|
import (
|
|
|
|
"errors"
|
|
|
|
"io"
|
|
|
|
"net/http"
|
|
|
|
|
|
|
|
"github.com/docker/docker/api/types"
|
|
|
|
"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.
|
|
|
|
func (pm *Manager) Disable(name string) 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-06 13:29:48 -05:00
|
|
|
func (pm *Manager) Inspect(refOrID string) (tp types.Plugin, err error) {
|
2016-12-07 10:38:18 -05:00
|
|
|
return tp, 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.
|
|
|
|
func (pm *Manager) Privileges(name string, metaHeaders 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.
|
|
|
|
func (pm *Manager) Pull(name string, metaHeader http.Header, authConfig *types.AuthConfig, privileges types.PluginPrivileges) error {
|
|
|
|
return errNotSupported
|
|
|
|
}
|
|
|
|
|
2016-11-15 17:59:08 -05:00
|
|
|
// List displays the list of plugins and associated metadata.
|
|
|
|
func (pm *Manager) List() ([]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.
|
|
|
|
func (pm *Manager) Push(name string, metaHeader http.Header, authConfig *types.AuthConfig) 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.
|
|
|
|
func (pm *Manager) CreateFromContext(ctx context.Context, tarCtx io.Reader, options *types.PluginCreateOptions) error {
|
2016-11-18 18:57:11 -05:00
|
|
|
return errNotSupported
|
2016-11-15 17:59:08 -05:00
|
|
|
}
|