Documentation ¶
Overview ¶
Package codec defines a config codec interface.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrCodec is the base error of codec package. ErrCodec = errorex.New("codec") // ErrCodecNotRegistered is returned by Get if the requested Codec is not // registered. ErrCodecNotRegistered = ErrCodec.WrapFormat("codec '%s' not registered") )
Functions ¶
Types ¶
type Codec ¶
type Codec interface { // Encode must encode interface to a byte slice or return an error. Encode(interface{}) ([]byte, error) // Decode must decode the byte slice to the interface or return an error. Decode([]byte, interface{}) error }
Codec defines a configuration marshaling Codec interface.
Click to show internal directories.
Click to hide internal directories.