{"id":13337312,"url":"https://github.com/gompact/gofixtures","last_synced_at":"2026-01-12T02:38:06.489Z","repository":{"id":57632384,"uuid":"73334738","full_name":"gompact/gofixtures","owner":"gompact","description":"Golang lib/command line tool to load fixtures to databases, useful for testing","archived":false,"fork":false,"pushed_at":"2019-07-25T20:38:18.000Z","size":226,"stargazers_count":9,"open_issues_count":6,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-13T11:40:51.520Z","etag":null,"topics":["csv","database","fixture-loading","fixtures","go","golang","json","postgresql","test-automation","test-data","yaml"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gompact.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-11-10T01:04:34.000Z","updated_at":"2023-04-24T20:31:04.000Z","dependencies_parsed_at":"2022-08-31T13:12:27.479Z","dependency_job_id":null,"html_url":"https://github.com/gompact/gofixtures","commit_stats":null,"previous_names":["schehata/gofixtures"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gompact%2Fgofixtures","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gompact%2Fgofixtures/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gompact%2Fgofixtures/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gompact%2Fgofixtures/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gompact","download_url":"https://codeload.github.com/gompact/gofixtures/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242972701,"owners_count":20215238,"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":["csv","database","fixture-loading","fixtures","go","golang","json","postgresql","test-automation","test-data","yaml"],"created_at":"2024-07-29T19:13:43.517Z","updated_at":"2026-01-12T02:38:06.483Z","avatar_url":"https://github.com/gompact.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gofixtures\n\nversion: 3.0.0\n\n[![Build Status](https://travis-ci.org/schehata/gofixtures.svg)](https://travis-ci.org/schehata/gofixtures)\n\nA small command line tool written in Go lang, that loads fixtures\nand insert it's records to a database. Currently supports YAML and JSON files\nthrough CLI, and supports PostgreSQL only.\n\n#### Supported File Types\n\n- [X] JSON\n- [X] YAML\n- [X] CSV\n\n#### Supported Databases\n\n- [x] PostgreSQL\n- [ ] MySQL\n- [ ] SQLServer \n- [ ] MongoDB\n- [ ] Redis\n- [ ] Cassandra\n- [ ] Firebase\n\n#### Install\n\nThis will install gofixtures to your $GOPATH/bin\n\n```bash\n$ go get github.com/schehata/gofixtures/v3\n```\n\n#### Usage\n    \nTo start using gofixtures you need to have a configuration file, that includes information\non which db driver should it use, and what are the credentials\nIt could be written\nin YAML or JSON, here is an example for `.gofixtures.yaml` which will be automatically loaded\nby gofixtures:\n\n```go\nimport (\n    \"github.com/schehata/gofixutres/v3\"\n    \"github.com/schehata/gofixutres/v3/entity\"\n)\n\nfunc main() {\n    config := entity.Config {\n      entity.DBConfig{\n        Driver: \"postgres\"\n      }\n    }\n    gf, err := gofixutres.New(config)\n    if err != nil {\n      log.Fatal(err)\n    }\n    err = gf.LoadFromFiles(string[]{\"./fixtures/countries.yml\"})\n    if err != nil {\n      log.Fatal(err)\n    }\n}\n```\n\n\nexample of `./fixtures/countries.yml`:\n\n```yaml\ntable: countries\nrecords:\n  - name: Egypt\n  - capital: Cairo\n  - name: Germany\n    capital: Berlin\n  - name: Netherlands\n    capital: Amsterdam\n```\n\n3. the previous yaml file inserts three records into table `countries`\n4. gofixtures will parse each record and insert it into the database\n\n\n#### Notes on CSV Support\n\n- Column names are read from the first row\n- Filename will be used as a tablename\n- For now only comma ',' is allowed as a separator, will work on providing CLI flags to change that as needed\n\n## Usage from Command Line \n\nYou can use the gofixtures CLI tool to quickly load data into datastores from the command line, check the CLI docs.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgompact%2Fgofixtures","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgompact%2Fgofixtures","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgompact%2Fgofixtures/lists"}