Nexus/pkg/proto/database_grpc.pb.go

122 lines
4.6 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.5.1
// - 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.64.0 or later.
const _ = grpc.SupportPackageIsVersion9
const (
2024-10-21 14:07:36 +00:00
DatabaseService_AllocDatabase_FullMethodName = "/proto.DatabaseService/AllocDatabase"
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
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(AllocDatabaseResponse)
2024-10-21 14:07:36 +00:00
err := c.cc.Invoke(ctx, DatabaseService_AllocDatabase_FullMethodName, in, out, cOpts...)
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
2024-10-20 11:04:41 +00:00
// 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
}
2024-10-21 14:07:36 +00:00
// UnimplementedDatabaseServiceServer must be embedded to have
2024-10-20 11:04:41 +00:00
// forward compatible implementations.
//
// NOTE: this should be embedded by value instead of pointer to avoid a nil
// pointer dereference when methods are called.
2024-10-21 14:07:36 +00:00
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() {}
func (UnimplementedDatabaseServiceServer) testEmbeddedByValue() {}
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) {
// If the following call pancis, it indicates UnimplementedDatabaseServiceServer was
2024-10-20 11:04:41 +00:00
// 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()
}
2024-10-21 14:07:36 +00:00
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,
2024-10-21 14:07:36 +00:00
FullMethod: DatabaseService_AllocDatabase_FullMethodName,
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",
}