github.com/zhuohuang-hust/src-cbuild@v0.0.0-20230105071821-c7aab3e7c840/api/server/router/plugin/backend.go (about)

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