Package-level declarations

Types

Link copied to clipboard
@Serializable
sealed interface AccessChange

How to change access to a repository.

Link copied to clipboard
@Serializable
enum AccessMode : Enum<AccessMode>

Access mode of a repository.

Link copied to clipboard
object ConnectHandler : CompletionHandler<Void?, CancellableContinuation<Unit>>
Link copied to clipboard
@Serializable
data class DirectoryEntry(val name: String, val entryType: EntryType)
Link copied to clipboard
@Serializable
enum EntryType : Enum<EntryType>

Type of filesystem entry.

Link copied to clipboard
@Serializable
enum ErrorCode : Enum<ErrorCode>
Link copied to clipboard
open class File
Link copied to clipboard
@Serializable
value class FileHandle(val value: Long)
Link copied to clipboard
class IOHandler<T> : CompletionHandler<T, CancellableContinuation<T>>
Link copied to clipboard
@Serializable
sealed interface LocalSecret

Type of secret to unlock a repository.

Link copied to clipboard
@Serializable
enum LogLevel : Enum<LogLevel>
Link copied to clipboard
@Serializable
value class MessageId(val value: Long)
Link copied to clipboard
@Serializable
data class MetadataEdit(val key: String, val oldValue: String?, val newValue: String?)

Edit of a single metadata entry.

Link copied to clipboard
@Serializable(with = IdSerializer::class)
data class MonitorId(val name: String, val disambiguator: Long)
Link copied to clipboard
@Serializable
enum NatBehavior : Enum<NatBehavior>
Link copied to clipboard
@Serializable
data class NetworkDefaults(val bind: List<String>, val portForwardingEnabled: Boolean, val localDiscoveryEnabled: Boolean)

Default network parameters

Link copied to clipboard
@Serializable
enum NetworkEvent : Enum<NetworkEvent>

Network notification event.

Link copied to clipboard
Link copied to clipboard
@Serializable
value class Password(val value: String)

A simple wrapper over String to avoid certain kinds of attack. For more elaboration please see the documentation for the SecretKey structure.

Link copied to clipboard
@Serializable
value class PasswordSalt(val value: ByteArray)
Link copied to clipboard
@Serializable
data class PeerInfo(val addr: String, val source: PeerSource, val state: PeerState, val stats: Stats)

Information about a peer.

Link copied to clipboard
@Serializable
enum PeerSource : Enum<PeerSource>

How was the peer discovered.

Link copied to clipboard
@Serializable
sealed interface PeerState
Link copied to clipboard
@Serializable
data class Progress(val value: Long, val total: Long)

Progress of a task.

Link copied to clipboard
@Serializable
value class PublicRuntimeId(val value: ByteArray)
Link copied to clipboard
@Serializable
data class QuotaInfo(val quota: StorageSize?, val size: StorageSize)
Link copied to clipboard
open class Repository
Link copied to clipboard
@Serializable
value class RepositoryHandle(val value: Long)
Link copied to clipboard
@Serializable
sealed interface Request
Link copied to clipboard
@Serializable
sealed interface Response
Link copied to clipboard
@Serializable
value class SecretKey(val value: ByteArray)

Symmetric encryption/decryption secret key.

Link copied to clipboard
open class Session
Link copied to clipboard
@Serializable
sealed interface SetLocalSecret

Used to set or change the read or write local secret of a repository.

Link copied to clipboard
@Serializable
value class ShareToken(val value: String)

Token to share a repository. It can be encoded as a URL-formatted string and transmitted to other replicas.

Link copied to clipboard
@Serializable
class StateMonitorNode(val values: Map<String, String>, val children: List<MonitorId>)
Link copied to clipboard
@Serializable
data class Stats(val bytesTx: Long, val bytesRx: Long, val throughputTx: Long, val throughputRx: Long)

Network traffic statistics.

Link copied to clipboard
@Serializable
value class StorageSize(val bytes: Long)

Strongly typed storage size.

Link copied to clipboard
@SerialInfo
@Target(allowedTargets = [AnnotationTarget.FIELD])
annotation class Value(val value: Int)

Annotation for enum constants to serialize/deserialize that constant as the specified value instead of its ordinal value.

Functions

Link copied to clipboard
suspend fun Session.close()

Closes the session.

Link copied to clipboard
suspend fun Session.Companion.create(configPath: String): Session

Creates a new Ouisync session.

Link copied to clipboard

Subscribe to repository events.

Link copied to clipboard

Returns a Flow of network events.