Leftovers

This commit is contained in:
Alexander
2026-07-01 20:07:31 +02:00
parent b5b175a8e9
commit b448e076bc
9 changed files with 793 additions and 291 deletions
File diff suppressed because it is too large Load Diff
@@ -27,6 +27,7 @@ const (
MusicAgregatorService_SearchArtists_FullMethodName = "/music_agregator.v1.MusicAgregatorService/SearchArtists"
MusicAgregatorService_GetArtistAlbums_FullMethodName = "/music_agregator.v1.MusicAgregatorService/GetArtistAlbums"
MusicAgregatorService_SubscribeEvents_FullMethodName = "/music_agregator.v1.MusicAgregatorService/SubscribeEvents"
MusicAgregatorService_ResyncAlbum_FullMethodName = "/music_agregator.v1.MusicAgregatorService/ResyncAlbum"
)
// MusicAgregatorServiceClient is the client API for MusicAgregatorService service.
@@ -42,6 +43,7 @@ type MusicAgregatorServiceClient interface {
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)
ResyncAlbum(ctx context.Context, in *ResyncAlbumRequest, opts ...grpc.CallOption) (*ResyncAlbumResponse, error)
}
type musicAgregatorServiceClient struct {
@@ -145,6 +147,16 @@ func (c *musicAgregatorServiceClient) SubscribeEvents(ctx context.Context, in *S
// 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]
func (c *musicAgregatorServiceClient) ResyncAlbum(ctx context.Context, in *ResyncAlbumRequest, opts ...grpc.CallOption) (*ResyncAlbumResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ResyncAlbumResponse)
err := c.cc.Invoke(ctx, MusicAgregatorService_ResyncAlbum_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
// MusicAgregatorServiceServer is the server API for MusicAgregatorService service.
// All implementations must embed UnimplementedMusicAgregatorServiceServer
// for forward compatibility.
@@ -158,6 +170,7 @@ type MusicAgregatorServiceServer interface {
SearchArtists(context.Context, *SearchArtistsRequest) (*SearchArtistsResponse, error)
GetArtistAlbums(context.Context, *GetArtistAlbumsRequest) (*GetArtistAlbumsResponse, error)
SubscribeEvents(*SubscribeEventsRequest, grpc.ServerStreamingServer[AlbumEvent]) error
ResyncAlbum(context.Context, *ResyncAlbumRequest) (*ResyncAlbumResponse, error)
mustEmbedUnimplementedMusicAgregatorServiceServer()
}
@@ -192,6 +205,9 @@ func (UnimplementedMusicAgregatorServiceServer) GetArtistAlbums(context.Context,
func (UnimplementedMusicAgregatorServiceServer) SubscribeEvents(*SubscribeEventsRequest, grpc.ServerStreamingServer[AlbumEvent]) error {
return status.Error(codes.Unimplemented, "method SubscribeEvents not implemented")
}
func (UnimplementedMusicAgregatorServiceServer) ResyncAlbum(context.Context, *ResyncAlbumRequest) (*ResyncAlbumResponse, error) {
return nil, status.Error(codes.Unimplemented, "method ResyncAlbum not implemented")
}
func (UnimplementedMusicAgregatorServiceServer) mustEmbedUnimplementedMusicAgregatorServiceServer() {}
func (UnimplementedMusicAgregatorServiceServer) testEmbeddedByValue() {}
@@ -339,6 +355,24 @@ func _MusicAgregatorService_SubscribeEvents_Handler(srv interface{}, stream grpc
// 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]
func _MusicAgregatorService_ResyncAlbum_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ResyncAlbumRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MusicAgregatorServiceServer).ResyncAlbum(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: MusicAgregatorService_ResyncAlbum_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MusicAgregatorServiceServer).ResyncAlbum(ctx, req.(*ResyncAlbumRequest))
}
return interceptor(ctx, in, info, handler)
}
// 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)
@@ -370,6 +404,10 @@ var MusicAgregatorService_ServiceDesc = grpc.ServiceDesc{
MethodName: "GetArtistAlbums",
Handler: _MusicAgregatorService_GetArtistAlbums_Handler,
},
{
MethodName: "ResyncAlbum",
Handler: _MusicAgregatorService_ResyncAlbum_Handler,
},
},
Streams: []grpc.StreamDesc{
{