packaging

package
v0.6.5 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package packaging provides ZIP-based plugin packaging and extraction.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PackagePlugin

func PackagePlugin(pluginDir, outputPath string) error

PackagePlugin creates a ZIP package from a plugin directory. The directory should contain:

  • manifest.json (required)
  • *.wasm file (required for WASM plugins)
  • assets/ directory (optional)
  • i18n/ directory (optional)

func ValidatePackage

func ValidatePackage(packagePath string) (*plugin.GKRegistration, error)

ValidatePackage checks if a ZIP file is a valid plugin package.

Types

type PluginPackage

type PluginPackage struct {
	Manifest plugin.GKRegistration
	WASMPath string            // Path to .wasm file within package
	Assets   map[string]string // asset name -> path within package
}

PluginPackage represents a packaged plugin (ZIP file).

func ExtractPlugin

func ExtractPlugin(packagePath, targetDir string) (*PluginPackage, error)

ExtractPlugin extracts a plugin package to the target directory. Returns the manifest and path to the extracted WASM file.

Jump to

Keyboard shortcuts

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