{"id":20766866,"url":"https://github.com/rezapace/go-employe","last_synced_at":"2025-07-06T16:05:54.672Z","repository":{"id":242298576,"uuid":"809197196","full_name":"rezapace/go-employe","owner":"rezapace","description":"This project is an advanced Employee CRUD (Create, Read, Update, Delete) API designed using Go as the primary programming language, leveraging the Gorilla Mux router for handling HTTP requests, and MySQL for database management. It provides a robust backend solution for managing employee data efficiently.","archived":false,"fork":false,"pushed_at":"2024-06-02T02:11:29.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-11T18:56:12.253Z","etag":null,"topics":["basic","crud","crud-application","employee-management","go","golang"],"latest_commit_sha":null,"homepage":"https://devreza.my.id/","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/rezapace.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":"2024-06-02T01:41:52.000Z","updated_at":"2024-06-02T02:12:30.000Z","dependencies_parsed_at":null,"dependency_job_id":"dd90bbe3-f0f8-43a7-8d2d-e5dae957a456","html_url":"https://github.com/rezapace/go-employe","commit_stats":null,"previous_names":["rezapace/go-employe"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rezapace/go-employe","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rezapace%2Fgo-employe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rezapace%2Fgo-employe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rezapace%2Fgo-employe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rezapace%2Fgo-employe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rezapace","download_url":"https://codeload.github.com/rezapace/go-employe/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rezapace%2Fgo-employe/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263932022,"owners_count":23531708,"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":["basic","crud","crud-application","employee-management","go","golang"],"created_at":"2024-11-17T11:26:30.434Z","updated_at":"2025-07-06T16:05:54.651Z","avatar_url":"https://github.com/rezapace.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Employee CRUD API\n\nThis project is an advanced Employee CRUD (Create, Read, Update, Delete) API designed using Go as the primary programming language, leveraging the Gorilla Mux router for handling HTTP requests, and MySQL for database management. It provides a robust backend solution for managing employee data efficiently.\n\n## Project Structure\n\n```\nemploye/\n├── main.go\n├── go.mod\n├── go.sum\n├── controllers/\n│   └── employee.go\n├── models/\n│   └── employee.go\n├── config/\n│   └── db.go\n├── router/\n│   └── router.go\n└── migrations/\n    └── 000001_create_tables.up.sql\n    └── 000001_create_tables.down.sql\n```\n\n## Prerequisites\n\n- Go 1.21.3\n- MySQL\n- [Golang Migrate](https://github.com/golang-migrate/migrate)\n\n## Setup\n\n1. **Clone the repository:**\n    ```sh\n    git clone \u003crepository-url\u003e\n    cd employe\n    ```\n\n2. **Install dependencies:**\n    ```sh\n    go mod tidy\n    ```\n\n3. **Set up the database:**\n    - Create a MySQL database named `goblog`.\n    - Update the `.env` file with your database credentials.\n\n4. **Run migrations:**\n    ```sh\n    go run main.go\n    ```\n\nTo run the migrations for setting up your database, execute the following command in your terminal:\n\n```sh\nmigrate -database \"mysql://root:pass@localhost:3306/employe\" -path migrations up\n```\n\n\n## Running the API\n\nStart the server:\n```sh\ngo run main.go\n```\n\nThe API will be available at `http://localhost:8080`.\n\n## API Endpoints\n\n- **Create Employee**\n    ```http\n    POST /employee\n    Content-Type: application/json\n    Body: { \"name\": \"John Doe\", \"city\": \"New York\" }\n    ```\n\n- **Get Employee**\n    ```http\n    GET /employee/{id}\n    ```\n\n- **Update Employee**\n    ```http\n    PUT /employee/{id}\n    Content-Type: application/json\n    Body: { \"name\": \"Jane Doe\", \"city\": \"Los Angeles\" }\n    ```\n\n- **Delete Employee**\n    ```http\n    DELETE /employee/{id}\n    ```\n\n## Postman Collection\n\nImport the `postman_collection.json` file into Postman to test the API endpoints.\n\n## License\n\nThis project is licensed under the MIT License.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frezapace%2Fgo-employe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frezapace%2Fgo-employe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frezapace%2Fgo-employe/lists"}