mirror of
https://github.com/pomerium/pomerium.git
synced 2025-08-03 00:40:25 +02:00
core/proto: update protoc dependencies (#5218)
* core/proto: update protoc dependencies * cleanup * disable unimplemented forward compatibility check * fix mock * add generate make command * add .0
This commit is contained in:
parent
3483447c37
commit
0cfb1025db
28 changed files with 1427 additions and 1832 deletions
533
pkg/grpc/databroker/databroker_grpc.pb.go
Normal file
533
pkg/grpc/databroker/databroker_grpc.pb.go
Normal file
|
@ -0,0 +1,533 @@
|
|||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.5.1
|
||||
// - protoc v3.21.7
|
||||
// source: databroker.proto
|
||||
|
||||
package databroker
|
||||
|
||||
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.64.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion9
|
||||
|
||||
const (
|
||||
DataBrokerService_AcquireLease_FullMethodName = "/databroker.DataBrokerService/AcquireLease"
|
||||
DataBrokerService_Get_FullMethodName = "/databroker.DataBrokerService/Get"
|
||||
DataBrokerService_ListTypes_FullMethodName = "/databroker.DataBrokerService/ListTypes"
|
||||
DataBrokerService_Put_FullMethodName = "/databroker.DataBrokerService/Put"
|
||||
DataBrokerService_Patch_FullMethodName = "/databroker.DataBrokerService/Patch"
|
||||
DataBrokerService_Query_FullMethodName = "/databroker.DataBrokerService/Query"
|
||||
DataBrokerService_ReleaseLease_FullMethodName = "/databroker.DataBrokerService/ReleaseLease"
|
||||
DataBrokerService_RenewLease_FullMethodName = "/databroker.DataBrokerService/RenewLease"
|
||||
DataBrokerService_SetOptions_FullMethodName = "/databroker.DataBrokerService/SetOptions"
|
||||
DataBrokerService_Sync_FullMethodName = "/databroker.DataBrokerService/Sync"
|
||||
DataBrokerService_SyncLatest_FullMethodName = "/databroker.DataBrokerService/SyncLatest"
|
||||
)
|
||||
|
||||
// DataBrokerServiceClient is the client API for DataBrokerService 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.
|
||||
//
|
||||
// The DataBrokerService stores key-value data.
|
||||
type DataBrokerServiceClient interface {
|
||||
// AcquireLease acquires a distributed mutex lease.
|
||||
AcquireLease(ctx context.Context, in *AcquireLeaseRequest, opts ...grpc.CallOption) (*AcquireLeaseResponse, error)
|
||||
// Get gets a record.
|
||||
Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error)
|
||||
// ListTypes lists all the known record types.
|
||||
ListTypes(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ListTypesResponse, error)
|
||||
// Put saves a record.
|
||||
Put(ctx context.Context, in *PutRequest, opts ...grpc.CallOption) (*PutResponse, error)
|
||||
// Patch updates specific fields of an existing record.
|
||||
Patch(ctx context.Context, in *PatchRequest, opts ...grpc.CallOption) (*PatchResponse, error)
|
||||
// Query queries for records.
|
||||
Query(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResponse, error)
|
||||
// ReleaseLease releases a distributed mutex lease.
|
||||
ReleaseLease(ctx context.Context, in *ReleaseLeaseRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
|
||||
// RenewLease renews a distributed mutex lease.
|
||||
RenewLease(ctx context.Context, in *RenewLeaseRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
|
||||
// SetOptions sets the options for a type in the databroker.
|
||||
SetOptions(ctx context.Context, in *SetOptionsRequest, opts ...grpc.CallOption) (*SetOptionsResponse, error)
|
||||
// Sync streams changes to records after the specified version.
|
||||
Sync(ctx context.Context, in *SyncRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[SyncResponse], error)
|
||||
// SyncLatest streams the latest version of every record.
|
||||
SyncLatest(ctx context.Context, in *SyncLatestRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[SyncLatestResponse], error)
|
||||
}
|
||||
|
||||
type dataBrokerServiceClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewDataBrokerServiceClient(cc grpc.ClientConnInterface) DataBrokerServiceClient {
|
||||
return &dataBrokerServiceClient{cc}
|
||||
}
|
||||
|
||||
func (c *dataBrokerServiceClient) AcquireLease(ctx context.Context, in *AcquireLeaseRequest, opts ...grpc.CallOption) (*AcquireLeaseResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(AcquireLeaseResponse)
|
||||
err := c.cc.Invoke(ctx, DataBrokerService_AcquireLease_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *dataBrokerServiceClient) Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(GetResponse)
|
||||
err := c.cc.Invoke(ctx, DataBrokerService_Get_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *dataBrokerServiceClient) ListTypes(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ListTypesResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(ListTypesResponse)
|
||||
err := c.cc.Invoke(ctx, DataBrokerService_ListTypes_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *dataBrokerServiceClient) Put(ctx context.Context, in *PutRequest, opts ...grpc.CallOption) (*PutResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(PutResponse)
|
||||
err := c.cc.Invoke(ctx, DataBrokerService_Put_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *dataBrokerServiceClient) Patch(ctx context.Context, in *PatchRequest, opts ...grpc.CallOption) (*PatchResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(PatchResponse)
|
||||
err := c.cc.Invoke(ctx, DataBrokerService_Patch_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *dataBrokerServiceClient) Query(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(QueryResponse)
|
||||
err := c.cc.Invoke(ctx, DataBrokerService_Query_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *dataBrokerServiceClient) ReleaseLease(ctx context.Context, in *ReleaseLeaseRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(emptypb.Empty)
|
||||
err := c.cc.Invoke(ctx, DataBrokerService_ReleaseLease_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *dataBrokerServiceClient) RenewLease(ctx context.Context, in *RenewLeaseRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(emptypb.Empty)
|
||||
err := c.cc.Invoke(ctx, DataBrokerService_RenewLease_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *dataBrokerServiceClient) SetOptions(ctx context.Context, in *SetOptionsRequest, opts ...grpc.CallOption) (*SetOptionsResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(SetOptionsResponse)
|
||||
err := c.cc.Invoke(ctx, DataBrokerService_SetOptions_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *dataBrokerServiceClient) Sync(ctx context.Context, in *SyncRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[SyncResponse], error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
stream, err := c.cc.NewStream(ctx, &DataBrokerService_ServiceDesc.Streams[0], DataBrokerService_Sync_FullMethodName, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
x := &grpc.GenericClientStream[SyncRequest, SyncResponse]{ClientStream: 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
|
||||
}
|
||||
|
||||
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
|
||||
type DataBrokerService_SyncClient = grpc.ServerStreamingClient[SyncResponse]
|
||||
|
||||
func (c *dataBrokerServiceClient) SyncLatest(ctx context.Context, in *SyncLatestRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[SyncLatestResponse], error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
stream, err := c.cc.NewStream(ctx, &DataBrokerService_ServiceDesc.Streams[1], DataBrokerService_SyncLatest_FullMethodName, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
x := &grpc.GenericClientStream[SyncLatestRequest, SyncLatestResponse]{ClientStream: 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
|
||||
}
|
||||
|
||||
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
|
||||
type DataBrokerService_SyncLatestClient = grpc.ServerStreamingClient[SyncLatestResponse]
|
||||
|
||||
// DataBrokerServiceServer is the server API for DataBrokerService service.
|
||||
// All implementations should embed UnimplementedDataBrokerServiceServer
|
||||
// for forward compatibility.
|
||||
//
|
||||
// The DataBrokerService stores key-value data.
|
||||
type DataBrokerServiceServer interface {
|
||||
// AcquireLease acquires a distributed mutex lease.
|
||||
AcquireLease(context.Context, *AcquireLeaseRequest) (*AcquireLeaseResponse, error)
|
||||
// Get gets a record.
|
||||
Get(context.Context, *GetRequest) (*GetResponse, error)
|
||||
// ListTypes lists all the known record types.
|
||||
ListTypes(context.Context, *emptypb.Empty) (*ListTypesResponse, error)
|
||||
// Put saves a record.
|
||||
Put(context.Context, *PutRequest) (*PutResponse, error)
|
||||
// Patch updates specific fields of an existing record.
|
||||
Patch(context.Context, *PatchRequest) (*PatchResponse, error)
|
||||
// Query queries for records.
|
||||
Query(context.Context, *QueryRequest) (*QueryResponse, error)
|
||||
// ReleaseLease releases a distributed mutex lease.
|
||||
ReleaseLease(context.Context, *ReleaseLeaseRequest) (*emptypb.Empty, error)
|
||||
// RenewLease renews a distributed mutex lease.
|
||||
RenewLease(context.Context, *RenewLeaseRequest) (*emptypb.Empty, error)
|
||||
// SetOptions sets the options for a type in the databroker.
|
||||
SetOptions(context.Context, *SetOptionsRequest) (*SetOptionsResponse, error)
|
||||
// Sync streams changes to records after the specified version.
|
||||
Sync(*SyncRequest, grpc.ServerStreamingServer[SyncResponse]) error
|
||||
// SyncLatest streams the latest version of every record.
|
||||
SyncLatest(*SyncLatestRequest, grpc.ServerStreamingServer[SyncLatestResponse]) error
|
||||
}
|
||||
|
||||
// UnimplementedDataBrokerServiceServer should be embedded to have
|
||||
// forward compatible implementations.
|
||||
//
|
||||
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
||||
// pointer dereference when methods are called.
|
||||
type UnimplementedDataBrokerServiceServer struct{}
|
||||
|
||||
func (UnimplementedDataBrokerServiceServer) AcquireLease(context.Context, *AcquireLeaseRequest) (*AcquireLeaseResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method AcquireLease not implemented")
|
||||
}
|
||||
func (UnimplementedDataBrokerServiceServer) Get(context.Context, *GetRequest) (*GetResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Get not implemented")
|
||||
}
|
||||
func (UnimplementedDataBrokerServiceServer) ListTypes(context.Context, *emptypb.Empty) (*ListTypesResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ListTypes not implemented")
|
||||
}
|
||||
func (UnimplementedDataBrokerServiceServer) Put(context.Context, *PutRequest) (*PutResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Put not implemented")
|
||||
}
|
||||
func (UnimplementedDataBrokerServiceServer) Patch(context.Context, *PatchRequest) (*PatchResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Patch not implemented")
|
||||
}
|
||||
func (UnimplementedDataBrokerServiceServer) Query(context.Context, *QueryRequest) (*QueryResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Query not implemented")
|
||||
}
|
||||
func (UnimplementedDataBrokerServiceServer) ReleaseLease(context.Context, *ReleaseLeaseRequest) (*emptypb.Empty, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ReleaseLease not implemented")
|
||||
}
|
||||
func (UnimplementedDataBrokerServiceServer) RenewLease(context.Context, *RenewLeaseRequest) (*emptypb.Empty, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method RenewLease not implemented")
|
||||
}
|
||||
func (UnimplementedDataBrokerServiceServer) SetOptions(context.Context, *SetOptionsRequest) (*SetOptionsResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method SetOptions not implemented")
|
||||
}
|
||||
func (UnimplementedDataBrokerServiceServer) Sync(*SyncRequest, grpc.ServerStreamingServer[SyncResponse]) error {
|
||||
return status.Errorf(codes.Unimplemented, "method Sync not implemented")
|
||||
}
|
||||
func (UnimplementedDataBrokerServiceServer) SyncLatest(*SyncLatestRequest, grpc.ServerStreamingServer[SyncLatestResponse]) error {
|
||||
return status.Errorf(codes.Unimplemented, "method SyncLatest not implemented")
|
||||
}
|
||||
func (UnimplementedDataBrokerServiceServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafeDataBrokerServiceServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to DataBrokerServiceServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeDataBrokerServiceServer interface {
|
||||
mustEmbedUnimplementedDataBrokerServiceServer()
|
||||
}
|
||||
|
||||
func RegisterDataBrokerServiceServer(s grpc.ServiceRegistrar, srv DataBrokerServiceServer) {
|
||||
// If the following call pancis, it indicates UnimplementedDataBrokerServiceServer was
|
||||
// embedded by pointer and is nil. This will cause panics if an
|
||||
// unimplemented method is ever invoked, so we test this at initialization
|
||||
// time to prevent it from happening at runtime later due to I/O.
|
||||
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
||||
t.testEmbeddedByValue()
|
||||
}
|
||||
s.RegisterService(&DataBrokerService_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _DataBrokerService_AcquireLease_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(AcquireLeaseRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(DataBrokerServiceServer).AcquireLease(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: DataBrokerService_AcquireLease_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(DataBrokerServiceServer).AcquireLease(ctx, req.(*AcquireLeaseRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _DataBrokerService_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(DataBrokerServiceServer).Get(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: DataBrokerService_Get_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(DataBrokerServiceServer).Get(ctx, req.(*GetRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _DataBrokerService_ListTypes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(emptypb.Empty)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(DataBrokerServiceServer).ListTypes(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: DataBrokerService_ListTypes_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(DataBrokerServiceServer).ListTypes(ctx, req.(*emptypb.Empty))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _DataBrokerService_Put_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(PutRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(DataBrokerServiceServer).Put(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: DataBrokerService_Put_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(DataBrokerServiceServer).Put(ctx, req.(*PutRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _DataBrokerService_Patch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(PatchRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(DataBrokerServiceServer).Patch(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: DataBrokerService_Patch_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(DataBrokerServiceServer).Patch(ctx, req.(*PatchRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _DataBrokerService_Query_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(QueryRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(DataBrokerServiceServer).Query(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: DataBrokerService_Query_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(DataBrokerServiceServer).Query(ctx, req.(*QueryRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _DataBrokerService_ReleaseLease_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ReleaseLeaseRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(DataBrokerServiceServer).ReleaseLease(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: DataBrokerService_ReleaseLease_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(DataBrokerServiceServer).ReleaseLease(ctx, req.(*ReleaseLeaseRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _DataBrokerService_RenewLease_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(RenewLeaseRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(DataBrokerServiceServer).RenewLease(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: DataBrokerService_RenewLease_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(DataBrokerServiceServer).RenewLease(ctx, req.(*RenewLeaseRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _DataBrokerService_SetOptions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(SetOptionsRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(DataBrokerServiceServer).SetOptions(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: DataBrokerService_SetOptions_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(DataBrokerServiceServer).SetOptions(ctx, req.(*SetOptionsRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _DataBrokerService_Sync_Handler(srv interface{}, stream grpc.ServerStream) error {
|
||||
m := new(SyncRequest)
|
||||
if err := stream.RecvMsg(m); err != nil {
|
||||
return err
|
||||
}
|
||||
return srv.(DataBrokerServiceServer).Sync(m, &grpc.GenericServerStream[SyncRequest, SyncResponse]{ServerStream: stream})
|
||||
}
|
||||
|
||||
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
|
||||
type DataBrokerService_SyncServer = grpc.ServerStreamingServer[SyncResponse]
|
||||
|
||||
func _DataBrokerService_SyncLatest_Handler(srv interface{}, stream grpc.ServerStream) error {
|
||||
m := new(SyncLatestRequest)
|
||||
if err := stream.RecvMsg(m); err != nil {
|
||||
return err
|
||||
}
|
||||
return srv.(DataBrokerServiceServer).SyncLatest(m, &grpc.GenericServerStream[SyncLatestRequest, SyncLatestResponse]{ServerStream: stream})
|
||||
}
|
||||
|
||||
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
|
||||
type DataBrokerService_SyncLatestServer = grpc.ServerStreamingServer[SyncLatestResponse]
|
||||
|
||||
// DataBrokerService_ServiceDesc is the grpc.ServiceDesc for DataBrokerService service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var DataBrokerService_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "databroker.DataBrokerService",
|
||||
HandlerType: (*DataBrokerServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "AcquireLease",
|
||||
Handler: _DataBrokerService_AcquireLease_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Get",
|
||||
Handler: _DataBrokerService_Get_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ListTypes",
|
||||
Handler: _DataBrokerService_ListTypes_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Put",
|
||||
Handler: _DataBrokerService_Put_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Patch",
|
||||
Handler: _DataBrokerService_Patch_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Query",
|
||||
Handler: _DataBrokerService_Query_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ReleaseLease",
|
||||
Handler: _DataBrokerService_ReleaseLease_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "RenewLease",
|
||||
Handler: _DataBrokerService_RenewLease_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "SetOptions",
|
||||
Handler: _DataBrokerService_SetOptions_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{
|
||||
{
|
||||
StreamName: "Sync",
|
||||
Handler: _DataBrokerService_Sync_Handler,
|
||||
ServerStreams: true,
|
||||
},
|
||||
{
|
||||
StreamName: "SyncLatest",
|
||||
Handler: _DataBrokerService_SyncLatest_Handler,
|
||||
ServerStreams: true,
|
||||
},
|
||||
},
|
||||
Metadata: "databroker.proto",
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue