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: 0

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