{"id":15067734,"url":"https://github.com/ajnasz/objectid","last_synced_at":"2026-01-02T18:04:47.426Z","repository":{"id":174614020,"uuid":"652486734","full_name":"Ajnasz/objectid","owner":"Ajnasz","description":"Go library to generate MongoDB objectid","archived":false,"fork":false,"pushed_at":"2024-04-23T12:44:36.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-04-29T21:15:19.797Z","etag":null,"topics":["go","go-package","mongodb","mongodb-objectid","objectid","package"],"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/Ajnasz.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-06-12T07:09:00.000Z","updated_at":"2024-06-18T06:46:23.064Z","dependencies_parsed_at":"2024-06-18T06:46:22.214Z","dependency_job_id":"50026458-5c96-4d71-a39a-34b75514e885","html_url":"https://github.com/Ajnasz/objectid","commit_stats":null,"previous_names":["ajnasz/objectid"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ajnasz%2Fobjectid","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ajnasz%2Fobjectid/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ajnasz%2Fobjectid/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ajnasz%2Fobjectid/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ajnasz","download_url":"https://codeload.github.com/Ajnasz/objectid/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243830912,"owners_count":20354850,"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":["go","go-package","mongodb","mongodb-objectid","objectid","package"],"created_at":"2024-09-25T01:26:50.535Z","updated_at":"2026-01-02T18:04:47.358Z","avatar_url":"https://github.com/Ajnasz.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ObjectID\n\nLibrary to generate MongoDB objectID's\n\n[![Go Report Card](https://goreportcard.com/badge/github.com/Ajnasz/objectid?style=flat-square)](https://goreportcard.com/report/github.com/Ajnasz/objectid)\n[![PkgGoDev](https://pkg.go.dev/badge/mod/github.com/Ajnasz/objectid)](https://pkg.go.dev/mod/github.com/Ajnasz/objectid)\n\n## Command usage\n\n```\n$ objectid -h\nUsage of objectid:\n  -format string\n        format of objectid: hex, base64 (default \"hex\")\n  -from-time string\n        create a new objectid from a date time (RFC3339, $(date -I), $(date -Ihours), $(date -d -Iminutes), $(date -Iseconds)\n  -n int\n        number of objectid to generate (default 1)\n  -separator string\n        separator between objectids (default \"\\n\")\n  -to-time string\n        convert objectid to time\n```\n\n### Generate object id\n\n```sh\n$ objectid\n6435f4800000000000000000\n```\n\n### Generate object id in base64\n\n```sh\n$ objectid -format base64\nZiesvNpsbBz8QUGk\n```\n\n### Generate multiple object id\n\n```sh\n$ objectid -n 3\n6435f4800000000000000000\n6435f4800000000000000001\n6435f4800000000000000002\n```\n\n\n### Object id from time\n\n```sh\n$ objectid -from-time 2023-04-12\n6435f4800000000000000000%\n```\n\n### Object id to time\n\n```sh\n$ objectid -to-time 6435f4800000000000000000\n2023-04-12 00:00:00 +0000 UTC\n```\n\n## Library Usage\n\n\n```sh\ngo get -u github.com/Ajnasz/objectid\n```\n\n```go\nimport \"github.com/Ajnasz/objectid\"\n\n\nfunc main() {\n    oid := objectid.New()\n    fmt.Printf(\"%s\", oid)\n}\n```\n\n## CLI\n\n### Install the cli tool\n\n```sh\ngo install github.com/Ajnasz/objectid/cmd/objectid\n```\n\nor\n\n```sh\nmake build\nbin/objectid\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fajnasz%2Fobjectid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fajnasz%2Fobjectid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fajnasz%2Fobjectid/lists"}