Nexus/pkg/proto/services_grpc.pb.go

274 lines
11 KiB
Go
Raw Normal View History

2024-10-19 14:36:33 +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: services.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
DirectoryService_GetService_FullMethodName = "/proto.DirectoryService/GetService"
DirectoryService_ListService_FullMethodName = "/proto.DirectoryService/ListService"
DirectoryService_AddService_FullMethodName = "/proto.DirectoryService/AddService"
DirectoryService_RemoveService_FullMethodName = "/proto.DirectoryService/RemoveService"
DirectoryService_BroadcastEvent_FullMethodName = "/proto.DirectoryService/BroadcastEvent"
2024-10-19 14:36:33 +00:00
)
2024-10-21 14:07:36 +00:00
// DirectoryServiceClient is the client API for DirectoryService service.
2024-10-19 14:36:33 +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 DirectoryServiceClient interface {
2024-10-19 14:36:33 +00:00
GetService(ctx context.Context, in *GetServiceRequest, opts ...grpc.CallOption) (*GetServiceResponse, error)
ListService(ctx context.Context, in *ListServiceRequest, opts ...grpc.CallOption) (*ListServiceResponse, error)
AddService(ctx context.Context, in *ServiceInfo, opts ...grpc.CallOption) (*AddServiceResponse, error)
RemoveService(ctx context.Context, in *RemoveServiceRequest, opts ...grpc.CallOption) (*RemoveServiceResponse, error)
2024-10-20 16:05:40 +00:00
BroadcastEvent(ctx context.Context, in *EventInfo, opts ...grpc.CallOption) (*EventResponse, error)
2024-10-19 14:36:33 +00:00
}
2024-10-21 14:07:36 +00:00
type directoryServiceClient struct {
2024-10-19 14:36:33 +00:00
cc grpc.ClientConnInterface
}
2024-10-21 14:07:36 +00:00
func NewDirectoryServiceClient(cc grpc.ClientConnInterface) DirectoryServiceClient {
return &directoryServiceClient{cc}
2024-10-19 14:36:33 +00:00
}
2024-10-21 14:07:36 +00:00
func (c *directoryServiceClient) GetService(ctx context.Context, in *GetServiceRequest, opts ...grpc.CallOption) (*GetServiceResponse, error) {
2024-10-19 14:36:33 +00:00
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(GetServiceResponse)
2024-10-21 14:07:36 +00:00
err := c.cc.Invoke(ctx, DirectoryService_GetService_FullMethodName, in, out, cOpts...)
2024-10-19 14:36:33 +00:00
if err != nil {
return nil, err
}
return out, nil
}
2024-10-21 14:07:36 +00:00
func (c *directoryServiceClient) ListService(ctx context.Context, in *ListServiceRequest, opts ...grpc.CallOption) (*ListServiceResponse, error) {
2024-10-19 14:36:33 +00:00
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ListServiceResponse)
2024-10-21 14:07:36 +00:00
err := c.cc.Invoke(ctx, DirectoryService_ListService_FullMethodName, in, out, cOpts...)
2024-10-19 14:36:33 +00:00
if err != nil {
return nil, err
}
return out, nil
}
2024-10-21 14:07:36 +00:00
func (c *directoryServiceClient) AddService(ctx context.Context, in *ServiceInfo, opts ...grpc.CallOption) (*AddServiceResponse, error) {
2024-10-19 14:36:33 +00:00
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(AddServiceResponse)
2024-10-21 14:07:36 +00:00
err := c.cc.Invoke(ctx, DirectoryService_AddService_FullMethodName, in, out, cOpts...)
2024-10-19 14:36:33 +00:00
if err != nil {
return nil, err
}
return out, nil
}
2024-10-21 14:07:36 +00:00
func (c *directoryServiceClient) RemoveService(ctx context.Context, in *RemoveServiceRequest, opts ...grpc.CallOption) (*RemoveServiceResponse, error) {
2024-10-19 14:36:33 +00:00
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(RemoveServiceResponse)
2024-10-21 14:07:36 +00:00
err := c.cc.Invoke(ctx, DirectoryService_RemoveService_FullMethodName, in, out, cOpts...)
2024-10-19 14:36:33 +00:00
if err != nil {
return nil, err
}
return out, nil
}
2024-10-21 14:07:36 +00:00
func (c *directoryServiceClient) BroadcastEvent(ctx context.Context, in *EventInfo, opts ...grpc.CallOption) (*EventResponse, error) {
2024-10-20 16:05:40 +00:00
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(EventResponse)
2024-10-21 14:07:36 +00:00
err := c.cc.Invoke(ctx, DirectoryService_BroadcastEvent_FullMethodName, in, out, cOpts...)
2024-10-20 16:05:40 +00:00
if err != nil {
return nil, err
}
return out, nil
}
2024-10-21 14:07:36 +00:00
// DirectoryServiceServer is the server API for DirectoryService service.
// All implementations must embed UnimplementedDirectoryServiceServer
2024-10-19 14:36:33 +00:00
// for forward compatibility.
2024-10-21 14:07:36 +00:00
type DirectoryServiceServer interface {
2024-10-19 14:36:33 +00:00
GetService(context.Context, *GetServiceRequest) (*GetServiceResponse, error)
ListService(context.Context, *ListServiceRequest) (*ListServiceResponse, error)
AddService(context.Context, *ServiceInfo) (*AddServiceResponse, error)
RemoveService(context.Context, *RemoveServiceRequest) (*RemoveServiceResponse, error)
2024-10-20 16:05:40 +00:00
BroadcastEvent(context.Context, *EventInfo) (*EventResponse, error)
2024-10-21 14:07:36 +00:00
mustEmbedUnimplementedDirectoryServiceServer()
2024-10-19 14:36:33 +00:00
}
2024-10-21 14:07:36 +00:00
// UnimplementedDirectoryServiceServer must be embedded to have
2024-10-19 14:36:33 +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 UnimplementedDirectoryServiceServer struct{}
2024-10-19 14:36:33 +00:00
2024-10-21 14:07:36 +00:00
func (UnimplementedDirectoryServiceServer) GetService(context.Context, *GetServiceRequest) (*GetServiceResponse, error) {
2024-10-19 14:36:33 +00:00
return nil, status.Errorf(codes.Unimplemented, "method GetService not implemented")
}
2024-10-21 14:07:36 +00:00
func (UnimplementedDirectoryServiceServer) ListService(context.Context, *ListServiceRequest) (*ListServiceResponse, error) {
2024-10-19 14:36:33 +00:00
return nil, status.Errorf(codes.Unimplemented, "method ListService not implemented")
}
2024-10-21 14:07:36 +00:00
func (UnimplementedDirectoryServiceServer) AddService(context.Context, *ServiceInfo) (*AddServiceResponse, error) {
2024-10-19 14:36:33 +00:00
return nil, status.Errorf(codes.Unimplemented, "method AddService not implemented")
}
2024-10-21 14:07:36 +00:00
func (UnimplementedDirectoryServiceServer) RemoveService(context.Context, *RemoveServiceRequest) (*RemoveServiceResponse, error) {
2024-10-19 14:36:33 +00:00
return nil, status.Errorf(codes.Unimplemented, "method RemoveService not implemented")
}
2024-10-21 14:07:36 +00:00
func (UnimplementedDirectoryServiceServer) BroadcastEvent(context.Context, *EventInfo) (*EventResponse, error) {
2024-10-20 16:05:40 +00:00
return nil, status.Errorf(codes.Unimplemented, "method BroadcastEvent not implemented")
}
2024-10-21 14:07:36 +00:00
func (UnimplementedDirectoryServiceServer) mustEmbedUnimplementedDirectoryServiceServer() {}
func (UnimplementedDirectoryServiceServer) testEmbeddedByValue() {}
2024-10-19 14:36:33 +00:00
2024-10-21 14:07:36 +00:00
// UnsafeDirectoryServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to DirectoryServiceServer will
2024-10-19 14:36:33 +00:00
// result in compilation errors.
2024-10-21 14:07:36 +00:00
type UnsafeDirectoryServiceServer interface {
mustEmbedUnimplementedDirectoryServiceServer()
2024-10-19 14:36:33 +00:00
}
2024-10-21 14:07:36 +00:00
func RegisterDirectoryServiceServer(s grpc.ServiceRegistrar, srv DirectoryServiceServer) {
// If the following call pancis, it indicates UnimplementedDirectoryServiceServer was
2024-10-19 14:36:33 +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(&DirectoryService_ServiceDesc, srv)
2024-10-19 14:36:33 +00:00
}
2024-10-21 14:07:36 +00:00
func _DirectoryService_GetService_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
2024-10-19 14:36:33 +00:00
in := new(GetServiceRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
2024-10-21 14:07:36 +00:00
return srv.(DirectoryServiceServer).GetService(ctx, in)
2024-10-19 14:36:33 +00:00
}
info := &grpc.UnaryServerInfo{
Server: srv,
2024-10-21 14:07:36 +00:00
FullMethod: DirectoryService_GetService_FullMethodName,
2024-10-19 14:36:33 +00:00
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
2024-10-21 14:07:36 +00:00
return srv.(DirectoryServiceServer).GetService(ctx, req.(*GetServiceRequest))
2024-10-19 14:36:33 +00:00
}
return interceptor(ctx, in, info, handler)
}
2024-10-21 14:07:36 +00:00
func _DirectoryService_ListService_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
2024-10-19 14:36:33 +00:00
in := new(ListServiceRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
2024-10-21 14:07:36 +00:00
return srv.(DirectoryServiceServer).ListService(ctx, in)
2024-10-19 14:36:33 +00:00
}
info := &grpc.UnaryServerInfo{
Server: srv,
2024-10-21 14:07:36 +00:00
FullMethod: DirectoryService_ListService_FullMethodName,
2024-10-19 14:36:33 +00:00
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
2024-10-21 14:07:36 +00:00
return srv.(DirectoryServiceServer).ListService(ctx, req.(*ListServiceRequest))
2024-10-19 14:36:33 +00:00
}
return interceptor(ctx, in, info, handler)
}
2024-10-21 14:07:36 +00:00
func _DirectoryService_AddService_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
2024-10-19 14:36:33 +00:00
in := new(ServiceInfo)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
2024-10-21 14:07:36 +00:00
return srv.(DirectoryServiceServer).AddService(ctx, in)
2024-10-19 14:36:33 +00:00
}
info := &grpc.UnaryServerInfo{
Server: srv,
2024-10-21 14:07:36 +00:00
FullMethod: DirectoryService_AddService_FullMethodName,
2024-10-19 14:36:33 +00:00
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
2024-10-21 14:07:36 +00:00
return srv.(DirectoryServiceServer).AddService(ctx, req.(*ServiceInfo))
2024-10-19 14:36:33 +00:00
}
return interceptor(ctx, in, info, handler)
}
2024-10-21 14:07:36 +00:00
func _DirectoryService_RemoveService_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
2024-10-19 14:36:33 +00:00
in := new(RemoveServiceRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
2024-10-21 14:07:36 +00:00
return srv.(DirectoryServiceServer).RemoveService(ctx, in)
2024-10-19 14:36:33 +00:00
}
info := &grpc.UnaryServerInfo{
Server: srv,
2024-10-21 14:07:36 +00:00
FullMethod: DirectoryService_RemoveService_FullMethodName,
2024-10-19 14:36:33 +00:00
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
2024-10-21 14:07:36 +00:00
return srv.(DirectoryServiceServer).RemoveService(ctx, req.(*RemoveServiceRequest))
2024-10-19 14:36:33 +00:00
}
return interceptor(ctx, in, info, handler)
}
2024-10-21 14:07:36 +00:00
func _DirectoryService_BroadcastEvent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
2024-10-20 16:05:40 +00:00
in := new(EventInfo)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
2024-10-21 14:07:36 +00:00
return srv.(DirectoryServiceServer).BroadcastEvent(ctx, in)
2024-10-20 16:05:40 +00:00
}
info := &grpc.UnaryServerInfo{
Server: srv,
2024-10-21 14:07:36 +00:00
FullMethod: DirectoryService_BroadcastEvent_FullMethodName,
2024-10-20 16:05:40 +00:00
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
2024-10-21 14:07:36 +00:00
return srv.(DirectoryServiceServer).BroadcastEvent(ctx, req.(*EventInfo))
2024-10-20 16:05:40 +00:00
}
return interceptor(ctx, in, info, handler)
}
2024-10-21 14:07:36 +00:00
// DirectoryService_ServiceDesc is the grpc.ServiceDesc for DirectoryService service.
2024-10-19 14:36:33 +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 DirectoryService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "proto.DirectoryService",
HandlerType: (*DirectoryServiceServer)(nil),
2024-10-19 14:36:33 +00:00
Methods: []grpc.MethodDesc{
{
MethodName: "GetService",
2024-10-21 14:07:36 +00:00
Handler: _DirectoryService_GetService_Handler,
2024-10-19 14:36:33 +00:00
},
{
MethodName: "ListService",
2024-10-21 14:07:36 +00:00
Handler: _DirectoryService_ListService_Handler,
2024-10-19 14:36:33 +00:00
},
{
MethodName: "AddService",
2024-10-21 14:07:36 +00:00
Handler: _DirectoryService_AddService_Handler,
2024-10-19 14:36:33 +00:00
},
{
MethodName: "RemoveService",
2024-10-21 14:07:36 +00:00
Handler: _DirectoryService_RemoveService_Handler,
2024-10-19 14:36:33 +00:00
},
2024-10-20 16:05:40 +00:00
{
MethodName: "BroadcastEvent",
2024-10-21 14:07:36 +00:00
Handler: _DirectoryService_BroadcastEvent_Handler,
2024-10-20 16:05:40 +00:00
},
2024-10-19 14:36:33 +00:00
},
Streams: []grpc.StreamDesc{},
Metadata: "services.proto",
}