plugin

package
v0.0.0-...-e948ea5 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

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

	// 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