Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
487 lines (437 sloc) 19.1 KB
// Code generated by protoc-gen-go.
// source: dockervolume.proto
// DO NOT EDIT!
package dockervolume
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import _ "github.com/gengo/grpc-gateway/third_party/googleapis/google/api"
import google_protobuf1 "go.pedge.io/pb/go/google/protobuf"
import (
context "golang.org/x/net/context"
grpc "google.golang.org/grpc"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
// Volume represents a volume managed by the dockervolume package.
type Volume struct {
Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
Opts map[string]string `protobuf:"bytes,2,rep,name=opts" json:"opts,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
Mountpoint string `protobuf:"bytes,3,opt,name=mountpoint" json:"mountpoint,omitempty"`
}
func (m *Volume) Reset() { *m = Volume{} }
func (m *Volume) String() string { return proto.CompactTextString(m) }
func (*Volume) ProtoMessage() {}
func (*Volume) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
func (m *Volume) GetOpts() map[string]string {
if m != nil {
return m.Opts
}
return nil
}
// Volumes is the plural of Volume.
type Volumes struct {
Volume []*Volume `protobuf:"bytes,1,rep,name=volume" json:"volume,omitempty"`
}
func (m *Volumes) Reset() { *m = Volumes{} }
func (m *Volumes) String() string { return proto.CompactTextString(m) }
func (*Volumes) ProtoMessage() {}
func (*Volumes) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
func (m *Volumes) GetVolume() []*Volume {
if m != nil {
return m.Volume
}
return nil
}
// NameOptsRequest is a request with a volume name and opts.
type NameOptsRequest struct {
Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
Opts map[string]string `protobuf:"bytes,2,rep,name=opts" json:"opts,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
}
func (m *NameOptsRequest) Reset() { *m = NameOptsRequest{} }
func (m *NameOptsRequest) String() string { return proto.CompactTextString(m) }
func (*NameOptsRequest) ProtoMessage() {}
func (*NameOptsRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
func (m *NameOptsRequest) GetOpts() map[string]string {
if m != nil {
return m.Opts
}
return nil
}
// NameRequest is a request with a volume name.
type NameRequest struct {
Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
}
func (m *NameRequest) Reset() { *m = NameRequest{} }
func (m *NameRequest) String() string { return proto.CompactTextString(m) }
func (*NameRequest) ProtoMessage() {}
func (*NameRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }
// ErrResponse is a response for the docker volume plugin API with a potential error.
type ErrResponse struct {
Err string `protobuf:"bytes,1,opt,name=err" json:"err,omitempty"`
}
func (m *ErrResponse) Reset() { *m = ErrResponse{} }
func (m *ErrResponse) String() string { return proto.CompactTextString(m) }
func (*ErrResponse) ProtoMessage() {}
func (*ErrResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} }
// MountpointErrResponse is a response for the docker volume plugin API with a mountpoint and a potential error.
type MountpointErrResponse struct {
Mountpoint string `protobuf:"bytes,1,opt,name=mountpoint" json:"mountpoint,omitempty"`
Err string `protobuf:"bytes,2,opt,name=err" json:"err,omitempty"`
}
func (m *MountpointErrResponse) Reset() { *m = MountpointErrResponse{} }
func (m *MountpointErrResponse) String() string { return proto.CompactTextString(m) }
func (*MountpointErrResponse) ProtoMessage() {}
func (*MountpointErrResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} }
func init() {
proto.RegisterType((*Volume)(nil), "dockervolume.Volume")
proto.RegisterType((*Volumes)(nil), "dockervolume.Volumes")
proto.RegisterType((*NameOptsRequest)(nil), "dockervolume.NameOptsRequest")
proto.RegisterType((*NameRequest)(nil), "dockervolume.NameRequest")
proto.RegisterType((*ErrResponse)(nil), "dockervolume.ErrResponse")
proto.RegisterType((*MountpointErrResponse)(nil), "dockervolume.MountpointErrResponse")
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion3
// Client API for API service
type APIClient interface {
// Create is the create function call for the docker volume plugin API.
Create(ctx context.Context, in *NameOptsRequest, opts ...grpc.CallOption) (*ErrResponse, error)
// Remove is the remove function call for the docker volume plugin API.
Remove(ctx context.Context, in *NameRequest, opts ...grpc.CallOption) (*ErrResponse, error)
// Path is the path function call for the docker volume plugin API.
Path(ctx context.Context, in *NameRequest, opts ...grpc.CallOption) (*MountpointErrResponse, error)
// Mount is the mount function call for the docker volume plugin API.
Mount(ctx context.Context, in *NameRequest, opts ...grpc.CallOption) (*MountpointErrResponse, error)
// Unmount is the unmount function call for the docker volume plugin API.
Unmount(ctx context.Context, in *NameRequest, opts ...grpc.CallOption) (*ErrResponse, error)
// Cleanup attempts to remove all volumes managed by the API. If any volume
// cannot be removed, for example if it is still attached to a container, this
// function will error. This function returns all volumes that were attempted
// to be removed.
Cleanup(ctx context.Context, in *google_protobuf1.Empty, opts ...grpc.CallOption) (*Volumes, error)
// GetVolume returns the volume managed by the API.
GetVolume(ctx context.Context, in *NameRequest, opts ...grpc.CallOption) (*Volume, error)
// ListVolumes returns all volumes managed by the API.
ListVolumes(ctx context.Context, in *google_protobuf1.Empty, opts ...grpc.CallOption) (*Volumes, error)
}
type aPIClient struct {
cc *grpc.ClientConn
}
func NewAPIClient(cc *grpc.ClientConn) APIClient {
return &aPIClient{cc}
}
func (c *aPIClient) Create(ctx context.Context, in *NameOptsRequest, opts ...grpc.CallOption) (*ErrResponse, error) {
out := new(ErrResponse)
err := grpc.Invoke(ctx, "/dockervolume.API/Create", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *aPIClient) Remove(ctx context.Context, in *NameRequest, opts ...grpc.CallOption) (*ErrResponse, error) {
out := new(ErrResponse)
err := grpc.Invoke(ctx, "/dockervolume.API/Remove", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *aPIClient) Path(ctx context.Context, in *NameRequest, opts ...grpc.CallOption) (*MountpointErrResponse, error) {
out := new(MountpointErrResponse)
err := grpc.Invoke(ctx, "/dockervolume.API/Path", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *aPIClient) Mount(ctx context.Context, in *NameRequest, opts ...grpc.CallOption) (*MountpointErrResponse, error) {
out := new(MountpointErrResponse)
err := grpc.Invoke(ctx, "/dockervolume.API/Mount", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *aPIClient) Unmount(ctx context.Context, in *NameRequest, opts ...grpc.CallOption) (*ErrResponse, error) {
out := new(ErrResponse)
err := grpc.Invoke(ctx, "/dockervolume.API/Unmount", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *aPIClient) Cleanup(ctx context.Context, in *google_protobuf1.Empty, opts ...grpc.CallOption) (*Volumes, error) {
out := new(Volumes)
err := grpc.Invoke(ctx, "/dockervolume.API/Cleanup", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *aPIClient) GetVolume(ctx context.Context, in *NameRequest, opts ...grpc.CallOption) (*Volume, error) {
out := new(Volume)
err := grpc.Invoke(ctx, "/dockervolume.API/GetVolume", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *aPIClient) ListVolumes(ctx context.Context, in *google_protobuf1.Empty, opts ...grpc.CallOption) (*Volumes, error) {
out := new(Volumes)
err := grpc.Invoke(ctx, "/dockervolume.API/ListVolumes", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// Server API for API service
type APIServer interface {
// Create is the create function call for the docker volume plugin API.
Create(context.Context, *NameOptsRequest) (*ErrResponse, error)
// Remove is the remove function call for the docker volume plugin API.
Remove(context.Context, *NameRequest) (*ErrResponse, error)
// Path is the path function call for the docker volume plugin API.
Path(context.Context, *NameRequest) (*MountpointErrResponse, error)
// Mount is the mount function call for the docker volume plugin API.
Mount(context.Context, *NameRequest) (*MountpointErrResponse, error)
// Unmount is the unmount function call for the docker volume plugin API.
Unmount(context.Context, *NameRequest) (*ErrResponse, error)
// Cleanup attempts to remove all volumes managed by the API. If any volume
// cannot be removed, for example if it is still attached to a container, this
// function will error. This function returns all volumes that were attempted
// to be removed.
Cleanup(context.Context, *google_protobuf1.Empty) (*Volumes, error)
// GetVolume returns the volume managed by the API.
GetVolume(context.Context, *NameRequest) (*Volume, error)
// ListVolumes returns all volumes managed by the API.
ListVolumes(context.Context, *google_protobuf1.Empty) (*Volumes, error)
}
func RegisterAPIServer(s *grpc.Server, srv APIServer) {
s.RegisterService(&_API_serviceDesc, srv)
}
func _API_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(NameOptsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(APIServer).Create(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/dockervolume.API/Create",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(APIServer).Create(ctx, req.(*NameOptsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _API_Remove_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(NameRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(APIServer).Remove(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/dockervolume.API/Remove",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(APIServer).Remove(ctx, req.(*NameRequest))
}
return interceptor(ctx, in, info, handler)
}
func _API_Path_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(NameRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(APIServer).Path(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/dockervolume.API/Path",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(APIServer).Path(ctx, req.(*NameRequest))
}
return interceptor(ctx, in, info, handler)
}
func _API_Mount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(NameRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(APIServer).Mount(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/dockervolume.API/Mount",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(APIServer).Mount(ctx, req.(*NameRequest))
}
return interceptor(ctx, in, info, handler)
}
func _API_Unmount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(NameRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(APIServer).Unmount(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/dockervolume.API/Unmount",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(APIServer).Unmount(ctx, req.(*NameRequest))
}
return interceptor(ctx, in, info, handler)
}
func _API_Cleanup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(google_protobuf1.Empty)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(APIServer).Cleanup(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/dockervolume.API/Cleanup",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(APIServer).Cleanup(ctx, req.(*google_protobuf1.Empty))
}
return interceptor(ctx, in, info, handler)
}
func _API_GetVolume_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(NameRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(APIServer).GetVolume(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/dockervolume.API/GetVolume",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(APIServer).GetVolume(ctx, req.(*NameRequest))
}
return interceptor(ctx, in, info, handler)
}
func _API_ListVolumes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(google_protobuf1.Empty)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(APIServer).ListVolumes(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/dockervolume.API/ListVolumes",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(APIServer).ListVolumes(ctx, req.(*google_protobuf1.Empty))
}
return interceptor(ctx, in, info, handler)
}
var _API_serviceDesc = grpc.ServiceDesc{
ServiceName: "dockervolume.API",
HandlerType: (*APIServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Create",
Handler: _API_Create_Handler,
},
{
MethodName: "Remove",
Handler: _API_Remove_Handler,
},
{
MethodName: "Path",
Handler: _API_Path_Handler,
},
{
MethodName: "Mount",
Handler: _API_Mount_Handler,
},
{
MethodName: "Unmount",
Handler: _API_Unmount_Handler,
},
{
MethodName: "Cleanup",
Handler: _API_Cleanup_Handler,
},
{
MethodName: "GetVolume",
Handler: _API_GetVolume_Handler,
},
{
MethodName: "ListVolumes",
Handler: _API_ListVolumes_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: fileDescriptor0,
}
func init() { proto.RegisterFile("dockervolume.proto", fileDescriptor0) }
var fileDescriptor0 = []byte{
// 530 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xa4, 0x94, 0xdd, 0x8a, 0xd3, 0x40,
0x14, 0x80, 0x49, 0x7f, 0x52, 0x7a, 0xba, 0xa8, 0xcc, 0xb6, 0xda, 0x66, 0xdd, 0x6e, 0x1d, 0x2f,
0x5c, 0x44, 0x12, 0xa8, 0x17, 0x2b, 0xeb, 0x95, 0xac, 0x45, 0x16, 0x74, 0x5d, 0x02, 0x0a, 0x5e,
0x49, 0xb6, 0x1e, 0x6b, 0xd8, 0x26, 0x13, 0x27, 0x93, 0x42, 0x11, 0x6f, 0x7c, 0x05, 0x2f, 0x7d,
0x02, 0x9f, 0xc7, 0x57, 0xf0, 0x35, 0x04, 0x33, 0x33, 0x69, 0xe9, 0xd4, 0x10, 0x61, 0xf7, 0x2e,
0x99, 0x39, 0xe7, 0xfb, 0xce, 0x99, 0x61, 0x0e, 0x90, 0x0f, 0x6c, 0x7a, 0x89, 0x7c, 0xc1, 0xe6,
0x59, 0x84, 0x6e, 0xc2, 0x99, 0x60, 0x64, 0x67, 0x73, 0xcd, 0xb9, 0x3b, 0x63, 0x6c, 0x36, 0x47,
0x2f, 0x48, 0x42, 0x2f, 0x88, 0x63, 0x26, 0x02, 0x11, 0xb2, 0x38, 0xd5, 0xb1, 0xce, 0x5e, 0xb1,
0xab, 0xfe, 0x2e, 0xb2, 0x8f, 0x1e, 0x46, 0x89, 0x58, 0xea, 0x4d, 0xfa, 0xd3, 0x02, 0xfb, 0xad,
0xa2, 0x10, 0x02, 0x8d, 0x38, 0x88, 0xb0, 0x6f, 0x8d, 0xac, 0xc3, 0xb6, 0xaf, 0xbe, 0xc9, 0x18,
0x1a, 0x2c, 0x11, 0x69, 0xbf, 0x36, 0xaa, 0x1f, 0x76, 0xc6, 0x43, 0xd7, 0x28, 0x45, 0xe7, 0xb9,
0xa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