Documentation ¶
Overview ¶
Package node is to enable reading through a repo and create a tree of content on confluence
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetAPIClient ¶
func SetAPIClient(client APIClienter)
SetAPIClient sets a confluence.APIClient object into the node package
Types ¶
type APIClienter ¶
type APIClienter interface { CreatePage(root int, contents *markdown.FileContents, isroot bool) (int, error) DeletePage(pageID int) error UpdatePage(pageID int, pageVersion int64, pageContents *markdown.FileContents, originalPage confluence.PageResults) (bool, error) FindPage(title string, many bool) (*confluence.PageResults, error) UploadAttachment(filename string, id int, index bool, indexid int) error }
APIClienter is interface for confluence API client and mock tests
type Node ¶
type Node struct {
// contains filtered or unexported fields
}
Node struct enables creation of a page tree
func (*Node) Delete ¶
func (node *Node) Delete()
Delete method starts loop through node.branches and calls this method on each subnode of the node if node.id != 0 (i.e not the root node) then it calls method findPagesToDelete
func (*Node) Start ¶
Start method begins the generation of a tree of the repo for confluence first it validates whether the project path is a folder if yes then it sets the rootDir as the project path folder name then begins the recursive method generateMaster and returns bool - if true then it means pages have been created/updated/checked on confluence and there is markdown content in the folder