{"id":15095864,"url":"https://github.com/ramaraju-personal-org/go_events_resigration_restapi","last_synced_at":"2026-02-01T02:32:50.529Z","repository":{"id":251251060,"uuid":"836782171","full_name":"RamaRaju-personal-org/Go_Events_resigration_RestApi","owner":"RamaRaju-personal-org","description":"This repo contains Golang RestApi code for Events registration, user creation, events deletion and updation","archived":false,"fork":false,"pushed_at":"2024-08-01T17:51:18.000Z","size":392,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-21T07:07:21.425Z","etag":null,"topics":["bcrypt","event-management","gin","golang","jwt-authentication","rest-api","sqlite3"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RamaRaju-personal-org.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-01T14:44:36.000Z","updated_at":"2024-08-01T17:54:38.000Z","dependencies_parsed_at":"2024-08-01T20:08:33.710Z","dependency_job_id":null,"html_url":"https://github.com/RamaRaju-personal-org/Go_Events_resigration_RestApi","commit_stats":null,"previous_names":["ramaraju-personal-org/go_events_resigration_restapi"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/RamaRaju-personal-org/Go_Events_resigration_RestApi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RamaRaju-personal-org%2FGo_Events_resigration_RestApi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RamaRaju-personal-org%2FGo_Events_resigration_RestApi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RamaRaju-personal-org%2FGo_Events_resigration_RestApi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RamaRaju-personal-org%2FGo_Events_resigration_RestApi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RamaRaju-personal-org","download_url":"https://codeload.github.com/RamaRaju-personal-org/Go_Events_resigration_RestApi/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RamaRaju-personal-org%2FGo_Events_resigration_RestApi/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261080624,"owners_count":23106602,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bcrypt","event-management","gin","golang","jwt-authentication","rest-api","sqlite3"],"created_at":"2024-09-25T15:42:49.913Z","updated_at":"2026-02-01T02:32:50.498Z","avatar_url":"https://github.com/RamaRaju-personal-org.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Event Booking REST API\n\nA Go-powered \"Event Booking\" REST API that allows users to browse, create, update, and delete events, as well as manage user registrations and authentication.\n\n## API Endpoints\n![alt text](./restapi.png)\n\n- **GET /events**\n  - Retrieve a list of available events.\n  - Authentication: Not required.\n\n- **GET /events/{id}**\n  - Retrieve details of a specific event by its ID.\n  - Authentication: Not required.\n\n- **POST /events**\n  - Create a new bookable event.\n  - Authentication: Required.\n\n- **PUT /events/{id}**\n  - Update an existing event.\n  - Authentication: Required (only by the event creator).\n\n- **DELETE /events/{id}**\n  - Delete an existing event.\n  - Authentication: Required (only by the event creator).\n\n### User Management\n\n- **POST /signup**\n  - Register a new user.\n  - Authentication: Not required.\n\n- **POST /login**\n  - Authenticate a user and obtain an authentication token (JWT).\n  - Authentication: Not required.\n\n### Event Registration\n\n- **POST /events/{id}/register**\n  - Register a user for an event.\n  - Authentication: Required.\n\n- **DELETE /events/{id}/register**\n  - Cancel a user's registration for an event.\n  - Authentication: Required.\n\n\n\n## Authentication\n\nThe API uses JSON Web Tokens (JWT) for authentication. Users must include the token in the Authorization header of requests to protected endpoints.\n\nExample:\n```sh\nAuthorization: Bearer \u003cyour-token\u003e\n```\n\n## 🚀 Setup and Installation\n\n### :arrow_heading_down: Install Dependencies\n\n#### Clone the repository:\n   \n   ```sh\n   git clone https://github.com/your-username/event-booking-api.git\n   cd event-booking-api\n  ```\n\n#### Install required packages:\n\n  - **Gin (HTTP web framework written in Go)**\n     ```sh\n     go get -u github.com/gin-gonic/gin\n     ```\n\n   - **SQLite3 driver for Go**\n      ```sh \n           go get github.com/mattn/go-sqlite3\n      ```\n   - **bcrypt for password hashing**\n     ```sh\n     go get -u golang.org/x/crypto\n     ```\n\n   - **JSON Web Tokens for Go**\n     ```sh\n     go get -u github.com/golang-jwt/jwt/v5\n     ```\n\nSet up environment variables (e.g., database configuration, JWT secret).\n\n#### Run the application:\n   ```sh\n   go run main.go\n   ```\n\n### 📖 Additional Resources\n\n- [HTTP Status Codes](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status)\n- [Go Database SQL](https://pkg.go.dev/database/sql)\n- [Go SQLite3](https://github.com/mattn/go-sqlite3)\n- [Go JWT](https://github.com/golang-jwt/jwt)\n\n## Usage\n\nOnce the API is running, you can interact with it using tools like curl, Postman, or any HTTP client.\n\n### Example Requests\n\n- **Create an Event:**\n  ```sh\n  curl -X POST -H \"Authorization: Bearer \u003cyour-token\u003e\" -d '{\"name\": \"Event Name\", \"date\": \"2024-01-01\", \"location\": \"Event Location\"}' http://localhost:8080/events\n  ```\n\n- **Register for an Event:**\n ```sh\n  curl -X POST -H \"Authorization: Bearer \u003cyour-token\u003e\" http://localhost:8080/events/{id}/register\n  ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Framaraju-personal-org%2Fgo_events_resigration_restapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Framaraju-personal-org%2Fgo_events_resigration_restapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Framaraju-personal-org%2Fgo_events_resigration_restapi/lists"}