parser

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFileParser

func NewFileParser(fileType, file string, dbConfCluster interface{}) error

NewFileParser 对外提供配置文件解析器接口 fileType 文件类型 file 文件路径

func Register

func Register(p string, ip IParser)

Register 注册解析器

Types

type IParser

type IParser interface {
	Parse(d string, dbConfCluster interface{}) error
}

func Getter

func Getter(p string) (IParser, error)

Getter 获取解析器

type IniConfigParser

type IniConfigParser struct {
}

func (*IniConfigParser) Parse

func (c *IniConfigParser) Parse(file string, dbConfCluster interface{}) (err error)

type JsonConfigParser

type JsonConfigParser struct {
}

func (*JsonConfigParser) Parse

func (c *JsonConfigParser) Parse(file string, dbConfCluster interface{}) (err error)

type TomlConfigParser

type TomlConfigParser struct {
}

func (*TomlConfigParser) Parse

func (c *TomlConfigParser) Parse(file string, dbConfCluster interface{}) (err error)

Jump to

Keyboard shortcuts

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