common

package
v0.0.0-...-08533ac Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 4, 2016 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Atoi

func Atoi(s string) (uint32, error)

func Itoa

func Itoa(i uint32) string

Types

type Change

type Change struct {
	Type     string
	ClientId uint32 // client that created this patch

	// Type-specific data.
	PatchId uint32
	OpStrs  []string // encoded ops
}

Sent from server to client.

type Init

type Init struct {
	Type     string
	DocId    uint32
	DataType string // "ot.Text" or "crdt.Logoot"
}

Sent from client to server.

type MsgType

type MsgType struct {
	Type string
}

For detecting incoming message type. Each struct below has Type set to the struct type name.

type Snapshot

type Snapshot struct {
	Type     string
	ClientId uint32 // id for this client

	// Type-specific data.
	BasePatchId uint32 // initial BasePatchId
	Text        string // initial text
	LogootStr   string // encoded crdt.Logoot
}

Sent from server to client.

type Update

type Update struct {
	Type     string
	ClientId uint32 // client that created this patch

	// Type-specific data.
	BasePatchId uint32   // PatchId against which this patch was performed
	OpStrs      []string // encoded ops
}

Sent from client to server.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL