Migrate from github.com/golang/protobuf to google.golang.org/protobuf (#7593)
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>pull/8023/head
parent
35c90f1672
commit
c69f47d5d2
|
@ -330,9 +330,6 @@ linters:
|
|||
|
||||
issues:
|
||||
exclude-rules:
|
||||
- linters:
|
||||
- staticcheck
|
||||
text: "github.com/golang/protobuf/proto" # grpc-go still uses github.com/golang/protobuf/proto.
|
||||
- linters:
|
||||
- staticcheck
|
||||
text: "DefaultVolumesToRestic" # No need to report deprecate for DefaultVolumesToRestic.
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
Migrate from github.com/golang/protobuf to google.golang.org/protobuf
|
2
go.mod
2
go.mod
|
@ -20,7 +20,6 @@ require (
|
|||
github.com/evanphx/json-patch/v5 v5.8.0
|
||||
github.com/fatih/color v1.16.0
|
||||
github.com/gobwas/glob v0.2.3
|
||||
github.com/golang/protobuf v1.5.4
|
||||
github.com/google/go-cmp v0.6.0
|
||||
github.com/google/uuid v1.6.0
|
||||
github.com/hashicorp/go-hclog v0.14.1
|
||||
|
@ -104,6 +103,7 @@ require (
|
|||
github.com/gogo/protobuf v1.3.2 // indirect
|
||||
github.com/golang-jwt/jwt/v5 v5.2.1 // indirect
|
||||
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
|
||||
github.com/golang/protobuf v1.5.4 // indirect
|
||||
github.com/google/gnostic-models v0.6.8 // indirect
|
||||
github.com/google/gofuzz v1.2.0 // indirect
|
||||
github.com/google/s2a-go v0.1.7 // indirect
|
||||
|
|
|
@ -69,7 +69,8 @@ RUN ARCH=$(go env GOARCH) && \
|
|||
chmod a+x /usr/include/google/protobuf && \
|
||||
chmod a+r -R /usr/include/google && \
|
||||
chmod +x /usr/bin/protoc
|
||||
RUN go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.32.0
|
||||
RUN go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.33.0 \
|
||||
&& go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.3.0
|
||||
|
||||
# get goreleaser
|
||||
# goreleaser name template per arch is basically goarch except for amd64 and 386 https://github.com/goreleaser/goreleaser/blob/ec8819a95c5527fae65e5cb41673f5bbc3245fda/.goreleaser.yaml#L167C1-L173C42
|
||||
|
|
|
@ -19,6 +19,14 @@ HACK_DIR=$(dirname "${BASH_SOURCE}")
|
|||
echo "Updating plugin proto"
|
||||
|
||||
echo protoc --version
|
||||
protoc pkg/plugin/proto/*.proto pkg/plugin/proto/*/*/*.proto --go_out=plugins=grpc:pkg/plugin/generated/ --go_opt=module=github.com/vmware-tanzu/velero/pkg/plugin/generated -I pkg/plugin/proto/ -I /usr/include
|
||||
protoc \
|
||||
-I pkg/plugin/proto/ \
|
||||
-I /usr/include \
|
||||
--go_out=pkg/plugin/generated/ \
|
||||
--go_opt=module=github.com/vmware-tanzu/velero/pkg/plugin/generated \
|
||||
--go-grpc_out=pkg/plugin/generated \
|
||||
--go-grpc_opt=paths=source_relative \
|
||||
--go-grpc_opt=require_unimplemented_servers=false \
|
||||
$(find pkg/plugin/proto -name '*.proto')
|
||||
|
||||
echo "Updating plugin proto - done!"
|
||||
|
|
|
@ -17,10 +17,10 @@ limitations under the License.
|
|||
package common
|
||||
|
||||
import (
|
||||
goproto "github.com/golang/protobuf/proto"
|
||||
"github.com/pkg/errors"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/status"
|
||||
"google.golang.org/protobuf/protoadapt"
|
||||
|
||||
proto "github.com/vmware-tanzu/velero/pkg/plugin/generated"
|
||||
"github.com/vmware-tanzu/velero/pkg/util/logging"
|
||||
|
@ -32,7 +32,7 @@ import (
|
|||
//
|
||||
// This function should be used in the internal plugin server code to wrap
|
||||
// all errors before they're returned.
|
||||
func NewGRPCErrorWithCode(err error, code codes.Code, details ...goproto.Message) error {
|
||||
func NewGRPCErrorWithCode(err error, code codes.Code, details ...protoadapt.MessageV1) error {
|
||||
// if it's already a gRPC status error, use it; otherwise, create a new one
|
||||
statusErr, ok := status.FromError(err)
|
||||
if !ok {
|
||||
|
@ -54,7 +54,7 @@ func NewGRPCErrorWithCode(err error, code codes.Code, details ...goproto.Message
|
|||
|
||||
// NewGRPCError is a convenience function for creating a new gRPC error
|
||||
// with code = codes.Unknown
|
||||
func NewGRPCError(err error, details ...goproto.Message) error {
|
||||
func NewGRPCError(err error, details ...protoadapt.MessageV1) error {
|
||||
return NewGRPCErrorWithCode(err, codes.Unknown, details...)
|
||||
}
|
||||
|
||||
|
|
|
@ -1,17 +1,12 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.23.0
|
||||
// protoc v3.14.0
|
||||
// protoc-gen-go v1.33.0
|
||||
// protoc v4.25.2
|
||||
// source: BackupItemAction.proto
|
||||
|
||||
package generated
|
||||
|
||||
import (
|
||||
context "context"
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
|
@ -25,10 +20,6 @@ const (
|
|||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
// This is a compile-time assertion that a sufficiently up-to-date version
|
||||
// of the legacy proto package is being used.
|
||||
const _ = proto.ProtoPackageIsVersion4
|
||||
|
||||
type ExecuteRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
|
@ -398,119 +389,3 @@ func file_BackupItemAction_proto_init() {
|
|||
file_BackupItemAction_proto_goTypes = nil
|
||||
file_BackupItemAction_proto_depIdxs = nil
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ context.Context
|
||||
var _ grpc.ClientConnInterface
|
||||
|
||||
// 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.SupportPackageIsVersion6
|
||||
|
||||
// BackupItemActionClient is the client API for BackupItemAction service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
||||
type BackupItemActionClient interface {
|
||||
AppliesTo(ctx context.Context, in *BackupItemActionAppliesToRequest, opts ...grpc.CallOption) (*BackupItemActionAppliesToResponse, error)
|
||||
Execute(ctx context.Context, in *ExecuteRequest, opts ...grpc.CallOption) (*ExecuteResponse, error)
|
||||
}
|
||||
|
||||
type backupItemActionClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewBackupItemActionClient(cc grpc.ClientConnInterface) BackupItemActionClient {
|
||||
return &backupItemActionClient{cc}
|
||||
}
|
||||
|
||||
func (c *backupItemActionClient) AppliesTo(ctx context.Context, in *BackupItemActionAppliesToRequest, opts ...grpc.CallOption) (*BackupItemActionAppliesToResponse, error) {
|
||||
out := new(BackupItemActionAppliesToResponse)
|
||||
err := c.cc.Invoke(ctx, "/generated.BackupItemAction/AppliesTo", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *backupItemActionClient) Execute(ctx context.Context, in *ExecuteRequest, opts ...grpc.CallOption) (*ExecuteResponse, error) {
|
||||
out := new(ExecuteResponse)
|
||||
err := c.cc.Invoke(ctx, "/generated.BackupItemAction/Execute", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// BackupItemActionServer is the server API for BackupItemAction service.
|
||||
type BackupItemActionServer interface {
|
||||
AppliesTo(context.Context, *BackupItemActionAppliesToRequest) (*BackupItemActionAppliesToResponse, error)
|
||||
Execute(context.Context, *ExecuteRequest) (*ExecuteResponse, error)
|
||||
}
|
||||
|
||||
// UnimplementedBackupItemActionServer can be embedded to have forward compatible implementations.
|
||||
type UnimplementedBackupItemActionServer struct {
|
||||
}
|
||||
|
||||
func (*UnimplementedBackupItemActionServer) AppliesTo(context.Context, *BackupItemActionAppliesToRequest) (*BackupItemActionAppliesToResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method AppliesTo not implemented")
|
||||
}
|
||||
func (*UnimplementedBackupItemActionServer) Execute(context.Context, *ExecuteRequest) (*ExecuteResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Execute not implemented")
|
||||
}
|
||||
|
||||
func RegisterBackupItemActionServer(s *grpc.Server, srv BackupItemActionServer) {
|
||||
s.RegisterService(&_BackupItemAction_serviceDesc, srv)
|
||||
}
|
||||
|
||||
func _BackupItemAction_AppliesTo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(BackupItemActionAppliesToRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(BackupItemActionServer).AppliesTo(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/generated.BackupItemAction/AppliesTo",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(BackupItemActionServer).AppliesTo(ctx, req.(*BackupItemActionAppliesToRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _BackupItemAction_Execute_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ExecuteRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(BackupItemActionServer).Execute(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/generated.BackupItemAction/Execute",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(BackupItemActionServer).Execute(ctx, req.(*ExecuteRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
var _BackupItemAction_serviceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "generated.BackupItemAction",
|
||||
HandlerType: (*BackupItemActionServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "AppliesTo",
|
||||
Handler: _BackupItemAction_AppliesTo_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Execute",
|
||||
Handler: _BackupItemAction_Execute_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "BackupItemAction.proto",
|
||||
}
|
||||
|
|
|
@ -0,0 +1,144 @@
|
|||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.3.0
|
||||
// - protoc v4.25.2
|
||||
// source: BackupItemAction.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 (
|
||||
BackupItemAction_AppliesTo_FullMethodName = "/generated.BackupItemAction/AppliesTo"
|
||||
BackupItemAction_Execute_FullMethodName = "/generated.BackupItemAction/Execute"
|
||||
)
|
||||
|
||||
// BackupItemActionClient is the client API for BackupItemAction 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 BackupItemActionClient interface {
|
||||
AppliesTo(ctx context.Context, in *BackupItemActionAppliesToRequest, opts ...grpc.CallOption) (*BackupItemActionAppliesToResponse, error)
|
||||
Execute(ctx context.Context, in *ExecuteRequest, opts ...grpc.CallOption) (*ExecuteResponse, error)
|
||||
}
|
||||
|
||||
type backupItemActionClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewBackupItemActionClient(cc grpc.ClientConnInterface) BackupItemActionClient {
|
||||
return &backupItemActionClient{cc}
|
||||
}
|
||||
|
||||
func (c *backupItemActionClient) AppliesTo(ctx context.Context, in *BackupItemActionAppliesToRequest, opts ...grpc.CallOption) (*BackupItemActionAppliesToResponse, error) {
|
||||
out := new(BackupItemActionAppliesToResponse)
|
||||
err := c.cc.Invoke(ctx, BackupItemAction_AppliesTo_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *backupItemActionClient) Execute(ctx context.Context, in *ExecuteRequest, opts ...grpc.CallOption) (*ExecuteResponse, error) {
|
||||
out := new(ExecuteResponse)
|
||||
err := c.cc.Invoke(ctx, BackupItemAction_Execute_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// BackupItemActionServer is the server API for BackupItemAction service.
|
||||
// All implementations should embed UnimplementedBackupItemActionServer
|
||||
// for forward compatibility
|
||||
type BackupItemActionServer interface {
|
||||
AppliesTo(context.Context, *BackupItemActionAppliesToRequest) (*BackupItemActionAppliesToResponse, error)
|
||||
Execute(context.Context, *ExecuteRequest) (*ExecuteResponse, error)
|
||||
}
|
||||
|
||||
// UnimplementedBackupItemActionServer should be embedded to have forward compatible implementations.
|
||||
type UnimplementedBackupItemActionServer struct {
|
||||
}
|
||||
|
||||
func (UnimplementedBackupItemActionServer) AppliesTo(context.Context, *BackupItemActionAppliesToRequest) (*BackupItemActionAppliesToResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method AppliesTo not implemented")
|
||||
}
|
||||
func (UnimplementedBackupItemActionServer) Execute(context.Context, *ExecuteRequest) (*ExecuteResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Execute not implemented")
|
||||
}
|
||||
|
||||
// UnsafeBackupItemActionServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to BackupItemActionServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeBackupItemActionServer interface {
|
||||
mustEmbedUnimplementedBackupItemActionServer()
|
||||
}
|
||||
|
||||
func RegisterBackupItemActionServer(s grpc.ServiceRegistrar, srv BackupItemActionServer) {
|
||||
s.RegisterService(&BackupItemAction_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _BackupItemAction_AppliesTo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(BackupItemActionAppliesToRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(BackupItemActionServer).AppliesTo(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: BackupItemAction_AppliesTo_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(BackupItemActionServer).AppliesTo(ctx, req.(*BackupItemActionAppliesToRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _BackupItemAction_Execute_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ExecuteRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(BackupItemActionServer).Execute(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: BackupItemAction_Execute_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(BackupItemActionServer).Execute(ctx, req.(*ExecuteRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// BackupItemAction_ServiceDesc is the grpc.ServiceDesc for BackupItemAction service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var BackupItemAction_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "generated.BackupItemAction",
|
||||
HandlerType: (*BackupItemActionServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "AppliesTo",
|
||||
Handler: _BackupItemAction_AppliesTo_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Execute",
|
||||
Handler: _BackupItemAction_Execute_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "BackupItemAction.proto",
|
||||
}
|
|
@ -1,17 +1,12 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.23.0
|
||||
// protoc v3.14.0
|
||||
// protoc-gen-go v1.33.0
|
||||
// protoc v4.25.2
|
||||
// source: DeleteItemAction.proto
|
||||
|
||||
package generated
|
||||
|
||||
import (
|
||||
context "context"
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
|
@ -25,10 +20,6 @@ const (
|
|||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
// This is a compile-time assertion that a sufficiently up-to-date version
|
||||
// of the legacy proto package is being used.
|
||||
const _ = proto.ProtoPackageIsVersion4
|
||||
|
||||
type DeleteItemActionExecuteRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
|
@ -324,119 +315,3 @@ func file_DeleteItemAction_proto_init() {
|
|||
file_DeleteItemAction_proto_goTypes = nil
|
||||
file_DeleteItemAction_proto_depIdxs = nil
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ context.Context
|
||||
var _ grpc.ClientConnInterface
|
||||
|
||||
// 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.SupportPackageIsVersion6
|
||||
|
||||
// DeleteItemActionClient is the client API for DeleteItemAction service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
||||
type DeleteItemActionClient interface {
|
||||
AppliesTo(ctx context.Context, in *DeleteItemActionAppliesToRequest, opts ...grpc.CallOption) (*DeleteItemActionAppliesToResponse, error)
|
||||
Execute(ctx context.Context, in *DeleteItemActionExecuteRequest, opts ...grpc.CallOption) (*Empty, error)
|
||||
}
|
||||
|
||||
type deleteItemActionClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewDeleteItemActionClient(cc grpc.ClientConnInterface) DeleteItemActionClient {
|
||||
return &deleteItemActionClient{cc}
|
||||
}
|
||||
|
||||
func (c *deleteItemActionClient) AppliesTo(ctx context.Context, in *DeleteItemActionAppliesToRequest, opts ...grpc.CallOption) (*DeleteItemActionAppliesToResponse, error) {
|
||||
out := new(DeleteItemActionAppliesToResponse)
|
||||
err := c.cc.Invoke(ctx, "/generated.DeleteItemAction/AppliesTo", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *deleteItemActionClient) Execute(ctx context.Context, in *DeleteItemActionExecuteRequest, opts ...grpc.CallOption) (*Empty, error) {
|
||||
out := new(Empty)
|
||||
err := c.cc.Invoke(ctx, "/generated.DeleteItemAction/Execute", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// DeleteItemActionServer is the server API for DeleteItemAction service.
|
||||
type DeleteItemActionServer interface {
|
||||
AppliesTo(context.Context, *DeleteItemActionAppliesToRequest) (*DeleteItemActionAppliesToResponse, error)
|
||||
Execute(context.Context, *DeleteItemActionExecuteRequest) (*Empty, error)
|
||||
}
|
||||
|
||||
// UnimplementedDeleteItemActionServer can be embedded to have forward compatible implementations.
|
||||
type UnimplementedDeleteItemActionServer struct {
|
||||
}
|
||||
|
||||
func (*UnimplementedDeleteItemActionServer) AppliesTo(context.Context, *DeleteItemActionAppliesToRequest) (*DeleteItemActionAppliesToResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method AppliesTo not implemented")
|
||||
}
|
||||
func (*UnimplementedDeleteItemActionServer) Execute(context.Context, *DeleteItemActionExecuteRequest) (*Empty, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Execute not implemented")
|
||||
}
|
||||
|
||||
func RegisterDeleteItemActionServer(s *grpc.Server, srv DeleteItemActionServer) {
|
||||
s.RegisterService(&_DeleteItemAction_serviceDesc, srv)
|
||||
}
|
||||
|
||||
func _DeleteItemAction_AppliesTo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(DeleteItemActionAppliesToRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(DeleteItemActionServer).AppliesTo(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/generated.DeleteItemAction/AppliesTo",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(DeleteItemActionServer).AppliesTo(ctx, req.(*DeleteItemActionAppliesToRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _DeleteItemAction_Execute_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(DeleteItemActionExecuteRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(DeleteItemActionServer).Execute(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/generated.DeleteItemAction/Execute",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(DeleteItemActionServer).Execute(ctx, req.(*DeleteItemActionExecuteRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
var _DeleteItemAction_serviceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "generated.DeleteItemAction",
|
||||
HandlerType: (*DeleteItemActionServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "AppliesTo",
|
||||
Handler: _DeleteItemAction_AppliesTo_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Execute",
|
||||
Handler: _DeleteItemAction_Execute_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "DeleteItemAction.proto",
|
||||
}
|
||||
|
|
|
@ -0,0 +1,144 @@
|
|||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.3.0
|
||||
// - protoc v4.25.2
|
||||
// source: DeleteItemAction.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 (
|
||||
DeleteItemAction_AppliesTo_FullMethodName = "/generated.DeleteItemAction/AppliesTo"
|
||||
DeleteItemAction_Execute_FullMethodName = "/generated.DeleteItemAction/Execute"
|
||||
)
|
||||
|
||||
// DeleteItemActionClient is the client API for DeleteItemAction 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 DeleteItemActionClient interface {
|
||||
AppliesTo(ctx context.Context, in *DeleteItemActionAppliesToRequest, opts ...grpc.CallOption) (*DeleteItemActionAppliesToResponse, error)
|
||||
Execute(ctx context.Context, in *DeleteItemActionExecuteRequest, opts ...grpc.CallOption) (*Empty, error)
|
||||
}
|
||||
|
||||
type deleteItemActionClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewDeleteItemActionClient(cc grpc.ClientConnInterface) DeleteItemActionClient {
|
||||
return &deleteItemActionClient{cc}
|
||||
}
|
||||
|
||||
func (c *deleteItemActionClient) AppliesTo(ctx context.Context, in *DeleteItemActionAppliesToRequest, opts ...grpc.CallOption) (*DeleteItemActionAppliesToResponse, error) {
|
||||
out := new(DeleteItemActionAppliesToResponse)
|
||||
err := c.cc.Invoke(ctx, DeleteItemAction_AppliesTo_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *deleteItemActionClient) Execute(ctx context.Context, in *DeleteItemActionExecuteRequest, opts ...grpc.CallOption) (*Empty, error) {
|
||||
out := new(Empty)
|
||||
err := c.cc.Invoke(ctx, DeleteItemAction_Execute_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// DeleteItemActionServer is the server API for DeleteItemAction service.
|
||||
// All implementations should embed UnimplementedDeleteItemActionServer
|
||||
// for forward compatibility
|
||||
type DeleteItemActionServer interface {
|
||||
AppliesTo(context.Context, *DeleteItemActionAppliesToRequest) (*DeleteItemActionAppliesToResponse, error)
|
||||
Execute(context.Context, *DeleteItemActionExecuteRequest) (*Empty, error)
|
||||
}
|
||||
|
||||
// UnimplementedDeleteItemActionServer should be embedded to have forward compatible implementations.
|
||||
type UnimplementedDeleteItemActionServer struct {
|
||||
}
|
||||
|
||||
func (UnimplementedDeleteItemActionServer) AppliesTo(context.Context, *DeleteItemActionAppliesToRequest) (*DeleteItemActionAppliesToResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method AppliesTo not implemented")
|
||||
}
|
||||
func (UnimplementedDeleteItemActionServer) Execute(context.Context, *DeleteItemActionExecuteRequest) (*Empty, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Execute not implemented")
|
||||
}
|
||||
|
||||
// UnsafeDeleteItemActionServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to DeleteItemActionServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeDeleteItemActionServer interface {
|
||||
mustEmbedUnimplementedDeleteItemActionServer()
|
||||
}
|
||||
|
||||
func RegisterDeleteItemActionServer(s grpc.ServiceRegistrar, srv DeleteItemActionServer) {
|
||||
s.RegisterService(&DeleteItemAction_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _DeleteItemAction_AppliesTo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(DeleteItemActionAppliesToRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(DeleteItemActionServer).AppliesTo(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: DeleteItemAction_AppliesTo_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(DeleteItemActionServer).AppliesTo(ctx, req.(*DeleteItemActionAppliesToRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _DeleteItemAction_Execute_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(DeleteItemActionExecuteRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(DeleteItemActionServer).Execute(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: DeleteItemAction_Execute_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(DeleteItemActionServer).Execute(ctx, req.(*DeleteItemActionExecuteRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// DeleteItemAction_ServiceDesc is the grpc.ServiceDesc for DeleteItemAction service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var DeleteItemAction_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "generated.DeleteItemAction",
|
||||
HandlerType: (*DeleteItemActionServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "AppliesTo",
|
||||
Handler: _DeleteItemAction_AppliesTo_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Execute",
|
||||
Handler: _DeleteItemAction_Execute_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "DeleteItemAction.proto",
|
||||
}
|
|
@ -1,17 +1,12 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.23.0
|
||||
// protoc v3.14.0
|
||||
// protoc-gen-go v1.33.0
|
||||
// protoc v4.25.2
|
||||
// source: ObjectStore.proto
|
||||
|
||||
package generated
|
||||
|
||||
import (
|
||||
context "context"
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
|
@ -25,10 +20,6 @@ const (
|
|||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
// This is a compile-time assertion that a sufficiently up-to-date version
|
||||
// of the legacy proto package is being used.
|
||||
const _ = proto.ProtoPackageIsVersion4
|
||||
|
||||
type PutObjectRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
|
@ -1142,397 +1133,3 @@ func file_ObjectStore_proto_init() {
|
|||
file_ObjectStore_proto_goTypes = nil
|
||||
file_ObjectStore_proto_depIdxs = nil
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ context.Context
|
||||
var _ grpc.ClientConnInterface
|
||||
|
||||
// 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.SupportPackageIsVersion6
|
||||
|
||||
// ObjectStoreClient is the client API for ObjectStore service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
||||
type ObjectStoreClient interface {
|
||||
Init(ctx context.Context, in *ObjectStoreInitRequest, opts ...grpc.CallOption) (*Empty, error)
|
||||
PutObject(ctx context.Context, opts ...grpc.CallOption) (ObjectStore_PutObjectClient, error)
|
||||
ObjectExists(ctx context.Context, in *ObjectExistsRequest, opts ...grpc.CallOption) (*ObjectExistsResponse, error)
|
||||
GetObject(ctx context.Context, in *GetObjectRequest, opts ...grpc.CallOption) (ObjectStore_GetObjectClient, error)
|
||||
ListCommonPrefixes(ctx context.Context, in *ListCommonPrefixesRequest, opts ...grpc.CallOption) (*ListCommonPrefixesResponse, error)
|
||||
ListObjects(ctx context.Context, in *ListObjectsRequest, opts ...grpc.CallOption) (*ListObjectsResponse, error)
|
||||
DeleteObject(ctx context.Context, in *DeleteObjectRequest, opts ...grpc.CallOption) (*Empty, error)
|
||||
CreateSignedURL(ctx context.Context, in *CreateSignedURLRequest, opts ...grpc.CallOption) (*CreateSignedURLResponse, error)
|
||||
}
|
||||
|
||||
type objectStoreClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewObjectStoreClient(cc grpc.ClientConnInterface) ObjectStoreClient {
|
||||
return &objectStoreClient{cc}
|
||||
}
|
||||
|
||||
func (c *objectStoreClient) Init(ctx context.Context, in *ObjectStoreInitRequest, opts ...grpc.CallOption) (*Empty, error) {
|
||||
out := new(Empty)
|
||||
err := c.cc.Invoke(ctx, "/generated.ObjectStore/Init", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *objectStoreClient) PutObject(ctx context.Context, opts ...grpc.CallOption) (ObjectStore_PutObjectClient, error) {
|
||||
stream, err := c.cc.NewStream(ctx, &_ObjectStore_serviceDesc.Streams[0], "/generated.ObjectStore/PutObject", opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
x := &objectStorePutObjectClient{stream}
|
||||
return x, nil
|
||||
}
|
||||
|
||||
type ObjectStore_PutObjectClient interface {
|
||||
Send(*PutObjectRequest) error
|
||||
CloseAndRecv() (*Empty, error)
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
type objectStorePutObjectClient struct {
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
func (x *objectStorePutObjectClient) Send(m *PutObjectRequest) error {
|
||||
return x.ClientStream.SendMsg(m)
|
||||
}
|
||||
|
||||
func (x *objectStorePutObjectClient) CloseAndRecv() (*Empty, error) {
|
||||
if err := x.ClientStream.CloseSend(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
m := new(Empty)
|
||||
if err := x.ClientStream.RecvMsg(m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
|
||||
func (c *objectStoreClient) ObjectExists(ctx context.Context, in *ObjectExistsRequest, opts ...grpc.CallOption) (*ObjectExistsResponse, error) {
|
||||
out := new(ObjectExistsResponse)
|
||||
err := c.cc.Invoke(ctx, "/generated.ObjectStore/ObjectExists", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *objectStoreClient) GetObject(ctx context.Context, in *GetObjectRequest, opts ...grpc.CallOption) (ObjectStore_GetObjectClient, error) {
|
||||
stream, err := c.cc.NewStream(ctx, &_ObjectStore_serviceDesc.Streams[1], "/generated.ObjectStore/GetObject", opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
x := &objectStoreGetObjectClient{stream}
|
||||
if err := x.ClientStream.SendMsg(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err := x.ClientStream.CloseSend(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return x, nil
|
||||
}
|
||||
|
||||
type ObjectStore_GetObjectClient interface {
|
||||
Recv() (*Bytes, error)
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
type objectStoreGetObjectClient struct {
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
func (x *objectStoreGetObjectClient) Recv() (*Bytes, error) {
|
||||
m := new(Bytes)
|
||||
if err := x.ClientStream.RecvMsg(m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
|
||||
func (c *objectStoreClient) ListCommonPrefixes(ctx context.Context, in *ListCommonPrefixesRequest, opts ...grpc.CallOption) (*ListCommonPrefixesResponse, error) {
|
||||
out := new(ListCommonPrefixesResponse)
|
||||
err := c.cc.Invoke(ctx, "/generated.ObjectStore/ListCommonPrefixes", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *objectStoreClient) ListObjects(ctx context.Context, in *ListObjectsRequest, opts ...grpc.CallOption) (*ListObjectsResponse, error) {
|
||||
out := new(ListObjectsResponse)
|
||||
err := c.cc.Invoke(ctx, "/generated.ObjectStore/ListObjects", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *objectStoreClient) DeleteObject(ctx context.Context, in *DeleteObjectRequest, opts ...grpc.CallOption) (*Empty, error) {
|
||||
out := new(Empty)
|
||||
err := c.cc.Invoke(ctx, "/generated.ObjectStore/DeleteObject", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *objectStoreClient) CreateSignedURL(ctx context.Context, in *CreateSignedURLRequest, opts ...grpc.CallOption) (*CreateSignedURLResponse, error) {
|
||||
out := new(CreateSignedURLResponse)
|
||||
err := c.cc.Invoke(ctx, "/generated.ObjectStore/CreateSignedURL", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// ObjectStoreServer is the server API for ObjectStore service.
|
||||
type ObjectStoreServer interface {
|
||||
Init(context.Context, *ObjectStoreInitRequest) (*Empty, error)
|
||||
PutObject(ObjectStore_PutObjectServer) error
|
||||
ObjectExists(context.Context, *ObjectExistsRequest) (*ObjectExistsResponse, error)
|
||||
GetObject(*GetObjectRequest, ObjectStore_GetObjectServer) error
|
||||
ListCommonPrefixes(context.Context, *ListCommonPrefixesRequest) (*ListCommonPrefixesResponse, error)
|
||||
ListObjects(context.Context, *ListObjectsRequest) (*ListObjectsResponse, error)
|
||||
DeleteObject(context.Context, *DeleteObjectRequest) (*Empty, error)
|
||||
CreateSignedURL(context.Context, *CreateSignedURLRequest) (*CreateSignedURLResponse, error)
|
||||
}
|
||||
|
||||
// UnimplementedObjectStoreServer can be embedded to have forward compatible implementations.
|
||||
type UnimplementedObjectStoreServer struct {
|
||||
}
|
||||
|
||||
func (*UnimplementedObjectStoreServer) Init(context.Context, *ObjectStoreInitRequest) (*Empty, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Init not implemented")
|
||||
}
|
||||
func (*UnimplementedObjectStoreServer) PutObject(ObjectStore_PutObjectServer) error {
|
||||
return status.Errorf(codes.Unimplemented, "method PutObject not implemented")
|
||||
}
|
||||
func (*UnimplementedObjectStoreServer) ObjectExists(context.Context, *ObjectExistsRequest) (*ObjectExistsResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ObjectExists not implemented")
|
||||
}
|
||||
func (*UnimplementedObjectStoreServer) GetObject(*GetObjectRequest, ObjectStore_GetObjectServer) error {
|
||||
return status.Errorf(codes.Unimplemented, "method GetObject not implemented")
|
||||
}
|
||||
func (*UnimplementedObjectStoreServer) ListCommonPrefixes(context.Context, *ListCommonPrefixesRequest) (*ListCommonPrefixesResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ListCommonPrefixes not implemented")
|
||||
}
|
||||
func (*UnimplementedObjectStoreServer) ListObjects(context.Context, *ListObjectsRequest) (*ListObjectsResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ListObjects not implemented")
|
||||
}
|
||||
func (*UnimplementedObjectStoreServer) DeleteObject(context.Context, *DeleteObjectRequest) (*Empty, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method DeleteObject not implemented")
|
||||
}
|
||||
func (*UnimplementedObjectStoreServer) CreateSignedURL(context.Context, *CreateSignedURLRequest) (*CreateSignedURLResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method CreateSignedURL not implemented")
|
||||
}
|
||||
|
||||
func RegisterObjectStoreServer(s *grpc.Server, srv ObjectStoreServer) {
|
||||
s.RegisterService(&_ObjectStore_serviceDesc, srv)
|
||||
}
|
||||
|
||||
func _ObjectStore_Init_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ObjectStoreInitRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(ObjectStoreServer).Init(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/generated.ObjectStore/Init",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ObjectStoreServer).Init(ctx, req.(*ObjectStoreInitRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _ObjectStore_PutObject_Handler(srv interface{}, stream grpc.ServerStream) error {
|
||||
return srv.(ObjectStoreServer).PutObject(&objectStorePutObjectServer{stream})
|
||||
}
|
||||
|
||||
type ObjectStore_PutObjectServer interface {
|
||||
SendAndClose(*Empty) error
|
||||
Recv() (*PutObjectRequest, error)
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
type objectStorePutObjectServer struct {
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
func (x *objectStorePutObjectServer) SendAndClose(m *Empty) error {
|
||||
return x.ServerStream.SendMsg(m)
|
||||
}
|
||||
|
||||
func (x *objectStorePutObjectServer) Recv() (*PutObjectRequest, error) {
|
||||
m := new(PutObjectRequest)
|
||||
if err := x.ServerStream.RecvMsg(m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
|
||||
func _ObjectStore_ObjectExists_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ObjectExistsRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(ObjectStoreServer).ObjectExists(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/generated.ObjectStore/ObjectExists",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ObjectStoreServer).ObjectExists(ctx, req.(*ObjectExistsRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _ObjectStore_GetObject_Handler(srv interface{}, stream grpc.ServerStream) error {
|
||||
m := new(GetObjectRequest)
|
||||
if err := stream.RecvMsg(m); err != nil {
|
||||
return err
|
||||
}
|
||||
return srv.(ObjectStoreServer).GetObject(m, &objectStoreGetObjectServer{stream})
|
||||
}
|
||||
|
||||
type ObjectStore_GetObjectServer interface {
|
||||
Send(*Bytes) error
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
type objectStoreGetObjectServer struct {
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
func (x *objectStoreGetObjectServer) Send(m *Bytes) error {
|
||||
return x.ServerStream.SendMsg(m)
|
||||
}
|
||||
|
||||
func _ObjectStore_ListCommonPrefixes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ListCommonPrefixesRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(ObjectStoreServer).ListCommonPrefixes(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/generated.ObjectStore/ListCommonPrefixes",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ObjectStoreServer).ListCommonPrefixes(ctx, req.(*ListCommonPrefixesRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _ObjectStore_ListObjects_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ListObjectsRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(ObjectStoreServer).ListObjects(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/generated.ObjectStore/ListObjects",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ObjectStoreServer).ListObjects(ctx, req.(*ListObjectsRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _ObjectStore_DeleteObject_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(DeleteObjectRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(ObjectStoreServer).DeleteObject(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/generated.ObjectStore/DeleteObject",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ObjectStoreServer).DeleteObject(ctx, req.(*DeleteObjectRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _ObjectStore_CreateSignedURL_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(CreateSignedURLRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(ObjectStoreServer).CreateSignedURL(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/generated.ObjectStore/CreateSignedURL",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ObjectStoreServer).CreateSignedURL(ctx, req.(*CreateSignedURLRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
var _ObjectStore_serviceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "generated.ObjectStore",
|
||||
HandlerType: (*ObjectStoreServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "Init",
|
||||
Handler: _ObjectStore_Init_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ObjectExists",
|
||||
Handler: _ObjectStore_ObjectExists_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ListCommonPrefixes",
|
||||
Handler: _ObjectStore_ListCommonPrefixes_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ListObjects",
|
||||
Handler: _ObjectStore_ListObjects_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "DeleteObject",
|
||||
Handler: _ObjectStore_DeleteObject_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "CreateSignedURL",
|
||||
Handler: _ObjectStore_CreateSignedURL_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{
|
||||
{
|
||||
StreamName: "PutObject",
|
||||
Handler: _ObjectStore_PutObject_Handler,
|
||||
ClientStreams: true,
|
||||
},
|
||||
{
|
||||
StreamName: "GetObject",
|
||||
Handler: _ObjectStore_GetObject_Handler,
|
||||
ServerStreams: true,
|
||||
},
|
||||
},
|
||||
Metadata: "ObjectStore.proto",
|
||||
}
|
||||
|
|
|
@ -0,0 +1,428 @@
|
|||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.3.0
|
||||
// - protoc v4.25.2
|
||||
// source: ObjectStore.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 (
|
||||
ObjectStore_Init_FullMethodName = "/generated.ObjectStore/Init"
|
||||
ObjectStore_PutObject_FullMethodName = "/generated.ObjectStore/PutObject"
|
||||
ObjectStore_ObjectExists_FullMethodName = "/generated.ObjectStore/ObjectExists"
|
||||
ObjectStore_GetObject_FullMethodName = "/generated.ObjectStore/GetObject"
|
||||
ObjectStore_ListCommonPrefixes_FullMethodName = "/generated.ObjectStore/ListCommonPrefixes"
|
||||
ObjectStore_ListObjects_FullMethodName = "/generated.ObjectStore/ListObjects"
|
||||
ObjectStore_DeleteObject_FullMethodName = "/generated.ObjectStore/DeleteObject"
|
||||
ObjectStore_CreateSignedURL_FullMethodName = "/generated.ObjectStore/CreateSignedURL"
|
||||
)
|
||||
|
||||
// ObjectStoreClient is the client API for ObjectStore 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 ObjectStoreClient interface {
|
||||
Init(ctx context.Context, in *ObjectStoreInitRequest, opts ...grpc.CallOption) (*Empty, error)
|
||||
PutObject(ctx context.Context, opts ...grpc.CallOption) (ObjectStore_PutObjectClient, error)
|
||||
ObjectExists(ctx context.Context, in *ObjectExistsRequest, opts ...grpc.CallOption) (*ObjectExistsResponse, error)
|
||||
GetObject(ctx context.Context, in *GetObjectRequest, opts ...grpc.CallOption) (ObjectStore_GetObjectClient, error)
|
||||
ListCommonPrefixes(ctx context.Context, in *ListCommonPrefixesRequest, opts ...grpc.CallOption) (*ListCommonPrefixesResponse, error)
|
||||
ListObjects(ctx context.Context, in *ListObjectsRequest, opts ...grpc.CallOption) (*ListObjectsResponse, error)
|
||||
DeleteObject(ctx context.Context, in *DeleteObjectRequest, opts ...grpc.CallOption) (*Empty, error)
|
||||
CreateSignedURL(ctx context.Context, in *CreateSignedURLRequest, opts ...grpc.CallOption) (*CreateSignedURLResponse, error)
|
||||
}
|
||||
|
||||
type objectStoreClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewObjectStoreClient(cc grpc.ClientConnInterface) ObjectStoreClient {
|
||||
return &objectStoreClient{cc}
|
||||
}
|
||||
|
||||
func (c *objectStoreClient) Init(ctx context.Context, in *ObjectStoreInitRequest, opts ...grpc.CallOption) (*Empty, error) {
|
||||
out := new(Empty)
|
||||
err := c.cc.Invoke(ctx, ObjectStore_Init_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *objectStoreClient) PutObject(ctx context.Context, opts ...grpc.CallOption) (ObjectStore_PutObjectClient, error) {
|
||||
stream, err := c.cc.NewStream(ctx, &ObjectStore_ServiceDesc.Streams[0], ObjectStore_PutObject_FullMethodName, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
x := &objectStorePutObjectClient{stream}
|
||||
return x, nil
|
||||
}
|
||||
|
||||
type ObjectStore_PutObjectClient interface {
|
||||
Send(*PutObjectRequest) error
|
||||
CloseAndRecv() (*Empty, error)
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
type objectStorePutObjectClient struct {
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
func (x *objectStorePutObjectClient) Send(m *PutObjectRequest) error {
|
||||
return x.ClientStream.SendMsg(m)
|
||||
}
|
||||
|
||||
func (x *objectStorePutObjectClient) CloseAndRecv() (*Empty, error) {
|
||||
if err := x.ClientStream.CloseSend(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
m := new(Empty)
|
||||
if err := x.ClientStream.RecvMsg(m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
|
||||
func (c *objectStoreClient) ObjectExists(ctx context.Context, in *ObjectExistsRequest, opts ...grpc.CallOption) (*ObjectExistsResponse, error) {
|
||||
out := new(ObjectExistsResponse)
|
||||
err := c.cc.Invoke(ctx, ObjectStore_ObjectExists_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *objectStoreClient) GetObject(ctx context.Context, in *GetObjectRequest, opts ...grpc.CallOption) (ObjectStore_GetObjectClient, error) {
|
||||
stream, err := c.cc.NewStream(ctx, &ObjectStore_ServiceDesc.Streams[1], ObjectStore_GetObject_FullMethodName, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
x := &objectStoreGetObjectClient{stream}
|
||||
if err := x.ClientStream.SendMsg(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err := x.ClientStream.CloseSend(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return x, nil
|
||||
}
|
||||
|
||||
type ObjectStore_GetObjectClient interface {
|
||||
Recv() (*Bytes, error)
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
type objectStoreGetObjectClient struct {
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
func (x *objectStoreGetObjectClient) Recv() (*Bytes, error) {
|
||||
m := new(Bytes)
|
||||
if err := x.ClientStream.RecvMsg(m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
|
||||
func (c *objectStoreClient) ListCommonPrefixes(ctx context.Context, in *ListCommonPrefixesRequest, opts ...grpc.CallOption) (*ListCommonPrefixesResponse, error) {
|
||||
out := new(ListCommonPrefixesResponse)
|
||||
err := c.cc.Invoke(ctx, ObjectStore_ListCommonPrefixes_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *objectStoreClient) ListObjects(ctx context.Context, in *ListObjectsRequest, opts ...grpc.CallOption) (*ListObjectsResponse, error) {
|
||||
out := new(ListObjectsResponse)
|
||||
err := c.cc.Invoke(ctx, ObjectStore_ListObjects_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *objectStoreClient) DeleteObject(ctx context.Context, in *DeleteObjectRequest, opts ...grpc.CallOption) (*Empty, error) {
|
||||
out := new(Empty)
|
||||
err := c.cc.Invoke(ctx, ObjectStore_DeleteObject_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *objectStoreClient) CreateSignedURL(ctx context.Context, in *CreateSignedURLRequest, opts ...grpc.CallOption) (*CreateSignedURLResponse, error) {
|
||||
out := new(CreateSignedURLResponse)
|
||||
err := c.cc.Invoke(ctx, ObjectStore_CreateSignedURL_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// ObjectStoreServer is the server API for ObjectStore service.
|
||||
// All implementations should embed UnimplementedObjectStoreServer
|
||||
// for forward compatibility
|
||||
type ObjectStoreServer interface {
|
||||
Init(context.Context, *ObjectStoreInitRequest) (*Empty, error)
|
||||
PutObject(ObjectStore_PutObjectServer) error
|
||||
ObjectExists(context.Context, *ObjectExistsRequest) (*ObjectExistsResponse, error)
|
||||
GetObject(*GetObjectRequest, ObjectStore_GetObjectServer) error
|
||||
ListCommonPrefixes(context.Context, *ListCommonPrefixesRequest) (*ListCommonPrefixesResponse, error)
|
||||
ListObjects(context.Context, *ListObjectsRequest) (*ListObjectsResponse, error)
|
||||
DeleteObject(context.Context, *DeleteObjectRequest) (*Empty, error)
|
||||
CreateSignedURL(context.Context, *CreateSignedURLRequest) (*CreateSignedURLResponse, error)
|
||||
}
|
||||
|
||||
// UnimplementedObjectStoreServer should be embedded to have forward compatible implementations.
|
||||
type UnimplementedObjectStoreServer struct {
|
||||
}
|
||||
|
||||
func (UnimplementedObjectStoreServer) Init(context.Context, *ObjectStoreInitRequest) (*Empty, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Init not implemented")
|
||||
}
|
||||
func (UnimplementedObjectStoreServer) PutObject(ObjectStore_PutObjectServer) error {
|
||||
return status.Errorf(codes.Unimplemented, "method PutObject not implemented")
|
||||
}
|
||||
func (UnimplementedObjectStoreServer) ObjectExists(context.Context, *ObjectExistsRequest) (*ObjectExistsResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ObjectExists not implemented")
|
||||
}
|
||||
func (UnimplementedObjectStoreServer) GetObject(*GetObjectRequest, ObjectStore_GetObjectServer) error {
|
||||
return status.Errorf(codes.Unimplemented, "method GetObject not implemented")
|
||||
}
|
||||
func (UnimplementedObjectStoreServer) ListCommonPrefixes(context.Context, *ListCommonPrefixesRequest) (*ListCommonPrefixesResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ListCommonPrefixes not implemented")
|
||||
}
|
||||
func (UnimplementedObjectStoreServer) ListObjects(context.Context, *ListObjectsRequest) (*ListObjectsResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ListObjects not implemented")
|
||||
}
|
||||
func (UnimplementedObjectStoreServer) DeleteObject(context.Context, *DeleteObjectRequest) (*Empty, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method DeleteObject not implemented")
|
||||
}
|
||||
func (UnimplementedObjectStoreServer) CreateSignedURL(context.Context, *CreateSignedURLRequest) (*CreateSignedURLResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method CreateSignedURL not implemented")
|
||||
}
|
||||
|
||||
// UnsafeObjectStoreServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to ObjectStoreServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeObjectStoreServer interface {
|
||||
mustEmbedUnimplementedObjectStoreServer()
|
||||
}
|
||||
|
||||
func RegisterObjectStoreServer(s grpc.ServiceRegistrar, srv ObjectStoreServer) {
|
||||
s.RegisterService(&ObjectStore_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _ObjectStore_Init_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ObjectStoreInitRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(ObjectStoreServer).Init(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ObjectStore_Init_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ObjectStoreServer).Init(ctx, req.(*ObjectStoreInitRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _ObjectStore_PutObject_Handler(srv interface{}, stream grpc.ServerStream) error {
|
||||
return srv.(ObjectStoreServer).PutObject(&objectStorePutObjectServer{stream})
|
||||
}
|
||||
|
||||
type ObjectStore_PutObjectServer interface {
|
||||
SendAndClose(*Empty) error
|
||||
Recv() (*PutObjectRequest, error)
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
type objectStorePutObjectServer struct {
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
func (x *objectStorePutObjectServer) SendAndClose(m *Empty) error {
|
||||
return x.ServerStream.SendMsg(m)
|
||||
}
|
||||
|
||||
func (x *objectStorePutObjectServer) Recv() (*PutObjectRequest, error) {
|
||||
m := new(PutObjectRequest)
|
||||
if err := x.ServerStream.RecvMsg(m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
|
||||
func _ObjectStore_ObjectExists_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ObjectExistsRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(ObjectStoreServer).ObjectExists(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ObjectStore_ObjectExists_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ObjectStoreServer).ObjectExists(ctx, req.(*ObjectExistsRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _ObjectStore_GetObject_Handler(srv interface{}, stream grpc.ServerStream) error {
|
||||
m := new(GetObjectRequest)
|
||||
if err := stream.RecvMsg(m); err != nil {
|
||||
return err
|
||||
}
|
||||
return srv.(ObjectStoreServer).GetObject(m, &objectStoreGetObjectServer{stream})
|
||||
}
|
||||
|
||||
type ObjectStore_GetObjectServer interface {
|
||||
Send(*Bytes) error
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
type objectStoreGetObjectServer struct {
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
func (x *objectStoreGetObjectServer) Send(m *Bytes) error {
|
||||
return x.ServerStream.SendMsg(m)
|
||||
}
|
||||
|
||||
func _ObjectStore_ListCommonPrefixes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ListCommonPrefixesRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(ObjectStoreServer).ListCommonPrefixes(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ObjectStore_ListCommonPrefixes_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ObjectStoreServer).ListCommonPrefixes(ctx, req.(*ListCommonPrefixesRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _ObjectStore_ListObjects_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ListObjectsRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(ObjectStoreServer).ListObjects(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ObjectStore_ListObjects_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ObjectStoreServer).ListObjects(ctx, req.(*ListObjectsRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _ObjectStore_DeleteObject_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(DeleteObjectRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(ObjectStoreServer).DeleteObject(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ObjectStore_DeleteObject_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ObjectStoreServer).DeleteObject(ctx, req.(*DeleteObjectRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _ObjectStore_CreateSignedURL_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(CreateSignedURLRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(ObjectStoreServer).CreateSignedURL(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ObjectStore_CreateSignedURL_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ObjectStoreServer).CreateSignedURL(ctx, req.(*CreateSignedURLRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// ObjectStore_ServiceDesc is the grpc.ServiceDesc for ObjectStore service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var ObjectStore_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "generated.ObjectStore",
|
||||
HandlerType: (*ObjectStoreServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "Init",
|
||||
Handler: _ObjectStore_Init_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ObjectExists",
|
||||
Handler: _ObjectStore_ObjectExists_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ListCommonPrefixes",
|
||||
Handler: _ObjectStore_ListCommonPrefixes_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ListObjects",
|
||||
Handler: _ObjectStore_ListObjects_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "DeleteObject",
|
||||
Handler: _ObjectStore_DeleteObject_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "CreateSignedURL",
|
||||
Handler: _ObjectStore_CreateSignedURL_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{
|
||||
{
|
||||
StreamName: "PutObject",
|
||||
Handler: _ObjectStore_PutObject_Handler,
|
||||
ClientStreams: true,
|
||||
},
|
||||
{
|
||||
StreamName: "GetObject",
|
||||
Handler: _ObjectStore_GetObject_Handler,
|
||||
ServerStreams: true,
|
||||
},
|
||||
},
|
||||
Metadata: "ObjectStore.proto",
|
||||
}
|
|
@ -1,17 +1,12 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.23.0
|
||||
// protoc v3.14.0
|
||||
// protoc-gen-go v1.33.0
|
||||
// protoc v4.25.2
|
||||
// source: PluginLister.proto
|
||||
|
||||
package generated
|
||||
|
||||
import (
|
||||
context "context"
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
|
@ -25,10 +20,6 @@ const (
|
|||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
// This is a compile-time assertion that a sufficiently up-to-date version
|
||||
// of the legacy proto package is being used.
|
||||
const _ = proto.ProtoPackageIsVersion4
|
||||
|
||||
type PluginIdentifier struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
|
@ -247,83 +238,3 @@ func file_PluginLister_proto_init() {
|
|||
file_PluginLister_proto_goTypes = nil
|
||||
file_PluginLister_proto_depIdxs = nil
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ context.Context
|
||||
var _ grpc.ClientConnInterface
|
||||
|
||||
// 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.SupportPackageIsVersion6
|
||||
|
||||
// PluginListerClient is the client API for PluginLister service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
||||
type PluginListerClient interface {
|
||||
ListPlugins(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*ListPluginsResponse, error)
|
||||
}
|
||||
|
||||
type pluginListerClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewPluginListerClient(cc grpc.ClientConnInterface) PluginListerClient {
|
||||
return &pluginListerClient{cc}
|
||||
}
|
||||
|
||||
func (c *pluginListerClient) ListPlugins(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*ListPluginsResponse, error) {
|
||||
out := new(ListPluginsResponse)
|
||||
err := c.cc.Invoke(ctx, "/generated.PluginLister/ListPlugins", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// PluginListerServer is the server API for PluginLister service.
|
||||
type PluginListerServer interface {
|
||||
ListPlugins(context.Context, *Empty) (*ListPluginsResponse, error)
|
||||
}
|
||||
|
||||
// UnimplementedPluginListerServer can be embedded to have forward compatible implementations.
|
||||
type UnimplementedPluginListerServer struct {
|
||||
}
|
||||
|
||||
func (*UnimplementedPluginListerServer) ListPlugins(context.Context, *Empty) (*ListPluginsResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ListPlugins not implemented")
|
||||
}
|
||||
|
||||
func RegisterPluginListerServer(s *grpc.Server, srv PluginListerServer) {
|
||||
s.RegisterService(&_PluginLister_serviceDesc, srv)
|
||||
}
|
||||
|
||||
func _PluginLister_ListPlugins_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(Empty)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(PluginListerServer).ListPlugins(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/generated.PluginLister/ListPlugins",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(PluginListerServer).ListPlugins(ctx, req.(*Empty))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
var _PluginLister_serviceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "generated.PluginLister",
|
||||
HandlerType: (*PluginListerServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "ListPlugins",
|
||||
Handler: _PluginLister_ListPlugins_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "PluginLister.proto",
|
||||
}
|
||||
|
|
|
@ -0,0 +1,107 @@
|
|||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.3.0
|
||||
// - protoc v4.25.2
|
||||
// source: PluginLister.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 (
|
||||
PluginLister_ListPlugins_FullMethodName = "/generated.PluginLister/ListPlugins"
|
||||
)
|
||||
|
||||
// PluginListerClient is the client API for PluginLister 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 PluginListerClient interface {
|
||||
ListPlugins(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*ListPluginsResponse, error)
|
||||
}
|
||||
|
||||
type pluginListerClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewPluginListerClient(cc grpc.ClientConnInterface) PluginListerClient {
|
||||
return &pluginListerClient{cc}
|
||||
}
|
||||
|
||||
func (c *pluginListerClient) ListPlugins(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*ListPluginsResponse, error) {
|
||||
out := new(ListPluginsResponse)
|
||||
err := c.cc.Invoke(ctx, PluginLister_ListPlugins_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// PluginListerServer is the server API for PluginLister service.
|
||||
// All implementations should embed UnimplementedPluginListerServer
|
||||
// for forward compatibility
|
||||
type PluginListerServer interface {
|
||||
ListPlugins(context.Context, *Empty) (*ListPluginsResponse, error)
|
||||
}
|
||||
|
||||
// UnimplementedPluginListerServer should be embedded to have forward compatible implementations.
|
||||
type UnimplementedPluginListerServer struct {
|
||||
}
|
||||
|
||||
func (UnimplementedPluginListerServer) ListPlugins(context.Context, *Empty) (*ListPluginsResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ListPlugins not implemented")
|
||||
}
|
||||
|
||||
// UnsafePluginListerServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to PluginListerServer will
|
||||
// result in compilation errors.
|
||||
type UnsafePluginListerServer interface {
|
||||
mustEmbedUnimplementedPluginListerServer()
|
||||
}
|
||||
|
||||
func RegisterPluginListerServer(s grpc.ServiceRegistrar, srv PluginListerServer) {
|
||||
s.RegisterService(&PluginLister_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _PluginLister_ListPlugins_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(Empty)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(PluginListerServer).ListPlugins(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: PluginLister_ListPlugins_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(PluginListerServer).ListPlugins(ctx, req.(*Empty))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// PluginLister_ServiceDesc is the grpc.ServiceDesc for PluginLister service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var PluginLister_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "generated.PluginLister",
|
||||
HandlerType: (*PluginListerServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "ListPlugins",
|
||||
Handler: _PluginLister_ListPlugins_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "PluginLister.proto",
|
||||
}
|
|
@ -1,17 +1,12 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.23.0
|
||||
// protoc v3.14.0
|
||||
// protoc-gen-go v1.33.0
|
||||
// protoc v4.25.2
|
||||
// source: RestoreItemAction.proto
|
||||
|
||||
package generated
|
||||
|
||||
import (
|
||||
context "context"
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
|
@ -25,10 +20,6 @@ const (
|
|||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
// This is a compile-time assertion that a sufficiently up-to-date version
|
||||
// of the legacy proto package is being used.
|
||||
const _ = proto.ProtoPackageIsVersion4
|
||||
|
||||
type RestoreItemActionExecuteRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
|
@ -424,119 +415,3 @@ func file_RestoreItemAction_proto_init() {
|
|||
file_RestoreItemAction_proto_goTypes = nil
|
||||
file_RestoreItemAction_proto_depIdxs = nil
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ context.Context
|
||||
var _ grpc.ClientConnInterface
|
||||
|
||||
// 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.SupportPackageIsVersion6
|
||||
|
||||
// RestoreItemActionClient is the client API for RestoreItemAction service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
||||
type RestoreItemActionClient interface {
|
||||
AppliesTo(ctx context.Context, in *RestoreItemActionAppliesToRequest, opts ...grpc.CallOption) (*RestoreItemActionAppliesToResponse, error)
|
||||
Execute(ctx context.Context, in *RestoreItemActionExecuteRequest, opts ...grpc.CallOption) (*RestoreItemActionExecuteResponse, error)
|
||||
}
|
||||
|
||||
type restoreItemActionClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewRestoreItemActionClient(cc grpc.ClientConnInterface) RestoreItemActionClient {
|
||||
return &restoreItemActionClient{cc}
|
||||
}
|
||||
|
||||
func (c *restoreItemActionClient) AppliesTo(ctx context.Context, in *RestoreItemActionAppliesToRequest, opts ...grpc.CallOption) (*RestoreItemActionAppliesToResponse, error) {
|
||||
out := new(RestoreItemActionAppliesToResponse)
|
||||
err := c.cc.Invoke(ctx, "/generated.RestoreItemAction/AppliesTo", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *restoreItemActionClient) Execute(ctx context.Context, in *RestoreItemActionExecuteRequest, opts ...grpc.CallOption) (*RestoreItemActionExecuteResponse, error) {
|
||||
out := new(RestoreItemActionExecuteResponse)
|
||||
err := c.cc.Invoke(ctx, "/generated.RestoreItemAction/Execute", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// RestoreItemActionServer is the server API for RestoreItemAction service.
|
||||
type RestoreItemActionServer interface {
|
||||
AppliesTo(context.Context, *RestoreItemActionAppliesToRequest) (*RestoreItemActionAppliesToResponse, error)
|
||||
Execute(context.Context, *RestoreItemActionExecuteRequest) (*RestoreItemActionExecuteResponse, error)
|
||||
}
|
||||
|
||||
// UnimplementedRestoreItemActionServer can be embedded to have forward compatible implementations.
|
||||
type UnimplementedRestoreItemActionServer struct {
|
||||
}
|
||||
|
||||
func (*UnimplementedRestoreItemActionServer) AppliesTo(context.Context, *RestoreItemActionAppliesToRequest) (*RestoreItemActionAppliesToResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method AppliesTo not implemented")
|
||||
}
|
||||
func (*UnimplementedRestoreItemActionServer) Execute(context.Context, *RestoreItemActionExecuteRequest) (*RestoreItemActionExecuteResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Execute not implemented")
|
||||
}
|
||||
|
||||
func RegisterRestoreItemActionServer(s *grpc.Server, srv RestoreItemActionServer) {
|
||||
s.RegisterService(&_RestoreItemAction_serviceDesc, srv)
|
||||
}
|
||||
|
||||
func _RestoreItemAction_AppliesTo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(RestoreItemActionAppliesToRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(RestoreItemActionServer).AppliesTo(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/generated.RestoreItemAction/AppliesTo",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(RestoreItemActionServer).AppliesTo(ctx, req.(*RestoreItemActionAppliesToRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _RestoreItemAction_Execute_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(RestoreItemActionExecuteRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(RestoreItemActionServer).Execute(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/generated.RestoreItemAction/Execute",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(RestoreItemActionServer).Execute(ctx, req.(*RestoreItemActionExecuteRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
var _RestoreItemAction_serviceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "generated.RestoreItemAction",
|
||||
HandlerType: (*RestoreItemActionServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "AppliesTo",
|
||||
Handler: _RestoreItemAction_AppliesTo_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Execute",
|
||||
Handler: _RestoreItemAction_Execute_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "RestoreItemAction.proto",
|
||||
}
|
||||
|
|
|
@ -0,0 +1,144 @@
|
|||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.3.0
|
||||
// - protoc v4.25.2
|
||||
// source: RestoreItemAction.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 (
|
||||
RestoreItemAction_AppliesTo_FullMethodName = "/generated.RestoreItemAction/AppliesTo"
|
||||
RestoreItemAction_Execute_FullMethodName = "/generated.RestoreItemAction/Execute"
|
||||
)
|
||||
|
||||
// RestoreItemActionClient is the client API for RestoreItemAction 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 RestoreItemActionClient interface {
|
||||
AppliesTo(ctx context.Context, in *RestoreItemActionAppliesToRequest, opts ...grpc.CallOption) (*RestoreItemActionAppliesToResponse, error)
|
||||
Execute(ctx context.Context, in *RestoreItemActionExecuteRequest, opts ...grpc.CallOption) (*RestoreItemActionExecuteResponse, error)
|
||||
}
|
||||
|
||||
type restoreItemActionClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewRestoreItemActionClient(cc grpc.ClientConnInterface) RestoreItemActionClient {
|
||||
return &restoreItemActionClient{cc}
|
||||
}
|
||||
|
||||
func (c *restoreItemActionClient) AppliesTo(ctx context.Context, in *RestoreItemActionAppliesToRequest, opts ...grpc.CallOption) (*RestoreItemActionAppliesToResponse, error) {
|
||||
out := new(RestoreItemActionAppliesToResponse)
|
||||
err := c.cc.Invoke(ctx, RestoreItemAction_AppliesTo_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *restoreItemActionClient) Execute(ctx context.Context, in *RestoreItemActionExecuteRequest, opts ...grpc.CallOption) (*RestoreItemActionExecuteResponse, error) {
|
||||
out := new(RestoreItemActionExecuteResponse)
|
||||
err := c.cc.Invoke(ctx, RestoreItemAction_Execute_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// RestoreItemActionServer is the server API for RestoreItemAction service.
|
||||
// All implementations should embed UnimplementedRestoreItemActionServer
|
||||
// for forward compatibility
|
||||
type RestoreItemActionServer interface {
|
||||
AppliesTo(context.Context, *RestoreItemActionAppliesToRequest) (*RestoreItemActionAppliesToResponse, error)
|
||||
Execute(context.Context, *RestoreItemActionExecuteRequest) (*RestoreItemActionExecuteResponse, error)
|
||||
}
|
||||
|
||||
// UnimplementedRestoreItemActionServer should be embedded to have forward compatible implementations.
|
||||
type UnimplementedRestoreItemActionServer struct {
|
||||
}
|
||||
|
||||
func (UnimplementedRestoreItemActionServer) AppliesTo(context.Context, *RestoreItemActionAppliesToRequest) (*RestoreItemActionAppliesToResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method AppliesTo not implemented")
|
||||
}
|
||||
func (UnimplementedRestoreItemActionServer) Execute(context.Context, *RestoreItemActionExecuteRequest) (*RestoreItemActionExecuteResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Execute not implemented")
|
||||
}
|
||||
|
||||
// UnsafeRestoreItemActionServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to RestoreItemActionServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeRestoreItemActionServer interface {
|
||||
mustEmbedUnimplementedRestoreItemActionServer()
|
||||
}
|
||||
|
||||
func RegisterRestoreItemActionServer(s grpc.ServiceRegistrar, srv RestoreItemActionServer) {
|
||||
s.RegisterService(&RestoreItemAction_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _RestoreItemAction_AppliesTo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(RestoreItemActionAppliesToRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(RestoreItemActionServer).AppliesTo(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: RestoreItemAction_AppliesTo_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(RestoreItemActionServer).AppliesTo(ctx, req.(*RestoreItemActionAppliesToRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _RestoreItemAction_Execute_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(RestoreItemActionExecuteRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(RestoreItemActionServer).Execute(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: RestoreItemAction_Execute_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(RestoreItemActionServer).Execute(ctx, req.(*RestoreItemActionExecuteRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// RestoreItemAction_ServiceDesc is the grpc.ServiceDesc for RestoreItemAction service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var RestoreItemAction_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "generated.RestoreItemAction",
|
||||
HandlerType: (*RestoreItemActionServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "AppliesTo",
|
||||
Handler: _RestoreItemAction_AppliesTo_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Execute",
|
||||
Handler: _RestoreItemAction_Execute_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "RestoreItemAction.proto",
|
||||
}
|
|
@ -1,13 +1,12 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.23.0
|
||||
// protoc v3.14.0
|
||||
// protoc-gen-go v1.33.0
|
||||
// protoc v4.25.2
|
||||
// source: Shared.proto
|
||||
|
||||
package generated
|
||||
|
||||
import (
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
timestamppb "google.golang.org/protobuf/types/known/timestamppb"
|
||||
|
@ -22,10 +21,6 @@ const (
|
|||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
// This is a compile-time assertion that a sufficiently up-to-date version
|
||||
// of the legacy proto package is being used.
|
||||
const _ = proto.ProtoPackageIsVersion4
|
||||
|
||||
type Empty struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
|
|
|
@ -1,17 +1,12 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.23.0
|
||||
// protoc v3.14.0
|
||||
// protoc-gen-go v1.33.0
|
||||
// protoc v4.25.2
|
||||
// source: VolumeSnapshotter.proto
|
||||
|
||||
package generated
|
||||
|
||||
import (
|
||||
context "context"
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
|
@ -25,10 +20,6 @@ const (
|
|||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
// This is a compile-time assertion that a sufficiently up-to-date version
|
||||
// of the legacy proto package is being used.
|
||||
const _ = proto.ProtoPackageIsVersion4
|
||||
|
||||
type CreateVolumeRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
|
@ -1067,299 +1058,3 @@ func file_VolumeSnapshotter_proto_init() {
|
|||
file_VolumeSnapshotter_proto_goTypes = nil
|
||||
file_VolumeSnapshotter_proto_depIdxs = nil
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ context.Context
|
||||
var _ grpc.ClientConnInterface
|
||||
|
||||
// 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.SupportPackageIsVersion6
|
||||
|
||||
// VolumeSnapshotterClient is the client API for VolumeSnapshotter service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#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, "/generated.VolumeSnapshotter/Init", 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, "/generated.VolumeSnapshotter/CreateVolumeFromSnapshot", 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, "/generated.VolumeSnapshotter/GetVolumeInfo", 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, "/generated.VolumeSnapshotter/CreateSnapshot", 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, "/generated.VolumeSnapshotter/DeleteSnapshot", 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, "/generated.VolumeSnapshotter/GetVolumeID", 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, "/generated.VolumeSnapshotter/SetVolumeID", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// VolumeSnapshotterServer is the server API for VolumeSnapshotter service.
|
||||
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 can 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")
|
||||
}
|
||||
|
||||
func RegisterVolumeSnapshotterServer(s *grpc.Server, 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: "/generated.VolumeSnapshotter/Init",
|
||||
}
|
||||
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: "/generated.VolumeSnapshotter/CreateVolumeFromSnapshot",
|
||||
}
|
||||
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: "/generated.VolumeSnapshotter/GetVolumeInfo",
|
||||
}
|
||||
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: "/generated.VolumeSnapshotter/CreateSnapshot",
|
||||
}
|
||||
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: "/generated.VolumeSnapshotter/DeleteSnapshot",
|
||||
}
|
||||
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: "/generated.VolumeSnapshotter/GetVolumeID",
|
||||
}
|
||||
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: "/generated.VolumeSnapshotter/SetVolumeID",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(VolumeSnapshotterServer).SetVolumeID(ctx, req.(*SetVolumeIDRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
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",
|
||||
}
|
||||
|
|
|
@ -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",
|
||||
}
|
|
@ -1,18 +1,13 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.23.0
|
||||
// protoc v3.14.0
|
||||
// protoc-gen-go v1.33.0
|
||||
// protoc v4.25.2
|
||||
// source: backupitemaction/v2/BackupItemAction.proto
|
||||
|
||||
package v2
|
||||
|
||||
import (
|
||||
context "context"
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
generated "github.com/vmware-tanzu/velero/pkg/plugin/generated"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
emptypb "google.golang.org/protobuf/types/known/emptypb"
|
||||
|
@ -27,10 +22,6 @@ const (
|
|||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
// This is a compile-time assertion that a sufficiently up-to-date version
|
||||
// of the legacy proto package is being used.
|
||||
const _ = proto.ProtoPackageIsVersion4
|
||||
|
||||
type ExecuteRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
|
@ -675,191 +666,3 @@ func file_backupitemaction_v2_BackupItemAction_proto_init() {
|
|||
file_backupitemaction_v2_BackupItemAction_proto_goTypes = nil
|
||||
file_backupitemaction_v2_BackupItemAction_proto_depIdxs = nil
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ context.Context
|
||||
var _ grpc.ClientConnInterface
|
||||
|
||||
// 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.SupportPackageIsVersion6
|
||||
|
||||
// BackupItemActionClient is the client API for BackupItemAction service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
||||
type BackupItemActionClient interface {
|
||||
AppliesTo(ctx context.Context, in *BackupItemActionAppliesToRequest, opts ...grpc.CallOption) (*BackupItemActionAppliesToResponse, error)
|
||||
Execute(ctx context.Context, in *ExecuteRequest, opts ...grpc.CallOption) (*ExecuteResponse, error)
|
||||
Progress(ctx context.Context, in *BackupItemActionProgressRequest, opts ...grpc.CallOption) (*BackupItemActionProgressResponse, error)
|
||||
Cancel(ctx context.Context, in *BackupItemActionCancelRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
|
||||
}
|
||||
|
||||
type backupItemActionClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewBackupItemActionClient(cc grpc.ClientConnInterface) BackupItemActionClient {
|
||||
return &backupItemActionClient{cc}
|
||||
}
|
||||
|
||||
func (c *backupItemActionClient) AppliesTo(ctx context.Context, in *BackupItemActionAppliesToRequest, opts ...grpc.CallOption) (*BackupItemActionAppliesToResponse, error) {
|
||||
out := new(BackupItemActionAppliesToResponse)
|
||||
err := c.cc.Invoke(ctx, "/v2.BackupItemAction/AppliesTo", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *backupItemActionClient) Execute(ctx context.Context, in *ExecuteRequest, opts ...grpc.CallOption) (*ExecuteResponse, error) {
|
||||
out := new(ExecuteResponse)
|
||||
err := c.cc.Invoke(ctx, "/v2.BackupItemAction/Execute", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *backupItemActionClient) Progress(ctx context.Context, in *BackupItemActionProgressRequest, opts ...grpc.CallOption) (*BackupItemActionProgressResponse, error) {
|
||||
out := new(BackupItemActionProgressResponse)
|
||||
err := c.cc.Invoke(ctx, "/v2.BackupItemAction/Progress", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *backupItemActionClient) Cancel(ctx context.Context, in *BackupItemActionCancelRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
|
||||
out := new(emptypb.Empty)
|
||||
err := c.cc.Invoke(ctx, "/v2.BackupItemAction/Cancel", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// BackupItemActionServer is the server API for BackupItemAction service.
|
||||
type BackupItemActionServer interface {
|
||||
AppliesTo(context.Context, *BackupItemActionAppliesToRequest) (*BackupItemActionAppliesToResponse, error)
|
||||
Execute(context.Context, *ExecuteRequest) (*ExecuteResponse, error)
|
||||
Progress(context.Context, *BackupItemActionProgressRequest) (*BackupItemActionProgressResponse, error)
|
||||
Cancel(context.Context, *BackupItemActionCancelRequest) (*emptypb.Empty, error)
|
||||
}
|
||||
|
||||
// UnimplementedBackupItemActionServer can be embedded to have forward compatible implementations.
|
||||
type UnimplementedBackupItemActionServer struct {
|
||||
}
|
||||
|
||||
func (*UnimplementedBackupItemActionServer) AppliesTo(context.Context, *BackupItemActionAppliesToRequest) (*BackupItemActionAppliesToResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method AppliesTo not implemented")
|
||||
}
|
||||
func (*UnimplementedBackupItemActionServer) Execute(context.Context, *ExecuteRequest) (*ExecuteResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Execute not implemented")
|
||||
}
|
||||
func (*UnimplementedBackupItemActionServer) Progress(context.Context, *BackupItemActionProgressRequest) (*BackupItemActionProgressResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Progress not implemented")
|
||||
}
|
||||
func (*UnimplementedBackupItemActionServer) Cancel(context.Context, *BackupItemActionCancelRequest) (*emptypb.Empty, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Cancel not implemented")
|
||||
}
|
||||
|
||||
func RegisterBackupItemActionServer(s *grpc.Server, srv BackupItemActionServer) {
|
||||
s.RegisterService(&_BackupItemAction_serviceDesc, srv)
|
||||
}
|
||||
|
||||
func _BackupItemAction_AppliesTo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(BackupItemActionAppliesToRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(BackupItemActionServer).AppliesTo(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/v2.BackupItemAction/AppliesTo",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(BackupItemActionServer).AppliesTo(ctx, req.(*BackupItemActionAppliesToRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _BackupItemAction_Execute_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ExecuteRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(BackupItemActionServer).Execute(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/v2.BackupItemAction/Execute",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(BackupItemActionServer).Execute(ctx, req.(*ExecuteRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _BackupItemAction_Progress_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(BackupItemActionProgressRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(BackupItemActionServer).Progress(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/v2.BackupItemAction/Progress",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(BackupItemActionServer).Progress(ctx, req.(*BackupItemActionProgressRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _BackupItemAction_Cancel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(BackupItemActionCancelRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(BackupItemActionServer).Cancel(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/v2.BackupItemAction/Cancel",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(BackupItemActionServer).Cancel(ctx, req.(*BackupItemActionCancelRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
var _BackupItemAction_serviceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "v2.BackupItemAction",
|
||||
HandlerType: (*BackupItemActionServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "AppliesTo",
|
||||
Handler: _BackupItemAction_AppliesTo_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Execute",
|
||||
Handler: _BackupItemAction_Execute_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Progress",
|
||||
Handler: _BackupItemAction_Progress_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Cancel",
|
||||
Handler: _BackupItemAction_Cancel_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "backupitemaction/v2/BackupItemAction.proto",
|
||||
}
|
||||
|
|
|
@ -0,0 +1,219 @@
|
|||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.3.0
|
||||
// - protoc v4.25.2
|
||||
// source: backupitemaction/v2/BackupItemAction.proto
|
||||
|
||||
package v2
|
||||
|
||||
import (
|
||||
context "context"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
emptypb "google.golang.org/protobuf/types/known/emptypb"
|
||||
)
|
||||
|
||||
// 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 (
|
||||
BackupItemAction_AppliesTo_FullMethodName = "/v2.BackupItemAction/AppliesTo"
|
||||
BackupItemAction_Execute_FullMethodName = "/v2.BackupItemAction/Execute"
|
||||
BackupItemAction_Progress_FullMethodName = "/v2.BackupItemAction/Progress"
|
||||
BackupItemAction_Cancel_FullMethodName = "/v2.BackupItemAction/Cancel"
|
||||
)
|
||||
|
||||
// BackupItemActionClient is the client API for BackupItemAction 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 BackupItemActionClient interface {
|
||||
AppliesTo(ctx context.Context, in *BackupItemActionAppliesToRequest, opts ...grpc.CallOption) (*BackupItemActionAppliesToResponse, error)
|
||||
Execute(ctx context.Context, in *ExecuteRequest, opts ...grpc.CallOption) (*ExecuteResponse, error)
|
||||
Progress(ctx context.Context, in *BackupItemActionProgressRequest, opts ...grpc.CallOption) (*BackupItemActionProgressResponse, error)
|
||||
Cancel(ctx context.Context, in *BackupItemActionCancelRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
|
||||
}
|
||||
|
||||
type backupItemActionClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewBackupItemActionClient(cc grpc.ClientConnInterface) BackupItemActionClient {
|
||||
return &backupItemActionClient{cc}
|
||||
}
|
||||
|
||||
func (c *backupItemActionClient) AppliesTo(ctx context.Context, in *BackupItemActionAppliesToRequest, opts ...grpc.CallOption) (*BackupItemActionAppliesToResponse, error) {
|
||||
out := new(BackupItemActionAppliesToResponse)
|
||||
err := c.cc.Invoke(ctx, BackupItemAction_AppliesTo_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *backupItemActionClient) Execute(ctx context.Context, in *ExecuteRequest, opts ...grpc.CallOption) (*ExecuteResponse, error) {
|
||||
out := new(ExecuteResponse)
|
||||
err := c.cc.Invoke(ctx, BackupItemAction_Execute_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *backupItemActionClient) Progress(ctx context.Context, in *BackupItemActionProgressRequest, opts ...grpc.CallOption) (*BackupItemActionProgressResponse, error) {
|
||||
out := new(BackupItemActionProgressResponse)
|
||||
err := c.cc.Invoke(ctx, BackupItemAction_Progress_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *backupItemActionClient) Cancel(ctx context.Context, in *BackupItemActionCancelRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
|
||||
out := new(emptypb.Empty)
|
||||
err := c.cc.Invoke(ctx, BackupItemAction_Cancel_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// BackupItemActionServer is the server API for BackupItemAction service.
|
||||
// All implementations should embed UnimplementedBackupItemActionServer
|
||||
// for forward compatibility
|
||||
type BackupItemActionServer interface {
|
||||
AppliesTo(context.Context, *BackupItemActionAppliesToRequest) (*BackupItemActionAppliesToResponse, error)
|
||||
Execute(context.Context, *ExecuteRequest) (*ExecuteResponse, error)
|
||||
Progress(context.Context, *BackupItemActionProgressRequest) (*BackupItemActionProgressResponse, error)
|
||||
Cancel(context.Context, *BackupItemActionCancelRequest) (*emptypb.Empty, error)
|
||||
}
|
||||
|
||||
// UnimplementedBackupItemActionServer should be embedded to have forward compatible implementations.
|
||||
type UnimplementedBackupItemActionServer struct {
|
||||
}
|
||||
|
||||
func (UnimplementedBackupItemActionServer) AppliesTo(context.Context, *BackupItemActionAppliesToRequest) (*BackupItemActionAppliesToResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method AppliesTo not implemented")
|
||||
}
|
||||
func (UnimplementedBackupItemActionServer) Execute(context.Context, *ExecuteRequest) (*ExecuteResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Execute not implemented")
|
||||
}
|
||||
func (UnimplementedBackupItemActionServer) Progress(context.Context, *BackupItemActionProgressRequest) (*BackupItemActionProgressResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Progress not implemented")
|
||||
}
|
||||
func (UnimplementedBackupItemActionServer) Cancel(context.Context, *BackupItemActionCancelRequest) (*emptypb.Empty, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Cancel not implemented")
|
||||
}
|
||||
|
||||
// UnsafeBackupItemActionServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to BackupItemActionServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeBackupItemActionServer interface {
|
||||
mustEmbedUnimplementedBackupItemActionServer()
|
||||
}
|
||||
|
||||
func RegisterBackupItemActionServer(s grpc.ServiceRegistrar, srv BackupItemActionServer) {
|
||||
s.RegisterService(&BackupItemAction_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _BackupItemAction_AppliesTo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(BackupItemActionAppliesToRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(BackupItemActionServer).AppliesTo(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: BackupItemAction_AppliesTo_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(BackupItemActionServer).AppliesTo(ctx, req.(*BackupItemActionAppliesToRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _BackupItemAction_Execute_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ExecuteRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(BackupItemActionServer).Execute(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: BackupItemAction_Execute_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(BackupItemActionServer).Execute(ctx, req.(*ExecuteRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _BackupItemAction_Progress_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(BackupItemActionProgressRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(BackupItemActionServer).Progress(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: BackupItemAction_Progress_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(BackupItemActionServer).Progress(ctx, req.(*BackupItemActionProgressRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _BackupItemAction_Cancel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(BackupItemActionCancelRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(BackupItemActionServer).Cancel(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: BackupItemAction_Cancel_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(BackupItemActionServer).Cancel(ctx, req.(*BackupItemActionCancelRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// BackupItemAction_ServiceDesc is the grpc.ServiceDesc for BackupItemAction service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var BackupItemAction_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "v2.BackupItemAction",
|
||||
HandlerType: (*BackupItemActionServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "AppliesTo",
|
||||
Handler: _BackupItemAction_AppliesTo_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Execute",
|
||||
Handler: _BackupItemAction_Execute_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Progress",
|
||||
Handler: _BackupItemAction_Progress_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Cancel",
|
||||
Handler: _BackupItemAction_Cancel_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "backupitemaction/v2/BackupItemAction.proto",
|
||||
}
|
|
@ -1,18 +1,13 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.23.0
|
||||
// protoc v3.14.0
|
||||
// protoc-gen-go v1.33.0
|
||||
// protoc v4.25.2
|
||||
// source: restoreitemaction/v2/RestoreItemAction.proto
|
||||
|
||||
package v2
|
||||
|
||||
import (
|
||||
context "context"
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
generated "github.com/vmware-tanzu/velero/pkg/plugin/generated"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
durationpb "google.golang.org/protobuf/types/known/durationpb"
|
||||
|
@ -28,10 +23,6 @@ const (
|
|||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
// This is a compile-time assertion that a sufficiently up-to-date version
|
||||
// of the legacy proto package is being used.
|
||||
const _ = proto.ProtoPackageIsVersion4
|
||||
|
||||
type RestoreItemActionExecuteRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
|
@ -877,227 +868,3 @@ func file_restoreitemaction_v2_RestoreItemAction_proto_init() {
|
|||
file_restoreitemaction_v2_RestoreItemAction_proto_goTypes = nil
|
||||
file_restoreitemaction_v2_RestoreItemAction_proto_depIdxs = nil
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ context.Context
|
||||
var _ grpc.ClientConnInterface
|
||||
|
||||
// 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.SupportPackageIsVersion6
|
||||
|
||||
// RestoreItemActionClient is the client API for RestoreItemAction service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
||||
type RestoreItemActionClient interface {
|
||||
AppliesTo(ctx context.Context, in *RestoreItemActionAppliesToRequest, opts ...grpc.CallOption) (*RestoreItemActionAppliesToResponse, error)
|
||||
Execute(ctx context.Context, in *RestoreItemActionExecuteRequest, opts ...grpc.CallOption) (*RestoreItemActionExecuteResponse, error)
|
||||
Progress(ctx context.Context, in *RestoreItemActionProgressRequest, opts ...grpc.CallOption) (*RestoreItemActionProgressResponse, error)
|
||||
Cancel(ctx context.Context, in *RestoreItemActionCancelRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
|
||||
AreAdditionalItemsReady(ctx context.Context, in *RestoreItemActionItemsReadyRequest, opts ...grpc.CallOption) (*RestoreItemActionItemsReadyResponse, error)
|
||||
}
|
||||
|
||||
type restoreItemActionClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewRestoreItemActionClient(cc grpc.ClientConnInterface) RestoreItemActionClient {
|
||||
return &restoreItemActionClient{cc}
|
||||
}
|
||||
|
||||
func (c *restoreItemActionClient) AppliesTo(ctx context.Context, in *RestoreItemActionAppliesToRequest, opts ...grpc.CallOption) (*RestoreItemActionAppliesToResponse, error) {
|
||||
out := new(RestoreItemActionAppliesToResponse)
|
||||
err := c.cc.Invoke(ctx, "/v2.RestoreItemAction/AppliesTo", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *restoreItemActionClient) Execute(ctx context.Context, in *RestoreItemActionExecuteRequest, opts ...grpc.CallOption) (*RestoreItemActionExecuteResponse, error) {
|
||||
out := new(RestoreItemActionExecuteResponse)
|
||||
err := c.cc.Invoke(ctx, "/v2.RestoreItemAction/Execute", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *restoreItemActionClient) Progress(ctx context.Context, in *RestoreItemActionProgressRequest, opts ...grpc.CallOption) (*RestoreItemActionProgressResponse, error) {
|
||||
out := new(RestoreItemActionProgressResponse)
|
||||
err := c.cc.Invoke(ctx, "/v2.RestoreItemAction/Progress", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *restoreItemActionClient) Cancel(ctx context.Context, in *RestoreItemActionCancelRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
|
||||
out := new(emptypb.Empty)
|
||||
err := c.cc.Invoke(ctx, "/v2.RestoreItemAction/Cancel", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *restoreItemActionClient) AreAdditionalItemsReady(ctx context.Context, in *RestoreItemActionItemsReadyRequest, opts ...grpc.CallOption) (*RestoreItemActionItemsReadyResponse, error) {
|
||||
out := new(RestoreItemActionItemsReadyResponse)
|
||||
err := c.cc.Invoke(ctx, "/v2.RestoreItemAction/AreAdditionalItemsReady", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// RestoreItemActionServer is the server API for RestoreItemAction service.
|
||||
type RestoreItemActionServer interface {
|
||||
AppliesTo(context.Context, *RestoreItemActionAppliesToRequest) (*RestoreItemActionAppliesToResponse, error)
|
||||
Execute(context.Context, *RestoreItemActionExecuteRequest) (*RestoreItemActionExecuteResponse, error)
|
||||
Progress(context.Context, *RestoreItemActionProgressRequest) (*RestoreItemActionProgressResponse, error)
|
||||
Cancel(context.Context, *RestoreItemActionCancelRequest) (*emptypb.Empty, error)
|
||||
AreAdditionalItemsReady(context.Context, *RestoreItemActionItemsReadyRequest) (*RestoreItemActionItemsReadyResponse, error)
|
||||
}
|
||||
|
||||
// UnimplementedRestoreItemActionServer can be embedded to have forward compatible implementations.
|
||||
type UnimplementedRestoreItemActionServer struct {
|
||||
}
|
||||
|
||||
func (*UnimplementedRestoreItemActionServer) AppliesTo(context.Context, *RestoreItemActionAppliesToRequest) (*RestoreItemActionAppliesToResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method AppliesTo not implemented")
|
||||
}
|
||||
func (*UnimplementedRestoreItemActionServer) Execute(context.Context, *RestoreItemActionExecuteRequest) (*RestoreItemActionExecuteResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Execute not implemented")
|
||||
}
|
||||
func (*UnimplementedRestoreItemActionServer) Progress(context.Context, *RestoreItemActionProgressRequest) (*RestoreItemActionProgressResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Progress not implemented")
|
||||
}
|
||||
func (*UnimplementedRestoreItemActionServer) Cancel(context.Context, *RestoreItemActionCancelRequest) (*emptypb.Empty, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Cancel not implemented")
|
||||
}
|
||||
func (*UnimplementedRestoreItemActionServer) AreAdditionalItemsReady(context.Context, *RestoreItemActionItemsReadyRequest) (*RestoreItemActionItemsReadyResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method AreAdditionalItemsReady not implemented")
|
||||
}
|
||||
|
||||
func RegisterRestoreItemActionServer(s *grpc.Server, srv RestoreItemActionServer) {
|
||||
s.RegisterService(&_RestoreItemAction_serviceDesc, srv)
|
||||
}
|
||||
|
||||
func _RestoreItemAction_AppliesTo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(RestoreItemActionAppliesToRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(RestoreItemActionServer).AppliesTo(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/v2.RestoreItemAction/AppliesTo",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(RestoreItemActionServer).AppliesTo(ctx, req.(*RestoreItemActionAppliesToRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _RestoreItemAction_Execute_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(RestoreItemActionExecuteRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(RestoreItemActionServer).Execute(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/v2.RestoreItemAction/Execute",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(RestoreItemActionServer).Execute(ctx, req.(*RestoreItemActionExecuteRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _RestoreItemAction_Progress_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(RestoreItemActionProgressRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(RestoreItemActionServer).Progress(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/v2.RestoreItemAction/Progress",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(RestoreItemActionServer).Progress(ctx, req.(*RestoreItemActionProgressRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _RestoreItemAction_Cancel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(RestoreItemActionCancelRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(RestoreItemActionServer).Cancel(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/v2.RestoreItemAction/Cancel",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(RestoreItemActionServer).Cancel(ctx, req.(*RestoreItemActionCancelRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _RestoreItemAction_AreAdditionalItemsReady_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(RestoreItemActionItemsReadyRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(RestoreItemActionServer).AreAdditionalItemsReady(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/v2.RestoreItemAction/AreAdditionalItemsReady",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(RestoreItemActionServer).AreAdditionalItemsReady(ctx, req.(*RestoreItemActionItemsReadyRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
var _RestoreItemAction_serviceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "v2.RestoreItemAction",
|
||||
HandlerType: (*RestoreItemActionServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "AppliesTo",
|
||||
Handler: _RestoreItemAction_AppliesTo_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Execute",
|
||||
Handler: _RestoreItemAction_Execute_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Progress",
|
||||
Handler: _RestoreItemAction_Progress_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Cancel",
|
||||
Handler: _RestoreItemAction_Cancel_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "AreAdditionalItemsReady",
|
||||
Handler: _RestoreItemAction_AreAdditionalItemsReady_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "restoreitemaction/v2/RestoreItemAction.proto",
|
||||
}
|
||||
|
|
|
@ -0,0 +1,256 @@
|
|||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.3.0
|
||||
// - protoc v4.25.2
|
||||
// source: restoreitemaction/v2/RestoreItemAction.proto
|
||||
|
||||
package v2
|
||||
|
||||
import (
|
||||
context "context"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
emptypb "google.golang.org/protobuf/types/known/emptypb"
|
||||
)
|
||||
|
||||
// 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 (
|
||||
RestoreItemAction_AppliesTo_FullMethodName = "/v2.RestoreItemAction/AppliesTo"
|
||||
RestoreItemAction_Execute_FullMethodName = "/v2.RestoreItemAction/Execute"
|
||||
RestoreItemAction_Progress_FullMethodName = "/v2.RestoreItemAction/Progress"
|
||||
RestoreItemAction_Cancel_FullMethodName = "/v2.RestoreItemAction/Cancel"
|
||||
RestoreItemAction_AreAdditionalItemsReady_FullMethodName = "/v2.RestoreItemAction/AreAdditionalItemsReady"
|
||||
)
|
||||
|
||||
// RestoreItemActionClient is the client API for RestoreItemAction 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 RestoreItemActionClient interface {
|
||||
AppliesTo(ctx context.Context, in *RestoreItemActionAppliesToRequest, opts ...grpc.CallOption) (*RestoreItemActionAppliesToResponse, error)
|
||||
Execute(ctx context.Context, in *RestoreItemActionExecuteRequest, opts ...grpc.CallOption) (*RestoreItemActionExecuteResponse, error)
|
||||
Progress(ctx context.Context, in *RestoreItemActionProgressRequest, opts ...grpc.CallOption) (*RestoreItemActionProgressResponse, error)
|
||||
Cancel(ctx context.Context, in *RestoreItemActionCancelRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
|
||||
AreAdditionalItemsReady(ctx context.Context, in *RestoreItemActionItemsReadyRequest, opts ...grpc.CallOption) (*RestoreItemActionItemsReadyResponse, error)
|
||||
}
|
||||
|
||||
type restoreItemActionClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewRestoreItemActionClient(cc grpc.ClientConnInterface) RestoreItemActionClient {
|
||||
return &restoreItemActionClient{cc}
|
||||
}
|
||||
|
||||
func (c *restoreItemActionClient) AppliesTo(ctx context.Context, in *RestoreItemActionAppliesToRequest, opts ...grpc.CallOption) (*RestoreItemActionAppliesToResponse, error) {
|
||||
out := new(RestoreItemActionAppliesToResponse)
|
||||
err := c.cc.Invoke(ctx, RestoreItemAction_AppliesTo_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *restoreItemActionClient) Execute(ctx context.Context, in *RestoreItemActionExecuteRequest, opts ...grpc.CallOption) (*RestoreItemActionExecuteResponse, error) {
|
||||
out := new(RestoreItemActionExecuteResponse)
|
||||
err := c.cc.Invoke(ctx, RestoreItemAction_Execute_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *restoreItemActionClient) Progress(ctx context.Context, in *RestoreItemActionProgressRequest, opts ...grpc.CallOption) (*RestoreItemActionProgressResponse, error) {
|
||||
out := new(RestoreItemActionProgressResponse)
|
||||
err := c.cc.Invoke(ctx, RestoreItemAction_Progress_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *restoreItemActionClient) Cancel(ctx context.Context, in *RestoreItemActionCancelRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
|
||||
out := new(emptypb.Empty)
|
||||
err := c.cc.Invoke(ctx, RestoreItemAction_Cancel_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *restoreItemActionClient) AreAdditionalItemsReady(ctx context.Context, in *RestoreItemActionItemsReadyRequest, opts ...grpc.CallOption) (*RestoreItemActionItemsReadyResponse, error) {
|
||||
out := new(RestoreItemActionItemsReadyResponse)
|
||||
err := c.cc.Invoke(ctx, RestoreItemAction_AreAdditionalItemsReady_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// RestoreItemActionServer is the server API for RestoreItemAction service.
|
||||
// All implementations should embed UnimplementedRestoreItemActionServer
|
||||
// for forward compatibility
|
||||
type RestoreItemActionServer interface {
|
||||
AppliesTo(context.Context, *RestoreItemActionAppliesToRequest) (*RestoreItemActionAppliesToResponse, error)
|
||||
Execute(context.Context, *RestoreItemActionExecuteRequest) (*RestoreItemActionExecuteResponse, error)
|
||||
Progress(context.Context, *RestoreItemActionProgressRequest) (*RestoreItemActionProgressResponse, error)
|
||||
Cancel(context.Context, *RestoreItemActionCancelRequest) (*emptypb.Empty, error)
|
||||
AreAdditionalItemsReady(context.Context, *RestoreItemActionItemsReadyRequest) (*RestoreItemActionItemsReadyResponse, error)
|
||||
}
|
||||
|
||||
// UnimplementedRestoreItemActionServer should be embedded to have forward compatible implementations.
|
||||
type UnimplementedRestoreItemActionServer struct {
|
||||
}
|
||||
|
||||
func (UnimplementedRestoreItemActionServer) AppliesTo(context.Context, *RestoreItemActionAppliesToRequest) (*RestoreItemActionAppliesToResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method AppliesTo not implemented")
|
||||
}
|
||||
func (UnimplementedRestoreItemActionServer) Execute(context.Context, *RestoreItemActionExecuteRequest) (*RestoreItemActionExecuteResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Execute not implemented")
|
||||
}
|
||||
func (UnimplementedRestoreItemActionServer) Progress(context.Context, *RestoreItemActionProgressRequest) (*RestoreItemActionProgressResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Progress not implemented")
|
||||
}
|
||||
func (UnimplementedRestoreItemActionServer) Cancel(context.Context, *RestoreItemActionCancelRequest) (*emptypb.Empty, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Cancel not implemented")
|
||||
}
|
||||
func (UnimplementedRestoreItemActionServer) AreAdditionalItemsReady(context.Context, *RestoreItemActionItemsReadyRequest) (*RestoreItemActionItemsReadyResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method AreAdditionalItemsReady not implemented")
|
||||
}
|
||||
|
||||
// UnsafeRestoreItemActionServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to RestoreItemActionServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeRestoreItemActionServer interface {
|
||||
mustEmbedUnimplementedRestoreItemActionServer()
|
||||
}
|
||||
|
||||
func RegisterRestoreItemActionServer(s grpc.ServiceRegistrar, srv RestoreItemActionServer) {
|
||||
s.RegisterService(&RestoreItemAction_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _RestoreItemAction_AppliesTo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(RestoreItemActionAppliesToRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(RestoreItemActionServer).AppliesTo(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: RestoreItemAction_AppliesTo_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(RestoreItemActionServer).AppliesTo(ctx, req.(*RestoreItemActionAppliesToRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _RestoreItemAction_Execute_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(RestoreItemActionExecuteRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(RestoreItemActionServer).Execute(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: RestoreItemAction_Execute_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(RestoreItemActionServer).Execute(ctx, req.(*RestoreItemActionExecuteRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _RestoreItemAction_Progress_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(RestoreItemActionProgressRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(RestoreItemActionServer).Progress(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: RestoreItemAction_Progress_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(RestoreItemActionServer).Progress(ctx, req.(*RestoreItemActionProgressRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _RestoreItemAction_Cancel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(RestoreItemActionCancelRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(RestoreItemActionServer).Cancel(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: RestoreItemAction_Cancel_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(RestoreItemActionServer).Cancel(ctx, req.(*RestoreItemActionCancelRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _RestoreItemAction_AreAdditionalItemsReady_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(RestoreItemActionItemsReadyRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(RestoreItemActionServer).AreAdditionalItemsReady(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: RestoreItemAction_AreAdditionalItemsReady_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(RestoreItemActionServer).AreAdditionalItemsReady(ctx, req.(*RestoreItemActionItemsReadyRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// RestoreItemAction_ServiceDesc is the grpc.ServiceDesc for RestoreItemAction service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var RestoreItemAction_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "v2.RestoreItemAction",
|
||||
HandlerType: (*RestoreItemActionServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "AppliesTo",
|
||||
Handler: _RestoreItemAction_AppliesTo_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Execute",
|
||||
Handler: _RestoreItemAction_Execute_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Progress",
|
||||
Handler: _RestoreItemAction_Progress_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Cancel",
|
||||
Handler: _RestoreItemAction_Cancel_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "AreAdditionalItemsReady",
|
||||
Handler: _RestoreItemAction_AreAdditionalItemsReady_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "restoreitemaction/v2/RestoreItemAction.proto",
|
||||
}
|
Loading…
Reference in New Issue