api

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2024 License: MIT Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	KEYWORD_ROOT   = janet.Keyword("root")
	KEYWORD_TIME   = janet.Keyword("time")
	KEYWORD_COPY   = janet.Keyword("copy")
	KEYWORD_CLIENT = janet.Keyword("client")

	KEYWORD_RE = janet.Keyword("re")
)
View Source
var (
	KEYWORD_INFO  = janet.Keyword("info")
	KEYWORD_WARN  = janet.Keyword("warn")
	KEYWORD_ERROR = janet.Keyword("error")
)
View Source
var DOCS_CMD string
View Source
var DOCS_EXEC string
View Source
var DOCS_GROUP string
View Source
var DOCS_INPUT string
View Source
var DOCS_KEY string
View Source
var DOCS_LAYOUT string
View Source
var DOCS_MSG string
View Source
var DOCS_PANE string
View Source
var DOCS_PARAM string
View Source
var DOCS_PATH string
View Source
var DOCS_REPLAY string
View Source
var DOCS_STYLE string
View Source
var DOCS_TREE string
View Source
var DOCS_VIEWPORT string

Functions

This section is empty.

Types

type BindParams added in v0.1.16

type BindParams struct {
	Tag string
}

type Binding added in v0.1.11

type Binding struct {
	Tag      string
	Sequence []string
	Function *janet.Value
}

type Client

type Client interface {
	Attach(tree.Node) error
	HistoryForward() error
	HistoryBackward() error
	Node() tree.Node
	Get(key string) (value interface{}, ok bool)
	Params() *params.Parameters
	OuterLayers() *screen.Layers
	SetLayout(layout.Layout) error
	GetLayout() layout.Layout
	Frame() *frames.Framer
	Binds() []Binding
	Toast(toasts.Toast)
}

type CmdModule added in v0.1.10

type CmdModule struct {
	Server               Server
	Lifetime             util.Lifetime
	Tree                 *tree.Tree
	TimeBinds, CopyBinds *bind.BindScope
}

func (*CmdModule) Commands added in v0.1.13

func (c *CmdModule) Commands(id *janet.Value) (*[]detect.Command, error)

func (*CmdModule) Documentation added in v0.1.10

func (i *CmdModule) Documentation() string

func (*CmdModule) New added in v0.1.10

func (c *CmdModule) New(
	user interface{},
	groupId *janet.Value,
	cmdParams *janet.Named[CmdParams],
) (tree.NodeID, error)

func (*CmdModule) Path added in v0.1.10

func (c *CmdModule) Path(id *janet.Value) (*string, error)

type CmdParams

type CmdParams struct {
	Command string
	Args    []string
	Name    string
	Path    string
	Restart bool
}

type ExecModule added in v0.1.13

type ExecModule struct {
	Server Server
}

func (*ExecModule) Documentation added in v0.1.13

func (i *ExecModule) Documentation() string

func (*ExecModule) File added in v0.1.13

func (e *ExecModule) File(path string) error

type FuzzyParams added in v0.1.6

type FuzzyParams struct {
	Prompt        string
	Full          bool
	Reverse       bool
	CaseSensitive bool
	Animated      *bool
	Headers       *[]string
}

type GroupModule

type GroupModule struct {
	Tree *tree.Tree
}

func (*GroupModule) Children

func (g *GroupModule) Children(parentId *janet.Value) ([]tree.NodeID, error)

func (*GroupModule) Documentation added in v0.1.6

func (i *GroupModule) Documentation() string

func (*GroupModule) Leaves added in v0.1.6

func (g *GroupModule) Leaves(parentId *janet.Value) ([]tree.NodeID, error)

func (*GroupModule) Mkdir added in v0.2.0

func (g *GroupModule) Mkdir(
	parentId *janet.Value,
	path string,
) (tree.NodeID, error)

func (*GroupModule) New

func (g *GroupModule) New(
	parentId *janet.Value,
	params *janet.Named[NodeParams],
) (tree.NodeID, error)

type InputModule added in v0.1.6

type InputModule struct {
	Lifetime util.Lifetime
	Tree     *tree.Tree
	Server   *server.Server
}

func (*InputModule) Documentation added in v0.1.6

func (i *InputModule) Documentation() string

func (*InputModule) Find added in v0.1.6

func (i *InputModule) Find(
	ctx context.Context,
	context interface{},
	choices *janet.Value,
	named *janet.Named[FuzzyParams],
) (interface{}, error)

func (*InputModule) Text added in v0.2.5

func (i *InputModule) Text(
	ctx context.Context,
	context interface{},
	prompt string,
	named *janet.Named[TextParams],
) (interface{}, error)

type KeyModule added in v0.1.6

type KeyModule struct {
	Tree                 *tree.Tree
	TimeBinds, CopyBinds *bind.BindScope
}

func (*KeyModule) Bind added in v0.1.6

func (k *KeyModule) Bind(
	target *janet.Value,
	sequence *janet.Value,
	callback *janet.Function,
	bindParams *janet.Named[BindParams],
) error

func (*KeyModule) Current added in v0.1.11

func (k *KeyModule) Current(context interface{}) ([]Binding, error)

func (*KeyModule) Documentation added in v0.1.6

func (i *KeyModule) Documentation() string

func (*KeyModule) Get added in v0.1.11

func (k *KeyModule) Get(target *janet.Value) ([]Binding, error)

func (*KeyModule) Remap added in v0.1.11

func (k *KeyModule) Remap(target *janet.Value, from, to *janet.Value) error

func (*KeyModule) Unbind added in v0.1.11

func (k *KeyModule) Unbind(target *janet.Value, sequence *janet.Value) error

type LayoutModule added in v0.4.0

type LayoutModule struct {
}

func (*LayoutModule) Documentation added in v0.4.0

func (l *LayoutModule) Documentation() string

func (*LayoutModule) Get added in v0.4.0

func (l *LayoutModule) Get(context interface{}) (*layout.Layout, error)

func (*LayoutModule) Set added in v0.4.0

func (l *LayoutModule) Set(context interface{}, value *janet.Value) error

type MsgModule added in v0.2.0

type MsgModule struct {
	Server Server
}

func (*MsgModule) Documentation added in v0.2.0

func (m *MsgModule) Documentation() string

func (*MsgModule) Log added in v0.2.0

func (m *MsgModule) Log(level *janet.Value, text string) error

func (*MsgModule) Toast added in v0.2.0

func (m *MsgModule) Toast(context interface{}, level *janet.Value, message string) error

type NodeParams

type NodeParams struct {
	Name string
}

type PaneModule

type PaneModule struct {
	Tree *tree.Tree
}

func (*PaneModule) Attach

func (p *PaneModule) Attach(context interface{}, id *janet.Value) error

func (*PaneModule) Current

func (p *PaneModule) Current(context interface{}) *tree.NodeID

func (*PaneModule) Documentation added in v0.1.6

func (i *PaneModule) Documentation() string

func (*PaneModule) HistoryBackward added in v0.2.0

func (p *PaneModule) HistoryBackward(context interface{}) error

func (*PaneModule) HistoryForward added in v0.2.0

func (p *PaneModule) HistoryForward(context interface{}) error

func (*PaneModule) Screen added in v0.1.13

func (p *PaneModule) Screen(id *janet.Value) ([]string, error)

func (*PaneModule) SendKeys added in v0.9.0

func (p *PaneModule) SendKeys(id *janet.Value, keys []string) error

type ParamModule added in v0.2.0

type ParamModule struct {
	Tree *tree.Tree
}

func (*ParamModule) Documentation added in v0.2.0

func (p *ParamModule) Documentation() string

func (*ParamModule) Get added in v0.2.0

func (p *ParamModule) Get(
	context interface{},
	key *janet.Value,
	named *janet.Named[ParamParams],
) (interface{}, error)

func (*ParamModule) Set added in v0.2.0

func (p *ParamModule) Set(
	context interface{},
	target *janet.Value,
	key *janet.Value,
	value *janet.Value,
) error

type ParamParams added in v0.2.0

type ParamParams struct {
	Target *janet.Value
}

haha

type PathModule

type PathModule struct{}

func (*PathModule) Abs

func (p *PathModule) Abs(path string) (string, error)

func (*PathModule) Base

func (p *PathModule) Base(path string) string

func (*PathModule) Documentation added in v0.1.6

func (i *PathModule) Documentation() string

func (*PathModule) Glob added in v0.1.6

func (p *PathModule) Glob(pattern string) ([]string, error)

func (*PathModule) Join

func (p *PathModule) Join(elem []string) string

type ReplayModule added in v0.1.5

type ReplayModule struct {
	Lifetime             util.Lifetime
	Tree                 *tree.Tree
	TimeBinds, CopyBinds *bind.BindScope
}

func (*ReplayModule) Beginning added in v0.1.5

func (m *ReplayModule) Beginning(context interface{}) error

func (*ReplayModule) BigWordBackward added in v0.1.17

func (m *ReplayModule) BigWordBackward(context interface{}) error

func (*ReplayModule) BigWordEndBackward added in v0.1.17

func (m *ReplayModule) BigWordEndBackward(context interface{}) error

func (*ReplayModule) BigWordEndForward added in v0.1.17

func (m *ReplayModule) BigWordEndForward(context interface{}) error

func (*ReplayModule) BigWordForward added in v0.1.17

func (m *ReplayModule) BigWordForward(context interface{}) error

func (*ReplayModule) CommandBackward added in v0.1.13

func (m *ReplayModule) CommandBackward(context interface{}) error

func (*ReplayModule) CommandForward added in v0.1.13

func (m *ReplayModule) CommandForward(context interface{}) error

func (*ReplayModule) CommandSelectBackward added in v0.1.17

func (m *ReplayModule) CommandSelectBackward(context interface{}) error

func (*ReplayModule) CommandSelectForward added in v0.1.17

func (m *ReplayModule) CommandSelectForward(context interface{}) error

func (*ReplayModule) Copy added in v0.1.5

func (m *ReplayModule) Copy(context interface{}) error

func (*ReplayModule) CursorDown added in v0.1.5

func (m *ReplayModule) CursorDown(context interface{}) error

func (*ReplayModule) CursorLeft added in v0.1.5

func (m *ReplayModule) CursorLeft(context interface{}) error

func (*ReplayModule) CursorRight added in v0.1.5

func (m *ReplayModule) CursorRight(context interface{}) error

func (*ReplayModule) CursorUp added in v0.1.5

func (m *ReplayModule) CursorUp(context interface{}) error

func (*ReplayModule) Documentation added in v0.1.6

func (i *ReplayModule) Documentation() string

func (*ReplayModule) End added in v0.1.5

func (m *ReplayModule) End(context interface{}) error

func (*ReplayModule) EndOfLine added in v0.1.13

func (m *ReplayModule) EndOfLine(context interface{}) error

func (*ReplayModule) EndOfScreenLine added in v0.1.13

func (m *ReplayModule) EndOfScreenLine(context interface{}) error

func (*ReplayModule) FirstNonBlank added in v0.1.13

func (m *ReplayModule) FirstNonBlank(context interface{}) error

func (*ReplayModule) FirstNonBlankScreen added in v0.1.13

func (m *ReplayModule) FirstNonBlankScreen(context interface{}) error

func (*ReplayModule) HalfPageDown added in v0.1.5

func (m *ReplayModule) HalfPageDown(context interface{}) error

func (*ReplayModule) HalfPageUp added in v0.1.5

func (m *ReplayModule) HalfPageUp(context interface{}) error

func (*ReplayModule) JumpAgain added in v0.1.6

func (m *ReplayModule) JumpAgain(context interface{}) error

func (*ReplayModule) JumpBackward added in v0.1.6

func (m *ReplayModule) JumpBackward(context interface{}, char string) error

func (*ReplayModule) JumpForward added in v0.1.6

func (m *ReplayModule) JumpForward(context interface{}, char string) error

func (*ReplayModule) JumpReverse added in v0.1.6

func (m *ReplayModule) JumpReverse(context interface{}) error

func (*ReplayModule) JumpToBackward added in v0.1.6

func (m *ReplayModule) JumpToBackward(context interface{}, char string) error

func (*ReplayModule) JumpToForward added in v0.1.6

func (m *ReplayModule) JumpToForward(context interface{}, char string) error

func (*ReplayModule) LastNonBlank added in v0.1.13

func (m *ReplayModule) LastNonBlank(context interface{}) error

func (*ReplayModule) LastNonBlankScreen added in v0.1.13

func (m *ReplayModule) LastNonBlankScreen(context interface{}) error

func (*ReplayModule) MiddleOfLine added in v0.1.13

func (m *ReplayModule) MiddleOfLine(context interface{}) error

func (*ReplayModule) MiddleOfScreenLine added in v0.1.13

func (m *ReplayModule) MiddleOfScreenLine(context interface{}) error

func (*ReplayModule) Open added in v0.1.6

func (m *ReplayModule) Open(
	id *janet.Value,
	named *janet.Named[ReplayParams],
) error

func (*ReplayModule) OpenFile added in v0.2.0

func (m *ReplayModule) OpenFile(
	groupId *janet.Value,
	path string,
) (tree.NodeID, error)

func (*ReplayModule) Quit added in v0.1.5

func (m *ReplayModule) Quit(context interface{}) error

func (*ReplayModule) ScrollDown added in v0.1.5

func (m *ReplayModule) ScrollDown(context interface{}) error

func (*ReplayModule) ScrollUp added in v0.1.5

func (m *ReplayModule) ScrollUp(context interface{}) error

func (*ReplayModule) SearchAgain added in v0.1.5

func (m *ReplayModule) SearchAgain(context interface{}) error

func (*ReplayModule) SearchBackward added in v0.1.5

func (m *ReplayModule) SearchBackward(context interface{}) error

func (*ReplayModule) SearchForward added in v0.1.5

func (m *ReplayModule) SearchForward(context interface{}) error

func (*ReplayModule) SearchReverse added in v0.1.5

func (m *ReplayModule) SearchReverse(context interface{}) error

func (*ReplayModule) Select added in v0.1.5

func (m *ReplayModule) Select(context interface{}) error

func (*ReplayModule) StartOfLine added in v0.1.13

func (m *ReplayModule) StartOfLine(context interface{}) error

func (*ReplayModule) StartOfScreenLine added in v0.1.13

func (m *ReplayModule) StartOfScreenLine(context interface{}) error

func (*ReplayModule) SwapScreen added in v0.1.13

func (m *ReplayModule) SwapScreen(context interface{}) error

func (*ReplayModule) TimePlay added in v0.1.5

func (m *ReplayModule) TimePlay(context interface{}) error

func (*ReplayModule) TimePlaybackRate added in v0.1.5

func (m *ReplayModule) TimePlaybackRate(context interface{}, rate int) error

func (*ReplayModule) TimeStepBack added in v0.1.5

func (m *ReplayModule) TimeStepBack(context interface{}) error

func (*ReplayModule) TimeStepForward added in v0.1.5

func (m *ReplayModule) TimeStepForward(context interface{}) error

func (*ReplayModule) WordBackward added in v0.1.17

func (m *ReplayModule) WordBackward(context interface{}) error

func (*ReplayModule) WordEndBackward added in v0.1.17

func (m *ReplayModule) WordEndBackward(context interface{}) error

func (*ReplayModule) WordEndForward added in v0.1.17

func (m *ReplayModule) WordEndForward(context interface{}) error

func (*ReplayModule) WordForward added in v0.1.17

func (m *ReplayModule) WordForward(context interface{}) error

type ReplayParams added in v0.2.0

type ReplayParams struct {
	Main     bool
	Copy     bool
	Location *geom.Vec2
}

type Server added in v0.1.13

type Server interface {
	SocketName() string
	ExecuteJanet(path string) error
	Log(level zerolog.Level, message string)
}

type StyleModule added in v0.6.0

type StyleModule struct {
}

func (*StyleModule) Documentation added in v0.6.0

func (s *StyleModule) Documentation() string

func (*StyleModule) Render added in v0.6.0

func (s *StyleModule) Render(style *style.Style, text string) string

type TextParams added in v0.2.5

type TextParams struct {
	Placeholder *string
	Preset      *string
	Full        bool
	Reverse     bool
	Animated    *bool
}

type TreeModule

type TreeModule struct {
	Tree *tree.Tree
}

func (*TreeModule) Documentation added in v0.1.6

func (i *TreeModule) Documentation() string

func (*TreeModule) Group

func (t *TreeModule) Group(id *janet.Value) bool

func (*TreeModule) Kill added in v0.1.1

func (t *TreeModule) Kill(id *janet.Value) error

func (*TreeModule) Name

func (t *TreeModule) Name(id *janet.Value) *string

func (*TreeModule) Pane

func (t *TreeModule) Pane(id *janet.Value) bool

func (*TreeModule) Parent

func (t *TreeModule) Parent(id *janet.Value) (*tree.NodeID, error)

func (*TreeModule) Path added in v0.1.6

func (t *TreeModule) Path(id *janet.Value) (*string, error)

func (*TreeModule) Renames

func (t *TreeModule) Renames() map[string]string

func (*TreeModule) Root

func (t *TreeModule) Root() tree.NodeID

func (*TreeModule) SetName

func (t *TreeModule) SetName(id *janet.Value, name string) error

type ViewportModule added in v0.1.6

type ViewportModule struct {
}

func (*ViewportModule) Documentation added in v0.1.6

func (i *ViewportModule) Documentation() string

func (*ViewportModule) GetAnimations added in v0.3.0

func (c *ViewportModule) GetAnimations(context interface{}) []string

func (*ViewportModule) GetFrames added in v0.1.6

func (c *ViewportModule) GetFrames(context interface{}) []string

func (*ViewportModule) SetFrame added in v0.1.6

func (c *ViewportModule) SetFrame(context interface{}, name string) error

Jump to

Keyboard shortcuts

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