feature: key updater facade
This PR is not ready to land. It requires the service and state to land. These PR's are coming shortly
This PR moves the key updater facade over to use DQlite backed services. The business logic of finding and curating authorised keys for a machine has been moved down to the services layer leaving this facade code cleaner and with less dependencies. Because of this change we have also removed another usage of FindEntity.
In this PR I have also broken down the tests for the facade removing all dependencies on to api server suite. As well as the above this PR also introduces a more robust error handling logic for the facade. Instead of getting an error and throwing it back to a generic error handling function for the api server the facade now attempts to understand the problem and return more meaningful error codes to the user. I have also made an attempt to start documenting these errors and introducing specific error codes.
Checklist
- [x] Code style: imports ordered, good names, simple structure, etc
- [x] Comments saying why design decisions were made
- [x] Go unit tests, with comments saying what you're testing
- ~[ ] Integration tests, with comments saying what you're testing~
- [x] doc.go added or updated in changed packages
QA steps
Coming SOON. I will update this when service and state layers land.
Documentation changes
No logic has changed around expected behaviour.
Links
Jira card: JUJU-6097