Documentation ¶
Index ¶
- func CheckData(data interface{}) error
- func FormatJSONSyntaxError(data io.Reader, offset int64) (highlight string)
- func GetVersion(filename string, clnt *etcd.Client) (version string, err error)
- func SaveConfig(data interface{}, filename string, clnt *etcd.Client) (err error)
- type Config
- type ConfigEncoding
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckData ¶
func CheckData(data interface{}) error
CheckData - checks the validity of config data. Data should be of type struct and contain a string type field called "Version".
func FormatJSONSyntaxError ¶
FormatJSONSyntaxError generates a pretty printed json syntax error since golang doesn't provide an easy way to report the location of the error
func GetVersion ¶
GetVersion - extracts the version information.
Types ¶
type Config ¶
type Config interface { String() string Version() string Save(string) error Load(string) error Data() interface{} Diff(Config) ([]structs.Field, error) DeepDiff(Config) ([]structs.Field, error) }
Config - generic config interface functions
func LoadConfig ¶
LoadConfig - loads json config from filename for the a given struct data
Click to show internal directories.
Click to hide internal directories.