Documentation
¶
Overview ¶
the node_store creates and implements various methods to store and retrieve nodes. it's setup to be an interface so that it can be easily swapped out with other implementations as darwin grows
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LocalStore ¶
type LocalStore struct { // Path is the path to the local store Path string `json:"path"` }
func (*LocalStore) Delete ¶
func (s *LocalStore) Delete(n *node.Node) error
Delete deletes a node from the store
func (*LocalStore) LoadAll ¶
LoadAll searches the Path for all nodes that follow the *.yaml format and them loads them into a slice of nodes
type Store ¶
type Store interface { // Save saves a node to its store Save(*node.Node) error // Load loads a node from its store Load(uuid.UUID) (*node.Node, error) // LoadAll loads all the nodes from its store LoadAll() (map[uuid.UUID]*node.Node, error) // Delete deletes a node from its store Delete(*node.Node) error }
The NodeStore interface defines the methods that a node object will use to store, edit and retrieve nodes.
Click to show internal directories.
Click to hide internal directories.