From 1f24c14b9e0774ca0b1ff9b65212fc0f3446bdb9 Mon Sep 17 00:00:00 2001 From: Deluan Date: Fri, 2 Jan 2026 10:03:35 -0500 Subject: [PATCH] refactor: update interface types to use 'any' in plugin repository methods Signed-off-by: Deluan --- persistence/plugin_repository.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/persistence/plugin_repository.go b/persistence/plugin_repository.go index d9fee18e9..5c47969bf 100644 --- a/persistence/plugin_repository.go +++ b/persistence/plugin_repository.go @@ -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() {