|
|
|
@ -1,6 +1,6 @@ |
|
|
|
|
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
|
|
|
|
// versions:
|
|
|
|
|
// - protoc-gen-go-grpc v1.4.0
|
|
|
|
|
// - protoc-gen-go-grpc v1.5.1
|
|
|
|
|
// - protoc (unknown)
|
|
|
|
|
// source: resource.proto
|
|
|
|
|
|
|
|
|
@ -15,17 +15,16 @@ import ( |
|
|
|
|
|
|
|
|
|
// 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.62.0 or later.
|
|
|
|
|
const _ = grpc.SupportPackageIsVersion8 |
|
|
|
|
// Requires gRPC-Go v1.64.0 or later.
|
|
|
|
|
const _ = grpc.SupportPackageIsVersion9 |
|
|
|
|
|
|
|
|
|
const ( |
|
|
|
|
ResourceStore_Read_FullMethodName = "/resource.ResourceStore/Read" |
|
|
|
|
ResourceStore_Create_FullMethodName = "/resource.ResourceStore/Create" |
|
|
|
|
ResourceStore_Update_FullMethodName = "/resource.ResourceStore/Update" |
|
|
|
|
ResourceStore_Delete_FullMethodName = "/resource.ResourceStore/Delete" |
|
|
|
|
ResourceStore_Restore_FullMethodName = "/resource.ResourceStore/Restore" |
|
|
|
|
ResourceStore_List_FullMethodName = "/resource.ResourceStore/List" |
|
|
|
|
ResourceStore_Watch_FullMethodName = "/resource.ResourceStore/Watch" |
|
|
|
|
ResourceStore_Read_FullMethodName = "/resource.ResourceStore/Read" |
|
|
|
|
ResourceStore_Create_FullMethodName = "/resource.ResourceStore/Create" |
|
|
|
|
ResourceStore_Update_FullMethodName = "/resource.ResourceStore/Update" |
|
|
|
|
ResourceStore_Delete_FullMethodName = "/resource.ResourceStore/Delete" |
|
|
|
|
ResourceStore_List_FullMethodName = "/resource.ResourceStore/List" |
|
|
|
|
ResourceStore_Watch_FullMethodName = "/resource.ResourceStore/Watch" |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
// ResourceStoreClient is the client API for ResourceStore service.
|
|
|
|
@ -41,7 +40,6 @@ type ResourceStoreClient interface { |
|
|
|
|
Create(ctx context.Context, in *CreateRequest, opts ...grpc.CallOption) (*CreateResponse, error) |
|
|
|
|
Update(ctx context.Context, in *UpdateRequest, opts ...grpc.CallOption) (*UpdateResponse, error) |
|
|
|
|
Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*DeleteResponse, error) |
|
|
|
|
Restore(ctx context.Context, in *RestoreRequest, opts ...grpc.CallOption) (*RestoreResponse, error) |
|
|
|
|
// The results *may* include values that should not be returned to the user
|
|
|
|
|
// This will perform best-effort filtering to increase performace.
|
|
|
|
|
// NOTE: storage.Interface is ultimatly responsible for the final filtering
|
|
|
|
@ -49,7 +47,7 @@ type ResourceStoreClient interface { |
|
|
|
|
// The results *may* include values that should not be returned to the user
|
|
|
|
|
// This will perform best-effort filtering to increase performace.
|
|
|
|
|
// NOTE: storage.Interface is ultimatly responsible for the final filtering
|
|
|
|
|
Watch(ctx context.Context, in *WatchRequest, opts ...grpc.CallOption) (ResourceStore_WatchClient, error) |
|
|
|
|
Watch(ctx context.Context, in *WatchRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[WatchEvent], error) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
type resourceStoreClient struct { |
|
|
|
@ -100,16 +98,6 @@ func (c *resourceStoreClient) Delete(ctx context.Context, in *DeleteRequest, opt |
|
|
|
|
return out, nil |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
func (c *resourceStoreClient) Restore(ctx context.Context, in *RestoreRequest, opts ...grpc.CallOption) (*RestoreResponse, error) { |
|
|
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) |
|
|
|
|
out := new(RestoreResponse) |
|
|
|
|
err := c.cc.Invoke(ctx, ResourceStore_Restore_FullMethodName, in, out, cOpts...) |
|
|
|
|
if err != nil { |
|
|
|
|
return nil, err |
|
|
|
|
} |
|
|
|
|
return out, nil |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
func (c *resourceStoreClient) List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error) { |
|
|
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) |
|
|
|
|
out := new(ListResponse) |
|
|
|
@ -120,13 +108,13 @@ func (c *resourceStoreClient) List(ctx context.Context, in *ListRequest, opts .. |
|
|
|
|
return out, nil |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
func (c *resourceStoreClient) Watch(ctx context.Context, in *WatchRequest, opts ...grpc.CallOption) (ResourceStore_WatchClient, error) { |
|
|
|
|
func (c *resourceStoreClient) Watch(ctx context.Context, in *WatchRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[WatchEvent], error) { |
|
|
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) |
|
|
|
|
stream, err := c.cc.NewStream(ctx, &ResourceStore_ServiceDesc.Streams[0], ResourceStore_Watch_FullMethodName, cOpts...) |
|
|
|
|
if err != nil { |
|
|
|
|
return nil, err |
|
|
|
|
} |
|
|
|
|
x := &resourceStoreWatchClient{ClientStream: stream} |
|
|
|
|
x := &grpc.GenericClientStream[WatchRequest, WatchEvent]{ClientStream: stream} |
|
|
|
|
if err := x.ClientStream.SendMsg(in); err != nil { |
|
|
|
|
return nil, err |
|
|
|
|
} |
|
|
|
@ -136,26 +124,12 @@ func (c *resourceStoreClient) Watch(ctx context.Context, in *WatchRequest, opts |
|
|
|
|
return x, nil |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
type ResourceStore_WatchClient interface { |
|
|
|
|
Recv() (*WatchEvent, error) |
|
|
|
|
grpc.ClientStream |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
type resourceStoreWatchClient struct { |
|
|
|
|
grpc.ClientStream |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
func (x *resourceStoreWatchClient) Recv() (*WatchEvent, error) { |
|
|
|
|
m := new(WatchEvent) |
|
|
|
|
if err := x.ClientStream.RecvMsg(m); err != nil { |
|
|
|
|
return nil, err |
|
|
|
|
} |
|
|
|
|
return m, nil |
|
|
|
|
} |
|
|
|
|
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
|
|
|
|
|
type ResourceStore_WatchClient = grpc.ServerStreamingClient[WatchEvent] |
|
|
|
|
|
|
|
|
|
// ResourceStoreServer is the server API for ResourceStore service.
|
|
|
|
|
// All implementations should embed UnimplementedResourceStoreServer
|
|
|
|
|
// for forward compatibility
|
|
|
|
|
// for forward compatibility.
|
|
|
|
|
//
|
|
|
|
|
// This provides the CRUD+List+Watch support needed for a k8s apiserver
|
|
|
|
|
// The semantics and behaviors of this service are constrained by kubernetes
|
|
|
|
@ -166,7 +140,6 @@ type ResourceStoreServer interface { |
|
|
|
|
Create(context.Context, *CreateRequest) (*CreateResponse, error) |
|
|
|
|
Update(context.Context, *UpdateRequest) (*UpdateResponse, error) |
|
|
|
|
Delete(context.Context, *DeleteRequest) (*DeleteResponse, error) |
|
|
|
|
Restore(context.Context, *RestoreRequest) (*RestoreResponse, error) |
|
|
|
|
// The results *may* include values that should not be returned to the user
|
|
|
|
|
// This will perform best-effort filtering to increase performace.
|
|
|
|
|
// NOTE: storage.Interface is ultimatly responsible for the final filtering
|
|
|
|
@ -174,12 +147,15 @@ type ResourceStoreServer interface { |
|
|
|
|
// The results *may* include values that should not be returned to the user
|
|
|
|
|
// This will perform best-effort filtering to increase performace.
|
|
|
|
|
// NOTE: storage.Interface is ultimatly responsible for the final filtering
|
|
|
|
|
Watch(*WatchRequest, ResourceStore_WatchServer) error |
|
|
|
|
Watch(*WatchRequest, grpc.ServerStreamingServer[WatchEvent]) error |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// UnimplementedResourceStoreServer should be embedded to have forward compatible implementations.
|
|
|
|
|
type UnimplementedResourceStoreServer struct { |
|
|
|
|
} |
|
|
|
|
// UnimplementedResourceStoreServer 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 UnimplementedResourceStoreServer struct{} |
|
|
|
|
|
|
|
|
|
func (UnimplementedResourceStoreServer) Read(context.Context, *ReadRequest) (*ReadResponse, error) { |
|
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method Read not implemented") |
|
|
|
@ -193,15 +169,13 @@ func (UnimplementedResourceStoreServer) Update(context.Context, *UpdateRequest) |
|
|
|
|
func (UnimplementedResourceStoreServer) Delete(context.Context, *DeleteRequest) (*DeleteResponse, error) { |
|
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented") |
|
|
|
|
} |
|
|
|
|
func (UnimplementedResourceStoreServer) Restore(context.Context, *RestoreRequest) (*RestoreResponse, error) { |
|
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method Restore not implemented") |
|
|
|
|
} |
|
|
|
|
func (UnimplementedResourceStoreServer) List(context.Context, *ListRequest) (*ListResponse, error) { |
|
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method List not implemented") |
|
|
|
|
} |
|
|
|
|
func (UnimplementedResourceStoreServer) Watch(*WatchRequest, ResourceStore_WatchServer) error { |
|
|
|
|
func (UnimplementedResourceStoreServer) Watch(*WatchRequest, grpc.ServerStreamingServer[WatchEvent]) error { |
|
|
|
|
return status.Errorf(codes.Unimplemented, "method Watch not implemented") |
|
|
|
|
} |
|
|
|
|
func (UnimplementedResourceStoreServer) testEmbeddedByValue() {} |
|
|
|
|
|
|
|
|
|
// UnsafeResourceStoreServer may be embedded to opt out of forward compatibility for this service.
|
|
|
|
|
// Use of this interface is not recommended, as added methods to ResourceStoreServer will
|
|
|
|
@ -211,6 +185,13 @@ type UnsafeResourceStoreServer interface { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
func RegisterResourceStoreServer(s grpc.ServiceRegistrar, srv ResourceStoreServer) { |
|
|
|
|
// If the following call pancis, it indicates UnimplementedResourceStoreServer 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(&ResourceStore_ServiceDesc, srv) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -286,24 +267,6 @@ func _ResourceStore_Delete_Handler(srv interface{}, ctx context.Context, dec fun |
|
|
|
|
return interceptor(ctx, in, info, handler) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
func _ResourceStore_Restore_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
|
|
|
|
in := new(RestoreRequest) |
|
|
|
|
if err := dec(in); err != nil { |
|
|
|
|
return nil, err |
|
|
|
|
} |
|
|
|
|
if interceptor == nil { |
|
|
|
|
return srv.(ResourceStoreServer).Restore(ctx, in) |
|
|
|
|
} |
|
|
|
|
info := &grpc.UnaryServerInfo{ |
|
|
|
|
Server: srv, |
|
|
|
|
FullMethod: ResourceStore_Restore_FullMethodName, |
|
|
|
|
} |
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
|
|
|
|
return srv.(ResourceStoreServer).Restore(ctx, req.(*RestoreRequest)) |
|
|
|
|
} |
|
|
|
|
return interceptor(ctx, in, info, handler) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
func _ResourceStore_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
|
|
|
|
in := new(ListRequest) |
|
|
|
|
if err := dec(in); err != nil { |
|
|
|
@ -327,21 +290,11 @@ func _ResourceStore_Watch_Handler(srv interface{}, stream grpc.ServerStream) err |
|
|
|
|
if err := stream.RecvMsg(m); err != nil { |
|
|
|
|
return err |
|
|
|
|
} |
|
|
|
|
return srv.(ResourceStoreServer).Watch(m, &resourceStoreWatchServer{ServerStream: stream}) |
|
|
|
|
return srv.(ResourceStoreServer).Watch(m, &grpc.GenericServerStream[WatchRequest, WatchEvent]{ServerStream: stream}) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
type ResourceStore_WatchServer interface { |
|
|
|
|
Send(*WatchEvent) error |
|
|
|
|
grpc.ServerStream |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
type resourceStoreWatchServer struct { |
|
|
|
|
grpc.ServerStream |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
func (x *resourceStoreWatchServer) Send(m *WatchEvent) error { |
|
|
|
|
return x.ServerStream.SendMsg(m) |
|
|
|
|
} |
|
|
|
|
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
|
|
|
|
|
type ResourceStore_WatchServer = grpc.ServerStreamingServer[WatchEvent] |
|
|
|
|
|
|
|
|
|
// ResourceStore_ServiceDesc is the grpc.ServiceDesc for ResourceStore service.
|
|
|
|
|
// It's only intended for direct use with grpc.RegisterService,
|
|
|
|
@ -366,10 +319,6 @@ var ResourceStore_ServiceDesc = grpc.ServiceDesc{ |
|
|
|
|
MethodName: "Delete", |
|
|
|
|
Handler: _ResourceStore_Delete_Handler, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
MethodName: "Restore", |
|
|
|
|
Handler: _ResourceStore_Restore_Handler, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
MethodName: "List", |
|
|
|
|
Handler: _ResourceStore_List_Handler, |
|
|
|
@ -396,7 +345,7 @@ type BulkStoreClient interface { |
|
|
|
|
// Write multiple resources to the same Namespace/Group/Resource
|
|
|
|
|
// Events will not be sent until the stream is complete
|
|
|
|
|
// Only the *create* permissions is checked
|
|
|
|
|
BulkProcess(ctx context.Context, opts ...grpc.CallOption) (BulkStore_BulkProcessClient, error) |
|
|
|
|
BulkProcess(ctx context.Context, opts ...grpc.CallOption) (grpc.ClientStreamingClient[BulkRequest, BulkResponse], error) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
type bulkStoreClient struct { |
|
|
|
@ -407,58 +356,40 @@ func NewBulkStoreClient(cc grpc.ClientConnInterface) BulkStoreClient { |
|
|
|
|
return &bulkStoreClient{cc} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
func (c *bulkStoreClient) BulkProcess(ctx context.Context, opts ...grpc.CallOption) (BulkStore_BulkProcessClient, error) { |
|
|
|
|
func (c *bulkStoreClient) BulkProcess(ctx context.Context, opts ...grpc.CallOption) (grpc.ClientStreamingClient[BulkRequest, BulkResponse], error) { |
|
|
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) |
|
|
|
|
stream, err := c.cc.NewStream(ctx, &BulkStore_ServiceDesc.Streams[0], BulkStore_BulkProcess_FullMethodName, cOpts...) |
|
|
|
|
if err != nil { |
|
|
|
|
return nil, err |
|
|
|
|
} |
|
|
|
|
x := &bulkStoreBulkProcessClient{ClientStream: stream} |
|
|
|
|
x := &grpc.GenericClientStream[BulkRequest, BulkResponse]{ClientStream: stream} |
|
|
|
|
return x, nil |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
type BulkStore_BulkProcessClient interface { |
|
|
|
|
Send(*BulkRequest) error |
|
|
|
|
CloseAndRecv() (*BulkResponse, error) |
|
|
|
|
grpc.ClientStream |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
type bulkStoreBulkProcessClient struct { |
|
|
|
|
grpc.ClientStream |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
func (x *bulkStoreBulkProcessClient) Send(m *BulkRequest) error { |
|
|
|
|
return x.ClientStream.SendMsg(m) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
func (x *bulkStoreBulkProcessClient) CloseAndRecv() (*BulkResponse, error) { |
|
|
|
|
if err := x.ClientStream.CloseSend(); err != nil { |
|
|
|
|
return nil, err |
|
|
|
|
} |
|
|
|
|
m := new(BulkResponse) |
|
|
|
|
if err := x.ClientStream.RecvMsg(m); err != nil { |
|
|
|
|
return nil, err |
|
|
|
|
} |
|
|
|
|
return m, nil |
|
|
|
|
} |
|
|
|
|
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
|
|
|
|
|
type BulkStore_BulkProcessClient = grpc.ClientStreamingClient[BulkRequest, BulkResponse] |
|
|
|
|
|
|
|
|
|
// BulkStoreServer is the server API for BulkStore service.
|
|
|
|
|
// All implementations should embed UnimplementedBulkStoreServer
|
|
|
|
|
// for forward compatibility
|
|
|
|
|
// for forward compatibility.
|
|
|
|
|
type BulkStoreServer interface { |
|
|
|
|
// Write multiple resources to the same Namespace/Group/Resource
|
|
|
|
|
// Events will not be sent until the stream is complete
|
|
|
|
|
// Only the *create* permissions is checked
|
|
|
|
|
BulkProcess(BulkStore_BulkProcessServer) error |
|
|
|
|
BulkProcess(grpc.ClientStreamingServer[BulkRequest, BulkResponse]) error |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// UnimplementedBulkStoreServer should be embedded to have forward compatible implementations.
|
|
|
|
|
type UnimplementedBulkStoreServer struct { |
|
|
|
|
} |
|
|
|
|
// UnimplementedBulkStoreServer 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 UnimplementedBulkStoreServer struct{} |
|
|
|
|
|
|
|
|
|
func (UnimplementedBulkStoreServer) BulkProcess(BulkStore_BulkProcessServer) error { |
|
|
|
|
func (UnimplementedBulkStoreServer) BulkProcess(grpc.ClientStreamingServer[BulkRequest, BulkResponse]) error { |
|
|
|
|
return status.Errorf(codes.Unimplemented, "method BulkProcess not implemented") |
|
|
|
|
} |
|
|
|
|
func (UnimplementedBulkStoreServer) testEmbeddedByValue() {} |
|
|
|
|
|
|
|
|
|
// UnsafeBulkStoreServer may be embedded to opt out of forward compatibility for this service.
|
|
|
|
|
// Use of this interface is not recommended, as added methods to BulkStoreServer will
|
|
|
|
@ -468,34 +399,22 @@ type UnsafeBulkStoreServer interface { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
func RegisterBulkStoreServer(s grpc.ServiceRegistrar, srv BulkStoreServer) { |
|
|
|
|
// If the following call pancis, it indicates UnimplementedBulkStoreServer 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(&BulkStore_ServiceDesc, srv) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
func _BulkStore_BulkProcess_Handler(srv interface{}, stream grpc.ServerStream) error { |
|
|
|
|
return srv.(BulkStoreServer).BulkProcess(&bulkStoreBulkProcessServer{ServerStream: stream}) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
type BulkStore_BulkProcessServer interface { |
|
|
|
|
SendAndClose(*BulkResponse) error |
|
|
|
|
Recv() (*BulkRequest, error) |
|
|
|
|
grpc.ServerStream |
|
|
|
|
return srv.(BulkStoreServer).BulkProcess(&grpc.GenericServerStream[BulkRequest, BulkResponse]{ServerStream: stream}) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
type bulkStoreBulkProcessServer struct { |
|
|
|
|
grpc.ServerStream |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
func (x *bulkStoreBulkProcessServer) SendAndClose(m *BulkResponse) error { |
|
|
|
|
return x.ServerStream.SendMsg(m) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
func (x *bulkStoreBulkProcessServer) Recv() (*BulkRequest, error) { |
|
|
|
|
m := new(BulkRequest) |
|
|
|
|
if err := x.ServerStream.RecvMsg(m); err != nil { |
|
|
|
|
return nil, err |
|
|
|
|
} |
|
|
|
|
return m, nil |
|
|
|
|
} |
|
|
|
|
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
|
|
|
|
|
type BulkStore_BulkProcessServer = grpc.ClientStreamingServer[BulkRequest, BulkResponse] |
|
|
|
|
|
|
|
|
|
// BulkStore_ServiceDesc is the grpc.ServiceDesc for BulkStore service.
|
|
|
|
|
// It's only intended for direct use with grpc.RegisterService,
|
|
|
|
@ -561,7 +480,7 @@ func (c *resourceIndexClient) GetStats(ctx context.Context, in *ResourceStatsReq |
|
|
|
|
|
|
|
|
|
// ResourceIndexServer is the server API for ResourceIndex service.
|
|
|
|
|
// All implementations should embed UnimplementedResourceIndexServer
|
|
|
|
|
// for forward compatibility
|
|
|
|
|
// for forward compatibility.
|
|
|
|
|
//
|
|
|
|
|
// Unlike the ResourceStore, this service can be exposed to clients directly
|
|
|
|
|
// It should be implemented with efficient indexes and does not need read-after-write semantics
|
|
|
|
@ -571,9 +490,12 @@ type ResourceIndexServer interface { |
|
|
|
|
GetStats(context.Context, *ResourceStatsRequest) (*ResourceStatsResponse, error) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// UnimplementedResourceIndexServer should be embedded to have forward compatible implementations.
|
|
|
|
|
type UnimplementedResourceIndexServer struct { |
|
|
|
|
} |
|
|
|
|
// UnimplementedResourceIndexServer 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 UnimplementedResourceIndexServer struct{} |
|
|
|
|
|
|
|
|
|
func (UnimplementedResourceIndexServer) Search(context.Context, *ResourceSearchRequest) (*ResourceSearchResponse, error) { |
|
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method Search not implemented") |
|
|
|
@ -581,6 +503,7 @@ func (UnimplementedResourceIndexServer) Search(context.Context, *ResourceSearchR |
|
|
|
|
func (UnimplementedResourceIndexServer) GetStats(context.Context, *ResourceStatsRequest) (*ResourceStatsResponse, error) { |
|
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method GetStats not implemented") |
|
|
|
|
} |
|
|
|
|
func (UnimplementedResourceIndexServer) testEmbeddedByValue() {} |
|
|
|
|
|
|
|
|
|
// UnsafeResourceIndexServer may be embedded to opt out of forward compatibility for this service.
|
|
|
|
|
// Use of this interface is not recommended, as added methods to ResourceIndexServer will
|
|
|
|
@ -590,6 +513,13 @@ type UnsafeResourceIndexServer interface { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
func RegisterResourceIndexServer(s grpc.ServiceRegistrar, srv ResourceIndexServer) { |
|
|
|
|
// If the following call pancis, it indicates UnimplementedResourceIndexServer 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(&ResourceIndex_ServiceDesc, srv) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -697,7 +627,7 @@ func (c *managedObjectIndexClient) ListManagedObjects(ctx context.Context, in *L |
|
|
|
|
|
|
|
|
|
// ManagedObjectIndexServer is the server API for ManagedObjectIndex service.
|
|
|
|
|
// All implementations should embed UnimplementedManagedObjectIndexServer
|
|
|
|
|
// for forward compatibility
|
|
|
|
|
// for forward compatibility.
|
|
|
|
|
//
|
|
|
|
|
// Query managed objects
|
|
|
|
|
// Results access control is based on access to the repository *not* the items
|
|
|
|
@ -708,9 +638,12 @@ type ManagedObjectIndexServer interface { |
|
|
|
|
ListManagedObjects(context.Context, *ListManagedObjectsRequest) (*ListManagedObjectsResponse, error) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// UnimplementedManagedObjectIndexServer should be embedded to have forward compatible implementations.
|
|
|
|
|
type UnimplementedManagedObjectIndexServer struct { |
|
|
|
|
} |
|
|
|
|
// UnimplementedManagedObjectIndexServer 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 UnimplementedManagedObjectIndexServer struct{} |
|
|
|
|
|
|
|
|
|
func (UnimplementedManagedObjectIndexServer) CountManagedObjects(context.Context, *CountManagedObjectsRequest) (*CountManagedObjectsResponse, error) { |
|
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method CountManagedObjects not implemented") |
|
|
|
@ -718,6 +651,7 @@ func (UnimplementedManagedObjectIndexServer) CountManagedObjects(context.Context |
|
|
|
|
func (UnimplementedManagedObjectIndexServer) ListManagedObjects(context.Context, *ListManagedObjectsRequest) (*ListManagedObjectsResponse, error) { |
|
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method ListManagedObjects not implemented") |
|
|
|
|
} |
|
|
|
|
func (UnimplementedManagedObjectIndexServer) testEmbeddedByValue() {} |
|
|
|
|
|
|
|
|
|
// UnsafeManagedObjectIndexServer may be embedded to opt out of forward compatibility for this service.
|
|
|
|
|
// Use of this interface is not recommended, as added methods to ManagedObjectIndexServer will
|
|
|
|
@ -727,6 +661,13 @@ type UnsafeManagedObjectIndexServer interface { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
func RegisterManagedObjectIndexServer(s grpc.ServiceRegistrar, srv ManagedObjectIndexServer) { |
|
|
|
|
// If the following call pancis, it indicates UnimplementedManagedObjectIndexServer 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(&ManagedObjectIndex_ServiceDesc, srv) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -832,7 +773,7 @@ func (c *blobStoreClient) GetBlob(ctx context.Context, in *GetBlobRequest, opts |
|
|
|
|
|
|
|
|
|
// BlobStoreServer is the server API for BlobStore service.
|
|
|
|
|
// All implementations should embed UnimplementedBlobStoreServer
|
|
|
|
|
// for forward compatibility
|
|
|
|
|
// for forward compatibility.
|
|
|
|
|
type BlobStoreServer interface { |
|
|
|
|
// Upload a blob that will be saved in a resource
|
|
|
|
|
PutBlob(context.Context, *PutBlobRequest) (*PutBlobResponse, error) |
|
|
|
@ -841,9 +782,12 @@ type BlobStoreServer interface { |
|
|
|
|
GetBlob(context.Context, *GetBlobRequest) (*GetBlobResponse, error) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// UnimplementedBlobStoreServer should be embedded to have forward compatible implementations.
|
|
|
|
|
type UnimplementedBlobStoreServer struct { |
|
|
|
|
} |
|
|
|
|
// UnimplementedBlobStoreServer 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 UnimplementedBlobStoreServer struct{} |
|
|
|
|
|
|
|
|
|
func (UnimplementedBlobStoreServer) PutBlob(context.Context, *PutBlobRequest) (*PutBlobResponse, error) { |
|
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method PutBlob not implemented") |
|
|
|
@ -851,6 +795,7 @@ func (UnimplementedBlobStoreServer) PutBlob(context.Context, *PutBlobRequest) (* |
|
|
|
|
func (UnimplementedBlobStoreServer) GetBlob(context.Context, *GetBlobRequest) (*GetBlobResponse, error) { |
|
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method GetBlob not implemented") |
|
|
|
|
} |
|
|
|
|
func (UnimplementedBlobStoreServer) testEmbeddedByValue() {} |
|
|
|
|
|
|
|
|
|
// UnsafeBlobStoreServer may be embedded to opt out of forward compatibility for this service.
|
|
|
|
|
// Use of this interface is not recommended, as added methods to BlobStoreServer will
|
|
|
|
@ -860,6 +805,13 @@ type UnsafeBlobStoreServer interface { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
func RegisterBlobStoreServer(s grpc.ServiceRegistrar, srv BlobStoreServer) { |
|
|
|
|
// If the following call pancis, it indicates UnimplementedBlobStoreServer 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(&BlobStore_ServiceDesc, srv) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -954,7 +906,7 @@ func (c *diagnosticsClient) IsHealthy(ctx context.Context, in *HealthCheckReques |
|
|
|
|
|
|
|
|
|
// DiagnosticsServer is the server API for Diagnostics service.
|
|
|
|
|
// All implementations should embed UnimplementedDiagnosticsServer
|
|
|
|
|
// for forward compatibility
|
|
|
|
|
// for forward compatibility.
|
|
|
|
|
//
|
|
|
|
|
// Clients can use this service directly
|
|
|
|
|
// NOTE: This is read only, and no read afer write guarantees
|
|
|
|
@ -963,13 +915,17 @@ type DiagnosticsServer interface { |
|
|
|
|
IsHealthy(context.Context, *HealthCheckRequest) (*HealthCheckResponse, error) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// UnimplementedDiagnosticsServer should be embedded to have forward compatible implementations.
|
|
|
|
|
type UnimplementedDiagnosticsServer struct { |
|
|
|
|
} |
|
|
|
|
// UnimplementedDiagnosticsServer 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 UnimplementedDiagnosticsServer struct{} |
|
|
|
|
|
|
|
|
|
func (UnimplementedDiagnosticsServer) IsHealthy(context.Context, *HealthCheckRequest) (*HealthCheckResponse, error) { |
|
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method IsHealthy not implemented") |
|
|
|
|
} |
|
|
|
|
func (UnimplementedDiagnosticsServer) testEmbeddedByValue() {} |
|
|
|
|
|
|
|
|
|
// UnsafeDiagnosticsServer may be embedded to opt out of forward compatibility for this service.
|
|
|
|
|
// Use of this interface is not recommended, as added methods to DiagnosticsServer will
|
|
|
|
@ -979,6 +935,13 @@ type UnsafeDiagnosticsServer interface { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
func RegisterDiagnosticsServer(s grpc.ServiceRegistrar, srv DiagnosticsServer) { |
|
|
|
|
// If the following call pancis, it indicates UnimplementedDiagnosticsServer 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(&Diagnostics_ServiceDesc, srv) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|