Documentation
¶
Index ¶
- Variables
- type BrowserKind
- func (BrowserKind) Descriptor() protoreflect.EnumDescriptor
- func (x BrowserKind) Enum() *BrowserKind
- func (BrowserKind) EnumDescriptor() ([]byte, []int)deprecated
- func (x BrowserKind) Number() protoreflect.EnumNumber
- func (x BrowserKind) String() string
- func (BrowserKind) Type() protoreflect.EnumType
- type BrowserMessage
- func (*BrowserMessage) Descriptor() ([]byte, []int)deprecated
- func (x *BrowserMessage) GetArgs() [][]byte
- func (x *BrowserMessage) GetCallId() int32
- func (x *BrowserMessage) GetError() string
- func (x *BrowserMessage) GetIsland() string
- func (x *BrowserMessage) GetKind() BrowserKind
- func (x *BrowserMessage) GetMethod() string
- func (x *BrowserMessage) GetNodeId() int32
- func (x *BrowserMessage) GetResult() []byte
- func (x *BrowserMessage) GetValue() string
- func (*BrowserMessage) ProtoMessage()
- func (x *BrowserMessage) ProtoReflect() protoreflect.Message
- func (x *BrowserMessage) Reset()
- func (x *BrowserMessage) String() string
- type DomPatch
- func (*DomPatch) Descriptor() ([]byte, []int)deprecated
- func (x *DomPatch) GetCount() int32
- func (x *DomPatch) GetFacts() []byte
- func (x *DomPatch) GetNodeId() int32
- func (x *DomPatch) GetOp() string
- func (x *DomPatch) GetPluginData() []byte
- func (x *DomPatch) GetReorder() []byte
- func (x *DomPatch) GetSubPatches() []*DomPatch
- func (x *DomPatch) GetText() string
- func (x *DomPatch) GetTreeContent() []byte
- func (*DomPatch) ProtoMessage()
- func (x *DomPatch) ProtoReflect() protoreflect.Message
- func (x *DomPatch) Reset()
- func (x *DomPatch) String() string
- type ServerKind
- type ServerMessage
- func (*ServerMessage) Descriptor() ([]byte, []int)deprecated
- func (x *ServerMessage) GetCallId() int32
- func (x *ServerMessage) GetExpr() string
- func (x *ServerMessage) GetKind() ServerKind
- func (x *ServerMessage) GetPatches() []*DomPatch
- func (x *ServerMessage) GetTarget() string
- func (x *ServerMessage) GetTree() []byte
- func (*ServerMessage) ProtoMessage()
- func (x *ServerMessage) ProtoReflect() protoreflect.Message
- func (x *ServerMessage) Reset()
- func (x *ServerMessage) String() string
Constants ¶
This section is empty.
Variables ¶
var ( ServerKind_name = map[int32]string{ 0: "SERVER_INIT", 1: "SERVER_PATCH", 2: "SERVER_JSCALL", 3: "SERVER_STREAM", 4: "SERVER_BROADCAST", } ServerKind_value = map[string]int32{ "SERVER_INIT": 0, "SERVER_PATCH": 1, "SERVER_JSCALL": 2, "SERVER_STREAM": 3, "SERVER_BROADCAST": 4, } )
Enum value maps for ServerKind.
var ( BrowserKind_name = map[int32]string{ 0: "BROWSER_INPUT", 1: "BROWSER_METHOD", 2: "BROWSER_JSRESULT", 3: "BROWSER_INIT_REQUEST", 4: "BROWSER_PAGE_INFO", 5: "BROWSER_BROADCAST", } BrowserKind_value = map[string]int32{ "BROWSER_INPUT": 0, "BROWSER_METHOD": 1, "BROWSER_JSRESULT": 2, "BROWSER_INIT_REQUEST": 3, "BROWSER_PAGE_INFO": 4, "BROWSER_BROADCAST": 5, } )
Enum value maps for BrowserKind.
var File_protocol_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type BrowserKind ¶
type BrowserKind int32
BrowserKind identifies the type of message sent from the browser to Go.
const ( BrowserKind_BROWSER_INPUT BrowserKind = 0 BrowserKind_BROWSER_METHOD BrowserKind = 1 BrowserKind_BROWSER_JSRESULT BrowserKind = 2 BrowserKind_BROWSER_INIT_REQUEST BrowserKind = 3 // future BrowserKind_BROWSER_PAGE_INFO BrowserKind = 4 // future BrowserKind_BROWSER_BROADCAST BrowserKind = 5 // future )
func (BrowserKind) Descriptor ¶
func (BrowserKind) Descriptor() protoreflect.EnumDescriptor
func (BrowserKind) Enum ¶
func (x BrowserKind) Enum() *BrowserKind
func (BrowserKind) EnumDescriptor
deprecated
func (BrowserKind) EnumDescriptor() ([]byte, []int)
Deprecated: Use BrowserKind.Descriptor instead.
func (BrowserKind) Number ¶
func (x BrowserKind) Number() protoreflect.EnumNumber
func (BrowserKind) String ¶
func (x BrowserKind) String() string
func (BrowserKind) Type ¶
func (BrowserKind) Type() protoreflect.EnumType
type BrowserMessage ¶
type BrowserMessage struct {
Kind BrowserKind `protobuf:"varint,1,opt,name=kind,proto3,enum=godom.BrowserKind" json:"kind,omitempty"`
NodeId int32 `protobuf:"varint,2,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"` // source node (0 = none, e.g. godom.call)
// Input sync fields (kind: INPUT)
Value string `protobuf:"bytes,10,opt,name=value,proto3" json:"value,omitempty"` // current DOM value (e.g. input.value)
// Method call fields (kind: METHOD)
Method string `protobuf:"bytes,20,opt,name=method,proto3" json:"method,omitempty"` // Go method name (e.g. "AddTodo", "Toggle")
Args [][]byte `protobuf:"bytes,21,rep,name=args,proto3" json:"args,omitempty"` // JSON-encoded arguments
// JSResult fields (kind: JSRESULT)
CallId int32 `protobuf:"varint,30,opt,name=call_id,json=callId,proto3" json:"call_id,omitempty"` // matches the ServerMessage.call_id
Result []byte `protobuf:"bytes,31,opt,name=result,proto3" json:"result,omitempty"` // JSON-encoded result value
Error string `protobuf:"bytes,32,opt,name=error,proto3" json:"error,omitempty"` // error message if eval failed
// Init request fields (kind: INIT_REQUEST)
Island string `protobuf:"bytes,40,opt,name=island,proto3" json:"island,omitempty"`
// contains filtered or unexported fields
}
BrowserMessage is the single message type sent from the browser to Go. The `kind` field determines which payload fields are relevant.
func (*BrowserMessage) Descriptor
deprecated
func (*BrowserMessage) Descriptor() ([]byte, []int)
Deprecated: Use BrowserMessage.ProtoReflect.Descriptor instead.
func (*BrowserMessage) GetArgs ¶
func (x *BrowserMessage) GetArgs() [][]byte
func (*BrowserMessage) GetCallId ¶
func (x *BrowserMessage) GetCallId() int32
func (*BrowserMessage) GetError ¶
func (x *BrowserMessage) GetError() string
func (*BrowserMessage) GetIsland ¶
func (x *BrowserMessage) GetIsland() string
func (*BrowserMessage) GetKind ¶
func (x *BrowserMessage) GetKind() BrowserKind
func (*BrowserMessage) GetMethod ¶
func (x *BrowserMessage) GetMethod() string
func (*BrowserMessage) GetNodeId ¶
func (x *BrowserMessage) GetNodeId() int32
func (*BrowserMessage) GetResult ¶
func (x *BrowserMessage) GetResult() []byte
func (*BrowserMessage) GetValue ¶
func (x *BrowserMessage) GetValue() string
func (*BrowserMessage) ProtoMessage ¶
func (*BrowserMessage) ProtoMessage()
func (*BrowserMessage) ProtoReflect ¶
func (x *BrowserMessage) ProtoReflect() protoreflect.Message
func (*BrowserMessage) Reset ¶
func (x *BrowserMessage) Reset()
func (*BrowserMessage) String ¶
func (x *BrowserMessage) String() string
type DomPatch ¶
type DomPatch struct {
NodeId int32 `protobuf:"varint,1,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"` // stable node ID (assigned by Go, maps to nodeMap on bridge)
Op string `protobuf:"bytes,2,opt,name=op,proto3" json:"op,omitempty"` // patch operation type
// Type-specific payloads:
Text string `protobuf:"bytes,10,opt,name=text,proto3" json:"text,omitempty"` // patchText: new text content
Facts []byte `protobuf:"bytes,11,opt,name=facts,proto3" json:"facts,omitempty"` // patchFacts: JSON-encoded FactsDiff
TreeContent []byte `protobuf:"bytes,12,opt,name=tree_content,json=treeContent,proto3" json:"tree_content,omitempty"` // patchRedraw/patchAppend: JSON-encoded tree description
Count int32 `protobuf:"varint,13,opt,name=count,proto3" json:"count,omitempty"` // patchRemoveLast: number of children to remove
Reorder []byte `protobuf:"bytes,14,opt,name=reorder,proto3" json:"reorder,omitempty"` // patchReorder: JSON-encoded reorder ops with tree descriptions
PluginData []byte `protobuf:"bytes,15,opt,name=plugin_data,json=pluginData,proto3" json:"plugin_data,omitempty"` // patchPlugin: JSON-encoded plugin data
SubPatches []*DomPatch `protobuf:"bytes,16,rep,name=sub_patches,json=subPatches,proto3" json:"sub_patches,omitempty"` // patchLazy: patches inside lazy node
// contains filtered or unexported fields
}
DomPatch describes a single DOM mutation produced by the diff algorithm.
func (*DomPatch) Descriptor
deprecated
func (*DomPatch) GetPluginData ¶
func (*DomPatch) GetReorder ¶
func (*DomPatch) GetSubPatches ¶
func (*DomPatch) GetTreeContent ¶
func (*DomPatch) ProtoMessage ¶
func (*DomPatch) ProtoMessage()
func (*DomPatch) ProtoReflect ¶
func (x *DomPatch) ProtoReflect() protoreflect.Message
type ServerKind ¶
type ServerKind int32
ServerKind identifies the type of message sent from Go to the browser.
const ( ServerKind_SERVER_INIT ServerKind = 0 ServerKind_SERVER_PATCH ServerKind = 1 ServerKind_SERVER_JSCALL ServerKind = 2 ServerKind_SERVER_STREAM ServerKind = 3 // future ServerKind_SERVER_BROADCAST ServerKind = 4 // future )
func (ServerKind) Descriptor ¶
func (ServerKind) Descriptor() protoreflect.EnumDescriptor
func (ServerKind) Enum ¶
func (x ServerKind) Enum() *ServerKind
func (ServerKind) EnumDescriptor
deprecated
func (ServerKind) EnumDescriptor() ([]byte, []int)
Deprecated: Use ServerKind.Descriptor instead.
func (ServerKind) Number ¶
func (x ServerKind) Number() protoreflect.EnumNumber
func (ServerKind) String ¶
func (x ServerKind) String() string
func (ServerKind) Type ¶
func (ServerKind) Type() protoreflect.EnumType
type ServerMessage ¶
type ServerMessage struct {
Kind ServerKind `protobuf:"varint,1,opt,name=kind,proto3,enum=godom.ServerKind" json:"kind,omitempty"`
Target string `protobuf:"bytes,2,opt,name=target,proto3" json:"target,omitempty"` // island instance name (for init, patch, stream)
// VDOM fields (kind: INIT, PATCH)
Tree []byte `protobuf:"bytes,10,opt,name=tree,proto3" json:"tree,omitempty"` // JSON-encoded tree description (init only)
Patches []*DomPatch `protobuf:"bytes,11,rep,name=patches,proto3" json:"patches,omitempty"` // incremental patches (patch only)
// ExecJS fields (kind: JSCALL)
CallId int32 `protobuf:"varint,20,opt,name=call_id,json=callId,proto3" json:"call_id,omitempty"` // unique request ID for correlating responses
Expr string `protobuf:"bytes,21,opt,name=expr,proto3" json:"expr,omitempty"` // JavaScript expression to evaluate
// contains filtered or unexported fields
}
ServerMessage is the single message type sent from Go to the browser. The `kind` field determines which payload fields are relevant.
func (*ServerMessage) Descriptor
deprecated
func (*ServerMessage) Descriptor() ([]byte, []int)
Deprecated: Use ServerMessage.ProtoReflect.Descriptor instead.
func (*ServerMessage) GetCallId ¶
func (x *ServerMessage) GetCallId() int32
func (*ServerMessage) GetExpr ¶
func (x *ServerMessage) GetExpr() string
func (*ServerMessage) GetKind ¶
func (x *ServerMessage) GetKind() ServerKind
func (*ServerMessage) GetPatches ¶
func (x *ServerMessage) GetPatches() []*DomPatch
func (*ServerMessage) GetTarget ¶
func (x *ServerMessage) GetTarget() string
func (*ServerMessage) GetTree ¶
func (x *ServerMessage) GetTree() []byte
func (*ServerMessage) ProtoMessage ¶
func (*ServerMessage) ProtoMessage()
func (*ServerMessage) ProtoReflect ¶
func (x *ServerMessage) ProtoReflect() protoreflect.Message
func (*ServerMessage) Reset ¶
func (x *ServerMessage) Reset()
func (*ServerMessage) String ¶
func (x *ServerMessage) String() string