github.com/moby/docker@v26.1.3+incompatible/api/server/router/plugin/backend.go (about)

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