refactor: update interface types to use 'any' in plugin repository methods

Signed-off-by: Deluan <deluan@navidrome.org>
This commit is contained in:
Deluan 2026-01-02 10:03:35 -05:00
parent f8ea65dbc8
commit 1f24c14b9e

View File

@ -111,19 +111,19 @@ func (r *pluginRepository) EntityName() string {
return "plugin"
}
func (r *pluginRepository) NewInstance() interface{} {
func (r *pluginRepository) NewInstance() any {
return &model.Plugin{}
}
func (r *pluginRepository) Read(id string) (interface{}, error) {
func (r *pluginRepository) Read(id string) (any, error) {
return r.Get(id)
}
func (r *pluginRepository) ReadAll(options ...rest.QueryOptions) (interface{}, error) {
func (r *pluginRepository) ReadAll(options ...rest.QueryOptions) (any, error) {
return r.GetAll(r.parseRestOptions(r.ctx, options...))
}
func (r *pluginRepository) Save(entity interface{}) (string, error) {
func (r *pluginRepository) Save(entity any) (string, error) {
p := entity.(*model.Plugin)
if !r.isPermitted() {
return "", rest.ErrPermissionDenied
@ -135,7 +135,7 @@ func (r *pluginRepository) Save(entity interface{}) (string, error) {
return p.ID, err
}
func (r *pluginRepository) Update(id string, entity interface{}, cols ...string) error {
func (r *pluginRepository) Update(id string, entity any, cols ...string) error {
p := entity.(*model.Plugin)
p.ID = id
if !r.isPermitted() {