An open API service providing package, version and dependency metadata of many open source software ecosystems and registries.

github.com/kr/genbolt

Command genbolt generates code for conveniently reading and writing objects in a bolt database. It reads a set of Go type definitions describing the layout of data in a bolt database, and generates code for reading and writing that data. The following types are stored as records: The following types are stored as buckets: All other types are not supported. For example, here is a schema definition: Here, Root is the root bucket. Field Users leads to a bucket indexed by an automatically incrementing uint64, holding all user records. Type User is a bucket representing a single user. Field Config leads to the single Config bucket, holding a single number. This schema produces the following package interface (with some definitions elided): Named types from other packages can be used, provided they're accompanied by a variable declaration in the schema asserting that they satisfy either json.Marshaler or encoding.BinaryMarshaler. Such types must also satisfy json.Unmarshaler or encoding.BinaryUnmarshaler, respectively, but this does not need to appear in the schema. Values of those types are marshaled when written and unmarshaled again when read. It is conventional to put a +build ignore directive in the schema file, so it can live in the same directory as the generated code without its symbols conflicting.

Ecosystem
proxy.golang.org
Latest Release
v0.4.0
over 7 years ago
Versions
6
Links
Registry proxy.golang.org
Source Repository
Docs Documentation
JSON API View JSON
CodeMeta codemeta.json
Package Details
PURL pkg:golang/github.com/kr/genbolt
spec
License MIT
Namespace github.com/kr
First Release over 7 years ago
Last Synced 24 days ago
Repository
Stars 3 on GitHub
Forks 1 on GitHub
Rankings on proxy.golang.org
Overall Top 8.2%