Commit Graph

14 Commits

Author SHA1 Message Date
Tim Hockin
fd91d3f0ec Make patch-up conversions simpler
Rather than an "all or nothing" approach to defining a custom conversion
function (which seems destined to cause problems eventually), this is an
attempt to make it possible to call the auto-generated code and then "fix it
up".

Specifically, consider you have a fooBar struct.  If you don't define a
conversion for FooBar, you will get a generated function like:
    convert_v1_FooBar_To_api_FooBar()

Before this PR, if you define your own conversion function, you get no
generated function.  After this PR you get:
    autoconvert_v1_FooBar_To_api_FooBar()
...which you can call yourself in your custom function.
2015-09-24 17:21:07 -07:00
tummychow
78ce5da988 Move util.StringSet into its own package
A lot of packages use StringSet, but they don't use anything else from
the util package. Moving StringSet into another package will shrink
their dependency trees significantly.
2015-09-10 12:04:15 -07:00
Kris Rousey
565189f5b8 Correcting all go vet errors 2015-08-11 13:55:37 -07:00
Paul Weil
26d80cdb7f use package from out value 2015-08-10 14:00:20 -04:00
Mike Danese
8e33cbfa28 rewrite go imports 2015-08-05 17:30:03 -07:00
Clayton Coleman
0f9fdcafea Revert "Revert "Improve conversion to support multiple packages""
This reverts commit 94a387d5d1.
2015-07-30 15:15:14 -04:00
Mike Danese
94a387d5d1 Revert "Improve conversion to support multiple packages" 2015-07-30 10:51:40 -07:00
Clayton Coleman
732647ea97 Improve conversion to support multiple packages
OpenShift uses multiple API packages (types are split) which
Kube will also eventually have as we introduce more plugins.
These changes make the generators able to handle importing different
API object packages into a single generator function.
2015-07-29 17:05:54 -04:00
Wojciech Tyczynski
de0a1d179f Fix ordering of conversion methods. 2015-05-21 19:41:48 +02:00
Tim Hockin
70c94fad6d Don't rename api imports in conversions 2015-05-19 11:21:21 -07:00
Wojciech Tyczynski
9a93206774 Script for automatically generate conversions. 2015-05-19 02:17:58 +02:00
Wojciech Tyczynski
108615d081 Refactor conversion generator 2015-05-15 15:11:18 +02:00
Wojciech Tyczynski
b52a4e60fc Fix convertion generator for manually written ones 2015-05-14 13:51:34 +02:00
Wojciech Tyczynski
5578dc99e3 Improvements for conversions generator 2015-05-11 12:21:11 +02:00