types

package
v0.0.0-...-3c890e6 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2026 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Overview

Package types provides some implementation-agnostic types to use throughout treefiddy.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Actions

type Actions struct {
	Click           string
	Enter           string
	PostEdictEdicts map[string]string `yaml:"post_edict_edicts"`
}

type Bind

type Bind struct {
	Edict     string   `yaml:"edict,omitempty"`
	Arguments []string `yaml:"arguments,omitempty"`
	Key       int      `yaml:"key,omitempty"`
	Rune      string   `yaml:"rune,omitempty"`
}

type Binds

type Binds []Bind

type Config

type Config struct {
	Actions   Actions
	Binds     Binds
	Modes     Modes
	Shortcuts Shortcuts
	UseMouse  bool     `yaml:"use_mouse"`
	Systems   Systems  `yaml:"systems"`
	WatchDirs []string `yaml:"watch_dirs"`
}

func EnsureConfig

func EnsureConfig() (cfg Config)

type EdictContext

type EdictContext struct {
	Root      string
	Selected  string
	Arguments []string
	// Results from last edict chain.
	Err      error
	Msg      string
	Previous *EdictContext
}

func (*EdictContext) AbsPathFromRel

func (ctx *EdictContext) AbsPathFromRel(path string) (string, error)

func (*EdictContext) Error

func (ctx *EdictContext) Error(err error) EdictContext

func (*EdictContext) FromToAbsPath

func (ctx *EdictContext) FromToAbsPath() (string, string, error)

func (*EdictContext) Last

func (ctx *EdictContext) Last(msg string, err error) EdictContext

func (*EdictContext) Ok

func (ctx *EdictContext) Ok(msg string) EdictContext

func (*EdictContext) RelPathFromAbs

func (ctx *EdictContext) RelPathFromAbs(path string) (string, error)

func (*EdictContext) TargetAbsPath

func (ctx *EdictContext) TargetAbsPath() (string, error)

func (*EdictContext) Wrap

func (ctx *EdictContext) Wrap(c EdictContext)

type FileReference

type FileReference struct {
	OriginalName string
	Name         string
	Path         string
	Dir          bool
}

FileReference stores information about a file for use in tree node generation.

type Mode

type Mode struct {
	Rune  string `yaml:"rune,omitempty"`
	Binds Binds  `yaml:"binds,omitempty"`
}

func (*Mode) GetBind

func (m *Mode) GetBind(r rune) *Bind

type Modes

type Modes map[string]Mode

type NodeMangling

type NodeMangling struct {
	Prefix      string
	PrefixColor string
	Suffix      string
	SuffixColor string
	Name        string
	Color       string
}

NodeMangling is the result of node mangling.

type Shortcut

type Shortcut struct {
	Edict     string
	Arguments []string
	Keyword   string
}

type Shortcuts

type Shortcuts []Shortcut

type Systems

type Systems struct {
	JavaScriptPlugins bool `yaml:"javascript_plugins"`
}

Jump to

Keyboard shortcuts

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