{"id":19177710,"url":"https://github.com/simia-tech/boltx","last_synced_at":"2026-06-22T05:32:18.778Z","repository":{"id":57498098,"uuid":"64762757","full_name":"simia-tech/boltx","owner":"simia-tech","description":"Tools for BoltDB https://github.com/boltdb/bolt","archived":false,"fork":false,"pushed_at":"2017-03-15T11:21:38.000Z","size":26,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-08-14T04:59:36.565Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/simia-tech.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":"2016-08-02T14:14:51.000Z","updated_at":"2017-03-15T11:21:39.000Z","dependencies_parsed_at":"2022-08-28T16:11:17.422Z","dependency_job_id":null,"html_url":"https://github.com/simia-tech/boltx","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/simia-tech/boltx","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simia-tech%2Fboltx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simia-tech%2Fboltx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simia-tech%2Fboltx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simia-tech%2Fboltx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simia-tech","download_url":"https://codeload.github.com/simia-tech/boltx/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simia-tech%2Fboltx/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34636427,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-22T02:00:06.391Z","response_time":106,"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":[],"created_at":"2024-11-09T10:34:42.826Z","updated_at":"2026-06-22T05:32:18.759Z","avatar_url":"https://github.com/simia-tech.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# boltx [![Build Status](https://travis-ci.org/simia-tech/boltx.svg?branch=master)](https://travis-ci.org/simia-tech/boltx) [![Coverage Status](https://coveralls.io/repos/github/simia-tech/boltx/badge.svg?branch=master)](https://coveralls.io/github/simia-tech/boltx?branch=master) [![GoDoc](https://godoc.org/github.com/simia-tech/boltx?status.svg)](https://godoc.org/github.com/simia-tech/boltx) [![Go Report Card](https://goreportcard.com/badge/github.com/simia-tech/boltx)](https://goreportcard.com/report/github.com/simia-tech/boltx)\n\n\nThis package contains a collection of tools for [BoltDB](https://github.com/boltdb/bolt). It tries to simplify the\nhandling of models in a BoltDB bucket without being too opinionated.\n\nIt's basically assumes that models implement `encoding.BinaryMarshaler` and `encoding.BinaryUnmarshaler` from Go's\nstandard library.\n\n```go\ntype model struct { ... }\n\nfunc (m *model) MarshalBinary() ([]byte, error) { ... }\n\nfunc (m *model) UnmarshalBinary([]byte) (error) { ... }\n```\n\nThose methods should handle the (de)serialization of the model. The interfaces are than used by the functions of\nthis package to store and load models.\n\n```go\nmodel := \u0026model{}\n\nboltx.PutModel(bucket, []byte(\"key\"), model)\n\nboltx.GetModel(bucket, []byte(\"key\"), model)\n```\n\n## Queue\n\nThe `Queue` helper implements a queue (single-ended) on a bucket. It's persistent and safe to used with\nmultiple goroutines.\n\n```go\nqueue := boltx.NewQueue(db, []byte(\"queue-test\"))\nqueue.EnqueueModel(\u0026model{\"item\"})\n\nmodel := \u0026model{}\nqueue.DequeueModel(model)\n\nlog.Println(model)\n```\n\n## Deque\n\nThe `Deque` helper implements a deque (double-ended queue) on a bucket. It's persistent and safe to use with\nmultiple goroutines.\n\n```go\ndeque := boltx.NewDeque(db, []byte(\"deque-test\"))\n\ngo func () {\n  deque.EnqueueModelBack(\u0026model{\"item\"})\n}()\n\nmodel := \u0026model{}\ndeque.DequeueModelFront(model)\n\nlog.Println(model)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimia-tech%2Fboltx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimia-tech%2Fboltx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimia-tech%2Fboltx/lists"}