Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Doc ¶
type Doc struct { DocCore LastUpdatedCtx sharedTypes.Version UnFlushedTime DocId sharedTypes.UUID JustLoadedIntoRedis bool }
func DocFromFlushedDoc ¶
func DocFromFlushedDoc(flushedDoc *project.Doc, projectId, docId sharedTypes.UUID) *Doc
func (*Doc) ToDocContentSnapshot ¶
func (d *Doc) ToDocContentSnapshot() DocContentSnapshot
func (*Doc) ToForDocUpdate ¶
func (d *Doc) ToForDocUpdate() doc.ForDocUpdate
type DocContentSnapshot ¶
type DocContentSnapshot struct { Id sharedTypes.UUID `json:"_id"` Snapshot string `json:"snapshot"` PathName sharedTypes.PathName `json:"pathname"` Version sharedTypes.Version `json:"v"` LastUpdatedAt time.Time `json:"-"` }
type DocContentSnapshots ¶
type DocContentSnapshots []DocContentSnapshot
func (DocContentSnapshots) LastUpdatedAt ¶
func (l DocContentSnapshots) LastUpdatedAt() time.Time
type DocCore ¶
type DocCore struct { Snapshot sharedTypes.Snapshot `json:"snapshot"` Hash sharedTypes.Hash `json:"hash"` ProjectId sharedTypes.UUID `json:"project_id"` PathName sharedTypes.PathName `json:"path_name"` }
func (*DocCore) DoMarshalJSON ¶
func (*DocCore) DoUnmarshalJSON ¶
type GetDocResponse ¶
type GetDocResponse struct { Ops []sharedTypes.DocumentUpdate `json:"ops"` PathName sharedTypes.PathName `json:"pathname"` Snapshot string `json:"snapshot"` Version sharedTypes.Version `json:"version"` }
type LastUpdatedCtx ¶
type LastUpdatedCtx struct { At time.Time `json:"at"` By sharedTypes.UUID `json:"by,omitempty"` }
type Options ¶
type Options struct { PeriodicFlushAll redisScanner.PeriodicOptions `json:"periodic_flush_all"` Workers int `json:"workers"` PendingUpdatesListShardCount int `json:"pending_updates_list_shard_count"` }
func (*Options) FillFromEnv ¶
func (o *Options) FillFromEnv()
type PendingUpdatesListKey ¶
type PendingUpdatesListKey int
func (PendingUpdatesListKey) String ¶
func (p PendingUpdatesListKey) String() string
type RenameDocUpdate ¶
type RenameDocUpdate struct { DocId sharedTypes.UUID NewPath sharedTypes.PathName }
func (RenameDocUpdate) Validate ¶
func (r RenameDocUpdate) Validate() error
type RenameDocUpdates ¶
type RenameDocUpdates []RenameDocUpdate
func (RenameDocUpdates) Validate ¶
func (p RenameDocUpdates) Validate() error
type SetDocRequest ¶
type SetDocRequest struct { Snapshot sharedTypes.Snapshot `json:"snapshot"` Source string `json:"source"` UserId sharedTypes.UUID `json:"user_id"` Undoing bool `json:"undoing"` }
func (*SetDocRequest) Validate ¶
func (s *SetDocRequest) Validate() error
type UnFlushedTime ¶
type UnFlushedTime int64
Click to show internal directories.
Click to hide internal directories.