Documentation
¶
Overview ¶
Package docs provides storage and retrieval for a series of data points based around a tree structure of page content.
The content loaded within this tree has no bearing on the source location, these 2 concepts should be kept separate (there may be loading of data from separate sources and combined into a single cohesive interface).
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // S is a singleton instance of the current docs storage. S = &Store{} )
Functions ¶
This section is empty.
Types ¶
type Dir ¶
type Dir struct { Children []*Dir `json:"children"` Icon string `json:"icon"` IconAlt string `json:"icon-alt"` Model bool `json:"model"` Path string `json:"path"` Text string `json:"text"` }
Dir gives a holder of further nodes.
type Store ¶
type Store struct { // Dirs tracks the structure of pages under their paths. Dirs []*Dir `json:"pages"` // Pages captures the content for a full path page. Pages map[string]*autodocs.Page `json:"-"` // contains filtered or unexported fields }
Store captures the doc file references and content.
func (*Store) UpdateFromPath ¶
UpdateFromPath will accept a base path location and walk the directory structure to find appropriate files to be pulled in to memory for serving.
Click to show internal directories.
Click to hide internal directories.