forked from couchbase/gocbcore
-
Notifications
You must be signed in to change notification settings - Fork 0
/
crud_subdoc.go
70 lines (58 loc) · 1.68 KB
/
crud_subdoc.go
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
package gocbcore
import (
"time"
"github.com/couchbase/gocbcore/v10/memd"
)
// LookupInOptions encapsulates the parameters for a LookupInEx operation.
type LookupInOptions struct {
Key []byte
Flags memd.SubdocDocFlag
Ops []SubDocOp
CollectionName string
ScopeName string
CollectionID uint32
RetryStrategy RetryStrategy
Deadline time.Time
// Internal: This should never be used and is not supported.
User string
TraceContext RequestSpanContext
}
// MutateInOptions encapsulates the parameters for a MutateInEx operation.
type MutateInOptions struct {
Key []byte
Flags memd.SubdocDocFlag
Cas Cas
Expiry uint32
Ops []SubDocOp
CollectionName string
ScopeName string
RetryStrategy RetryStrategy
DurabilityLevel memd.DurabilityLevel
DurabilityLevelTimeout time.Duration
CollectionID uint32
Deadline time.Time
PreserveExpiry bool
// Internal: This should never be used and is not supported.
User string
TraceContext RequestSpanContext
}
// SubDocResult encapsulates the results from a single sub-document operation.
type SubDocResult struct {
Err error
Value []byte
}
// LookupInResult encapsulates the result of a LookupInEx operation.
type LookupInResult struct {
Cas Cas
Ops []SubDocResult
// Internal: This should never be used and is not supported.
Internal struct {
IsDeleted bool
}
}
// MutateInResult encapsulates the result of a MutateInEx operation.
type MutateInResult struct {
Cas Cas
MutationToken MutationToken
Ops []SubDocResult
}