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