plugin

package
v0.0.0-...-4e0d236 Latest Latest
Warning

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

Go to latest
Published: May 11, 2026 License: Apache-2.0 Imports: 2 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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyRangeRead

func ApplyRangeRead(data []byte, offset int64, size int64) ([]byte, error)

ApplyRangeRead applies offset and size to data slice Returns io.EOF if offset+size >= len(data)

Types

type ConfigParameter

type ConfigParameter struct {
	Name        string `json:"name"`        // Parameter name
	Type        string `json:"type"`        // Parameter type (string, int, bool, etc.)
	Required    bool   `json:"required"`    // Whether the parameter is required
	Default     string `json:"default"`     // Default value (as string)
	Description string `json:"description"` // Parameter description
}

ConfigParameter describes a configuration parameter for a plugin

type MountPoint

type MountPoint struct {
	Path   string
	Plugin ServicePlugin
}

MountPoint represents a mounted service plugin

type PluginMetadata

type PluginMetadata struct {
	Name        string
	Version     string
	Description string
	Author      string
}

PluginMetadata contains information about a plugin

type ServicePlugin

type ServicePlugin interface {
	// Name returns the plugin name
	Name() string

	// Validate validates the plugin configuration before initialization
	// This method should check all required parameters and validate their types/values
	// Returns an error if the configuration is invalid
	Validate(config map[string]interface{}) error

	// Initialize initializes the plugin with optional configuration
	// This method is called after Validate succeeds
	Initialize(config map[string]interface{}) error

	// GetFileSystem returns the FileSystem implementation for this plugin
	// This allows the plugin to handle file operations in a service-specific way
	GetFileSystem() filesystem.FileSystem

	// GetReadme returns the README content for this plugin
	// This provides documentation about the plugin's functionality and usage
	GetReadme() string

	// GetConfigParams returns the list of configuration parameters supported by this plugin
	// This provides metadata about what configuration options are available
	GetConfigParams() []ConfigParameter

	// Shutdown gracefully shuts down the plugin
	Shutdown() error
}

ServicePlugin defines the interface for a service that can be mounted to a path Each plugin acts as a virtual file system providing service-specific operations

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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