playground

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2026 License: GPL-3.0 Imports: 6 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package playground provides a web-based PSL playground with WASM support.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PlaygroundRequest

type PlaygroundRequest struct {
	PSL    string `json:"psl"`
	Action string `json:"action"` // "validate", "decode", "encode", "structure"
	Hex    string `json:"hex,omitempty"`
	JSON   string `json:"json,omitempty"`
}

PlaygroundRequest is a request to the playground API.

type PlaygroundResponse

type PlaygroundResponse struct {
	Success bool   `json:"success"`
	Result  any    `json:"result,omitempty"`
	Error   string `json:"error,omitempty"`
}

PlaygroundResponse is a response from the playground API.

type Server

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

Server is the playground HTTP server.

func NewServer

func NewServer(lib *protocol.Library, addr string) *Server

NewServer creates a new playground server.

func (*Server) Start

func (s *Server) Start() error

Start starts the playground server.

Jump to

Keyboard shortcuts

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