Documentation
¶
Overview ¶
For joining the Marshal and Unmarshal methods for all supported config types.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfigType ¶
type ConfigType interface {
Marshal(interface{}) ([]byte, error)
Unmarshal([]byte, interface{}) error
}
ConfigType is a generic interface for marshalling and unmarshalling config types
type JsonConfig ¶
type JsonConfig struct{}
JsonConfig implements the ConfigType interface
func (JsonConfig) Marshal ¶
func (JsonConfig) Marshal(v interface{}) ([]byte, error)
func (JsonConfig) Unmarshal ¶
func (JsonConfig) Unmarshal(data []byte, v interface{}) error
type YamlConfig ¶
type YamlConfig struct{}
YamlConfig implements the ConfigType interface
func (YamlConfig) Marshal ¶
func (YamlConfig) Marshal(v interface{}) ([]byte, error)
func (YamlConfig) Unmarshal ¶
func (YamlConfig) Unmarshal(data []byte, v interface{}) error
Click to show internal directories.
Click to hide internal directories.