{"id":18768134,"url":"https://github.com/solomonbaez/go-restful-notes","last_synced_at":"2026-04-16T18:08:41.425Z","repository":{"id":194245383,"uuid":"690413060","full_name":"solomonbaez/Go-Restful-Notes","owner":"solomonbaez","description":"Simple notes API built in Go!","archived":false,"fork":false,"pushed_at":"2023-10-10T01:35:24.000Z","size":55,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-19T14:13:00.895Z","etag":null,"topics":["gin","golang","mysql","rest-api"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/solomonbaez.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-09-12T06:38:11.000Z","updated_at":"2023-11-08T21:18:13.000Z","dependencies_parsed_at":"2023-09-12T14:30:16.467Z","dependency_job_id":null,"html_url":"https://github.com/solomonbaez/Go-Restful-Notes","commit_stats":null,"previous_names":["solomonbaez/sb-go-napi","solomonbaez/go-restful-notes"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solomonbaez%2FGo-Restful-Notes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solomonbaez%2FGo-Restful-Notes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solomonbaez%2FGo-Restful-Notes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solomonbaez%2FGo-Restful-Notes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/solomonbaez","download_url":"https://codeload.github.com/solomonbaez/Go-Restful-Notes/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239671416,"owners_count":19677873,"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":["gin","golang","mysql","rest-api"],"created_at":"2024-11-07T19:11:00.376Z","updated_at":"2026-04-16T18:08:41.376Z","avatar_url":"https://github.com/solomonbaez.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Go Notes API\n\nThis is a simple RESTful API for managing notes built with Go and the Gin framework.\n\n## Table of Contents\n\n- [Features](#features)\n- [Prerequisites](#prerequisites)\n- [Getting Started](#getting-started)\n- [API Endpoints](#api-endpoints)\n- [Usage Examples](#usage-examples)\n- [TODO](#todo)\n- [Contributing](#contributing)\n- [License](#license)\n\n## Features\n\n- Create, read, update, and delete (CRUD) notes.\n- Rate limiting for API requests.\n- Validation for note inputs.\n- Cross-Origin Resource Sharing (CORS) support.\n\n## Prerequisites\n\nBefore you begin, ensure you have met the following requirements:\n\n- Go (v1.16 or higher) installed on your machine.\n- MySQL database server running locally or at the specified host.\n\n## Getting Started\n\nTo get started with this project, follow these steps:\n\n1. Clone this repository to your local machine:\n\n   ```bash\n   git clone https://github.com/solomonbaez/SB-Go-NAPI\n   ```\n\n2. Change into the project directory:\n\n   ```bash\n   cd SB-Go-NAPI\n   ```\n\n3. Install project dependencies:\n\n   ```bash\n   go mod tidy\n   ```\n\n4. Set up your MySQL database and update the database connection configuration in the `api/config/cfg.go` file:\n\n   ```go\n   const (\n       DBUSER     = \"your-username\"\n       DBPASSWORD = \"your-password\"\n       DBNET      = \"tcp\"\n       DBHOST     = \"127.0.0.1:3306\"\n       DBPORT     = \"3306\"\n       DBNAME     = \"your-db-name\"\n       DBLIMIT    = 1 // rate limit - default: 1 request / second\n   )\n   ```\n\n5. Build and run the API:\n\n   ```bash\n   go run main.go\n   ```\n\n6. Your API should now be running at `http://localhost:8000`.\n\n## API Endpoints\n\nThe following API endpoints are available:\n\n- `POST /notes` - Create a new note.\n- `GET /notes` - Retrieve a list of all notes.\n- `GET /notes/:id` - Retrieve a specific note by ID.\n- `PUT /notes/:id` - Update a specific note by ID.\n- `DELETE /notes/:id` - Delete a specific note by ID.\n\n## Usage Examples\n\nHere are some example requests using `curl` to interact with the API:\n\n- Create a new note:\n\n  ```bash\n  curl -X POST -H \"Content-Type: application/json\" -d '{\"title\": \"New Note\", \"content\": \"This is a new note.\"}' http://localhost:8000/notes\n  ```\n\n- Retrieve all notes:\n\n  ```bash\n  curl http://localhost:8000/notes\n  ```\n\n- Retrieve a specific note by ID:\n\n  ```bash\n  curl http://localhost:8000/notes/1\n  ```\n\n- Update a note by ID:\n\n  ```bash\n  curl -X PUT -H \"Content-Type: application/json\" -d '{\"title\": \"Updated Note\", \"content\": \"This note has been updated.\"}' http://localhost:8000/notes/1\n  ```\n\n- Delete a note by ID:\n\n  ```bash\n  curl -X DELETE http://localhost:8000/notes/1\n  ```\n## TODO\n- Create test suite (tests/fuzz).\n\n## Contributing\n\nContributions are welcome! If you'd like to contribute to this project, please follow these steps:\n\n1. Fork the repository on GitHub.\n2. Clone your forked repository to your local machine.\n3. Create a new branch for your feature or bug fix.\n4. Make your changes and commit them.\n5. Push your changes to your fork on GitHub.\n6. Open a pull request to the main repository.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolomonbaez%2Fgo-restful-notes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsolomonbaez%2Fgo-restful-notes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolomonbaez%2Fgo-restful-notes/lists"}