{"id":17129545,"url":"https://github.com/aloknerurkar/dumbdb","last_synced_at":"2025-10-12T23:21:26.167Z","repository":{"id":135472793,"uuid":"89907466","full_name":"aloknerurkar/dumbDB","owner":"aloknerurkar","description":"A simple interface over BoltDB","archived":false,"fork":false,"pushed_at":"2018-04-10T17:41:19.000Z","size":17,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2023-12-20T11:09:03.447Z","etag":null,"topics":["boltdb","cross-platform","gomobile"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aloknerurkar.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2017-05-01T08:02:50.000Z","updated_at":"2024-06-19T06:29:32.742Z","dependencies_parsed_at":null,"dependency_job_id":"24226490-dae6-47e6-930c-7e470b359ae6","html_url":"https://github.com/aloknerurkar/dumbDB","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"purl":"pkg:github/aloknerurkar/dumbDB","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aloknerurkar%2FdumbDB","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aloknerurkar%2FdumbDB/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aloknerurkar%2FdumbDB/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aloknerurkar%2FdumbDB/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aloknerurkar","download_url":"https://codeload.github.com/aloknerurkar/dumbDB/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aloknerurkar%2FdumbDB/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261344570,"owners_count":23144891,"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":["boltdb","cross-platform","gomobile"],"created_at":"2024-10-14T19:09:54.394Z","updated_at":"2025-10-12T23:21:21.124Z","avatar_url":"https://github.com/aloknerurkar.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dumbDB\n\nThis library serves as a simple cross-platform key-value store. It is built using boltDB underneath.\n\nIt provides a simple Get/Store/Remove type of interface over boltDB.\n\n## Use cases\n\nI have recently tried to find a way to reduce common code between the \nAndroid and iOS apps. gomobile is one such tool that I have found very useful.\n\nFor more information about gomobile:\nhttps://github.com/golang/go/wiki/Mobile\n\nThe dumbDB can be compiled directly into a library using gomobile bind\nor we can build an interface on top of it for dealing with specific structs.\n\n`\ndb := dumbDB.NewDumbDB(\".\", \"db1\", os.Stdout)\n`\n\nThis will create a new DumbDB pointer. It will use the file 'db1.dumbDB' in the\ncurrent directory. The os.Stdout directs the logs to Stdout.\n\n### Using an interface\n \n For example look at the tests/test_structs.go file.\n \n The following interface is defined.\n \n `type UserRecord struct {\n \tID int\n \tName string\n \tPosition string\n }`\n \n `func (ur UserRecord) GetKey() []byte {\n \tb := make([]byte, 8)\n \tbinary.LittleEndian.PutUint64(b, uint64(ur.ID))\n \treturn b\n }`\n \n `func (ur UserRecord) GetVal() []byte {\n \tb, err := json.Marshal(ur)\n \tif err != nil {\n \t\tlog.Fatal(\"Failed marshalling\")\n \t}\n \treturn b\n }`\n \n `func (ur UserRecord) GetRecord() [][]byte {\n \tb := make([][]byte, 2)\n \tb[0] = ur.GetKey()\n \tb[1] = ur.GetVal()\n \treturn b\n }`\n \n `func (ur UserRecord) PutVal(val []byte) UserRecord {\n \terr := json.Unmarshal(val, \u0026ur)\n \tif err != nil {\n \t\tlog.Fatal(\"Failed unmarshalling\")\n \t}\n \treturn ur\n }`\n \n Now you can write wrappers, which call the DumbDB APIs underneath.\n \n For example:\n \n ` GetUser() UserRecord { \n    b,e := Get(USER_BUCKET) \n    user := UserRecord{} \n    user = user.PutVal(b) \n    return user\n }`\n \n ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faloknerurkar%2Fdumbdb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faloknerurkar%2Fdumbdb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faloknerurkar%2Fdumbdb/lists"}