Documentation
¶
Index ¶
- Constants
- func ValidateConfig(manifest *Manifest, configJSON string) error
- func ValidateWithCapabilities(m *Manifest, capabilities []Capability) error
- type ArtworkPermission
- type CachePermission
- type Capability
- type ConfigDefinition
- type ConfigValidationError
- type ConfigValidationErrors
- type Experimental
- type HTTPPermission
- type KVStorePermission
- type LibraryPermission
- type LyricsPlugin
- type Manager
- func (m *Manager) DisablePlugin(ctx context.Context, id string) error
- func (m *Manager) EnablePlugin(ctx context.Context, id string) error
- func (m *Manager) GetPluginInfo() map[string]PluginInfo
- func (m *Manager) LoadLyricsProvider(name string) (lyrics.Lyrics, bool)
- func (m *Manager) LoadMediaAgent(name string) (agents.Interface, bool)
- func (m *Manager) LoadScrobbler(name string) (scrobbler.Scrobbler, bool)
- func (m *Manager) PluginNames(capability string) []string
- func (m *Manager) RescanPlugins(ctx context.Context) error
- func (m *Manager) SetSubsonicRouter(router SubsonicRouter)
- func (m *Manager) Start(ctx context.Context) error
- func (m *Manager) Stop() error
- func (m *Manager) UnloadDisabledPlugins(ctx context.Context)
- func (m *Manager) UpdatePluginConfig(ctx context.Context, id, configJSON string) error
- func (m *Manager) UpdatePluginLibraries(ctx context.Context, id, librariesJSON string, ...) error
- func (m *Manager) UpdatePluginUsers(ctx context.Context, id, usersJSON string, allUsers bool) error
- func (m *Manager) ValidatePluginConfig(ctx context.Context, id, configJSON string) error
- type Manifest
- type MetadataAgent
- func (a *MetadataAgent) AgentName() string
- func (a *MetadataAgent) GetAlbumImages(ctx context.Context, name, artist, mbid string) ([]agents.ExternalImage, error)
- func (a *MetadataAgent) GetAlbumInfo(ctx context.Context, name, artist, mbid string) (*agents.AlbumInfo, error)
- func (a *MetadataAgent) GetArtistBiography(ctx context.Context, id, name, mbid string) (string, error)
- func (a *MetadataAgent) GetArtistImages(ctx context.Context, id, name, mbid string) ([]agents.ExternalImage, error)
- func (a *MetadataAgent) GetArtistMBID(ctx context.Context, id string, name string) (string, error)
- func (a *MetadataAgent) GetArtistTopSongs(ctx context.Context, id, artistName, mbid string, count int) ([]agents.Song, error)
- func (a *MetadataAgent) GetArtistURL(ctx context.Context, id, name, mbid string) (string, error)
- func (a *MetadataAgent) GetSimilarArtists(ctx context.Context, id, name, mbid string, limit int) ([]agents.Artist, error)
- func (a *MetadataAgent) GetSimilarSongsByAlbum(ctx context.Context, id, name, artist, mbid string, count int) ([]agents.Song, error)
- func (a *MetadataAgent) GetSimilarSongsByArtist(ctx context.Context, id, name, mbid string, count int) ([]agents.Song, error)
- func (a *MetadataAgent) GetSimilarSongsByTrack(ctx context.Context, id, name, artist, mbid string, count int) ([]agents.Song, error)
- type Permissions
- type PluginInfo
- type PluginMetadata
- type PluginMetricsRecorder
- type SchedulerPermission
- type ScrobblerPlugin
- type SubsonicAPIPermission
- type SubsonicRouter
- type TaskQueuePermission
- type ThreadsFeature
- type UsersPermission
- type WebSocketPermission
Constants ¶
const ( FuncWebSocketOnTextMessage = "nd_websocket_on_text_message" FuncWebSocketOnBinaryMessage = "nd_websocket_on_binary_message" FuncWebSocketOnError = "nd_websocket_on_error" FuncWebSocketOnClose = "nd_websocket_on_close" )
WebSocket callback function names
const ( FuncGetArtistMBID = "nd_get_artist_mbid" FuncGetArtistURL = "nd_get_artist_url" FuncGetArtistBiography = "nd_get_artist_biography" FuncGetSimilarArtists = "nd_get_similar_artists" FuncGetArtistImages = "nd_get_artist_images" FuncGetArtistTopSongs = "nd_get_artist_top_songs" FuncGetAlbumInfo = "nd_get_album_info" FuncGetAlbumImages = "nd_get_album_images" FuncGetSimilarSongsByTrack = "nd_get_similar_songs_by_track" FuncGetSimilarSongsByAlbum = "nd_get_similar_songs_by_album" FuncGetSimilarSongsByArtist = "nd_get_similar_songs_by_artist" )
Export function names (snake_case as per design)
const ( FuncScrobblerIsAuthorized = "nd_scrobbler_is_authorized" FuncScrobblerNowPlaying = "nd_scrobbler_now_playing" FuncScrobblerScrobble = "nd_scrobbler_scrobble" )
Scrobbler function names (snake_case as per design)
const (
FuncLyricsGetLyrics = "nd_lyrics_get_lyrics"
)
const FuncOnInit = "nd_on_init"
const FuncSchedulerCallback = "nd_scheduler_callback"
const FuncTaskWorkerCallback = "nd_task_execute"
const (
// PackageExtension is the file extension for Navidrome plugin packages.
PackageExtension = ".ndp"
)
Variables ¶
This section is empty.
Functions ¶
func ValidateConfig ¶ added in v0.60.0
ValidateConfig validates a config JSON string against a plugin's config schema. If the manifest has no config schema, it returns an error indicating the plugin has no configurable options. Returns nil if validation passes, ConfigValidationErrors if validation fails.
func ValidateWithCapabilities ¶ added in v0.60.0
func ValidateWithCapabilities(m *Manifest, capabilities []Capability) error
ValidateWithCapabilities validates the manifest against detected capabilities. This must be called after WASM capability detection since Scrobbler capability is detected from exported functions, not manifest declarations.
Types ¶
type ArtworkPermission ¶ added in v0.60.0
type ArtworkPermission struct {
// Explanation for why artwork access is needed
Reason *string `json:"reason,omitempty" yaml:"reason,omitempty" mapstructure:"reason,omitempty"`
}
Artwork service permissions for generating artwork URLs
type CachePermission ¶ added in v0.60.0
type CachePermission struct {
// Explanation for why cache access is needed
Reason *string `json:"reason,omitempty" yaml:"reason,omitempty" mapstructure:"reason,omitempty"`
}
Cache service permissions for storing and retrieving data
type Capability ¶ added in v0.60.0
type Capability string
Capability represents a plugin capability type. Capabilities are detected by checking which functions a plugin exports.
const CapabilityLifecycle Capability = "Lifecycle"
CapabilityLifecycle indicates the plugin has lifecycle callback functions. Detected when the plugin exports the nd_on_init function.
const CapabilityLyrics Capability = "Lyrics"
const CapabilityMetadataAgent Capability = "MetadataAgent"
CapabilityMetadataAgent indicates the plugin can provide artist/album metadata. Detected when the plugin exports at least one of the metadata agent functions.
const CapabilityScheduler Capability = "Scheduler"
CapabilityScheduler indicates the plugin can receive scheduled event callbacks. Detected when the plugin exports the scheduler callback function.
const CapabilityScrobbler Capability = "Scrobbler"
CapabilityScrobbler indicates the plugin can receive scrobble events. Detected when the plugin exports at least one of the scrobbler functions.
const CapabilityTaskWorker Capability = "TaskWorker"
CapabilityTaskWorker indicates the plugin can receive task execution callbacks.
const CapabilityWebSocket Capability = "WebSocket"
CapabilityWebSocket indicates the plugin can receive WebSocket callbacks. Detected when the plugin exports any of the WebSocket callback functions.
type ConfigDefinition ¶ added in v0.60.0
type ConfigDefinition struct {
// JSON Schema (draft-07) defining the plugin's configuration options
Schema map[string]interface{} `json:"schema" yaml:"schema" mapstructure:"schema"`
// Optional JSONForms UI Schema for customizing form layout
UiSchema map[string]interface{} `json:"uiSchema,omitempty" yaml:"uiSchema,omitempty" mapstructure:"uiSchema,omitempty"`
}
Configuration schema for the plugin using JSON Schema (draft-07) and optional JSONForms UI Schema
func (*ConfigDefinition) UnmarshalJSON ¶ added in v0.60.0
func (j *ConfigDefinition) UnmarshalJSON(value []byte) error
UnmarshalJSON implements json.Unmarshaler.
type ConfigValidationError ¶ added in v0.60.0
ConfigValidationError represents a validation error with field path and message.
type ConfigValidationErrors ¶ added in v0.60.0
type ConfigValidationErrors struct {
Errors []ConfigValidationError `json:"errors"`
}
ConfigValidationErrors is a collection of validation errors.
func (*ConfigValidationErrors) Error ¶ added in v0.60.0
func (e *ConfigValidationErrors) Error() string
type Experimental ¶ added in v0.60.0
type Experimental struct {
// Threads corresponds to the JSON schema field "threads".
Threads *ThreadsFeature `json:"threads,omitempty" yaml:"threads,omitempty" mapstructure:"threads,omitempty"`
}
Experimental features that may change or be removed in future versions
type HTTPPermission ¶ added in v0.60.0
type HTTPPermission struct {
// Explanation for why HTTP access is needed
Reason *string `json:"reason,omitempty" yaml:"reason,omitempty" mapstructure:"reason,omitempty"`
// List of required host patterns for HTTP requests (e.g., 'api.example.com',
// '*.musicbrainz.org')
RequiredHosts []string `json:"requiredHosts,omitempty" yaml:"requiredHosts,omitempty" mapstructure:"requiredHosts,omitempty"`
}
HTTP access permissions for a plugin
type KVStorePermission ¶ added in v0.60.0
type KVStorePermission struct {
// Maximum storage size (e.g., '1MB', '500KB'). Default: 1MB
MaxSize *string `json:"maxSize,omitempty" yaml:"maxSize,omitempty" mapstructure:"maxSize,omitempty"`
// Explanation for why key-value store access is needed
Reason *string `json:"reason,omitempty" yaml:"reason,omitempty" mapstructure:"reason,omitempty"`
}
Key-value store permissions for persistent plugin storage
type LibraryPermission ¶ added in v0.60.0
type LibraryPermission struct {
// Whether the plugin requires read-only filesystem access to library directories
Filesystem bool `json:"filesystem,omitempty" yaml:"filesystem,omitempty" mapstructure:"filesystem,omitempty"`
// Explanation for why library access is needed
Reason *string `json:"reason,omitempty" yaml:"reason,omitempty" mapstructure:"reason,omitempty"`
}
Library service permissions for accessing library metadata and optionally filesystem
func (*LibraryPermission) UnmarshalJSON ¶ added in v0.60.0
func (j *LibraryPermission) UnmarshalJSON(value []byte) error
UnmarshalJSON implements json.Unmarshaler.
type LyricsPlugin ¶ added in v0.61.0
type LyricsPlugin struct {
// contains filtered or unexported fields
}
LyricsPlugin adapts a WASM plugin with the Lyrics capability.
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager manages loading and lifecycle of WebAssembly plugins. It implements both agents.PluginLoader and scrobbler.PluginLoader interfaces.
func GetManager ¶
GetManager returns a singleton instance of the plugin manager. The manager is not started automatically; call Start() to begin loading plugins.
func (*Manager) DisablePlugin ¶ added in v0.60.0
DisablePlugin disables a plugin by unloading it and updating the DB. Returns an error if the plugin is not found in DB.
func (*Manager) EnablePlugin ¶ added in v0.60.0
EnablePlugin enables a plugin by loading it and updating the DB. Returns an error if the plugin is not found in DB or fails to load.
func (*Manager) GetPluginInfo ¶ added in v0.60.0
func (m *Manager) GetPluginInfo() map[string]PluginInfo
GetPluginInfo returns information about all loaded plugins.
func (*Manager) LoadLyricsProvider ¶ added in v0.61.0
LoadLyricsProvider loads and returns a lyrics provider plugin by name.
func (*Manager) LoadMediaAgent ¶
LoadMediaAgent loads and returns a media agent plugin by name. Returns false if the plugin is not found or doesn't have the MetadataAgent capability.
func (*Manager) LoadScrobbler ¶
LoadScrobbler loads and returns a scrobbler plugin by name. Returns false if the plugin is not found or doesn't have the Scrobbler capability.
func (*Manager) PluginNames ¶
PluginNames returns the names of all plugins that implement a particular capability. This is used by both agents and scrobbler systems to discover available plugins. Capabilities are auto-detected from the plugin's exported functions.
func (*Manager) RescanPlugins ¶ added in v0.60.0
RescanPlugins triggers a manual rescan of the plugins folder. This synchronizes the database with the filesystem, discovering new plugins, updating changed ones, and removing deleted ones.
func (*Manager) SetSubsonicRouter ¶
func (m *Manager) SetSubsonicRouter(router SubsonicRouter)
SetSubsonicRouter sets the Subsonic router for SubsonicAPI host functions. This should be called after the subsonic router is created but before plugins that require SubsonicAPI access are loaded.
func (*Manager) Start ¶ added in v0.60.0
Start initializes the plugin manager and loads plugins from the configured folder. It should be called once during application startup when plugins are enabled. The startup flow is: 1. Sync plugins folder with DB (discover new, update changed, remove deleted) 2. Load only enabled plugins from DB
func (*Manager) Stop ¶ added in v0.60.0
Stop shuts down the plugin manager and releases all resources.
func (*Manager) UnloadDisabledPlugins ¶ added in v0.60.0
UnloadDisabledPlugins checks for plugins that are disabled in the database but still loaded in memory, and unloads them. This is called after user or library deletion to clean up plugins that were auto-disabled due to permission loss.
func (*Manager) UpdatePluginConfig ¶ added in v0.60.0
UpdatePluginConfig updates the configuration for a plugin. If the plugin is enabled, it will be reloaded with the new config.
func (*Manager) UpdatePluginLibraries ¶ added in v0.60.0
func (m *Manager) UpdatePluginLibraries(ctx context.Context, id, librariesJSON string, allLibraries, allowWriteAccess bool) error
UpdatePluginLibraries updates the libraries permission settings for a plugin. If the plugin is enabled, it will be reloaded with the new settings. If the plugin requires library permission and no libraries are configured (and allLibraries is false), the plugin will be automatically disabled.
func (*Manager) UpdatePluginUsers ¶ added in v0.60.0
UpdatePluginUsers updates the users permission settings for a plugin. If the plugin is enabled, it will be reloaded with the new settings. If the plugin requires users permission and no users are configured (and allUsers is false), the plugin will be automatically disabled.
func (*Manager) ValidatePluginConfig ¶ added in v0.60.0
ValidatePluginConfig validates a config JSON string against the plugin's config schema. If the plugin has no config schema defined, it returns an error. Returns nil if validation passes, or an error describing the validation failure.
type Manifest ¶ added in v0.60.0
type Manifest struct {
// The author of the plugin
Author string `json:"author" yaml:"author" mapstructure:"author"`
// Config corresponds to the JSON schema field "config".
Config *ConfigDefinition `json:"config,omitempty" yaml:"config,omitempty" mapstructure:"config,omitempty"`
// A brief description of what the plugin does
Description *string `json:"description,omitempty" yaml:"description,omitempty" mapstructure:"description,omitempty"`
// Experimental corresponds to the JSON schema field "experimental".
Experimental *Experimental `json:"experimental,omitempty" yaml:"experimental,omitempty" mapstructure:"experimental,omitempty"`
// The display name of the plugin
Name string `json:"name" yaml:"name" mapstructure:"name"`
// Permissions corresponds to the JSON schema field "permissions".
Permissions *Permissions `json:"permissions,omitempty" yaml:"permissions,omitempty" mapstructure:"permissions,omitempty"`
// The version of the plugin (semver recommended)
Version string `json:"version" yaml:"version" mapstructure:"version"`
// URL to the plugin's website or repository
Website *string `json:"website,omitempty" yaml:"website,omitempty" mapstructure:"website,omitempty"`
}
Plugin manifest for Navidrome plugins
func ParseManifest ¶ added in v0.60.0
ParseManifest unmarshals manifest JSON and performs cross-field validation. This is the single entry point for manifest parsing after reading from a file.
func (*Manifest) HasConfigSchema ¶ added in v0.60.0
HasConfigSchema returns true if the manifest defines a config schema.
func (*Manifest) HasExperimentalThreads ¶ added in v0.60.0
HasExperimentalThreads returns true if the manifest requests experimental threads support.
func (*Manifest) HasLibraryFilesystemPermission ¶ added in v0.61.2
HasLibraryFilesystemPermission checks if the manifest grants filesystem permission for libraries.
func (*Manifest) UnmarshalJSON ¶ added in v0.60.0
UnmarshalJSON implements json.Unmarshaler.
type MetadataAgent ¶ added in v0.60.0
type MetadataAgent struct {
// contains filtered or unexported fields
}
MetadataAgent is an adapter that wraps an Extism plugin and implements the agents interfaces for metadata retrieval.
func (*MetadataAgent) AgentName ¶ added in v0.60.0
func (a *MetadataAgent) AgentName() string
AgentName returns the plugin name
func (*MetadataAgent) GetAlbumImages ¶ added in v0.60.0
func (a *MetadataAgent) GetAlbumImages(ctx context.Context, name, artist, mbid string) ([]agents.ExternalImage, error)
GetAlbumImages retrieves images for an album
func (*MetadataAgent) GetAlbumInfo ¶ added in v0.60.0
func (a *MetadataAgent) GetAlbumInfo(ctx context.Context, name, artist, mbid string) (*agents.AlbumInfo, error)
GetAlbumInfo retrieves album information
func (*MetadataAgent) GetArtistBiography ¶ added in v0.60.0
func (a *MetadataAgent) GetArtistBiography(ctx context.Context, id, name, mbid string) (string, error)
GetArtistBiography retrieves the biography for an artist
func (*MetadataAgent) GetArtistImages ¶ added in v0.60.0
func (a *MetadataAgent) GetArtistImages(ctx context.Context, id, name, mbid string) ([]agents.ExternalImage, error)
GetArtistImages retrieves images for an artist
func (*MetadataAgent) GetArtistMBID ¶ added in v0.60.0
GetArtistMBID retrieves the MusicBrainz ID for an artist
func (*MetadataAgent) GetArtistTopSongs ¶ added in v0.60.0
func (a *MetadataAgent) GetArtistTopSongs(ctx context.Context, id, artistName, mbid string, count int) ([]agents.Song, error)
GetArtistTopSongs retrieves top songs for an artist
func (*MetadataAgent) GetArtistURL ¶ added in v0.60.0
GetArtistURL retrieves the external URL for an artist
func (*MetadataAgent) GetSimilarArtists ¶ added in v0.60.0
func (a *MetadataAgent) GetSimilarArtists(ctx context.Context, id, name, mbid string, limit int) ([]agents.Artist, error)
GetSimilarArtists retrieves similar artists
func (*MetadataAgent) GetSimilarSongsByAlbum ¶ added in v0.60.0
func (a *MetadataAgent) GetSimilarSongsByAlbum(ctx context.Context, id, name, artist, mbid string, count int) ([]agents.Song, error)
GetSimilarSongsByAlbum retrieves songs similar to tracks on an album
func (*MetadataAgent) GetSimilarSongsByArtist ¶ added in v0.60.0
func (a *MetadataAgent) GetSimilarSongsByArtist(ctx context.Context, id, name, mbid string, count int) ([]agents.Song, error)
GetSimilarSongsByArtist retrieves songs similar to an artist's catalog
func (*MetadataAgent) GetSimilarSongsByTrack ¶ added in v0.60.0
func (a *MetadataAgent) GetSimilarSongsByTrack(ctx context.Context, id, name, artist, mbid string, count int) ([]agents.Song, error)
GetSimilarSongsByTrack retrieves songs similar to a specific track
type Permissions ¶ added in v0.60.0
type Permissions struct {
// Artwork corresponds to the JSON schema field "artwork".
Artwork *ArtworkPermission `json:"artwork,omitempty" yaml:"artwork,omitempty" mapstructure:"artwork,omitempty"`
// Cache corresponds to the JSON schema field "cache".
Cache *CachePermission `json:"cache,omitempty" yaml:"cache,omitempty" mapstructure:"cache,omitempty"`
// Http corresponds to the JSON schema field "http".
Http *HTTPPermission `json:"http,omitempty" yaml:"http,omitempty" mapstructure:"http,omitempty"`
// Kvstore corresponds to the JSON schema field "kvstore".
Kvstore *KVStorePermission `json:"kvstore,omitempty" yaml:"kvstore,omitempty" mapstructure:"kvstore,omitempty"`
// Library corresponds to the JSON schema field "library".
Library *LibraryPermission `json:"library,omitempty" yaml:"library,omitempty" mapstructure:"library,omitempty"`
// Scheduler corresponds to the JSON schema field "scheduler".
Scheduler *SchedulerPermission `json:"scheduler,omitempty" yaml:"scheduler,omitempty" mapstructure:"scheduler,omitempty"`
// Subsonicapi corresponds to the JSON schema field "subsonicapi".
Subsonicapi *SubsonicAPIPermission `json:"subsonicapi,omitempty" yaml:"subsonicapi,omitempty" mapstructure:"subsonicapi,omitempty"`
// Taskqueue corresponds to the JSON schema field "taskqueue".
Taskqueue *TaskQueuePermission `json:"taskqueue,omitempty" yaml:"taskqueue,omitempty" mapstructure:"taskqueue,omitempty"`
// Users corresponds to the JSON schema field "users".
Users *UsersPermission `json:"users,omitempty" yaml:"users,omitempty" mapstructure:"users,omitempty"`
// Websocket corresponds to the JSON schema field "websocket".
Websocket *WebSocketPermission `json:"websocket,omitempty" yaml:"websocket,omitempty" mapstructure:"websocket,omitempty"`
}
Permissions required by the plugin
type PluginInfo ¶ added in v0.60.0
PluginInfo contains basic information about a plugin for metrics/insights.
type PluginMetadata ¶ added in v0.60.0
PluginMetadata holds the extracted information from a plugin file without fully initializing the plugin.
type PluginMetricsRecorder ¶ added in v0.60.0
type PluginMetricsRecorder interface {
RecordPluginRequest(ctx context.Context, plugin, method string, ok bool, elapsed int64)
}
PluginMetricsRecorder is an interface for recording plugin metrics. This is satisfied by core/metrics.Metrics but defined here to avoid import cycles.
type SchedulerPermission ¶ added in v0.60.0
type SchedulerPermission struct {
// Explanation for why scheduler access is needed
Reason *string `json:"reason,omitempty" yaml:"reason,omitempty" mapstructure:"reason,omitempty"`
}
Scheduler service permissions for scheduling tasks
type ScrobblerPlugin ¶ added in v0.60.0
type ScrobblerPlugin struct {
// contains filtered or unexported fields
}
ScrobblerPlugin is an adapter that wraps an Extism plugin and implements the scrobbler.Scrobbler interface for scrobbling to external services.
func (*ScrobblerPlugin) IsAuthorized ¶ added in v0.60.0
func (s *ScrobblerPlugin) IsAuthorized(ctx context.Context, userId string) bool
IsAuthorized checks if the user is authorized with this scrobbler. First checks if the user is allowed to use this plugin (server-side), then delegates to the plugin for service-specific authorization.
func (*ScrobblerPlugin) NowPlaying ¶ added in v0.60.0
func (s *ScrobblerPlugin) NowPlaying(ctx context.Context, userId string, track *model.MediaFile, position int) error
NowPlaying sends a now playing notification to the scrobbler
type SubsonicAPIPermission ¶ added in v0.60.0
type SubsonicAPIPermission struct {
// Explanation for why SubsonicAPI access is needed
Reason *string `json:"reason,omitempty" yaml:"reason,omitempty" mapstructure:"reason,omitempty"`
}
SubsonicAPI service permissions. Requires 'users' permission to be declared.
type SubsonicRouter ¶
SubsonicRouter is an http.Handler that serves Subsonic API requests.
type TaskQueuePermission ¶ added in v0.61.0
type TaskQueuePermission struct {
// Maximum total concurrent workers across all queues. Default: 1
MaxConcurrency int `json:"maxConcurrency,omitempty" yaml:"maxConcurrency,omitempty" mapstructure:"maxConcurrency,omitempty"`
// Explanation for why task queue access is needed
Reason *string `json:"reason,omitempty" yaml:"reason,omitempty" mapstructure:"reason,omitempty"`
}
Task queue permissions for background task processing
func (*TaskQueuePermission) UnmarshalJSON ¶ added in v0.61.0
func (j *TaskQueuePermission) UnmarshalJSON(value []byte) error
UnmarshalJSON implements json.Unmarshaler.
type ThreadsFeature ¶ added in v0.60.0
type ThreadsFeature struct {
// Explanation for why threads support is needed
Reason *string `json:"reason,omitempty" yaml:"reason,omitempty" mapstructure:"reason,omitempty"`
}
Enable experimental WebAssembly threads support
type UsersPermission ¶ added in v0.60.0
type UsersPermission struct {
// Explanation for why users access is needed
Reason *string `json:"reason,omitempty" yaml:"reason,omitempty" mapstructure:"reason,omitempty"`
}
Users service permissions for accessing user information
type WebSocketPermission ¶ added in v0.60.0
type WebSocketPermission struct {
// Explanation for why WebSocket access is needed
Reason *string `json:"reason,omitempty" yaml:"reason,omitempty" mapstructure:"reason,omitempty"`
// List of required host patterns for WebSocket connections (e.g.,
// 'api.example.com', '*.musicbrainz.org')
RequiredHosts []string `json:"requiredHosts,omitempty" yaml:"requiredHosts,omitempty" mapstructure:"requiredHosts,omitempty"`
}
WebSocket service permissions for establishing WebSocket connections
Source Files
¶
- capabilities.go
- capability_lifecycle.go
- config_validation.go
- host_artwork.go
- host_cache.go
- host_config.go
- host_httpclient.go
- host_kvstore.go
- host_library.go
- host_scheduler.go
- host_subsonicapi.go
- host_taskqueue.go
- host_users.go
- host_websocket.go
- lyrics_adapter.go
- manager.go
- manager_cache.go
- manager_call.go
- manager_loader.go
- manager_plugin.go
- manager_sync.go
- manager_watcher.go
- manifest.go
- manifest_gen.go
- metadata_agent.go
- migrate.go
- package.go
- scrobbler_adapter.go
Directories
¶
| Path | Synopsis |
|---|---|
|
Package capabilities defines Go interfaces for Navidrome plugin capabilities.
|
Package capabilities defines Go interfaces for Navidrome plugin capabilities. |
|
Package host provides host services that can be called by plugins via Extism host functions.
|
Package host provides host services that can be called by plugins via Extism host functions. |
|
pdk
|
|
|
go
module
|