bridge

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EmbeddedHTTPResponsePayload

type EmbeddedHTTPResponsePayload struct {
	Status     int               `json:"status"`
	Headers    map[string]string `json:"headers,omitempty"`
	SetCookies []string          `json:"setCookies,omitempty"`
	BodyBase64 string            `json:"bodyBase64"`
}

type NativeHost

type NativeHost interface {
	Dispatch(sceneID string, commandJSON string) error
	Request(sceneID string, requestJSON string) (string, error)
}

type RuntimeHandle

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

func StartRuntime

func StartRuntime(configJSON string, host NativeHost) (*RuntimeHandle, error)

func (*RuntimeHandle) CloseScene

func (h *RuntimeHandle) CloseScene(sceneID string) error

func (*RuntimeHandle) EmitShellEvent

func (h *RuntimeHandle) EmitShellEvent(sceneID string, eventJSON string) error

func (*RuntimeHandle) HandleClientMessage

func (h *RuntimeHandle) HandleClientMessage(sceneID string, messageJSON string) error

func (*RuntimeHandle) HandleRequest

func (h *RuntimeHandle) HandleRequest(sceneID string, method string, path string, headersJSON string, body []byte) (string, error)

func (*RuntimeHandle) PrepareScene

func (h *RuntimeHandle) PrepareScene(sceneID string, path string) (string, error)

func (*RuntimeHandle) Stop

func (h *RuntimeHandle) Stop()

type SceneLaunchPayload

type SceneLaunchPayload struct {
	SceneID      string `json:"sceneID"`
	URL          string `json:"url"`
	WebSocketURL string `json:"webSocketURL"`
}

type StartRequest

type StartRequest struct {
	BundleID              string `json:"bundleID"`
	AppVersion            string `json:"appVersion"`
	BuildChannel          string `json:"buildChannel"`
	ApplicationSupportDir string `json:"applicationSupportDir"`
	CachesDir             string `json:"cachesDir"`
	LogsDir               string `json:"logsDir"`
	SessionStorePath      string `json:"sessionStorePath"`
}

Jump to

Keyboard shortcuts

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