{"id":37166273,"url":"https://github.com/night-codes/gorm-paginator","last_synced_at":"2026-01-14T19:42:09.473Z","repository":{"id":57548735,"uuid":"304945230","full_name":"night-codes/gorm-paginator","owner":"night-codes","description":"gorm v2 pagination extension","archived":false,"fork":true,"pushed_at":"2020-10-17T18:42:51.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-06-20T01:42:00.220Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"xerardoo/gorm-paginator","license":"mit","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":"2020-10-17T18:38:03.000Z","updated_at":"2020-10-17T18:38:05.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/night-codes/gorm-paginator","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/night-codes/gorm-paginator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/night-codes%2Fgorm-paginator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/night-codes%2Fgorm-paginator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/night-codes%2Fgorm-paginator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/night-codes%2Fgorm-paginator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/night-codes","download_url":"https://codeload.github.com/night-codes/gorm-paginator/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/night-codes%2Fgorm-paginator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28432680,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T18:57:19.464Z","status":"ssl_error","status_checked_at":"2026-01-14T18:52:48.501Z","response_time":107,"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":[],"created_at":"2026-01-14T19:42:08.867Z","updated_at":"2026-01-14T19:42:09.460Z","avatar_url":"https://github.com/night-codes.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# gorm-paginator for GORM v2\n\n## Usage\n\n```bash\ngo get github.com/xerardoo/gorm-paginator/pagination\n```\n\n```go\ntype User struct {\n\tID       int\n\tUserName string `gorm:\"not null;size:100;unique\"`\n}\n\nvar users []User\ndb = db.Where(\"id \u003e ?\", 0)\n\npagination.Pagging(\u0026pagination.Param{\n    DB:      db,\n    Page:    1,\n    Limit:   3,\n    OrderBy: []string{\"id desc\"},\n}, \u0026users)\n```\n\n## With Gin\n\n```go\nr := gin.Default()\nr.GET(\"/\", func(c *gin.Context) {\n    page, _ := strconv.Atoi(c.DefaultQuery(\"page\", \"1\"))\n    limit, _ := strconv.Atoi(c.DefaultQuery(\"limit\", \"3\"))\n    var users []User\n\n    paginator := pagination.Pagging(\u0026pagination.Param{\n        DB:      db,\n        Page:    page,\n        Limit:   limit,\n        OrderBy: []string{\"id desc\"},\n        ShowSQL: true,\n    }, \u0026users)\n    c.JSON(200, paginator)\n})\n```\n\n## License\n\n[MIT](LICENSE)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnight-codes%2Fgorm-paginator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnight-codes%2Fgorm-paginator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnight-codes%2Fgorm-paginator/lists"}