{"id":27219966,"url":"https://github.com/ullaskunder3/go-plsql-crud","last_synced_at":"2026-04-25T12:36:37.290Z","repository":{"id":285604411,"uuid":"958034582","full_name":"ullaskunder3/go-plsql-crud","owner":"ullaskunder3","description":"Hi! 👋 I'm Ullas, a developer transitioning from frontend to Golang. I'm learning through a project-based approach with guidance from GPT, blogs, and YouTube. I'm currently building Go projects, including PostgreSQL CRUD apps, to strengthen my skills.","archived":false,"fork":false,"pushed_at":"2025-04-01T16:53:20.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-10T06:54:09.596Z","etag":null,"topics":["basic","crud","documentation","golang","learning","postgresql"],"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/ullaskunder3.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2025-03-31T14:35:07.000Z","updated_at":"2025-04-01T16:56:15.000Z","dependencies_parsed_at":"2025-04-01T17:50:21.870Z","dependency_job_id":"a87a2406-61c3-464f-a623-331a5e70099b","html_url":"https://github.com/ullaskunder3/go-plsql-crud","commit_stats":null,"previous_names":["ullaskunder3/go-plsql-crud"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ullaskunder3/go-plsql-crud","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ullaskunder3%2Fgo-plsql-crud","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ullaskunder3%2Fgo-plsql-crud/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ullaskunder3%2Fgo-plsql-crud/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ullaskunder3%2Fgo-plsql-crud/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ullaskunder3","download_url":"https://codeload.github.com/ullaskunder3/go-plsql-crud/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ullaskunder3%2Fgo-plsql-crud/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32262801,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-25T09:15:33.318Z","status":"ssl_error","status_checked_at":"2026-04-25T09:15:31.997Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["basic","crud","documentation","golang","learning","postgresql"],"created_at":"2025-04-10T06:50:10.846Z","updated_at":"2026-04-25T12:36:37.273Z","avatar_url":"https://github.com/ullaskunder3.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Go + PostgreSQL CRUD\n\n## 🚀 Project Overview\nThis project is a simple CRUD (Create, Read, Update, Delete) application built using **Go** with **PostgreSQL** as the database. We are using **GORM** as the ORM (Object Relational Mapper) to handle database interactions.\n\n## 📌 Journey So Far\n### ✅ **1. Setting Up PostgreSQL**\n- Installed and configured PostgreSQL on Fedora.\n- Initialized the database and set up authentication.\n- Resolved authentication errors by modifying `pg_hba.conf`.\n\n### ✅ **2. Connecting Go with PostgreSQL using GORM**\n- Created a `.env` file to store database credentials securely.\n- Configured a Go application to connect with PostgreSQL.\n- Successfully established a connection using GORM.\n\n### ✅ **3. Implemented CRUD Operations**\n- Implemented Create, Read, Update, and Delete operations using GORM.\n- Tested the operations with both the database and Go models.\n\n### ✅ **4. Built API Endpoints**\n- Set up Gin for RESTful API routing.\n- Implemented routes for creating, fetching, updating, and deleting users.\n- Tested the API using cURL and Postman.\n\n---\n\n## 📝 Next Steps\n- Add authentication middleware (JWT or basic authentication).\n- Introduce input validation in service layer.\n- Refactor for better separation of concerns (e.g., services for business logic).\n- Containerize the app using Docker.\n\n---\n\n## ⚙️ Tech Stack\n- **Go** (Golang)\n- **PostgreSQL**\n- **GORM** ORM\n- **Gin** (Web Framework for API)\n- **cURL** (API Testing)\n- **Docker** (Planned for later)\n\n---\n\n## 📜 How to Run\n\n1. **Clone the Repository**  \n```bash\ngit clone https://github.com/YOUR_USERNAME/go-postgres-crud.git\ncd go-postgres-crud\n```\n\n2. **Set Up Environment Variables**  \nCreate a `.env` file based on the example template:\n```bash\ncp .env.example .env\n```\nThen, edit the `.env` file with your PostgreSQL credentials.\n\n3. **Run the Application**  \nTo start the Go application and the Gin server:\n```bash\ngo run cmd/main.go\n```\nThe server will start running on `http://localhost:8080`.\n\n---\n\n## 💡 Notes\n- Ensure **PostgreSQL** is running before starting the application.\n- Use `psql` to manually inspect the database if needed.\n- The app is currently configured to run with no authentication. Plan to add JWT authentication for production use.\n\n---\n\n## 🌍 Testing the API (cURL examples)\n\n### **Create a User**\n```bash\ncurl -X POST \"http://localhost:8080/users\" \\\n     -H \"Content-Type: application/json\" \\\n     -d '{\"name\": \"Alice\", \"email\": \"alice@example.com\"}'\n```\nResponse:\n```json\n{\n    \"ID\": 1,\n    \"CreatedAt\": \"2025-04-01T22:12:30.303790226+05:30\",\n    \"UpdatedAt\": \"2025-04-01T22:12:30.303790226+05:30\",\n    \"DeletedAt\": null,\n    \"Name\": \"Alice\",\n    \"Email\": \"alice@example.com\"\n}\n```\n\n### **Get All Users**\n```bash\ncurl -X GET \"http://localhost:8080/users\"\n```\nResponse:\n```json\n[\n    {\n        \"ID\": 1,\n        \"Name\": \"Alice\",\n        \"Email\": \"alice@example.com\"\n    }\n]\n```\n\n### **Get a User by ID**\n```bash\ncurl -X GET \"http://localhost:8080/users/1\"\n```\nResponse:\n```json\n{\n    \"ID\": 1,\n    \"Name\": \"Alice\",\n    \"Email\": \"alice@example.com\"\n}\n```\n\n### **Update a User**\n```bash\ncurl -X PUT \"http://localhost:8080/users/1\" \\\n     -H \"Content-Type: application/json\" \\\n     -d '{\"name\": \"Alice Updated\", \"email\": \"alice_updated@example.com\"}'\n```\nResponse:\n```json\n{\n    \"ID\": 1,\n    \"Name\": \"Alice Updated\",\n    \"Email\": \"alice_updated@example.com\"\n}\n```\n\n### **Delete a User**\n```bash\ncurl -X DELETE \"http://localhost:8080/users/1\"\n```\nResponse:\n```json\n{\n    \"message\": \"User deleted successfully\"\n}\n```\n\n---\n\nStay tuned for more updates! 🚀","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fullaskunder3%2Fgo-plsql-crud","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fullaskunder3%2Fgo-plsql-crud","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fullaskunder3%2Fgo-plsql-crud/lists"}