Help us shape the future of Go! Take the 2026 Go Developer Survey

spoe

package
v5.1.16 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 17, 2025 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

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) HasParser

func (p *Parser) HasParser(scope string, sectionType parser.Section, attribute string) bool

HasParser checks if we have a parser for attribute

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) IsScope

func (p *Parser) IsScope(line string) bool

func (*Parser) LoadData

func (p *Parser) LoadData(filename string) error

func (*Parser) ParseData

func (p *Parser) ParseData(dat string) error

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) Save

func (p *Parser) Save(filename string) error

func (*Parser) ScopeCreate

func (p *Parser) ScopeCreate(scope string) error

ScopeCreate creates one section of sectionType

func (*Parser) ScopeDelete

func (p *Parser) ScopeDelete(scope string) error

ScopeDelete deletes one section of sectionType

func (*Parser) SectionsCreate

func (p *Parser) SectionsCreate(scope string, sectionType parser.Section, sectionName string) error

func (*Parser) SectionsDelete

func (p *Parser) SectionsDelete(scope string, sectionType parser.Section, sectionName string) error

SectionsDelete deletes one section of sectionType

func (*Parser) SectionsGet

func (p *Parser) SectionsGet(scope string, sectionType parser.Section) ([]string, error)

SectionsGet lists all sections of certain type

func (*Parser) Set

func (p *Parser) Set(scope string, sectionType parser.Section, sectionName string, attribute string, data common.ParserData, index ...int) error

Set sets attribute from defaults section, can be nil to disable/remove

func (*Parser) String

func (p *Parser) String() string

String returns configuration in writable form

Directories

Path Synopsis
Code generated by go generate; DO NOT EDIT.
Code generated by go generate; DO NOT EDIT.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL