You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So the original idea here was to make it explicit which methods were exposed rather than just exposing everything. If we want to expose everything then there's no need for a separate template, just change the visibility in the existing template.
So the original idea here was to make it explicit which methods were exposed rather than just exposing everything. If we want to expose everything then there's no need for a separate template, just change the visibility in the existing template.
Got it. I thought to expose everything, especially that this client is not only used by terraform-unifi-provider and others could benefit from that. However, there is a risk some functionalities may be broken. Then we can hope for reporting those and some contributions to fix them.
I think there's a bigger question here about what this library supports. This library primarily exists for terraform-provider-unifi and whilst there is undoubtedly other usage in the wild, I have no real insights into how it is being used, what functionality is important, what version support is needed. As such, I haven't really worried too much about making breaking changes and/or testing since it gets tested as part of the Terraform provider.
If we want to make it easier to expose methods from go-unifi, it might be worthwhile setting up some testing infrastructure to ensure that we can actually maintain compatibility
Idea is to backport client code generation from https://github.com/ubiquiti-community/go-unifi. It is based on following client template https://github.com/ubiquiti-community/go-unifi/blob/main/fields/client.go.tmpl , which generates code like on following example of
channel_plan.go
:It would be a good starting point to have full coverage of generated structs with client code, which then could be customized as needed.
The text was updated successfully, but these errors were encountered: