packaging

package
v0.9.0-wip Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2026 License: Apache-2.0 Imports: 8 Imported by: 0 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 packaging provides ZIP-based plugin packaging and extraction.

Index

Constants

View Source
const (
	// Security limits for ZIP extraction
	MaxFileSize  = 100 << 20 // 100 MB per file
	MaxTotalSize = 500 << 20 // 500 MB total extraction
	MaxFileCount = 1000      // Maximum number of files in archive
)

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:

  • plugin.yaml (required)
  • *.wasm file (required for wasm runtime)
  • binary (required for grpc runtime)
  • assets/ directory (optional)
  • i18n/ directory (optional)

func ValidatePackage

func ValidatePackage(packagePath string) (*pkgplugin.PluginManifest, error)

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

Types

type PluginPackage

type PluginPackage struct {
	Manifest    pkgplugin.PluginManifest
	RuntimeType string            // "wasm", "grpc", or "template"
	BinaryPath  string            // Path to binary/wasm file (empty for template plugins)
	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 package info including manifest and detected runtime type.

Jump to

Keyboard shortcuts

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