interface

DocumentLockStore

Atomically acquire, refresh, take over, and release authoring locks.

Properties

PropertyTypeDescription
FindDocumentLockfunc(context.Context, schema.StableID, string, time.Time) (DocumentLock, error)The FindDocumentLock value.
AcquireDocumentLockfunc(context.Context, DocumentLock, time.Time, bool) (DocumentLock, bool, error)The AcquireDocumentLock value.
ReleaseDocumentLockfunc(context.Context, schema.StableID, string, schema.StableID, string) errorThe ReleaseDocumentLock value.

How it works

Lock-enabled collections require this capability. Lock ownership includes both auth collection and actor ID.

Full signature

type DocumentLockStore interface { FindDocumentLock(context.Context, schema.StableID, string, time.Time) (DocumentLock, error) AcquireDocumentLock(context.Context, DocumentLock, time.Time, bool) (DocumentLock, bool, error) ReleaseDocumentLock(context.Context, schema.StableID, string, schema.StableID, string) error }

Source store/store.go:582