Generate XXX_WellKnownType method for recognised well-known types.
Just Duration and Timestamp for now.
Make jsonpb recognise them and format/parse according to the spec.
diff --git a/jsonpb/jsonpb.go b/jsonpb/jsonpb.go
index a453527..f4523f5 100644
--- a/jsonpb/jsonpb.go
+++ b/jsonpb/jsonpb.go
@@ -47,6 +47,7 @@
"sort"
"strconv"
"strings"
+ "time"
"github.com/golang/protobuf/proto"
)
@@ -98,12 +99,47 @@
// marshalObject writes a struct to the Writer.
func (m *Marshaler) marshalObject(out *errWriter, v proto.Message, indent string) error {
+ s := reflect.ValueOf(v).Elem()
+
+ // Handle well-known types.
+ type wkt interface {
+ XXX_WellKnownType() string
+ }
+ if wkt, ok := v.(wkt); ok {
+ switch wkt.XXX_WellKnownType() {
+ case "Duration":
+ // "Generated output always contains 3, 6, or 9 fractional digits,
+ // depending on required precision."
+ s, ns := s.Field(0).Int(), s.Field(1).Int()
+ d := time.Duration(s)*time.Second + time.Duration(ns)*time.Nanosecond
+ x := fmt.Sprintf("%.9f", d.Seconds())
+ x = strings.TrimSuffix(x, "000")
+ x = strings.TrimSuffix(x, "000")
+ out.write(`"`)
+ out.write(x)
+ out.write(`s"`)
+ return out.err
+ case "Timestamp":
+ // "RFC 3339, where generated output will always be Z-normalized
+ // and uses 3, 6 or 9 fractional digits."
+ s, ns := s.Field(0).Int(), s.Field(1).Int()
+ t := time.Unix(s, ns).UTC()
+ // time.RFC3339Nano isn't exactly right (we need to get 3/6/9 fractional digits).
+ x := t.Format("2006-01-02T15:04:05.000000000")
+ x = strings.TrimSuffix(x, "000")
+ x = strings.TrimSuffix(x, "000")
+ out.write(`"`)
+ out.write(x)
+ out.write(`Z"`)
+ return out.err
+ }
+ }
+
out.write("{")
if m.Indent != "" {
out.write("\n")
}
- s := reflect.ValueOf(v).Elem()
firstField := true
for i := 0; i < s.NumField(); i++ {
value := s.Field(i)
@@ -385,6 +421,45 @@
return unmarshalValue(target.Elem(), inputValue)
}
+ // Handle well-known types.
+ type wkt interface {
+ XXX_WellKnownType() string
+ }
+ if wkt, ok := target.Addr().Interface().(wkt); ok {
+ switch wkt.XXX_WellKnownType() {
+ case "Duration":
+ unq, err := strconv.Unquote(string(inputValue))
+ if err != nil {
+ return err
+ }
+ d, err := time.ParseDuration(unq)
+ if err != nil {
+ return fmt.Errorf("bad Duration: %v", err)
+ }
+ ns := d.Nanoseconds()
+ s := ns / 1e9
+ ns %= 1e9
+ target.Field(0).SetInt(s)
+ target.Field(1).SetInt(ns)
+ return nil
+ case "Timestamp":
+ unq, err := strconv.Unquote(string(inputValue))
+ if err != nil {
+ return err
+ }
+ t, err := time.Parse(time.RFC3339Nano, unq)
+ if err != nil {
+ return fmt.Errorf("bad Timestamp: %v", err)
+ }
+ ns := t.UnixNano()
+ s := ns / 1e9
+ ns %= 1e9
+ target.Field(0).SetInt(s)
+ target.Field(1).SetInt(ns)
+ return nil
+ }
+ }
+
// Handle nested messages.
if targetType.Kind() == reflect.Struct {
var jsonFields map[string]json.RawMessage
diff --git a/jsonpb/jsonpb_test.go b/jsonpb/jsonpb_test.go
index df93a89..f5612b9 100644
--- a/jsonpb/jsonpb_test.go
+++ b/jsonpb/jsonpb_test.go
@@ -35,9 +35,12 @@
"reflect"
"testing"
- pb "github.com/golang/protobuf/jsonpb/jsonpb_test_proto"
"github.com/golang/protobuf/proto"
+
+ pb "github.com/golang/protobuf/jsonpb/jsonpb_test_proto"
proto3pb "github.com/golang/protobuf/proto/proto3_proto"
+ durpb "github.com/golang/protobuf/ptypes/duration"
+ tspb "github.com/golang/protobuf/ptypes/timestamp"
)
var (
@@ -315,6 +318,9 @@
{"force orig_name", Marshaler{OrigName: true}, &pb.Simple{OInt32: proto.Int32(4)},
`{"o_int32":4}`},
{"proto2 extension", marshaler, realNumber, realNumberJSON},
+
+ {"Duration", marshaler, &pb.KnownTypes{Dur: &durpb.Duration{Seconds: 3}}, `{"dur":"3.000s"}`},
+ {"Timestamp", marshaler, &pb.KnownTypes{Ts: &tspb.Timestamp{Seconds: 14e8, Nanos: 21e6}}, `{"ts":"2014-05-13T16:53:20.021Z"}`},
}
func TestMarshaling(t *testing.T) {
@@ -354,6 +360,9 @@
{"oneof", `{"salary":31000}`, &pb.MsgWithOneof{Union: &pb.MsgWithOneof_Salary{31000}}},
{"orig_name input", `{"o_bool":true}`, &pb.Simple{OBool: proto.Bool(true)}},
{"camelName input", `{"oBool":true}`, &pb.Simple{OBool: proto.Bool(true)}},
+
+ {"Duration", `{"dur":"3.000s"}`, &pb.KnownTypes{Dur: &durpb.Duration{Seconds: 3}}},
+ {"Timestamp", `{"ts":"2014-05-13T16:53:20.021Z"}`, &pb.KnownTypes{Ts: &tspb.Timestamp{Seconds: 14e8, Nanos: 21e6}}},
}
func TestUnmarshaling(t *testing.T) {
@@ -363,7 +372,7 @@
err := UnmarshalString(tt.json, p)
if err != nil {
- t.Error(err)
+ t.Errorf("%s: %v", tt.desc, err)
continue
}
diff --git a/jsonpb/jsonpb_test_proto/Makefile b/jsonpb/jsonpb_test_proto/Makefile
index e53e6a6..d16e916 100644
--- a/jsonpb/jsonpb_test_proto/Makefile
+++ b/jsonpb/jsonpb_test_proto/Makefile
@@ -30,4 +30,4 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
regenerate:
- protoc --go_out=. *.proto
+ protoc --go_out=Mgoogle/protobuf/duration.proto=github.com/golang/protobuf/ptypes/duration,Mgoogle/protobuf/timestamp.proto=github.com/golang/protobuf/ptypes/timestamp:. *.proto
diff --git a/jsonpb/jsonpb_test_proto/more_test_objects.pb.go b/jsonpb/jsonpb_test_proto/more_test_objects.pb.go
index 34cd2db..3ff477b 100644
--- a/jsonpb/jsonpb_test_proto/more_test_objects.pb.go
+++ b/jsonpb/jsonpb_test_proto/more_test_objects.pb.go
@@ -19,6 +19,7 @@
MsgWithOneof
Real
Complex
+ KnownTypes
*/
package jsonpb
diff --git a/jsonpb/jsonpb_test_proto/test_objects.pb.go b/jsonpb/jsonpb_test_proto/test_objects.pb.go
index 38dfce4..cf6f0e3 100644
--- a/jsonpb/jsonpb_test_proto/test_objects.pb.go
+++ b/jsonpb/jsonpb_test_proto/test_objects.pb.go
@@ -7,6 +7,8 @@
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
+import google_protobuf "github.com/golang/protobuf/ptypes/duration"
+import google_protobuf1 "github.com/golang/protobuf/ptypes/timestamp"
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
@@ -514,6 +516,31 @@
Tag: "bytes,123,opt,name=real_extension,json=realExtension",
}
+type KnownTypes struct {
+ Dur *google_protobuf.Duration `protobuf:"bytes,1,opt,name=dur" json:"dur,omitempty"`
+ Ts *google_protobuf1.Timestamp `protobuf:"bytes,2,opt,name=ts" json:"ts,omitempty"`
+ XXX_unrecognized []byte `json:"-"`
+}
+
+func (m *KnownTypes) Reset() { *m = KnownTypes{} }
+func (m *KnownTypes) String() string { return proto.CompactTextString(m) }
+func (*KnownTypes) ProtoMessage() {}
+func (*KnownTypes) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{7} }
+
+func (m *KnownTypes) GetDur() *google_protobuf.Duration {
+ if m != nil {
+ return m.Dur
+ }
+ return nil
+}
+
+func (m *KnownTypes) GetTs() *google_protobuf1.Timestamp {
+ if m != nil {
+ return m.Ts
+ }
+ return nil
+}
+
var E_Name = &proto.ExtensionDesc{
ExtendedType: (*Real)(nil),
ExtensionType: (*string)(nil),
@@ -530,57 +557,63 @@
proto.RegisterType((*MsgWithOneof)(nil), "jsonpb.MsgWithOneof")
proto.RegisterType((*Real)(nil), "jsonpb.Real")
proto.RegisterType((*Complex)(nil), "jsonpb.Complex")
+ proto.RegisterType((*KnownTypes)(nil), "jsonpb.KnownTypes")
proto.RegisterEnum("jsonpb.Widget_Color", Widget_Color_name, Widget_Color_value)
proto.RegisterExtension(E_Complex_RealExtension)
proto.RegisterExtension(E_Name)
}
var fileDescriptor1 = []byte{
- // 724 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x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 0x4c, 0xbb, 0x1a, 0x52, 0xfa, 0x5f, 0x4a, 0xc7, 0x0b,
- 0xae, 0x4c, 0xbb, 0x1c, 0x29, 0xf1, 0x42, 0x92, 0x2e, 0x75, 0x88, 0x8b, 0x44, 0x84, 0xb9, 0xef,
- 0x4a, 0xc5, 0x92, 0x87, 0x78, 0x4b, 0x93, 0xf6, 0x9c, 0x8b, 0xd9, 0x28, 0x89, 0x7c, 0x4f, 0x2a,
- 0x35, 0xe9, 0xd9, 0x57, 0x63, 0x11, 0x97, 0x63, 0x9c, 0x8e, 0x7d, 0x90, 0x92, 0x47, 0x71, 0x6a,
- 0xd4, 0x71, 0xa3, 0xb9, 0x04, 0xe6, 0x37, 0xa5, 0xb2, 0x2c, 0xe3, 0xfa, 0x34, 0x75, 0x7e, 0x5b,
- 0xe0, 0x04, 0xd1, 0x34, 0x0a, 0xf3, 0x8c, 0x40, 0x61, 0x09, 0x8a, 0x11, 0x28, 0x2c, 0x41, 0x61,
- 0x05, 0x8a, 0x11, 0x28, 0xac, 0x40, 0x61, 0x05, 0x8a, 0x11, 0x28, 0xac, 0x40, 0xa1, 0x01, 0xc5,
- 0x08, 0x14, 0x1a, 0x50, 0x68, 0x40, 0x31, 0x02, 0x85, 0x06, 0x14, 0x1a, 0x50, 0x8c, 0x40, 0xe1,
- 0xf1, 0x82, 0xab, 0x02, 0xc5, 0x08, 0x14, 0x1a, 0x50, 0x58, 0x81, 0x62, 0x04, 0x0a, 0x2b, 0x50,
- 0x68, 0x40, 0x31, 0x02, 0x85, 0x06, 0x14, 0x1a, 0x50, 0x8c, 0x40, 0xa1, 0x01, 0x85, 0x15, 0x28,
- 0x46, 0xa0, 0x50, 0x83, 0xfa, 0x23, 0x0b, 0x75, 0x1a, 0x9f, 0x8f, 0xa3, 0x9c, 0x6f, 0x81, 0x7d,
- 0x26, 0x12, 0x81, 0xaa, 0x4f, 0xad, 0xde, 0x6a, 0x57, 0x77, 0xae, 0xab, 0xe5, 0xee, 0x1e, 0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xb2, 0x6e, 0xe8, 0xcb, 0xf8, 0x9e,
+ 0x1f, 0x88, 0xbc, 0x4c, 0xfe, 0xb8, 0x3c, 0x51, 0x6d, 0xbc, 0xd8, 0x37, 0xa6, 0x45, 0xe7, 0x49,
+ 0x25, 0xc0, 0x4f, 0xb5, 0x7a, 0x55, 0x3f, 0xdd, 0x6d, 0x64, 0xc3, 0x3f, 0x07, 0x46, 0xdb, 0xdc,
+ 0x7e, 0xeb, 0x64, 0x7e, 0x2b, 0x73, 0x9b, 0x3c, 0xeb, 0x36, 0x79, 0x76, 0xdc, 0x6e, 0x7a, 0x61,
+ 0xba, 0xe8, 0xb7, 0x16, 0xd0, 0x2c, 0x3a, 0x9a, 0xb3, 0x6b, 0xbd, 0x4f, 0xbb, 0xad, 0x2f, 0xa8,
+ 0xeb, 0xe1, 0x6d, 0x18, 0xd6, 0x79, 0x25, 0xaf, 0x1c, 0xf1, 0x4f, 0x7b, 0x93, 0x56, 0xf9, 0x3f,
+ 0x00, 0x00, 0xff, 0xff, 0x73, 0x4f, 0x6f, 0xec, 0x73, 0x06, 0x00, 0x00,
}
diff --git a/jsonpb/jsonpb_test_proto/test_objects.proto b/jsonpb/jsonpb_test_proto/test_objects.proto
index 77f7fba..8087f71 100644
--- a/jsonpb/jsonpb_test_proto/test_objects.proto
+++ b/jsonpb/jsonpb_test_proto/test_objects.proto
@@ -31,6 +31,9 @@
syntax = "proto2";
+import "google/protobuf/duration.proto";
+import "google/protobuf/timestamp.proto";
+
package jsonpb;
// Test message for holding primitive types.
@@ -108,3 +111,8 @@
optional double imaginary = 1;
extensions 100 to max;
}
+
+message KnownTypes {
+ optional google.protobuf.Duration dur = 1;
+ optional google.protobuf.Timestamp ts = 2;
+}
diff --git a/protoc-gen-go/generator/generator.go b/protoc-gen-go/generator/generator.go
index 004b2d8..0e40162 100644
--- a/protoc-gen-go/generator/generator.go
+++ b/protoc-gen-go/generator/generator.go
@@ -1652,6 +1652,13 @@
"Descriptor",
}
+// Names of messages in the `google.protobuf` package for which
+// we will generate XXX_WellKnownType methods.
+var wellKnownTypes = map[string]bool{
+ "Duration": true,
+ "Timestamp": true,
+}
+
// Generate the type and default constant definitions for this Descriptor.
func (g *Generator) generateMessage(message *Descriptor) {
// The full type name
@@ -1840,6 +1847,11 @@
}
g.P("func (*", ccTypeName, ") Descriptor() ([]byte, []int) { return fileDescriptor", g.file.index, ", []int{", strings.Join(indexes, ", "), "} }")
}
+ // TODO: Revisit the decision to use a XXX_WellKnownType method
+ // if we change proto.MessageName to work with multiple equivalents.
+ if message.file.GetPackage() == "google.protobuf" && wellKnownTypes[message.GetName()] {
+ g.P("func (*", ccTypeName, `) XXX_WellKnownType() string { return "`, message.GetName(), `" }`)
+ }
// Extension support methods
var hasExtensions, isMessageSet bool
diff --git a/ptypes/any/any.pb.go b/ptypes/any/any.pb.go
index b93383f..c30c737 100644
--- a/ptypes/any/any.pb.go
+++ b/ptypes/any/any.pb.go
@@ -1,12 +1,12 @@
// Code generated by protoc-gen-go.
-// source: github.com/golang/protobuf/types/any/any.proto
+// source: github.com/golang/protobuf/ptypes/any/any.proto
// DO NOT EDIT!
/*
Package any is a generated protocol buffer package.
It is generated from these files:
- github.com/golang/protobuf/types/any/any.proto
+ github.com/golang/protobuf/ptypes/any/any.proto
It has these top-level messages:
Any
@@ -94,17 +94,17 @@
}
var fileDescriptor0 = []byte{
- // 183 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0xd2, 0x4b, 0xcf, 0x2c, 0xc9,
+ // 184 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0xd2, 0x4f, 0xcf, 0x2c, 0xc9,
0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xcf, 0xcf, 0x49, 0xcc, 0x4b, 0xd7, 0x2f,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, 0xaa, 0x1e, 0x4c,
+ 0x95, 0x92, 0x19, 0x17, 0xb3, 0x63, 0x5e, 0xa5, 0x90, 0x24, 0x17, 0x07, 0x48, 0x79, 0x7c, 0x69,
+ 0x51, 0x8e, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0x67, 0x10, 0x3b, 0x88, 0x1f, 0x5a, 0x94, 0x23, 0x24,
+ 0xc2, 0xc5, 0x5a, 0x96, 0x98, 0x53, 0x9a, 0x2a, 0xc1, 0x04, 0x14, 0xe7, 0x09, 0x82, 0x70, 0x9c,
+ 0x02, 0xb8, 0x84, 0x81, 0x96, 0xea, 0xa1, 0x19, 0xe7, 0xc4, 0x01, 0x34, 0x2c, 0x00, 0xc4, 0x09,
+ 0x60, 0x8c, 0x62, 0x06, 0x5a, 0xbb, 0x80, 0x91, 0x71, 0x11, 0x13, 0xb3, 0x7b, 0x80, 0xd3, 0x2a,
+ 0x26, 0x39, 0x77, 0x88, 0xda, 0x00, 0xa8, 0x5a, 0xbd, 0xf0, 0xd4, 0x9c, 0x1c, 0xef, 0xbc, 0xfc,
+ 0xf2, 0xbc, 0x10, 0x90, 0x43, 0x93, 0xd8, 0xc0, 0x86, 0x18, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff,
+ 0x5c, 0xa1, 0xa0, 0xf2, 0xd4, 0x00, 0x00, 0x00,
}
diff --git a/ptypes/duration/duration.pb.go b/ptypes/duration/duration.pb.go
index 3ac552e..2d0a6b7 100644
--- a/ptypes/duration/duration.pb.go
+++ b/ptypes/duration/duration.pb.go
@@ -1,12 +1,12 @@
// Code generated by protoc-gen-go.
-// source: github.com/golang/protobuf/types/duration/duration.proto
+// source: github.com/golang/protobuf/ptypes/duration/duration.proto
// DO NOT EDIT!
/*
Package duration is a generated protocol buffer package.
It is generated from these files:
- github.com/golang/protobuf/types/duration/duration.proto
+ github.com/golang/protobuf/ptypes/duration/duration.proto
It has these top-level messages:
Duration
@@ -84,23 +84,24 @@
func (m *Duration) String() string { return proto.CompactTextString(m) }
func (*Duration) ProtoMessage() {}
func (*Duration) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
+func (*Duration) XXX_WellKnownType() string { return "Duration" }
func init() {
proto.RegisterType((*Duration)(nil), "google.protobuf.Duration")
}
var fileDescriptor0 = []byte{
- // 186 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0xb2, 0x48, 0xcf, 0x2c, 0xc9,
+ // 187 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0xb2, 0x4c, 0xcf, 0x2c, 0xc9,
0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xcf, 0xcf, 0x49, 0xcc, 0x4b, 0xd7, 0x2f, 0x28,
- 0xca, 0x2f, 0xc9, 0x4f, 0x2a, 0x4d, 0xd3, 0x2f, 0xa9, 0x2c, 0x48, 0x2d, 0xd6, 0x4f, 0x29, 0x2d,
- 0x4a, 0x2c, 0xc9, 0xcc, 0xcf, 0x83, 0x33, 0xf4, 0xc0, 0x0a, 0x84, 0xf8, 0xd3, 0xf3, 0xf3, 0xd3,
- 0x73, 0x52, 0xf5, 0x60, 0xca, 0x95, 0xac, 0xb8, 0x38, 0x5c, 0xa0, 0x4a, 0x84, 0x24, 0xb8, 0xd8,
- 0x8b, 0x53, 0x93, 0xf3, 0xf3, 0x52, 0x8a, 0x25, 0x18, 0x15, 0x18, 0x35, 0x98, 0x83, 0x60, 0x5c,
- 0x21, 0x11, 0x2e, 0xd6, 0xbc, 0xc4, 0xbc, 0xfc, 0x62, 0x09, 0x26, 0xa0, 0x38, 0x6b, 0x10, 0x84,
- 0xe3, 0x14, 0xc5, 0x25, 0x0c, 0x74, 0x81, 0x1e, 0x9a, 0x91, 0x4e, 0xbc, 0x30, 0x03, 0x03, 0x40,
- 0x22,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, 0x2f, 0x3c, 0x35, 0x27, 0xc7,
+ 0x3b, 0x2f, 0xbf, 0x3c, 0x2f, 0x04, 0xe4, 0x81, 0x24, 0x36, 0xb0, 0x71, 0xc6, 0x80, 0x00, 0x00,
+ 0x00, 0xff, 0xff, 0xa2, 0x2c, 0xaf, 0x9f, 0xec, 0x00, 0x00, 0x00,
}
diff --git a/ptypes/empty/empty.pb.go b/ptypes/empty/empty.pb.go
index ab3f972..75513c4 100644
--- a/ptypes/empty/empty.pb.go
+++ b/ptypes/empty/empty.pb.go
@@ -1,12 +1,12 @@
// Code generated by protoc-gen-go.
-// source: github.com/golang/protobuf/types/empty/empty.proto
+// source: github.com/golang/protobuf/ptypes/empty/empty.proto
// DO NOT EDIT!
/*
Package empty is a generated protocol buffer package.
It is generated from these files:
- github.com/golang/protobuf/types/empty/empty.proto
+ github.com/golang/protobuf/ptypes/empty/empty.proto
It has these top-level messages:
Empty
@@ -49,14 +49,14 @@
var fileDescriptor0 = []byte{
// 148 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0x32, 0x4a, 0xcf, 0x2c, 0xc9,
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0x32, 0x4e, 0xcf, 0x2c, 0xc9,
0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xcf, 0xcf, 0x49, 0xcc, 0x4b, 0xd7, 0x2f, 0x28,
- 0xca, 0x2f, 0xc9, 0x4f, 0x2a, 0x4d, 0xd3, 0x2f, 0xa9, 0x2c, 0x48, 0x2d, 0xd6, 0x4f, 0xcd, 0x2d,
- 0x28, 0xa9, 0x84, 0x90, 0x7a, 0x60, 0x29, 0x21, 0xfe, 0xf4, 0xfc, 0xfc, 0xf4, 0x9c, 0x54, 0x3d,
- 0x98, 0x42, 0x25, 0x76, 0x2e, 0x56, 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0x02, 0x00, 0x00, 0xff, 0xff, 0x64, 0x1d, 0x6e, 0x09,
+ 0xb0, 0x00, 0x00, 0x00,
}
diff --git a/ptypes/regen.sh b/ptypes/regen.sh
index 4166d9e..c93ecb5 100755
--- a/ptypes/regen.sh
+++ b/ptypes/regen.sh
@@ -5,7 +5,7 @@
# see https://github.com/golang/protobuf for instructions.
# You also need Go and Git installed.
-PKG=github.com/golang/protobuf/types
+PKG=github.com/golang/protobuf/ptypes
UPSTREAM=https://github.com/google/protobuf
UPSTREAM_SUBDIR=src/google/protobuf
PROTO_FILES='
diff --git a/ptypes/struct/struct.pb.go b/ptypes/struct/struct.pb.go
index 9489166..9f2ef62 100644
--- a/ptypes/struct/struct.pb.go
+++ b/ptypes/struct/struct.pb.go
@@ -1,12 +1,12 @@
// Code generated by protoc-gen-go.
-// source: github.com/golang/protobuf/types/struct/struct.proto
+// source: github.com/golang/protobuf/ptypes/struct/struct.proto
// DO NOT EDIT!
/*
Package structpb is a generated protocol buffer package.
It is generated from these files:
- github.com/golang/protobuf/types/struct/struct.proto
+ github.com/golang/protobuf/ptypes/struct/struct.proto
It has these top-level messages:
Struct
@@ -342,31 +342,31 @@
}
var fileDescriptor0 = []byte{
- // 405 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x74, 0x92, 0x4f, 0x8b, 0xda, 0x40,
- 0x18, 0xc6, 0x9d, 0x44, 0x83, 0x79, 0x53, 0xac, 0xa4, 0xd0, 0x8a, 0x85, 0xb6, 0xe8, 0x45, 0x4a,
- 0x49, 0xc0, 0xf6, 0x50, 0x6a, 0x2f, 0x0d, 0x58, 0x0b, 0x0d, 0x92, 0xa6, 0xd5, 0x96, 0x5e, 0xc4,
- 0x68, 0xcc, 0x06, 0xc7, 0x19, 0xc9, 0x9f, 0x5d, 0xfc, 0x26, 0x7b, 0x5c, 0xf6, 0xb8, 0xc7, 0xfd,
- 0x84, 0x3b,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x95, 0x37, 0xce, 0x21, 0xa9, 0x4a, 0xe8,
- 0x2d, 0x40, 0x40, 0x69, 0xd9, 0x46, 0x9d, 0x21, 0x4d, 0x7e, 0x15, 0xd7, 0x24, 0xf0, 0x55, 0xb8,
- 0xb0, 0x11, 0x15, 0x48, 0x43, 0x44, 0x7d, 0x75, 0x66, 0x8e, 0x85, 0x3d, 0x5b, 0x55, 0x29, 0x71,
- 0x9c, 0x96, 0xb5, 0x9a, 0xa8, 0x3d, 0x4d, 0xe9, 0x32, 0xa4, 0x4a, 0x89, 0xcb, 0x8d, 0xa3, 0x41,
- 0x7d, 0x1b, 0x93, 0x75, 0x6f, 0x04, 0x7a, 0x45, 0x98, 0x16, 0x68, 0xc2, 0xac, 0xfc, 0xa3, 0xe7,
- 0x86, 0x5e, 0x50, 0xef, 0x5f, 0x83, 0x5e, 0x0d, 0xd1, 0x6c, 0x01, 0x4c, 0x67, 0xae, 0xbb, 0x98,
- 0x7f, 0x73, 0x67, 0xe3, 0x76, 0xcd, 0xf9, 0x07, 0x2f, 0xd8, 0x5b, 0x3b, 0x76, 0x70, 0x0c, 0x19,
- 0xc6, 0xe3, 0x7b, 0x0f, 0xfd, 0x6f, 0xca, 0x44, 0xfb, 0xe0, 0x06, 0xa1, 0x5b, 0x45, 0x9d, 0x78,
- 0xce, 0x9d, 0xf2, 0x66, 0x22, 0x6b, 0xbc, 0xf2, 0xd6, 0xbf, 0x21, 0xc6, 0x3f, 0x09, 0xbd, 0x22,
- 0x7f, 0xf8, 0x43, 0x0d, 0x34, 0x61, 0xf6, 0xf1, 0x21, 0x00, 0x00, 0xff, 0xff, 0xd6, 0x20, 0x17,
- 0xd4, 0xd3, 0x02, 0x00, 0x00,
+ // 406 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x74, 0x92, 0x4f, 0x8b, 0xd3, 0x40,
+ 0x18, 0xc6, 0x3b, 0x49, 0x1b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x3f, 0x43, 0x8c, 0xbf, 0x12, 0xfa, 0x8f,
+ 0xfc, 0xe0, 0x0f, 0x35, 0xd0, 0x84, 0xd9, 0xdb, 0xbb, 0x00, 0x00, 0x00, 0xff, 0xff, 0xb1, 0x28,
+ 0x9b, 0x97, 0xd4, 0x02, 0x00, 0x00,
}
diff --git a/ptypes/timestamp/timestamp.pb.go b/ptypes/timestamp/timestamp.pb.go
index ac27c4b..eabbb91 100644
--- a/ptypes/timestamp/timestamp.pb.go
+++ b/ptypes/timestamp/timestamp.pb.go
@@ -1,12 +1,12 @@
// Code generated by protoc-gen-go.
-// source: github.com/golang/protobuf/types/timestamp/timestamp.proto
+// source: github.com/golang/protobuf/ptypes/timestamp/timestamp.proto
// DO NOT EDIT!
/*
Package timestamp is a generated protocol buffer package.
It is generated from these files:
- github.com/golang/protobuf/types/timestamp/timestamp.proto
+ github.com/golang/protobuf/ptypes/timestamp/timestamp.proto
It has these top-level messages:
Timestamp
@@ -97,23 +97,24 @@
func (m *Timestamp) String() string { return proto.CompactTextString(m) }
func (*Timestamp) ProtoMessage() {}
func (*Timestamp) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
+func (*Timestamp) XXX_WellKnownType() string { return "Timestamp" }
func init() {
proto.RegisterType((*Timestamp)(nil), "google.protobuf.Timestamp")
}
var fileDescriptor0 = []byte{
- // 190 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0xb2, 0x4a, 0xcf, 0x2c, 0xc9,
+ // 191 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0xb2, 0x4e, 0xcf, 0x2c, 0xc9,
0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xcf, 0xcf, 0x49, 0xcc, 0x4b, 0xd7, 0x2f, 0x28,
- 0xca,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0x40, 0xb0, 0xf4, 0xc0, 0x6a, 0x84, 0xf8, 0xd3, 0xf3,
+ 0xf3, 0xd3, 0x73, 0x52, 0xf5, 0x60, 0x3a, 0x94, 0xac, 0xb9, 0x38, 0x43, 0x60, 0x6a, 0x84, 0x24,
+ 0xb8, 0xd8, 0x8b, 0x53, 0x93, 0xf3, 0xf3, 0x52, 0x8a, 0x25, 0x18, 0x15, 0x18, 0x35, 0x98, 0x83,
+ 0x60, 0x5c, 0x21, 0x11, 0x2e, 0xd6, 0xbc, 0xc4, 0xbc, 0xfc, 0x62, 0x09, 0x26, 0xa0, 0x38, 0x6b,
+ 0x10, 0x84, 0xe3, 0x14, 0xcf, 0x25, 0x0c, 0x74, 0x85, 0x1e, 0x9a, 0x99, 0x4e, 0x7c, 0x70, 0x13,
+ 0x03, 0x40, 0x42, 0x01, 0x8c, 0x51, 0x9c, 0x70, 0x77, 0x2c, 0x60, 0x64, 0xfc, 0xc1, 0xc8, 0xb8,
+ 0x88, 0x89, 0xd9, 0x3d, 0xc0, 0x69, 0x15, 0x93, 0x9c, 0x3b, 0x44, 0x6b, 0x00, 0x54, 0xab, 0x5e,
+ 0x78, 0x6a, 0x4e, 0x8e, 0x77, 0x5e, 0x7e, 0x79, 0x5e, 0x08, 0xc8, 0x23, 0x49, 0x6c, 0x60, 0x33,
+ 0x8d, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0xab, 0x67, 0x0c, 0x88, 0xf4, 0x00, 0x00, 0x00,
}
diff --git a/ptypes/wrappers/wrappers.pb.go b/ptypes/wrappers/wrappers.pb.go
index e90bdea..1363bb6 100644
--- a/ptypes/wrappers/wrappers.pb.go
+++ b/ptypes/wrappers/wrappers.pb.go
@@ -1,12 +1,12 @@
// Code generated by protoc-gen-go.
-// source: github.com/golang/protobuf/types/wrappers/wrappers.proto
+// source: github.com/golang/protobuf/ptypes/wrappers/wrappers.proto
// DO NOT EDIT!
/*
Package wrappers is a generated protocol buffer package.
It is generated from these files:
- github.com/golang/protobuf/types/wrappers/wrappers.proto
+ github.com/golang/protobuf/ptypes/wrappers/wrappers.proto
It has these top-level messages:
DoubleValue
@@ -164,22 +164,22 @@
}
var fileDescriptor0 = []byte{
- // 257 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0xb2, 0x48, 0xcf, 0x2c, 0xc9,
+ // 258 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0xb2, 0x4c, 0xcf, 0x2c, 0xc9,
0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xcf, 0xcf, 0x49, 0xcc, 0x4b, 0xd7, 0x2f, 0x28,
- 0xca, 0x2f, 0xc9, 0x4f, 0x2a, 0x4d, 0xd3, 0x2f, 0xa9, 0x2c, 0x48, 0x2d, 0xd6, 0x2f, 0x2f, 0x4a,
- 0x2c, 0x28, 0x48, 0x2d, 0x42, 0x30, 0xf4, 0xc0, 0x0a, 0x84, 0xf8, 0xd3, 0xf3, 0xf3, 0xd3, 0x73,
- 0x52, 0xf5, 0x60, 0xca, 0x95, 0x94, 0xb9, 0xb8, 0x5d, 0xf2, 0x4b, 0x93, 0x72, 0x52, 0xc3, 0x12,
- 0x73, 0x4a, 0x53, 0x85, 0x44, 0xb8, 0x58, 0xcb, 0x40, 0x0c, 0x09, 0x46, 0x05, 0x46, 0x0d, 0xc6,
- 0x20, 0x08, 0x47, 0x49, 0x89, 0x8b, 0xcb, 0x2d, 0x27, 0x3f, 0xb1, 0x04, 0x8b, 0x1a, 0x26, 0x24,
- 0x35, 0x9e, 0x79, 0x25, 0x66, 0x26, 0x58, 0xd4, 0x30, 0xc3, 0xd4, 0x00, 0x2d, 0x0b, 0xc5, 0xa5,
- 0x88, 0x05, 0xd5, 0x20, 0x63, 0x23, 0x2c, 0x6a, 0x58, 0x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