Documentation ¶
Index ¶
- func FieldErrorsToString(fieldErrors []FieldError) string
- func FileFormatToString(fileFormat FileFormat) string
- type ConfigError
- type ConfigFileParser
- type ConfigFileParserImpl
- type Error
- type FieldError
- type FileConfigError
- type FileConfiguration
- func JsonFileConfiguration(configFile string, config interface{}) *FileConfiguration
- func NewFileConfiguration(fileName string, fileFormat FileFormat, fileInputConfiguration interface{}, ...) *FileConfiguration
- func PropertyFileConfiguration(configFile string, config interface{}) *FileConfiguration
- func YamlFileConfiguration(configFile string, config interface{}) *FileConfiguration
- type FileFormat
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FieldErrorsToString ¶
func FieldErrorsToString(fieldErrors []FieldError) string
FieldErrorsToString coverts an array of field arrays into a string
func FileFormatToString ¶
func FileFormatToString(fileFormat FileFormat) string
Types ¶
type ConfigError ¶
type ConfigError interface { Error }
type ConfigFileParser ¶
type ConfigFileParser interface {
ParseConfig() (interface{}, error)
}
ConfigFileParser parses the config file
type ConfigFileParserImpl ¶
type ConfigFileParserImpl struct {
FileConfiguration *FileConfiguration
}
func NewConfigFileParser ¶
func NewConfigFileParser(fileConfiguration *FileConfiguration) *ConfigFileParserImpl
DefaulltConfigFileParser is a constructor
func (*ConfigFileParserImpl) ParseConfig ¶
func (cf *ConfigFileParserImpl) ParseConfig() (interface{}, error)
ParseConfig parses the file configured the FileConfiguration struct variable's FileName parameter.
type FieldError ¶
func AppendFieldError ¶
func AppendFieldError(configFieldErrors []FieldError, fieldError *FieldError) []FieldError
AppendFieldError appends fieldError to the configFieldErrors are and returns the resulting slice.
func ToFieldError ¶
func ToFieldError(field string, err error) *FieldError
ToFieldError converts err into a field error
func (*FieldError) Error ¶
func (cfe *FieldError) Error() string
type FileConfigError ¶
type FileConfigError struct { ConfigFile string FileFormat FileFormat FieldErrors []FieldError }
func (*FileConfigError) Error ¶
func (fce *FileConfigError) Error() string
type FileConfiguration ¶
type FileConfiguration struct { FileName string FileFormat FileFormat FileInputConfiguration interface{} EnvironmentLoader goenvloader.EnvironmentLoader }
func JsonFileConfiguration ¶
func JsonFileConfiguration(configFile string, config interface{}) *FileConfiguration
func NewFileConfiguration ¶
func NewFileConfiguration(fileName string, fileFormat FileFormat, fileInputConfiguration interface{}, environmentLoader goenvloader.EnvironmentLoader) *FileConfiguration
func PropertyFileConfiguration ¶
func PropertyFileConfiguration(configFile string, config interface{}) *FileConfiguration
func YamlFileConfiguration ¶
func YamlFileConfiguration(configFile string, config interface{}) *FileConfiguration
Source Files ¶
Click to show internal directories.
Click to hide internal directories.