github.com/ipld/go-ipld-prime@v0.21.0/schema/dmt/doc.go (about)

     1  /*
     2  Package schema/dmt contains types and functions for dealing with the data model form of IPLD Schemas.
     3  
     4  (DMT is short for "data model tree" -- see https://ipld.io/glossary/#dmt .)
     5  
     6  As with anything that's IPLD data model, this data can be serialized or deserialized into a wide variety of codecs.
     7  
     8  To contrast this package with some of its neighbors and with some various formats for the data this package describes:
     9  Schemas also have a DSL (a domain-specific language -- something that's meant to look nice, and be easy for humans to read and write),
    10  which are parsed by the `schema/dsl` package, and produce a DMT form (defined by and handled by this package).
    11  Schemas also have a compiled form, which is the in-memory structure that this library uses when working with them;
    12  this compiled form differs from the DMT because it can use pointers (and that includes cyclic pointers, which is something the DMT form cannot contain).
    13  We use the DMT form (this package) to produce the compiled form (which is the `schema` package).
    14  
    15  Creating a Compiled schema either flows from DSL(text)->`schema/dsl`->`schema/dmt`->`schema`,
    16  or just (some codec, e.g. JSON or CBOR or etc)->`schema/dmt`->`schema`.
    17  
    18  The `dmt.Schema` type describes the data found at the root of an IPLD Schema document.
    19  The `Compile` function turns such data into a `schema.TypeSystem` that is ready to be used.
    20  The `dmt.Prototype.Schema` value is a NodePrototype that can be used to handle IPLD Schemas in DMT form as regular IPLD Nodes.
    21  
    22  Typically this package is imported aliased as "schemadmt",
    23  since "dmt" is a fairly generic term in the IPLD ecosystem
    24  (see https://ipld.io/glossary/#dmt ).
    25  
    26  Many types in this package lack documentation directly on the type;
    27  generally, these are structs that match the IPLD schema-schema,
    28  and so you can find descriptions of them in documentation for the schema-schema.
    29  */
    30  package schemadmt