add component occurrence repository for org-wide package search, expe…
…cted struct added and made interface public , actual sql search in componentn_occurrece_repository an
This looks really good! What do you think about deleting the component occurence controller in favor of the component_controller. I think you can just move your function to the component_controller. Same for the component occurence repository. I think the function can be moved to the component_repository as well.
Permission-Checking should be done in a middleware, like no other user is even allowed to call your route. Currently you are doing the heavy query BEFORE the permission check and you are just discarding the result. Have a look at the api.go file, there are a lot of middlewares applied to different routes.