parser

package
v0.0.0-...-a5e107f Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConfigParamName     ConfigParam = "name"
	ConfigParamLoadable             = "loadable"
	ConfigParamDefault              = "default"
	ConfigParamFactory              = "factory"
	ConfigParamEnum                 = "enum"
	ConfigParamKeys                 = "keys"
	ConfigParamPath                 = "path"
	ConfigParamString               = "string"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigParam

type ConfigParam string

type ConfigParser

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

func (*ConfigParser) ParseConfig

func (p *ConfigParser) ParseConfig(data map[string]interface{}, config *types.Config, configPath string) error

func (*ConfigParser) ParseStruct

func (p *ConfigParser) ParseStruct(data map[string]interface{}, structure interface{}, configPath string) error

ParseStruct parses a struct into a map of Fields

func (*ConfigParser) ParseTag

func (p *ConfigParser) ParseTag(tag string) (map[ConfigParam]string, error)

ParseTag parses the 'wst' struct tag into a Field

type Parser

type Parser interface {
	ParseConfig(data map[string]interface{}, config *types.Config, configPath string) error
	ParseStruct(data map[string]interface{}, structure interface{}, configPath string) error
	ParseTag(tag string) (map[ConfigParam]string, error)
}

func CreateParser

func CreateParser(fnd app.Foundation, loader loader.Loader) Parser

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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