Documentation ¶
Index ¶
- Constants
- Variables
- type AppliedDocumentUpdate
- type AppliedDocumentUpdateMeta
- type AppliedOpsErrorMeta
- type CompileGroup
- type Compiler
- type Component
- type ComputeTimeout
- type DirEntry
- type DirName
- type DocumentUpdate
- type DocumentUpdateAck
- type DocumentUpdateMeta
- type DupIfSource
- type EditorEvent
- type EditorEventMessage
- type Email
- type FileType
- type Filename
- type Hash
- type ImageName
- type Op
- type PathName
- type PrivilegeLevel
- type ProjectOptions
- type PublicId
- type ReversedHostname
- type Snapshot
- type Snippet
- type Timed
- type Timestamp
- type URL
- type UUID
- func (u UUID) Append(b []byte) []byte
- func (u UUID) Concat(c byte, other UUID) string
- func (u UUID) IsZero() bool
- func (u UUID) MarshalJSON() ([]byte, error)
- func (u *UUID) Populate() error
- func (UUID) SkipUnderlyingTypePlan()
- func (u UUID) String() string
- func (u *UUID) UnmarshalJSON(b []byte) error
- func (u *UUID) UnmarshalText(src []byte) error
- type UUIDBatch
- type UUIDCodec
- func (c UUIDCodec) DecodeDatabaseSQLValue(_ *pgtype.Map, _ uint32, _ int16, _ []byte) (driver.Value, error)
- func (c UUIDCodec) DecodeValue(_ *pgtype.Map, _ uint32, _ int16, _ []byte) (any, error)
- func (UUIDCodec) Encode(value any, buf []byte) ([]byte, error)
- func (UUIDCodec) FormatSupported(format int16) bool
- func (c UUIDCodec) PlanEncode(_ *pgtype.Map, _ uint32, _ int16, _ any) pgtype.EncodePlan
- func (c UUIDCodec) PlanScan(_ *pgtype.Map, _ uint32, _ int16, _ any) pgtype.ScanPlan
- func (UUIDCodec) PreferredFormat() int16
- func (UUIDCodec) Scan(src []byte, dst any) error
- type UUIDs
- type UUIDsCodec
- func (c UUIDsCodec) DecodeDatabaseSQLValue(_ *pgtype.Map, _ uint32, _ int16, _ []byte) (driver.Value, error)
- func (c UUIDsCodec) DecodeValue(_ *pgtype.Map, _ uint32, _ int16, _ []byte) (any, error)
- func (UUIDsCodec) Encode(value any, buf []byte) ([]byte, error)
- func (UUIDsCodec) FormatSupported(format int16) bool
- func (c UUIDsCodec) PlanEncode(_ *pgtype.Map, _ uint32, _ int16, _ any) pgtype.EncodePlan
- func (c UUIDsCodec) PlanScan(_ *pgtype.Map, _ uint32, _ int16, _ any) pgtype.ScanPlan
- func (UUIDsCodec) PreferredFormat() int16
- func (UUIDsCodec) Scan(src []byte, dst any) error
- type Version
Constants ¶
View Source
const ( LaTeX = Compiler("latex") LuaLaTeX = Compiler("lualatex") PDFLaTeX = Compiler("pdflatex") XeLaTeX = Compiler("xelatex") )
View Source
const ( StandardCompileGroup = CompileGroup("standard") PriorityCompileGroup = CompileGroup("priority") )
View Source
const ( Bootstrap = EditorEventMessage("bootstrap") BroadcastDocMeta = EditorEventMessage("broadcastDocMeta") ClientTrackingBatch = EditorEventMessage("clientTracking.batch") ClientTrackingUpdated = EditorEventMessage("clientTracking.clientUpdated") CompilerUpdated = EditorEventMessage("compilerUpdated") ConnectionRejected = EditorEventMessage("connectionRejected") ForceDisconnect = EditorEventMessage("forceDisconnect") ImageNameUpdated = EditorEventMessage("imageNameUpdated") NewChatMessage = EditorEventMessage("new-chat-message") OtUpdateApplied = EditorEventMessage("otUpdateApplied") OtUpdateError = EditorEventMessage("otUpdateError") ProjectEditableUpdated = EditorEventMessage("projectEditableUpdated") ProjectMembershipChanged = EditorEventMessage("project:membership:changed") ProjectNameUpdated = EditorEventMessage("projectNameUpdated") ProjectPublicAccessLevelChanged = EditorEventMessage("project:publicAccessLevel:changed") ReceiveEntityMove = EditorEventMessage("receiveEntityMove") ReceiveEntityRename = EditorEventMessage("receiveEntityRename") ReceiveNewDoc = EditorEventMessage("receiveNewDoc") ReceiveNewFile = EditorEventMessage("receiveNewFile") ReceiveNewFolder = EditorEventMessage("receiveNewFolder") RemoveEntity = EditorEventMessage("removeEntity") RootDocUpdated = EditorEventMessage("rootDocUpdated") SpellCheckLanguageUpdated = EditorEventMessage("spellCheckLanguageUpdated") )
View Source
const ( MaxDocLength = 2 * 1024 * 1024 // MaxDocSizeBytes allows for 4 bytes per unicode character. MaxDocSizeBytes = 4 * MaxDocLength )
View Source
const AllZeroUUID = "00000000-0000-0000-0000-000000000000"
View Source
const MaxComputeTimeout = ComputeTimeout(10 * time.Minute)
Variables ¶
View Source
var ( ValidRootDocExtensions = []FileType{ "tex", "rtex", "ltex", } ValidTextExtensions = []FileType{ "asy", "bbx", "bib", "bibtex", "bst", "cbx", "clo", "cls", "def", "dtx", "editorconfig", "gitignore", "gv", "ins", "ist", "latex", "latexmkrc", "lbx", "lco", "ldf", "lua", "m", "md", "mf", "mtx", "rmd", "rtex", "sty", "tex", "tikz", "txt", "yaml", "yml", } )
NOTE: When updating ValidRootDocExtensions, update project.Manager too.
View Source
var ( ErrDocIsTooLarge = &errors.ValidationError{Msg: "doc is too large"} ErrDocHasNullChar = &errors.ValidationError{Msg: "doc has null char"} ErrDocHasSurrogateChar = &errors.ValidationError{Msg: "doc has surrogate char"} )
View Source
var ErrInvalidUUID = &errors.ValidationError{Msg: "invalid uuid"}
Functions ¶
This section is empty.
Types ¶
type AppliedDocumentUpdate ¶
type AppliedDocumentUpdate struct { DocId UUID `json:"doc"` Meta AppliedDocumentUpdateMeta `json:"meta"` Op Op `json:"op"` Version Version `json:"v"` }
type AppliedOpsErrorMeta ¶
type AppliedOpsErrorMeta struct { Error errors.JavaScriptError `json:"error"` DocId UUID `json:"docId"` }
type CompileGroup ¶
type CompileGroup string
func (CompileGroup) Validate ¶
func (c CompileGroup) Validate() error
type Component ¶
type Component struct { Deletion Snippet `json:"d,omitempty"` Insertion Snippet `json:"i,omitempty"` Position int `json:"p"` }
func (Component) IsDeletion ¶
func (Component) IsInsertion ¶
type ComputeTimeout ¶
func (ComputeTimeout) String ¶
func (t ComputeTimeout) String() string
func (ComputeTimeout) Validate ¶
func (t ComputeTimeout) Validate() error
type DocumentUpdate ¶
type DocumentUpdate struct { DocId UUID `json:"doc"` Dup bool `json:"dup,omitempty"` DupIfSource DupIfSource `json:"dupIfSource,omitempty"` Hash Hash `json:"hash,omitempty"` Meta DocumentUpdateMeta `json:"meta"` Op Op `json:"op"` Version Version `json:"v"` }
func (*DocumentUpdate) CheckVersion ¶
func (d *DocumentUpdate) CheckVersion(current Version) error
func (*DocumentUpdate) Validate ¶
func (d *DocumentUpdate) Validate() error
type DocumentUpdateAck ¶
func (*DocumentUpdateAck) MarshalJSON ¶
func (d *DocumentUpdateAck) MarshalJSON() ([]byte, error)
type DocumentUpdateMeta ¶
type DocumentUpdateMeta struct { IngestionTime time.Time `json:"ingestion_time,omitempty"` Source PublicId `json:"source"` Type string `json:"type,omitempty"` Timestamp Timestamp `json:"ts,omitempty"` UserId UUID `json:"user_id,omitempty"` }
func (*DocumentUpdateMeta) Validate ¶
func (d *DocumentUpdateMeta) Validate() error
type DupIfSource ¶
type DupIfSource []PublicId
func (DupIfSource) Contains ¶
func (d DupIfSource) Contains(id PublicId) bool
type EditorEvent ¶
type EditorEvent struct { /* "h" is a virtual field indicating the length of Payload */ Payload json.RawMessage `json:"payload"` RoomId UUID `json:"room_id"` Message EditorEventMessage `json:"message"` ProcessedBy string `json:"processedBy,omitempty"` Source PublicId `json:"source,omitempty"` }
func (*EditorEvent) FastUnmarshalJSON ¶
func (e *EditorEvent) FastUnmarshalJSON(p []byte) error
func (*EditorEvent) MarshalJSON ¶
func (e *EditorEvent) MarshalJSON() ([]byte, error)
func (*EditorEvent) Validate ¶
func (e *EditorEvent) Validate() error
type EditorEventMessage ¶
type EditorEventMessage string
func (*EditorEventMessage) UnmarshalJSON ¶
func (e *EditorEventMessage) UnmarshalJSON(p []byte) error
type Email ¶
type Email string
func (Email) ReversedHostname ¶
func (e Email) ReversedHostname() ReversedHostname
type FileType ¶
type FileType string
func (FileType) ValidForDoc ¶
func (FileType) ValidForRootDoc ¶
type PrivilegeLevel ¶
type PrivilegeLevel string
const ( PrivilegeLevelOwner PrivilegeLevel = "owner" PrivilegeLevelReadAndWrite PrivilegeLevel = "readAndWrite" PrivilegeLevelReadOnly PrivilegeLevel = "readOnly" )
func (PrivilegeLevel) CheckIsAtLeast ¶
func (l PrivilegeLevel) CheckIsAtLeast(other PrivilegeLevel) error
func (PrivilegeLevel) IsAtLeast ¶
func (l PrivilegeLevel) IsAtLeast(other PrivilegeLevel) bool
func (PrivilegeLevel) IsHigherThan ¶
func (l PrivilegeLevel) IsHigherThan(other PrivilegeLevel) bool
func (PrivilegeLevel) Validate ¶
func (l PrivilegeLevel) Validate() error
type ProjectOptions ¶
type ProjectOptions struct { CompileGroup CompileGroup `json:"c"` ProjectId UUID `json:"p"` UserId UUID `json:"u"` Timeout ComputeTimeout `json:"t"` }
type ReversedHostname ¶
type ReversedHostname string
type Timed ¶
type Timed struct {
// contains filtered or unexported fields
}
func (*Timed) MarshalJSON ¶
func (*Timed) UnmarshalJSON ¶
type URL ¶
func ParseAndValidateURL ¶
func (*URL) FileNameFromPath ¶
func (*URL) MarshalJSON ¶
func (*URL) UnmarshalJSON ¶
type UUID ¶
type UUID [16]byte
func (UUID) MarshalJSON ¶
func (UUID) SkipUnderlyingTypePlan ¶
func (UUID) SkipUnderlyingTypePlan()
func (*UUID) UnmarshalJSON ¶
func (*UUID) UnmarshalText ¶
type UUIDBatch ¶
type UUIDBatch struct {
// contains filtered or unexported fields
}
func GenerateUUIDBulk ¶
func NewUUIDBatch ¶
type UUIDCodec ¶
type UUIDCodec struct{}
func (UUIDCodec) DecodeDatabaseSQLValue ¶
func (UUIDCodec) DecodeValue ¶
func (UUIDCodec) FormatSupported ¶
func (UUIDCodec) PlanEncode ¶
func (UUIDCodec) PreferredFormat ¶
type UUIDs ¶
type UUIDs []UUID
func (UUIDs) SkipUnderlyingTypePlan ¶
func (UUIDs) SkipUnderlyingTypePlan()
type UUIDsCodec ¶
type UUIDsCodec struct{}
func (UUIDsCodec) DecodeDatabaseSQLValue ¶
func (UUIDsCodec) DecodeValue ¶
func (UUIDsCodec) FormatSupported ¶
func (UUIDsCodec) FormatSupported(format int16) bool
func (UUIDsCodec) PlanEncode ¶
func (c UUIDsCodec) PlanEncode(_ *pgtype.Map, _ uint32, _ int16, _ any) pgtype.EncodePlan
func (UUIDsCodec) PreferredFormat ¶
func (UUIDsCodec) PreferredFormat() int16
Source Files ¶
Click to show internal directories.
Click to hide internal directories.