An open API service providing repository metadata for many open source software ecosystems.

Package Usage: go: github.com/ipld/go-datalark

datalark makes IPLD data legible to, and constructable in, starlark. Given an IPLD Schema (and optionally, a list of types to focus on), datalark can generate a set of starlark constructor functions for those types. These functions should generally DWIM ("do what I mean"): for structs, they accept kwargs corresponding to the field names, etc. Some functions get clever: for example, for structs with stringy representations (stringjoin, etc), the representation form can be used as an argument to the constructor instead of the kwargs form, and the construction will "DWIM" with that information and parse it in the appropriate way. Standard datamodel data is also always legible, and a set of functions for creating it can also be obtained from the datalark package. All IPLD data exposed to starlark always acts as if it is "frozen", in starlark parlance. This should be unsurprising, since IPLD is already oriented around immutability. datalark can be used on natural golang structs by combining it with the go-ipld-prime/node/bindnode package. This may make it an interesting alternative to github.com/starlight-go/starlight (although admittedly more complicated; it's probably only worth it if you also already value some of the features of IPLD Schemas). Future objectives for this package include the ability to provide a function to starlark which will accept an IPLD Schema document and a type name as parameters, and will return a constructor for that type. (Not yet implemented.)
3 versions
Latest release: over 2 years ago
2 dependent packages

View more package details: https://packages.ecosyste.ms/registries/proxy.golang.org/packages/github.com/ipld/go-datalark

View more repository details: http://repos.ecosyste.ms/hosts/GitHub/repositories/ipld%2Fgo-datalark

Dependent Repos 1

warptools/warpforge
a build tool -- based on "hashes go in, hashes come out" and hermetic, containerized environments for every step.

Size: 39.7 MB - Last synced: 11 months ago - Pushed: over 1 year ago