Documentation ¶
Index ¶
- type Parser
- func (p *Parser) Delete(scope string, sectionType parser.Section, sectionName string, attribute string, ...) error
- func (p *Parser) Get(scope string, sectionType parser.Section, sectionName string, attribute string, ...) (common.ParserData, error)
- func (p *Parser) GetOne(scope string, sectionType parser.Section, sectionName string, attribute string, ...) (common.ParserData, error)
- func (p *Parser) HasParser(scope string, sectionType parser.Section, attribute string) bool
- func (p *Parser) Insert(scope string, sectionType parser.Section, sectionName string, attribute string, ...) error
- func (p *Parser) IsScope(line string) bool
- func (p *Parser) LoadData(filename string) error
- func (p *Parser) ParseData(dat string) error
- func (p *Parser) ProcessLine(line string, parts []string, comment string, config parser.ConfiguredParsers, ...) (psrs parser.ConfiguredParsers, resultScope string)
- func (p *Parser) Save(filename string) error
- func (p *Parser) ScopeCreate(scope string) error
- func (p *Parser) ScopeDelete(scope string) error
- func (p *Parser) SectionsCreate(scope string, sectionType parser.Section, sectionName string) error
- func (p *Parser) SectionsDelete(scope string, sectionType parser.Section, sectionName string) error
- func (p *Parser) SectionsGet(scope string, sectionType parser.Section) ([]string, error)
- func (p *Parser) Set(scope string, sectionType parser.Section, sectionName string, attribute string, ...) error
- func (p *Parser) String() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Parser ¶
type Parser struct { Parsers map[string]map[parser.Section]map[string]*parser.Parsers // contains filtered or unexported fields }
Parser reads and writes configuration on given file
func (*Parser) Delete ¶
func (p *Parser) Delete(scope string, sectionType parser.Section, sectionName string, attribute string, index ...int) error
Delete remove attribute on defined index, in case of single attributes, index is ignored
func (*Parser) Get ¶
func (p *Parser) Get(scope string, sectionType parser.Section, sectionName string, attribute string, createIfNotExist ...bool) (common.ParserData, error)
Get get attribute from defaults section
func (*Parser) GetOne ¶
func (p *Parser) GetOne(scope string, sectionType parser.Section, sectionName string, attribute string, index ...int) (common.ParserData, error)
GetOne get attribute from defaults section
func (*Parser) Insert ¶
func (p *Parser) Insert(scope string, sectionType parser.Section, sectionName string, attribute string, data common.ParserData, index ...int) error
Insert put attribute on defined index, in case of single attributes, index is ignored
func (*Parser) ProcessLine ¶
func (p *Parser) ProcessLine(line string, parts []string, comment string, config parser.ConfiguredParsers, scope string) (psrs parser.ConfiguredParsers, resultScope string)
ProcessLine parses line plus determines if we need to change state
func (*Parser) ScopeCreate ¶
ScopeCreate creates one section of sectionType
func (*Parser) ScopeDelete ¶
ScopeDelete deletes one section of sectionType
func (*Parser) SectionsCreate ¶
func (*Parser) SectionsDelete ¶
SectionsDelete deletes one section of sectionType
func (*Parser) SectionsGet ¶
SectionsGet lists all sections of certain type
Click to show internal directories.
Click to hide internal directories.