plugin_webview

package
v0.50.0 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package plugin_webview provides conventions for plugin ObjectType web viewer registration.

Plugins that provide ObjectType viewers use the HandleWebView directive forwarding mechanism from bldr. The naming convention for web view IDs is:

object-viewer:{typeID}:{objectKey}

For example: object-viewer:unixfs/fs-node:my/fs

The plugin's configset includes a handle-web-view-rpc controller entry that matches this pattern and forwards HandleWebView directives to the plugin. The plugin then calls SetRenderMode with RenderMode_REACT_COMPONENT and a script_path pointing to the viewer component in the plugin's dist UnixFS.

Index

Constants

View Source
const ObjectViewerWebViewIDPrefix = "object-viewer:"

ObjectViewerWebViewIDPrefix is the prefix for ObjectType viewer web view IDs. Web views for ObjectType viewers use the pattern: "object-viewer:{typeID}:{objectKey}"

Variables

This section is empty.

Functions

func AllObjectViewerWebViewIDRegex

func AllObjectViewerWebViewIDRegex() string

AllObjectViewerWebViewIDRegex returns the regex pattern for matching all ObjectType viewer HandleWebView directives.

func BuildWebViewID

func BuildWebViewID(typeID, key string) string

BuildWebViewID constructs a web view ID for an ObjectType viewer.

func ObjectViewerWebViewIDRegex

func ObjectViewerWebViewIDRegex(typeID string) string

ObjectViewerWebViewIDRegex returns the regex pattern for matching HandleWebView directives for a specific ObjectType.

Types

This section is empty.

Jump to

Keyboard shortcuts

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