Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

refactor(api-server): Decouple the server and the server command #5

Merged
merged 3 commits into from
May 5, 2022

Conversation

ditsuke
Copy link
Member

@ditsuke ditsuke commented May 5, 2022

Context

With this PR, the server and the command are decoupled. The command now rests in the conventional /cmd/<command-name> location. The new server architecture opens up the possibility of better testing, too,
with the use of the new amizone.ClientFactoryInterface for the authentication handler layer.

- This interface makes it easier to decouple consumers of the client
  from the concrete amizoneClient interface, making it easier to
  test through DI without consumers having to define their own
  types.
- Interface compliance constraints are moved to the interface file true
  to Go's spirit of implementors not coupled with interface definitions.
With this commit, the server and the command are decoupled. The command
now rests in the conventional /cmd/<command-name> location. The new
server architecture opens up the possibility of better testing, too,
with the use of the `amizone.ClientFactoryInterface` for the
authentication handler layer.
@ditsuke ditsuke marked this pull request as draft May 5, 2022 14:25
@sonarcloud
Copy link

sonarcloud bot commented May 5, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@ditsuke ditsuke marked this pull request as ready for review May 5, 2022 19:37
@ditsuke ditsuke merged commit 2eb5dae into main May 5, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant