github.com/lazyboychen7/engine@v17.12.1-ce-rc2+incompatible/plugin/backend_unsupported.go (about)

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