-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patherrors.go
More file actions
72 lines (56 loc) · 3.18 KB
/
Copy patherrors.go
File metadata and controls
72 lines (56 loc) · 3.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
package crdt
import "errors"
// Sentinel errors returned by the library. Wrap-aware callers should test with
// errors.Is; most errors carry additional context via fmt.Errorf("%w: ...").
var (
// ErrInvalidOp reports a malformed operation envelope: missing site ID,
// zero or out-of-bound timestamp, missing required fields, or invalid
// payload JSON. Envelope validity is context-free, so every replica
// classifies the same operation identically.
ErrInvalidOp = errors.New("crdt: invalid operation")
// ErrIdentityCollision reports reuse of an operation identity with a
// different canonical payload.
ErrIdentityCollision = errors.New("crdt: operation identity collision")
// ErrInvalidCommand reports a local command that failed validation
// against the current document state.
ErrInvalidCommand = errors.New("crdt: invalid command")
// ErrInvalidSyncState reports an acknowledgement or sync envelope that
// is inconsistent with locally issued state.
ErrInvalidSyncState = errors.New("crdt: invalid sync state")
// ErrUnknownFeature reports a local command that addresses a feature
// that does not exist or is deleted.
ErrUnknownFeature = errors.New("crdt: unknown feature")
// ErrDocumentMismatch reports data routed to the wrong document
// namespace.
ErrDocumentMismatch = errors.New("crdt: document namespace mismatch")
// ErrBaseMismatch reports an attempt to merge state from a document with
// a different base lineage. Replicas can only converge when they share
// the same origin base (the same initial FeatureCollection, an empty
// document, or a snapshot descended from one of those).
ErrBaseMismatch = errors.New("crdt: base lineage mismatch")
// ErrUnsupportedVersion reports a delta or snapshot with an unknown
// protocol version.
ErrUnsupportedVersion = errors.New("crdt: unsupported protocol version")
// ErrInvalidSnapshot reports a malformed or internally inconsistent
// snapshot that cannot safely be restored.
ErrInvalidSnapshot = errors.New("crdt: invalid snapshot")
// ErrSnapshotConflict reports an attempt to replace an immutable stored
// snapshot with different state under the same document and snapshot ID.
ErrSnapshotConflict = errors.New("crdt: snapshot identity collision")
// ErrCompactionGap reports that the sender compacted operations this
// replica has never seen. The receiver must load a full snapshot from
// the sender instead of merging deltas.
ErrCompactionGap = errors.New("crdt: compaction gap")
// ErrRebaseUnsafe reports that an epoch rebase would discard operations
// that are not yet causally stable, published, or dependency-resolved.
ErrRebaseUnsafe = errors.New("crdt: unsafe rebase")
// ErrUnsupportedGeometry reports a GeoJSON geometry the library does not
// model (for example GeometryCollection).
ErrUnsupportedGeometry = errors.New("crdt: unsupported geometry")
// ErrInvalidGeometry reports GeoJSON that could not be parsed or that
// violates a structural requirement (coordinate arity, ring size).
ErrInvalidGeometry = errors.New("crdt: invalid geometry")
// ErrInvalidTopology reports a topology-policy validation failure during
// snapshot or export.
ErrInvalidTopology = errors.New("crdt: invalid topology")
)