config

package
v0.0.0-...-07a4714 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ByteFormatYaml
	ByteFormatToml
	ByteFormatJSON
	ByteFormatINI
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

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

func NewConfig

func NewConfig() *Config

func (*Config) Decode

func (c *Config) Decode(v interface{}) error

func (*Config) Init

func (c *Config) Init(in string) (err error)

type Decoder

type Decoder interface {
	Decode(r io.Reader, v interface{}) error
}

type FileInputer

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

func (*FileInputer) ByteFormat

func (in *FileInputer) ByteFormat() int

func (*FileInputer) Input

func (in *FileInputer) Input(file string) (*bytes.Buffer, error)

type INIDecoder

type INIDecoder struct{}

func (*INIDecoder) Decode

func (y *INIDecoder) Decode(r io.Reader, v interface{}) error

type Inputer

type Inputer interface {
	Input(in string) (*bytes.Buffer, error)
	ByteFormat() int
}

type JSONDecoder

type JSONDecoder struct{}

func (*JSONDecoder) Decode

func (y *JSONDecoder) Decode(r io.Reader, v interface{}) error

type TomlDecoder

type TomlDecoder struct{}

func (*TomlDecoder) Decode

func (y *TomlDecoder) Decode(r io.Reader, v interface{}) error

type YamlDecoder

type YamlDecoder struct{}

func (*YamlDecoder) Decode

func (y *YamlDecoder) Decode(r io.Reader, v interface{}) error

Jump to

Keyboard shortcuts

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