parser

package
v0.21.0 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2020 License: Apache-2.0 Imports: 20 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidInputs

func ValidInputs() []string

ValidInputs returns string array in order to passing valid input types to viper

Types

type ConfigDoc

type ConfigDoc struct {
	ReadCloser io.ReadCloser
	Filepath   string
	Parser     Parser
}

ConfigDoc is an input document to be checked

type ConfigManager added in v0.21.0

type ConfigManager struct{}

func (*ConfigManager) GetConfigurations added in v0.21.0

func (c *ConfigManager) GetConfigurations(ctx context.Context, input string, fileList []string) (map[string]interface{}, error)

GetConfigurations parses and returns the configurations given in the file list

type CustomConfigManager added in v0.21.0

type CustomConfigManager interface {
	GetConfigurations(ctx context.Context, input string, fileList []string) (map[string]interface{}, error)
}

type Parser

type Parser interface {
	Unmarshal(p []byte, v interface{}) error
}

Parser is the interface implemented by objects that can unmarshal bytes into a golang interface

func GetParser

func GetParser(fileType string) (Parser, error)

GetParser gets a file parser based on the file type and input

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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