{"id":24108179,"url":"https://github.com/rlshukhov/storage","last_synced_at":"2026-04-28T16:38:53.224Z","repository":{"id":271674638,"uuid":"914179425","full_name":"rlshukhov/storage","owner":"rlshukhov","description":"Golang storage providers","archived":false,"fork":false,"pushed_at":"2025-02-22T16:07:50.000Z","size":26,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-01T00:29:37.172Z","etag":null,"topics":["badger","go","golang","json","storage","yaml"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rlshukhov.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}},"created_at":"2025-01-09T05:10:11.000Z","updated_at":"2025-02-22T16:07:54.000Z","dependencies_parsed_at":null,"dependency_job_id":"45373c86-cf49-416f-b467-8440c83371a2","html_url":"https://github.com/rlshukhov/storage","commit_stats":null,"previous_names":["rlshukhov/storage"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/rlshukhov/storage","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rlshukhov%2Fstorage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rlshukhov%2Fstorage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rlshukhov%2Fstorage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rlshukhov%2Fstorage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rlshukhov","download_url":"https://codeload.github.com/rlshukhov/storage/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rlshukhov%2Fstorage/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32390053,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-28T14:34:11.604Z","status":"ssl_error","status_checked_at":"2026-04-28T14:32:37.009Z","response_time":56,"last_error":"SSL_read: 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":["badger","go","golang","json","storage","yaml"],"created_at":"2025-01-10T23:26:12.717Z","updated_at":"2026-04-28T16:38:53.207Z","avatar_url":"https://github.com/rlshukhov.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Tests](https://github.com/rlshukhov/storage/actions/workflows/tests.yml/badge.svg)](https://github.com/rlshukhov/storage/actions/workflows/tests.yml)\n\n# Storage\nGolang storage providers\n\n## Install \n\n```shell\ngo get github.com/rlshukhov/storage\n```\n\n## Example\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"github.com/rlshukhov/nullable\"\n\t\"github.com/rlshukhov/storage\"\n\t\"github.com/rlshukhov/storage/file\"\n)\n\ntype User struct {\n\tID   uint64 `yaml:\"id\"`\n\tName string `yaml:\"name\"`\n}\n\nfunc main() {\n\tdb, err := storage.GetKeyValueProviderFromConfig[uint64, User](storage.KeyValueConfig{\n\t\tFile: nullable.FromValue(file.Config{\n\t\t\tPath: \"./users.yaml\",\n\t\t}),\n\t})\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\terr = db.Setup()\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer func() {\n\t\terr := db.Shutdown()\n\t\tif err != nil {\n\t\t\tpanic(err)\n\t\t}\n\t}()\n\n\tusers := []User{\n\t\t{ID: 0, Name: \"John\"},\n\t\t{ID: 1, Name: \"Paul\"},\n\t}\n\tfor _, user := range users {\n\t\terr := db.Store(user.ID, user)\n\t\tif err != nil {\n\t\t\tpanic(err)\n\t\t}\n\t}\n\n\tfmt.Println(db.Get(1))\n}\n```\n\n```shell\nrlshukhov@MacBook-Pro-Lane main % go run main.go\n{1 Paul} \u003cnil\u003e\nrlshukhov@MacBook-Pro-Lane main % cat users.yaml\ndata:\n    0:\n        id: 0\n        name: John\n    1:\n        id: 1\n        name: Paul\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frlshukhov%2Fstorage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frlshukhov%2Fstorage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frlshukhov%2Fstorage/lists"}