Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gunavault/go-gin-postgres-template
GO GIN Postgres API template
https://github.com/gunavault/go-gin-postgres-template
api gin gin-gonic go golang postgresql template
Last synced: about 1 month ago
JSON representation
GO GIN Postgres API template
- Host: GitHub
- URL: https://github.com/gunavault/go-gin-postgres-template
- Owner: gunavault
- License: mit
- Created: 2024-11-14T15:28:24.000Z (about 1 month ago)
- Default Branch: main
- Last Pushed: 2024-11-16T04:44:40.000Z (about 1 month ago)
- Last Synced: 2024-11-16T05:20:16.759Z (about 1 month ago)
- Topics: api, gin, gin-gonic, go, golang, postgresql, template
- Language: Go
- Homepage:
- Size: 16.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
README
# GO GIN POSTGRES API Template [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/gunavault/Go-Gin-Postgres-template/blob/main/LICENSE)
This is a GO GIN POSTGRES API Template built with Go and the Gin framework. It allows user registration, login, and access to user information with JWT-based authentication. you can custom this API as you need. _I'll update this template little by little when I have a chance_.
## Features
- User registration with password hashing
- User login with JWT token generation
- JWT-based authentication middleware
- Testing API with get User## Setup
1. Clone the repository:
```bash
git clone https://github.com/yourusername/my-portfolio-api.git
cd my-portfolio-api
2. Install Dependency:
```bash
go mod tidy
3. Create a PostgreSQL database and Ensure the required uuid-ossp extension is enabled for UUID generation.
4. run the query from `query.sql`
5. run the code :
```bash
go run main.go## Endpoints
- POST`/login`
- POST`/register`
- GET`/users`
- GET`/user/username`
You can find more the endpoint at thunderclient collection `thunder-collection_Go Gin postgres API template.json`## License
[MIT licensed](./LICENSE).