Package with nix, some fixes
This commit is contained in:
+3
-2
@@ -28,5 +28,6 @@ bin/
|
|||||||
# Ignore config.yaml
|
# Ignore config.yaml
|
||||||
config.yaml
|
config.yaml
|
||||||
|
|
||||||
# Ignore protobuf generated files
|
# Protobuf generated Go code — committed for reproducible builds
|
||||||
gen/
|
# Regenerate with: buf generate
|
||||||
|
# gen/
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ body:grpc {
|
|||||||
name: message 1
|
name: message 1
|
||||||
content: '''
|
content: '''
|
||||||
{
|
{
|
||||||
"artist_id": "27e2997f-f7a1-4353-bcc4-57b9274fa9a4"
|
"artist_id": "3b497c6b-e676-4242-bcad-0a03125faaaa"
|
||||||
}
|
}
|
||||||
'''
|
'''
|
||||||
}
|
}
|
||||||
|
|||||||
-1
Submodule beetfs deleted from f0a83df190
@@ -36,10 +36,17 @@
|
|||||||
gofmt.enable = true;
|
gofmt.enable = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
music-agregator = pkgs.callPackage ./package.nix { };
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
formatter = pkgs.nixfmt-tree;
|
formatter = pkgs.nixfmt-tree;
|
||||||
|
|
||||||
|
packages = {
|
||||||
|
default = music-agregator;
|
||||||
|
music-agregator = music-agregator;
|
||||||
|
};
|
||||||
|
|
||||||
checks = {
|
checks = {
|
||||||
inherit pre-commit-check;
|
inherit pre-commit-check;
|
||||||
};
|
};
|
||||||
@@ -60,6 +67,7 @@
|
|||||||
protobuf
|
protobuf
|
||||||
protoc-gen-go
|
protoc-gen-go
|
||||||
protoc-gen-go-grpc
|
protoc-gen-go-grpc
|
||||||
|
grpcurl
|
||||||
|
|
||||||
go
|
go
|
||||||
gopls
|
gopls
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,387 @@
|
|||||||
|
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||||
|
// versions:
|
||||||
|
// - protoc-gen-go-grpc v1.6.1
|
||||||
|
// - protoc (unknown)
|
||||||
|
// source: metadata/v1/metadata.proto
|
||||||
|
|
||||||
|
package metadatav1
|
||||||
|
|
||||||
|
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 (
|
||||||
|
MetadataService_GetArtist_FullMethodName = "/metadata.v1.MetadataService/GetArtist"
|
||||||
|
MetadataService_SearchArtists_FullMethodName = "/metadata.v1.MetadataService/SearchArtists"
|
||||||
|
MetadataService_GetAlbum_FullMethodName = "/metadata.v1.MetadataService/GetAlbum"
|
||||||
|
MetadataService_GetArtistAlbums_FullMethodName = "/metadata.v1.MetadataService/GetArtistAlbums"
|
||||||
|
MetadataService_GetTrack_FullMethodName = "/metadata.v1.MetadataService/GetTrack"
|
||||||
|
MetadataService_GetAlbumTracks_FullMethodName = "/metadata.v1.MetadataService/GetAlbumTracks"
|
||||||
|
MetadataService_SearchAlbums_FullMethodName = "/metadata.v1.MetadataService/SearchAlbums"
|
||||||
|
MetadataService_SyncArtist_FullMethodName = "/metadata.v1.MetadataService/SyncArtist"
|
||||||
|
)
|
||||||
|
|
||||||
|
// MetadataServiceClient is the client API for MetadataService 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 MetadataServiceClient interface {
|
||||||
|
GetArtist(ctx context.Context, in *GetArtistRequest, opts ...grpc.CallOption) (*GetArtistResponse, error)
|
||||||
|
SearchArtists(ctx context.Context, in *SearchArtistsRequest, opts ...grpc.CallOption) (*SearchArtistsResponse, error)
|
||||||
|
GetAlbum(ctx context.Context, in *GetAlbumRequest, opts ...grpc.CallOption) (*GetAlbumResponse, error)
|
||||||
|
GetArtistAlbums(ctx context.Context, in *GetArtistAlbumsRequest, opts ...grpc.CallOption) (*GetArtistAlbumsResponse, error)
|
||||||
|
GetTrack(ctx context.Context, in *GetTrackRequest, opts ...grpc.CallOption) (*GetTrackResponse, error)
|
||||||
|
GetAlbumTracks(ctx context.Context, in *GetAlbumTracksRequest, opts ...grpc.CallOption) (*GetAlbumTracksResponse, error)
|
||||||
|
SearchAlbums(ctx context.Context, in *SearchAlbumsRequest, opts ...grpc.CallOption) (*SearchAlbumsResponse, error)
|
||||||
|
SyncArtist(ctx context.Context, in *SyncArtistRequest, opts ...grpc.CallOption) (*SyncArtistResponse, error)
|
||||||
|
}
|
||||||
|
|
||||||
|
type metadataServiceClient struct {
|
||||||
|
cc grpc.ClientConnInterface
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewMetadataServiceClient(cc grpc.ClientConnInterface) MetadataServiceClient {
|
||||||
|
return &metadataServiceClient{cc}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *metadataServiceClient) GetArtist(ctx context.Context, in *GetArtistRequest, opts ...grpc.CallOption) (*GetArtistResponse, error) {
|
||||||
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||||
|
out := new(GetArtistResponse)
|
||||||
|
err := c.cc.Invoke(ctx, MetadataService_GetArtist_FullMethodName, in, out, cOpts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *metadataServiceClient) SearchArtists(ctx context.Context, in *SearchArtistsRequest, opts ...grpc.CallOption) (*SearchArtistsResponse, error) {
|
||||||
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||||
|
out := new(SearchArtistsResponse)
|
||||||
|
err := c.cc.Invoke(ctx, MetadataService_SearchArtists_FullMethodName, in, out, cOpts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *metadataServiceClient) GetAlbum(ctx context.Context, in *GetAlbumRequest, opts ...grpc.CallOption) (*GetAlbumResponse, error) {
|
||||||
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||||
|
out := new(GetAlbumResponse)
|
||||||
|
err := c.cc.Invoke(ctx, MetadataService_GetAlbum_FullMethodName, in, out, cOpts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *metadataServiceClient) GetArtistAlbums(ctx context.Context, in *GetArtistAlbumsRequest, opts ...grpc.CallOption) (*GetArtistAlbumsResponse, error) {
|
||||||
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||||
|
out := new(GetArtistAlbumsResponse)
|
||||||
|
err := c.cc.Invoke(ctx, MetadataService_GetArtistAlbums_FullMethodName, in, out, cOpts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *metadataServiceClient) GetTrack(ctx context.Context, in *GetTrackRequest, opts ...grpc.CallOption) (*GetTrackResponse, error) {
|
||||||
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||||
|
out := new(GetTrackResponse)
|
||||||
|
err := c.cc.Invoke(ctx, MetadataService_GetTrack_FullMethodName, in, out, cOpts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *metadataServiceClient) GetAlbumTracks(ctx context.Context, in *GetAlbumTracksRequest, opts ...grpc.CallOption) (*GetAlbumTracksResponse, error) {
|
||||||
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||||
|
out := new(GetAlbumTracksResponse)
|
||||||
|
err := c.cc.Invoke(ctx, MetadataService_GetAlbumTracks_FullMethodName, in, out, cOpts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *metadataServiceClient) SearchAlbums(ctx context.Context, in *SearchAlbumsRequest, opts ...grpc.CallOption) (*SearchAlbumsResponse, error) {
|
||||||
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||||
|
out := new(SearchAlbumsResponse)
|
||||||
|
err := c.cc.Invoke(ctx, MetadataService_SearchAlbums_FullMethodName, in, out, cOpts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *metadataServiceClient) SyncArtist(ctx context.Context, in *SyncArtistRequest, opts ...grpc.CallOption) (*SyncArtistResponse, error) {
|
||||||
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||||
|
out := new(SyncArtistResponse)
|
||||||
|
err := c.cc.Invoke(ctx, MetadataService_SyncArtist_FullMethodName, in, out, cOpts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// MetadataServiceServer is the server API for MetadataService service.
|
||||||
|
// All implementations must embed UnimplementedMetadataServiceServer
|
||||||
|
// for forward compatibility.
|
||||||
|
type MetadataServiceServer interface {
|
||||||
|
GetArtist(context.Context, *GetArtistRequest) (*GetArtistResponse, error)
|
||||||
|
SearchArtists(context.Context, *SearchArtistsRequest) (*SearchArtistsResponse, error)
|
||||||
|
GetAlbum(context.Context, *GetAlbumRequest) (*GetAlbumResponse, error)
|
||||||
|
GetArtistAlbums(context.Context, *GetArtistAlbumsRequest) (*GetArtistAlbumsResponse, error)
|
||||||
|
GetTrack(context.Context, *GetTrackRequest) (*GetTrackResponse, error)
|
||||||
|
GetAlbumTracks(context.Context, *GetAlbumTracksRequest) (*GetAlbumTracksResponse, error)
|
||||||
|
SearchAlbums(context.Context, *SearchAlbumsRequest) (*SearchAlbumsResponse, error)
|
||||||
|
SyncArtist(context.Context, *SyncArtistRequest) (*SyncArtistResponse, error)
|
||||||
|
mustEmbedUnimplementedMetadataServiceServer()
|
||||||
|
}
|
||||||
|
|
||||||
|
// UnimplementedMetadataServiceServer 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 UnimplementedMetadataServiceServer struct{}
|
||||||
|
|
||||||
|
func (UnimplementedMetadataServiceServer) GetArtist(context.Context, *GetArtistRequest) (*GetArtistResponse, error) {
|
||||||
|
return nil, status.Error(codes.Unimplemented, "method GetArtist not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedMetadataServiceServer) SearchArtists(context.Context, *SearchArtistsRequest) (*SearchArtistsResponse, error) {
|
||||||
|
return nil, status.Error(codes.Unimplemented, "method SearchArtists not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedMetadataServiceServer) GetAlbum(context.Context, *GetAlbumRequest) (*GetAlbumResponse, error) {
|
||||||
|
return nil, status.Error(codes.Unimplemented, "method GetAlbum not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedMetadataServiceServer) GetArtistAlbums(context.Context, *GetArtistAlbumsRequest) (*GetArtistAlbumsResponse, error) {
|
||||||
|
return nil, status.Error(codes.Unimplemented, "method GetArtistAlbums not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedMetadataServiceServer) GetTrack(context.Context, *GetTrackRequest) (*GetTrackResponse, error) {
|
||||||
|
return nil, status.Error(codes.Unimplemented, "method GetTrack not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedMetadataServiceServer) GetAlbumTracks(context.Context, *GetAlbumTracksRequest) (*GetAlbumTracksResponse, error) {
|
||||||
|
return nil, status.Error(codes.Unimplemented, "method GetAlbumTracks not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedMetadataServiceServer) SearchAlbums(context.Context, *SearchAlbumsRequest) (*SearchAlbumsResponse, error) {
|
||||||
|
return nil, status.Error(codes.Unimplemented, "method SearchAlbums not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedMetadataServiceServer) SyncArtist(context.Context, *SyncArtistRequest) (*SyncArtistResponse, error) {
|
||||||
|
return nil, status.Error(codes.Unimplemented, "method SyncArtist not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedMetadataServiceServer) mustEmbedUnimplementedMetadataServiceServer() {}
|
||||||
|
func (UnimplementedMetadataServiceServer) testEmbeddedByValue() {}
|
||||||
|
|
||||||
|
// UnsafeMetadataServiceServer may be embedded to opt out of forward compatibility for this service.
|
||||||
|
// Use of this interface is not recommended, as added methods to MetadataServiceServer will
|
||||||
|
// result in compilation errors.
|
||||||
|
type UnsafeMetadataServiceServer interface {
|
||||||
|
mustEmbedUnimplementedMetadataServiceServer()
|
||||||
|
}
|
||||||
|
|
||||||
|
func RegisterMetadataServiceServer(s grpc.ServiceRegistrar, srv MetadataServiceServer) {
|
||||||
|
// If the following call panics, it indicates UnimplementedMetadataServiceServer 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(&MetadataService_ServiceDesc, srv)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _MetadataService_GetArtist_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(GetArtistRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(MetadataServiceServer).GetArtist(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: MetadataService_GetArtist_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(MetadataServiceServer).GetArtist(ctx, req.(*GetArtistRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _MetadataService_SearchArtists_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(SearchArtistsRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(MetadataServiceServer).SearchArtists(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: MetadataService_SearchArtists_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(MetadataServiceServer).SearchArtists(ctx, req.(*SearchArtistsRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _MetadataService_GetAlbum_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(GetAlbumRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(MetadataServiceServer).GetAlbum(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: MetadataService_GetAlbum_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(MetadataServiceServer).GetAlbum(ctx, req.(*GetAlbumRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _MetadataService_GetArtistAlbums_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(GetArtistAlbumsRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(MetadataServiceServer).GetArtistAlbums(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: MetadataService_GetArtistAlbums_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(MetadataServiceServer).GetArtistAlbums(ctx, req.(*GetArtistAlbumsRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _MetadataService_GetTrack_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(GetTrackRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(MetadataServiceServer).GetTrack(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: MetadataService_GetTrack_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(MetadataServiceServer).GetTrack(ctx, req.(*GetTrackRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _MetadataService_GetAlbumTracks_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(GetAlbumTracksRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(MetadataServiceServer).GetAlbumTracks(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: MetadataService_GetAlbumTracks_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(MetadataServiceServer).GetAlbumTracks(ctx, req.(*GetAlbumTracksRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _MetadataService_SearchAlbums_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(SearchAlbumsRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(MetadataServiceServer).SearchAlbums(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: MetadataService_SearchAlbums_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(MetadataServiceServer).SearchAlbums(ctx, req.(*SearchAlbumsRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _MetadataService_SyncArtist_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(SyncArtistRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(MetadataServiceServer).SyncArtist(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: MetadataService_SyncArtist_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(MetadataServiceServer).SyncArtist(ctx, req.(*SyncArtistRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
// MetadataService_ServiceDesc is the grpc.ServiceDesc for MetadataService service.
|
||||||
|
// It's only intended for direct use with grpc.RegisterService,
|
||||||
|
// and not to be introspected or modified (even as a copy)
|
||||||
|
var MetadataService_ServiceDesc = grpc.ServiceDesc{
|
||||||
|
ServiceName: "metadata.v1.MetadataService",
|
||||||
|
HandlerType: (*MetadataServiceServer)(nil),
|
||||||
|
Methods: []grpc.MethodDesc{
|
||||||
|
{
|
||||||
|
MethodName: "GetArtist",
|
||||||
|
Handler: _MetadataService_GetArtist_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "SearchArtists",
|
||||||
|
Handler: _MetadataService_SearchArtists_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "GetAlbum",
|
||||||
|
Handler: _MetadataService_GetAlbum_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "GetArtistAlbums",
|
||||||
|
Handler: _MetadataService_GetArtistAlbums_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "GetTrack",
|
||||||
|
Handler: _MetadataService_GetTrack_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "GetAlbumTracks",
|
||||||
|
Handler: _MetadataService_GetAlbumTracks_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "SearchAlbums",
|
||||||
|
Handler: _MetadataService_SearchAlbums_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "SyncArtist",
|
||||||
|
Handler: _MetadataService_SyncArtist_Handler,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
Streams: []grpc.StreamDesc{},
|
||||||
|
Metadata: "metadata/v1/metadata.proto",
|
||||||
|
}
|
||||||
@@ -0,0 +1,252 @@
|
|||||||
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||||
|
// versions:
|
||||||
|
// protoc-gen-go v1.36.11
|
||||||
|
// protoc (unknown)
|
||||||
|
// source: music_agregator/hello/v1/service.proto
|
||||||
|
|
||||||
|
package hello
|
||||||
|
|
||||||
|
import (
|
||||||
|
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||||
|
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||||
|
reflect "reflect"
|
||||||
|
sync "sync"
|
||||||
|
unsafe "unsafe"
|
||||||
|
)
|
||||||
|
|
||||||
|
const (
|
||||||
|
// Verify that this generated code is sufficiently up-to-date.
|
||||||
|
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||||
|
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||||
|
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||||
|
)
|
||||||
|
|
||||||
|
type PingRequest struct {
|
||||||
|
state protoimpl.MessageState `protogen:"open.v1"`
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *PingRequest) Reset() {
|
||||||
|
*x = PingRequest{}
|
||||||
|
mi := &file_music_agregator_hello_v1_service_proto_msgTypes[0]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *PingRequest) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*PingRequest) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *PingRequest) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_music_agregator_hello_v1_service_proto_msgTypes[0]
|
||||||
|
if x != nil {
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
return ms
|
||||||
|
}
|
||||||
|
return mi.MessageOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use PingRequest.ProtoReflect.Descriptor instead.
|
||||||
|
func (*PingRequest) Descriptor() ([]byte, []int) {
|
||||||
|
return file_music_agregator_hello_v1_service_proto_rawDescGZIP(), []int{0}
|
||||||
|
}
|
||||||
|
|
||||||
|
type PongResponse struct {
|
||||||
|
state protoimpl.MessageState `protogen:"open.v1"`
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *PongResponse) Reset() {
|
||||||
|
*x = PongResponse{}
|
||||||
|
mi := &file_music_agregator_hello_v1_service_proto_msgTypes[1]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *PongResponse) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*PongResponse) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *PongResponse) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_music_agregator_hello_v1_service_proto_msgTypes[1]
|
||||||
|
if x != nil {
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
return ms
|
||||||
|
}
|
||||||
|
return mi.MessageOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use PongResponse.ProtoReflect.Descriptor instead.
|
||||||
|
func (*PongResponse) Descriptor() ([]byte, []int) {
|
||||||
|
return file_music_agregator_hello_v1_service_proto_rawDescGZIP(), []int{1}
|
||||||
|
}
|
||||||
|
|
||||||
|
type EchoRequest struct {
|
||||||
|
state protoimpl.MessageState `protogen:"open.v1"`
|
||||||
|
Msg string `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"`
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *EchoRequest) Reset() {
|
||||||
|
*x = EchoRequest{}
|
||||||
|
mi := &file_music_agregator_hello_v1_service_proto_msgTypes[2]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *EchoRequest) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*EchoRequest) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *EchoRequest) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_music_agregator_hello_v1_service_proto_msgTypes[2]
|
||||||
|
if x != nil {
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
return ms
|
||||||
|
}
|
||||||
|
return mi.MessageOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use EchoRequest.ProtoReflect.Descriptor instead.
|
||||||
|
func (*EchoRequest) Descriptor() ([]byte, []int) {
|
||||||
|
return file_music_agregator_hello_v1_service_proto_rawDescGZIP(), []int{2}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *EchoRequest) GetMsg() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Msg
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
type EchoResponse struct {
|
||||||
|
state protoimpl.MessageState `protogen:"open.v1"`
|
||||||
|
Response string `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"`
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *EchoResponse) Reset() {
|
||||||
|
*x = EchoResponse{}
|
||||||
|
mi := &file_music_agregator_hello_v1_service_proto_msgTypes[3]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *EchoResponse) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*EchoResponse) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *EchoResponse) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_music_agregator_hello_v1_service_proto_msgTypes[3]
|
||||||
|
if x != nil {
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
return ms
|
||||||
|
}
|
||||||
|
return mi.MessageOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use EchoResponse.ProtoReflect.Descriptor instead.
|
||||||
|
func (*EchoResponse) Descriptor() ([]byte, []int) {
|
||||||
|
return file_music_agregator_hello_v1_service_proto_rawDescGZIP(), []int{3}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *EchoResponse) GetResponse() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Response
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
var File_music_agregator_hello_v1_service_proto protoreflect.FileDescriptor
|
||||||
|
|
||||||
|
const file_music_agregator_hello_v1_service_proto_rawDesc = "" +
|
||||||
|
"\n" +
|
||||||
|
"&music_agregator/hello/v1/service.proto\x12\x18music_agregator.hello.v1\"\r\n" +
|
||||||
|
"\vPingRequest\"\x0e\n" +
|
||||||
|
"\fPongResponse\"\x1f\n" +
|
||||||
|
"\vEchoRequest\x12\x10\n" +
|
||||||
|
"\x03msg\x18\x01 \x01(\tR\x03msg\"*\n" +
|
||||||
|
"\fEchoResponse\x12\x1a\n" +
|
||||||
|
"\bresponse\x18\x01 \x01(\tR\bresponse2\xc0\x01\n" +
|
||||||
|
"\fHelloService\x12W\n" +
|
||||||
|
"\x04Ping\x12%.music_agregator.hello.v1.PingRequest\x1a&.music_agregator.hello.v1.PongResponse\"\x00\x12W\n" +
|
||||||
|
"\x04Echo\x12%.music_agregator.hello.v1.EchoRequest\x1a&.music_agregator.hello.v1.EchoResponse\"\x00B:Z8homelab.lan/music-agregator/gen/music_agregator/v1/hellob\x06proto3"
|
||||||
|
|
||||||
|
var (
|
||||||
|
file_music_agregator_hello_v1_service_proto_rawDescOnce sync.Once
|
||||||
|
file_music_agregator_hello_v1_service_proto_rawDescData []byte
|
||||||
|
)
|
||||||
|
|
||||||
|
func file_music_agregator_hello_v1_service_proto_rawDescGZIP() []byte {
|
||||||
|
file_music_agregator_hello_v1_service_proto_rawDescOnce.Do(func() {
|
||||||
|
file_music_agregator_hello_v1_service_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_music_agregator_hello_v1_service_proto_rawDesc), len(file_music_agregator_hello_v1_service_proto_rawDesc)))
|
||||||
|
})
|
||||||
|
return file_music_agregator_hello_v1_service_proto_rawDescData
|
||||||
|
}
|
||||||
|
|
||||||
|
var file_music_agregator_hello_v1_service_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
|
||||||
|
var file_music_agregator_hello_v1_service_proto_goTypes = []any{
|
||||||
|
(*PingRequest)(nil), // 0: music_agregator.hello.v1.PingRequest
|
||||||
|
(*PongResponse)(nil), // 1: music_agregator.hello.v1.PongResponse
|
||||||
|
(*EchoRequest)(nil), // 2: music_agregator.hello.v1.EchoRequest
|
||||||
|
(*EchoResponse)(nil), // 3: music_agregator.hello.v1.EchoResponse
|
||||||
|
}
|
||||||
|
var file_music_agregator_hello_v1_service_proto_depIdxs = []int32{
|
||||||
|
0, // 0: music_agregator.hello.v1.HelloService.Ping:input_type -> music_agregator.hello.v1.PingRequest
|
||||||
|
2, // 1: music_agregator.hello.v1.HelloService.Echo:input_type -> music_agregator.hello.v1.EchoRequest
|
||||||
|
1, // 2: music_agregator.hello.v1.HelloService.Ping:output_type -> music_agregator.hello.v1.PongResponse
|
||||||
|
3, // 3: music_agregator.hello.v1.HelloService.Echo:output_type -> music_agregator.hello.v1.EchoResponse
|
||||||
|
2, // [2:4] is the sub-list for method output_type
|
||||||
|
0, // [0:2] is the sub-list for method input_type
|
||||||
|
0, // [0:0] is the sub-list for extension type_name
|
||||||
|
0, // [0:0] is the sub-list for extension extendee
|
||||||
|
0, // [0:0] is the sub-list for field type_name
|
||||||
|
}
|
||||||
|
|
||||||
|
func init() { file_music_agregator_hello_v1_service_proto_init() }
|
||||||
|
func file_music_agregator_hello_v1_service_proto_init() {
|
||||||
|
if File_music_agregator_hello_v1_service_proto != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
type x struct{}
|
||||||
|
out := protoimpl.TypeBuilder{
|
||||||
|
File: protoimpl.DescBuilder{
|
||||||
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||||
|
RawDescriptor: unsafe.Slice(unsafe.StringData(file_music_agregator_hello_v1_service_proto_rawDesc), len(file_music_agregator_hello_v1_service_proto_rawDesc)),
|
||||||
|
NumEnums: 0,
|
||||||
|
NumMessages: 4,
|
||||||
|
NumExtensions: 0,
|
||||||
|
NumServices: 1,
|
||||||
|
},
|
||||||
|
GoTypes: file_music_agregator_hello_v1_service_proto_goTypes,
|
||||||
|
DependencyIndexes: file_music_agregator_hello_v1_service_proto_depIdxs,
|
||||||
|
MessageInfos: file_music_agregator_hello_v1_service_proto_msgTypes,
|
||||||
|
}.Build()
|
||||||
|
File_music_agregator_hello_v1_service_proto = out.File
|
||||||
|
file_music_agregator_hello_v1_service_proto_goTypes = nil
|
||||||
|
file_music_agregator_hello_v1_service_proto_depIdxs = nil
|
||||||
|
}
|
||||||
@@ -0,0 +1,159 @@
|
|||||||
|
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||||
|
// versions:
|
||||||
|
// - protoc-gen-go-grpc v1.6.1
|
||||||
|
// - protoc (unknown)
|
||||||
|
// source: music_agregator/hello/v1/service.proto
|
||||||
|
|
||||||
|
package hello
|
||||||
|
|
||||||
|
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 (
|
||||||
|
HelloService_Ping_FullMethodName = "/music_agregator.hello.v1.HelloService/Ping"
|
||||||
|
HelloService_Echo_FullMethodName = "/music_agregator.hello.v1.HelloService/Echo"
|
||||||
|
)
|
||||||
|
|
||||||
|
// HelloServiceClient is the client API for HelloService 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 HelloServiceClient interface {
|
||||||
|
Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PongResponse, error)
|
||||||
|
Echo(ctx context.Context, in *EchoRequest, opts ...grpc.CallOption) (*EchoResponse, error)
|
||||||
|
}
|
||||||
|
|
||||||
|
type helloServiceClient struct {
|
||||||
|
cc grpc.ClientConnInterface
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewHelloServiceClient(cc grpc.ClientConnInterface) HelloServiceClient {
|
||||||
|
return &helloServiceClient{cc}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *helloServiceClient) Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PongResponse, error) {
|
||||||
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||||
|
out := new(PongResponse)
|
||||||
|
err := c.cc.Invoke(ctx, HelloService_Ping_FullMethodName, in, out, cOpts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *helloServiceClient) Echo(ctx context.Context, in *EchoRequest, opts ...grpc.CallOption) (*EchoResponse, error) {
|
||||||
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||||
|
out := new(EchoResponse)
|
||||||
|
err := c.cc.Invoke(ctx, HelloService_Echo_FullMethodName, in, out, cOpts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// HelloServiceServer is the server API for HelloService service.
|
||||||
|
// All implementations must embed UnimplementedHelloServiceServer
|
||||||
|
// for forward compatibility.
|
||||||
|
type HelloServiceServer interface {
|
||||||
|
Ping(context.Context, *PingRequest) (*PongResponse, error)
|
||||||
|
Echo(context.Context, *EchoRequest) (*EchoResponse, error)
|
||||||
|
mustEmbedUnimplementedHelloServiceServer()
|
||||||
|
}
|
||||||
|
|
||||||
|
// UnimplementedHelloServiceServer 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 UnimplementedHelloServiceServer struct{}
|
||||||
|
|
||||||
|
func (UnimplementedHelloServiceServer) Ping(context.Context, *PingRequest) (*PongResponse, error) {
|
||||||
|
return nil, status.Error(codes.Unimplemented, "method Ping not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedHelloServiceServer) Echo(context.Context, *EchoRequest) (*EchoResponse, error) {
|
||||||
|
return nil, status.Error(codes.Unimplemented, "method Echo not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedHelloServiceServer) mustEmbedUnimplementedHelloServiceServer() {}
|
||||||
|
func (UnimplementedHelloServiceServer) testEmbeddedByValue() {}
|
||||||
|
|
||||||
|
// UnsafeHelloServiceServer may be embedded to opt out of forward compatibility for this service.
|
||||||
|
// Use of this interface is not recommended, as added methods to HelloServiceServer will
|
||||||
|
// result in compilation errors.
|
||||||
|
type UnsafeHelloServiceServer interface {
|
||||||
|
mustEmbedUnimplementedHelloServiceServer()
|
||||||
|
}
|
||||||
|
|
||||||
|
func RegisterHelloServiceServer(s grpc.ServiceRegistrar, srv HelloServiceServer) {
|
||||||
|
// If the following call panics, it indicates UnimplementedHelloServiceServer 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(&HelloService_ServiceDesc, srv)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _HelloService_Ping_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(PingRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(HelloServiceServer).Ping(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: HelloService_Ping_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(HelloServiceServer).Ping(ctx, req.(*PingRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _HelloService_Echo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(EchoRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(HelloServiceServer).Echo(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: HelloService_Echo_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(HelloServiceServer).Echo(ctx, req.(*EchoRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HelloService_ServiceDesc is the grpc.ServiceDesc for HelloService service.
|
||||||
|
// It's only intended for direct use with grpc.RegisterService,
|
||||||
|
// and not to be introspected or modified (even as a copy)
|
||||||
|
var HelloService_ServiceDesc = grpc.ServiceDesc{
|
||||||
|
ServiceName: "music_agregator.hello.v1.HelloService",
|
||||||
|
HandlerType: (*HelloServiceServer)(nil),
|
||||||
|
Methods: []grpc.MethodDesc{
|
||||||
|
{
|
||||||
|
MethodName: "Ping",
|
||||||
|
Handler: _HelloService_Ping_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "Echo",
|
||||||
|
Handler: _HelloService_Echo_Handler,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
Streams: []grpc.StreamDesc{},
|
||||||
|
Metadata: "music_agregator/hello/v1/service.proto",
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,159 @@
|
|||||||
|
// 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",
|
||||||
|
}
|
||||||
@@ -0,0 +1,60 @@
|
|||||||
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||||
|
// versions:
|
||||||
|
// protoc-gen-go v1.36.11
|
||||||
|
// protoc (unknown)
|
||||||
|
// source: music_agregator/metadata/v1/metadata.proto
|
||||||
|
|
||||||
|
package metadata
|
||||||
|
|
||||||
|
import (
|
||||||
|
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||||
|
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||||
|
reflect "reflect"
|
||||||
|
unsafe "unsafe"
|
||||||
|
)
|
||||||
|
|
||||||
|
const (
|
||||||
|
// Verify that this generated code is sufficiently up-to-date.
|
||||||
|
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||||
|
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||||
|
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||||
|
)
|
||||||
|
|
||||||
|
var File_music_agregator_metadata_v1_metadata_proto protoreflect.FileDescriptor
|
||||||
|
|
||||||
|
const file_music_agregator_metadata_v1_metadata_proto_rawDesc = "" +
|
||||||
|
"\n" +
|
||||||
|
"*music_agregator/metadata/v1/metadata.proto\x12\x1bmusic_agregator.metadata.v12\x11\n" +
|
||||||
|
"\x0fMetadataServiceB=Z;homelab.lan/music-agregator/gen/music_agregator/v1/metadatab\x06proto3"
|
||||||
|
|
||||||
|
var file_music_agregator_metadata_v1_metadata_proto_goTypes = []any{}
|
||||||
|
var file_music_agregator_metadata_v1_metadata_proto_depIdxs = []int32{
|
||||||
|
0, // [0:0] is the sub-list for method output_type
|
||||||
|
0, // [0:0] is the sub-list for method input_type
|
||||||
|
0, // [0:0] is the sub-list for extension type_name
|
||||||
|
0, // [0:0] is the sub-list for extension extendee
|
||||||
|
0, // [0:0] is the sub-list for field type_name
|
||||||
|
}
|
||||||
|
|
||||||
|
func init() { file_music_agregator_metadata_v1_metadata_proto_init() }
|
||||||
|
func file_music_agregator_metadata_v1_metadata_proto_init() {
|
||||||
|
if File_music_agregator_metadata_v1_metadata_proto != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
type x struct{}
|
||||||
|
out := protoimpl.TypeBuilder{
|
||||||
|
File: protoimpl.DescBuilder{
|
||||||
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||||
|
RawDescriptor: unsafe.Slice(unsafe.StringData(file_music_agregator_metadata_v1_metadata_proto_rawDesc), len(file_music_agregator_metadata_v1_metadata_proto_rawDesc)),
|
||||||
|
NumEnums: 0,
|
||||||
|
NumMessages: 0,
|
||||||
|
NumExtensions: 0,
|
||||||
|
NumServices: 1,
|
||||||
|
},
|
||||||
|
GoTypes: file_music_agregator_metadata_v1_metadata_proto_goTypes,
|
||||||
|
DependencyIndexes: file_music_agregator_metadata_v1_metadata_proto_depIdxs,
|
||||||
|
}.Build()
|
||||||
|
File_music_agregator_metadata_v1_metadata_proto = out.File
|
||||||
|
file_music_agregator_metadata_v1_metadata_proto_goTypes = nil
|
||||||
|
file_music_agregator_metadata_v1_metadata_proto_depIdxs = nil
|
||||||
|
}
|
||||||
@@ -0,0 +1,76 @@
|
|||||||
|
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||||
|
// versions:
|
||||||
|
// - protoc-gen-go-grpc v1.6.1
|
||||||
|
// - protoc (unknown)
|
||||||
|
// source: music_agregator/metadata/v1/metadata.proto
|
||||||
|
|
||||||
|
package metadata
|
||||||
|
|
||||||
|
import (
|
||||||
|
grpc "google.golang.org/grpc"
|
||||||
|
)
|
||||||
|
|
||||||
|
// 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
|
||||||
|
|
||||||
|
// MetadataServiceClient is the client API for MetadataService 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 MetadataServiceClient interface {
|
||||||
|
}
|
||||||
|
|
||||||
|
type metadataServiceClient struct {
|
||||||
|
cc grpc.ClientConnInterface
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewMetadataServiceClient(cc grpc.ClientConnInterface) MetadataServiceClient {
|
||||||
|
return &metadataServiceClient{cc}
|
||||||
|
}
|
||||||
|
|
||||||
|
// MetadataServiceServer is the server API for MetadataService service.
|
||||||
|
// All implementations must embed UnimplementedMetadataServiceServer
|
||||||
|
// for forward compatibility.
|
||||||
|
type MetadataServiceServer interface {
|
||||||
|
mustEmbedUnimplementedMetadataServiceServer()
|
||||||
|
}
|
||||||
|
|
||||||
|
// UnimplementedMetadataServiceServer 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 UnimplementedMetadataServiceServer struct{}
|
||||||
|
|
||||||
|
func (UnimplementedMetadataServiceServer) mustEmbedUnimplementedMetadataServiceServer() {}
|
||||||
|
func (UnimplementedMetadataServiceServer) testEmbeddedByValue() {}
|
||||||
|
|
||||||
|
// UnsafeMetadataServiceServer may be embedded to opt out of forward compatibility for this service.
|
||||||
|
// Use of this interface is not recommended, as added methods to MetadataServiceServer will
|
||||||
|
// result in compilation errors.
|
||||||
|
type UnsafeMetadataServiceServer interface {
|
||||||
|
mustEmbedUnimplementedMetadataServiceServer()
|
||||||
|
}
|
||||||
|
|
||||||
|
func RegisterMetadataServiceServer(s grpc.ServiceRegistrar, srv MetadataServiceServer) {
|
||||||
|
// If the following call panics, it indicates UnimplementedMetadataServiceServer 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(&MetadataService_ServiceDesc, srv)
|
||||||
|
}
|
||||||
|
|
||||||
|
// MetadataService_ServiceDesc is the grpc.ServiceDesc for MetadataService service.
|
||||||
|
// It's only intended for direct use with grpc.RegisterService,
|
||||||
|
// and not to be introspected or modified (even as a copy)
|
||||||
|
var MetadataService_ServiceDesc = grpc.ServiceDesc{
|
||||||
|
ServiceName: "music_agregator.metadata.v1.MetadataService",
|
||||||
|
HandlerType: (*MetadataServiceServer)(nil),
|
||||||
|
Methods: []grpc.MethodDesc{},
|
||||||
|
Streams: []grpc.StreamDesc{},
|
||||||
|
Metadata: "music_agregator/metadata/v1/metadata.proto",
|
||||||
|
}
|
||||||
@@ -0,0 +1,713 @@
|
|||||||
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||||
|
// versions:
|
||||||
|
// protoc-gen-go v1.36.11
|
||||||
|
// protoc (unknown)
|
||||||
|
// source: music_agregator/torrent/v1/torrent.proto
|
||||||
|
|
||||||
|
package torrent
|
||||||
|
|
||||||
|
import (
|
||||||
|
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||||
|
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||||
|
reflect "reflect"
|
||||||
|
sync "sync"
|
||||||
|
unsafe "unsafe"
|
||||||
|
)
|
||||||
|
|
||||||
|
const (
|
||||||
|
// Verify that this generated code is sufficiently up-to-date.
|
||||||
|
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||||
|
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||||
|
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||||
|
)
|
||||||
|
|
||||||
|
type ListRequest struct {
|
||||||
|
state protoimpl.MessageState `protogen:"open.v1"`
|
||||||
|
ClientName string `protobuf:"bytes,1,opt,name=client_name,json=clientName,proto3" json:"client_name,omitempty"`
|
||||||
|
Filter string `protobuf:"bytes,2,opt,name=filter,proto3" json:"filter,omitempty"`
|
||||||
|
Category string `protobuf:"bytes,3,opt,name=category,proto3" json:"category,omitempty"`
|
||||||
|
Tag string `protobuf:"bytes,4,opt,name=tag,proto3" json:"tag,omitempty"`
|
||||||
|
Sort string `protobuf:"bytes,5,opt,name=sort,proto3" json:"sort,omitempty"`
|
||||||
|
Reverse bool `protobuf:"varint,6,opt,name=reverse,proto3" json:"reverse,omitempty"`
|
||||||
|
Limit int32 `protobuf:"varint,7,opt,name=limit,proto3" json:"limit,omitempty"`
|
||||||
|
Offset int32 `protobuf:"varint,8,opt,name=offset,proto3" json:"offset,omitempty"`
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ListRequest) Reset() {
|
||||||
|
*x = ListRequest{}
|
||||||
|
mi := &file_music_agregator_torrent_v1_torrent_proto_msgTypes[0]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ListRequest) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*ListRequest) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *ListRequest) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_music_agregator_torrent_v1_torrent_proto_msgTypes[0]
|
||||||
|
if x != nil {
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
return ms
|
||||||
|
}
|
||||||
|
return mi.MessageOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use ListRequest.ProtoReflect.Descriptor instead.
|
||||||
|
func (*ListRequest) Descriptor() ([]byte, []int) {
|
||||||
|
return file_music_agregator_torrent_v1_torrent_proto_rawDescGZIP(), []int{0}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ListRequest) GetClientName() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.ClientName
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ListRequest) GetFilter() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Filter
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ListRequest) GetCategory() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Category
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ListRequest) GetTag() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Tag
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ListRequest) GetSort() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Sort
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ListRequest) GetReverse() bool {
|
||||||
|
if x != nil {
|
||||||
|
return x.Reverse
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ListRequest) GetLimit() int32 {
|
||||||
|
if x != nil {
|
||||||
|
return x.Limit
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ListRequest) GetOffset() int32 {
|
||||||
|
if x != nil {
|
||||||
|
return x.Offset
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
type ListResponse struct {
|
||||||
|
state protoimpl.MessageState `protogen:"open.v1"`
|
||||||
|
Items []*ListItem `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"`
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ListResponse) Reset() {
|
||||||
|
*x = ListResponse{}
|
||||||
|
mi := &file_music_agregator_torrent_v1_torrent_proto_msgTypes[1]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ListResponse) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*ListResponse) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *ListResponse) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_music_agregator_torrent_v1_torrent_proto_msgTypes[1]
|
||||||
|
if x != nil {
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
return ms
|
||||||
|
}
|
||||||
|
return mi.MessageOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use ListResponse.ProtoReflect.Descriptor instead.
|
||||||
|
func (*ListResponse) Descriptor() ([]byte, []int) {
|
||||||
|
return file_music_agregator_torrent_v1_torrent_proto_rawDescGZIP(), []int{1}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ListResponse) GetItems() []*ListItem {
|
||||||
|
if x != nil {
|
||||||
|
return x.Items
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type ListItem struct {
|
||||||
|
state protoimpl.MessageState `protogen:"open.v1"`
|
||||||
|
Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"`
|
||||||
|
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
|
||||||
|
Size int64 `protobuf:"varint,3,opt,name=size,proto3" json:"size,omitempty"`
|
||||||
|
Progress float64 `protobuf:"fixed64,4,opt,name=progress,proto3" json:"progress,omitempty"`
|
||||||
|
Dlspeed int64 `protobuf:"varint,5,opt,name=dlspeed,proto3" json:"dlspeed,omitempty"`
|
||||||
|
Upspeed int64 `protobuf:"varint,6,opt,name=upspeed,proto3" json:"upspeed,omitempty"`
|
||||||
|
NumSeeds int32 `protobuf:"varint,7,opt,name=num_seeds,json=numSeeds,proto3" json:"num_seeds,omitempty"`
|
||||||
|
NumLeechs int32 `protobuf:"varint,8,opt,name=num_leechs,json=numLeechs,proto3" json:"num_leechs,omitempty"`
|
||||||
|
State string `protobuf:"bytes,9,opt,name=state,proto3" json:"state,omitempty"`
|
||||||
|
Eta int64 `protobuf:"varint,10,opt,name=eta,proto3" json:"eta,omitempty"`
|
||||||
|
Ratio float64 `protobuf:"fixed64,11,opt,name=ratio,proto3" json:"ratio,omitempty"`
|
||||||
|
Category string `protobuf:"bytes,12,opt,name=category,proto3" json:"category,omitempty"`
|
||||||
|
Tags string `protobuf:"bytes,13,opt,name=tags,proto3" json:"tags,omitempty"`
|
||||||
|
AddedOn int64 `protobuf:"varint,14,opt,name=added_on,json=addedOn,proto3" json:"added_on,omitempty"`
|
||||||
|
CompletionOn int64 `protobuf:"varint,15,opt,name=completion_on,json=completionOn,proto3" json:"completion_on,omitempty"`
|
||||||
|
SavePath string `protobuf:"bytes,16,opt,name=save_path,json=savePath,proto3" json:"save_path,omitempty"`
|
||||||
|
ContentPath string `protobuf:"bytes,17,opt,name=content_path,json=contentPath,proto3" json:"content_path,omitempty"`
|
||||||
|
Downloaded int64 `protobuf:"varint,18,opt,name=downloaded,proto3" json:"downloaded,omitempty"`
|
||||||
|
Uploaded int64 `protobuf:"varint,19,opt,name=uploaded,proto3" json:"uploaded,omitempty"`
|
||||||
|
Tracker string `protobuf:"bytes,20,opt,name=tracker,proto3" json:"tracker,omitempty"`
|
||||||
|
SeedingTime int64 `protobuf:"varint,21,opt,name=seeding_time,json=seedingTime,proto3" json:"seeding_time,omitempty"`
|
||||||
|
AmountLeft int64 `protobuf:"varint,22,opt,name=amount_left,json=amountLeft,proto3" json:"amount_left,omitempty"`
|
||||||
|
Availability float64 `protobuf:"fixed64,23,opt,name=availability,proto3" json:"availability,omitempty"`
|
||||||
|
SizeFormatted string `protobuf:"bytes,100,opt,name=size_formatted,json=sizeFormatted,proto3" json:"size_formatted,omitempty"`
|
||||||
|
ProgressFormatted string `protobuf:"bytes,101,opt,name=progress_formatted,json=progressFormatted,proto3" json:"progress_formatted,omitempty"`
|
||||||
|
DlspeedFormatted string `protobuf:"bytes,102,opt,name=dlspeed_formatted,json=dlspeedFormatted,proto3" json:"dlspeed_formatted,omitempty"`
|
||||||
|
UpspeedFormatted string `protobuf:"bytes,103,opt,name=upspeed_formatted,json=upspeedFormatted,proto3" json:"upspeed_formatted,omitempty"`
|
||||||
|
AddedOnFormatted string `protobuf:"bytes,104,opt,name=added_on_formatted,json=addedOnFormatted,proto3" json:"added_on_formatted,omitempty"`
|
||||||
|
CompletionOnFormatted string `protobuf:"bytes,105,opt,name=completion_on_formatted,json=completionOnFormatted,proto3" json:"completion_on_formatted,omitempty"`
|
||||||
|
DownloadedFormatted string `protobuf:"bytes,106,opt,name=downloaded_formatted,json=downloadedFormatted,proto3" json:"downloaded_formatted,omitempty"`
|
||||||
|
UploadedFormatted string `protobuf:"bytes,107,opt,name=uploaded_formatted,json=uploadedFormatted,proto3" json:"uploaded_formatted,omitempty"`
|
||||||
|
AmountLeftFormatted string `protobuf:"bytes,108,opt,name=amount_left_formatted,json=amountLeftFormatted,proto3" json:"amount_left_formatted,omitempty"`
|
||||||
|
AvailabilityFormatted string `protobuf:"bytes,109,opt,name=availability_formatted,json=availabilityFormatted,proto3" json:"availability_formatted,omitempty"`
|
||||||
|
EtaFormatted string `protobuf:"bytes,110,opt,name=eta_formatted,json=etaFormatted,proto3" json:"eta_formatted,omitempty"`
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ListItem) Reset() {
|
||||||
|
*x = ListItem{}
|
||||||
|
mi := &file_music_agregator_torrent_v1_torrent_proto_msgTypes[2]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ListItem) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*ListItem) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *ListItem) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_music_agregator_torrent_v1_torrent_proto_msgTypes[2]
|
||||||
|
if x != nil {
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
return ms
|
||||||
|
}
|
||||||
|
return mi.MessageOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use ListItem.ProtoReflect.Descriptor instead.
|
||||||
|
func (*ListItem) Descriptor() ([]byte, []int) {
|
||||||
|
return file_music_agregator_torrent_v1_torrent_proto_rawDescGZIP(), []int{2}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ListItem) GetHash() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Hash
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ListItem) GetName() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Name
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ListItem) GetSize() int64 {
|
||||||
|
if x != nil {
|
||||||
|
return x.Size
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ListItem) GetProgress() float64 {
|
||||||
|
if x != nil {
|
||||||
|
return x.Progress
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ListItem) GetDlspeed() int64 {
|
||||||
|
if x != nil {
|
||||||
|
return x.Dlspeed
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ListItem) GetUpspeed() int64 {
|
||||||
|
if x != nil {
|
||||||
|
return x.Upspeed
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ListItem) GetNumSeeds() int32 {
|
||||||
|
if x != nil {
|
||||||
|
return x.NumSeeds
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ListItem) GetNumLeechs() int32 {
|
||||||
|
if x != nil {
|
||||||
|
return x.NumLeechs
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ListItem) GetState() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.State
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ListItem) GetEta() int64 {
|
||||||
|
if x != nil {
|
||||||
|
return x.Eta
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ListItem) GetRatio() float64 {
|
||||||
|
if x != nil {
|
||||||
|
return x.Ratio
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ListItem) GetCategory() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Category
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ListItem) GetTags() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Tags
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ListItem) GetAddedOn() int64 {
|
||||||
|
if x != nil {
|
||||||
|
return x.AddedOn
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ListItem) GetCompletionOn() int64 {
|
||||||
|
if x != nil {
|
||||||
|
return x.CompletionOn
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ListItem) GetSavePath() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.SavePath
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ListItem) GetContentPath() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.ContentPath
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ListItem) GetDownloaded() int64 {
|
||||||
|
if x != nil {
|
||||||
|
return x.Downloaded
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ListItem) GetUploaded() int64 {
|
||||||
|
if x != nil {
|
||||||
|
return x.Uploaded
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ListItem) GetTracker() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Tracker
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ListItem) GetSeedingTime() int64 {
|
||||||
|
if x != nil {
|
||||||
|
return x.SeedingTime
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ListItem) GetAmountLeft() int64 {
|
||||||
|
if x != nil {
|
||||||
|
return x.AmountLeft
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ListItem) GetAvailability() float64 {
|
||||||
|
if x != nil {
|
||||||
|
return x.Availability
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ListItem) GetSizeFormatted() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.SizeFormatted
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ListItem) GetProgressFormatted() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.ProgressFormatted
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ListItem) GetDlspeedFormatted() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.DlspeedFormatted
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ListItem) GetUpspeedFormatted() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.UpspeedFormatted
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ListItem) GetAddedOnFormatted() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.AddedOnFormatted
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ListItem) GetCompletionOnFormatted() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.CompletionOnFormatted
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ListItem) GetDownloadedFormatted() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.DownloadedFormatted
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ListItem) GetUploadedFormatted() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.UploadedFormatted
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ListItem) GetAmountLeftFormatted() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.AmountLeftFormatted
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ListItem) GetAvailabilityFormatted() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.AvailabilityFormatted
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ListItem) GetEtaFormatted() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.EtaFormatted
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
type AddRequest struct {
|
||||||
|
state protoimpl.MessageState `protogen:"open.v1"`
|
||||||
|
DownloadUrl string `protobuf:"bytes,1,opt,name=download_url,json=downloadUrl,proto3" json:"download_url,omitempty"`
|
||||||
|
Filename string `protobuf:"bytes,2,opt,name=filename,proto3" json:"filename,omitempty"`
|
||||||
|
TorrentData []byte `protobuf:"bytes,3,opt,name=torrent_data,json=torrentData,proto3" json:"torrent_data,omitempty"`
|
||||||
|
SavePath string `protobuf:"bytes,4,opt,name=save_path,json=savePath,proto3" json:"save_path,omitempty"`
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *AddRequest) Reset() {
|
||||||
|
*x = AddRequest{}
|
||||||
|
mi := &file_music_agregator_torrent_v1_torrent_proto_msgTypes[3]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *AddRequest) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*AddRequest) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *AddRequest) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_music_agregator_torrent_v1_torrent_proto_msgTypes[3]
|
||||||
|
if x != nil {
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
return ms
|
||||||
|
}
|
||||||
|
return mi.MessageOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use AddRequest.ProtoReflect.Descriptor instead.
|
||||||
|
func (*AddRequest) Descriptor() ([]byte, []int) {
|
||||||
|
return file_music_agregator_torrent_v1_torrent_proto_rawDescGZIP(), []int{3}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *AddRequest) GetDownloadUrl() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.DownloadUrl
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *AddRequest) GetFilename() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Filename
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *AddRequest) GetTorrentData() []byte {
|
||||||
|
if x != nil {
|
||||||
|
return x.TorrentData
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *AddRequest) GetSavePath() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.SavePath
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
type AddResponse struct {
|
||||||
|
state protoimpl.MessageState `protogen:"open.v1"`
|
||||||
|
Item *ListItem `protobuf:"bytes,1,opt,name=item,proto3" json:"item,omitempty"`
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *AddResponse) Reset() {
|
||||||
|
*x = AddResponse{}
|
||||||
|
mi := &file_music_agregator_torrent_v1_torrent_proto_msgTypes[4]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *AddResponse) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*AddResponse) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *AddResponse) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_music_agregator_torrent_v1_torrent_proto_msgTypes[4]
|
||||||
|
if x != nil {
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
return ms
|
||||||
|
}
|
||||||
|
return mi.MessageOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use AddResponse.ProtoReflect.Descriptor instead.
|
||||||
|
func (*AddResponse) Descriptor() ([]byte, []int) {
|
||||||
|
return file_music_agregator_torrent_v1_torrent_proto_rawDescGZIP(), []int{4}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *AddResponse) GetItem() *ListItem {
|
||||||
|
if x != nil {
|
||||||
|
return x.Item
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
var File_music_agregator_torrent_v1_torrent_proto protoreflect.FileDescriptor
|
||||||
|
|
||||||
|
const file_music_agregator_torrent_v1_torrent_proto_rawDesc = "" +
|
||||||
|
"\n" +
|
||||||
|
"(music_agregator/torrent/v1/torrent.proto\x12\x1amusic_agregator.torrent.v1\"\xd0\x01\n" +
|
||||||
|
"\vListRequest\x12\x1f\n" +
|
||||||
|
"\vclient_name\x18\x01 \x01(\tR\n" +
|
||||||
|
"clientName\x12\x16\n" +
|
||||||
|
"\x06filter\x18\x02 \x01(\tR\x06filter\x12\x1a\n" +
|
||||||
|
"\bcategory\x18\x03 \x01(\tR\bcategory\x12\x10\n" +
|
||||||
|
"\x03tag\x18\x04 \x01(\tR\x03tag\x12\x12\n" +
|
||||||
|
"\x04sort\x18\x05 \x01(\tR\x04sort\x12\x18\n" +
|
||||||
|
"\areverse\x18\x06 \x01(\bR\areverse\x12\x14\n" +
|
||||||
|
"\x05limit\x18\a \x01(\x05R\x05limit\x12\x16\n" +
|
||||||
|
"\x06offset\x18\b \x01(\x05R\x06offset\"J\n" +
|
||||||
|
"\fListResponse\x12:\n" +
|
||||||
|
"\x05items\x18\x01 \x03(\v2$.music_agregator.torrent.v1.ListItemR\x05items\"\x86\t\n" +
|
||||||
|
"\bListItem\x12\x12\n" +
|
||||||
|
"\x04hash\x18\x01 \x01(\tR\x04hash\x12\x12\n" +
|
||||||
|
"\x04name\x18\x02 \x01(\tR\x04name\x12\x12\n" +
|
||||||
|
"\x04size\x18\x03 \x01(\x03R\x04size\x12\x1a\n" +
|
||||||
|
"\bprogress\x18\x04 \x01(\x01R\bprogress\x12\x18\n" +
|
||||||
|
"\adlspeed\x18\x05 \x01(\x03R\adlspeed\x12\x18\n" +
|
||||||
|
"\aupspeed\x18\x06 \x01(\x03R\aupspeed\x12\x1b\n" +
|
||||||
|
"\tnum_seeds\x18\a \x01(\x05R\bnumSeeds\x12\x1d\n" +
|
||||||
|
"\n" +
|
||||||
|
"num_leechs\x18\b \x01(\x05R\tnumLeechs\x12\x14\n" +
|
||||||
|
"\x05state\x18\t \x01(\tR\x05state\x12\x10\n" +
|
||||||
|
"\x03eta\x18\n" +
|
||||||
|
" \x01(\x03R\x03eta\x12\x14\n" +
|
||||||
|
"\x05ratio\x18\v \x01(\x01R\x05ratio\x12\x1a\n" +
|
||||||
|
"\bcategory\x18\f \x01(\tR\bcategory\x12\x12\n" +
|
||||||
|
"\x04tags\x18\r \x01(\tR\x04tags\x12\x19\n" +
|
||||||
|
"\badded_on\x18\x0e \x01(\x03R\aaddedOn\x12#\n" +
|
||||||
|
"\rcompletion_on\x18\x0f \x01(\x03R\fcompletionOn\x12\x1b\n" +
|
||||||
|
"\tsave_path\x18\x10 \x01(\tR\bsavePath\x12!\n" +
|
||||||
|
"\fcontent_path\x18\x11 \x01(\tR\vcontentPath\x12\x1e\n" +
|
||||||
|
"\n" +
|
||||||
|
"downloaded\x18\x12 \x01(\x03R\n" +
|
||||||
|
"downloaded\x12\x1a\n" +
|
||||||
|
"\buploaded\x18\x13 \x01(\x03R\buploaded\x12\x18\n" +
|
||||||
|
"\atracker\x18\x14 \x01(\tR\atracker\x12!\n" +
|
||||||
|
"\fseeding_time\x18\x15 \x01(\x03R\vseedingTime\x12\x1f\n" +
|
||||||
|
"\vamount_left\x18\x16 \x01(\x03R\n" +
|
||||||
|
"amountLeft\x12\"\n" +
|
||||||
|
"\favailability\x18\x17 \x01(\x01R\favailability\x12%\n" +
|
||||||
|
"\x0esize_formatted\x18d \x01(\tR\rsizeFormatted\x12-\n" +
|
||||||
|
"\x12progress_formatted\x18e \x01(\tR\x11progressFormatted\x12+\n" +
|
||||||
|
"\x11dlspeed_formatted\x18f \x01(\tR\x10dlspeedFormatted\x12+\n" +
|
||||||
|
"\x11upspeed_formatted\x18g \x01(\tR\x10upspeedFormatted\x12,\n" +
|
||||||
|
"\x12added_on_formatted\x18h \x01(\tR\x10addedOnFormatted\x126\n" +
|
||||||
|
"\x17completion_on_formatted\x18i \x01(\tR\x15completionOnFormatted\x121\n" +
|
||||||
|
"\x14downloaded_formatted\x18j \x01(\tR\x13downloadedFormatted\x12-\n" +
|
||||||
|
"\x12uploaded_formatted\x18k \x01(\tR\x11uploadedFormatted\x122\n" +
|
||||||
|
"\x15amount_left_formatted\x18l \x01(\tR\x13amountLeftFormatted\x125\n" +
|
||||||
|
"\x16availability_formatted\x18m \x01(\tR\x15availabilityFormatted\x12#\n" +
|
||||||
|
"\reta_formatted\x18n \x01(\tR\fetaFormatted\"\x8b\x01\n" +
|
||||||
|
"\n" +
|
||||||
|
"AddRequest\x12!\n" +
|
||||||
|
"\fdownload_url\x18\x01 \x01(\tR\vdownloadUrl\x12\x1a\n" +
|
||||||
|
"\bfilename\x18\x02 \x01(\tR\bfilename\x12!\n" +
|
||||||
|
"\ftorrent_data\x18\x03 \x01(\fR\vtorrentData\x12\x1b\n" +
|
||||||
|
"\tsave_path\x18\x04 \x01(\tR\bsavePath\"G\n" +
|
||||||
|
"\vAddResponse\x128\n" +
|
||||||
|
"\x04item\x18\x01 \x01(\v2$.music_agregator.torrent.v1.ListItemR\x04item2\xc7\x01\n" +
|
||||||
|
"\x0eTorrentService\x12[\n" +
|
||||||
|
"\x04List\x12'.music_agregator.torrent.v1.ListRequest\x1a(.music_agregator.torrent.v1.ListResponse\"\x00\x12X\n" +
|
||||||
|
"\x03Add\x12&.music_agregator.torrent.v1.AddRequest\x1a'.music_agregator.torrent.v1.AddResponse\"\x00B<Z:homelab.lan/music-agregator/gen/music_agregator/v1/torrentb\x06proto3"
|
||||||
|
|
||||||
|
var (
|
||||||
|
file_music_agregator_torrent_v1_torrent_proto_rawDescOnce sync.Once
|
||||||
|
file_music_agregator_torrent_v1_torrent_proto_rawDescData []byte
|
||||||
|
)
|
||||||
|
|
||||||
|
func file_music_agregator_torrent_v1_torrent_proto_rawDescGZIP() []byte {
|
||||||
|
file_music_agregator_torrent_v1_torrent_proto_rawDescOnce.Do(func() {
|
||||||
|
file_music_agregator_torrent_v1_torrent_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_music_agregator_torrent_v1_torrent_proto_rawDesc), len(file_music_agregator_torrent_v1_torrent_proto_rawDesc)))
|
||||||
|
})
|
||||||
|
return file_music_agregator_torrent_v1_torrent_proto_rawDescData
|
||||||
|
}
|
||||||
|
|
||||||
|
var file_music_agregator_torrent_v1_torrent_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
|
||||||
|
var file_music_agregator_torrent_v1_torrent_proto_goTypes = []any{
|
||||||
|
(*ListRequest)(nil), // 0: music_agregator.torrent.v1.ListRequest
|
||||||
|
(*ListResponse)(nil), // 1: music_agregator.torrent.v1.ListResponse
|
||||||
|
(*ListItem)(nil), // 2: music_agregator.torrent.v1.ListItem
|
||||||
|
(*AddRequest)(nil), // 3: music_agregator.torrent.v1.AddRequest
|
||||||
|
(*AddResponse)(nil), // 4: music_agregator.torrent.v1.AddResponse
|
||||||
|
}
|
||||||
|
var file_music_agregator_torrent_v1_torrent_proto_depIdxs = []int32{
|
||||||
|
2, // 0: music_agregator.torrent.v1.ListResponse.items:type_name -> music_agregator.torrent.v1.ListItem
|
||||||
|
2, // 1: music_agregator.torrent.v1.AddResponse.item:type_name -> music_agregator.torrent.v1.ListItem
|
||||||
|
0, // 2: music_agregator.torrent.v1.TorrentService.List:input_type -> music_agregator.torrent.v1.ListRequest
|
||||||
|
3, // 3: music_agregator.torrent.v1.TorrentService.Add:input_type -> music_agregator.torrent.v1.AddRequest
|
||||||
|
1, // 4: music_agregator.torrent.v1.TorrentService.List:output_type -> music_agregator.torrent.v1.ListResponse
|
||||||
|
4, // 5: music_agregator.torrent.v1.TorrentService.Add:output_type -> music_agregator.torrent.v1.AddResponse
|
||||||
|
4, // [4:6] is the sub-list for method output_type
|
||||||
|
2, // [2:4] is the sub-list for method input_type
|
||||||
|
2, // [2:2] is the sub-list for extension type_name
|
||||||
|
2, // [2:2] is the sub-list for extension extendee
|
||||||
|
0, // [0:2] is the sub-list for field type_name
|
||||||
|
}
|
||||||
|
|
||||||
|
func init() { file_music_agregator_torrent_v1_torrent_proto_init() }
|
||||||
|
func file_music_agregator_torrent_v1_torrent_proto_init() {
|
||||||
|
if File_music_agregator_torrent_v1_torrent_proto != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
type x struct{}
|
||||||
|
out := protoimpl.TypeBuilder{
|
||||||
|
File: protoimpl.DescBuilder{
|
||||||
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||||
|
RawDescriptor: unsafe.Slice(unsafe.StringData(file_music_agregator_torrent_v1_torrent_proto_rawDesc), len(file_music_agregator_torrent_v1_torrent_proto_rawDesc)),
|
||||||
|
NumEnums: 0,
|
||||||
|
NumMessages: 5,
|
||||||
|
NumExtensions: 0,
|
||||||
|
NumServices: 1,
|
||||||
|
},
|
||||||
|
GoTypes: file_music_agregator_torrent_v1_torrent_proto_goTypes,
|
||||||
|
DependencyIndexes: file_music_agregator_torrent_v1_torrent_proto_depIdxs,
|
||||||
|
MessageInfos: file_music_agregator_torrent_v1_torrent_proto_msgTypes,
|
||||||
|
}.Build()
|
||||||
|
File_music_agregator_torrent_v1_torrent_proto = out.File
|
||||||
|
file_music_agregator_torrent_v1_torrent_proto_goTypes = nil
|
||||||
|
file_music_agregator_torrent_v1_torrent_proto_depIdxs = nil
|
||||||
|
}
|
||||||
@@ -0,0 +1,159 @@
|
|||||||
|
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||||
|
// versions:
|
||||||
|
// - protoc-gen-go-grpc v1.6.1
|
||||||
|
// - protoc (unknown)
|
||||||
|
// source: music_agregator/torrent/v1/torrent.proto
|
||||||
|
|
||||||
|
package torrent
|
||||||
|
|
||||||
|
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 (
|
||||||
|
TorrentService_List_FullMethodName = "/music_agregator.torrent.v1.TorrentService/List"
|
||||||
|
TorrentService_Add_FullMethodName = "/music_agregator.torrent.v1.TorrentService/Add"
|
||||||
|
)
|
||||||
|
|
||||||
|
// TorrentServiceClient is the client API for TorrentService 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 TorrentServiceClient interface {
|
||||||
|
List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error)
|
||||||
|
Add(ctx context.Context, in *AddRequest, opts ...grpc.CallOption) (*AddResponse, error)
|
||||||
|
}
|
||||||
|
|
||||||
|
type torrentServiceClient struct {
|
||||||
|
cc grpc.ClientConnInterface
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewTorrentServiceClient(cc grpc.ClientConnInterface) TorrentServiceClient {
|
||||||
|
return &torrentServiceClient{cc}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *torrentServiceClient) List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error) {
|
||||||
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||||
|
out := new(ListResponse)
|
||||||
|
err := c.cc.Invoke(ctx, TorrentService_List_FullMethodName, in, out, cOpts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *torrentServiceClient) Add(ctx context.Context, in *AddRequest, opts ...grpc.CallOption) (*AddResponse, error) {
|
||||||
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||||
|
out := new(AddResponse)
|
||||||
|
err := c.cc.Invoke(ctx, TorrentService_Add_FullMethodName, in, out, cOpts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// TorrentServiceServer is the server API for TorrentService service.
|
||||||
|
// All implementations must embed UnimplementedTorrentServiceServer
|
||||||
|
// for forward compatibility.
|
||||||
|
type TorrentServiceServer interface {
|
||||||
|
List(context.Context, *ListRequest) (*ListResponse, error)
|
||||||
|
Add(context.Context, *AddRequest) (*AddResponse, error)
|
||||||
|
mustEmbedUnimplementedTorrentServiceServer()
|
||||||
|
}
|
||||||
|
|
||||||
|
// UnimplementedTorrentServiceServer 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 UnimplementedTorrentServiceServer struct{}
|
||||||
|
|
||||||
|
func (UnimplementedTorrentServiceServer) List(context.Context, *ListRequest) (*ListResponse, error) {
|
||||||
|
return nil, status.Error(codes.Unimplemented, "method List not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedTorrentServiceServer) Add(context.Context, *AddRequest) (*AddResponse, error) {
|
||||||
|
return nil, status.Error(codes.Unimplemented, "method Add not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedTorrentServiceServer) mustEmbedUnimplementedTorrentServiceServer() {}
|
||||||
|
func (UnimplementedTorrentServiceServer) testEmbeddedByValue() {}
|
||||||
|
|
||||||
|
// UnsafeTorrentServiceServer may be embedded to opt out of forward compatibility for this service.
|
||||||
|
// Use of this interface is not recommended, as added methods to TorrentServiceServer will
|
||||||
|
// result in compilation errors.
|
||||||
|
type UnsafeTorrentServiceServer interface {
|
||||||
|
mustEmbedUnimplementedTorrentServiceServer()
|
||||||
|
}
|
||||||
|
|
||||||
|
func RegisterTorrentServiceServer(s grpc.ServiceRegistrar, srv TorrentServiceServer) {
|
||||||
|
// If the following call panics, it indicates UnimplementedTorrentServiceServer 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(&TorrentService_ServiceDesc, srv)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _TorrentService_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(ListRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(TorrentServiceServer).List(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: TorrentService_List_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(TorrentServiceServer).List(ctx, req.(*ListRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _TorrentService_Add_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(AddRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(TorrentServiceServer).Add(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: TorrentService_Add_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(TorrentServiceServer).Add(ctx, req.(*AddRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
// TorrentService_ServiceDesc is the grpc.ServiceDesc for TorrentService service.
|
||||||
|
// It's only intended for direct use with grpc.RegisterService,
|
||||||
|
// and not to be introspected or modified (even as a copy)
|
||||||
|
var TorrentService_ServiceDesc = grpc.ServiceDesc{
|
||||||
|
ServiceName: "music_agregator.torrent.v1.TorrentService",
|
||||||
|
HandlerType: (*TorrentServiceServer)(nil),
|
||||||
|
Methods: []grpc.MethodDesc{
|
||||||
|
{
|
||||||
|
MethodName: "List",
|
||||||
|
Handler: _TorrentService_List_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "Add",
|
||||||
|
Handler: _TorrentService_Add_Handler,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
Streams: []grpc.StreamDesc{},
|
||||||
|
Metadata: "music_agregator/torrent/v1/torrent.proto",
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,388 @@
|
|||||||
|
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||||
|
// versions:
|
||||||
|
// - protoc-gen-go-grpc v1.6.1
|
||||||
|
// - protoc (unknown)
|
||||||
|
// source: music_agregator/v1/music_agregator.proto
|
||||||
|
|
||||||
|
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.64.0 or later.
|
||||||
|
const _ = grpc.SupportPackageIsVersion9
|
||||||
|
|
||||||
|
const (
|
||||||
|
MusicAgregatorService_MonitorAlbum_FullMethodName = "/music_agregator.v1.MusicAgregatorService/MonitorAlbum"
|
||||||
|
MusicAgregatorService_MonitorAlbumStream_FullMethodName = "/music_agregator.v1.MusicAgregatorService/MonitorAlbumStream"
|
||||||
|
MusicAgregatorService_GetArtists_FullMethodName = "/music_agregator.v1.MusicAgregatorService/GetArtists"
|
||||||
|
MusicAgregatorService_GetAlbum_FullMethodName = "/music_agregator.v1.MusicAgregatorService/GetAlbum"
|
||||||
|
MusicAgregatorService_AnalyzeAlbumRelease_FullMethodName = "/music_agregator.v1.MusicAgregatorService/AnalyzeAlbumRelease"
|
||||||
|
MusicAgregatorService_SearchArtists_FullMethodName = "/music_agregator.v1.MusicAgregatorService/SearchArtists"
|
||||||
|
MusicAgregatorService_GetArtistAlbums_FullMethodName = "/music_agregator.v1.MusicAgregatorService/GetArtistAlbums"
|
||||||
|
MusicAgregatorService_SubscribeEvents_FullMethodName = "/music_agregator.v1.MusicAgregatorService/SubscribeEvents"
|
||||||
|
)
|
||||||
|
|
||||||
|
// MusicAgregatorServiceClient is the client API for MusicAgregatorService 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 MusicAgregatorServiceClient interface {
|
||||||
|
// Deprecated: Do not use.
|
||||||
|
MonitorAlbum(ctx context.Context, in *MonitorAlbumRequest, opts ...grpc.CallOption) (*MonitorAlbumResponse, error)
|
||||||
|
MonitorAlbumStream(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[MonitorAlbumStreamRequest, MonitorAlbumStreamResponse], error)
|
||||||
|
GetArtists(ctx context.Context, in *GetArtistsRequest, opts ...grpc.CallOption) (*GetArtistsResponse, error)
|
||||||
|
GetAlbum(ctx context.Context, in *GetAlbumRequest, opts ...grpc.CallOption) (*GetAlbumResponse, error)
|
||||||
|
AnalyzeAlbumRelease(ctx context.Context, in *AnalyzeAlbumReleaseRequest, opts ...grpc.CallOption) (*AnalyzeAlbumReleaseResponse, error)
|
||||||
|
SearchArtists(ctx context.Context, in *SearchArtistsRequest, opts ...grpc.CallOption) (*SearchArtistsResponse, error)
|
||||||
|
GetArtistAlbums(ctx context.Context, in *GetArtistAlbumsRequest, opts ...grpc.CallOption) (*GetArtistAlbumsResponse, error)
|
||||||
|
SubscribeEvents(ctx context.Context, in *SubscribeEventsRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[AlbumEvent], error)
|
||||||
|
}
|
||||||
|
|
||||||
|
type musicAgregatorServiceClient struct {
|
||||||
|
cc grpc.ClientConnInterface
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewMusicAgregatorServiceClient(cc grpc.ClientConnInterface) MusicAgregatorServiceClient {
|
||||||
|
return &musicAgregatorServiceClient{cc}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Do not use.
|
||||||
|
func (c *musicAgregatorServiceClient) MonitorAlbum(ctx context.Context, in *MonitorAlbumRequest, opts ...grpc.CallOption) (*MonitorAlbumResponse, error) {
|
||||||
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||||
|
out := new(MonitorAlbumResponse)
|
||||||
|
err := c.cc.Invoke(ctx, MusicAgregatorService_MonitorAlbum_FullMethodName, in, out, cOpts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *musicAgregatorServiceClient) MonitorAlbumStream(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[MonitorAlbumStreamRequest, MonitorAlbumStreamResponse], error) {
|
||||||
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||||
|
stream, err := c.cc.NewStream(ctx, &MusicAgregatorService_ServiceDesc.Streams[0], MusicAgregatorService_MonitorAlbumStream_FullMethodName, cOpts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
x := &grpc.GenericClientStream[MonitorAlbumStreamRequest, MonitorAlbumStreamResponse]{ClientStream: stream}
|
||||||
|
return x, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
|
||||||
|
type MusicAgregatorService_MonitorAlbumStreamClient = grpc.BidiStreamingClient[MonitorAlbumStreamRequest, MonitorAlbumStreamResponse]
|
||||||
|
|
||||||
|
func (c *musicAgregatorServiceClient) GetArtists(ctx context.Context, in *GetArtistsRequest, opts ...grpc.CallOption) (*GetArtistsResponse, error) {
|
||||||
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||||
|
out := new(GetArtistsResponse)
|
||||||
|
err := c.cc.Invoke(ctx, MusicAgregatorService_GetArtists_FullMethodName, in, out, cOpts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *musicAgregatorServiceClient) GetAlbum(ctx context.Context, in *GetAlbumRequest, opts ...grpc.CallOption) (*GetAlbumResponse, error) {
|
||||||
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||||
|
out := new(GetAlbumResponse)
|
||||||
|
err := c.cc.Invoke(ctx, MusicAgregatorService_GetAlbum_FullMethodName, in, out, cOpts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *musicAgregatorServiceClient) AnalyzeAlbumRelease(ctx context.Context, in *AnalyzeAlbumReleaseRequest, opts ...grpc.CallOption) (*AnalyzeAlbumReleaseResponse, error) {
|
||||||
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||||
|
out := new(AnalyzeAlbumReleaseResponse)
|
||||||
|
err := c.cc.Invoke(ctx, MusicAgregatorService_AnalyzeAlbumRelease_FullMethodName, in, out, cOpts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *musicAgregatorServiceClient) SearchArtists(ctx context.Context, in *SearchArtistsRequest, opts ...grpc.CallOption) (*SearchArtistsResponse, error) {
|
||||||
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||||
|
out := new(SearchArtistsResponse)
|
||||||
|
err := c.cc.Invoke(ctx, MusicAgregatorService_SearchArtists_FullMethodName, in, out, cOpts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *musicAgregatorServiceClient) GetArtistAlbums(ctx context.Context, in *GetArtistAlbumsRequest, opts ...grpc.CallOption) (*GetArtistAlbumsResponse, error) {
|
||||||
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||||
|
out := new(GetArtistAlbumsResponse)
|
||||||
|
err := c.cc.Invoke(ctx, MusicAgregatorService_GetArtistAlbums_FullMethodName, in, out, cOpts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *musicAgregatorServiceClient) SubscribeEvents(ctx context.Context, in *SubscribeEventsRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[AlbumEvent], error) {
|
||||||
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||||
|
stream, err := c.cc.NewStream(ctx, &MusicAgregatorService_ServiceDesc.Streams[1], MusicAgregatorService_SubscribeEvents_FullMethodName, cOpts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
x := &grpc.GenericClientStream[SubscribeEventsRequest, AlbumEvent]{ClientStream: stream}
|
||||||
|
if err := x.ClientStream.SendMsg(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if err := x.ClientStream.CloseSend(); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return x, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
|
||||||
|
type MusicAgregatorService_SubscribeEventsClient = grpc.ServerStreamingClient[AlbumEvent]
|
||||||
|
|
||||||
|
// MusicAgregatorServiceServer is the server API for MusicAgregatorService service.
|
||||||
|
// All implementations must embed UnimplementedMusicAgregatorServiceServer
|
||||||
|
// for forward compatibility.
|
||||||
|
type MusicAgregatorServiceServer interface {
|
||||||
|
// Deprecated: Do not use.
|
||||||
|
MonitorAlbum(context.Context, *MonitorAlbumRequest) (*MonitorAlbumResponse, error)
|
||||||
|
MonitorAlbumStream(grpc.BidiStreamingServer[MonitorAlbumStreamRequest, MonitorAlbumStreamResponse]) error
|
||||||
|
GetArtists(context.Context, *GetArtistsRequest) (*GetArtistsResponse, error)
|
||||||
|
GetAlbum(context.Context, *GetAlbumRequest) (*GetAlbumResponse, error)
|
||||||
|
AnalyzeAlbumRelease(context.Context, *AnalyzeAlbumReleaseRequest) (*AnalyzeAlbumReleaseResponse, error)
|
||||||
|
SearchArtists(context.Context, *SearchArtistsRequest) (*SearchArtistsResponse, error)
|
||||||
|
GetArtistAlbums(context.Context, *GetArtistAlbumsRequest) (*GetArtistAlbumsResponse, error)
|
||||||
|
SubscribeEvents(*SubscribeEventsRequest, grpc.ServerStreamingServer[AlbumEvent]) error
|
||||||
|
mustEmbedUnimplementedMusicAgregatorServiceServer()
|
||||||
|
}
|
||||||
|
|
||||||
|
// UnimplementedMusicAgregatorServiceServer 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 UnimplementedMusicAgregatorServiceServer struct{}
|
||||||
|
|
||||||
|
func (UnimplementedMusicAgregatorServiceServer) MonitorAlbum(context.Context, *MonitorAlbumRequest) (*MonitorAlbumResponse, error) {
|
||||||
|
return nil, status.Error(codes.Unimplemented, "method MonitorAlbum not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedMusicAgregatorServiceServer) MonitorAlbumStream(grpc.BidiStreamingServer[MonitorAlbumStreamRequest, MonitorAlbumStreamResponse]) error {
|
||||||
|
return status.Error(codes.Unimplemented, "method MonitorAlbumStream not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedMusicAgregatorServiceServer) GetArtists(context.Context, *GetArtistsRequest) (*GetArtistsResponse, error) {
|
||||||
|
return nil, status.Error(codes.Unimplemented, "method GetArtists not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedMusicAgregatorServiceServer) GetAlbum(context.Context, *GetAlbumRequest) (*GetAlbumResponse, error) {
|
||||||
|
return nil, status.Error(codes.Unimplemented, "method GetAlbum not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedMusicAgregatorServiceServer) AnalyzeAlbumRelease(context.Context, *AnalyzeAlbumReleaseRequest) (*AnalyzeAlbumReleaseResponse, error) {
|
||||||
|
return nil, status.Error(codes.Unimplemented, "method AnalyzeAlbumRelease not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedMusicAgregatorServiceServer) SearchArtists(context.Context, *SearchArtistsRequest) (*SearchArtistsResponse, error) {
|
||||||
|
return nil, status.Error(codes.Unimplemented, "method SearchArtists not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedMusicAgregatorServiceServer) GetArtistAlbums(context.Context, *GetArtistAlbumsRequest) (*GetArtistAlbumsResponse, error) {
|
||||||
|
return nil, status.Error(codes.Unimplemented, "method GetArtistAlbums not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedMusicAgregatorServiceServer) SubscribeEvents(*SubscribeEventsRequest, grpc.ServerStreamingServer[AlbumEvent]) error {
|
||||||
|
return status.Error(codes.Unimplemented, "method SubscribeEvents not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedMusicAgregatorServiceServer) mustEmbedUnimplementedMusicAgregatorServiceServer() {}
|
||||||
|
func (UnimplementedMusicAgregatorServiceServer) testEmbeddedByValue() {}
|
||||||
|
|
||||||
|
// UnsafeMusicAgregatorServiceServer may be embedded to opt out of forward compatibility for this service.
|
||||||
|
// Use of this interface is not recommended, as added methods to MusicAgregatorServiceServer will
|
||||||
|
// result in compilation errors.
|
||||||
|
type UnsafeMusicAgregatorServiceServer interface {
|
||||||
|
mustEmbedUnimplementedMusicAgregatorServiceServer()
|
||||||
|
}
|
||||||
|
|
||||||
|
func RegisterMusicAgregatorServiceServer(s grpc.ServiceRegistrar, srv MusicAgregatorServiceServer) {
|
||||||
|
// If the following call panics, it indicates UnimplementedMusicAgregatorServiceServer 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(&MusicAgregatorService_ServiceDesc, srv)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _MusicAgregatorService_MonitorAlbum_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(MonitorAlbumRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(MusicAgregatorServiceServer).MonitorAlbum(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: MusicAgregatorService_MonitorAlbum_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(MusicAgregatorServiceServer).MonitorAlbum(ctx, req.(*MonitorAlbumRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _MusicAgregatorService_MonitorAlbumStream_Handler(srv interface{}, stream grpc.ServerStream) error {
|
||||||
|
return srv.(MusicAgregatorServiceServer).MonitorAlbumStream(&grpc.GenericServerStream[MonitorAlbumStreamRequest, MonitorAlbumStreamResponse]{ServerStream: stream})
|
||||||
|
}
|
||||||
|
|
||||||
|
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
|
||||||
|
type MusicAgregatorService_MonitorAlbumStreamServer = grpc.BidiStreamingServer[MonitorAlbumStreamRequest, MonitorAlbumStreamResponse]
|
||||||
|
|
||||||
|
func _MusicAgregatorService_GetArtists_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(GetArtistsRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(MusicAgregatorServiceServer).GetArtists(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: MusicAgregatorService_GetArtists_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(MusicAgregatorServiceServer).GetArtists(ctx, req.(*GetArtistsRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _MusicAgregatorService_GetAlbum_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(GetAlbumRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(MusicAgregatorServiceServer).GetAlbum(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: MusicAgregatorService_GetAlbum_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(MusicAgregatorServiceServer).GetAlbum(ctx, req.(*GetAlbumRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _MusicAgregatorService_AnalyzeAlbumRelease_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(AnalyzeAlbumReleaseRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(MusicAgregatorServiceServer).AnalyzeAlbumRelease(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: MusicAgregatorService_AnalyzeAlbumRelease_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(MusicAgregatorServiceServer).AnalyzeAlbumRelease(ctx, req.(*AnalyzeAlbumReleaseRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _MusicAgregatorService_SearchArtists_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(SearchArtistsRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(MusicAgregatorServiceServer).SearchArtists(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: MusicAgregatorService_SearchArtists_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(MusicAgregatorServiceServer).SearchArtists(ctx, req.(*SearchArtistsRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _MusicAgregatorService_GetArtistAlbums_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(GetArtistAlbumsRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(MusicAgregatorServiceServer).GetArtistAlbums(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: MusicAgregatorService_GetArtistAlbums_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(MusicAgregatorServiceServer).GetArtistAlbums(ctx, req.(*GetArtistAlbumsRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _MusicAgregatorService_SubscribeEvents_Handler(srv interface{}, stream grpc.ServerStream) error {
|
||||||
|
m := new(SubscribeEventsRequest)
|
||||||
|
if err := stream.RecvMsg(m); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
return srv.(MusicAgregatorServiceServer).SubscribeEvents(m, &grpc.GenericServerStream[SubscribeEventsRequest, AlbumEvent]{ServerStream: stream})
|
||||||
|
}
|
||||||
|
|
||||||
|
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
|
||||||
|
type MusicAgregatorService_SubscribeEventsServer = grpc.ServerStreamingServer[AlbumEvent]
|
||||||
|
|
||||||
|
// MusicAgregatorService_ServiceDesc is the grpc.ServiceDesc for MusicAgregatorService service.
|
||||||
|
// It's only intended for direct use with grpc.RegisterService,
|
||||||
|
// and not to be introspected or modified (even as a copy)
|
||||||
|
var MusicAgregatorService_ServiceDesc = grpc.ServiceDesc{
|
||||||
|
ServiceName: "music_agregator.v1.MusicAgregatorService",
|
||||||
|
HandlerType: (*MusicAgregatorServiceServer)(nil),
|
||||||
|
Methods: []grpc.MethodDesc{
|
||||||
|
{
|
||||||
|
MethodName: "MonitorAlbum",
|
||||||
|
Handler: _MusicAgregatorService_MonitorAlbum_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "GetArtists",
|
||||||
|
Handler: _MusicAgregatorService_GetArtists_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "GetAlbum",
|
||||||
|
Handler: _MusicAgregatorService_GetAlbum_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "AnalyzeAlbumRelease",
|
||||||
|
Handler: _MusicAgregatorService_AnalyzeAlbumRelease_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "SearchArtists",
|
||||||
|
Handler: _MusicAgregatorService_SearchArtists_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "GetArtistAlbums",
|
||||||
|
Handler: _MusicAgregatorService_GetArtistAlbums_Handler,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
Streams: []grpc.StreamDesc{
|
||||||
|
{
|
||||||
|
StreamName: "MonitorAlbumStream",
|
||||||
|
Handler: _MusicAgregatorService_MonitorAlbumStream_Handler,
|
||||||
|
ServerStreams: true,
|
||||||
|
ClientStreams: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
StreamName: "SubscribeEvents",
|
||||||
|
Handler: _MusicAgregatorService_SubscribeEvents_Handler,
|
||||||
|
ServerStreams: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
Metadata: "music_agregator/v1/music_agregator.proto",
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,775 @@
|
|||||||
|
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||||
|
// versions:
|
||||||
|
// - protoc-gen-go-grpc v1.6.1
|
||||||
|
// - protoc (unknown)
|
||||||
|
// source: musicfs.proto
|
||||||
|
|
||||||
|
package musicfsv1
|
||||||
|
|
||||||
|
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 (
|
||||||
|
MusicFS_Search_FullMethodName = "/musicfs.v1.MusicFS/Search"
|
||||||
|
MusicFS_SearchStream_FullMethodName = "/musicfs.v1.MusicFS/SearchStream"
|
||||||
|
MusicFS_GetStatus_FullMethodName = "/musicfs.v1.MusicFS/GetStatus"
|
||||||
|
MusicFS_Shutdown_FullMethodName = "/musicfs.v1.MusicFS/Shutdown"
|
||||||
|
MusicFS_GetCacheStats_FullMethodName = "/musicfs.v1.MusicFS/GetCacheStats"
|
||||||
|
MusicFS_ClearCache_FullMethodName = "/musicfs.v1.MusicFS/ClearCache"
|
||||||
|
MusicFS_Prefetch_FullMethodName = "/musicfs.v1.MusicFS/Prefetch"
|
||||||
|
MusicFS_ListOrigins_FullMethodName = "/musicfs.v1.MusicFS/ListOrigins"
|
||||||
|
MusicFS_GetOriginHealth_FullMethodName = "/musicfs.v1.MusicFS/GetOriginHealth"
|
||||||
|
MusicFS_RescanOrigin_FullMethodName = "/musicfs.v1.MusicFS/RescanOrigin"
|
||||||
|
MusicFS_SubscribeEvents_FullMethodName = "/musicfs.v1.MusicFS/SubscribeEvents"
|
||||||
|
)
|
||||||
|
|
||||||
|
// MusicFSClient is the client API for MusicFS 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 MusicFSClient interface {
|
||||||
|
Search(ctx context.Context, in *SearchRequest, opts ...grpc.CallOption) (*SearchResponse, error)
|
||||||
|
SearchStream(ctx context.Context, in *SearchRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[SearchResult], error)
|
||||||
|
GetStatus(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*StatusResponse, error)
|
||||||
|
Shutdown(ctx context.Context, in *ShutdownRequest, opts ...grpc.CallOption) (*Empty, error)
|
||||||
|
GetCacheStats(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*CacheStats, error)
|
||||||
|
ClearCache(ctx context.Context, in *ClearCacheRequest, opts ...grpc.CallOption) (*ClearCacheResponse, error)
|
||||||
|
Prefetch(ctx context.Context, in *PrefetchRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[PrefetchProgress], error)
|
||||||
|
ListOrigins(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*OriginsResponse, error)
|
||||||
|
GetOriginHealth(ctx context.Context, in *OriginRequest, opts ...grpc.CallOption) (*OriginHealthResponse, error)
|
||||||
|
RescanOrigin(ctx context.Context, in *OriginRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[SyncProgress], error)
|
||||||
|
SubscribeEvents(ctx context.Context, in *EventFilter, opts ...grpc.CallOption) (grpc.ServerStreamingClient[Event], error)
|
||||||
|
}
|
||||||
|
|
||||||
|
type musicFSClient struct {
|
||||||
|
cc grpc.ClientConnInterface
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewMusicFSClient(cc grpc.ClientConnInterface) MusicFSClient {
|
||||||
|
return &musicFSClient{cc}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *musicFSClient) 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, MusicFS_Search_FullMethodName, in, out, cOpts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *musicFSClient) SearchStream(ctx context.Context, in *SearchRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[SearchResult], error) {
|
||||||
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||||
|
stream, err := c.cc.NewStream(ctx, &MusicFS_ServiceDesc.Streams[0], MusicFS_SearchStream_FullMethodName, cOpts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
x := &grpc.GenericClientStream[SearchRequest, SearchResult]{ClientStream: stream}
|
||||||
|
if err := x.ClientStream.SendMsg(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if err := x.ClientStream.CloseSend(); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return x, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
|
||||||
|
type MusicFS_SearchStreamClient = grpc.ServerStreamingClient[SearchResult]
|
||||||
|
|
||||||
|
func (c *musicFSClient) GetStatus(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*StatusResponse, error) {
|
||||||
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||||
|
out := new(StatusResponse)
|
||||||
|
err := c.cc.Invoke(ctx, MusicFS_GetStatus_FullMethodName, in, out, cOpts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *musicFSClient) Shutdown(ctx context.Context, in *ShutdownRequest, opts ...grpc.CallOption) (*Empty, error) {
|
||||||
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||||
|
out := new(Empty)
|
||||||
|
err := c.cc.Invoke(ctx, MusicFS_Shutdown_FullMethodName, in, out, cOpts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *musicFSClient) GetCacheStats(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*CacheStats, error) {
|
||||||
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||||
|
out := new(CacheStats)
|
||||||
|
err := c.cc.Invoke(ctx, MusicFS_GetCacheStats_FullMethodName, in, out, cOpts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *musicFSClient) ClearCache(ctx context.Context, in *ClearCacheRequest, opts ...grpc.CallOption) (*ClearCacheResponse, error) {
|
||||||
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||||
|
out := new(ClearCacheResponse)
|
||||||
|
err := c.cc.Invoke(ctx, MusicFS_ClearCache_FullMethodName, in, out, cOpts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *musicFSClient) Prefetch(ctx context.Context, in *PrefetchRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[PrefetchProgress], error) {
|
||||||
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||||
|
stream, err := c.cc.NewStream(ctx, &MusicFS_ServiceDesc.Streams[1], MusicFS_Prefetch_FullMethodName, cOpts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
x := &grpc.GenericClientStream[PrefetchRequest, PrefetchProgress]{ClientStream: stream}
|
||||||
|
if err := x.ClientStream.SendMsg(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if err := x.ClientStream.CloseSend(); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return x, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
|
||||||
|
type MusicFS_PrefetchClient = grpc.ServerStreamingClient[PrefetchProgress]
|
||||||
|
|
||||||
|
func (c *musicFSClient) ListOrigins(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*OriginsResponse, error) {
|
||||||
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||||
|
out := new(OriginsResponse)
|
||||||
|
err := c.cc.Invoke(ctx, MusicFS_ListOrigins_FullMethodName, in, out, cOpts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *musicFSClient) GetOriginHealth(ctx context.Context, in *OriginRequest, opts ...grpc.CallOption) (*OriginHealthResponse, error) {
|
||||||
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||||
|
out := new(OriginHealthResponse)
|
||||||
|
err := c.cc.Invoke(ctx, MusicFS_GetOriginHealth_FullMethodName, in, out, cOpts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *musicFSClient) RescanOrigin(ctx context.Context, in *OriginRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[SyncProgress], error) {
|
||||||
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||||
|
stream, err := c.cc.NewStream(ctx, &MusicFS_ServiceDesc.Streams[2], MusicFS_RescanOrigin_FullMethodName, cOpts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
x := &grpc.GenericClientStream[OriginRequest, SyncProgress]{ClientStream: stream}
|
||||||
|
if err := x.ClientStream.SendMsg(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if err := x.ClientStream.CloseSend(); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return x, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
|
||||||
|
type MusicFS_RescanOriginClient = grpc.ServerStreamingClient[SyncProgress]
|
||||||
|
|
||||||
|
func (c *musicFSClient) SubscribeEvents(ctx context.Context, in *EventFilter, opts ...grpc.CallOption) (grpc.ServerStreamingClient[Event], error) {
|
||||||
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||||
|
stream, err := c.cc.NewStream(ctx, &MusicFS_ServiceDesc.Streams[3], MusicFS_SubscribeEvents_FullMethodName, cOpts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
x := &grpc.GenericClientStream[EventFilter, Event]{ClientStream: stream}
|
||||||
|
if err := x.ClientStream.SendMsg(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if err := x.ClientStream.CloseSend(); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return x, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
|
||||||
|
type MusicFS_SubscribeEventsClient = grpc.ServerStreamingClient[Event]
|
||||||
|
|
||||||
|
// MusicFSServer is the server API for MusicFS service.
|
||||||
|
// All implementations must embed UnimplementedMusicFSServer
|
||||||
|
// for forward compatibility.
|
||||||
|
type MusicFSServer interface {
|
||||||
|
Search(context.Context, *SearchRequest) (*SearchResponse, error)
|
||||||
|
SearchStream(*SearchRequest, grpc.ServerStreamingServer[SearchResult]) error
|
||||||
|
GetStatus(context.Context, *Empty) (*StatusResponse, error)
|
||||||
|
Shutdown(context.Context, *ShutdownRequest) (*Empty, error)
|
||||||
|
GetCacheStats(context.Context, *Empty) (*CacheStats, error)
|
||||||
|
ClearCache(context.Context, *ClearCacheRequest) (*ClearCacheResponse, error)
|
||||||
|
Prefetch(*PrefetchRequest, grpc.ServerStreamingServer[PrefetchProgress]) error
|
||||||
|
ListOrigins(context.Context, *Empty) (*OriginsResponse, error)
|
||||||
|
GetOriginHealth(context.Context, *OriginRequest) (*OriginHealthResponse, error)
|
||||||
|
RescanOrigin(*OriginRequest, grpc.ServerStreamingServer[SyncProgress]) error
|
||||||
|
SubscribeEvents(*EventFilter, grpc.ServerStreamingServer[Event]) error
|
||||||
|
mustEmbedUnimplementedMusicFSServer()
|
||||||
|
}
|
||||||
|
|
||||||
|
// UnimplementedMusicFSServer 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 UnimplementedMusicFSServer struct{}
|
||||||
|
|
||||||
|
func (UnimplementedMusicFSServer) Search(context.Context, *SearchRequest) (*SearchResponse, error) {
|
||||||
|
return nil, status.Error(codes.Unimplemented, "method Search not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedMusicFSServer) SearchStream(*SearchRequest, grpc.ServerStreamingServer[SearchResult]) error {
|
||||||
|
return status.Error(codes.Unimplemented, "method SearchStream not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedMusicFSServer) GetStatus(context.Context, *Empty) (*StatusResponse, error) {
|
||||||
|
return nil, status.Error(codes.Unimplemented, "method GetStatus not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedMusicFSServer) Shutdown(context.Context, *ShutdownRequest) (*Empty, error) {
|
||||||
|
return nil, status.Error(codes.Unimplemented, "method Shutdown not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedMusicFSServer) GetCacheStats(context.Context, *Empty) (*CacheStats, error) {
|
||||||
|
return nil, status.Error(codes.Unimplemented, "method GetCacheStats not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedMusicFSServer) ClearCache(context.Context, *ClearCacheRequest) (*ClearCacheResponse, error) {
|
||||||
|
return nil, status.Error(codes.Unimplemented, "method ClearCache not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedMusicFSServer) Prefetch(*PrefetchRequest, grpc.ServerStreamingServer[PrefetchProgress]) error {
|
||||||
|
return status.Error(codes.Unimplemented, "method Prefetch not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedMusicFSServer) ListOrigins(context.Context, *Empty) (*OriginsResponse, error) {
|
||||||
|
return nil, status.Error(codes.Unimplemented, "method ListOrigins not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedMusicFSServer) GetOriginHealth(context.Context, *OriginRequest) (*OriginHealthResponse, error) {
|
||||||
|
return nil, status.Error(codes.Unimplemented, "method GetOriginHealth not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedMusicFSServer) RescanOrigin(*OriginRequest, grpc.ServerStreamingServer[SyncProgress]) error {
|
||||||
|
return status.Error(codes.Unimplemented, "method RescanOrigin not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedMusicFSServer) SubscribeEvents(*EventFilter, grpc.ServerStreamingServer[Event]) error {
|
||||||
|
return status.Error(codes.Unimplemented, "method SubscribeEvents not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedMusicFSServer) mustEmbedUnimplementedMusicFSServer() {}
|
||||||
|
func (UnimplementedMusicFSServer) testEmbeddedByValue() {}
|
||||||
|
|
||||||
|
// UnsafeMusicFSServer may be embedded to opt out of forward compatibility for this service.
|
||||||
|
// Use of this interface is not recommended, as added methods to MusicFSServer will
|
||||||
|
// result in compilation errors.
|
||||||
|
type UnsafeMusicFSServer interface {
|
||||||
|
mustEmbedUnimplementedMusicFSServer()
|
||||||
|
}
|
||||||
|
|
||||||
|
func RegisterMusicFSServer(s grpc.ServiceRegistrar, srv MusicFSServer) {
|
||||||
|
// If the following call panics, it indicates UnimplementedMusicFSServer 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(&MusicFS_ServiceDesc, srv)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _MusicFS_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.(MusicFSServer).Search(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: MusicFS_Search_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(MusicFSServer).Search(ctx, req.(*SearchRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _MusicFS_SearchStream_Handler(srv interface{}, stream grpc.ServerStream) error {
|
||||||
|
m := new(SearchRequest)
|
||||||
|
if err := stream.RecvMsg(m); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
return srv.(MusicFSServer).SearchStream(m, &grpc.GenericServerStream[SearchRequest, SearchResult]{ServerStream: stream})
|
||||||
|
}
|
||||||
|
|
||||||
|
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
|
||||||
|
type MusicFS_SearchStreamServer = grpc.ServerStreamingServer[SearchResult]
|
||||||
|
|
||||||
|
func _MusicFS_GetStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(Empty)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(MusicFSServer).GetStatus(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: MusicFS_GetStatus_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(MusicFSServer).GetStatus(ctx, req.(*Empty))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _MusicFS_Shutdown_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(ShutdownRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(MusicFSServer).Shutdown(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: MusicFS_Shutdown_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(MusicFSServer).Shutdown(ctx, req.(*ShutdownRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _MusicFS_GetCacheStats_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(Empty)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(MusicFSServer).GetCacheStats(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: MusicFS_GetCacheStats_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(MusicFSServer).GetCacheStats(ctx, req.(*Empty))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _MusicFS_ClearCache_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(ClearCacheRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(MusicFSServer).ClearCache(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: MusicFS_ClearCache_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(MusicFSServer).ClearCache(ctx, req.(*ClearCacheRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _MusicFS_Prefetch_Handler(srv interface{}, stream grpc.ServerStream) error {
|
||||||
|
m := new(PrefetchRequest)
|
||||||
|
if err := stream.RecvMsg(m); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
return srv.(MusicFSServer).Prefetch(m, &grpc.GenericServerStream[PrefetchRequest, PrefetchProgress]{ServerStream: stream})
|
||||||
|
}
|
||||||
|
|
||||||
|
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
|
||||||
|
type MusicFS_PrefetchServer = grpc.ServerStreamingServer[PrefetchProgress]
|
||||||
|
|
||||||
|
func _MusicFS_ListOrigins_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(Empty)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(MusicFSServer).ListOrigins(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: MusicFS_ListOrigins_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(MusicFSServer).ListOrigins(ctx, req.(*Empty))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _MusicFS_GetOriginHealth_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(OriginRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(MusicFSServer).GetOriginHealth(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: MusicFS_GetOriginHealth_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(MusicFSServer).GetOriginHealth(ctx, req.(*OriginRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _MusicFS_RescanOrigin_Handler(srv interface{}, stream grpc.ServerStream) error {
|
||||||
|
m := new(OriginRequest)
|
||||||
|
if err := stream.RecvMsg(m); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
return srv.(MusicFSServer).RescanOrigin(m, &grpc.GenericServerStream[OriginRequest, SyncProgress]{ServerStream: stream})
|
||||||
|
}
|
||||||
|
|
||||||
|
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
|
||||||
|
type MusicFS_RescanOriginServer = grpc.ServerStreamingServer[SyncProgress]
|
||||||
|
|
||||||
|
func _MusicFS_SubscribeEvents_Handler(srv interface{}, stream grpc.ServerStream) error {
|
||||||
|
m := new(EventFilter)
|
||||||
|
if err := stream.RecvMsg(m); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
return srv.(MusicFSServer).SubscribeEvents(m, &grpc.GenericServerStream[EventFilter, Event]{ServerStream: stream})
|
||||||
|
}
|
||||||
|
|
||||||
|
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
|
||||||
|
type MusicFS_SubscribeEventsServer = grpc.ServerStreamingServer[Event]
|
||||||
|
|
||||||
|
// MusicFS_ServiceDesc is the grpc.ServiceDesc for MusicFS service.
|
||||||
|
// It's only intended for direct use with grpc.RegisterService,
|
||||||
|
// and not to be introspected or modified (even as a copy)
|
||||||
|
var MusicFS_ServiceDesc = grpc.ServiceDesc{
|
||||||
|
ServiceName: "musicfs.v1.MusicFS",
|
||||||
|
HandlerType: (*MusicFSServer)(nil),
|
||||||
|
Methods: []grpc.MethodDesc{
|
||||||
|
{
|
||||||
|
MethodName: "Search",
|
||||||
|
Handler: _MusicFS_Search_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "GetStatus",
|
||||||
|
Handler: _MusicFS_GetStatus_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "Shutdown",
|
||||||
|
Handler: _MusicFS_Shutdown_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "GetCacheStats",
|
||||||
|
Handler: _MusicFS_GetCacheStats_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "ClearCache",
|
||||||
|
Handler: _MusicFS_ClearCache_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "ListOrigins",
|
||||||
|
Handler: _MusicFS_ListOrigins_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "GetOriginHealth",
|
||||||
|
Handler: _MusicFS_GetOriginHealth_Handler,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
Streams: []grpc.StreamDesc{
|
||||||
|
{
|
||||||
|
StreamName: "SearchStream",
|
||||||
|
Handler: _MusicFS_SearchStream_Handler,
|
||||||
|
ServerStreams: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
StreamName: "Prefetch",
|
||||||
|
Handler: _MusicFS_Prefetch_Handler,
|
||||||
|
ServerStreams: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
StreamName: "RescanOrigin",
|
||||||
|
Handler: _MusicFS_RescanOrigin_Handler,
|
||||||
|
ServerStreams: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
StreamName: "SubscribeEvents",
|
||||||
|
Handler: _MusicFS_SubscribeEvents_Handler,
|
||||||
|
ServerStreams: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
Metadata: "musicfs.proto",
|
||||||
|
}
|
||||||
|
|
||||||
|
const (
|
||||||
|
MetadataService_GetMetadata_FullMethodName = "/musicfs.v1.MetadataService/GetMetadata"
|
||||||
|
MetadataService_UpdateMetadata_FullMethodName = "/musicfs.v1.MetadataService/UpdateMetadata"
|
||||||
|
MetadataService_ClearOverlay_FullMethodName = "/musicfs.v1.MetadataService/ClearOverlay"
|
||||||
|
MetadataService_BatchUpdateMetadata_FullMethodName = "/musicfs.v1.MetadataService/BatchUpdateMetadata"
|
||||||
|
MetadataService_ImportMetadata_FullMethodName = "/musicfs.v1.MetadataService/ImportMetadata"
|
||||||
|
)
|
||||||
|
|
||||||
|
// MetadataServiceClient is the client API for MetadataService 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 MetadataServiceClient interface {
|
||||||
|
GetMetadata(ctx context.Context, in *GetMetadataRequest, opts ...grpc.CallOption) (*MetadataResponse, error)
|
||||||
|
UpdateMetadata(ctx context.Context, in *UpdateMetadataRequest, opts ...grpc.CallOption) (*UpdateMetadataResponse, error)
|
||||||
|
ClearOverlay(ctx context.Context, in *ClearOverlayRequest, opts ...grpc.CallOption) (*ClearOverlayResponse, error)
|
||||||
|
BatchUpdateMetadata(ctx context.Context, in *BatchUpdateRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[BatchUpdateProgress], error)
|
||||||
|
ImportMetadata(ctx context.Context, in *ImportMetadataRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[ImportProgress], error)
|
||||||
|
}
|
||||||
|
|
||||||
|
type metadataServiceClient struct {
|
||||||
|
cc grpc.ClientConnInterface
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewMetadataServiceClient(cc grpc.ClientConnInterface) MetadataServiceClient {
|
||||||
|
return &metadataServiceClient{cc}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *metadataServiceClient) GetMetadata(ctx context.Context, in *GetMetadataRequest, opts ...grpc.CallOption) (*MetadataResponse, error) {
|
||||||
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||||
|
out := new(MetadataResponse)
|
||||||
|
err := c.cc.Invoke(ctx, MetadataService_GetMetadata_FullMethodName, in, out, cOpts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *metadataServiceClient) UpdateMetadata(ctx context.Context, in *UpdateMetadataRequest, opts ...grpc.CallOption) (*UpdateMetadataResponse, error) {
|
||||||
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||||
|
out := new(UpdateMetadataResponse)
|
||||||
|
err := c.cc.Invoke(ctx, MetadataService_UpdateMetadata_FullMethodName, in, out, cOpts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *metadataServiceClient) ClearOverlay(ctx context.Context, in *ClearOverlayRequest, opts ...grpc.CallOption) (*ClearOverlayResponse, error) {
|
||||||
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||||
|
out := new(ClearOverlayResponse)
|
||||||
|
err := c.cc.Invoke(ctx, MetadataService_ClearOverlay_FullMethodName, in, out, cOpts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *metadataServiceClient) BatchUpdateMetadata(ctx context.Context, in *BatchUpdateRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[BatchUpdateProgress], error) {
|
||||||
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||||
|
stream, err := c.cc.NewStream(ctx, &MetadataService_ServiceDesc.Streams[0], MetadataService_BatchUpdateMetadata_FullMethodName, cOpts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
x := &grpc.GenericClientStream[BatchUpdateRequest, BatchUpdateProgress]{ClientStream: stream}
|
||||||
|
if err := x.ClientStream.SendMsg(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if err := x.ClientStream.CloseSend(); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return x, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
|
||||||
|
type MetadataService_BatchUpdateMetadataClient = grpc.ServerStreamingClient[BatchUpdateProgress]
|
||||||
|
|
||||||
|
func (c *metadataServiceClient) ImportMetadata(ctx context.Context, in *ImportMetadataRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[ImportProgress], error) {
|
||||||
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||||
|
stream, err := c.cc.NewStream(ctx, &MetadataService_ServiceDesc.Streams[1], MetadataService_ImportMetadata_FullMethodName, cOpts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
x := &grpc.GenericClientStream[ImportMetadataRequest, ImportProgress]{ClientStream: stream}
|
||||||
|
if err := x.ClientStream.SendMsg(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if err := x.ClientStream.CloseSend(); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return x, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
|
||||||
|
type MetadataService_ImportMetadataClient = grpc.ServerStreamingClient[ImportProgress]
|
||||||
|
|
||||||
|
// MetadataServiceServer is the server API for MetadataService service.
|
||||||
|
// All implementations must embed UnimplementedMetadataServiceServer
|
||||||
|
// for forward compatibility.
|
||||||
|
type MetadataServiceServer interface {
|
||||||
|
GetMetadata(context.Context, *GetMetadataRequest) (*MetadataResponse, error)
|
||||||
|
UpdateMetadata(context.Context, *UpdateMetadataRequest) (*UpdateMetadataResponse, error)
|
||||||
|
ClearOverlay(context.Context, *ClearOverlayRequest) (*ClearOverlayResponse, error)
|
||||||
|
BatchUpdateMetadata(*BatchUpdateRequest, grpc.ServerStreamingServer[BatchUpdateProgress]) error
|
||||||
|
ImportMetadata(*ImportMetadataRequest, grpc.ServerStreamingServer[ImportProgress]) error
|
||||||
|
mustEmbedUnimplementedMetadataServiceServer()
|
||||||
|
}
|
||||||
|
|
||||||
|
// UnimplementedMetadataServiceServer 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 UnimplementedMetadataServiceServer struct{}
|
||||||
|
|
||||||
|
func (UnimplementedMetadataServiceServer) GetMetadata(context.Context, *GetMetadataRequest) (*MetadataResponse, error) {
|
||||||
|
return nil, status.Error(codes.Unimplemented, "method GetMetadata not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedMetadataServiceServer) UpdateMetadata(context.Context, *UpdateMetadataRequest) (*UpdateMetadataResponse, error) {
|
||||||
|
return nil, status.Error(codes.Unimplemented, "method UpdateMetadata not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedMetadataServiceServer) ClearOverlay(context.Context, *ClearOverlayRequest) (*ClearOverlayResponse, error) {
|
||||||
|
return nil, status.Error(codes.Unimplemented, "method ClearOverlay not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedMetadataServiceServer) BatchUpdateMetadata(*BatchUpdateRequest, grpc.ServerStreamingServer[BatchUpdateProgress]) error {
|
||||||
|
return status.Error(codes.Unimplemented, "method BatchUpdateMetadata not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedMetadataServiceServer) ImportMetadata(*ImportMetadataRequest, grpc.ServerStreamingServer[ImportProgress]) error {
|
||||||
|
return status.Error(codes.Unimplemented, "method ImportMetadata not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedMetadataServiceServer) mustEmbedUnimplementedMetadataServiceServer() {}
|
||||||
|
func (UnimplementedMetadataServiceServer) testEmbeddedByValue() {}
|
||||||
|
|
||||||
|
// UnsafeMetadataServiceServer may be embedded to opt out of forward compatibility for this service.
|
||||||
|
// Use of this interface is not recommended, as added methods to MetadataServiceServer will
|
||||||
|
// result in compilation errors.
|
||||||
|
type UnsafeMetadataServiceServer interface {
|
||||||
|
mustEmbedUnimplementedMetadataServiceServer()
|
||||||
|
}
|
||||||
|
|
||||||
|
func RegisterMetadataServiceServer(s grpc.ServiceRegistrar, srv MetadataServiceServer) {
|
||||||
|
// If the following call panics, it indicates UnimplementedMetadataServiceServer 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(&MetadataService_ServiceDesc, srv)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _MetadataService_GetMetadata_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(GetMetadataRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(MetadataServiceServer).GetMetadata(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: MetadataService_GetMetadata_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(MetadataServiceServer).GetMetadata(ctx, req.(*GetMetadataRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _MetadataService_UpdateMetadata_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(UpdateMetadataRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(MetadataServiceServer).UpdateMetadata(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: MetadataService_UpdateMetadata_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(MetadataServiceServer).UpdateMetadata(ctx, req.(*UpdateMetadataRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _MetadataService_ClearOverlay_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(ClearOverlayRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(MetadataServiceServer).ClearOverlay(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: MetadataService_ClearOverlay_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(MetadataServiceServer).ClearOverlay(ctx, req.(*ClearOverlayRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _MetadataService_BatchUpdateMetadata_Handler(srv interface{}, stream grpc.ServerStream) error {
|
||||||
|
m := new(BatchUpdateRequest)
|
||||||
|
if err := stream.RecvMsg(m); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
return srv.(MetadataServiceServer).BatchUpdateMetadata(m, &grpc.GenericServerStream[BatchUpdateRequest, BatchUpdateProgress]{ServerStream: stream})
|
||||||
|
}
|
||||||
|
|
||||||
|
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
|
||||||
|
type MetadataService_BatchUpdateMetadataServer = grpc.ServerStreamingServer[BatchUpdateProgress]
|
||||||
|
|
||||||
|
func _MetadataService_ImportMetadata_Handler(srv interface{}, stream grpc.ServerStream) error {
|
||||||
|
m := new(ImportMetadataRequest)
|
||||||
|
if err := stream.RecvMsg(m); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
return srv.(MetadataServiceServer).ImportMetadata(m, &grpc.GenericServerStream[ImportMetadataRequest, ImportProgress]{ServerStream: stream})
|
||||||
|
}
|
||||||
|
|
||||||
|
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
|
||||||
|
type MetadataService_ImportMetadataServer = grpc.ServerStreamingServer[ImportProgress]
|
||||||
|
|
||||||
|
// MetadataService_ServiceDesc is the grpc.ServiceDesc for MetadataService service.
|
||||||
|
// It's only intended for direct use with grpc.RegisterService,
|
||||||
|
// and not to be introspected or modified (even as a copy)
|
||||||
|
var MetadataService_ServiceDesc = grpc.ServiceDesc{
|
||||||
|
ServiceName: "musicfs.v1.MetadataService",
|
||||||
|
HandlerType: (*MetadataServiceServer)(nil),
|
||||||
|
Methods: []grpc.MethodDesc{
|
||||||
|
{
|
||||||
|
MethodName: "GetMetadata",
|
||||||
|
Handler: _MetadataService_GetMetadata_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "UpdateMetadata",
|
||||||
|
Handler: _MetadataService_UpdateMetadata_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "ClearOverlay",
|
||||||
|
Handler: _MetadataService_ClearOverlay_Handler,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
Streams: []grpc.StreamDesc{
|
||||||
|
{
|
||||||
|
StreamName: "BatchUpdateMetadata",
|
||||||
|
Handler: _MetadataService_BatchUpdateMetadata_Handler,
|
||||||
|
ServerStreams: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
StreamName: "ImportMetadata",
|
||||||
|
Handler: _MetadataService_ImportMetadata_Handler,
|
||||||
|
ServerStreams: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
Metadata: "musicfs.proto",
|
||||||
|
}
|
||||||
+26
@@ -0,0 +1,26 @@
|
|||||||
|
{
|
||||||
|
lib,
|
||||||
|
buildGoModule,
|
||||||
|
}:
|
||||||
|
|
||||||
|
buildGoModule {
|
||||||
|
pname = "music-agregator";
|
||||||
|
version = "0.1.0";
|
||||||
|
|
||||||
|
src = ./.;
|
||||||
|
|
||||||
|
vendorHash = "sha256-LXzaQul2aDJakWF9fX7ZOz2uf3VxO2D54Xn7uH1hps8=";
|
||||||
|
proxyVendor = true;
|
||||||
|
|
||||||
|
subPackages = [ "cmd/music-agregator" ];
|
||||||
|
|
||||||
|
ldflags = [
|
||||||
|
"-s"
|
||||||
|
"-w"
|
||||||
|
];
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
description = "Music automation orchestrator — monitors albums, manages downloads, drives metadata enrichment";
|
||||||
|
mainProgram = "music-agregator";
|
||||||
|
};
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user