package
0.0.0-20250312135022-590383e0dfc6
Repository: https://github.com/couchbase/sync_gateway.git
Documentation: pkg.go.dev

# Functions

If the provided principal name (in access grant format) is a role, returns the role name without prefix.
Creates a new TimedSet from a Set plus a sequence.
BaseSetOf a set from zero or more inline string arguments.
ConvertJSONNumbers converts json.Number values to javascript number objects for use in the sync function.
If the set contains "*", returns a set of only "*".
Calls the function for each user whose access is different between the two AccessMaps.
GetDefaultSyncFunction returns a sync function.
Returns a set with any "*" channel removed.
No description provided by the author
No description provided by the author
NewChannelMapper creates a new channel mapper with a specific javascript function and a timeout.
NewID returns a new ChannelID.
NewRangeSafeCollection creates and initializes a new RangeSafeCollection.
No description provided by the author
No description provided by the author
No description provided by the author
Creates a new Set from an array of strings.
SetFromArrayNoValidate creates a set of channels without validating they are valid names.
SetOf creates a new Set.
SetOfNoValidate creates a new Set from inline channels.
No description provided by the author
Parses a string as generated from TimedSet.String().

# Constants

Doc was added to this channel.
wildcard for 'all channels'.
Revision tree is branched.
Document is in conflict at this time.
This rev is a deletion.
DocChannelsSyncFunction is the default sync function used prior to collections.
doc channel for "visible to all users".
No description provided by the author
This rev is not the default (hidden by a conflict).
Javscript max integer value (https://www.ecma-international.org/ecma-262/5.1/#sec-8.5).
No description provided by the author
No description provided by the author
Doc was removed from this channel.
No description provided by the author
Prefix used to identify roles in access grants.
user channel for "can access all docs".

# Structs

activeChannels is a concurrency-safe map of active replications per channel, modified via incr/decr operations.
AppendOnlyList is a doubly-linked list that only supports adding elements to the list using PushBack.
AppendOnlyListElement is an element of an AppendOnlyList.
No description provided by the author
* Result of running a channel-mapper function.
No description provided by the author
ID represents a single channel inside a collection.
No description provided by the author
RangeSafeCollection is a concurrency-safe collection comprising an AppendOnlyList and a map for key-based retrieval of list elements.
No description provided by the author
An object that runs a specific JS sync() function.
Vb and Sequence struct that's compatible with sequence-only (global sequence) mode.

# Type aliases

Maps user names (or role names prefixed with "role:") to arrays of channel or role names.
ChanngedChannels contains each modified channel with true if active, and false if inactive.
TimedSetDiff stores the result of TimedSet.CompareKeys Elements present in the set but not in the other are returned with value true Elements present in the other set but not in set are returned with value false Unchanged elements are not included in ChangedKeys.
No description provided by the author
No description provided by the author
No description provided by the author
A mutable mapping from channel names to sequence numbers (interpreted as the sequence when the channel was added.).