{"id":21502371,"url":"https://github.com/night-codes/mgo-ai","last_synced_at":"2025-07-15T22:32:43.052Z","repository":{"id":57481211,"uuid":"52284054","full_name":"night-codes/mgo-ai","owner":"night-codes","description":"Auto-increment methods for mgo(golang) ","archived":false,"fork":false,"pushed_at":"2019-09-29T12:04:02.000Z","size":4,"stargazers_count":19,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-06-20T11:05:23.981Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"wtfpl","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/night-codes.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}},"created_at":"2016-02-22T15:40:53.000Z","updated_at":"2024-04-26T16:58:41.000Z","dependencies_parsed_at":"2022-09-26T17:50:43.086Z","dependency_job_id":null,"html_url":"https://github.com/night-codes/mgo-ai","commit_stats":null,"previous_names":["mirrr/mgo-ai"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/night-codes%2Fmgo-ai","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/night-codes%2Fmgo-ai/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/night-codes%2Fmgo-ai/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/night-codes%2Fmgo-ai/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/night-codes","download_url":"https://codeload.github.com/night-codes/mgo-ai/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226077479,"owners_count":17570164,"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":[],"created_at":"2024-11-23T18:14:42.376Z","updated_at":"2024-11-23T18:14:42.978Z","avatar_url":"https://github.com/night-codes.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mgo-autoincrement (ai)\nPackage **ai** implements AutoIncrement methods for mgo(golang) \n\n## How To Install\n\n```\ngo get github.com/night-codes/mgo-ai\n```\n\n## Getting Started\n\n```go\npackage main\n\nimport (\n    \"github.com/night-codes/mgo-ai\"\n    \"gopkg.in/mgo.v2\"\n    \"gopkg.in/mgo.v2/bson\"\n)\n\nfunc main() {\n    session, err := mgo.Dial(\"localhost\")\n    if err != nil {\n        panic(err)\n    }\n\n    // connect AutoIncrement to collection \"counters\"\n    ai.Connect(session.DB(\"example-db\").C(\"counters\"))\n\n    // ...\n\n    // use AutoIncrement\n    session.DB(\"example-db\").C(\"users\").Insert(bson.M{\n        \"_id\":   ai.Next(\"users\"),\n        \"login\": \"test\",\n        \"age\":   32,\n    })\n}\n\n```\n\n## License\nDO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE\nVersion 2, December 2004\n\nCopyright (C) 2016 Oleksiy Chechel \u003calex.mirrr@gmail.com\u003e\n\nEveryone is permitted to copy and distribute verbatim or modified\ncopies of this license document, and changing it is allowed as long\nas the name is changed.\n\nDO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE\nTERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION\n\n 0. You just DO WHAT THE FUCK YOU WANT TO.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnight-codes%2Fmgo-ai","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnight-codes%2Fmgo-ai","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnight-codes%2Fmgo-ai/lists"}