Skip to content

feat(managed): Add generic interfaces for external types#761

Merged
phisco merged 1 commit intocrossplane:mainfrom
MisterMX:feat/typed-external-connector
Oct 24, 2024
Merged

feat(managed): Add generic interfaces for external types#761
phisco merged 1 commit intocrossplane:mainfrom
MisterMX:feat/typed-external-connector

Conversation

@MisterMX
Copy link
Contributor

Description of your changes

Add a wrapper for typed external clients that take over the conversion from resource.Managed to the actual Go struct that is always necessary in every controller. It does not reduce complexity as a whole but allows controllers to save some LoCs and focus on the important things.

Keep the previous types as type aliases to avoid any breaking changes.

I have:

Need help with this checklist? See the cheat sheet.

@MisterMX MisterMX requested a review from a team as a code owner August 23, 2024 09:53
@MisterMX MisterMX requested a review from turkenh August 23, 2024 09:53
@MisterMX MisterMX force-pushed the feat/typed-external-connector branch from d27f90b to 1cb018a Compare August 23, 2024 09:58
Add a wrapper for typed external clients that take over the conversion
from resource.Managed to the actual Go struct that is always necessary
in every controller.

It does not reduce complexity as a whole but allows controllers to save
some LoCs and focus on the important things.

Keep the previous types as type aliases to avoid any breaking changes.

Signed-off-by: Maximilian Blatt <maximilian.blatt-extern@deutschebahn.com>
@MisterMX MisterMX force-pushed the feat/typed-external-connector branch from 1cb018a to 7f2eeb1 Compare August 23, 2024 10:22
Copy link
Contributor

@phisco phisco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good! thanks, @MisterMX!

@phisco phisco merged commit e6bea2f into crossplane:main Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants