engle

package module
v0.0.0-...-2a8ecaf Latest Latest
Warning

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

Go to latest
Published: May 5, 2020 License: MIT Imports: 8 Imported by: 0

README

eagle

a go config map tool

Documentation

Index

Constants

View Source
const (
	YAML = iota
	JSON
	INI
)
View Source
const DefaultFileName = "application"

Variables

This section is empty.

Functions

func NewConvertError

func NewConvertError(path string, kindString string) error

Types

type ConvertError

type ConvertError struct {
	// contains filtered or unexported fields
}

func (*ConvertError) Error

func (c *ConvertError) Error() string

type Engine

type Engine struct {
	// contains filtered or unexported fields
}

func New

func New(optFunctions ...func(*Option) error) (*Engine, error)

func (*Engine) MapAll

func (e *Engine) MapAll(dst interface{}) error

func (*Engine) Parse

func (e *Engine) Parse() error

type IniParser

type IniParser struct {
	// contains filtered or unexported fields
}

func NewIniParser

func NewIniParser(e *Engine) *IniParser

func (IniParser) Parse

func (i IniParser) Parse() error

type JsonParser

type JsonParser struct {
	// contains filtered or unexported fields
}

func NewJsonParser

func NewJsonParser(e *Engine) *JsonParser

func (JsonParser) Parse

func (y JsonParser) Parse() error

type Option

type Option struct {
	FileName       string
	Env            string
	FileType       int
	MergeAnonymous bool
	BasePath       string
}

type Parser

type Parser interface {
	Parse() error
}

type YamlParser

type YamlParser struct {
	// contains filtered or unexported fields
}

func NewYamlParser

func NewYamlParser(e *Engine) *YamlParser

func (YamlParser) Parse

func (y YamlParser) Parse() error

Jump to

Keyboard shortcuts

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