Nexus/pkg/proto/database_grpc.pb.go

106 lines
3.8 KiB
Go
Raw Normal View History

2024-10-20 11:04:41 +00:00
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
2024-10-20 11:04:41 +00:00
// - protoc v5.28.2
// source: database.proto
package proto
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
2024-10-20 11:04:41 +00:00
2024-10-21 14:07:36 +00:00
// DatabaseServiceClient is the client API for DatabaseService service.
2024-10-20 11:04:41 +00:00
//
// 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.
2024-10-21 14:07:36 +00:00
type DatabaseServiceClient interface {
2024-10-20 11:04:41 +00:00
AllocDatabase(ctx context.Context, in *AllocDatabaseRequest, opts ...grpc.CallOption) (*AllocDatabaseResponse, error)
}
2024-10-21 14:07:36 +00:00
type databaseServiceClient struct {
2024-10-20 11:04:41 +00:00
cc grpc.ClientConnInterface
}
2024-10-21 14:07:36 +00:00
func NewDatabaseServiceClient(cc grpc.ClientConnInterface) DatabaseServiceClient {
return &databaseServiceClient{cc}
2024-10-20 11:04:41 +00:00
}
2024-10-21 14:07:36 +00:00
func (c *databaseServiceClient) AllocDatabase(ctx context.Context, in *AllocDatabaseRequest, opts ...grpc.CallOption) (*AllocDatabaseResponse, error) {
2024-10-20 11:04:41 +00:00
out := new(AllocDatabaseResponse)
err := c.cc.Invoke(ctx, "/proto.DatabaseService/AllocDatabase", in, out, opts...)
2024-10-20 11:04:41 +00:00
if err != nil {
return nil, err
}
return out, nil
}
2024-10-21 14:07:36 +00:00
// DatabaseServiceServer is the server API for DatabaseService service.
// All implementations must embed UnimplementedDatabaseServiceServer
// for forward compatibility
2024-10-21 14:07:36 +00:00
type DatabaseServiceServer interface {
2024-10-20 11:04:41 +00:00
AllocDatabase(context.Context, *AllocDatabaseRequest) (*AllocDatabaseResponse, error)
2024-10-21 14:07:36 +00:00
mustEmbedUnimplementedDatabaseServiceServer()
2024-10-20 11:04:41 +00:00
}
// UnimplementedDatabaseServiceServer must be embedded to have forward compatible implementations.
type UnimplementedDatabaseServiceServer struct {
}
2024-10-20 11:04:41 +00:00
2024-10-21 14:07:36 +00:00
func (UnimplementedDatabaseServiceServer) AllocDatabase(context.Context, *AllocDatabaseRequest) (*AllocDatabaseResponse, error) {
2024-10-20 11:04:41 +00:00
return nil, status.Errorf(codes.Unimplemented, "method AllocDatabase not implemented")
}
2024-10-21 14:07:36 +00:00
func (UnimplementedDatabaseServiceServer) mustEmbedUnimplementedDatabaseServiceServer() {}
2024-10-20 11:04:41 +00:00
2024-10-21 14:07:36 +00:00
// UnsafeDatabaseServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to DatabaseServiceServer will
2024-10-20 11:04:41 +00:00
// result in compilation errors.
2024-10-21 14:07:36 +00:00
type UnsafeDatabaseServiceServer interface {
mustEmbedUnimplementedDatabaseServiceServer()
2024-10-20 11:04:41 +00:00
}
2024-10-21 14:07:36 +00:00
func RegisterDatabaseServiceServer(s grpc.ServiceRegistrar, srv DatabaseServiceServer) {
s.RegisterService(&DatabaseService_ServiceDesc, srv)
2024-10-20 11:04:41 +00:00
}
2024-10-21 14:07:36 +00:00
func _DatabaseService_AllocDatabase_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
2024-10-20 11:04:41 +00:00
in := new(AllocDatabaseRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
2024-10-21 14:07:36 +00:00
return srv.(DatabaseServiceServer).AllocDatabase(ctx, in)
2024-10-20 11:04:41 +00:00
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/proto.DatabaseService/AllocDatabase",
2024-10-20 11:04:41 +00:00
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
2024-10-21 14:07:36 +00:00
return srv.(DatabaseServiceServer).AllocDatabase(ctx, req.(*AllocDatabaseRequest))
2024-10-20 11:04:41 +00:00
}
return interceptor(ctx, in, info, handler)
}
2024-10-21 14:07:36 +00:00
// DatabaseService_ServiceDesc is the grpc.ServiceDesc for DatabaseService service.
2024-10-20 11:04:41 +00:00
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
2024-10-21 14:07:36 +00:00
var DatabaseService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "proto.DatabaseService",
HandlerType: (*DatabaseServiceServer)(nil),
2024-10-20 11:04:41 +00:00
Methods: []grpc.MethodDesc{
{
MethodName: "AllocDatabase",
2024-10-21 14:07:36 +00:00
Handler: _DatabaseService_AllocDatabase_Handler,
2024-10-20 11:04:41 +00:00
},
},
Streams: []grpc.StreamDesc{},
Metadata: "database.proto",
}