{"id":17239332,"url":"https://github.com/rehacktive/kvod","last_synced_at":"2025-03-26T02:36:57.590Z","repository":{"id":57496446,"uuid":"157757860","full_name":"rehacktive/kvod","owner":"rehacktive","description":"KVoD [Key/Value on Disk], a simple, encrypted key/value storage for Go","archived":false,"fork":false,"pushed_at":"2022-04-19T18:38:31.000Z","size":16,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-30T23:44:19.662Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rehacktive.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":"2018-11-15T18:53:40.000Z","updated_at":"2023-01-06T05:06:39.000Z","dependencies_parsed_at":"2022-09-03T02:30:31.866Z","dependency_job_id":null,"html_url":"https://github.com/rehacktive/kvod","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rehacktive%2Fkvod","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rehacktive%2Fkvod/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rehacktive%2Fkvod/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rehacktive%2Fkvod/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rehacktive","download_url":"https://codeload.github.com/rehacktive/kvod/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245577705,"owners_count":20638361,"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":[],"created_at":"2024-10-15T05:48:27.216Z","updated_at":"2025-03-26T02:36:57.564Z","avatar_url":"https://github.com/rehacktive.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"## KVoD [Key/Value on Disk], a simple, encrypted key/value storage for Go (now using Generics)\n\nJust a sample:\n```golang\ntype User struct {\n\tName  string\n\tEmail string\n}\n\nfunc main() {\n\tstore := kvod.Init(\"./db/\", \"secret\")\n\tuserContainer := kvod.CreateContainer[User](db, \"users\")\n\n\tuserContainer.Put(\"1\", User{\"a username\", \"user@memorya.org\"})\n\n\tuser, _ := userContainer.Get(\"1\")\n\tfmt.Println(user)\n\n\tuserContainer.Delete(\"1\")\n}\n```\nThe idea is to save each value to a file, under the specified path.\nThe value is serialized using gob and encrypted (with AES256 in GCM mode, with PBKDF2 as key derivation function with 10000 iterations).\n\nThe key is always a string.\nThe value can be any type gob supports (https://blog.golang.org/gobs-of-data), so structs, strings, slices and more, using Generics.\n\n#### TESTS\n```\nok  \tgithub.com/rehacktive/kvod/kvod\t0.299s\tcoverage: 82.1% of statements\nSuccess: Tests passed.\n```\n#### BENCHMARKS\n```\ngoos: linux\ngoarch: amd64\npkg: github.com/rehacktive/kvod/kvod\nBenchmarkGenerateKey-4   \t     100\t  19887814 ns/op\t     532 B/op\t       8 allocs/op\nBenchmarkEncrypt-4       \t 1000000\t      1945 ns/op\t    1008 B/op\t       7 allocs/op\nBenchmarkDecrypt-4       \t 2000000\t      1079 ns/op\t     976 B/op\t       6 allocs/op\nBenchmarkInit-4          \t     100\t  16506587 ns/op\t    3483 B/op\t      24 allocs/op\nBenchmarkPut-4           \t   20000\t     84323 ns/op\t    4744 B/op\t      59 allocs/op\nBenchmarkGet-4           \t   20000\t     70250 ns/op\t   18346 B/op\t     383 allocs/op\nBenchmarkGetKeys-4       \t    3000\t    430877 ns/op\t  121920 B/op\t    2040 allocs/op\nBenchmarkSerialize-4     \t 1000000\t      1461 ns/op\t     912 B/op\t      12 allocs/op\nBenchmarkDeserialize-4   \t 1000000\t      2085 ns/op\t    1088 B/op\t      18 allocs/op\nPASS\ncoverage: 79.5% of statements\nok  \tgithub.com/rehacktive/kvod/kvod\t19.396s\nSuccess: Benchmarks passed.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frehacktive%2Fkvod","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frehacktive%2Fkvod","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frehacktive%2Fkvod/lists"}