Documentation ¶
Index ¶
- type Parser
- func (p *Parser) AddDirective(augConfPath string, directive string, args []string) error
- func (p *Parser) AddDirectiveToIfModSSL(augConfPath string, directive string, args []string) error
- func (p *Parser) AddInclude(mainConfigPath string, inclPath string) error
- func (p *Parser) Close()
- func (p *Parser) FindDirective(directive, arg, start string, exclude bool) ([]string, error)
- func (p *Parser) GetArg(match string) (string, error)
- func (p *Parser) IsFilenameExistInLoadedPaths(filename string) bool
- func (p *Parser) IsFilenameExistInOriginalPaths(filename string) bool
- func (p *Parser) ModuleExists(name string) bool
- func (p *Parser) ParseFile(fPath string) error
- func (p *Parser) ResetModules() error
- func (p *Parser) Save(reverter reverter.Reverter) error
- func (p *Parser) UpdateRuntimeVariables() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Parser ¶
type Parser struct { Augeas augeas.Augeas LoadedPaths map[string][]string ServerRoot, ConfigListen, ConfigRoot string // contains filtered or unexported fields }
func (*Parser) AddDirective ¶
AddDirective adds directive to the end of the file given by augConfPath
func (*Parser) AddDirectiveToIfModSSL ¶
AddDirectiveToIfModSSL adds directive to the end of the file given by augConfPath within IfModule ssl block
func (*Parser) AddInclude ¶
AddInclude adds Include directive for a configuration file
func (*Parser) Close ¶
func (p *Parser) Close()
Close closes the Parser instance and frees any storage associated with it.
func (*Parser) FindDirective ¶
FindDirective finds directive in configuration directive - directive to look for arg - directive value. If empty string then all directives should be considrered start - Augeas path that should be used to begin looking for the directive exclude - whether or not to exclude directives based on variables and enabled modules
func (*Parser) IsFilenameExistInLoadedPaths ¶
IsFilenameExistInLoadedPaths checks if the file path is parsed by current Augeas parser config
func (*Parser) IsFilenameExistInOriginalPaths ¶
IsFilenameExistInOriginalPaths checks if the file path is parsed by existing Apache config
func (*Parser) ModuleExists ¶
func (*Parser) ResetModules ¶
ResetModules resets the loaded modules list
func (*Parser) UpdateRuntimeVariables ¶
UpdateRuntimeVariables Updates Includes, Defines and Modules from httpd config dump data