github.com/cookieai-jar/moby@v17.12.1-ce-rc2+incompatible/api/server/router/plugin/backend.go (about)

     1  package plugin
     2  
     3  import (
     4  	"io"
     5  	"net/http"
     6  
     7  	"github.com/docker/distribution/reference"
     8  	enginetypes "github.com/docker/docker/api/types"
     9  	"github.com/docker/docker/api/types/filters"
    10  	"github.com/docker/docker/plugin"
    11  	"golang.org/x/net/context"
    12  )
    13  
    14  // Backend for Plugin
    15  type Backend interface {
    16  	Disable(name string, config *enginetypes.PluginDisableConfig) error
    17  	Enable(name string, config *enginetypes.PluginEnableConfig) error
    18  	List(filters.Args) ([]enginetypes.Plugin, error)
    19  	Inspect(name string) (*enginetypes.Plugin, error)
    20  	Remove(name string, config *enginetypes.PluginRmConfig) error
    21  	Set(name string, args []string) error
    22  	Privileges(ctx context.Context, ref reference.Named, metaHeaders http.Header, authConfig *enginetypes.AuthConfig) (enginetypes.PluginPrivileges, error)
    23  	Pull(ctx context.Context, ref reference.Named, name string, metaHeaders http.Header, authConfig *enginetypes.AuthConfig, privileges enginetypes.PluginPrivileges, outStream io.Writer, opts ...plugin.CreateOpt) error
    24  	Push(ctx context.Context, name string, metaHeaders http.Header, authConfig *enginetypes.AuthConfig, outStream io.Writer) error
    25  	Upgrade(ctx context.Context, ref reference.Named, name string, metaHeaders http.Header, authConfig *enginetypes.AuthConfig, privileges enginetypes.PluginPrivileges, outStream io.Writer) error
    26  	CreateFromContext(ctx context.Context, tarCtx io.ReadCloser, options *enginetypes.PluginCreateOptions) error
    27  }