scripting

package
v0.0.0-...-e67fd50 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package scripting provides functionality for discovering and loading Lua scripts used for customization and extension of divekit operations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DiscoverAvailableLanguages

func DiscoverAvailableLanguages() []string

DiscoverAvailableLanguages scans the user-level scripts directory (e.g., ~/.divekit/scripts) for language pack directories and returns their names. If no packs can be discovered, it falls back to a sensible default (currently: ["java"]).

func ScriptDir

func ScriptDir() (string, error)

ScriptDir returns the global scripts directory path

Types

type Error

type Error struct {
	apperror.Carrier
	ErrorType ErrorType
	Message   string
	Err       error
}

Error represents a scripting error with type and optional wrapped error

func NewHookExecutionError

func NewHookExecutionError(err error) *Error

NewHookExecutionError creates an error for hook execution failures.

func NewLoadScriptError

func NewLoadScriptError(err error) *Error

NewLoadScriptError creates an error for script loading failures.

func NewRegistrationError

func NewRegistrationError(err error) *Error

NewRegistrationError creates an error for registration failures.

func NewSandboxViolationError

func NewSandboxViolationError(details string, err error) *Error

NewSandboxViolationError creates an error for sandbox violations.

func NewScriptNotFoundError

func NewScriptNotFoundError(path string) *Error

NewScriptNotFoundError creates an error for missing script.

func (*Error) Error

func (e *Error) Error() string

func (*Error) Unwrap

func (e *Error) Unwrap() error

type ErrorType

type ErrorType int

ErrorType defines domain-based error categories for the scripting package.

const (
	// ErrScript indicates script loading or execution errors.
	ErrScript ErrorType = iota
	// ErrSecurity indicates sandbox or security violations.
	ErrSecurity
	// ErrNotFound indicates missing scripts.
	ErrNotFound
)

Directories

Path Synopsis
Package contracts defines interfaces for scripting and transformation operations.
Package contracts defines interfaces for scripting and transformation operations.
Package lua provides Lua scripting engine integration
Package lua provides Lua scripting engine integration

Jump to

Keyboard shortcuts

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