github.com/ipld/go-ipld-prime@v0.21.0/doc.go (about) 1 // go-ipld-prime is a series of go interfaces for manipulating IPLD data. 2 // 3 // See https://ipld.io/ for more information about the basics 4 // of "What is IPLD?". 5 // 6 // Here in the godoc, the first couple of types to look at should be: 7 // 8 // - Node 9 // - NodeBuilder and NodeAssembler 10 // - NodePrototype. 11 // 12 // These types provide a generic description of the data model. 13 // 14 // A Node is a piece of IPLD data which can be inspected. 15 // A NodeAssembler is used to create Nodes. 16 // (A NodeBuilder is just like a NodeAssembler, but allocates memory 17 // (whereas a NodeAssembler just fills up memory; using these carefully 18 // allows construction of very efficient code.) 19 // 20 // Different NodePrototypes can be used to describe Nodes which follow certain logical rules 21 // (e.g., we use these as part of implementing Schemas), 22 // and can also be used so that programs can use different memory layouts for different data 23 // (which can be useful for constructing efficient programs when data has known shape for 24 // which we can use specific or compacted memory layouts). 25 // 26 // If working with linked data (data which is split into multiple 27 // trees of Nodes, loaded separately, and connected by some kind of 28 // "link" reference), the next types you should look at are: 29 // 30 // - LinkSystem 31 // - ... and its fields. 32 // 33 // The most typical use of LinkSystem is to use the linking/cid package 34 // to get a LinkSystem that works with CIDs: 35 // 36 // lsys := cidlink.DefaultLinkSystem() 37 // 38 // ... and then assign the StorageWriteOpener and StorageReadOpener fields 39 // in order to control where data is stored to and read from. 40 // Methods on the LinkSystem then provide the functions typically used 41 // to get data in and out of Nodes so you can work with it. 42 // 43 // This root package gathers some of the most important ease-of-use functions 44 // all in one place, but is mostly aliases out to features originally found 45 // in other more specific sub-packages. (If you're interested in keeping 46 // your binary sizes small, and don't use some of the features of this library, 47 // you'll probably want to look into using the relevant sub-packages directly.) 48 // 49 // Particularly interesting subpackages include: 50 // 51 // - datamodel -- the most essential interfaces for describing data live here, 52 // describing Node, NodePrototype, NodeBuilder, Link, and Path. 53 // - node/* -- various Node + NodeBuilder implementations. 54 // - node/basicnode -- the first Node implementation you should try. 55 // - codec/* -- functions for serializing and deserializing Nodes. 56 // - linking -- the LinkSystem, which is a facade to all data loading and storing and hashing. 57 // - linking/* -- ways to bind concrete Link implementations (namely, 58 // the linking/cidlink package, which connects the go-cid library to our datamodel.Link interface). 59 // - traversal -- functions for walking Node graphs (including automatic link loading) 60 // and visiting them programmatically. 61 // - traversal/selector -- functions for working with IPLD Selectors, 62 // which are a language-agnostic declarative format for describing graph walks. 63 // - fluent/* -- various options for making datamodel Node and NodeBuilder easier to work with. 64 // - schema -- interfaces for working with IPLD Schemas, which can bring constraints 65 // and validation systems to otherwise schemaless and unstructured IPLD data. 66 // - adl/* -- examples of creating and using Advanced Data Layouts (in short, custom Node implementations) 67 // to do complex data structures transparently within the IPLD Data Model. 68 package ipld