Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Configuration ¶
type Configuration struct { FilePatterns []string `json:"filePatterns"` Paths []string `json:"paths"` TextPatterns []*TextPattern `json:"textPatterns"` }
A Configuration structure represents the data necessary to configure a Mini Text Indexer instance.
func LoadConfiguration ¶
func LoadConfiguration(reader io.Reader) (*Configuration, error)
LoadConfiguration reads data from a Reader into a new Configuration structure.
func LoadConfigurationFromFile ¶
func LoadConfigurationFromFile(fileName string) (*Configuration, error)
LoadConfigurationFromFile reads data from a file into a Configuration object. Makes use of LoadConfiguration().
type TextPattern ¶
type TextPattern struct { Key int `json:"key"` Pattern string `json:"pattern"` Regex *regexp.Regexp }
A TextPattern is a structure that describes a regular expression for capturing text in documents. The Key tells which capture from the regex capture groups that should be used as the key for tree nodes.
Click to show internal directories.
Click to hide internal directories.