Files
music-agregator/gen/music_agregator/indexer/v1/indexer_grpc.pb.go
T
2026-05-20 09:46:43 +02:00

160 lines
6.1 KiB
Go

// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.6.1
// - protoc (unknown)
// source: music_agregator/indexer/v1/indexer.proto
package indexer
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 (
IndexerService_Search_FullMethodName = "/music_agregator.indexer.v1.IndexerService/Search"
IndexerService_Capabilities_FullMethodName = "/music_agregator.indexer.v1.IndexerService/Capabilities"
)
// IndexerServiceClient is the client API for IndexerService 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 IndexerServiceClient interface {
Search(ctx context.Context, in *SearchRequest, opts ...grpc.CallOption) (*SearchResponse, error)
Capabilities(ctx context.Context, in *CapabilitiesRequest, opts ...grpc.CallOption) (*CapabilitiesResponse, error)
}
type indexerServiceClient struct {
cc grpc.ClientConnInterface
}
func NewIndexerServiceClient(cc grpc.ClientConnInterface) IndexerServiceClient {
return &indexerServiceClient{cc}
}
func (c *indexerServiceClient) Search(ctx context.Context, in *SearchRequest, opts ...grpc.CallOption) (*SearchResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(SearchResponse)
err := c.cc.Invoke(ctx, IndexerService_Search_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *indexerServiceClient) Capabilities(ctx context.Context, in *CapabilitiesRequest, opts ...grpc.CallOption) (*CapabilitiesResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(CapabilitiesResponse)
err := c.cc.Invoke(ctx, IndexerService_Capabilities_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
// IndexerServiceServer is the server API for IndexerService service.
// All implementations must embed UnimplementedIndexerServiceServer
// for forward compatibility.
type IndexerServiceServer interface {
Search(context.Context, *SearchRequest) (*SearchResponse, error)
Capabilities(context.Context, *CapabilitiesRequest) (*CapabilitiesResponse, error)
mustEmbedUnimplementedIndexerServiceServer()
}
// UnimplementedIndexerServiceServer must be embedded to have
// forward compatible implementations.
//
// NOTE: this should be embedded by value instead of pointer to avoid a nil
// pointer dereference when methods are called.
type UnimplementedIndexerServiceServer struct{}
func (UnimplementedIndexerServiceServer) Search(context.Context, *SearchRequest) (*SearchResponse, error) {
return nil, status.Error(codes.Unimplemented, "method Search not implemented")
}
func (UnimplementedIndexerServiceServer) Capabilities(context.Context, *CapabilitiesRequest) (*CapabilitiesResponse, error) {
return nil, status.Error(codes.Unimplemented, "method Capabilities not implemented")
}
func (UnimplementedIndexerServiceServer) mustEmbedUnimplementedIndexerServiceServer() {}
func (UnimplementedIndexerServiceServer) testEmbeddedByValue() {}
// UnsafeIndexerServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to IndexerServiceServer will
// result in compilation errors.
type UnsafeIndexerServiceServer interface {
mustEmbedUnimplementedIndexerServiceServer()
}
func RegisterIndexerServiceServer(s grpc.ServiceRegistrar, srv IndexerServiceServer) {
// If the following call panics, it indicates UnimplementedIndexerServiceServer was
// 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()
}
s.RegisterService(&IndexerService_ServiceDesc, srv)
}
func _IndexerService_Search_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(SearchRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(IndexerServiceServer).Search(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: IndexerService_Search_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(IndexerServiceServer).Search(ctx, req.(*SearchRequest))
}
return interceptor(ctx, in, info, handler)
}
func _IndexerService_Capabilities_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CapabilitiesRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(IndexerServiceServer).Capabilities(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: IndexerService_Capabilities_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(IndexerServiceServer).Capabilities(ctx, req.(*CapabilitiesRequest))
}
return interceptor(ctx, in, info, handler)
}
// IndexerService_ServiceDesc is the grpc.ServiceDesc for IndexerService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var IndexerService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "music_agregator.indexer.v1.IndexerService",
HandlerType: (*IndexerServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Search",
Handler: _IndexerService_Search_Handler,
},
{
MethodName: "Capabilities",
Handler: _IndexerService_Capabilities_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "music_agregator/indexer/v1/indexer.proto",
}