{"id":16849907,"url":"https://github.com/rustyx/dsutil","last_synced_at":"2025-10-26T08:04:58.408Z","repository":{"id":54531927,"uuid":"258823368","full_name":"rustyx/dsutil","owner":"rustyx","description":"Google Cloud DataStore utilities: import, export, delete","archived":false,"fork":false,"pushed_at":"2025-09-09T12:22:24.000Z","size":5696,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-09T15:38:37.692Z","etag":null,"topics":["datastore","utilities"],"latest_commit_sha":null,"homepage":null,"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/rustyx.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":"2020-04-25T16:34:41.000Z","updated_at":"2025-09-09T12:22:21.000Z","dependencies_parsed_at":"2023-10-12T17:37:59.093Z","dependency_job_id":"a62da475-427b-4a88-b203-1e710b922579","html_url":"https://github.com/rustyx/dsutil","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/rustyx/dsutil","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rustyx%2Fdsutil","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rustyx%2Fdsutil/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rustyx%2Fdsutil/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rustyx%2Fdsutil/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rustyx","download_url":"https://codeload.github.com/rustyx/dsutil/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rustyx%2Fdsutil/sbom","scorecard":{"id":790849,"data":{"date":"2025-08-11","repo":{"name":"github.com/rustyx/dsutil","commit":"6e4ff270ff7139cfd23fdc96c9394229d2542779"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.8,"checks":[{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":9,"reason":"binaries present in source code","details":["Warn: binary detected: dsutil:1"],"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 0/21 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 10 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":9,"reason":"1 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GO-2025-3488 / GHSA-6v2p-p543-phr9"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-23T07:29:24.743Z","repository_id":54531927,"created_at":"2025-08-23T07:29:24.743Z","updated_at":"2025-08-23T07:29:24.743Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281074164,"owners_count":26439421,"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","status":"online","status_checked_at":"2025-10-26T02:00:06.575Z","response_time":61,"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":["datastore","utilities"],"created_at":"2024-10-13T13:17:53.909Z","updated_at":"2025-10-26T08:04:58.392Z","avatar_url":"https://github.com/rustyx.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"## dsutil - Google Cloud DataStore import/export utilities\n\n[![Build Status](https://app.travis-ci.com/rustyx/dsutil.svg?token=yyneiMmW2WmpN8XP4VXe\u0026branch=master)](https://app.travis-ci.com/rustyx/dsutil)\n\n### Installing\n\n```\ngo get github.com/rustyx/dsutil\n```\n\n### Command Line Usage\n\n```\ndsutil [options] command \u003cargs\u003e\n\n  command:\n    export \u003cfilename\u003e          - export records from DataStore\n    import \u003cfilename\u003e...       - import records into DataStore\n    delete                     - delete records from DataStore\n    set \u003cfield\u003e \u003ctype\u003e \u003cvalue\u003e - update records in DataStore (type is: string, int, double)\n    convert \u003cin\u003e \u003cout\u003e         - convert exported records from JSON to Go object notation\n  Note: \u003cfilename\u003e ending with \".gz\" will be automatically g(un)zipped\n\n  -project string\n    \tGoogle Cloud project name (deduced if not provided)\n  -kind string\n    \tDataStore table name (required for export)\n  -filter string\n    \tFilter field name (optional)\n  -from string\n    \tFilter \u003e= value (optional)\n  -to string\n    \tFilter \u003c value (optional)\n  -eq string\n    \tFilter = value (optional)\n```\n\n### API Usage\n\nIt is possible to read an export file and process each entity programmatically.\n\nThere are two interfaces: [`ImportFile`](https://pkg.go.dev/github.com/rustyx/dsutil/dsio#ImportFile), based on key-value pairs, and [`ImportFileReflect`](https://pkg.go.dev/github.com/rustyx/dsutil/dsio#ImportFileReflect), which is useful for ORM. Here's an example of how to load an export file into a PostgreSQL database using `go-pg` ORM API:\n\n```\ntype MyEntity struct {\n\tId          int    `datastore:\"-\"`\n\tSomeColumn  string `pg:\"type:varchar(40)\"`\n\tSomeColumn2 string `pg:\"type:varchar(40)\"`\n\t// . . .\n}\n\n\tinputFile := \"my-export.ds\"\n\tlog.Printf(\"Importing %v\", inputFile)\n\tinsertFunc := func(kind string, rows []interface{}) error {\n\t\tlog.Printf(\"Inserting %v %s(s)\", len(rows), kind)\n\t\t_, err := pgdb.Model(rows...).Insert()\n\t\treturn err\n\t}\n\tmodelMap := []dsio.ModelMapping{\n\t\t{Kind: \"MyEntity\", TypePtr: \u0026MyEntity{}, ImportFunc: insertFunc, BatchSize: 200},\n\t}\n\tif err := dsio.ImportFileReflect(inputFile, modelMap); err != nil {\n\t\tlog.Fatalf(\"import %v failed: %v\", inputFile, err)\n\t}\n```\n\nFor more documentation refer to [API Docs](https://pkg.go.dev/github.com/rustyx/dsutil/dsio).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frustyx%2Fdsutil","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frustyx%2Fdsutil","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frustyx%2Fdsutil/lists"}