{"id":39748627,"url":"https://github.com/mongorpc/mongorpc-go","last_synced_at":"2026-01-18T11:23:32.429Z","repository":{"id":332643588,"uuid":"422080775","full_name":"mongorpc/mongorpc-go","owner":"mongorpc","description":"mongorpc client for golang","archived":false,"fork":false,"pushed_at":"2026-01-05T13:09:13.000Z","size":189,"stargazers_count":1,"open_issues_count":4,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-14T23:39:16.031Z","etag":null,"topics":["client","golang","grpc","mongodb","mongorpc","mongorpc-client"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mongorpc.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-10-28T05:50:20.000Z","updated_at":"2026-01-05T13:09:17.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/mongorpc/mongorpc-go","commit_stats":null,"previous_names":["mongorpc/mongorpc-go"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/mongorpc/mongorpc-go","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mongorpc%2Fmongorpc-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mongorpc%2Fmongorpc-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mongorpc%2Fmongorpc-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mongorpc%2Fmongorpc-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mongorpc","download_url":"https://codeload.github.com/mongorpc/mongorpc-go/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mongorpc%2Fmongorpc-go/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28535163,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T10:13:46.436Z","status":"ssl_error","status_checked_at":"2026-01-18T10:13:11.045Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["client","golang","grpc","mongodb","mongorpc","mongorpc-client"],"created_at":"2026-01-18T11:23:32.350Z","updated_at":"2026-01-18T11:23:32.412Z","avatar_url":"https://github.com/mongorpc.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mongorpc-go\n\nGo client for MongoRPC - a gRPC proxy for MongoDB.\n\n## Installation\n\n```bash\ngo get github.com/mongorpc/mongorpc-go/mongorpc\n```\n\n## Quick Start\n\n```go\npackage main\n\nimport (\n    \"context\"\n    \"log\"\n    \n    \"github.com/mongorpc/mongorpc-go/mongorpc\"\n)\n\nfunc main() {\n    // Connect\n    client, err := mongorpc.NewClient(\"localhost:50051\",\n        mongorpc.WithAPIKey(\"your-api-key\"),\n    )\n    if err != nil {\n        log.Fatal(err)\n    }\n    defer client.Close()\n\n    ctx := context.Background()\n    users := client.Database(\"mydb\").Collection(\"users\")\n\n    // Insert\n    result, err := users.InsertOne(ctx, mongorpc.Document{\n        \"name\": \"Alice\",\n        \"age\":  30,\n    })\n\n    // Find by ID\n    doc, err := users.FindByID(ctx, result.InsertedID)\n\n    // Query builder\n    docs, err := users.Query().\n        Where(\"active\", true).\n        Gte(\"age\", 21).\n        SortDesc(\"createdAt\").\n        Limit(10).\n        All(ctx)\n\n    // Update\n    _, err = users.UpdateByID(ctx, result.InsertedID, mongorpc.Update{\n        \"$set\": mongorpc.Document{\"verified\": true},\n    })\n\n    // Delete\n    _, err = users.DeleteByID(ctx, result.InsertedID)\n}\n```\n\n## API\n\n### Client\n\n```go\nclient, err := mongorpc.NewClient(address,\n    mongorpc.WithAPIKey(key),\n    mongorpc.WithToken(jwt),\n    mongorpc.WithTimeout(10*time.Second),\n)\n```\n\n### Collection Methods\n\n| Method | Description |\n|--------|-------------|\n| `FindByID(ctx, id)` | Find by ID |\n| `FindOne(ctx, filter)` | Find single document |\n| `Find(ctx, filter, opts)` | Find documents |\n| `InsertOne(ctx, doc)` | Insert document |\n| `InsertMany(ctx, docs)` | Insert multiple |\n| `UpdateByID(ctx, id, update)` | Update by ID |\n| `UpdateOne/Many(ctx, filter, update)` | Update |\n| `DeleteByID(ctx, id)` | Delete by ID |\n| `DeleteOne/Many(ctx, filter)` | Delete |\n| `CountDocuments(ctx, filter)` | Count |\n| `Aggregate(ctx, pipeline)` | Aggregation |\n| `Query()` | Fluent query builder |\n\n### Query Builder\n\n```go\nusers.Query().\n    Where(\"field\", value).\n    Eq(\"field\", value).\n    Gt(\"field\", value).\n    In(\"field\", values...).\n    Regex(\"field\", \"pattern\").\n    Select(\"field1\", \"field2\").\n    SortAsc(\"field\").\n    SortDesc(\"field\").\n    Limit(10).\n    Skip(20).\n    All(ctx)\n```\n\n## License\n\nApache-2.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmongorpc%2Fmongorpc-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmongorpc%2Fmongorpc-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmongorpc%2Fmongorpc-go/lists"}