mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-09-25 09:24:16 +00:00
Migrate from github.com/golang/protobuf to google.golang.org/protobuf (#7593)
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
This commit is contained in:
@@ -0,0 +1,329 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.3.0
|
||||
// - protoc v4.25.2
|
||||
// source: VolumeSnapshotter.proto
|
||||
|
||||
package generated
|
||||
|
||||
import (
|
||||
context "context"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
)
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
// Requires gRPC-Go v1.32.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion7
|
||||
|
||||
const (
|
||||
VolumeSnapshotter_Init_FullMethodName = "/generated.VolumeSnapshotter/Init"
|
||||
VolumeSnapshotter_CreateVolumeFromSnapshot_FullMethodName = "/generated.VolumeSnapshotter/CreateVolumeFromSnapshot"
|
||||
VolumeSnapshotter_GetVolumeInfo_FullMethodName = "/generated.VolumeSnapshotter/GetVolumeInfo"
|
||||
VolumeSnapshotter_CreateSnapshot_FullMethodName = "/generated.VolumeSnapshotter/CreateSnapshot"
|
||||
VolumeSnapshotter_DeleteSnapshot_FullMethodName = "/generated.VolumeSnapshotter/DeleteSnapshot"
|
||||
VolumeSnapshotter_GetVolumeID_FullMethodName = "/generated.VolumeSnapshotter/GetVolumeID"
|
||||
VolumeSnapshotter_SetVolumeID_FullMethodName = "/generated.VolumeSnapshotter/SetVolumeID"
|
||||
)
|
||||
|
||||
// VolumeSnapshotterClient is the client API for VolumeSnapshotter service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||
type VolumeSnapshotterClient interface {
|
||||
Init(ctx context.Context, in *VolumeSnapshotterInitRequest, opts ...grpc.CallOption) (*Empty, error)
|
||||
CreateVolumeFromSnapshot(ctx context.Context, in *CreateVolumeRequest, opts ...grpc.CallOption) (*CreateVolumeResponse, error)
|
||||
GetVolumeInfo(ctx context.Context, in *GetVolumeInfoRequest, opts ...grpc.CallOption) (*GetVolumeInfoResponse, error)
|
||||
CreateSnapshot(ctx context.Context, in *CreateSnapshotRequest, opts ...grpc.CallOption) (*CreateSnapshotResponse, error)
|
||||
DeleteSnapshot(ctx context.Context, in *DeleteSnapshotRequest, opts ...grpc.CallOption) (*Empty, error)
|
||||
GetVolumeID(ctx context.Context, in *GetVolumeIDRequest, opts ...grpc.CallOption) (*GetVolumeIDResponse, error)
|
||||
SetVolumeID(ctx context.Context, in *SetVolumeIDRequest, opts ...grpc.CallOption) (*SetVolumeIDResponse, error)
|
||||
}
|
||||
|
||||
type volumeSnapshotterClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewVolumeSnapshotterClient(cc grpc.ClientConnInterface) VolumeSnapshotterClient {
|
||||
return &volumeSnapshotterClient{cc}
|
||||
}
|
||||
|
||||
func (c *volumeSnapshotterClient) Init(ctx context.Context, in *VolumeSnapshotterInitRequest, opts ...grpc.CallOption) (*Empty, error) {
|
||||
out := new(Empty)
|
||||
err := c.cc.Invoke(ctx, VolumeSnapshotter_Init_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *volumeSnapshotterClient) CreateVolumeFromSnapshot(ctx context.Context, in *CreateVolumeRequest, opts ...grpc.CallOption) (*CreateVolumeResponse, error) {
|
||||
out := new(CreateVolumeResponse)
|
||||
err := c.cc.Invoke(ctx, VolumeSnapshotter_CreateVolumeFromSnapshot_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *volumeSnapshotterClient) GetVolumeInfo(ctx context.Context, in *GetVolumeInfoRequest, opts ...grpc.CallOption) (*GetVolumeInfoResponse, error) {
|
||||
out := new(GetVolumeInfoResponse)
|
||||
err := c.cc.Invoke(ctx, VolumeSnapshotter_GetVolumeInfo_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *volumeSnapshotterClient) CreateSnapshot(ctx context.Context, in *CreateSnapshotRequest, opts ...grpc.CallOption) (*CreateSnapshotResponse, error) {
|
||||
out := new(CreateSnapshotResponse)
|
||||
err := c.cc.Invoke(ctx, VolumeSnapshotter_CreateSnapshot_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *volumeSnapshotterClient) DeleteSnapshot(ctx context.Context, in *DeleteSnapshotRequest, opts ...grpc.CallOption) (*Empty, error) {
|
||||
out := new(Empty)
|
||||
err := c.cc.Invoke(ctx, VolumeSnapshotter_DeleteSnapshot_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *volumeSnapshotterClient) GetVolumeID(ctx context.Context, in *GetVolumeIDRequest, opts ...grpc.CallOption) (*GetVolumeIDResponse, error) {
|
||||
out := new(GetVolumeIDResponse)
|
||||
err := c.cc.Invoke(ctx, VolumeSnapshotter_GetVolumeID_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *volumeSnapshotterClient) SetVolumeID(ctx context.Context, in *SetVolumeIDRequest, opts ...grpc.CallOption) (*SetVolumeIDResponse, error) {
|
||||
out := new(SetVolumeIDResponse)
|
||||
err := c.cc.Invoke(ctx, VolumeSnapshotter_SetVolumeID_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// VolumeSnapshotterServer is the server API for VolumeSnapshotter service.
|
||||
// All implementations should embed UnimplementedVolumeSnapshotterServer
|
||||
// for forward compatibility
|
||||
type VolumeSnapshotterServer interface {
|
||||
Init(context.Context, *VolumeSnapshotterInitRequest) (*Empty, error)
|
||||
CreateVolumeFromSnapshot(context.Context, *CreateVolumeRequest) (*CreateVolumeResponse, error)
|
||||
GetVolumeInfo(context.Context, *GetVolumeInfoRequest) (*GetVolumeInfoResponse, error)
|
||||
CreateSnapshot(context.Context, *CreateSnapshotRequest) (*CreateSnapshotResponse, error)
|
||||
DeleteSnapshot(context.Context, *DeleteSnapshotRequest) (*Empty, error)
|
||||
GetVolumeID(context.Context, *GetVolumeIDRequest) (*GetVolumeIDResponse, error)
|
||||
SetVolumeID(context.Context, *SetVolumeIDRequest) (*SetVolumeIDResponse, error)
|
||||
}
|
||||
|
||||
// UnimplementedVolumeSnapshotterServer should be embedded to have forward compatible implementations.
|
||||
type UnimplementedVolumeSnapshotterServer struct {
|
||||
}
|
||||
|
||||
func (UnimplementedVolumeSnapshotterServer) Init(context.Context, *VolumeSnapshotterInitRequest) (*Empty, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Init not implemented")
|
||||
}
|
||||
func (UnimplementedVolumeSnapshotterServer) CreateVolumeFromSnapshot(context.Context, *CreateVolumeRequest) (*CreateVolumeResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method CreateVolumeFromSnapshot not implemented")
|
||||
}
|
||||
func (UnimplementedVolumeSnapshotterServer) GetVolumeInfo(context.Context, *GetVolumeInfoRequest) (*GetVolumeInfoResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetVolumeInfo not implemented")
|
||||
}
|
||||
func (UnimplementedVolumeSnapshotterServer) CreateSnapshot(context.Context, *CreateSnapshotRequest) (*CreateSnapshotResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method CreateSnapshot not implemented")
|
||||
}
|
||||
func (UnimplementedVolumeSnapshotterServer) DeleteSnapshot(context.Context, *DeleteSnapshotRequest) (*Empty, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method DeleteSnapshot not implemented")
|
||||
}
|
||||
func (UnimplementedVolumeSnapshotterServer) GetVolumeID(context.Context, *GetVolumeIDRequest) (*GetVolumeIDResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetVolumeID not implemented")
|
||||
}
|
||||
func (UnimplementedVolumeSnapshotterServer) SetVolumeID(context.Context, *SetVolumeIDRequest) (*SetVolumeIDResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method SetVolumeID not implemented")
|
||||
}
|
||||
|
||||
// UnsafeVolumeSnapshotterServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to VolumeSnapshotterServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeVolumeSnapshotterServer interface {
|
||||
mustEmbedUnimplementedVolumeSnapshotterServer()
|
||||
}
|
||||
|
||||
func RegisterVolumeSnapshotterServer(s grpc.ServiceRegistrar, srv VolumeSnapshotterServer) {
|
||||
s.RegisterService(&VolumeSnapshotter_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _VolumeSnapshotter_Init_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(VolumeSnapshotterInitRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(VolumeSnapshotterServer).Init(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: VolumeSnapshotter_Init_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(VolumeSnapshotterServer).Init(ctx, req.(*VolumeSnapshotterInitRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _VolumeSnapshotter_CreateVolumeFromSnapshot_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(CreateVolumeRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(VolumeSnapshotterServer).CreateVolumeFromSnapshot(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: VolumeSnapshotter_CreateVolumeFromSnapshot_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(VolumeSnapshotterServer).CreateVolumeFromSnapshot(ctx, req.(*CreateVolumeRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _VolumeSnapshotter_GetVolumeInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetVolumeInfoRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(VolumeSnapshotterServer).GetVolumeInfo(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: VolumeSnapshotter_GetVolumeInfo_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(VolumeSnapshotterServer).GetVolumeInfo(ctx, req.(*GetVolumeInfoRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _VolumeSnapshotter_CreateSnapshot_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(CreateSnapshotRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(VolumeSnapshotterServer).CreateSnapshot(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: VolumeSnapshotter_CreateSnapshot_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(VolumeSnapshotterServer).CreateSnapshot(ctx, req.(*CreateSnapshotRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _VolumeSnapshotter_DeleteSnapshot_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(DeleteSnapshotRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(VolumeSnapshotterServer).DeleteSnapshot(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: VolumeSnapshotter_DeleteSnapshot_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(VolumeSnapshotterServer).DeleteSnapshot(ctx, req.(*DeleteSnapshotRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _VolumeSnapshotter_GetVolumeID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetVolumeIDRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(VolumeSnapshotterServer).GetVolumeID(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: VolumeSnapshotter_GetVolumeID_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(VolumeSnapshotterServer).GetVolumeID(ctx, req.(*GetVolumeIDRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _VolumeSnapshotter_SetVolumeID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(SetVolumeIDRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(VolumeSnapshotterServer).SetVolumeID(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: VolumeSnapshotter_SetVolumeID_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(VolumeSnapshotterServer).SetVolumeID(ctx, req.(*SetVolumeIDRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// VolumeSnapshotter_ServiceDesc is the grpc.ServiceDesc for VolumeSnapshotter service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var VolumeSnapshotter_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "generated.VolumeSnapshotter",
|
||||
HandlerType: (*VolumeSnapshotterServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "Init",
|
||||
Handler: _VolumeSnapshotter_Init_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "CreateVolumeFromSnapshot",
|
||||
Handler: _VolumeSnapshotter_CreateVolumeFromSnapshot_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetVolumeInfo",
|
||||
Handler: _VolumeSnapshotter_GetVolumeInfo_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "CreateSnapshot",
|
||||
Handler: _VolumeSnapshotter_CreateSnapshot_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "DeleteSnapshot",
|
||||
Handler: _VolumeSnapshotter_DeleteSnapshot_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetVolumeID",
|
||||
Handler: _VolumeSnapshotter_GetVolumeID_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "SetVolumeID",
|
||||
Handler: _VolumeSnapshotter_SetVolumeID_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "VolumeSnapshotter.proto",
|
||||
}
|
||||
Reference in New Issue
Block a user