Files
htwkalender/services/common/genproto/modules/modules_grpc.pb.go
2024-06-18 12:50:21 +02:00

178 lines
6.5 KiB
Go

// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc v5.27.1
// source: modules.proto
package modules
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
// ModuleServiceClient is the client API for ModuleService 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 ModuleServiceClient interface {
GetModule(ctx context.Context, in *GetModuleRequest, opts ...grpc.CallOption) (*GetModuleResponse, error)
GetModules(ctx context.Context, in *GetModulesRequest, opts ...grpc.CallOption) (*GetModulesResponse, error)
GetEventsForModules(ctx context.Context, in *GetModulesRequest, opts ...grpc.CallOption) (*GetEventsResponse, error)
}
type moduleServiceClient struct {
cc grpc.ClientConnInterface
}
func NewModuleServiceClient(cc grpc.ClientConnInterface) ModuleServiceClient {
return &moduleServiceClient{cc}
}
func (c *moduleServiceClient) GetModule(ctx context.Context, in *GetModuleRequest, opts ...grpc.CallOption) (*GetModuleResponse, error) {
out := new(GetModuleResponse)
err := c.cc.Invoke(ctx, "/ModuleService/GetModule", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *moduleServiceClient) GetModules(ctx context.Context, in *GetModulesRequest, opts ...grpc.CallOption) (*GetModulesResponse, error) {
out := new(GetModulesResponse)
err := c.cc.Invoke(ctx, "/ModuleService/GetModules", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *moduleServiceClient) GetEventsForModules(ctx context.Context, in *GetModulesRequest, opts ...grpc.CallOption) (*GetEventsResponse, error) {
out := new(GetEventsResponse)
err := c.cc.Invoke(ctx, "/ModuleService/GetEventsForModules", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// ModuleServiceServer is the server API for ModuleService service.
// All implementations must embed UnimplementedModuleServiceServer
// for forward compatibility
type ModuleServiceServer interface {
GetModule(context.Context, *GetModuleRequest) (*GetModuleResponse, error)
GetModules(context.Context, *GetModulesRequest) (*GetModulesResponse, error)
GetEventsForModules(context.Context, *GetModulesRequest) (*GetEventsResponse, error)
mustEmbedUnimplementedModuleServiceServer()
}
// UnimplementedModuleServiceServer must be embedded to have forward compatible implementations.
type UnimplementedModuleServiceServer struct {
}
func (UnimplementedModuleServiceServer) GetModule(context.Context, *GetModuleRequest) (*GetModuleResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetModule not implemented")
}
func (UnimplementedModuleServiceServer) GetModules(context.Context, *GetModulesRequest) (*GetModulesResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetModules not implemented")
}
func (UnimplementedModuleServiceServer) GetEventsForModules(context.Context, *GetModulesRequest) (*GetEventsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetEventsForModules not implemented")
}
func (UnimplementedModuleServiceServer) mustEmbedUnimplementedModuleServiceServer() {}
// UnsafeModuleServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to ModuleServiceServer will
// result in compilation errors.
type UnsafeModuleServiceServer interface {
mustEmbedUnimplementedModuleServiceServer()
}
func RegisterModuleServiceServer(s grpc.ServiceRegistrar, srv ModuleServiceServer) {
s.RegisterService(&ModuleService_ServiceDesc, srv)
}
func _ModuleService_GetModule_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetModuleRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ModuleServiceServer).GetModule(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/ModuleService/GetModule",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ModuleServiceServer).GetModule(ctx, req.(*GetModuleRequest))
}
return interceptor(ctx, in, info, handler)
}
func _ModuleService_GetModules_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetModulesRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ModuleServiceServer).GetModules(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/ModuleService/GetModules",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ModuleServiceServer).GetModules(ctx, req.(*GetModulesRequest))
}
return interceptor(ctx, in, info, handler)
}
func _ModuleService_GetEventsForModules_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetModulesRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ModuleServiceServer).GetEventsForModules(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/ModuleService/GetEventsForModules",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ModuleServiceServer).GetEventsForModules(ctx, req.(*GetModulesRequest))
}
return interceptor(ctx, in, info, handler)
}
// ModuleService_ServiceDesc is the grpc.ServiceDesc for ModuleService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var ModuleService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "ModuleService",
HandlerType: (*ModuleServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetModule",
Handler: _ModuleService_GetModule_Handler,
},
{
MethodName: "GetModules",
Handler: _ModuleService_GetModules_Handler,
},
{
MethodName: "GetEventsForModules",
Handler: _ModuleService_GetEventsForModules_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "modules.proto",
}