schnutibox/pkg/api/v1/schnutibox_grpc.pb.go

100 lines
3.6 KiB
Go
Raw Normal View History

2021-05-05 08:32:35 +02:00
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
package v1
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
// IdentifierServiceClient is the client API for IdentifierService service.
2021-05-05 08:32:35 +02: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.
type IdentifierServiceClient interface {
Identify(ctx context.Context, in *IdentifyRequest, opts ...grpc.CallOption) (*IdentifyResponse, error)
2021-05-05 08:32:35 +02:00
}
type identifierServiceClient struct {
2021-05-05 08:32:35 +02:00
cc grpc.ClientConnInterface
}
func NewIdentifierServiceClient(cc grpc.ClientConnInterface) IdentifierServiceClient {
return &identifierServiceClient{cc}
2021-05-05 08:32:35 +02:00
}
func (c *identifierServiceClient) Identify(ctx context.Context, in *IdentifyRequest, opts ...grpc.CallOption) (*IdentifyResponse, error) {
out := new(IdentifyResponse)
err := c.cc.Invoke(ctx, "/schnutibox.v1.IdentifierService/Identify", in, out, opts...)
2021-05-05 08:32:35 +02:00
if err != nil {
return nil, err
}
return out, nil
}
// IdentifierServiceServer is the server API for IdentifierService service.
// All implementations should embed UnimplementedIdentifierServiceServer
2021-05-05 08:32:35 +02:00
// for forward compatibility
type IdentifierServiceServer interface {
Identify(context.Context, *IdentifyRequest) (*IdentifyResponse, error)
2021-05-05 08:32:35 +02:00
}
// UnimplementedIdentifierServiceServer should be embedded to have forward compatible implementations.
type UnimplementedIdentifierServiceServer struct {
2021-05-05 08:32:35 +02:00
}
func (UnimplementedIdentifierServiceServer) Identify(context.Context, *IdentifyRequest) (*IdentifyResponse, error) {
2021-05-05 08:32:35 +02:00
return nil, status.Errorf(codes.Unimplemented, "method Identify not implemented")
}
// UnsafeIdentifierServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to IdentifierServiceServer will
2021-05-05 08:32:35 +02:00
// result in compilation errors.
type UnsafeIdentifierServiceServer interface {
mustEmbedUnimplementedIdentifierServiceServer()
2021-05-05 08:32:35 +02:00
}
func RegisterIdentifierServiceServer(s grpc.ServiceRegistrar, srv IdentifierServiceServer) {
s.RegisterService(&IdentifierService_ServiceDesc, srv)
2021-05-05 08:32:35 +02:00
}
func _IdentifierService_Identify_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
2021-05-05 08:32:35 +02:00
in := new(IdentifyRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(IdentifierServiceServer).Identify(ctx, in)
2021-05-05 08:32:35 +02:00
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/schnutibox.v1.IdentifierService/Identify",
2021-05-05 08:32:35 +02:00
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(IdentifierServiceServer).Identify(ctx, req.(*IdentifyRequest))
2021-05-05 08:32:35 +02:00
}
return interceptor(ctx, in, info, handler)
}
// IdentifierService_ServiceDesc is the grpc.ServiceDesc for IdentifierService service.
2021-05-05 08:32:35 +02:00
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var IdentifierService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "schnutibox.v1.IdentifierService",
HandlerType: (*IdentifierServiceServer)(nil),
2021-05-05 08:32:35 +02:00
Methods: []grpc.MethodDesc{
{
MethodName: "Identify",
Handler: _IdentifierService_Identify_Handler,
2021-05-05 08:32:35 +02:00
},
},
Streams: []grpc.StreamDesc{},
Metadata: "schnutibox.proto",
}