Documentation
¶
Overview ¶
Package audit - Implementations of operational transform auditors responsible for taking a stream of operational transform and creating useful features from that stream.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Auditor ¶
type Auditor interface { // OnTransform - Is called by binder threads synchronously for each received // transform. Therefore, the implementation must be thread safe and avoid // blocking. An implementation may wish to perform validation on the // transform, in the case of a 'fail' an error should be returned, which // will prevent the transform from being applied. OnTransform(tform text.OTransform) error }
Auditor - A type that receives all transforms from a running binder as they arrive. The purpose of this type is to expose the flowing data to other components.
type CompressedAuditor ¶
type CompressedAuditor struct { Transforms []text.OTransform // contains filtered or unexported fields }
CompressedAuditor - Audit a documents transforms into a compressed structure for serialisation.
func (*CompressedAuditor) OnTransform ¶
func (d *CompressedAuditor) OnTransform(tform text.OTransform) error
OnTransform - Is called for every transform on a document as they arrive.
type ToJSON ¶
type ToJSON struct {
// contains filtered or unexported fields
}
ToJSON - An auditor collection that takes streams of operational transforms and can serialise them to JSON format:
{ "document_1": [...], "document_2": [...] }
func NewToJSON ¶
func NewToJSON() *ToJSON
NewToJSON - Create a new auditor collection that serialises to JSON structure.
func (*ToJSON) Deserialise ¶
Deserialise - Repopulate all audits based on a JSON serialised copy.