Documentation
¶
Index ¶
- Variables
- type Parser
- type ParserOption
- func DefaultSectionsSkipOnWrite(sectionNames []string) ParserOption
- func Logger(log logger.Format) ParserOption
- func LoggerWithPrefix(log logger.Format, prefix string) ParserOption
- func Path(path string) ParserOption
- func Reader(ioReader io.Reader) ParserOption
- func String(configuration string) ParserOption
Constants ¶
This section is empty.
Variables ¶
var DisableUnProcessed = disableUnProcessed{} //nolint:gochecknoglobals
DisableUnProcessed sets flag to disable catching lines that have no parser and to return error
var NoNamedDefaultsFrom = noNamedDefaultsFrom{} //nolint:gochecknoglobals
NoNamedDefaultsFrom sets flag to disable named defaults from in section
var UseListenSectionParsers = useListenSectionParsers{} //nolint:gochecknoglobals
UseListenSectionParsers sets flag to use listen section parser
var UseMd5Hash = useMd5Hash{} //nolint:gochecknoglobals
UseMd5Hash sets flag to use md5 hash
var UseV2HTTPCheck = useV2HTTPCheck{} //nolint:gochecknoglobals
UseV2HTTPCheck sets flag to use deprecated HTTPCheck
Functions ¶
This section is empty.
Types ¶
type Parser ¶
type Parser struct {
Path string
Reader io.Reader
Logger logger.Format // we always will have p.Options.LogPrefix
UseV2HTTPCheck bool
UseMd5Hash bool
UseListenSectionParsers bool
DisableUnProcessed bool
Log bool
LogPrefix string
NoNamedDefaultsFrom bool
DefaultSectionsSkipOnWrite map[string]struct{}
}
type ParserOption ¶
func DefaultSectionsSkipOnWrite ¶ added in v6.3.0
func DefaultSectionsSkipOnWrite(sectionNames []string) ParserOption
sectionNames is a list of defaults section that the parser will not serialize even if existing in the configuration
func Logger ¶
func Logger(log logger.Format) ParserOption
Logger takes acceptable logger that will be used for logging
func LoggerWithPrefix ¶
func LoggerWithPrefix(log logger.Format, prefix string) ParserOption
Logger takes acceptable logger that will be used for logging, prefix can be defined to distinguish log messages generated in this package
func Reader ¶
func Reader(ioReader io.Reader) ParserOption
Reader takes io.Reader that will be used to parse data
func String ¶
func String(configuration string) ParserOption
String takes string that will be used to parse data