Documentation
¶
Overview ¶
Package app implements grit's business logic layer.
Index ¶
- Constants
- Variables
- type App
- func (a *App) AddChild(name string, parent interface{}) (*multitree.Node, error)
- func (a *App) AddChildTree(tree *multitree.Node, parent interface{}) (int64, error)
- func (a *App) AddRoot(name string) (*multitree.Node, error)
- func (a *App) AddRootTree(tree *multitree.Node) (int64, error)
- func (a *App) CheckNode(selector interface{}) error
- func (a *App) Close()
- func (a *App) GetDateNodes() ([]*multitree.Node, error)
- func (a *App) GetGraph(selector interface{}) (*multitree.Node, error)
- func (a *App) GetNode(selector interface{}) (*multitree.Node, error)
- func (a *App) GetNodeByAlias(alias string) (*multitree.Node, error)
- func (a *App) GetNodeByName(name string) (*multitree.Node, error)
- func (a *App) GetRoots() ([]*multitree.Node, error)
- func (a *App) LinkNodes(origin, dest interface{}) (*multitree.Link, error)
- func (a *App) RemoveNode(selector interface{}) ([]*multitree.Node, error)
- func (a *App) RemoveNodeRecursive(selector interface{}) ([]*multitree.Node, error)
- func (a *App) RenameNode(selector interface{}, name string) error
- func (a *App) SetAlias(id int64, alias string) error
- func (a *App) UncheckNode(selector interface{}) error
- func (a *App) UnlinkNodes(origin, dest interface{}) error
- type AppError
- type ErrCode
Constants ¶
const (
AppName = "grit"
)
Variables ¶
var (
Version = "development" // overwritten on build
)
Functions ¶
This section is empty.
Types ¶
type App ¶
func (*App) AddChild ¶
AddChild creates a new node and links an existing node to it. A parent d-node is implicitly created, if it doesn't already exist.
func (*App) AddChildTree ¶ added in v0.3.0
AddChildTree creates a new tree and links parent to its root. It returns the root ID.
func (*App) AddRootTree ¶ added in v0.3.0
AddRootTree creates a new tree at the root level. It returns the root ID.
func (*App) LinkNodes ¶
LinkNodes creates a new link connecting two nodes. D-nodes are implicitly created as needed.
func (*App) RemoveNode ¶
RemoveNode deletes the node and returns its orphaned children.
func (*App) RemoveNodeRecursive ¶
RemoveNodeRecursive deletes the node and all its tree descendants. Nodes that have multiple parents are only unlinked from the current tree.
func (*App) RenameNode ¶
func (*App) UncheckNode ¶
func (*App) UnlinkNodes ¶
UnlinkNodes removes the link connecting the given nodes.