package
0.0.0-20210827224422-e5fa29d95e8b
Repository: https://github.com/attic-labs/noms.git
Documentation: pkg.go.dev
# Functions
ContainCommonSupertype returns true if it's possible to synthesize a non-trivial (i.e.
DecodeValue decodes a value from a chunk source.
EncodedValue returns a string containing the serialization of a value.
EncodedValueMaxLines returns a string containing the serialization of a value.
EscapeStructField escapes names for use as noms structs with regards to non CSV imported data.
GetHRSCommenters the map of 'unique' strings to HRSCommentFunc for a specified typename.
HasStructCycles determines if the type contains any struct cycles.
HeightOrder returns true if a is 'higher than' b, generally if its ref-height is greater.
IsPrimitiveKind returns true if k represents a Noms primitive type, which excludes collections (List, Map, Set), Refs, Structs, Symbolic and Unresolved types.
IsSubtype determines whether concreteType is a subtype of requiredType.
IsSubtypeDisallowExtraFields is a slightly weird variant of IsSubtype.
IsValidStructFieldName returns whether the name is valid as a field name in a struct.
IsValueSubtypeOfDetails returns two values: isSub - which indicates whether v is a subtype of t.
LoadLeafNodes loads the set of leaf nodes which contain the items [startIdx -> endIdx).
MakeStructTemplate creates a new StructTemplate or panics if the name and fields are not valid.
MakeUnionType creates a new union type unless the elemTypes can be folded into a single non union type.
MakeUnionTypeIntersectStructs is a bit of strange function.
MustParsePath parses str into a Path, or panics if parsing failed.
NewBlob creates a Blob by reading from every Reader in rs and concatenating the result.
NewGraphBuilder returns an new GraphBuilder object.
NewIntersectionIterator creates a intersect iterator from two other SetIterators.
NewList creates a new List where the type is computed from the elements in the list, populated with values, chunking if and when needed.
NewStreamingList creates a new List, populated with values, chunking if and when needed.
NewStreamingMap takes an input channel of values and returns a output channel that will produce a finished Map.
NewStreamingSet takes an input channel of values and returns a output channel that will produce a finished Set.
NewUnionIterator creates a union iterator from two other SetIterators.
NewValueStore returns a ValueStore instance that owns the provided ChunkStore and manages its lifetime.
ParsePath parses str into a Path, or returns an error if parsing failed.
Parse a Noms value from the path index syntax.
RegisterHRSCommenter is called to with three arguments: typename: the name of the struct this function will be applied to unique: an arbitrary string to differentiate functions that should be applied to different structs that have the same name (e.g.
ToRefOfValue returns a new Ref that points to the same target as |r|, but with the type 'Ref<Value>'.
TypeOf returns the type describing the value.
UnregisterHRSCommenter will remove a commenter function for a specified typename/unique string combination.
WalkRefs calls cb() on each Ref that can be decoded from |c|.
WalkValues recursively walks over all types.Values reachable from r and calls cb on them.
WriteEncodedValue writes the serialization of a value.
WriteEncodedValueMaxLines writes the serialization of a value.
# Constants
All supported kinds of Noms types are enumerated here.
All supported kinds of Noms types are enumerated here.
All supported kinds of Noms types are enumerated here.
All supported kinds of Noms types are enumerated here.
All supported kinds of Noms types are enumerated here.
All supported kinds of Noms types are enumerated here.
All supported kinds of Noms types are enumerated here.
All supported kinds of Noms types are enumerated here.
All supported kinds of Noms types are enumerated here.
Keep StructKind and CycleKind together.
All supported kinds of Noms types are enumerated here.
All supported kinds of Noms types are enumerated here.
All supported kinds of Noms types are enumerated here.
# Structs
AtAnnotation is a PathPart annotation that gets the value of a collection at a position, rather than a key.
Blob represents a list of Blobs.
CompoundDesc describes a List, Map, Set, Ref, or Union type.
DecodedChunk holds a pointer to a Chunk and the Value that results from calling DecodeFromBytes(c.Data()).
FieldPath references Struct field values by name.
Indexes into Maps by the hash of a key, or a Set by the hash of a value.
IndexPath ndexes into Maps and Lists by key or index.
IntersectionIterator only returns values that are returned in both of its child iterators.
List represents a list or an array of Noms values.
ListIterator can be used to efficiently iterate through a Noms List.
MapEditor allows for efficient editing of Map-typed prolly trees.
MapIterator can efficiently iterate through a Noms Map.
SetEditor allows for efficient editing of Set-typed prolly trees.
Read a Splice as "at SpAt (in the previous state), SpRemoved elements were removed and SpAdded elements were inserted, which can be found starting at SpFrom in the current state".
StructDesc describes a custom Noms Struct.
StructField describes a field in a struct type.
StructTemplate allows creating a template for structs with a known shape (name and fields).
TargetAnnotation is a PathPart annotation to resolve to the targetValue of the Ref it is resolved on.
TypeAnnotation is a PathPart annotation to resolve to the type of the value it's resolved in.
UnionIterator combines the results from two other iterators.
ValueStore provides methods to read and write Noms Values to a ChunkStore.
# Interfaces
Function type for commenter functions.
SetIterator defines methods that can be used to efficiently iterate through a set in 'Noms-defined' sorted order.
TypeDesc describes a type of the kind returned by Kind(), e.g.
Valuable is an interface from which a Value can be retrieved.
Value is the interface all Noms values implement.
ValueReader is an interface that knows how to read Noms Values, e.g.
ValueReadWriter is an interface that knows how to read and write Noms Values, e.g.
ValueWriter is an interface that knows how to write Noms Values, e.g.
# Type aliases
Bool is a Noms Value wrapper around the primitive bool type.
NomsKind allows a TypeDesc to indicate what kind of type is described.
Number is a Noms Value wrapper around the primitive float64 type.
A Path locates a value in Noms relative to some other value.
PrimitiveDesc implements TypeDesc for all primitive Noms types: Blob Bool Number String Type Value.
RefByHeight implements sort.Interface to order by increasing HeightOrder().
RefSlice implements sort.Interface to order by target ref.
String is a Noms Value wrapper around the primitive string type.