wasmdata

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2025 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// EntrypointGreet processes JSON input with "input" field and returns a greeting.
	// Input: {"input": "world"} -> Output: {"greeting": "Hello, world!"}
	EntrypointGreet = "greet"

	// EntrypointRun is an alias for the greet function.
	EntrypointRun = "run"

	// EntrypointProcessComplex processes complex Request objects and returns Response objects.
	// Handles structured data with ID, timestamp, data maps, tags, metadata, count, and active status.
	EntrypointProcessComplex = "process_complex"

	// EntrypointCountVowels counts vowels in the input string.
	// Input: {"input": "hello"} -> Output: {"count": 2, "vowels": "aeiouAEIOU", "input": "hello"}
	EntrypointCountVowels = "count_vowels"

	// EntrypointReverseString reverses the input string, handling UTF-8 correctly.
	// Input: {"input": "hello"} -> Output: {"reversed": "olleh"}
	EntrypointReverseString = "reverse_string"

	// EntrypointGreetNamespaced processes namespaced JSON input and returns a greeting.
	// Input: {"data": {"input": "world"}} -> Output: {"greeting": "Hello, world!"}
	EntrypointGreetNamespaced = "greet_namespaced"

	// EntrypointCountVowelsNamespaced counts vowels in namespaced input.
	// Input: {"data": {"input": "hello"}} -> Output: {"count": 2, "vowels": "aeiouAEIOU", "input": "hello"}
	EntrypointCountVowelsNamespaced = "count_vowels_namespaced"

	// EntrypointReverseStringNamespaced reverses namespaced input string, handling UTF-8 correctly.
	// Input: {"data": {"input": "hello"}} -> Output: {"reversed": "olleh"}
	EntrypointReverseStringNamespaced = "reverse_string_namespaced"
)

Entrypoint constants for the embedded WASM module. These correspond to the exported functions from the WASM module.

Variables

View Source
var TestModule []byte

TestModule contains the compiled WASM bytecode for testing. This module is compiled from examples/main.go and provides several exported functions for testing purposes.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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