parser

package
v0.22.0 Latest Latest
Warning

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

Go to latest
Published: May 9, 2020 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetConfigurations

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

GetConfigurations parses and returns the configurations given in the file list

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 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