Documentation
¶
Index ¶
- func CheckForElidedFields(struct_ interface{}) report.Report
- func Translate(cfg interface{}, translateMethod string, options common.TranslateOptions) (interface{}, report.Report, error)
- func TranslateBytes(input []byte, container interface{}, translateMethod string, ...) ([]byte, report.Report, error)
- func TranslateBytesYAML(input []byte, container interface{}, translateMethod string, ...) ([]byte, report.Report, error)
- func TranslateReportPaths(r report.Report, ts translate.TranslationSet) report.Report
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckForElidedFields ¶
Report an ErrFieldElided warning for any non-zero top-level fields in the specified output struct. The caller will probably want to use translate.PrefixReport() to reparent the report into the right place in the `json` hierarchy, and then TranslateReportPaths() to map back into `yaml` space.
func Translate ¶
func Translate(cfg interface{}, translateMethod string, options common.TranslateOptions) (interface{}, report.Report, error)
Translate translates cfg to the corresponding Ignition config version using the named translation method on cfg, and returns the marshaled Ignition config. It returns a report of any errors or warnings in the source and resultant config. If the report has fatal errors or it encounters other problems translating, an error is returned.
func TranslateBytes ¶
func TranslateBytes(input []byte, container interface{}, translateMethod string, options common.TranslateBytesOptions) ([]byte, report.Report, error)
TranslateBytes unmarshals the Butane config specified in input into the struct pointed to by container, translates it to the corresponding Ignition config version using the named translation method, and returns the marshaled Ignition config. It returns a report of any errors or warnings in the source and resultant config. If the report has fatal errors or it encounters other problems translating, an error is returned.
func TranslateBytesYAML ¶
func TranslateReportPaths ¶
TranslateReportPaths takes a report from a camelCase json document and a set of translations rules, applies those rules and converts all camelCase to snake_case.
Types ¶
This section is empty.