godom

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2026 License: MIT Imports: 26 Imported by: 0

README

godom

Tests Go Report Card Go Reference

Experimental — work in progress. APIs may change without notice.

godom is a framework for building local apps in Go that use the browser as the UI layer. It is not a web framework — there are no API endpoints, no frontend/backend split, no JavaScript to author for typical use. You build a Go struct, bind HTML to it with directives, and go build gives you a single binary. Run it, and the UI appears in your browser.

The browser is the rendering engine. All state and logic live in your Go process. The JS bridge is a thin command executor that the framework injects. For most apps, you never touch JS — but when you need to integrate a JS library (charts, maps, editors), the plugin system lets you bridge Go data to any JS library.

godom also works as a local network service: run the binary on a headless machine and access the UI from any browser on the network. See docs/why.md for the full rationale and how godom differs from Electron, Tauri, and Wails.

Showcase

Solar System System Monitor (Chart.js)
Solar System System Monitor with Chart.js
3D engine in Go, Canvas 2D rendering Live charts with Chart.js plugin
Terminal Terminal + Claude Code
Terminal Claude Code in browser terminal
Full PTY shell via xterm.js Claude Code running in the browser terminal
package main

import (
    "embed"
    "log"
    "github.com/anupshinde/godom"
)

//go:embed ui
var ui embed.FS

type App struct {
    godom.Component
    Count int
    Step  int
}

func (a *App) Increment() {
    a.Count += a.Step
}

func (a *App) Decrement() {
    a.Count -= a.Step
}

func main() {
    app := godom.New()
    app.Mount(&App{Step: 1}, ui)
    log.Fatal(app.Start())
}
<!-- ui/index.html -->
<h1><span g-text="Count">0</span></h1>
<button g-click="Decrement">−</button>
<button g-click="Increment">+</button>
<div>
    Step size: <input type="number" min="1" max="100" g-bind="Step"/>
</div>

Run go build and you get a single binary that opens the browser and shows a live counter. The HTML, CSS, and JS bridge are all embedded into the binary via Go's embed package — there are no external files to ship or manage.

How it works

  • Your Go struct holds all application state
  • HTML templates use g-* directives to bind to struct fields and methods
  • A binary WebSocket bridge (Protocol Buffers) keeps the browser in sync — no page reloads
  • State lives in the Go process and survives browser close/reopen — close the tab, reopen it, and you're back where you left off
  • Open the same app in multiple browser tabs and they stay in sync — type in one, see the update in the other. This falls out naturally from the architecture: Go owns the state and pushes DOM commands to every connected tab
  • All directives are validated at startup — typos in field/method names cause log.Fatal, not silent runtime bugs

Install

Use in your project:

go get github.com/anupshinde/godom

Run the examples:

git clone https://github.com/anupshinde/godom.git
cd godom
go run ./examples/solar-system

Requires Go 1.25+ and a web browser.

Directives reference

Data binding
Directive Example Description
g-text g-text="Name" Set element's text content from a field
g-bind g-bind="InputText" Two-way bind an input's value to a field
g-checked g-checked="todo.Done" Bind checkbox checked state
g-show g-show="IsVisible" Toggle display: none based on truthiness
g-if g-if="HasItems" Same as g-show (conditional display)
g-class:name g-class:done="todo.Done" Add/remove a CSS class conditionally
g-attr:name g-attr:transform="Rotation" Set any HTML/SVG attribute from a field
g-plugin:name g-plugin:chartjs="MyChart" Send field data to a registered JS plugin
Events
Directive Example Description
g-click g-click="Save" Call a method on click
g-click g-click="Remove(i)" Call with arguments resolved from context
g-keydown g-keydown="Enter:Submit" Call method on specific key press
g-keydown g-keydown="ArrowUp:Up;ArrowDown:Down" Multiple key bindings (semicolon-separated)
g-mousedown g-mousedown="OnDown" Mouse button pressed — method receives (x, y float64)
g-mousemove g-mousemove="OnMove" Mouse moved — throttled to animation frame, receives (x, y float64)
g-mouseup g-mouseup="OnUp" Mouse button released — receives (x, y float64)
g-wheel g-wheel="OnScroll" Scroll wheel — receives (deltaY float64)
Drag and drop
Directive Example Description
g-draggable g-draggable="i" Make element draggable, with the given value as drag data
g-draggable.group g-draggable.palette="'red'" Draggable with a named group — only matching dropzones accept the drop
g-dropzone g-dropzone="'canvas'" Mark element as a drop zone with a named value (used as to in drop handler)
g-drop g-drop="Reorder" Call method on drop — receives (from, to) or (from, to, position)
g-drop.group g-drop.palette="Add" Drop handler filtered by group — only fires for matching g-draggable.group

Groups isolate drag interactions. A g-draggable.palette element can only be dropped on a g-drop.palette handler. Without a group, all draggables and drop handlers interact freely.

Drop data is passed as method arguments: from (the draggable's value), to (the dropzone's value or the target's drag data), and optionally position ("above" or "below" based on cursor position). String and numeric values are preserved automatically.

CSS classes are applied automatically during drag operations:

  • .g-dragging — on the element being dragged
  • .g-drag-over — on a drop zone when a compatible draggable hovers over it
  • .g-drag-over-above / .g-drag-over-below — on sortable items indicating cursor position

See docs/drag-drop.md for the full design rationale — why this split between bridge and Go, why MIME types for groups, and alternatives considered.

Lists
<li g-for="todo, i in Todos">
    <span g-text="todo.Text"></span>
    <input type="checkbox" g-checked="todo.Done" g-click="Toggle(i)" />
    <button g-click="Remove(i)">&times;</button>
</li>

g-for="item, index in ListField" repeats the element for each item in a slice field. The index variable is optional (g-for="item in Items" works too).

List rendering uses per-item diffing — only changed items get DOM updates, new items are appended, removed items are truncated.

Nested lists

g-for loops can be nested. Inner loops iterate over fields of the outer item:

<div g-for="field, i in Fields">
    <label g-text="field.Label"></label>
    <select g-show="field.IsSelect" style="display:none">
        <option g-for="opt in field.Options" g-text="opt"></option>
    </select>
</div>

The inner g-for resolves field.Options from the outer loop variable. This works to arbitrary nesting depth. See docs/nested-for.md for the design details.

Expressions

Directives support:

  • Field access: FieldName
  • Dotted paths: todo.Text, item.Address.City
  • Loop variables: todo, i from g-for
  • Literals: true, false, integers, quoted strings

All expressions are resolved in Go (the browser-side bridge is a pure command executor).

Components

Presentational components

Split HTML into reusable files. Any HTML file in your embedded filesystem can be used as a custom element:

<!-- ui/todo-item.html -->
<li g-class:done="todo.Done">
    <input type="checkbox" g-checked="todo.Done" g-click="Toggle(index)" />
    <span g-text="todo.Text"></span>
    <button g-click="Remove(index)">&times;</button>
</li>
<!-- ui/index.html -->
<ul>
    <todo-item g-for="todo, i in Todos" :todo="todo" :index="i"></todo-item>
</ul>

Props are passed with :propName="expr" and become template variables in the child HTML. The child's directives resolve against the parent's state.

Stateful components

Register a Go struct as a component for scoped state and methods:

type TodoItem struct {
    godom.Component
    Text  string `godom:"prop"`
    Done  bool   `godom:"prop"`
    Index int    `godom:"prop"`
}

func (t *TodoItem) Toggle() {
    t.Emit("ToggleTodo", t.Index)
}

func main() {
    app := godom.New()
    app.Component("todo-item", &TodoItem{})
    app.Mount(&TodoApp{}, ui)
    log.Fatal(app.Start())
}

Key differences from presentational components:

  • Own struct: fields tagged godom:"prop" are set by the parent
  • Scoped methods: g-click="Toggle" calls the child's Toggle(), not the parent's
  • Emit: t.Emit("MethodName", args...) sends events up the component tree — each ancestor with a matching method gets called, bottom-up

API

App
app := godom.New()                       // Create a new app
app.Port = 8081                          // Set port (0 = random)
app.Host = "0.0.0.0"                    // Bind to all interfaces (default "localhost")
app.NoAuth = true                       // Disable token auth (default false = auth enabled)
app.Token = "my-secret"                 // Fixed token (default: random per startup)
app.NoBrowser = true                    // Don't auto-open browser
app.Quiet = true                        // Suppress startup output
app.Component("tag", &T{})              // Register a stateful component (tag must contain a hyphen)
app.Plugin("chartjs", libJS, bridgeJS)   // Register a plugin with one or more JS scripts
app.Mount(&MyApp{}, fsys)               // Mount root component with embedded filesystem
app.Start()                             // Start server, open browser, block forever

Every godom app also supports CLI flags:

./myapp --port=8081 --host=0.0.0.0 --no-auth --no-browser --quiet --token=my-secret

See docs/configuration.md for the full reference on settings, CLI flags, authentication, and precedence rules.

Component

Embed godom.Component in your struct:

type MyApp struct {
    godom.Component
    Name string        // exported fields = state
    Items []Item       // slices work with g-for
}

func (a *MyApp) DoSomething() {
    // exported methods = event handlers
    // mutate fields directly, framework handles sync
}
Refresh

Push state to all connected browsers from a background goroutine:

func (a *App) monitor() {
    for {
        time.Sleep(1 * time.Second)
        a.Value = readSensor()
        a.Refresh()  // broadcast to all browsers
    }
}

Call Refresh() after mutating fields outside of user-triggered events (clicks, input). This is how you build dashboards, monitors, and live-updating UIs.

Emit

For stateful components, send events to parent components:

func (t *TodoItem) Remove() {
    t.Emit("RemoveTodo", t.Index)  // calls parent's RemoveTodo(index)
}
Plugins

Integrate JS libraries (charts, maps, editors) without authoring JS yourself. A plugin is a thin JS adapter that receives Go data via the g-plugin:name directive:

<canvas g-plugin:chartjs="MyChart"></canvas>
app.Plugin("chartjs", libraryJS, bridgeJS)  // register with one or more JS scripts

The plugin JS calls godom.register(name, {init, update}) to handle data from Go. Scripts are injected in order — typically the library first, then the bridge. See plugins/chartjs/ for a complete example.

See docs/javascript-libraries.md for a detailed guide on using any JS library — with or without a plugin package.

godom ships a Chart.js plugin (github.com/anupshinde/godom/plugins/chartjs) that embeds Chart.js and provides a minimal Go struct for chart data. Charts are configured using plain map[string]interface{} — any Chart.js property passes straight through:

import "github.com/anupshinde/godom/plugins/chartjs"

chartjs.Register(app)  // registers plugin + embeds Chart.js library

Examples

  • examples/counter/ — minimal example (the one shown above)
  • examples/progress-bar/ — animated progress bar with Refresh() and g-style:width from a goroutine
  • examples/clock/ — analog clock with Refresh() and g-attr (server-pushed updates)
  • examples/todolist/ — presentational components with prop passing
  • examples/todolist-stateful/ — stateful components with props and emit
  • examples/system-monitor/ — live system monitor dashboard with Refresh(), g-attr, and presentational components
  • examples/system-monitor-chartjs/ — system monitor with Chart.js plugin (CPU, memory, disk, swap, load charts)
  • examples/charts-without-plugin/ — ApexCharts with inline bridge adapter (no plugin package)
  • examples/drag-tiles/ — 24 colored tiles with drag-to-reorder and a periodic shine animation sweep
  • examples/drag-demo/ — drag-and-drop demo with groups, dropzones, string data, and position detection (palette → canvas → trash)
  • examples/basic-form-builder/ — drag-and-drop form builder with palette, canvas, config panel, preview mode, and JSON export (uses drag groups, nested g-for, conditional rendering)
  • examples/stock-ticker/ — live stock ticker dashboard with 30 simulated stocks, per-stock tick intervals, table with color-coded gainers/losers, and external CSS via static file serving
  • examples/solar-system/ — 3D solar system with a Go-built 3D engine and Canvas 2D rendering (mouse drag, scroll zoom, follow planets)
  • examples/terminal/ — browser-based terminal with full shell access via PTY and xterm.js (session respawn, resize, multi-tab, Tailscale-friendly)

After cloning the repo (see Install), run any example with:

go run ./examples/counter

The system-monitor, system-monitor-chartjs, and terminal examples have their own go.mod (for platform-specific or extra dependencies), so run them from their directory:

cd examples/system-monitor && go run .
cd examples/system-monitor-chartjs && go run .
cd examples/terminal && go run .

This starts the server and opens your browser. To build a standalone binary instead:

go build -o counter ./examples/counter
./counter

Design principles

  • Minimal JavaScript — the JS bridge is injected automatically. For most apps, you write zero JS. When you need a JS library (charts, maps, editors), the plugin system bridges Go data to it with a thin adapter
  • Thin bridge — the JS bridge is a command executor. It does not evaluate expressions, resolve data, diff state, or make decisions. Go computes everything and sends concrete DOM commands (setText, setAttr, appendHTML, etc.) as binary Protocol Buffers over WebSocket. This means all logic is testable in Go, the bridge stays in sync with framework semantics, and debugging stays in one language. Plugins extend the bridge to delegate rendering to JS libraries when needed. g-bind fires on every keystroke with no debounce, keeping two-way binding instant (see docs/transport.md for why this matters)
  • State in Go — the browser is a rendering engine, not the source of truth
  • Fail fast — all directives validated at startup against your struct
  • Single binarygo build produces one executable, no node_modules
  • Local apps — designed for local use and trusted networks, not the public internet. Token-based auth is on by default to prevent other local users from accessing your app. No HTTPS, no deployment ceremony. Also runs as a service on headless machines (why?)

AI disclosure

This project was coded with the help of Claude (Anthropic). The architecture, design decisions, and all code were produced through human-AI collaboration using Claude Code.

The documentation including this README is also maintained by AI.

See docs/AI_USAGE.md for the full philosophy on how AI was used, what has and hasn't been reviewed, and what that means if you use this project.

License

MIT — see LICENSE.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_protocol_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type App

type App struct {
	Port      int    // 0 = random available port
	Host      string // default "localhost"; set to "0.0.0.0" for network access
	NoAuth    bool   // disable token auth (default false = auth enabled)
	Token     string // fixed auth token; empty = generate random token
	NoBrowser bool   // don't open browser on start
	Quiet     bool   // suppress startup output
	// contains filtered or unexported fields
}

App is the main godom application.

func New

func New() *App

New creates a new godom App.

func (*App) Component

func (a *App) Component(tag string, comp interface{})

Component registers a stateful component struct for a custom element tag. The tag must contain a hyphen (e.g., "todo-item"). The comp argument must be a pointer to a struct that embeds godom.Component.

func (*App) Mount

func (a *App) Mount(comp interface{}, fsys fs.FS)

Mount registers a component struct with an embedded filesystem containing HTML templates.

func (*App) Plugin

func (a *App) Plugin(name string, scripts ...string)

Plugin registers a named plugin with one or more JS scripts. Scripts are injected in order. The last script should call godom.register(name, {init, update}) to handle plugin commands.

func (*App) Start

func (a *App) Start() error

Start starts the HTTP server, opens the default browser, and blocks forever.

type Command

type Command struct {
	Op   string `protobuf:"bytes,1,opt,name=op,proto3" json:"op,omitempty"`     // "text","value","checked","display","class","attr","plugin","list","list-append","list-truncate","re-event"
	Id   string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`     // data-gid of target element
	Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` // class name (for "class" op), attr name, plugin name
	// Types that are valid to be assigned to Val:
	//
	//	*Command_StrVal
	//	*Command_BoolVal
	//	*Command_NumVal
	//	*Command_RawVal
	Val   isCommand_Val `protobuf_oneof:"val"`
	Items []*ListItem   `protobuf:"bytes,8,rep,name=items,proto3" json:"items,omitempty"` // for "list" and "list-append" ops
	// contains filtered or unexported fields
}

Command is a single DOM operation.

func (*Command) Descriptor deprecated

func (*Command) Descriptor() ([]byte, []int)

Deprecated: Use Command.ProtoReflect.Descriptor instead.

func (*Command) GetBoolVal

func (x *Command) GetBoolVal() bool

func (*Command) GetId

func (x *Command) GetId() string

func (*Command) GetItems

func (x *Command) GetItems() []*ListItem

func (*Command) GetName

func (x *Command) GetName() string

func (*Command) GetNumVal

func (x *Command) GetNumVal() float64

func (*Command) GetOp

func (x *Command) GetOp() string

func (*Command) GetRawVal

func (x *Command) GetRawVal() []byte

func (*Command) GetStrVal

func (x *Command) GetStrVal() string

func (*Command) GetVal

func (x *Command) GetVal() isCommand_Val

func (*Command) ProtoMessage

func (*Command) ProtoMessage()

func (*Command) ProtoReflect

func (x *Command) ProtoReflect() protoreflect.Message

func (*Command) Reset

func (x *Command) Reset()

func (*Command) String

func (x *Command) String() string

type Command_BoolVal

type Command_BoolVal struct {
	BoolVal bool `protobuf:"varint,5,opt,name=bool_val,json=boolVal,proto3,oneof"`
}

type Command_NumVal

type Command_NumVal struct {
	NumVal float64 `protobuf:"fixed64,6,opt,name=num_val,json=numVal,proto3,oneof"`
}

type Command_RawVal

type Command_RawVal struct {
	RawVal []byte `protobuf:"bytes,7,opt,name=raw_val,json=rawVal,proto3,oneof"` // JSON bytes for plugin data, re-event, etc.
}

type Command_StrVal

type Command_StrVal struct {
	StrVal string `protobuf:"bytes,4,opt,name=str_val,json=strVal,proto3,oneof"`
}

type Component

type Component struct {
	// contains filtered or unexported fields
}

Component is embedded in user structs to make them godom components.

func (Component) Emit

func (c Component) Emit(method string, args ...interface{})

Emit sends a named event up the component tree. Each ancestor with a matching method name gets called, bottom-up. Arguments are passed to the method.

func (Component) Refresh

func (c Component) Refresh()

Refresh triggers a re-render and broadcasts the current state to all connected browsers. Call this from a background goroutine after mutating fields to push updates without user interaction.

type Envelope

type Envelope struct {
	Args  []float64 `protobuf:"fixed64,1,rep,packed,name=args,proto3" json:"args,omitempty"` // browser-side args (mouse x/y, wheel deltaY)
	Msg   []byte    `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"`            // pre-built WSMessage bytes from Go
	Value []byte    `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"`        // input value for bind events (JSON-encoded)
	// contains filtered or unexported fields
}

Envelope is what the bridge sends to Go on every event. The bridge never opens msg — it forwards it untouched. args carries browser-side data (mouse coords, wheel delta).

func (*Envelope) Descriptor deprecated

func (*Envelope) Descriptor() ([]byte, []int)

Deprecated: Use Envelope.ProtoReflect.Descriptor instead.

func (*Envelope) GetArgs

func (x *Envelope) GetArgs() []float64

func (*Envelope) GetMsg

func (x *Envelope) GetMsg() []byte

func (*Envelope) GetValue

func (x *Envelope) GetValue() []byte

func (*Envelope) ProtoMessage

func (*Envelope) ProtoMessage()

func (*Envelope) ProtoReflect

func (x *Envelope) ProtoReflect() protoreflect.Message

func (*Envelope) Reset

func (x *Envelope) Reset()

func (*Envelope) String

func (x *Envelope) String() string

type EventCommand

type EventCommand struct {
	Id  string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`   // data-gid
	On  string `protobuf:"bytes,2,opt,name=on,proto3" json:"on,omitempty"`   // "click","keydown","mousedown","mousemove","mouseup","wheel","input"
	Key string `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"` // key filter for keydown
	Msg []byte `protobuf:"bytes,4,opt,name=msg,proto3" json:"msg,omitempty"` // pre-built Envelope.msg bytes — bridge sends back untouched
	// contains filtered or unexported fields
}

EventCommand describes an event listener the bridge should register.

func (*EventCommand) Descriptor deprecated

func (*EventCommand) Descriptor() ([]byte, []int)

Deprecated: Use EventCommand.ProtoReflect.Descriptor instead.

func (*EventCommand) GetId

func (x *EventCommand) GetId() string

func (*EventCommand) GetKey

func (x *EventCommand) GetKey() string

func (*EventCommand) GetMsg

func (x *EventCommand) GetMsg() []byte

func (*EventCommand) GetOn

func (x *EventCommand) GetOn() string

func (*EventCommand) ProtoMessage

func (*EventCommand) ProtoMessage()

func (*EventCommand) ProtoReflect

func (x *EventCommand) ProtoReflect() protoreflect.Message

func (*EventCommand) Reset

func (x *EventCommand) Reset()

func (*EventCommand) String

func (x *EventCommand) String() string

type ListItem

type ListItem struct {
	Html string          `protobuf:"bytes,1,opt,name=html,proto3" json:"html,omitempty"`
	Cmds []*Command      `protobuf:"bytes,2,rep,name=cmds,proto3" json:"cmds,omitempty"`
	Evts []*EventCommand `protobuf:"bytes,3,rep,name=evts,proto3" json:"evts,omitempty"`
	// contains filtered or unexported fields
}

ListItem is a single item in a g-for list render.

func (*ListItem) Descriptor deprecated

func (*ListItem) Descriptor() ([]byte, []int)

Deprecated: Use ListItem.ProtoReflect.Descriptor instead.

func (*ListItem) GetCmds

func (x *ListItem) GetCmds() []*Command

func (*ListItem) GetEvts

func (x *ListItem) GetEvts() []*EventCommand

func (*ListItem) GetHtml

func (x *ListItem) GetHtml() string

func (*ListItem) ProtoMessage

func (*ListItem) ProtoMessage()

func (*ListItem) ProtoReflect

func (x *ListItem) ProtoReflect() protoreflect.Message

func (*ListItem) Reset

func (x *ListItem) Reset()

func (*ListItem) String

func (x *ListItem) String() string

type ServerMessage

type ServerMessage struct {
	Type     string          `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` // "init" or "update"
	Commands []*Command      `protobuf:"bytes,2,rep,name=commands,proto3" json:"commands,omitempty"`
	Events   []*EventCommand `protobuf:"bytes,3,rep,name=events,proto3" json:"events,omitempty"`
	// contains filtered or unexported fields
}

ServerMessage is the top-level message sent from Go to the browser.

func (*ServerMessage) Descriptor deprecated

func (*ServerMessage) Descriptor() ([]byte, []int)

Deprecated: Use ServerMessage.ProtoReflect.Descriptor instead.

func (*ServerMessage) GetCommands

func (x *ServerMessage) GetCommands() []*Command

func (*ServerMessage) GetEvents

func (x *ServerMessage) GetEvents() []*EventCommand

func (*ServerMessage) GetType

func (x *ServerMessage) GetType() string

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

type WSMessage

type WSMessage struct {
	Type   string   `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` // "call" or "bind"
	Method string   `protobuf:"bytes,2,opt,name=method,proto3" json:"method,omitempty"`
	Args   [][]byte `protobuf:"bytes,3,rep,name=args,proto3" json:"args,omitempty"`   // pre-resolved args, each JSON-encoded
	Field  string   `protobuf:"bytes,4,opt,name=field,proto3" json:"field,omitempty"` // field name (for bind)
	Value  []byte   `protobuf:"bytes,5,opt,name=value,proto3" json:"value,omitempty"` // new value (for bind, added by bridge)
	Scope  string   `protobuf:"bytes,6,opt,name=scope,proto3" json:"scope,omitempty"` // "forGID:idx" for child components
	// contains filtered or unexported fields
}

WSMessage is the inner message pre-built by Go at render time. Serialized into EventCommand.msg and Envelope.msg.

func (*WSMessage) Descriptor deprecated

func (*WSMessage) Descriptor() ([]byte, []int)

Deprecated: Use WSMessage.ProtoReflect.Descriptor instead.

func (*WSMessage) GetArgs

func (x *WSMessage) GetArgs() [][]byte

func (*WSMessage) GetField

func (x *WSMessage) GetField() string

func (*WSMessage) GetMethod

func (x *WSMessage) GetMethod() string

func (*WSMessage) GetScope

func (x *WSMessage) GetScope() string

func (*WSMessage) GetType

func (x *WSMessage) GetType() string

func (*WSMessage) GetValue

func (x *WSMessage) GetValue() []byte

func (*WSMessage) ProtoMessage

func (*WSMessage) ProtoMessage()

func (*WSMessage) ProtoReflect

func (x *WSMessage) ProtoReflect() protoreflect.Message

func (*WSMessage) Reset

func (x *WSMessage) Reset()

func (*WSMessage) String

func (x *WSMessage) String() string

Directories

Path Synopsis
examples
clock command
counter command
drag-demo command
drag-tiles command
progress-bar command
solar-system command
stock-ticker command
todolist command
plugins
chartjs
Package chartjs provides a godom plugin for Chart.js integration.
Package chartjs provides a godom plugin for Chart.js integration.

Jump to

Keyboard shortcuts

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