type
Path
An immutable, validated document field path.
Properties
| Property | Type | Description |
|---|---|---|
Segments() | []string | A defensive copy of the path segments. |
String() | string | Canonical dot-separated form. |
How it works
Segments begin with a lowercase letter and may contain letters, digits, underscores, or hyphens. Paths are limited to MaxPathSegments (64) and MaxPathBytes (4096).
Path implements JSON encoding as its canonical dot-separated string.
Full signature
type Path struct {
// contains filtered or unexported fields
}Methods
Path.MarshalJSON()MarshalJSON encodes a path in its canonical dot-separated form.
Path.Segments()Segments returns a copy of the path segments.
Path.String()Public method Path.String from github.com/riducms/ridu/query.
Path.UnmarshalJSON()UnmarshalJSON validates the canonical string before replacing the path.
Path.AppendSegments()AppendSegments appends the path segments to segments.
Path.Len()Len returns the number of path segments.
Path.Segment()Segment returns segment index without copying the path.