api

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	Attach(tree.Node) error
	Node() tree.Node
}

type Cmd

type Cmd struct {
	Lifetime util.Lifetime
	Tree     *tree.Tree
}

func (*Cmd) New

func (c *Cmd) New(
	groupId tree.NodeID,
	path string,
	params *janet.Named[CmdParams],
) (tree.NodeID, error)

func (*Cmd) Path

func (c *Cmd) Path(id tree.NodeID) (*string, error)

type CmdParams

type CmdParams struct {
	Command string
	Args    []string
	Name    string
}

type GroupModule

type GroupModule struct {
	Tree *tree.Tree
}

func (*GroupModule) Children

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

func (*GroupModule) New

func (g *GroupModule) New(
	parentId tree.NodeID,
	params *janet.Named[NodeParams],
) (tree.NodeID, 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 tree.NodeID) error

func (*PaneModule) Current

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

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) Join

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

type TreeModule

type TreeModule struct {
	Tree *tree.Tree
}

func (*TreeModule) Group

func (t *TreeModule) Group(id tree.NodeID) bool

func (*TreeModule) Kill added in v0.1.1

func (t *TreeModule) Kill(id tree.NodeID) error

func (*TreeModule) Name

func (t *TreeModule) Name(id tree.NodeID) *string

func (*TreeModule) Pane

func (t *TreeModule) Pane(id tree.NodeID) bool

func (*TreeModule) Parent

func (t *TreeModule) Parent(id tree.NodeID) *tree.NodeID

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 tree.NodeID, name string)

Jump to

Keyboard shortcuts

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