package
0.0.0-20250312135022-590383e0dfc6
Repository: https://github.com/couchbase/sync_gateway.git
Documentation: pkg.go.dev
# Functions
If certain environment variables are set, for example to turn on XATTR support, then update the DatabaseContextOptions accordingly.
AllocateTestSequence allocates a sequence via the sequenceAllocator.
No description provided by the author
Converts an RangeSafeCollection value to a singleChannelCacheImpl.
AttachmentDigests returns a list of attachment digests contained in the given AttachmentsMeta.
Stats mappings Create BlipSyncStats mapped to the corresponding CBL replication stats from DatabaseStats.
No description provided by the author
No description provided by the author
Returns an HTTP 413 error if `maxSize` is non-nil and less than `actualSize`.
Returns an HTTP timeout (408) error if the Database's Context has an expired timeout or has been explicitly canceled.
CollectionChannelsFromQueryParams returns the channels associated with the byChannel replication filter from the generic queryParams.
ConnectToBucket opens a Couchbase connection and return a specific bucket.
No description provided by the author
No description provided by the author
No description provided by the author
Create a zero'd out since value (eg, initial since value) based on the sequence type.
No description provided by the author
No description provided by the author
DefaultConflictResolver uses the same logic as revTree.WinningRevision, with the exception that a deleted revision is picked as the winner: the revision whose (deleted, generation, hash) tuple compares the highest.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
DeleteAttachmentVersion removes attachment versions from the AttachmentsMeta map specified.
No description provided by the author
No description provided by the author
DisableSequenceWaitOnDbStart disables the release sequence wait on db start.
Converts an error to an otto value, to support native functions returning errors.
Utility that returns a rough estimate of the original size of the JSON a value was parsed from.
Shell of the continuous changes feed -- calls out to a `send` function to deliver the change.
No description provided by the author
GenerateProofOfAttachment returns a nonce and proof for an attachment body.
GenerateResyncDCPStreamName returns the DCP stream name for a resync.
No description provided by the author
////// HELPERS: Returns _attachments property from body, when found.
Makes a Database object given its name and bucket.
GetIndexesName returns names of the indexes that would be created for given Serverless mode and Xattr flag it meant to be used in tests to know which indexes to drop as a part of manual cleanup.
GetScopesOptions sets up a ScopesOptions from a TestBucket.
Return Scopes options without any configuration for only the default collection.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Initializes Sync Gateway indexes for datastore.
No description provided by the author
Parse the plan looking for use of the fetch operation (appears as the key/value pair "#operator":"Fetch") If there's no fetch operator in the plan, we can assume the query is covered by the index.
Similar to IsDocNotFoundError(), but for the specific error returned by GetDDoc/DeleteDDoc.
LoadReplicationStatus attempts to load both push and pull replication checkpoints, and constructs the combined status.
LocalWinsConflictResolver returns the local document as winner.
MakeAttachmentKey returns the unique for attachment storage and retrieval.
Creates a userCtx object to be passed to the sync function.
N1QlQueryWithStats is a wrapper for gocbBucket.Query that performs additional diagnostic processing (expvars, slow query logging).
N1QL only supports int64 values (https://issues.couchbase.com/browse/MB-24464), so restrict parameter values to this range.
NewActiveReplicator returns a bidirectional active replicator for the given config.
No description provided by the author
backgroundTask runs task at the specified time interval in its own goroutine until stopped or an error is thrown by the BackgroundTaskFunc.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
NewConflictResolverStats initializes the replications stats inside the provided container, and returns a ConflictResolverStats to manage interaction with those stats.
NewCustomConflictResolver returns a ConflictResolverFunc that executes the javascript conflict resolver specified by source.
Creates a new DatabaseContext on a bucket.
No description provided by the author
Returns a new empty document.
Creates a new event manager.
NewGetCollectionsMessage constructs a message request from a clientID provided by API, and keyspaces that match collections.
NewHybridLogicalVector returns a HybridLogicalVector struct with maps initialised in the struct.
No description provided by the author
NewImportListener constructs an object to start an import feed.
No description provided by the author
Creates a revision cache with the given capacity and an optional loader function.
No description provided by the author
NewPullReplicator creates an ISGR pull replicator.
NewPushReplicator creates an ISGR push replicator.
No description provided by the author
NewReplicationCheckpoint converts a revID and checkpoint body into a replicationCheckpoint.
No description provided by the author
No description provided by the author
NewRevisionCache returns a RevisionCache implementation for the given config options.
No description provided by the author
No description provided by the author
NewSGBlipContext returns a go-blip context with the given ID, initialized for use in Sync Gateway.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Creates a sharded revision cache with the given capacity and an optional loader function.
NewSingleSkippedSequenceEntry returns a SkippedSequenceListEntry with start and end seq defined as equal with the current timestamp in unix time.
NewSingleSkippedSequenceEntryAt returns a SkippedSequenceListEntry with start and end seq defined as equal and the supplied timestamp in unix time.
NewSkippedSequenceRangeEntry returns a SkippedSequenceListEntry with the specified sequence range and the current timestamp in unix time.
NewSkippedSequenceRangeEntryAt returns a SkippedSequenceListEntry with the specified sequences and the supplied timestamp in unix time.
No description provided by the author
NewSubChangesParams creates a SubChangesParam from a request.
No description provided by the author
Creates a new webhook handler based on the url and filter function.
OpenImportPIndexImpl is required to have an implementation from cbgt.PIndexImplType.Open.
No description provided by the author
ParseJSONSequenceID will parse a JSON string sequence ID.
ParsePlainSequenceID will parse a plain sequence string - but not a JSON sequence string (e.g.
Splits a revision ID into generation number and hex digest.
Parses a CouchDB _rev or _revisions property into a list of revision IDs.
ParseSubprotocolString takes a 'CBMobile_' prefixed string and returns the subprotocol version.
ProveAttachment returns the proof for an attachment body and nonce pair.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
RegisterImportPindexImpl registers the PIndex type definition.
ReleaseTestSequence releases a sequence via the sequenceAllocator.
RemoteWinsConflictResolver returns the local document as-is.
Repairs rev tree cycles (see SG issue #2847).
No description provided by the author
Sets up test db with the specified database context options.
No description provided by the author
SuspendSequenceBatching disables sequence batching for multi-RT tests (pending CBG-1000).
TestBucketPoolEnsureNoIndexes runs a TestMain for packages that expects no indexes to exist.
TestBucketPoolWithIndexes runs a TestMain for packages that require creation of indexes.
ToAttachmentStorageMeta returns a slice of AttachmentStorageMeta, which is contains the necessary metadata properties to build the key for attachment storage and retrieval.
No description provided by the author
Unmarshals just a document's sync metadata from JSON data.
TODO: Using a pool of unmarshal workers may help prevent memory spikes under load.
UserHasDocAccess checks whether the user has access to the active revision of the document.
No description provided by the author
No description provided by the author
Issue a stale=false queries against critical views to guarantee indexing is complete and views are ready.
Calls a function, synchronously, while imposing a timeout on the Database's Context.
WriteDirect will write a document named doc-{sequence} with a given set of channels.
# Constants
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
AttVersion1 attachments are persisted to the bucket based on attachment body digest.
AttVersion2 attachments are persisted to the bucket based on docID and body digest.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
These states are used for background tasks Running = The process is currently doing work Completed = The process stopped following completion of its task Stopping = A user has requested that the process be stopped and therefore will stop shortly (usually after completing its current 'iteration') Stopped = The process has stopped either by user request or the process 'crashed' midway through --> Essentially means the process is not running and the previous run had not completed Error = The process errored and had to stop.
These states are used for background tasks Running = The process is currently doing work Completed = The process stopped following completion of its task Stopping = A user has requested that the process be stopped and therefore will stop shortly (usually after completing its current 'iteration') Stopped = The process has stopped either by user request or the process 'crashed' midway through --> Essentially means the process is not running and the previous run had not completed Error = The process errored and had to stop.
These states are used for background tasks Running = The process is currently doing work Completed = The process stopped following completion of its task Stopping = A user has requested that the process be stopped and therefore will stop shortly (usually after completing its current 'iteration') Stopped = The process has stopped either by user request or the process 'crashed' midway through --> Essentially means the process is not running and the previous run had not completed Error = The process errored and had to stop.
These states are used for background tasks Running = The process is currently doing work Completed = The process stopped following completion of its task Stopping = A user has requested that the process be stopped and therefore will stop shortly (usually after completing its current 'iteration') Stopped = The process has stopped either by user request or the process 'crashed' midway through --> Essentially means the process is not running and the previous run had not completed Error = The process errored and had to stop.
These states are used for background tasks Running = The process is currently doing work Completed = The process stopped following completion of its task Stopping = A user has requested that the process be stopped and therefore will stop shortly (usually after completing its current 'iteration') Stopped = The process has stopped either by user request or the process 'crashed' midway through --> Essentially means the process is not running and the previous run had not completed Error = The process errored and had to stop.
BGTCompletionMaxWait is the maximum amount of time to wait for completion of all background tasks and background managers before the server is stopped.
Common message properties.
No description provided by the author
No description provided by the author
collection specification.
Message properties.
No description provided by the author
Blip default vals.
Message properties.
blip error properties.
Not in the replication spec - is this required?.
Message properties.
No description provided by the author
No description provided by the author
Performs a deep copy (json marshal/unmarshal).
No description provided by the author
No description provided by the author
No description provided by the author
New internal properties prefix (CBG-1995).
Doesn't copy - callers must not mutate the response.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Performs a shallow copy (copies top level properties, doesn't iterate into nested properties).
CBMobileReplicationV2 the original subprotocol used by CBLite 2.x.
CBMobileReplicationV3 minor changes to support revocation and ISGR.
Version Vectors/HLV.
changes message properties.
Message properties.
changes response properties.
No description provided by the author
No description provided by the author
60 Days in days.
~1 Hour in days.
No description provided by the author
Replication config validation error messages.
Replication config validation error messages.
Replication config validation error messages.
Replication config validation error messages.
Replication config validation error messages.
Replication config validation error messages.
Replication config validation error messages.
Replication config validation error messages.
Replication config validation error messages.
Replication config validation error messages.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Error codes exposed for each error a database can encounter on load.
Error codes exposed for each error a database can encounter on load.
Error codes exposed for each error a database can encounter on load.
Error codes exposed for each error a database can encounter on load.
Error codes exposed for each error a database can encounter on load.
Error codes exposed for each error a database can encounter on load.
Error codes exposed for each error a database can encounter on load.
Error codes exposed for each error a database can encounter on load.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
fires when the database is created or is taken offline/online.
No description provided by the author
No description provided by the author
Max number of waiting sequences.
Max time we'll wait for a pending sequence before sending to missed queue.
No description provided by the author
No description provided by the author
DefaultMaxConcurrentChangesBatches is the maximum number of in-flight changes batches a client is allowed to send concurrently without being throttled.
DefaultMaxConcurrentRevs is the maximum number of in-flight revisions a client is allowed to send or receive concurrently without being throttled.
DefaultPurgeInterval represents a time duration of 30 days to be used as default metadata purge interval when the server’s purge interval (either bucket specific or cluster wide) is not available.
DefaultRevisionCacheShardCount is the default number of shards to use for the revision cache.
DefaultRevisionCacheSize is the number of recently-accessed doc revisions to cache in RAM.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Max time we'll wait for an entry in the missing before purging.
DeletedDocument is returned by SG when a given document has been deleted.
Design doc prefix, view version.
No description provided by the author
No description provided by the author
ViewVersion should be incremented every time any view definition changes.
No description provided by the author
fires whenever a document is updated (even if the change did not cause the winning rev to change).
DocumentHistoryMaxEntriesPerChannel is the maximum allowed entries per channel in the Document ChannelSetHistory.
Unmarshals sync metadata and body.
Unmarshals CAS (for import check) only.
Unmarshals history + rev + CAS only.
Unmarshals sync metadata excluding history.
No unmarshalling (skips import/upgrade check).
Unmarshals rev + CAS only.
Unmarshals all sync metadata.
EventOptionDocumentChangedWinningRevOnly controls whether a document_changed event is processed for winning revs only.
Message properties.
getAttachment message properties.
Message properties.
getCheckpoint message properties.
Message properties.
getRev (Connected Client) message properties.
Message properties.
When xattrs=true, index should be created with {“retain_deleted_xattr”:true} in order to index tombstones.
Index should only be created when running against metadata store.
Index necessary for principal docs.
Index should only be created when running w/ xattrs=true.
Feed-based import.
On-demand import.
No description provided by the author
No description provided by the author
No description provided by the author
indexes for default.default when it is a configured collection on a database.
indexes for metadata collection where default collection is not on the database.
indexes for principal docs.
indexes for non-default collection that holds data.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
When external revision storage is used, maximum body size (in bytes) to store inline.
Message types.
Connected Client API.
Message types.
Message types.
Message types.
Connected Client API.
Message types.
Message types.
Message types.
Connected Client API.
Message types.
Message types.
Message types.
Connected Client API.
Minimum size for channel cache capacity.
MutationFeedStopMaxWait is the maximum amount of time to wait for mutation feed worker goroutine to terminate before the server is stopped.
Use this for compatibly with all server versions, see MB-54930 for discussion.
Message properties.
norev message properties.
Message properties.
Message properties.
Use when protocol version 2 with client type ISGR.
Message properties.
proposeChanges message properties.
proposeChanges response message properties.
Rev would cause conflict.
Error occurred reading local doc.
Rev already exists locally.
Rev can be added without conflict.
Rev can be added, doc does not exist locally.
proveAttachment.
query (Connected Client).
Query Parameters used as parameters in prepared statements.
Query Parameters used as parameters in prepared statements.
Query Parameters used as parameters in prepared statements.
Query Parameters used as parameters in prepared statements.
Query Parameters used as parameters in prepared statements.
Query Parameters used as parameters in prepared statements.
Query Parameters used as parameters in prepared statements.
Query Parameters used as parameters in prepared statements.
Query Parameters used as parameters in prepared statements.
Variables in the select clause can't be parameterized, require additional handling.
Message properties.
Max number of tombstones checked per query during Compact.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Prefix applied to named functions from config file.
No description provided by the author
RemovedRedactedDocument is returned by SG when a given document has been dropped out of a channel.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Message properties.
Message properties.
Message properties.
rev message properties.
Message properties.
Message properties.
Message properties.
Message properties.
No description provided by the author
Message properties.
Message properties.
setCheckpoint message properties.
Used to show which handler processed the message.
Used to request a response with sgHandler.
subChanges message properties.
Message properties.
Message properties.
Message properties.
Message properties.
Message properties.
Message properties.
Message properties.
Message properties.
Message properties.
No description provided by the author
N1ql-encoded wildcard expression matching the '_sync:' prefix used for all sync gateway's system documents.
No description provided by the author
No description provided by the author
10 minute expiry for unused sequence docs.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Variables
Used to optimize single-node testing, see DisableSequenceWaitOnDbRestart.
CBLReconnectErrorCode is the error code that CBL will use to trigger a reconnect.
No description provided by the author
Keep entries at least this long.
Don't put more than this many entries in cache.
Default of 50k channel caches.
Keep at least this many entries in cache.
default value used for time-based checkpointing.
Default compaction high watermark (percent of MaxNumber).
Default compaction low watermark (percent of MaxNumber).
Default values for delta sync.
24 hours in seconds.
No description provided by the author
DesignDocPreviousVersions defines the set of versions included during removal of obsolete design docs in removeObsoleteDesignDocs.
Enable keeping a channel-log for the "*" channel (channel.UserStarChannel).
ErrAttachmentMeta returned when the document contains invalid _attachments metadata properties.
ErrAttachmentNotFound is returned when the attachment that is asked by one of the peers does not exist in another to prove that it has the attachment during Inter-Sync Gateway Replication.
ErrAttachmentTooLarge is returned when an attempt to attach an oversize attachment is made.
ErrAttachmentVersion is thrown in case of any error in parsing version from the attachment meta.
No description provided by the author
ErrDatabaseWentAway is returned when a replication tries to use a closed database.
No description provided by the author
ErrForbidden is returned when the user requests a document without a revision that they do not have access to.
No description provided by the author
No description provided by the author
No description provided by the author
MaxSequenceIncrFrequency is the maximum frequency we want to perform incr operations.
No description provided by the author
No description provided by the author
QueryAllDocs is using the star channel's index, which is indexed by sequence, then ordering the results by doc id.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Structs
ActivePullReplicator is a unidirectional pull active replicator.
ActivePushReplicator is a unidirectional push active replicator.
ActiveReplicator is a wrapper to encapsulate separate push and pull active replicators.
ActiveReplicatorConfig controls the behaviour of the active replicator.
No description provided by the author
No description provided by the author
AllowedAttachment contains the metadata for handling allowed attachments while replicating over BLIP protocol.
No description provided by the author
Currently the AsyncEvent type only manages the Synchronous() check.
No description provided by the author
AttachmentCompactionData struct to unmarshal a document sync data into in order to process attachments during mark phase.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
AttachmentsMetaMap struct is a very minimal struct to unmarshal into when getting attachments from bodies.
AttachmentStorageMeta holds the metadata for building the key for attachment storage and retrieval.
BackgroundManager this is the over-arching type which is exposed in DatabaseContext.
BackgroundManagerStatus simply stores data used in BackgroundManager.
BackgroundTask contains the name of the background task that is initiated and a channel that notifies background task termination.
No description provided by the author
BlipSyncContext represents one BLIP connection (socket) opened by a client.
Note: To have any of these appear in expvars they must be connected to a stat inside of stats.go - This is done via the BlipSyncStatsForCBL, BlipSyncStatsForSGRPush and BlipSyncStatsForSGRPull functions.
BypassRevisionCache is an implementation of the RevisionCache interface that does not perform any caching.
No description provided by the author
A changes entry; Database.GetChanges returns an array of these.
Options for changes-feeds.
No description provided by the author
Helper for waiting on a changeListener.
No description provided by the author
No description provided by the author
Checkpointer implements replicator checkpointing, by keeping two lists of sequences.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Conflict is the input to all conflict resolvers.
No description provided by the author
ConflictResolverJSServer manages the compiled javascript function runner instance.
No description provided by the author
CurrentVersionVector is a structure used to add a new sourceID:CAS entry to a HLV.
Represents a simulated CouchDB database.
DatabaseCollection provides a representation of a single collection of a database.
DatabaseCollectionWithUser represents CouchDB database.
Basic description of a database.
No description provided by the author
DatabaseError denotes an error that occurred during database startup.
DBStateChangeEvent is raised when a DB goes online or offline.
No description provided by the author
A struct which models an attachment.
A document as stored in Couchbase.
DocumentChangeEvent is raised when a document has been successfully written to the backing data store.
DocumentRevision stored and returned by the rev cache.
No description provided by the author
EventManager routes raised events to corresponding event handlers.
The ForEachDocID options for limiting query results.
GetCollectionsRequestBody contains matching length arrays of [scope]/collection names and checkpoint IDs.
GetSGR2CheckpointRequest is a strongly typed 'getCheckpoint' request for SG-Replicate 2.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Options associated with the import of documents not written by Sync Gateway.
No description provided by the author
InitializeIndexOptions are options used for building Sync Gateway indexes, or waiting for it to come online.
A thread-safe wrapper around a jsEventTask, i.e.
An LRU cache of document revision bodies, together with their channel access.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
QueryAccessRow used for response from both QueryAccess and QueryRoleAccess.
No description provided by the author
Used for queries that only return doc id.
No description provided by the author
A RepairBucket struct is the main API entrypoint to call for repairing documents in buckets.
Params suitable for external (eg, HTTP) invocations to describe a RepairBucket operation.
Record details about the result of a bucket repair that was made on a doc.
Params suitable for external (eg, HTTP) invocations to describe a specific RepairJob operation.
ReplicationCfg represents a replication definition as stored in the cluster config.
ReplicationConfig is a replication definition as stored in the Sync Gateway config.
ImportHeartbeatListener uses replication cfg to manage node list.
ReplicationStatus is used by the _replicationStatus REST API endpoints.
ReplicationStatusDoc is used to store the replication status in a local document.
No description provided by the author
ReplicationUpsertConfig is used for operations that support upsert of a subset of replication properties.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Information about a single revision.
No description provided by the author
RevisionDelta stores data about a delta between a revision and ToRevID.
Rev message.
No description provided by the author
No description provided by the author
SequenceID doesn't do any clock hash management - it's expected that hashing has already been done (if required) when the clock is set.
setCheckpoint message.
No description provided by the author
SetSGR2CheckpointRequest is a strongly typed 'setCheckpoint' request for SG-Replicate 2.
No description provided by the author
SGIndex is used to manage the set of constants associated with each index definition.
SGNode represents a single Sync Gateway node in the cluster.
No description provided by the author
No description provided by the author
SGRCluster defines sg-replicate configuration and distribution for a collection of Sync Gateway nodes.
No description provided by the author
No description provided by the author
SkippedSequenceListEntry contains start + end sequence for a range of skipped sequences + a timestamp at which the entry was created in unix format.
SkippedSequenceSlice stores the set of skipped sequences as an ordered slice of single skipped sequences or skipped sequence ranges.
SkippedSequenceStats will hold all stats associated with the skipped sequence slice, used for getStats().
No description provided by the author
No description provided by the author
SubChangesParams is a helper for handling BLIP subChanges requests.
SubChangesRequest is a strongly typed 'subChanges' request.
The sync-gateway metadata stored in the "_sync" property of a Couchbase document.
No description provided by the author
No description provided by the author
UnsupportedOptions are not supported for external use.
A map from names to user functions.
No description provided by the author
No description provided by the author
No description provided by the author
Webhook is an implementation of EventHandler that sends an asynchronous HTTP POST.
# Interfaces
BackgroundManagerProcessI is an interface satisfied by any of the background processes Examples of this: ReSync, Compaction.
No description provided by the author
ChannelQueryHandler interface is implemented by databaseContext and databaseCollection.
An event that can be raised during SG processing.
EventHandler interface represents an instance of an event handler defined in the database config.
RevisionCache is an interface that can be used to fetch a DocumentRevision for a Doc ID and Rev ID pair.
RevisionCacheBackingStore is the interface required to be passed into a RevisionCache constructor to provide a backing store for loading documents.
Minimizes need to perform GSI/View queries to respond to the changes feed by keeping a per-channel cache of the most recent changes in the channel.
A JavaScript function or N1QL query that can be invoked by a client.
The context for running a user function; created by UserFunction.Invoke.
# Type aliases
No description provided by the author
No description provided by the author
A map of keys -> DocAttachments.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
BlipSyncContextClientType represents whether to replicate to another Sync Gateway or Couchbase Lite.
The body of a CouchDB document/revision as decoded from JSON.
No description provided by the author
No description provided by the author
No description provided by the author
Function that returns a ChannelQueryHandlerFunc for the specified collectionID.
ClusterUpdateFunc is callback signature used when updating the cluster configuration.
CollectionIndexesType defines whether a collection represents the metadata collection, a standard collection, or both.
ConflictResolutionType is used to identify the Body returned by a conflict resolution function as local, remote, or merge.
Definition of the ConflictResolverFunc API.
No description provided by the author
No description provided by the author
Given a Couchbase Bucket doc, transform the doc in some way to produce a new doc.
No description provided by the author
EventType is an enum for each unique event type.
No description provided by the author
No description provided by the author
LatestSequenceFunc is a function signature that returns the latest sequence.
No description provided by the author
No description provided by the author
A priority-queue of LogEntries, kept ordered by increasing sequence #.
No description provided by the author
No description provided by the author
No description provided by the author
Status code returned by CheckProposedRev.
Enum for the different repair jobs (eg, repairing rev tree cycles).
No description provided by the author
ResyncCollections contains map of scope names with collection names against which resync needs to run.
A revisions property found within a Body.
No description provided by the author
RevLoaderFunc and RevWriterFunc manage persistence of non-winning revision bodies that are stored outside the document.
A revision tree maps each revision ID to its RevInfo.
No description provided by the author
SequenceIDParser is a function signature for something that parses a sequence id from a string.
No description provided by the author
No description provided by the author
No description provided by the author
Maps what users have access to what channels or roles, and when they got that access.