Documentation
¶
Index ¶
- type Node
- func CreateBlockNode(ctx context.Context, block notionapi.Block, rw rw.ReaderWriter) (*Node, error)
- func CreateDatabaseNode(ctx context.Context, database *notionapi.Database, rw rw.ReaderWriter) (*Node, error)
- func CreateNode(obj *metadata.NotionObject) (*Node, error)
- func CreatePageNode(ctx context.Context, page *notionapi.Page, rw rw.ReaderWriter) (*Node, error)
- func CreateRootNode() *Node
- func (nodeObj *Node) AddChild(childNode *Node)
- func (nodeObj *Node) DeleteChild(id NodeID) *Node
- func (nodeObj *Node) GetChildNode() *Node
- func (nodeObj *Node) GetID() NodeID
- func (nodeObj *Node) GetNodeType() NodeType
- func (nodeObj *Node) GetNotionObjectId() string
- func (nodeObj *Node) GetParentNode() *Node
- func (nodeObj *Node) GetSiblingNode() *Node
- func (nodeObj *Node) GetStorageIdentifier() rw.DataIdentifier
- func (nodeObj *Node) HasChildNode() bool
- func (nodeObj *Node) HasSibling() bool
- type NodeID
- type NodeType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Node ¶
type Node struct {
// contains filtered or unexported fields
}
func CreateBlockNode ¶
Create block node
func CreateDatabaseNode ¶
func CreateDatabaseNode(ctx context.Context, database *notionapi.Database, rw rw.ReaderWriter) (*Node, error)
Create database node
func CreateNode ¶
func CreateNode(obj *metadata.NotionObject) (*Node, error)
func CreatePageNode ¶
Create page node
func CreateRootNode ¶
func CreateRootNode() *Node
Special node which will act as a root node for a tree Root node will always have Nil UUID i.e. 00000000-0000-0000-0000-000000000000
func (*Node) DeleteChild ¶
Delete a child with given node ID and return the deleted Node
func (*Node) GetChildNode ¶
func (*Node) GetNodeType ¶
func (*Node) GetNotionObjectId ¶
func (*Node) GetParentNode ¶
func (*Node) GetSiblingNode ¶
func (*Node) GetStorageIdentifier ¶
func (nodeObj *Node) GetStorageIdentifier() rw.DataIdentifier
func (*Node) HasChildNode ¶
func (*Node) HasSibling ¶
Click to show internal directories.
Click to hide internal directories.