guishared

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2026 License: GPL-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BrowseDirectory

func BrowseDirectory(req api.BrowseDirectoryRequest, fallbackPath string) (api.BrowseDirectoryResponse, error)

func BrowseDirectoryFallback

func BrowseDirectoryFallback(dbPath string) string

func BrowseDirectoryWithinRoot

func BrowseDirectoryWithinRoot(req api.BrowseDirectoryRequest, fallbackPath string, rootPath string) (api.BrowseDirectoryResponse, error)

func BrowseDirectoryWithinRoots

func BrowseDirectoryWithinRoots(req api.BrowseDirectoryRequest, fallbackPath string, rootPaths []string) (api.BrowseDirectoryResponse, error)

func SeedRunCorePreparedMeta

func SeedRunCorePreparedMeta(ctx context.Context, source api.Core, target api.Core, req api.Request) error

func ValidateBrowseSelection

func ValidateBrowseSelection(path string, wantDir bool) error

Types

type PreparedMetaExporter

type PreparedMetaExporter interface {
	ExportGUICachedPreparedMeta(ctx context.Context, req api.Request) (api.PreparedMetadata, bool, error)
}

type PreparedMetaImporter

type PreparedMetaImporter interface {
	ImportPreparedMetadataForGUI(ctx context.Context, req api.Request, meta api.PreparedMetadata) error
}

type Runtime

type Runtime struct {
	Core   api.Core
	Logger *logging.Logger
}

Runtime bundles the logger and core service built from a config snapshot. Both the GUI App and the web Backend reload their runtime when the user edits settings; this helper keeps the build-and-swap pattern in one place.

func BuildRuntime

func BuildRuntime(ctx context.Context, cfg config.Config, repo *db.SQLiteRepository) (Runtime, error)

BuildRuntime constructs a fresh logger and core service for cfg using the existing app/backend context and shared repository. On failure any partially initialized resources are cleaned up before returning.

Jump to

Keyboard shortcuts

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