mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Force interface implementation also on legacy storage (#87414)
* Force interface implementation also on legacy storage * Add DeleteCollection to folders and dashboards * Fix integration tests * Fix tests
This commit is contained in:
@@ -153,3 +153,8 @@ func (s *dashboardStorage) Get(ctx context.Context, name string, options *metav1
|
||||
|
||||
return s.access.GetDashboard(ctx, info.OrgID, name)
|
||||
}
|
||||
|
||||
// GracefulDeleter
|
||||
func (s *dashboardStorage) DeleteCollection(ctx context.Context, deleteValidation rest.ValidateObjectFunc, options *metav1.DeleteOptions, listOptions *internalversion.ListOptions) (runtime.Object, error) {
|
||||
return nil, fmt.Errorf("DeleteCollection for dashboards not implemented")
|
||||
}
|
||||
|
||||
@@ -289,3 +289,8 @@ func (s *legacyStorage) Delete(ctx context.Context, name string, deleteValidatio
|
||||
})
|
||||
return p, true, err // true is instant delete
|
||||
}
|
||||
|
||||
// GracefulDeleter
|
||||
func (s *legacyStorage) DeleteCollection(ctx context.Context, deleteValidation rest.ValidateObjectFunc, options *metav1.DeleteOptions, listOptions *internalversion.ListOptions) (runtime.Object, error) {
|
||||
return nil, fmt.Errorf("DeleteCollection for folders not implemented")
|
||||
}
|
||||
|
||||
@@ -186,3 +186,8 @@ func (s *legacyStorage) Delete(ctx context.Context, name string, deleteValidatio
|
||||
})
|
||||
return p, true, err // true is instant delete
|
||||
}
|
||||
|
||||
// CollectionDeleter
|
||||
func (s *legacyStorage) DeleteCollection(ctx context.Context, deleteValidation rest.ValidateObjectFunc, options *metav1.DeleteOptions, listOptions *internalversion.ListOptions) (runtime.Object, error) {
|
||||
return nil, fmt.Errorf("DeleteCollection for playlists not implemented")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user