{"id":34205391,"url":"https://github.com/realtemirov/repoimpl","last_synced_at":"2026-05-29T17:31:42.016Z","repository":{"id":148262607,"uuid":"619968345","full_name":"realtemirov/repoimpl","owner":"realtemirov","description":"Repositories, migrations and tests with model","archived":false,"fork":false,"pushed_at":"2023-04-14T12:03:07.000Z","size":28,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-18T23:33:38.407Z","etag":null,"topics":["go","golang","migration","migrations","repository","testing"],"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/realtemirov.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-03-27T19:14:16.000Z","updated_at":"2023-10-28T09:35:53.000Z","dependencies_parsed_at":"2023-04-06T11:30:25.706Z","dependency_job_id":null,"html_url":"https://github.com/realtemirov/repoimpl","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/realtemirov/repoimpl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/realtemirov%2Frepoimpl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/realtemirov%2Frepoimpl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/realtemirov%2Frepoimpl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/realtemirov%2Frepoimpl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/realtemirov","download_url":"https://codeload.github.com/realtemirov/repoimpl/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/realtemirov%2Frepoimpl/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33664259,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-29T02:00:06.066Z","response_time":107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["go","golang","migration","migrations","repository","testing"],"created_at":"2025-12-15T19:49:13.150Z","updated_at":"2026-05-29T17:31:42.012Z","avatar_url":"https://github.com/realtemirov.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# repoimpl\nRepositories, migrations and tests with model\n\n\nWe write the necessary model.\nThe function writes table queries, repositories and tests for each model in the migrations folder.\n\n## Install \n```\ngo get github.com/realtemirov/repoimpl\n```\n\n## Repository\n```\ntype User struct {\n    Username string\n    Password string\n}\n\nerr := repoimpl.NewRepository(User{})\nif err != nil {\n    panic(err)\n}\n```\nRepository implement CRUD to *postgres* database with sql package and creates **interface storage**\n\n```\ngo run main.go\n```\n├─ repository \\\n\u0026emsp;\u0026emsp;─ postgres \\\n\u0026emsp;\u0026emsp;\u0026emsp;─ user.go - CRUD methods \\\n\u0026emsp;\u0026emsp;─ storage.go - CRUD interfaces\n\n## Migrations\n```\ntype User struct {\n    Username string\n    Password string\n}\n\nerr := repoimpl.NewMigration(User{})\nif err != nil {\n    panic(err)\n}\n```\nCreates **migration_user.sql** in the **migrations** folder\n\n```\ngo run main.go\n```\n\n```\nCREATE TABLE IF NOT EXITS \"users\" (\n    \"username\" TEXT,\n    \"password\" TEXT\n);\n```\n\nIf **db** is written **tag** it will be written by tag\n\n```\ntype User struct {\n    Username string `db:\"user_name\"`\n    Password string `db:\"pass_word\"`\n}\n\nerr := repoImpl.NewDBTable(User{})\nif err != nil {\n    panic(err)\n}\n```\n**migration_user.sql**\n```\nCREATE TABLE IF NOT EXITS \"users\" (\n    \"user_name\" TEXT,\n    \"pass_word\" TEXT\n);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frealtemirov%2Frepoimpl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frealtemirov%2Frepoimpl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frealtemirov%2Frepoimpl/lists"}