parsers

package
v0.3.2-alpha Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DotenvStrategy

type DotenvStrategy struct {
}

DotenvStrategy parses .env files. Emply lines are ignored. Allowed key-value separators are only "=" and ":". Supported values are: string, int64, float64, bool and json arrays, e.g. `["a", "b", "c"]` ([]string) or `["a", 1, true]` ([]interface {}). Key can be nests by eithe one of the allowed env separators, e.g. `DB_NAME` or `SERVER-HOST` Comments are only allowed in seperate lines.

func (*DotenvStrategy) Parse

func (s *DotenvStrategy) Parse(data []byte) (map[string]interface{}, error)

Parse of DotenvStrategy parses yaml and json files into Parsing result

type ParsingStrategy

type ParsingStrategy interface {
	Parse(data []byte) (map[string]interface{}, error)
}

ParsingStrategy interface

type TomlStrategy

type TomlStrategy struct {
}

TomlStrategy parses yaml and json files

func (*TomlStrategy) Parse

func (s *TomlStrategy) Parse(data []byte) (map[string]interface{}, error)

Parse of TomlStrategy parses yaml and json files into Parsing result

type YamlStrategy

type YamlStrategy struct {
}

YamlStrategy parses yaml and json files

func (*YamlStrategy) Parse

func (s *YamlStrategy) Parse(data []byte) (map[string]interface{}, error)

Parse of YamlStrategy parses yaml and json files into Parsing result

Jump to

Keyboard shortcuts

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