{"id":30119694,"url":"https://github.com/maxtek6/keybase-go","last_synced_at":"2025-08-10T12:21:21.637Z","repository":{"id":246308324,"uuid":"820148488","full_name":"maxtek6/keybase-go","owner":"maxtek6","description":"Key counting database with expiring keys and optional persistence.","archived":false,"fork":false,"pushed_at":"2025-02-27T06:05:58.000Z","size":64,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-05-17T11:11:19.811Z","etag":null,"topics":["dracula","mailsac","sqlite","sqlite-database","sqlite3"],"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/maxtek6.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":"2024-06-25T22:45:28.000Z","updated_at":"2025-02-03T21:46:19.000Z","dependencies_parsed_at":"2024-06-27T05:08:28.224Z","dependency_job_id":"28e2be37-98a3-46ee-b5f7-2f3452b2ffbc","html_url":"https://github.com/maxtek6/keybase-go","commit_stats":null,"previous_names":["maxtek6/keybase-go"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/maxtek6/keybase-go","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxtek6%2Fkeybase-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxtek6%2Fkeybase-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxtek6%2Fkeybase-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxtek6%2Fkeybase-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maxtek6","download_url":"https://codeload.github.com/maxtek6/keybase-go/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxtek6%2Fkeybase-go/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269721682,"owners_count":24464542,"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","status":"online","status_checked_at":"2025-08-10T02:00:08.965Z","response_time":71,"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":["dracula","mailsac","sqlite","sqlite-database","sqlite3"],"created_at":"2025-08-10T12:21:19.370Z","updated_at":"2025-08-10T12:21:21.627Z","avatar_url":"https://github.com/maxtek6.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Keybase\n\n[![GoDoc](https://godoc.org/github.com/golang/gddo?status.svg)](http://pkg.go.dev/github.com/maxtek6/keybase-go)\n[![codecov](https://codecov.io/gh/maxtek6/keybase-go/branch/master/graph/badge.svg)](https://codecov.io/gh/maxtek6/keybase-go)\n[![Go Report Card](https://goreportcard.com/badge/github.com/maxtek6/keybase-go)](https://goreportcard.com/report/github.com/maxtek6/keybase-go)\n\nKeybase is a key counting database with expiring keys and optional persistence.\n\n## Usage\n\nKeybase is designed to work out of the box with minimal configuration. To use keybase,\ncall the `Open()` function:\n\n```go\nkb, err := keybase.Open(keybase.WithStorage(\"/tmp/keybase.db\"), keybase.WithTTL(time.Minute))\n```\n\nThis will initialize a database at `/tmp/keybase.db` with a key timeout of one minute. Once\nkeybase is open, it is ready to store and maintain keys. Each key is assigned to a namespace\nand can be inserted using the `Put` function:\n\n```go\n_ = kb.Put(context.Background(), \"namespace\", \"key\")\n```\n\nOnce the key is stored, various functions can be used to query key and namespace information,\nsuch as `GetKeys()`, which will return a slice of strings representing all keys in a given\nnamespace:\n\n```go\nactive := true\nunique := true\nkeys, err := kb.GetKeys(context.Background(), \"namespace\", active, unique)\n```\n\nBy setting `active` and `unique` to `true`, the slice will include each active key once. Otherwise,\nthe string make contain multiple copies of the same key, as well as stale keys, if it has been \nsubmitted multiple times and queried within the TTL duration. Over time, as the keys become stale, \nthey can be removed using the `PruneEntries` function:\n\n```go\n_ = kb.PruneEntries(context.Background())\n```\n\nThis will remove the stale keys and reduce the amount of storage required by memory or \nfilesystem. When the keybase is no longer needed, it needs to be disconnected using the\n`Close()` function:\n\n```go\nkb.Close()\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxtek6%2Fkeybase-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaxtek6%2Fkeybase-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxtek6%2Fkeybase-go/lists"}