SDK v3 #8

Merged
SoXX merged 77 commits from dev/issue-5 into main 2024-08-14 13:27:35 +00:00
Owner

As mentioned in #7, this is the fully reimplemented SDK, It is a breaking change and therefore v3

As mentioned in #7, this is the fully reimplemented SDK, It is a **breaking change** and therefore v3
SoXX added 74 commits 2024-08-14 12:58:27 +00:00
added more columns

BREAKING-CHANGE: breaks database compatibility to older SDK versions
added more columns

BREAKING-CHANGE: breaks database compatibility to older SDK versions
removed all old implementation of the SDK

BREAKING-CHANGE: breaks database compatibility to older SDK versions
Implement connection to PostgreSQL database using GORM. Embed SQL migrations and handle migration execution with logging capabilities. Define configuration structure for database settings.
- Replace custom error types with string constants for common database errors.
- Simplify the Database struct to include a Reason field for error messages.
- Update Error method to format the error output using the Reason.
- Modify validation error constants for consistency and clarity.
feat(database): implementation of functions
Some checks failed
Gitea Build Check / Build (push) Failing after 28s
f798869ef5
- Added functionality
- Add connection checks to `CreateUserSource`, `UpdateUserSource`, `GetUserSourceByID`, and `DeleteUserSource` functions.
- Introduce validation for empty and improperly formatted IDs in `UpdateUserSource`, `GetUserSourceByID`, and `DeleteUserSource`.
- Handle duplicate key errors and record not found errors with appropriate custom error messages.
- Update model references from `UserFavorites` to `UserFavorite` in multiple files.
- Adjust database queries and struct definitions accordingly to maintain consistency.
added the condition for the id
- Rename `UserFavorites` struct to `UserFavorite`
- Update the `TableName` method to reflect the new struct name
feat(database): favorites
Some checks failed
Gitea Build Check / Build (push) Failing after 27s
1dc9b1fb7c
- Added functionality
fix(database): make function more coherent with the rest
Some checks failed
Gitea Build Check / Build (push) Failing after 29s
9fe2d0edc3
feat(database): return gorm itself
Some checks failed
Gitea Build Check / Build (push) Failing after 28s
e839e7ba2a
Add OpenTelemetry integration to the database client by creating a `setupTelemetry` function. Initialize a tracer and configure logging with the otellogrus hook. Call this function during the connection process to enable tracing and logging for database operations.
chore(dependencies): updated dependencies
Some checks failed
Gitea Build Check / Build (push) Failing after 30s
bb64c08185
Implement the HandleError function in the new error.go file to streamline error logging and tracing. Include necessary imports for context, logrus, and OpenTelemetry tracing.
Improve error handling in the CreateTag, CreateTagInBatch, and DeleteTag functions by utilizing a new utility function. Simplify logging and error management, ensuring more consistent error responses throughout these operations.
added the custom util functions to handel telemetry
added the custom util functions to handel telemetry
added the custom util functions to handel telemetry
added the custom util functions to handel telemetry
added the custom util functions to handel telemetry
added the custom util functions to handel telemetry
changed attribute types in to Int
changed attribute types in to Int
changed attribute types in to Int
changed attribute types in to Int
changed attribute types in to Int
fix(tracing): wrong attribute type
Some checks failed
Gitea Build Check / Build (push) Failing after 30s
5ffb558ab8
changed attribute types in to Int
feat(tests): Add tag generator utility functions for tests
Some checks failed
Gitea Build Check / Build (push) Failing after 30s
8668d504b9
feat(scopes): Add pagination support with Paginate and AdvancedPagination functions
Some checks failed
Gitea Build Check / Build (push) Failing after 29s
78e17cf100
- Introduce Paginate function for basic pagination
- Add AdvancedPagination for pagination, sorting, and counting
- Define Pagination struct to hold pagination data
- Set MaxPageSizeLimit and DefaultPageSize in models/constants
chore(tests):
Some checks failed
Gitea Build Check / Build (push) Failing after 26s
75bbbb4408
refactored & fixed old test cases
new version of testing library changed functions
feat(testing): first tests
Some checks failed
Gitea Build Check / Build (push) Failing after 44s
146315f991
added the first set of new tests
added missing checks
added missing log content for tag
fully tested tag groups
added missing checks
feat(test): added tagAlias
Some checks failed
Gitea Build Check / Build (push) Failing after 1m1s
f0f216bdaa
fully tested tag groups
fix(test): user not created
All checks were successful
Gitea Build Check / Build (push) Successful in 1m11s
6dc78db4a4
fix an issue where the user was not created
added missing log content for tag
added missing checks
feat(test): added tag
All checks were successful
Gitea Build Check / Build (push) Successful in 1m19s
2bbfc79e43
fully tested tags
feat(test): added sources
All checks were successful
Gitea Build Check / Build (push) Successful in 1m33s
00b8fe6b71
fully tested sources
fully tested post
feat(test): added post, tags & fixed issues
All checks were successful
Gitea Build Check / Build (push) Successful in 2m0s
8f6ca691bf
fully tested post & tags. Also found bugs with the tests. Those are now fixed.
feat(test): added scopes fixed issues
All checks were successful
Gitea Build Check / Build (push) Successful in 2m22s
Gitea Build Check / Build (pull_request) Successful in 2m17s
d10aa731bc
fully tested scopes. Also found bugs with the tests. Those are now fixed.
SoXX added 1 commit 2024-08-14 12:58:37 +00:00
feat(version): Update to version 3
All checks were successful
Gitea Build Check / Build (push) Successful in 2m18s
Gitea Build Check / Build (pull_request) Successful in 2m13s
44bedd20a1
Updated the module to version 3.

BREAKING CHANGE: This SDK version is not compatible with programs using the v2 implementation.
SoXX added 1 commit 2024-08-14 13:03:42 +00:00
chore(readme): Update README example to include full DatabaseConfig initialization and use database.Connect function
All checks were successful
Gitea Build Check / Build (push) Successful in 2m15s
Gitea Build Check / Build (pull_request) Successful in 2m15s
2eeae0e5c7
SoXX requested review from Alphyron 2024-08-14 13:04:35 +00:00
SoXX pinned this 2024-08-14 13:05:11 +00:00
Alphyron requested changes 2024-08-14 13:17:42 +00:00
Dismissed
@ -0,0 +59,4 @@
pagination.Page = 1
}
if pagination.Sort == "" {
Owner

Please extract the sorting into a custom Scope!

Please extract the sorting into a custom Scope!
Alphyron marked this conversation as resolved
SoXX added 1 commit 2024-08-14 13:21:42 +00:00
feat(scope): added sorting
All checks were successful
Gitea Build Check / Build (push) Successful in 2m20s
Gitea Build Check / Build (pull_request) Successful in 2m18s
975e084b16
Alphyron approved these changes 2024-08-14 13:23:03 +00:00
SoXX merged commit 975e084b16 into main 2024-08-14 13:27:35 +00:00
SoXX deleted branch dev/issue-5 2024-08-14 13:27:35 +00:00
SoXX unpinned this 2024-08-29 08:48:50 +00:00
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Anthrove/otter-space-sdk#8
No description provided.