Skip to content

Commit ca59aa0

Browse files
authored
Merge pull request #1167 from gofr-dev/release-1.25.0
Release v1.25.0
2 parents cd62d12 + a323409 commit ca59aa0

File tree

20 files changed

+776
-195
lines changed

20 files changed

+776
-195
lines changed

README.md

Lines changed: 81 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,75 @@
1+
<h1 style="text-align: center; font-size: 100px; font-weight: 500;">
2+
<i>Go</i>Fr
3+
</h1>
4+
15
<p align="center">
26
<img align="center" width="300" alt="logo" src="https://github.com/gofr-dev/gofr/assets/44036979/916fe7b1-42fb-4af1-9e0b-4a7a064c243c">
37
</p>
4-
<p align="center"><b>
5-
GoFr is an opinionated microservice development framework.</b></p>
6-
7-
<div align=center>
8-
<a href="https://pkg.go.dev/gofr.dev"><img src="https://img.shields.io/badge/%F0%9F%93%9A%20godoc-pkg-00ACD7.svg?color=00ACD7&style=flat-square"></a>
9-
<a href="https://gofr.dev/docs"><img src="https://img.shields.io/badge/%F0%9F%92%A1%20gofr-docs-00ACD7.svg?style=flat-square"></a>
10-
<a href="https://codeclimate.com/github/gofr-dev/gofr/maintainability"><img src="https://api.codeclimate.com/v1/badges/58c8d0443a3d08c59c07/maintainability" /></a>
11-
<a href="https://codeclimate.com/github/gofr-dev/gofr/test_coverage"><img src="https://api.codeclimate.com/v1/badges/58c8d0443a3d08c59c07/test_coverage" /></a>
12-
<a href="https://goreportcard.com/report/gofr.dev"><img src="https://goreportcard.com/badge/gofr.dev"></a>
13-
<a href="https://opensource.org/licenses/Apache-2.0"><img src="https://img.shields.io/badge/License-Apache_2.0-blue.svg"></a>
14-
<a href="https://discord.gg/wsaSkQTdgq"><img src="https://img.shields.io/badge/discord-join-7289DA.svg?logo=discord&longCache=true&style=flat" /></a>
8+
9+
<h2 align="center" style="font-size: 28px;"><b>GoFr: An Opinionated Microservice Development Framework</b></h2>
10+
11+
<div align="center">
12+
<a href="https://pkg.go.dev/gofr.dev"><img src="https://img.shields.io/badge/GoDoc-Read%20Documentation-blue?style=for-the-badge" alt="godoc"></a>
13+
<a href="https://gofr.dev/docs"><img src="https://img.shields.io/badge/GoFr-Docs-orange?style=for-the-badge" alt="gofr-docs"></a>
14+
<a href="https://codeclimate.com/github/gofr-dev/gofr/maintainability"><img src="https://img.shields.io/codeclimate/maintainability/gofr-dev/gofr?style=for-the-badge" alt="maintainability"></a>
15+
<a href="https://codeclimate.com/github/gofr-dev/gofr/test_coverage"><img src="https://img.shields.io/codeclimate/coverage/gofr-dev/gofr?style=for-the-badge" alt="test-coverage"></a>
16+
<a href="https://goreportcard.com/report/gofr.dev"><img src="https://goreportcard.com/badge/gofr.dev?style=for-the-badge" alt="Go Report Card"></a>
17+
<a href="https://opensource.org/licenses/Apache-2.0"><img src="https://img.shields.io/badge/License-Apache_2.0-blue?style=for-the-badge" alt="Apache 2.0 License"></a>
18+
<a href="https://discord.gg/wsaSkQTdgq"><img src="https://img.shields.io/badge/discord-join-us?style=for-the-badge&logo=discord&color=7289DA" alt="discord" /></a>
19+
<a href="https://gurubase.io/g/gofr"><img src="https://img.shields.io/badge/Gurubase-Ask%20GoFr%20Guru-006BFF?style=for-the-badge" /></a>
1520
</div>
1621

17-
Listed in [CNCF Landscape](https://landscape.cncf.io/?selected=go-fr).
22+
<h2 align="center">Listed in the <a href="https://landscape.cncf.io/?selected=go-fr">CNCF Landscape</a></h2>
23+
24+
## 🎯 **Goal**
25+
GoFr is designed to **simplify microservice development**, with key focuses on **Kubernetes deployment** and **out-of-the-box observability**. While capable of building generic applications, **microservices** remain at its core.
1826

19-
## 🎯 Goal
20-
Even though generic applications can be written using GoFr, our main focus is to simplify the development of microservices.
21-
We will focus on deployment in Kubernetes and aspire to provide out-of-the-box observability.
27+
---
2228

23-
## 💡 Key Features
29+
## 💡 **Key Features**
2430

25-
1. Simple API syntax
26-
2. REST Standards by default
27-
3. Configuration management
28-
4. [Observability](https://gofr.dev/docs/quick-start/observability) (Logs, Traces, Metrics)
29-
5. Inbuilt [Auth Middleware](https://gofr.dev/docs/advanced-guide/http-authentication) & Support for [Custom Middleware](https://gofr.dev/docs/advanced-guide/middlewares)
30-
6. [gRPC support](https://gofr.dev/docs/advanced-guide/grpc)
31-
7. [HTTP service](https://gofr.dev/docs/advanced-guide/http-communication) with support for [Circuit Breaker](https://gofr.dev/docs/advanced-guide/circuit-breaker)
32-
8. [Pub/Sub](https://gofr.dev/docs/advanced-guide/using-publisher-subscriber)
33-
9. [Health Check](https://gofr.dev/docs/advanced-guide/monitoring-service-health) by default for all datasources.
34-
10. [Database Migration](https://gofr.dev/docs/advanced-guide/handling-data-migrations)
35-
11. [Cron Jobs](https://gofr.dev/docs/advanced-guide/using-cron)
36-
12. Support for [changing Log Level](https://gofr.dev/docs/advanced-guide/remote-log-level-change) without restarting the application.
37-
13. [Swagger Rendering](https://gofr.dev/docs/advanced-guide/swagger-documentation)
38-
14. [Abstracted File Systems](https://gofr.dev/docs/advanced-guide/handling-file)
39-
15. [Websockets](https://gofr.dev/docs/advanced-guide/handling-file)
31+
1. **Simple API Syntax**
32+
2. **REST Standards by Default**
33+
3. **Configuration Management**
34+
4. **[Observability](https://gofr.dev/docs/quick-start/observability)** (Logs, Traces, Metrics)
35+
5. **Inbuilt [Auth Middleware](https://gofr.dev/docs/advanced-guide/http-authentication)** & Custom Middleware Support
36+
6. **[gRPC Support](https://gofr.dev/docs/advanced-guide/grpc)**
37+
7. **[HTTP Service](https://gofr.dev/docs/advanced-guide/http-communication)** with Circuit Breaker Support
38+
8. **[Pub/Sub](https://gofr.dev/docs/advanced-guide/using-publisher-subscriber)**
39+
9. **[Health Check](https://gofr.dev/docs/advanced-guide/monitoring-service-health)** for All Datasources
40+
10. **[Database Migration](https://gofr.dev/docs/advanced-guide/handling-data-migrations)**
41+
11. **[Cron Jobs](https://gofr.dev/docs/advanced-guide/using-cron)**
42+
12. **Support for [Changing Log Level](https://gofr.dev/docs/advanced-guide/remote-log-level-change) Without Restarting**
43+
13. **[Swagger Rendering](https://gofr.dev/docs/advanced-guide/swagger-documentation)**
44+
14. **[Abstracted File Systems](https://gofr.dev/docs/advanced-guide/handling-file)**
45+
15. **[Websockets](https://gofr.dev/docs/advanced-guide/handling-file)**
4046

41-
![banner.gif](.github/banner.gif)
47+
---
4248

43-
## Getting started
44-
### Prerequisites
45-
GoFr requires [Go](https://go.dev/) version [1.21](https://go.dev/doc/devel/release#go1.21.0) or above.
49+
## 🚀 **Getting Started**
4650

47-
### Getting GoFr
48-
With [Go's module support](https://go.dev/wiki/Modules#how-to-use-modules), `go [build|run|test]` automatically fetches the necessary dependencies when you add the import in your code:
51+
### **Prerequisites**
52+
- GoFr requires **[Go](https://go.dev/)** version **[1.21](https://go.dev/doc/devel/release#go1.21.0)** or above.
4953

50-
```sh
54+
### **Installation**
55+
To get started with GoFr, add the following import to your code and use Go’s module support to automatically fetch dependencies:
56+
57+
```go
5158
import "gofr.dev/pkg/gofr"
5259
```
5360

54-
Alternatively, use `go get`:
61+
Alternatively, use the command:
5562

56-
```sh
63+
```bash
5764
go get -u gofr.dev/pkg/gofr
5865
```
59-
### Running GoFr
60-
A basic example:
66+
67+
---
68+
69+
## 🏃 **Running GoFr**
70+
71+
Here's a simple example to get a GoFr application up and running:
72+
6173
```go
6274
package main
6375

@@ -67,35 +79,46 @@ func main() {
6779
app := gofr.New()
6880

6981
app.GET("/greet", func(ctx *gofr.Context) (interface{}, error) {
70-
7182
return "Hello World!", nil
7283
})
7384

74-
app.Run() // listen and serve on localhost:8000
85+
app.Run() // listens and serves on localhost:8000
7586
}
7687
```
7788

78-
To run the code, use the `go run` command, like:
89+
To run this code:
7990

80-
```sh
91+
```bash
8192
$ go run main.go
8293
```
8394

84-
Then visit [`localhost:8000/greet`](http://localhost:8000/greet) in your browser to see the response!
95+
Visit [`localhost:8000/greet`](http://localhost:8000/greet) to see the result.
96+
97+
---
98+
99+
## 📂 **More Examples**
100+
101+
Explore a variety of ready-to-run examples in the [GoFr examples directory](https://github.com/gofr-dev/gofr/tree/development/examples).
102+
103+
---
104+
105+
## 👩‍💻 **Documentation**
106+
107+
- **[GoDoc](https://pkg.go.dev/gofr.dev)**: Official API documentation.
108+
- **[GoFr Documentation](https://gofr.dev/docs)**: Comprehensive guides and resources.
109+
110+
---
85111

86-
### See more examples
87-
A number of ready-to-run examples demonstrating various use cases of GoFr are available in the [GoFr examples](https://github.com/gofr-dev/gofr/tree/development/examples) directory.
112+
## 👍 **Contribute**
88113

89-
## 👩‍💻Documentation
90-
See the [godocs](https://pkg.go.dev/gofr.dev).
114+
Help us make GoFr even better:
91115

92-
The documentation is also available on [gofr.dev](https://gofr.dev/docs).
116+
1. **Star** this repo on GitHub! 🌟
117+
2. Write a review or tutorial on **[Medium](https://medium.com/)**, **[Dev.to](https://dev.to/)**, or your blog.
118+
3. Review the **[CONTRIBUTING.md](CONTRIBUTING.md)** guide to learn how to contribute to the project.
93119

94-
## 👍 Contribute
95-
If you want to say thank you and/or support the active development of GoFr:
120+
---
96121

97-
1. [Star](https://docs.github.com/en/get-started/exploring-projects-on-github/saving-repositories-with-stars) the repo.
98-
2. Write a review or tutorial on [Medium](https://medium.com/), [Dev.to](https://dev.to/) or personal blog.
99-
3. Visit [CONTRIBUTING](CONTRIBUTING.md) for details on submitting patches and the contribution workflow.
122+
### 🎁 **Get a GoFr T-Shirt & Stickers!**
100123

101-
If your PR is merged or you have written an article or contributed in someway to development or spreading the word about GoFr, fill the [Google Form](https://forms.gle/R1Yz7ZzY3U5WWTgy5), and we will send you a <b>GoFr T-Shirt and Stickers</b> as a token of appreciation.
124+
If your PR is merged, or if you contribute by writing articles or promoting GoFr, we invite you to fill out [this form](https://forms.gle/R1Yz7ZzY3U5WWTgy5) to claim your GoFr merchandise as a token of our appreciation!

docs/quick-start/connecting-redis/page.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,14 @@ Optionally, you can use Docker to set up a development environment as described
1212
docker run --name gofr-redis -p 6379:6379 -d redis
1313
```
1414

15+
You can also set up a development environment with password authentication as described below.
16+
17+
```bash
18+
docker run --name gofr-redis -p 2002:6379 -d \
19+
-e REDIS_PASSWORD=password \
20+
redis:7.0.5 --requirepass password
21+
```
22+
1523
You can set a sample key `greeting` using the following command:
1624

1725
```bash
@@ -27,13 +35,15 @@ Following configuration keys are required for Redis connectivity:
2735

2836
* `REDIS_HOST`: It specifies the hostname or IP address of your Redis server.
2937
* `REDIS_PORT`: It specifies the port number on which your Redis server is listening. The default Redis port is 6379.
30-
38+
* `REDIS_USER` : This is the user you'll use to connect to your Redis server. You can configure multiple users with different permissions in a single Redis container. For more details, refer to the [official docs](https://redis.io/docs/latest/operate/oss_and_stack/management/security/acl/)
39+
* `REDIS_PASSWORD`: The password is required only if your Redis server is configured for authentication; if authentication is not enabled, no password is necessary.
3140
```dotenv
3241
APP_NAME=test-service
3342
HTTP_PORT=9000
3443
3544
REDIS_HOST=localhost
3645
REDIS_PORT=6379
46+
REDIS_PASSWORD=password
3747
```
3848

3949
The following code snippet demonstrates how to retrieve data from a Redis key named "greeting":

go.mod

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module gofr.dev
33
go 1.22
44

55
require (
6-
cloud.google.com/go/pubsub v1.44.0
6+
cloud.google.com/go/pubsub v1.45.1
77
github.com/DATA-DOG/go-sqlmock v1.5.2
88
github.com/XSAM/otelsql v0.34.0
99
github.com/alicebob/miniredis/v2 v2.33.0
@@ -19,35 +19,35 @@ require (
1919
github.com/joho/godotenv v1.5.1
2020
github.com/lib/pq v1.10.9
2121
github.com/pkg/errors v0.9.1
22-
github.com/prometheus/client_golang v1.20.4
23-
github.com/redis/go-redis/extra/redisotel/v9 v9.0.5
24-
github.com/redis/go-redis/v9 v9.6.2
22+
github.com/prometheus/client_golang v1.20.5
23+
github.com/redis/go-redis/extra/redisotel/v9 v9.7.0
24+
github.com/redis/go-redis/v9 v9.7.0
2525
github.com/segmentio/kafka-go v0.4.47
2626
github.com/stretchr/testify v1.9.0
27-
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.55.0
27+
go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.56.0
2828
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.56.0
2929
go.opentelemetry.io/otel v1.31.0
3030
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.31.0
3131
go.opentelemetry.io/otel/exporters/prometheus v0.52.0
32-
go.opentelemetry.io/otel/exporters/zipkin v1.30.0
32+
go.opentelemetry.io/otel/exporters/zipkin v1.31.0
3333
go.opentelemetry.io/otel/metric v1.31.0
3434
go.opentelemetry.io/otel/sdk v1.31.0
3535
go.opentelemetry.io/otel/sdk/metric v1.30.0
3636
go.opentelemetry.io/otel/trace v1.31.0
37-
go.uber.org/mock v0.4.0
37+
go.uber.org/mock v0.5.0
3838
golang.org/x/oauth2 v0.23.0
3939
golang.org/x/sync v0.8.0
4040
golang.org/x/term v0.25.0
4141
golang.org/x/text v0.19.0
42-
google.golang.org/api v0.200.0
42+
google.golang.org/api v0.203.0
4343
google.golang.org/grpc v1.67.1
4444
google.golang.org/protobuf v1.35.1
4545
modernc.org/sqlite v1.33.1
4646
)
4747

4848
require (
49-
cloud.google.com/go v0.115.1 // indirect
50-
cloud.google.com/go/auth v0.9.8 // indirect
49+
cloud.google.com/go v0.116.0 // indirect
50+
cloud.google.com/go/auth v0.9.9 // indirect
5151
cloud.google.com/go/auth/oauth2adapt v0.2.4 // indirect
5252
cloud.google.com/go/compute/metadata v0.5.2 // indirect
5353
cloud.google.com/go/iam v1.2.1 // indirect
@@ -79,7 +79,7 @@ require (
7979
github.com/prometheus/client_model v0.6.1 // indirect
8080
github.com/prometheus/common v0.59.1 // indirect
8181
github.com/prometheus/procfs v0.15.1 // indirect
82-
github.com/redis/go-redis/extra/rediscmd/v9 v9.0.5 // indirect
82+
github.com/redis/go-redis/extra/rediscmd/v9 v9.7.0 // indirect
8383
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect
8484
github.com/stretchr/objx v0.5.2 // indirect
8585
github.com/yuin/gopher-lua v1.1.1 // indirect
@@ -92,9 +92,9 @@ require (
9292
golang.org/x/net v0.30.0 // indirect
9393
golang.org/x/sys v0.26.0 // indirect
9494
golang.org/x/time v0.7.0 // indirect
95-
google.golang.org/genproto v0.0.0-20241007155032-5fefd90f89a9 // indirect
95+
google.golang.org/genproto v0.0.0-20241015192408-796eee8c2d53 // indirect
9696
google.golang.org/genproto/googleapis/api v0.0.0-20241007155032-5fefd90f89a9 // indirect
97-
google.golang.org/genproto/googleapis/rpc v0.0.0-20241007155032-5fefd90f89a9 // indirect
97+
google.golang.org/genproto/googleapis/rpc v0.0.0-20241015192408-796eee8c2d53 // indirect
9898
gopkg.in/yaml.v3 v3.0.1 // indirect
9999
modernc.org/gc/v3 v3.0.0-20240107210532-573471604cb6 // indirect
100100
modernc.org/libc v1.55.3 // indirect

0 commit comments

Comments
 (0)