kiteext

package
v0.0.0-...-9c55465 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PathMap

type PathMap struct {

	// path alias map: {alias: path}
	maputil.Aliases `json:"path_map"`
	// if true, must start with prefix on resolve path.
	Strict bool `json:"strict"`
	// allowed prefix mark for alias, use on resolve. eg: "$,#,@"
	Prefixes string `json:"prefixes"`
	// FallbackFn if alias not exists, will call this func to get path.
	FallbackFn func(path string) string
	// contains filtered or unexported fields
}

PathMap struct

func NewPathMap

func NewPathMap(opFns ...func(pm *PathMap)) *PathMap

NewPathMap instance

func (*PathMap) Data

func (p *PathMap) Data() map[string]string

Data get all alias map data

func (*PathMap) Resolve

func (p *PathMap) Resolve(path string) string

Resolve path. eg: $home/some.txt => /home/USER/some.txt

type PluginRunner

type PluginRunner struct {
	// DenyNames deny plugin bin names
	DenyNames []string `json:"deny_names"`
	// PluginDirs plugin bin search dirs
	PluginDirs []string `json:"plugin_dirs"`
	ConfigFile []string `json:"config_file"`
}

PluginRunner struct

type VarMap

type VarMap struct {
	maputil.Aliases
	Prefix string
	// contains filtered or unexported fields
}

VarMap struct

func NewVarMap

func NewVarMap(smp map[string]string) *VarMap

NewVarMap instance

func (*VarMap) Data

func (m *VarMap) Data() map[string]string

Data map get

func (*VarMap) LoadMap

func (m *VarMap) LoadMap(smp map[string]string)

LoadMap path

func (*VarMap) Replace

func (m *VarMap) Replace(s string) string

Replace vars in string.

func (*VarMap) Resolve

func (m *VarMap) Resolve(path string) string

Resolve path

Jump to

Keyboard shortcuts

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