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