github.com/rish1988/moby@v25.0.2+incompatible/plugin/backend_unsupported.go (about)

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