Sets the path to the .pem file containing the necessary certificates for the connection, which are dependent on your PrivMX Bridge setup.
This method must be called before attempting to establish a connection to ensure the certificates are properly set.
Creates a new connection instance to PrivMX platform using a private key.
The path to the certificates must be set beforehand using setCertsPath(). This connection is used to interact with secured operations such as Inboxes, Threads, and Stores.
Creates a new public connection to PrivMX platform.
The path to the certificates must be set beforehand using setCertsPath(). This type of connection is primarily used for public operations, such as inbound Inbox traffic, where authentication is not required.
Disconnects the current connection to PrivMX platform.
Once disconnected, the Connection instance, along with any associated API instances like StoreApi or ThreadApi, becomes unusable. It is important to call this method when the connection is no longer needed to free up resources.
Lists all Contexts available to the currently connected user.
Contexts represent different environments or groups to which the user has access. This method returns a list of these Contexts.
public func listContexts( query: privmx.endpoint.core.PagingQuery )throws -> privmx.ContextList
Name
Type
Description
query
privmx.endpoint.core.PagingQuery
A `PagingQuery` object that specifies the filtering and pagination options for the query.
Type
Description
privmx.ContextList
A `ContextList` structure containing the total number of Contexts and a list of the retrieved Contexts.