Ecosyste.ms: Packages

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

Top 1.7% on proxy.golang.org
Top 0.1% dependent packages on proxy.golang.org
Top 0.2% dependent repos on proxy.golang.org
Top 3.4% forks on proxy.golang.org
Top 0.3% docker downloads on proxy.golang.org

proxy.golang.org : github.com/ipld/go-ipld-prime

go-ipld-prime is a series of go interfaces for manipulating IPLD data. See https://ipld.io/ for more information about the basics of "What is IPLD?". Here in the godoc, the first couple of types to look at should be: These types provide a generic description of the data model. A Node is a piece of IPLD data which can be inspected. A NodeAssembler is used to create Nodes. (A NodeBuilder is just like a NodeAssembler, but allocates memory (whereas a NodeAssembler just fills up memory; using these carefully allows construction of very efficient code.) Different NodePrototypes can be used to describe Nodes which follow certain logical rules (e.g., we use these as part of implementing Schemas), and can also be used so that programs can use different memory layouts for different data (which can be useful for constructing efficient programs when data has known shape for which we can use specific or compacted memory layouts). If working with linked data (data which is split into multiple trees of Nodes, loaded separately, and connected by some kind of "link" reference), the next types you should look at are: The most typical use of LinkSystem is to use the linking/cid package to get a LinkSystem that works with CIDs: ... and then assign the StorageWriteOpener and StorageReadOpener fields in order to control where data is stored to and read from. Methods on the LinkSystem then provide the functions typically used to get data in and out of Nodes so you can work with it. This root package gathers some of the most important ease-of-use functions all in one place, but is mostly aliases out to features originally found in other more specific sub-packages. (If you're interested in keeping your binary sizes small, and don't use some of the features of this library, you'll probably want to look into using the relevant sub-packages directly.) Particularly interesting subpackages include: Example_createDataAndMarshal shows how you can feed data into a NodeBuilder, and also how to then hand that to an Encoder. Often you'll encoding implicitly through a LinkSystem.Store call instead, but you can do it directly, too. Example_goValueWithSchema shows how to combine a Go value with an IPLD schema, which can then be used as an IPLD node. For more examples and documentation, see the node/bindnode package. Example_unmarshalData shows how you can use a Decoder and a NodeBuilder (or NodePrototype) together to do unmarshalling. Often you'll do this implicitly through a LinkSystem.Load call instead, but you can do it directly, too.

Registry - Source - Documentation - JSON
purl: pkg:golang/github.com/ipld/go-ipld-prime
License: MIT
Latest release: 10 months ago
First release: almost 5 years ago
Namespace: github.com/ipld
Dependent packages: 1,189
Dependent repositories: 1,319
Stars: 115 on GitHub
Forks: 49 on GitHub
Docker dependents: 143
Docker downloads: 65,765,626
See more repository details: repos.ecosyste.ms
Last synced: 11 days ago

    Loading...
    Readme
    Loading...