diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index 37cc268..e745a87 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -8,11 +8,11 @@ "Deps": [ { "ImportPath": "github.com/gogo/protobuf/proto", - "Rev": "c0656edd0d9eab7c66d1eb0c568f9039345796f7" + "Rev": "342cbe0a04158f6dcb03ca0079991a51a4248c02" }, { "ImportPath": "github.com/gogo/protobuf/sortkeys", - "Rev": "c0656edd0d9eab7c66d1eb0c568f9039345796f7" + "Rev": "342cbe0a04158f6dcb03ca0079991a51a4248c02" }, { "ImportPath": "github.com/golang/glog", @@ -60,103 +60,103 @@ }, { "ImportPath": "k8s.io/apimachinery/pkg/api/resource", - "Rev": "cdac837abb323d610ee074068a16915651f888dd" + "Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44" }, { "ImportPath": "k8s.io/apimachinery/pkg/apis/config", - "Rev": "cdac837abb323d610ee074068a16915651f888dd" + "Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44" }, { "ImportPath": "k8s.io/apimachinery/pkg/apis/config/v1alpha1", - "Rev": "cdac837abb323d610ee074068a16915651f888dd" + "Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44" }, { "ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1", - "Rev": "cdac837abb323d610ee074068a16915651f888dd" + "Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44" }, { "ImportPath": "k8s.io/apimachinery/pkg/conversion", - "Rev": "cdac837abb323d610ee074068a16915651f888dd" + "Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44" }, { "ImportPath": "k8s.io/apimachinery/pkg/conversion/queryparams", - "Rev": "cdac837abb323d610ee074068a16915651f888dd" + "Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44" }, { "ImportPath": "k8s.io/apimachinery/pkg/fields", - "Rev": "cdac837abb323d610ee074068a16915651f888dd" + "Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44" }, { "ImportPath": "k8s.io/apimachinery/pkg/labels", - "Rev": "cdac837abb323d610ee074068a16915651f888dd" + "Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44" }, { "ImportPath": "k8s.io/apimachinery/pkg/runtime", - "Rev": "cdac837abb323d610ee074068a16915651f888dd" + "Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44" }, { "ImportPath": "k8s.io/apimachinery/pkg/runtime/schema", - "Rev": "cdac837abb323d610ee074068a16915651f888dd" + "Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44" }, { "ImportPath": "k8s.io/apimachinery/pkg/selection", - "Rev": "cdac837abb323d610ee074068a16915651f888dd" + "Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44" }, { "ImportPath": "k8s.io/apimachinery/pkg/types", - "Rev": "cdac837abb323d610ee074068a16915651f888dd" + "Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/errors", - "Rev": "cdac837abb323d610ee074068a16915651f888dd" + "Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/intstr", - "Rev": "cdac837abb323d610ee074068a16915651f888dd" + "Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/json", - "Rev": "cdac837abb323d610ee074068a16915651f888dd" + "Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/naming", - "Rev": "cdac837abb323d610ee074068a16915651f888dd" + "Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/net", - "Rev": "cdac837abb323d610ee074068a16915651f888dd" + "Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/runtime", - "Rev": "cdac837abb323d610ee074068a16915651f888dd" + "Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/sets", - "Rev": "cdac837abb323d610ee074068a16915651f888dd" + "Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/validation", - "Rev": "cdac837abb323d610ee074068a16915651f888dd" + "Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44" }, { "ImportPath": "k8s.io/apimachinery/pkg/util/validation/field", - "Rev": "cdac837abb323d610ee074068a16915651f888dd" + "Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44" }, { "ImportPath": "k8s.io/apimachinery/pkg/watch", - "Rev": "cdac837abb323d610ee074068a16915651f888dd" + "Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44" }, { "ImportPath": "k8s.io/apimachinery/third_party/forked/golang/reflect", - "Rev": "cdac837abb323d610ee074068a16915651f888dd" + "Rev": "56cf97ad69c72c043045c349a1badf99d9f7ef44" }, { "ImportPath": "k8s.io/apiserver/pkg/apis/config", - "Rev": "75a03c2d437ac87229cdc1d43c039a4e7bf7ecf5" + "Rev": "a24d90ceffd04e673b14cbdab1a019af01a13892" }, { "ImportPath": "k8s.io/apiserver/pkg/apis/config/v1alpha1", - "Rev": "75a03c2d437ac87229cdc1d43c039a4e7bf7ecf5" + "Rev": "a24d90ceffd04e673b14cbdab1a019af01a13892" }, { "ImportPath": "k8s.io/utils/pointer", diff --git a/vendor/github.com/gogo/protobuf/AUTHORS b/vendor/github.com/gogo/protobuf/AUTHORS index 2eaf4d5..3d97fc7 100644 --- a/vendor/github.com/gogo/protobuf/AUTHORS +++ b/vendor/github.com/gogo/protobuf/AUTHORS @@ -10,5 +10,6 @@ # Please keep the list sorted. +Sendgrid, Inc Vastech SA (PTY) LTD Walter Schulze diff --git a/vendor/github.com/gogo/protobuf/CONTRIBUTORS b/vendor/github.com/gogo/protobuf/CONTRIBUTORS index 84a85b1..b1abc4d 100644 --- a/vendor/github.com/gogo/protobuf/CONTRIBUTORS +++ b/vendor/github.com/gogo/protobuf/CONTRIBUTORS @@ -1,4 +1,5 @@ Anton Povarov +Brian Goff Clayton Coleman Denis Smirnov DongYun Kang @@ -10,9 +11,12 @@ John Shahid John Tuley Laurent Patrick Lee +Roger Johansson +Sam Nguyen Sergio Arbeo Stephen J Day Tamir Duberstein Todd Eisenberger Tormod Erevik Lea +Vyacheslav Kim Walter Schulze diff --git a/vendor/github.com/gogo/protobuf/proto/encode.go b/vendor/github.com/gogo/protobuf/proto/encode.go index 2b30f84..8b84d1b 100644 --- a/vendor/github.com/gogo/protobuf/proto/encode.go +++ b/vendor/github.com/gogo/protobuf/proto/encode.go @@ -174,11 +174,11 @@ func sizeFixed32(x uint64) int { // This is the format used for the sint64 protocol buffer type. func (p *Buffer) EncodeZigzag64(x uint64) error { // use signed number to get arithmetic right shift. - return p.EncodeVarint(uint64((x << 1) ^ uint64((int64(x) >> 63)))) + return p.EncodeVarint((x << 1) ^ uint64((int64(x) >> 63))) } func sizeZigzag64(x uint64) int { - return sizeVarint(uint64((x << 1) ^ uint64((int64(x) >> 63)))) + return sizeVarint((x << 1) ^ uint64((int64(x) >> 63))) } // EncodeZigzag32 writes a zigzag-encoded 32-bit integer diff --git a/vendor/github.com/gogo/protobuf/proto/lib.go b/vendor/github.com/gogo/protobuf/proto/lib.go index 7580bb4..c98d73d 100644 --- a/vendor/github.com/gogo/protobuf/proto/lib.go +++ b/vendor/github.com/gogo/protobuf/proto/lib.go @@ -73,7 +73,6 @@ for a protocol buffer variable v: When the .proto file specifies `syntax="proto3"`, there are some differences: - Non-repeated fields of non-message type are values instead of pointers. - - Getters are only generated for message and oneof fields. - Enum types do not get an Enum method. The simplest way to describe this is to see an example. diff --git a/vendor/github.com/gogo/protobuf/proto/properties.go b/vendor/github.com/gogo/protobuf/proto/properties.go index 44b3320..2a69e88 100644 --- a/vendor/github.com/gogo/protobuf/proto/properties.go +++ b/vendor/github.com/gogo/protobuf/proto/properties.go @@ -193,6 +193,7 @@ type Properties struct { Default string // default value HasDefault bool // whether an explicit default was provided CustomType string + CastType string StdTime bool StdDuration bool @@ -341,6 +342,8 @@ func (p *Properties) Parse(s string) { p.OrigName = strings.Split(f, "=")[1] case strings.HasPrefix(f, "customtype="): p.CustomType = strings.Split(f, "=")[1] + case strings.HasPrefix(f, "casttype="): + p.CastType = strings.Split(f, "=")[1] case f == "stdtime": p.StdTime = true case f == "stdduration": diff --git a/vendor/github.com/gogo/protobuf/proto/text.go b/vendor/github.com/gogo/protobuf/proto/text.go index d63732f..f609d1d 100644 --- a/vendor/github.com/gogo/protobuf/proto/text.go +++ b/vendor/github.com/gogo/protobuf/proto/text.go @@ -522,6 +522,17 @@ func (tm *TextMarshaler) writeAny(w *textWriter, v reflect.Value, props *Propert } return nil } + } else if len(props.CastType) > 0 { + if _, ok := v.Interface().(interface { + String() string + }); ok { + switch v.Kind() { + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, + reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: + _, err := fmt.Fprintf(w, "%d", v.Interface()) + return err + } + } } else if props.StdTime { t, ok := v.Interface().(time.Time) if !ok { @@ -531,9 +542,9 @@ func (tm *TextMarshaler) writeAny(w *textWriter, v reflect.Value, props *Propert if err != nil { return err } - props.StdTime = false - err = tm.writeAny(w, reflect.ValueOf(tproto), props) - props.StdTime = true + propsCopy := *props // Make a copy so that this is goroutine-safe + propsCopy.StdTime = false + err = tm.writeAny(w, reflect.ValueOf(tproto), &propsCopy) return err } else if props.StdDuration { d, ok := v.Interface().(time.Duration) @@ -541,9 +552,9 @@ func (tm *TextMarshaler) writeAny(w *textWriter, v reflect.Value, props *Propert return fmt.Errorf("stdtime is not time.Duration, but %T", v.Interface()) } dproto := durationProto(d) - props.StdDuration = false - err := tm.writeAny(w, reflect.ValueOf(dproto), props) - props.StdDuration = true + propsCopy := *props // Make a copy so that this is goroutine-safe + propsCopy.StdDuration = false + err := tm.writeAny(w, reflect.ValueOf(dproto), &propsCopy) return err } } diff --git a/vendor/github.com/gogo/protobuf/proto/text_parser.go b/vendor/github.com/gogo/protobuf/proto/text_parser.go index 9db12e9..f127672 100644 --- a/vendor/github.com/gogo/protobuf/proto/text_parser.go +++ b/vendor/github.com/gogo/protobuf/proto/text_parser.go @@ -983,7 +983,7 @@ func (p *textParser) readAny(v reflect.Value, props *Properties) error { return p.readStruct(fv, terminator) case reflect.Uint32: if x, err := strconv.ParseUint(tok.value, 0, 32); err == nil { - fv.SetUint(uint64(x)) + fv.SetUint(x) return nil } case reflect.Uint64: