kvconf

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: May 30, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Decoder

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

Decoder unmarshal decoder

func NewDecoder

func NewDecoder(r io.Reader) *Decoder

NewDecoder create decoder

func (*Decoder) Decode

func (d *Decoder) Decode(v interface{}) error

Decode decode value from io.Reader, supported map[string]string and struct with kv tag

type Encoder

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

Encoder marshal encoder

func NewEncoder

func NewEncoder(w io.Writer) *Encoder

NewEncoder create marshaler

func (*Encoder) Encode

func (e *Encoder) Encode(v interface{}) error

Encode encode value to io.Writer, supported map[string]string and struct with kv tag

type Marshaler

type Marshaler interface {
	MarshalKV() (string, error)
}

Marshaler custom marshaler interface

type Unmarshaler

type Unmarshaler interface {
	UnmarshalKV(string) error
}

Unmarshaler custom unmarshaler interface

type UnsupportedTypeError

type UnsupportedTypeError struct {
	Type reflect.Type
}

UnsupportedTypeError error for unsupported type

func (*UnsupportedTypeError) Error

func (e *UnsupportedTypeError) Error() string

Error error message

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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