102 lines
3.4 KiB
Go
102 lines
3.4 KiB
Go
|
// 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
|
||
|
|
||
|
// IdentifierClient is the client API for Identifier 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 IdentifierClient interface {
|
||
|
Identify(ctx context.Context, in *IdentifyRequest, opts ...grpc.CallOption) (*Tracks, error)
|
||
|
}
|
||
|
|
||
|
type identifierClient struct {
|
||
|
cc grpc.ClientConnInterface
|
||
|
}
|
||
|
|
||
|
func NewIdentifierClient(cc grpc.ClientConnInterface) IdentifierClient {
|
||
|
return &identifierClient{cc}
|
||
|
}
|
||
|
|
||
|
func (c *identifierClient) Identify(ctx context.Context, in *IdentifyRequest, opts ...grpc.CallOption) (*Tracks, error) {
|
||
|
out := new(Tracks)
|
||
|
err := c.cc.Invoke(ctx, "/Identifier/Identify", in, out, opts...)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return out, nil
|
||
|
}
|
||
|
|
||
|
// IdentifierServer is the server API for Identifier service.
|
||
|
// All implementations must embed UnimplementedIdentifierServer
|
||
|
// for forward compatibility
|
||
|
type IdentifierServer interface {
|
||
|
Identify(context.Context, *IdentifyRequest) (*Tracks, error)
|
||
|
mustEmbedUnimplementedIdentifierServer()
|
||
|
}
|
||
|
|
||
|
// UnimplementedIdentifierServer must be embedded to have forward compatible implementations.
|
||
|
type UnimplementedIdentifierServer struct {
|
||
|
}
|
||
|
|
||
|
func (UnimplementedIdentifierServer) Identify(context.Context, *IdentifyRequest) (*Tracks, error) {
|
||
|
return nil, status.Errorf(codes.Unimplemented, "method Identify not implemented")
|
||
|
}
|
||
|
func (UnimplementedIdentifierServer) mustEmbedUnimplementedIdentifierServer() {}
|
||
|
|
||
|
// UnsafeIdentifierServer may be embedded to opt out of forward compatibility for this service.
|
||
|
// Use of this interface is not recommended, as added methods to IdentifierServer will
|
||
|
// result in compilation errors.
|
||
|
type UnsafeIdentifierServer interface {
|
||
|
mustEmbedUnimplementedIdentifierServer()
|
||
|
}
|
||
|
|
||
|
func RegisterIdentifierServer(s grpc.ServiceRegistrar, srv IdentifierServer) {
|
||
|
s.RegisterService(&Identifier_ServiceDesc, srv)
|
||
|
}
|
||
|
|
||
|
func _Identifier_Identify_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||
|
in := new(IdentifyRequest)
|
||
|
if err := dec(in); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
if interceptor == nil {
|
||
|
return srv.(IdentifierServer).Identify(ctx, in)
|
||
|
}
|
||
|
info := &grpc.UnaryServerInfo{
|
||
|
Server: srv,
|
||
|
FullMethod: "/Identifier/Identify",
|
||
|
}
|
||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||
|
return srv.(IdentifierServer).Identify(ctx, req.(*IdentifyRequest))
|
||
|
}
|
||
|
return interceptor(ctx, in, info, handler)
|
||
|
}
|
||
|
|
||
|
// Identifier_ServiceDesc is the grpc.ServiceDesc for Identifier service.
|
||
|
// It's only intended for direct use with grpc.RegisterService,
|
||
|
// and not to be introspected or modified (even as a copy)
|
||
|
var Identifier_ServiceDesc = grpc.ServiceDesc{
|
||
|
ServiceName: "Identifier",
|
||
|
HandlerType: (*IdentifierServer)(nil),
|
||
|
Methods: []grpc.MethodDesc{
|
||
|
{
|
||
|
MethodName: "Identify",
|
||
|
Handler: _Identifier_Identify_Handler,
|
||
|
},
|
||
|
},
|
||
|
Streams: []grpc.StreamDesc{},
|
||
|
Metadata: "schnutibox.proto",
|
||
|
}
|