method
App.AcquireDocumentLock
Acquire, refresh, or explicitly take over an authoring lock.
Arguments
| Argument | Type | Description |
|---|---|---|
ctx | context.Context | The ctx value. |
collection | string | The collection value. |
documentID | string | The documentID value. |
takeover | bool | The takeover value. |
identity | *AuthIdentity | The identity value. |
Returns
The declared result.
(DocumentLockState, error)How it works
Takeover uses CollectionAccess.Unlock, falling back to Update when omitted. Locks coordinate editors; they do not replace optimistic revision checks or authorization.
Full signature
func (application *App) AcquireDocumentLock(
ctx context.Context,
collection,
documentID string,
takeover bool,
identity *AuthIdentity,
) (DocumentLockState, error)Related types
AppA resolved application bound to operation services.
AuthIdentityAn exact authenticated collection and actor document.
DocumentLockStateSafe current lock metadata and actor capabilities.