exportapi

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExportOptions

type ExportOptions struct {
	// Editor type
	EditorType pluginapi.EditorType
	// Optional, existing base keymap for specific editor
	Base io.Reader
	// TODO(xinnjie): export api level enum is not a good idea
	DiffType keymapv1.ExportKeymapRequest_DiffType
	// file path for the keymap config
	FilePath string
}

ExportOptions provides configuration for an export operation.

type ExportReport

type ExportReport struct {
	// The diff between the base and the exported keymap.
	Diff string
}

ExportReport details issues encountered during an export operation.

type Exporter

type Exporter interface {
	// Export converts a KeymapSetting and writes it to a destination stream.
	// It returns a report detailing any issues encountered during the conversion.
	Export(
		ctx context.Context,
		destination io.Writer,
		setting *keymapv1.Keymap,
		opts ExportOptions,
	) (*ExportReport, error)
}

Exporter defines the contract for converting a universal KeymapSetting into an editor-specific format.

Jump to

Keyboard shortcuts

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