{"id":15154265,"url":"https://github.com/muthukumar89uk/go-with-mongodb","last_synced_at":"2026-01-20T03:34:29.306Z","repository":{"id":250303873,"uuid":"834071383","full_name":"muthukumar89uk/go-with-mongodb","owner":"muthukumar89uk","description":"This is a simple CRUD operation with golang and mongodb.","archived":false,"fork":false,"pushed_at":"2024-08-01T08:29:16.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-13T14:37:09.553Z","etag":null,"topics":["fiber-framework","go","golang","mongodb-database","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/muthukumar89uk.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-07-26T11:00:54.000Z","updated_at":"2024-08-01T09:39:44.000Z","dependencies_parsed_at":"2024-07-31T19:14:09.558Z","dependency_job_id":"8a55dac3-2929-4eab-9254-860e276d2efc","html_url":"https://github.com/muthukumar89uk/go-with-mongodb","commit_stats":null,"previous_names":["muthukumar89uk/go-with-mongodb"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/muthukumar89uk%2Fgo-with-mongodb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/muthukumar89uk%2Fgo-with-mongodb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/muthukumar89uk%2Fgo-with-mongodb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/muthukumar89uk%2Fgo-with-mongodb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/muthukumar89uk","download_url":"https://codeload.github.com/muthukumar89uk/go-with-mongodb/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247648928,"owners_count":20972942,"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":["fiber-framework","go","golang","mongodb-database","rest-api"],"created_at":"2024-09-26T17:20:33.407Z","updated_at":"2026-01-20T03:34:29.265Z","avatar_url":"https://github.com/muthukumar89uk.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Go MongoDB CRUD Example\n\nThis repository demonstrates how to set up a Go project to perform CRUD (Create, Read, Update, Delete) operations using MongoDB.\n\n## Features\n\n- MongoDB connection and operations in Go.\n- CRUD operations.\n\n## Requirements\n\n- Go 1.15 or higher\n- MongoDB\n- Fiber Go Web Framework\n\n## Getting Started\n\n### Installation\n\n1. **Clone the repository:**\n\n    ```sh\n    git clone https://github.com/muthukumar89uk/go-with-mongodb.git\n    ```\n Click here to directly [download it](https://github.com/muthukumar89uk/go-with-mongodb/zipball/master).\n\n2. **Install Go dependencies:**\n\n    ```sh\n    go mod tidy\n    ```\n\n### Setup MongoDB\n\n1. **Locally:**\n\n    Install MongoDB from the [official MongoDB website](https://www.mongodb.com/try/download/community).\n\n### Go Application\n\n1. **Create the `Employee` struct:**\n\n    Create a `models` directory and an `models.go` file with the following content:\n\n    ```go\n    type Employee struct {\n\t    Id   string `json:\"id,omitempty\"       bson:\"_id,omitempty\"`\n\t    Name string `json:\"name,omitempty\"     bson:\"name,omitempty\"`\n\t    Age  int    `json:\"age,omitempty\"      bson:\"age,omitempty\"`\n    }\n    ```\n\n### Run the Application\n\n1. **Run the Go application:**\n\n    ```sh\n    go run .\n    ```\n\n2. **API Endpoints:**\n\n    - Create an employee: `POST /create`\n    - Get an employee by ID: `GET /getemployee`\n    - Update an employee by ID: `PUT /update-employees/:id`\n    - Delete an employee by ID: `DELETE /delete-employees/:id`\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmuthukumar89uk%2Fgo-with-mongodb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmuthukumar89uk%2Fgo-with-mongodb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmuthukumar89uk%2Fgo-with-mongodb/lists"}