Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateSetupURI ¶
GenerateSetupURI creates a complete LiveSync Setup URI from a config and URI passphrase.
uriPassphrase encrypts the URI itself (not the vault data). Use a different passphrase from the E2EE passphrase in the config.
Returns the URI and any error.
Types ¶
type Config ¶
type Config struct {
CouchDBURI string `json:"couchDB_URI"`
CouchDBUser string `json:"couchDB_USER"`
CouchDBPassword string `json:"couchDB_PASSWORD"`
CouchDBDBName string `json:"couchDB_DBNAME"`
// Sync behaviour — defaults mirror the official Deno script
SyncOnStart bool `json:"syncOnStart"`
GCDelay int `json:"gcDelay"`
PeriodicReplication bool `json:"periodicReplication"`
SyncOnFileOpen bool `json:"syncOnFileOpen"`
Encrypt bool `json:"encrypt"`
Passphrase string `json:"passphrase"` // E2EE passphrase (can differ from URI passphrase)
UsePathObfuscation bool `json:"usePathObfuscation"`
BatchSave bool `json:"batchSave"`
BatchSize int `json:"batch_size"`
BatchesLimit int `json:"batches_limit"`
UseHistory bool `json:"useHistory"`
DisableRequestURI bool `json:"disableRequestURI"`
CustomChunkSize int `json:"customChunkSize"`
SyncAfterMerge bool `json:"syncAfterMerge"`
ConcurrencyOfReadChunksOnline int `json:"concurrencyOfReadChunksOnline"`
MinimumIntervalOfReadChunksOnline int `json:"minimumIntervalOfReadChunksOnline"`
HandleFilenameCaseSensitive bool `json:"handleFilenameCaseSensitive"`
DoNotUseFixedRevisionForChunks bool `json:"doNotUseFixedRevisionForChunks"`
SettingVersion int `json:"settingVersion"`
NotifyThresholdOfRemoteStorageSize int `json:"notifyThresholdOfRemoteStorageSize"`
}
Config is the configuration object embedded in the Setup URI. Fields match exactly what the TypeScript generate_setupuri.ts produces.
func DefaultConfig ¶
DefaultConfig returns a Config pre-filled with the same defaults as the official generate_setupuri.ts script.
Click to show internal directories.
Click to hide internal directories.