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
I was looking into the Go version of the SDK and noticed that DashboardBuilder.internal property is private. I was thinking about adding custom validations for the resulting dashboard. The easiest solution was to leverage SDK's structs but then implement a custom function to accept DashboardBuilder and run the validation, something along the lines of:
I noticed that in TypeScript the internal property of the DashboardBuilder is protected readonly which allows users to extend the class and access internal field for any custom validation:
classValidatedDashboardBuilderextendsdashboard.DashboardBuilder{constructor(title: string){super(title);}validate(): boolean{if(!this.internal.title){console.error("Dashboard title is required.");returnfalse;}returntrue;}}
What would you like to be added?
Is it possible to generate a getter for the internal field of the dashboard.DashboardBuilder in Go please? Alternatively, a user can provide an additional custom validation function that the Build can run.
The text was updated successfully, but these errors were encountered:
Why is this needed?
Hi!
I was looking into the Go version of the SDK and noticed that DashboardBuilder.internal property is private. I was thinking about adding custom validations for the resulting dashboard. The easiest solution was to leverage SDK's structs but then implement a custom function to accept
DashboardBuilder
and run the validation, something along the lines of:I noticed that in TypeScript the
internal
property of theDashboardBuilder
is protected readonly which allows users to extend the class and accessinternal
field for any custom validation:What would you like to be added?
Is it possible to generate a getter for the
internal
field of thedashboard.DashboardBuilder
in Go please? Alternatively, a user can provide an additional custom validation function that theBuild
can run.The text was updated successfully, but these errors were encountered: