2022-09-10 19:56:32 +00:00
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
2022-10-29 04:45:02 +00:00
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc v3.12.4
// source: datastore.proto
2022-09-10 19:56:32 +00:00
package datastore
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
// DatastoreServiceClient is the client API for DatastoreService 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 DatastoreServiceClient interface {
Get ( ctx context . Context , in * KeyMessage , opts ... grpc . CallOption ) ( * ObjectResponse , error )
Update ( ctx context . Context , in * UpdateMessage , opts ... grpc . CallOption ) ( * ObjectResponse , error )
Delete ( ctx context . Context , in * KeyMessage , opts ... grpc . CallOption ) ( * NullResponse , error )
}
type datastoreServiceClient struct {
cc grpc . ClientConnInterface
}
func NewDatastoreServiceClient ( cc grpc . ClientConnInterface ) DatastoreServiceClient {
return & datastoreServiceClient { cc }
}
func ( c * datastoreServiceClient ) Get ( ctx context . Context , in * KeyMessage , opts ... grpc . CallOption ) ( * ObjectResponse , error ) {
out := new ( ObjectResponse )
err := c . cc . Invoke ( ctx , "/datastore.DatastoreService/Get" , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
func ( c * datastoreServiceClient ) Update ( ctx context . Context , in * UpdateMessage , opts ... grpc . CallOption ) ( * ObjectResponse , error ) {
out := new ( ObjectResponse )
err := c . cc . Invoke ( ctx , "/datastore.DatastoreService/Update" , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
func ( c * datastoreServiceClient ) Delete ( ctx context . Context , in * KeyMessage , opts ... grpc . CallOption ) ( * NullResponse , error ) {
out := new ( NullResponse )
err := c . cc . Invoke ( ctx , "/datastore.DatastoreService/Delete" , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
// DatastoreServiceServer is the server API for DatastoreService service.
// All implementations must embed UnimplementedDatastoreServiceServer
// for forward compatibility
type DatastoreServiceServer interface {
Get ( context . Context , * KeyMessage ) ( * ObjectResponse , error )
Update ( context . Context , * UpdateMessage ) ( * ObjectResponse , error )
Delete ( context . Context , * KeyMessage ) ( * NullResponse , error )
mustEmbedUnimplementedDatastoreServiceServer ( )
}
// UnimplementedDatastoreServiceServer must be embedded to have forward compatible implementations.
type UnimplementedDatastoreServiceServer struct {
}
func ( UnimplementedDatastoreServiceServer ) Get ( context . Context , * KeyMessage ) ( * ObjectResponse , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method Get not implemented" )
}
func ( UnimplementedDatastoreServiceServer ) Update ( context . Context , * UpdateMessage ) ( * ObjectResponse , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method Update not implemented" )
}
func ( UnimplementedDatastoreServiceServer ) Delete ( context . Context , * KeyMessage ) ( * NullResponse , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method Delete not implemented" )
}
func ( UnimplementedDatastoreServiceServer ) mustEmbedUnimplementedDatastoreServiceServer ( ) { }
// UnsafeDatastoreServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to DatastoreServiceServer will
// result in compilation errors.
type UnsafeDatastoreServiceServer interface {
mustEmbedUnimplementedDatastoreServiceServer ( )
}
func RegisterDatastoreServiceServer ( s grpc . ServiceRegistrar , srv DatastoreServiceServer ) {
s . RegisterService ( & DatastoreService_ServiceDesc , srv )
}
func _DatastoreService_Get_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( KeyMessage )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( DatastoreServiceServer ) . Get ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : "/datastore.DatastoreService/Get" ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( DatastoreServiceServer ) . Get ( ctx , req . ( * KeyMessage ) )
}
return interceptor ( ctx , in , info , handler )
}
func _DatastoreService_Update_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( UpdateMessage )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( DatastoreServiceServer ) . Update ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : "/datastore.DatastoreService/Update" ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( DatastoreServiceServer ) . Update ( ctx , req . ( * UpdateMessage ) )
}
return interceptor ( ctx , in , info , handler )
}
func _DatastoreService_Delete_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( KeyMessage )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( DatastoreServiceServer ) . Delete ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : "/datastore.DatastoreService/Delete" ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( DatastoreServiceServer ) . Delete ( ctx , req . ( * KeyMessage ) )
}
return interceptor ( ctx , in , info , handler )
}
// DatastoreService_ServiceDesc is the grpc.ServiceDesc for DatastoreService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var DatastoreService_ServiceDesc = grpc . ServiceDesc {
ServiceName : "datastore.DatastoreService" ,
HandlerType : ( * DatastoreServiceServer ) ( nil ) ,
Methods : [ ] grpc . MethodDesc {
{
MethodName : "Get" ,
Handler : _DatastoreService_Get_Handler ,
} ,
{
MethodName : "Update" ,
Handler : _DatastoreService_Update_Handler ,
} ,
{
MethodName : "Delete" ,
Handler : _DatastoreService_Delete_Handler ,
} ,
} ,
Streams : [ ] grpc . StreamDesc { } ,
Metadata : "datastore.proto" ,
}