Refactor Functions and so on #7
Labels
No Label
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: Anthrove/otter-space-sdk#7
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I found multiple problems with the current architecture of the SDK. I think we should refactor this.
We are sure that we won't change the Database Driver or create some other complex change. That's the reason why we should remove the thinking about having this SDK as modular as possible.
The Problems we have:
With the following solution I want to fix the most problem or make them as small as possible so we need to update this SDK only for database changes, dependency updates or bug fixes.
The Interface should implement the following functions. (I wrote some Model changes down we should implement too)
With these functions we only implement basic CRUD without Read multiple because that should be implemented if needed to filter, sorting and pagination can be implemented with gorm scopes.
Please keep in mind, that I removed the Pointer intentionally!
Is there any Point I am missing, or I should recheck?
This looks good, but you also need to write down what the model changes are
Please read again and you find the changes 😄
Also please don't use a struct with all the functions you need for the interface. Its better to have standalone functions for multiple reason, like best practices and testing and so on.
An example for would be:
client.go
:author.go
:All base functions are added, so far without tests
Could you also write down what kind of telemetry you want to have? i want to add Traces, also logs or something else?