2018-02-05 21:05:59 +00:00
|
|
|
package plugin // import "github.com/docker/docker/api/server/router/plugin"
|
2016-05-16 15:50:55 +00:00
|
|
|
|
|
|
|
import (
|
2016-10-04 19:01:19 +00:00
|
|
|
"io"
|
2016-05-16 15:50:55 +00:00
|
|
|
"net/http"
|
|
|
|
|
2017-01-26 00:54:18 +00:00
|
|
|
"github.com/docker/distribution/reference"
|
2016-09-06 18:46:37 +00:00
|
|
|
enginetypes "github.com/docker/docker/api/types"
|
2016-11-23 12:58:15 +00:00
|
|
|
"github.com/docker/docker/api/types/filters"
|
2017-06-07 17:07:01 +00:00
|
|
|
"github.com/docker/docker/plugin"
|
2016-10-04 19:01:19 +00:00
|
|
|
"golang.org/x/net/context"
|
2016-05-16 15:50:55 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
// Backend for Plugin
|
|
|
|
type Backend interface {
|
2016-12-20 16:26:58 +00:00
|
|
|
Disable(name string, config *enginetypes.PluginDisableConfig) error
|
2016-11-21 17:24:01 +00:00
|
|
|
Enable(name string, config *enginetypes.PluginEnableConfig) error
|
2016-11-23 12:58:15 +00:00
|
|
|
List(filters.Args) ([]enginetypes.Plugin, error)
|
2016-12-12 23:05:53 +00:00
|
|
|
Inspect(name string) (*enginetypes.Plugin, error)
|
2016-07-22 15:24:54 +00:00
|
|
|
Remove(name string, config *enginetypes.PluginRmConfig) error
|
2016-05-16 15:50:55 +00:00
|
|
|
Set(name string, args []string) error
|
2016-12-12 23:05:53 +00:00
|
|
|
Privileges(ctx context.Context, ref reference.Named, metaHeaders http.Header, authConfig *enginetypes.AuthConfig) (enginetypes.PluginPrivileges, error)
|
2017-06-07 17:07:01 +00:00
|
|
|
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
|
2016-12-12 23:05:53 +00:00
|
|
|
Push(ctx context.Context, name string, metaHeaders http.Header, authConfig *enginetypes.AuthConfig, outStream io.Writer) error
|
2017-01-29 00:54:32 +00:00
|
|
|
Upgrade(ctx context.Context, ref reference.Named, name string, metaHeaders http.Header, authConfig *enginetypes.AuthConfig, privileges enginetypes.PluginPrivileges, outStream io.Writer) error
|
2016-12-12 23:05:53 +00:00
|
|
|
CreateFromContext(ctx context.Context, tarCtx io.ReadCloser, options *enginetypes.PluginCreateOptions) error
|
2016-05-16 15:50:55 +00:00
|
|
|
}
|