Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release/v1.28.0 #1247

Merged
merged 109 commits into from
Nov 27, 2024
Merged

Release/v1.28.0 #1247

merged 109 commits into from
Nov 27, 2024

Conversation

Umang01-hash
Copy link
Member

@Umang01-hash Umang01-hash commented Nov 27, 2024

Release v1.28.0

✨ Features:

Custom Response Headers Support:
Users can add custom HTTP response headers using the Response struct. This feature helps add extra information, such as security policies or other metadata, to improve communication between clients and servers.

  • Example usage:
        return response.Response{
            Data:    "Hello World from new Server",
            Headers: map[string]string{"X-Custom-Header": "CustomValue", "X-Another-Header": "AnotherValue"},
        }` 

OpenTSDB Support:
Users can integrate OpenTSDB to store and retrieve time-series data.

  • Methods include:

    • PutDataPoints: Send data to OpenTSDB.
    • QueryDataPoints: Retrieve data based on specified parameters.
    • GetAggregators: Get available aggregation functions.
    • QueryAnnotation, PostAnnotation, PutAnnotation, DeleteAnnotation: Manage annotations in OpenTSDB.
  • To import GoFr's external OpenTSDB driver:
    go get gofr.dev/pkg/gofr/datasource/opentsdb@latest

type OpenTSDB interface { 
    HealthChecker 
    PutDataPoints(ctx context.Context, data any, queryParam string, res any) error
    QueryDataPoints(ctx context.Context, param any, res any) error 
    QueryLatestDataPoints(ctx context.Context, param any, res any) error 
    GetAggregators(ctx context.Context, res any) error QueryAnnotation(ctx context.Context, queryAnnoParam map[string]any, res any) error 
    PostAnnotation(ctx context.Context, annotation any, res any) error
    PutAnnotation(ctx context.Context, annotation any, res any) error 
    DeleteAnnotation(ctx context.Context, annotation any, res any) error 
}

Support for Binding Binary/Octet Stream:
Users can bind binary/octet-stream content directly to []byte slices using GoFr context.

  • Example usage:

        var result []byte
        err := req.Bind(&result)
        if err != nil {
          log.Fatalf("Bind error: %v", err)
        } 

🛠️ Fixes:

Milliseconds Logged as Microseconds:

  • Previously, operation duration was calculated in milliseconds but was incorrectly logged as microseconds, which led to confusion. This has been fixed to ensure that logs display the accurate duration in microseconds.

Dgraph Datasource Panic Fix

  • Fixed an issue where the Dgraph datasource would panic due to an uninitialized tracer when added as an external datasource. This bug has been addressed.

Solr Methods Fixes:

  • Fixed errors occurring in the following Solr datasource methods: Update, Delete, ListFields, Retrieve, AddField, UpdateField, DeleteField.
  • Updated documentation and provided a working example, accordingly.

Deprecated UseMiddlewareWithContainer Method:

  • The method UseMiddlewareWithContainer has been deprecated and will be removed in future releases. Developers should use the *App.UseMiddleware method instead, which does not depend on the container.

Static File Path Handling Fix:

  • Fixed an issue in the AddStaticFiles method where file paths were not correctly resolved when they didn't start with ./ or were not absolute paths. The fix ensures that the correct file path is registered for static file serving.

robertsilen and others added 30 commits November 13, 2024 12:20
…tasources

add go get commands for all external databases
vikash and others added 27 commits November 25, 2024 23:34
…tainer

deprecate UseMiddlewarWithContainer and remove it from tests and docs
add timeout in mongo config and add Ping after connect
Add success logs for static files
Fix: Missing Connection Successful Logs
@Umang01-hash Umang01-hash merged commit 4df66c5 into main Nov 27, 2024
11 checks passed
@Umang01-hash Umang01-hash deleted the release/v1.28.0 branch November 27, 2024 12:46
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.

7 participants