- Notifications
You must be signed in to change notification settings - Fork0
JWT-based Kafka REST API with Golang, GORM, and Fiber
License
cploutarchou/go-kafka-rest
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
This project demonstrates building a REST API with JWT (JSON Web Token) authentication for Kafka using Golang. The API is implemented using the Golang programming language and leverages the power of Kafka for message processing and communication.
- User registration and authentication with JWT
- Publish messages to Kafka topics
- Consume messages from Kafka topics
- Secure and protect API routes using JWT authentication
To set up the project, follow these steps:
- Clone the repository:
git clone https://github.com/cploutarchou/go-kafka-rest.git - Install the required dependencies:
go mod download - Set up the necessary environment variables (e.g., Kafka broker address, JWT secret, etc.)
- Start the application:
go run main.go
Once the application is running, you can perform the following actions:
- Register a new user:
POST /api/register - Authenticate and obtain a JWT token:
POST /api/login - Publish a message to a Kafka topic:
POST /api/publish - Consume messages from a Kafka topic:
GET /api/consume
Make sure to include the required authentication headers (JWT token) for the protected routes.
Contributions are welcome! If you find any issues or have suggestions for improvement, feel free to open an issue or submit a pull request.
This project is licensed under theMIT License.
About
JWT-based Kafka REST API with Golang, GORM, and Fiber
Topics
Resources
License
Code of conduct
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Uh oh!
There was an error while loading.Please reload this page.
Contributors2
Uh oh!
There was an error while loading.Please reload this page.