Documentation
¶
Index ¶
- Constants
- Variables
- type ConfiguredParsers
- type Parser
- type ParserInterface
- type Parsers
- func (p *Parsers) Delete(attribute string, index ...int) error
- func (p *Parsers) Get(attribute string, createIfNotExist ...bool) (common.ParserData, error)
- func (p *Parsers) GetOne(attribute string, index ...int) (common.ParserData, error)
- func (p *Parsers) GetPreComments(attribute string) ([]string, error)
- func (p *Parsers) GetResult(attribute string) ([]common.ReturnResultLine, error)
- func (p *Parsers) HasParser(attribute string) bool
- func (p *Parsers) Insert(attribute string, data common.ParserData, index ...int) error
- func (p *Parsers) Set(attribute string, data common.ParserData, index ...int) error
- func (p *Parsers) SetPreComments(attribute string, preComment []string) error
- type Section
- type UnlockError
Constants ¶
View Source
const ( CommentsSectionName = "data" GlobalSectionName = "data" )
Variables ¶
View Source
var DefaultSectionName = "" //nolint:gochecknoglobals
Functions ¶
This section is empty.
Types ¶
type ConfiguredParsers ¶
type ConfiguredParsers struct {
State string
ActiveComments []string
ActiveSectionComments []string
Active *Parsers
Previous *Parsers
HasDefaultParser bool
Comments *Parsers
Defaults *Parsers
Global *Parsers
Frontend *Parsers
Backend *Parsers
Listen *Parsers
Resolver *Parsers
Userlist *Parsers
Peers *Parsers
Mailers *Parsers
Cache *Parsers
Program *Parsers
HTTPErrors *Parsers
Ring *Parsers
LogForward *Parsers
FCGIApp *Parsers
CrtStore *Parsers
// spoe parsers
SPOEAgent *Parsers
SPOEGroup *Parsers
SPOEMessage *Parsers
// contains filtered or unexported fields
}
type Parser ¶
type Parser interface {
LoadData(path string) error
Process(reader io.Reader) error
String() string
Save(filename string) error
StringWithHash() (string, error)
Get(sectionType Section, sectionName string, attribute string, createIfNotExist ...bool) (common.ParserData, error)
GetResult(sectionType Section, sectionName string, attribute string) ([]common.ReturnResultLine, error)
GetPreComments(sectionType Section, sectionName string, attribute string) ([]string, error)
GetOne(sectionType Section, sectionName string, attribute string, index ...int) (common.ParserData, error)
SectionsGet(sectionType Section) ([]string, error)
SectionsDelete(sectionType Section, sectionName string) error
SectionsCreate(sectionType Section, sectionName string) error
SectionsDefaultsFromGet(sectionType Section, sectionName string) (string, error)
SectionsDefaultsFromSet(sectionType Section, sectionName, defaultsSection string) error
Set(sectionType Section, sectionName string, attribute string, data common.ParserData, index ...int) error
SetPreComments(sectionType Section, sectionName string, attribute string, preComment []string) error
Delete(sectionType Section, sectionName string, attribute string, index ...int) error
Insert(sectionType Section, sectionName string, attribute string, data common.ParserData, index ...int) error
HasParser(sectionType Section, attribute string) bool
SetLoggerState(active bool) error
}
type ParserInterface ¶
type ParserInterface interface {
Init()
Parse(line string, parts []string, comment string) (changeState string, err error)
PreParse(line string, parts []string, preComments []string, comment string) (changeState string, err error)
GetParserName() string
Get(createIfNotExist bool) (common.ParserData, error)
GetPreComments() ([]string, error)
GetOne(index int) (common.ParserData, error)
Delete(index int) error
Insert(data common.ParserData, index int) error
Set(data common.ParserData, index int) error
SetPreComments(preComment []string)
ResultAll() ([]common.ReturnResultLine, []string, error)
}
type Parsers ¶
type Parsers struct {
Parsers map[string]ParserInterface
ParserSequence []Section
PreComments []string
PostComments []string
DefaultSectionName string
}
func (*Parsers) GetPreComments ¶
func (*Parsers) GetResult ¶
func (p *Parsers) GetResult(attribute string) ([]common.ReturnResultLine, error)
type Section ¶
type Section string
const ( Comments Section = "#" Defaults Section = "defaults" Global Section = "global" Resolvers Section = "resolvers" UserList Section = "userlist" Peers Section = "peers" Mailers Section = "mailers" Frontends Section = "frontend" Backends Section = "backend" Listen Section = "listen" Cache Section = "cache" Program Section = "program" HTTPErrors Section = "http-errors" Ring Section = "ring" LogForward Section = "log-forward" FCGIApp Section = "fcgi-app" CrtStore Section = "crt-store" // spoe sections SPOEAgent Section = "spoe-agent" SPOEGroup Section = "spoe-group" SPOEMessage Section = "spoe-message" )
type UnlockError ¶
type UnlockError struct{}
func (UnlockError) Error ¶
func (e UnlockError) Error() string
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Code generated by go generate; DO NOT EDIT.
|
Code generated by go generate; DO NOT EDIT. |
|
extra
Code generated by go generate; DO NOT EDIT.
|
Code generated by go generate; DO NOT EDIT. |
|
filters
Code generated by go generate; DO NOT EDIT.
|
Code generated by go generate; DO NOT EDIT. |
|
http
Code generated by go generate; DO NOT EDIT.
|
Code generated by go generate; DO NOT EDIT. |
|
stats
Code generated by go generate; DO NOT EDIT.
|
Code generated by go generate; DO NOT EDIT. |
|
tcp
Code generated by go generate; DO NOT EDIT.
|
Code generated by go generate; DO NOT EDIT. |
|
parsers
Code generated by go generate; DO NOT EDIT.
|
Code generated by go generate; DO NOT EDIT. |
Click to show internal directories.
Click to hide internal directories.