Documentation ¶
Index ¶
- func FileHandler(rootDir string) func(http.ResponseWriter, *http.Request)
- func LinksHandler(allowedSites []string) func(http.ResponseWriter, *http.Request)
- func SetVerboseError(verbose bool)
- func TreeGraphHandler(allowedSites []string) func(http.ResponseWriter, *http.Request)
- type Graph
- type Node
- type Proposition
- type TreeGraph
- type TreeGraphItem
- type TreemapItem
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FileHandler ¶
func FileHandler(rootDir string) func(http.ResponseWriter, *http.Request)
FileHandler provides a static file lookup route using the OS file system
func LinksHandler ¶
func LinksHandler(allowedSites []string) func(http.ResponseWriter, *http.Request)
LinksHandler generates a route handler that returns links.
func SetVerboseError ¶
func SetVerboseError(verbose bool)
SetVerboseError sets the flag determining if the client should receive error details
func TreeGraphHandler ¶
func TreeGraphHandler(allowedSites []string) func(http.ResponseWriter, *http.Request)
TreeGraphHandler generates a route handler that returns a treegraph structure.
Types ¶
type Node ¶
type Node struct { Key string `json:"key"` Neighbours []*Node `json:"neighbours"` Data *Proposition `json:"data"` }
Node is one entity in a graph.
type Proposition ¶
type Proposition struct { ID string `json:"id"` FullName string `json:"fullname"` Tag string `json:"tag"` Code string `json:"code"` URL string `json:"url"` Key string `json:"key"` PotentialTags []string `json:"potentialTags"` ParentURL string `json:"parentUrl"` }
Proposition is an entity being extracted from a site.
func (*Proposition) ToPropertySlice ¶
func (p *Proposition) ToPropertySlice() []string
ToPropertySlice converts a proposition to a string slice.
type TreeGraph ¶
type TreeGraph struct {
Items []*TreeGraphItem `json:"items"`
}
TreeGraph is a transformed graph to match the expected treegraph structure.
type TreeGraphItem ¶
TreeGraphItem is an item in the treegraph structure.
type TreemapItem ¶
type TreemapItem struct { Children []*TreemapItem `json:"children"` Name string `json:"name"` ColName string `json:"colname,omitempty"` Value int `json:"value,omitempty"` }
TreemapItem is a transformed graph to match the expected treemap structure.
Click to show internal directories.
Click to hide internal directories.