-
Notifications
You must be signed in to change notification settings - Fork 76
Expand file tree
/
Copy patherrors.go
More file actions
45 lines (38 loc) · 1.76 KB
/
Copy patherrors.go
File metadata and controls
45 lines (38 loc) · 1.76 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
// Copyright 2026 Democratized Data Foundation
//
// Use of this software is governed by the Business Source License
// included in the file licenses/BSL.txt.
//
// As of the Change Date specified in that file, in accordance with
// the Business Source License, use of this software will be governed
// by the Apache License, Version 2.0, included in the file
// licenses/APL.txt.
package cbindings
import (
"github.com/sourcenetwork/defradb/errors"
)
const (
errNegativeReplicatorTime = "negative time intervals are not allowed for replicator retries"
errAmbiguousCollection = "more than one collection matches the given criteria"
errNoDocIDOrFilter = "operation requires a DocID or filter"
errInvalidAscensionOrder = "invalid ascension order: expected ASC or DESC"
errInvalidIndexFieldDescription = "invalid or malformed field description"
errInvalidSubscriptionID = "invalid subscription ID"
errGettingSubscription = "could not retrieve subscription"
errInvalidCGOHandle = "invalid handle"
errIdentiityIsNil = "identity is nil"
errIdentityDoesNotContainPrivateKey = "identity does not contain a private key"
errInvalidPrivateKeyLength = "private key must be 32 bytes"
)
func NewErrAmbiguousCollection() error {
return errors.New(errAmbiguousCollection)
}
func NewErrInvalidIndexFieldDescription(field string) error {
return errors.New(errInvalidIndexFieldDescription, errors.NewKV("Field", field))
}
func NewErrInvalidSubscriptionID(id string) error {
return errors.New(errInvalidSubscriptionID, errors.NewKV("SubscriptionID", id))
}
func NewErrInvalidCGOHandle(id uintptr) error {
return errors.New(errInvalidCGOHandle, errors.NewKV("Handle", id))
}