mirror of
https://github.com/navidrome/navidrome.git
synced 2025-07-16 16:41:16 +03:00
* feat: add TimeNow function to SchedulerService plugin Added new TimeNow RPC method to the SchedulerService host service that returns the current time in two formats: RFC3339Nano string and Unix milliseconds int64. This provides plugins with a standardized way to get current time information from the host system. The implementation includes: - TimeNowRequest/TimeNowResponse protobuf message definitions - Go host service implementation using time.Now() - Complete test coverage with format validation - Generated WASM interface code for plugin communication * feat: add LocalTimeZone field to TimeNow response Added LocalTimeZone field to TimeNowResponse message in the SchedulerService plugin host service. This field contains the server's local timezone name (e.g., 'America/New_York', 'UTC') providing plugins with timezone context alongside the existing RFC3339Nano and Unix milliseconds timestamps. The implementation includes: - New local_time_zone protobuf field definition - Go implementation using time.Now().Location().String() - Updated test coverage with timezone validation - Generated protobuf serialization/deserialization code * docs: update plugin README with TimeNow function documentation Updated the plugins README.md to document the new TimeNow function in the SchedulerService. The documentation includes detailed descriptions of the three return formats (RFC3339Nano, UnixMilli, LocalTimeZone), practical use cases, and a comprehensive Go code example showing how plugins can access current time information for logging, calculations, and timezone-aware operations. * docs: remove wrong comment from InitRequest Signed-off-by: Deluan <deluan@navidrome.org> * fix: add missing TimeNow method to namedSchedulerService Added TimeNow method implementation to namedSchedulerService struct to satisfy the scheduler.SchedulerService interface contract. This method was recently added to the interface but the namedSchedulerService wrapper was not updated, causing compilation failures in plugin tests. The implementation is a simple pass-through to the underlying scheduler service since TimeNow doesn't require any special handling for named callbacks. --------- Signed-off-by: Deluan <deluan@navidrome.org>
1137 lines
27 KiB
Go
1137 lines
27 KiB
Go
// Code generated by protoc-gen-go-plugin. DO NOT EDIT.
|
|
// versions:
|
|
// protoc-gen-go-plugin v0.1.0
|
|
// protoc v5.29.3
|
|
// source: api/api.proto
|
|
|
|
package api
|
|
|
|
import (
|
|
context "context"
|
|
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
|
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
|
)
|
|
|
|
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 ArtistMBIDRequest struct {
|
|
state protoimpl.MessageState
|
|
sizeCache protoimpl.SizeCache
|
|
unknownFields protoimpl.UnknownFields
|
|
|
|
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
|
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
|
|
}
|
|
|
|
func (x *ArtistMBIDRequest) ProtoReflect() protoreflect.Message {
|
|
panic(`not implemented`)
|
|
}
|
|
|
|
func (x *ArtistMBIDRequest) GetId() string {
|
|
if x != nil {
|
|
return x.Id
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *ArtistMBIDRequest) GetName() string {
|
|
if x != nil {
|
|
return x.Name
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type ArtistMBIDResponse struct {
|
|
state protoimpl.MessageState
|
|
sizeCache protoimpl.SizeCache
|
|
unknownFields protoimpl.UnknownFields
|
|
|
|
Mbid string `protobuf:"bytes,1,opt,name=mbid,proto3" json:"mbid,omitempty"`
|
|
}
|
|
|
|
func (x *ArtistMBIDResponse) ProtoReflect() protoreflect.Message {
|
|
panic(`not implemented`)
|
|
}
|
|
|
|
func (x *ArtistMBIDResponse) GetMbid() string {
|
|
if x != nil {
|
|
return x.Mbid
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type ArtistURLRequest struct {
|
|
state protoimpl.MessageState
|
|
sizeCache protoimpl.SizeCache
|
|
unknownFields protoimpl.UnknownFields
|
|
|
|
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
|
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
|
|
Mbid string `protobuf:"bytes,3,opt,name=mbid,proto3" json:"mbid,omitempty"`
|
|
}
|
|
|
|
func (x *ArtistURLRequest) ProtoReflect() protoreflect.Message {
|
|
panic(`not implemented`)
|
|
}
|
|
|
|
func (x *ArtistURLRequest) GetId() string {
|
|
if x != nil {
|
|
return x.Id
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *ArtistURLRequest) GetName() string {
|
|
if x != nil {
|
|
return x.Name
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *ArtistURLRequest) GetMbid() string {
|
|
if x != nil {
|
|
return x.Mbid
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type ArtistURLResponse struct {
|
|
state protoimpl.MessageState
|
|
sizeCache protoimpl.SizeCache
|
|
unknownFields protoimpl.UnknownFields
|
|
|
|
Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"`
|
|
}
|
|
|
|
func (x *ArtistURLResponse) ProtoReflect() protoreflect.Message {
|
|
panic(`not implemented`)
|
|
}
|
|
|
|
func (x *ArtistURLResponse) GetUrl() string {
|
|
if x != nil {
|
|
return x.Url
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type ArtistBiographyRequest struct {
|
|
state protoimpl.MessageState
|
|
sizeCache protoimpl.SizeCache
|
|
unknownFields protoimpl.UnknownFields
|
|
|
|
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
|
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
|
|
Mbid string `protobuf:"bytes,3,opt,name=mbid,proto3" json:"mbid,omitempty"`
|
|
}
|
|
|
|
func (x *ArtistBiographyRequest) ProtoReflect() protoreflect.Message {
|
|
panic(`not implemented`)
|
|
}
|
|
|
|
func (x *ArtistBiographyRequest) GetId() string {
|
|
if x != nil {
|
|
return x.Id
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *ArtistBiographyRequest) GetName() string {
|
|
if x != nil {
|
|
return x.Name
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *ArtistBiographyRequest) GetMbid() string {
|
|
if x != nil {
|
|
return x.Mbid
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type ArtistBiographyResponse struct {
|
|
state protoimpl.MessageState
|
|
sizeCache protoimpl.SizeCache
|
|
unknownFields protoimpl.UnknownFields
|
|
|
|
Biography string `protobuf:"bytes,1,opt,name=biography,proto3" json:"biography,omitempty"`
|
|
}
|
|
|
|
func (x *ArtistBiographyResponse) ProtoReflect() protoreflect.Message {
|
|
panic(`not implemented`)
|
|
}
|
|
|
|
func (x *ArtistBiographyResponse) GetBiography() string {
|
|
if x != nil {
|
|
return x.Biography
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type ArtistSimilarRequest struct {
|
|
state protoimpl.MessageState
|
|
sizeCache protoimpl.SizeCache
|
|
unknownFields protoimpl.UnknownFields
|
|
|
|
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
|
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
|
|
Mbid string `protobuf:"bytes,3,opt,name=mbid,proto3" json:"mbid,omitempty"`
|
|
Limit int32 `protobuf:"varint,4,opt,name=limit,proto3" json:"limit,omitempty"`
|
|
}
|
|
|
|
func (x *ArtistSimilarRequest) ProtoReflect() protoreflect.Message {
|
|
panic(`not implemented`)
|
|
}
|
|
|
|
func (x *ArtistSimilarRequest) GetId() string {
|
|
if x != nil {
|
|
return x.Id
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *ArtistSimilarRequest) GetName() string {
|
|
if x != nil {
|
|
return x.Name
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *ArtistSimilarRequest) GetMbid() string {
|
|
if x != nil {
|
|
return x.Mbid
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *ArtistSimilarRequest) GetLimit() int32 {
|
|
if x != nil {
|
|
return x.Limit
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type Artist struct {
|
|
state protoimpl.MessageState
|
|
sizeCache protoimpl.SizeCache
|
|
unknownFields protoimpl.UnknownFields
|
|
|
|
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
|
Mbid string `protobuf:"bytes,2,opt,name=mbid,proto3" json:"mbid,omitempty"`
|
|
}
|
|
|
|
func (x *Artist) ProtoReflect() protoreflect.Message {
|
|
panic(`not implemented`)
|
|
}
|
|
|
|
func (x *Artist) GetName() string {
|
|
if x != nil {
|
|
return x.Name
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *Artist) GetMbid() string {
|
|
if x != nil {
|
|
return x.Mbid
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type ArtistSimilarResponse struct {
|
|
state protoimpl.MessageState
|
|
sizeCache protoimpl.SizeCache
|
|
unknownFields protoimpl.UnknownFields
|
|
|
|
Artists []*Artist `protobuf:"bytes,1,rep,name=artists,proto3" json:"artists,omitempty"`
|
|
}
|
|
|
|
func (x *ArtistSimilarResponse) ProtoReflect() protoreflect.Message {
|
|
panic(`not implemented`)
|
|
}
|
|
|
|
func (x *ArtistSimilarResponse) GetArtists() []*Artist {
|
|
if x != nil {
|
|
return x.Artists
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type ArtistImageRequest struct {
|
|
state protoimpl.MessageState
|
|
sizeCache protoimpl.SizeCache
|
|
unknownFields protoimpl.UnknownFields
|
|
|
|
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
|
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
|
|
Mbid string `protobuf:"bytes,3,opt,name=mbid,proto3" json:"mbid,omitempty"`
|
|
}
|
|
|
|
func (x *ArtistImageRequest) ProtoReflect() protoreflect.Message {
|
|
panic(`not implemented`)
|
|
}
|
|
|
|
func (x *ArtistImageRequest) GetId() string {
|
|
if x != nil {
|
|
return x.Id
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *ArtistImageRequest) GetName() string {
|
|
if x != nil {
|
|
return x.Name
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *ArtistImageRequest) GetMbid() string {
|
|
if x != nil {
|
|
return x.Mbid
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type ExternalImage struct {
|
|
state protoimpl.MessageState
|
|
sizeCache protoimpl.SizeCache
|
|
unknownFields protoimpl.UnknownFields
|
|
|
|
Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"`
|
|
Size int32 `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"`
|
|
}
|
|
|
|
func (x *ExternalImage) ProtoReflect() protoreflect.Message {
|
|
panic(`not implemented`)
|
|
}
|
|
|
|
func (x *ExternalImage) GetUrl() string {
|
|
if x != nil {
|
|
return x.Url
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *ExternalImage) GetSize() int32 {
|
|
if x != nil {
|
|
return x.Size
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type ArtistImageResponse struct {
|
|
state protoimpl.MessageState
|
|
sizeCache protoimpl.SizeCache
|
|
unknownFields protoimpl.UnknownFields
|
|
|
|
Images []*ExternalImage `protobuf:"bytes,1,rep,name=images,proto3" json:"images,omitempty"`
|
|
}
|
|
|
|
func (x *ArtistImageResponse) ProtoReflect() protoreflect.Message {
|
|
panic(`not implemented`)
|
|
}
|
|
|
|
func (x *ArtistImageResponse) GetImages() []*ExternalImage {
|
|
if x != nil {
|
|
return x.Images
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type ArtistTopSongsRequest struct {
|
|
state protoimpl.MessageState
|
|
sizeCache protoimpl.SizeCache
|
|
unknownFields protoimpl.UnknownFields
|
|
|
|
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
|
ArtistName string `protobuf:"bytes,2,opt,name=artistName,proto3" json:"artistName,omitempty"`
|
|
Mbid string `protobuf:"bytes,3,opt,name=mbid,proto3" json:"mbid,omitempty"`
|
|
Count int32 `protobuf:"varint,4,opt,name=count,proto3" json:"count,omitempty"`
|
|
}
|
|
|
|
func (x *ArtistTopSongsRequest) ProtoReflect() protoreflect.Message {
|
|
panic(`not implemented`)
|
|
}
|
|
|
|
func (x *ArtistTopSongsRequest) GetId() string {
|
|
if x != nil {
|
|
return x.Id
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *ArtistTopSongsRequest) GetArtistName() string {
|
|
if x != nil {
|
|
return x.ArtistName
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *ArtistTopSongsRequest) GetMbid() string {
|
|
if x != nil {
|
|
return x.Mbid
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *ArtistTopSongsRequest) GetCount() int32 {
|
|
if x != nil {
|
|
return x.Count
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type Song struct {
|
|
state protoimpl.MessageState
|
|
sizeCache protoimpl.SizeCache
|
|
unknownFields protoimpl.UnknownFields
|
|
|
|
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
|
Mbid string `protobuf:"bytes,2,opt,name=mbid,proto3" json:"mbid,omitempty"`
|
|
}
|
|
|
|
func (x *Song) ProtoReflect() protoreflect.Message {
|
|
panic(`not implemented`)
|
|
}
|
|
|
|
func (x *Song) GetName() string {
|
|
if x != nil {
|
|
return x.Name
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *Song) GetMbid() string {
|
|
if x != nil {
|
|
return x.Mbid
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type ArtistTopSongsResponse struct {
|
|
state protoimpl.MessageState
|
|
sizeCache protoimpl.SizeCache
|
|
unknownFields protoimpl.UnknownFields
|
|
|
|
Songs []*Song `protobuf:"bytes,1,rep,name=songs,proto3" json:"songs,omitempty"`
|
|
}
|
|
|
|
func (x *ArtistTopSongsResponse) ProtoReflect() protoreflect.Message {
|
|
panic(`not implemented`)
|
|
}
|
|
|
|
func (x *ArtistTopSongsResponse) GetSongs() []*Song {
|
|
if x != nil {
|
|
return x.Songs
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type AlbumInfoRequest struct {
|
|
state protoimpl.MessageState
|
|
sizeCache protoimpl.SizeCache
|
|
unknownFields protoimpl.UnknownFields
|
|
|
|
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
|
Artist string `protobuf:"bytes,2,opt,name=artist,proto3" json:"artist,omitempty"`
|
|
Mbid string `protobuf:"bytes,3,opt,name=mbid,proto3" json:"mbid,omitempty"`
|
|
}
|
|
|
|
func (x *AlbumInfoRequest) ProtoReflect() protoreflect.Message {
|
|
panic(`not implemented`)
|
|
}
|
|
|
|
func (x *AlbumInfoRequest) GetName() string {
|
|
if x != nil {
|
|
return x.Name
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *AlbumInfoRequest) GetArtist() string {
|
|
if x != nil {
|
|
return x.Artist
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *AlbumInfoRequest) GetMbid() string {
|
|
if x != nil {
|
|
return x.Mbid
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type AlbumInfo struct {
|
|
state protoimpl.MessageState
|
|
sizeCache protoimpl.SizeCache
|
|
unknownFields protoimpl.UnknownFields
|
|
|
|
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
|
Mbid string `protobuf:"bytes,2,opt,name=mbid,proto3" json:"mbid,omitempty"`
|
|
Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
|
|
Url string `protobuf:"bytes,4,opt,name=url,proto3" json:"url,omitempty"`
|
|
}
|
|
|
|
func (x *AlbumInfo) ProtoReflect() protoreflect.Message {
|
|
panic(`not implemented`)
|
|
}
|
|
|
|
func (x *AlbumInfo) GetName() string {
|
|
if x != nil {
|
|
return x.Name
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *AlbumInfo) GetMbid() string {
|
|
if x != nil {
|
|
return x.Mbid
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *AlbumInfo) GetDescription() string {
|
|
if x != nil {
|
|
return x.Description
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *AlbumInfo) GetUrl() string {
|
|
if x != nil {
|
|
return x.Url
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type AlbumInfoResponse struct {
|
|
state protoimpl.MessageState
|
|
sizeCache protoimpl.SizeCache
|
|
unknownFields protoimpl.UnknownFields
|
|
|
|
Info *AlbumInfo `protobuf:"bytes,1,opt,name=info,proto3" json:"info,omitempty"`
|
|
}
|
|
|
|
func (x *AlbumInfoResponse) ProtoReflect() protoreflect.Message {
|
|
panic(`not implemented`)
|
|
}
|
|
|
|
func (x *AlbumInfoResponse) GetInfo() *AlbumInfo {
|
|
if x != nil {
|
|
return x.Info
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type AlbumImagesRequest struct {
|
|
state protoimpl.MessageState
|
|
sizeCache protoimpl.SizeCache
|
|
unknownFields protoimpl.UnknownFields
|
|
|
|
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
|
Artist string `protobuf:"bytes,2,opt,name=artist,proto3" json:"artist,omitempty"`
|
|
Mbid string `protobuf:"bytes,3,opt,name=mbid,proto3" json:"mbid,omitempty"`
|
|
}
|
|
|
|
func (x *AlbumImagesRequest) ProtoReflect() protoreflect.Message {
|
|
panic(`not implemented`)
|
|
}
|
|
|
|
func (x *AlbumImagesRequest) GetName() string {
|
|
if x != nil {
|
|
return x.Name
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *AlbumImagesRequest) GetArtist() string {
|
|
if x != nil {
|
|
return x.Artist
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *AlbumImagesRequest) GetMbid() string {
|
|
if x != nil {
|
|
return x.Mbid
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type AlbumImagesResponse struct {
|
|
state protoimpl.MessageState
|
|
sizeCache protoimpl.SizeCache
|
|
unknownFields protoimpl.UnknownFields
|
|
|
|
Images []*ExternalImage `protobuf:"bytes,1,rep,name=images,proto3" json:"images,omitempty"`
|
|
}
|
|
|
|
func (x *AlbumImagesResponse) ProtoReflect() protoreflect.Message {
|
|
panic(`not implemented`)
|
|
}
|
|
|
|
func (x *AlbumImagesResponse) GetImages() []*ExternalImage {
|
|
if x != nil {
|
|
return x.Images
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type ScrobblerIsAuthorizedRequest struct {
|
|
state protoimpl.MessageState
|
|
sizeCache protoimpl.SizeCache
|
|
unknownFields protoimpl.UnknownFields
|
|
|
|
UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
|
|
Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"`
|
|
}
|
|
|
|
func (x *ScrobblerIsAuthorizedRequest) ProtoReflect() protoreflect.Message {
|
|
panic(`not implemented`)
|
|
}
|
|
|
|
func (x *ScrobblerIsAuthorizedRequest) GetUserId() string {
|
|
if x != nil {
|
|
return x.UserId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *ScrobblerIsAuthorizedRequest) GetUsername() string {
|
|
if x != nil {
|
|
return x.Username
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type ScrobblerIsAuthorizedResponse struct {
|
|
state protoimpl.MessageState
|
|
sizeCache protoimpl.SizeCache
|
|
unknownFields protoimpl.UnknownFields
|
|
|
|
Authorized bool `protobuf:"varint,1,opt,name=authorized,proto3" json:"authorized,omitempty"`
|
|
Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
|
|
}
|
|
|
|
func (x *ScrobblerIsAuthorizedResponse) ProtoReflect() protoreflect.Message {
|
|
panic(`not implemented`)
|
|
}
|
|
|
|
func (x *ScrobblerIsAuthorizedResponse) GetAuthorized() bool {
|
|
if x != nil {
|
|
return x.Authorized
|
|
}
|
|
return false
|
|
}
|
|
|
|
func (x *ScrobblerIsAuthorizedResponse) GetError() string {
|
|
if x != nil {
|
|
return x.Error
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type TrackInfo struct {
|
|
state protoimpl.MessageState
|
|
sizeCache protoimpl.SizeCache
|
|
unknownFields protoimpl.UnknownFields
|
|
|
|
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
|
Mbid string `protobuf:"bytes,2,opt,name=mbid,proto3" json:"mbid,omitempty"`
|
|
Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
|
|
Album string `protobuf:"bytes,4,opt,name=album,proto3" json:"album,omitempty"`
|
|
AlbumMbid string `protobuf:"bytes,5,opt,name=album_mbid,json=albumMbid,proto3" json:"album_mbid,omitempty"`
|
|
Artists []*Artist `protobuf:"bytes,6,rep,name=artists,proto3" json:"artists,omitempty"`
|
|
AlbumArtists []*Artist `protobuf:"bytes,7,rep,name=album_artists,json=albumArtists,proto3" json:"album_artists,omitempty"`
|
|
Length int32 `protobuf:"varint,8,opt,name=length,proto3" json:"length,omitempty"` // seconds
|
|
Position int32 `protobuf:"varint,9,opt,name=position,proto3" json:"position,omitempty"` // seconds
|
|
}
|
|
|
|
func (x *TrackInfo) ProtoReflect() protoreflect.Message {
|
|
panic(`not implemented`)
|
|
}
|
|
|
|
func (x *TrackInfo) GetId() string {
|
|
if x != nil {
|
|
return x.Id
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *TrackInfo) GetMbid() string {
|
|
if x != nil {
|
|
return x.Mbid
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *TrackInfo) GetName() string {
|
|
if x != nil {
|
|
return x.Name
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *TrackInfo) GetAlbum() string {
|
|
if x != nil {
|
|
return x.Album
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *TrackInfo) GetAlbumMbid() string {
|
|
if x != nil {
|
|
return x.AlbumMbid
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *TrackInfo) GetArtists() []*Artist {
|
|
if x != nil {
|
|
return x.Artists
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *TrackInfo) GetAlbumArtists() []*Artist {
|
|
if x != nil {
|
|
return x.AlbumArtists
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *TrackInfo) GetLength() int32 {
|
|
if x != nil {
|
|
return x.Length
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *TrackInfo) GetPosition() int32 {
|
|
if x != nil {
|
|
return x.Position
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type ScrobblerNowPlayingRequest struct {
|
|
state protoimpl.MessageState
|
|
sizeCache protoimpl.SizeCache
|
|
unknownFields protoimpl.UnknownFields
|
|
|
|
UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
|
|
Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"`
|
|
Track *TrackInfo `protobuf:"bytes,3,opt,name=track,proto3" json:"track,omitempty"`
|
|
Timestamp int64 `protobuf:"varint,4,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
|
|
}
|
|
|
|
func (x *ScrobblerNowPlayingRequest) ProtoReflect() protoreflect.Message {
|
|
panic(`not implemented`)
|
|
}
|
|
|
|
func (x *ScrobblerNowPlayingRequest) GetUserId() string {
|
|
if x != nil {
|
|
return x.UserId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *ScrobblerNowPlayingRequest) GetUsername() string {
|
|
if x != nil {
|
|
return x.Username
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *ScrobblerNowPlayingRequest) GetTrack() *TrackInfo {
|
|
if x != nil {
|
|
return x.Track
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *ScrobblerNowPlayingRequest) GetTimestamp() int64 {
|
|
if x != nil {
|
|
return x.Timestamp
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type ScrobblerNowPlayingResponse struct {
|
|
state protoimpl.MessageState
|
|
sizeCache protoimpl.SizeCache
|
|
unknownFields protoimpl.UnknownFields
|
|
|
|
Error string `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"`
|
|
}
|
|
|
|
func (x *ScrobblerNowPlayingResponse) ProtoReflect() protoreflect.Message {
|
|
panic(`not implemented`)
|
|
}
|
|
|
|
func (x *ScrobblerNowPlayingResponse) GetError() string {
|
|
if x != nil {
|
|
return x.Error
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type ScrobblerScrobbleRequest struct {
|
|
state protoimpl.MessageState
|
|
sizeCache protoimpl.SizeCache
|
|
unknownFields protoimpl.UnknownFields
|
|
|
|
UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
|
|
Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"`
|
|
Track *TrackInfo `protobuf:"bytes,3,opt,name=track,proto3" json:"track,omitempty"`
|
|
Timestamp int64 `protobuf:"varint,4,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
|
|
}
|
|
|
|
func (x *ScrobblerScrobbleRequest) ProtoReflect() protoreflect.Message {
|
|
panic(`not implemented`)
|
|
}
|
|
|
|
func (x *ScrobblerScrobbleRequest) GetUserId() string {
|
|
if x != nil {
|
|
return x.UserId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *ScrobblerScrobbleRequest) GetUsername() string {
|
|
if x != nil {
|
|
return x.Username
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *ScrobblerScrobbleRequest) GetTrack() *TrackInfo {
|
|
if x != nil {
|
|
return x.Track
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *ScrobblerScrobbleRequest) GetTimestamp() int64 {
|
|
if x != nil {
|
|
return x.Timestamp
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type ScrobblerScrobbleResponse struct {
|
|
state protoimpl.MessageState
|
|
sizeCache protoimpl.SizeCache
|
|
unknownFields protoimpl.UnknownFields
|
|
|
|
Error string `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"`
|
|
}
|
|
|
|
func (x *ScrobblerScrobbleResponse) ProtoReflect() protoreflect.Message {
|
|
panic(`not implemented`)
|
|
}
|
|
|
|
func (x *ScrobblerScrobbleResponse) GetError() string {
|
|
if x != nil {
|
|
return x.Error
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type SchedulerCallbackRequest struct {
|
|
state protoimpl.MessageState
|
|
sizeCache protoimpl.SizeCache
|
|
unknownFields protoimpl.UnknownFields
|
|
|
|
ScheduleId string `protobuf:"bytes,1,opt,name=schedule_id,json=scheduleId,proto3" json:"schedule_id,omitempty"` // ID of the scheduled job that triggered this callback
|
|
Payload []byte `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"` // The data passed when the job was scheduled
|
|
IsRecurring bool `protobuf:"varint,3,opt,name=is_recurring,json=isRecurring,proto3" json:"is_recurring,omitempty"` // Whether this is from a recurring schedule (cron job)
|
|
}
|
|
|
|
func (x *SchedulerCallbackRequest) ProtoReflect() protoreflect.Message {
|
|
panic(`not implemented`)
|
|
}
|
|
|
|
func (x *SchedulerCallbackRequest) GetScheduleId() string {
|
|
if x != nil {
|
|
return x.ScheduleId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *SchedulerCallbackRequest) GetPayload() []byte {
|
|
if x != nil {
|
|
return x.Payload
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *SchedulerCallbackRequest) GetIsRecurring() bool {
|
|
if x != nil {
|
|
return x.IsRecurring
|
|
}
|
|
return false
|
|
}
|
|
|
|
type SchedulerCallbackResponse struct {
|
|
state protoimpl.MessageState
|
|
sizeCache protoimpl.SizeCache
|
|
unknownFields protoimpl.UnknownFields
|
|
|
|
Error string `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` // Error message if the callback failed
|
|
}
|
|
|
|
func (x *SchedulerCallbackResponse) ProtoReflect() protoreflect.Message {
|
|
panic(`not implemented`)
|
|
}
|
|
|
|
func (x *SchedulerCallbackResponse) GetError() string {
|
|
if x != nil {
|
|
return x.Error
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type InitRequest struct {
|
|
state protoimpl.MessageState
|
|
sizeCache protoimpl.SizeCache
|
|
unknownFields protoimpl.UnknownFields
|
|
|
|
Config map[string]string `protobuf:"bytes,1,rep,name=config,proto3" json:"config,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // Configuration specific to this plugin
|
|
}
|
|
|
|
func (x *InitRequest) ProtoReflect() protoreflect.Message {
|
|
panic(`not implemented`)
|
|
}
|
|
|
|
func (x *InitRequest) GetConfig() map[string]string {
|
|
if x != nil {
|
|
return x.Config
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type InitResponse struct {
|
|
state protoimpl.MessageState
|
|
sizeCache protoimpl.SizeCache
|
|
unknownFields protoimpl.UnknownFields
|
|
|
|
Error string `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` // Error message if initialization failed
|
|
}
|
|
|
|
func (x *InitResponse) ProtoReflect() protoreflect.Message {
|
|
panic(`not implemented`)
|
|
}
|
|
|
|
func (x *InitResponse) GetError() string {
|
|
if x != nil {
|
|
return x.Error
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type OnTextMessageRequest struct {
|
|
state protoimpl.MessageState
|
|
sizeCache protoimpl.SizeCache
|
|
unknownFields protoimpl.UnknownFields
|
|
|
|
ConnectionId string `protobuf:"bytes,1,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty"`
|
|
Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
|
|
}
|
|
|
|
func (x *OnTextMessageRequest) ProtoReflect() protoreflect.Message {
|
|
panic(`not implemented`)
|
|
}
|
|
|
|
func (x *OnTextMessageRequest) GetConnectionId() string {
|
|
if x != nil {
|
|
return x.ConnectionId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *OnTextMessageRequest) GetMessage() string {
|
|
if x != nil {
|
|
return x.Message
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type OnTextMessageResponse struct {
|
|
state protoimpl.MessageState
|
|
sizeCache protoimpl.SizeCache
|
|
unknownFields protoimpl.UnknownFields
|
|
}
|
|
|
|
func (x *OnTextMessageResponse) ProtoReflect() protoreflect.Message {
|
|
panic(`not implemented`)
|
|
}
|
|
|
|
type OnBinaryMessageRequest struct {
|
|
state protoimpl.MessageState
|
|
sizeCache protoimpl.SizeCache
|
|
unknownFields protoimpl.UnknownFields
|
|
|
|
ConnectionId string `protobuf:"bytes,1,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty"`
|
|
Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
|
|
}
|
|
|
|
func (x *OnBinaryMessageRequest) ProtoReflect() protoreflect.Message {
|
|
panic(`not implemented`)
|
|
}
|
|
|
|
func (x *OnBinaryMessageRequest) GetConnectionId() string {
|
|
if x != nil {
|
|
return x.ConnectionId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *OnBinaryMessageRequest) GetData() []byte {
|
|
if x != nil {
|
|
return x.Data
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type OnBinaryMessageResponse struct {
|
|
state protoimpl.MessageState
|
|
sizeCache protoimpl.SizeCache
|
|
unknownFields protoimpl.UnknownFields
|
|
}
|
|
|
|
func (x *OnBinaryMessageResponse) ProtoReflect() protoreflect.Message {
|
|
panic(`not implemented`)
|
|
}
|
|
|
|
type OnErrorRequest struct {
|
|
state protoimpl.MessageState
|
|
sizeCache protoimpl.SizeCache
|
|
unknownFields protoimpl.UnknownFields
|
|
|
|
ConnectionId string `protobuf:"bytes,1,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty"`
|
|
Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
|
|
}
|
|
|
|
func (x *OnErrorRequest) ProtoReflect() protoreflect.Message {
|
|
panic(`not implemented`)
|
|
}
|
|
|
|
func (x *OnErrorRequest) GetConnectionId() string {
|
|
if x != nil {
|
|
return x.ConnectionId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *OnErrorRequest) GetError() string {
|
|
if x != nil {
|
|
return x.Error
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type OnErrorResponse struct {
|
|
state protoimpl.MessageState
|
|
sizeCache protoimpl.SizeCache
|
|
unknownFields protoimpl.UnknownFields
|
|
}
|
|
|
|
func (x *OnErrorResponse) ProtoReflect() protoreflect.Message {
|
|
panic(`not implemented`)
|
|
}
|
|
|
|
type OnCloseRequest struct {
|
|
state protoimpl.MessageState
|
|
sizeCache protoimpl.SizeCache
|
|
unknownFields protoimpl.UnknownFields
|
|
|
|
ConnectionId string `protobuf:"bytes,1,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty"`
|
|
Code int32 `protobuf:"varint,2,opt,name=code,proto3" json:"code,omitempty"`
|
|
Reason string `protobuf:"bytes,3,opt,name=reason,proto3" json:"reason,omitempty"`
|
|
}
|
|
|
|
func (x *OnCloseRequest) ProtoReflect() protoreflect.Message {
|
|
panic(`not implemented`)
|
|
}
|
|
|
|
func (x *OnCloseRequest) GetConnectionId() string {
|
|
if x != nil {
|
|
return x.ConnectionId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *OnCloseRequest) GetCode() int32 {
|
|
if x != nil {
|
|
return x.Code
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *OnCloseRequest) GetReason() string {
|
|
if x != nil {
|
|
return x.Reason
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type OnCloseResponse struct {
|
|
state protoimpl.MessageState
|
|
sizeCache protoimpl.SizeCache
|
|
unknownFields protoimpl.UnknownFields
|
|
}
|
|
|
|
func (x *OnCloseResponse) ProtoReflect() protoreflect.Message {
|
|
panic(`not implemented`)
|
|
}
|
|
|
|
// go:plugin type=plugin version=1
|
|
type MetadataAgent interface {
|
|
// Artist metadata methods
|
|
GetArtistMBID(context.Context, *ArtistMBIDRequest) (*ArtistMBIDResponse, error)
|
|
GetArtistURL(context.Context, *ArtistURLRequest) (*ArtistURLResponse, error)
|
|
GetArtistBiography(context.Context, *ArtistBiographyRequest) (*ArtistBiographyResponse, error)
|
|
GetSimilarArtists(context.Context, *ArtistSimilarRequest) (*ArtistSimilarResponse, error)
|
|
GetArtistImages(context.Context, *ArtistImageRequest) (*ArtistImageResponse, error)
|
|
GetArtistTopSongs(context.Context, *ArtistTopSongsRequest) (*ArtistTopSongsResponse, error)
|
|
// Album metadata methods
|
|
GetAlbumInfo(context.Context, *AlbumInfoRequest) (*AlbumInfoResponse, error)
|
|
GetAlbumImages(context.Context, *AlbumImagesRequest) (*AlbumImagesResponse, error)
|
|
}
|
|
|
|
// go:plugin type=plugin version=1
|
|
type Scrobbler interface {
|
|
IsAuthorized(context.Context, *ScrobblerIsAuthorizedRequest) (*ScrobblerIsAuthorizedResponse, error)
|
|
NowPlaying(context.Context, *ScrobblerNowPlayingRequest) (*ScrobblerNowPlayingResponse, error)
|
|
Scrobble(context.Context, *ScrobblerScrobbleRequest) (*ScrobblerScrobbleResponse, error)
|
|
}
|
|
|
|
// go:plugin type=plugin version=1
|
|
type SchedulerCallback interface {
|
|
OnSchedulerCallback(context.Context, *SchedulerCallbackRequest) (*SchedulerCallbackResponse, error)
|
|
}
|
|
|
|
// go:plugin type=plugin version=1
|
|
type LifecycleManagement interface {
|
|
OnInit(context.Context, *InitRequest) (*InitResponse, error)
|
|
}
|
|
|
|
// go:plugin type=plugin version=1
|
|
type WebSocketCallback interface {
|
|
// Called when a text message is received
|
|
OnTextMessage(context.Context, *OnTextMessageRequest) (*OnTextMessageResponse, error)
|
|
// Called when a binary message is received
|
|
OnBinaryMessage(context.Context, *OnBinaryMessageRequest) (*OnBinaryMessageResponse, error)
|
|
// Called when an error occurs
|
|
OnError(context.Context, *OnErrorRequest) (*OnErrorResponse, error)
|
|
// Called when the connection is closed
|
|
OnClose(context.Context, *OnCloseRequest) (*OnCloseResponse, error)
|
|
}
|