{"id":41747187,"url":"https://github.com/mlctrez/bolt","last_synced_at":"2026-01-25T01:04:33.933Z","repository":{"id":57697506,"uuid":"488655184","full_name":"mlctrez/bolt","owner":"mlctrez","description":null,"archived":false,"fork":false,"pushed_at":"2022-11-14T02:19:34.000Z","size":18,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-10T03:56:33.189Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/mlctrez.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":"2022-05-04T16:03:15.000Z","updated_at":"2022-05-04T16:05:50.000Z","dependencies_parsed_at":"2022-09-05T15:10:35.179Z","dependency_job_id":null,"html_url":"https://github.com/mlctrez/bolt","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/mlctrez/bolt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlctrez%2Fbolt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlctrez%2Fbolt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlctrez%2Fbolt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlctrez%2Fbolt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mlctrez","download_url":"https://codeload.github.com/mlctrez/bolt/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlctrez%2Fbolt/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28740421,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-24T22:12:27.248Z","status":"ssl_error","status_checked_at":"2026-01-24T22:12:10.529Z","response_time":89,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":[],"created_at":"2026-01-25T01:04:33.309Z","updated_at":"2026-01-25T01:04:33.929Z","avatar_url":"https://github.com/mlctrez.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# bolt\n\n[![Go Report Card](https://badge.mlctrez.com/mlctrez/bolt)](https://goreportcard.com/report/github.com/mlctrez/bolt)\n\nWrapper for [etcd-io/bbolt](https://github.com/etcd-io/bbolt) for simple key value store use cases.\n\n### Example usage\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/mlctrez/bolt\"\n\t\"go.etcd.io/bbolt\"\t\n)\n\n\nfunc main() {\n\n\t// error handling omitted for example\n\tdb, _ := bolt.New(\"temp/bolt.db\")\n\tdefer func() { _ = db.Close() }()\n\n\tbucketOne := bolt.Key(\"BucketOne\")\n\t_ = db.CreateBuckets(bolt.Keys{bucketOne})\n\n\t// single updates\n\t_ = db.Put(bucketOne, \u0026stringStorage{key: \"keyOne\", value: \"valueOne\"})\n\n\t// multiple updates with transaction rollback\n\t_ = db.Update(func(tx *bbolt.Tx) error {\n\t\tbucketTx := bucketOne.Bucket(tx)\n\t\tfor i := 0; i \u003c 5; i++ {\n\t\t\tdata := fmt.Sprintf(\"data_%d\", i)\n\t\t\terr := bucketTx.Put(\u0026stringStorage{key: bolt.Key(data), value: data})\n\t\t\tif err != nil {\n\t\t\t\t_ = tx.Rollback()\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t\treturn nil\n\t})\n\n\t// simple read\n\tsimpleRead := \u0026stringStorage{key: \"keyOne\"}\n\t_ = db.Get(bucketOne, simpleRead)\n\tfmt.Println(simpleRead.value)\n\n\tbadLookup := \u0026stringStorage{key: \"doesnotexist\"}\n\tif err := db.Get(bucketOne, badLookup); err == bolt.ErrValueNotFound {\n\t\tfmt.Println(err)\n\t}\n}\n\n\nvar _ bolt.ValueProvider = (*stringStorage)(nil)\nvar _ bolt.ValueReceiver = (*stringStorage)(nil)\n\ntype stringStorage struct {\n\tkey   bolt.Key\n\tvalue string\n}\n\nfunc (s *stringStorage) Value() ([]byte, error) {\n\treturn []byte(s.value), nil\n}\n\nfunc (s *stringStorage) Key() bolt.Key {\n\treturn s.key\n}\n\nfunc (s *stringStorage) SetValue(bytes []byte) error {\n\ts.value = string(bytes)\n\treturn nil\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmlctrez%2Fbolt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmlctrez%2Fbolt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmlctrez%2Fbolt/lists"}