v1.42.2
🛠️ Improvements
1. Versioned Migrations Support Extended to NATS and EventHub
Following up on versioned migration support for Kafka, MQTT, and Google PubSub in the previous release, GoFr now officially adds:
- NATS
- Azure EventHub
Both now support versioned migrations, allowing event streaming systems to be schema-evolvable and compatible with data migration needs.
2. Cleaner AuthConfig APIs for External Services
You can now configure external services like catfact.ninja using streamlined constructors:
Old Way:
app.AddHTTPService("cat-facts", "https://catfact.ninja",
&service.APIKeyConfig{APIKey: "some-random-key"},
&service.BasicAuthConfig{UserName: "gofr", Password: "gofr"})New Way:
app.AddHTTPService("cat-facts", "https://catfact.ninja",
service.NewAPIKeyConfig("some-random-key"),
service.NewBasicAuthConfig("username", "password"),
)NewBasicAuthConfig(username, password):
- Trims values
- Validates presence of both fields
- Ensures password is base64 encoded, preventing unsafe plaintext usage
- Returns clear errors for invalid formats
NewAPIKeyConfig(apiKey):
- Simplified usage
- Validated internally
- Adds cleaner abstraction with automatic header injection