Documentation ¶
Overview ¶
Package encoding provides interfaces for configuration encoders and decoders.
Additional encoders can be added through the Register function. This allows for separation of concerns internally, but also for plugins to implement their own encoding.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // UnknownEncodingError is returned when an unknown encoding is requested using New. UnknownEncodingError = errors.New("unknown encoding requested") // IllFormattedVariable is returned when a payload contains a line that cannot be resolved to a config.Variable. IllFormattedVariable = errors.New("variable is incorrectly formatted") )
Functions ¶
Types ¶
type Decoder ¶
Allows to Decode a byte sequence into a list of config.Variable structs.
type Encoder ¶
Allows to Encode config.Variable structs into a byte sequence.
Directories ¶
Path | Synopsis |
---|---|
Package json implements an encoder and decoder for a JSON representation of config.Variable.
|
Package json implements an encoder and decoder for a JSON representation of config.Variable. |
Package text implements an encoder and decoder for a text based representation of config.Variable.
|
Package text implements an encoder and decoder for a text based representation of config.Variable. |
Click to show internal directories.
Click to hide internal directories.