Remove gogoproto.stdtime
This commit removes gogoproto.stdtime, since it is not supported by Google's official toolchain (see https://github.com/containerd/containerd/issues/6564). Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
This commit is contained in:
@@ -11,21 +11,18 @@ import (
|
||||
github_com_containerd_typeurl "github.com/containerd/typeurl"
|
||||
_ "github.com/gogo/protobuf/gogoproto"
|
||||
proto "github.com/gogo/protobuf/proto"
|
||||
github_com_gogo_protobuf_types "github.com/gogo/protobuf/types"
|
||||
types "github.com/gogo/protobuf/types"
|
||||
io "io"
|
||||
math "math"
|
||||
math_bits "math/bits"
|
||||
reflect "reflect"
|
||||
strings "strings"
|
||||
time "time"
|
||||
)
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
var _ = time.Kitchen
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the proto package it is being compiled against.
|
||||
@@ -73,13 +70,13 @@ func (m *ForwardRequest) XXX_DiscardUnknown() {
|
||||
var xxx_messageInfo_ForwardRequest proto.InternalMessageInfo
|
||||
|
||||
type Envelope struct {
|
||||
Timestamp time.Time `protobuf:"bytes,1,opt,name=timestamp,proto3,stdtime" json:"timestamp"`
|
||||
Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"`
|
||||
Topic string `protobuf:"bytes,3,opt,name=topic,proto3" json:"topic,omitempty"`
|
||||
Event *types.Any `protobuf:"bytes,4,opt,name=event,proto3" json:"event,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
Timestamp *types.Timestamp `protobuf:"bytes,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
|
||||
Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"`
|
||||
Topic string `protobuf:"bytes,3,opt,name=topic,proto3" json:"topic,omitempty"`
|
||||
Event *types.Any `protobuf:"bytes,4,opt,name=event,proto3" json:"event,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *Envelope) Reset() { *m = Envelope{} }
|
||||
@@ -124,32 +121,31 @@ func init() {
|
||||
}
|
||||
|
||||
var fileDescriptor_19f98672016720b5 = []byte{
|
||||
// 392 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x52, 0xb1, 0xae, 0xd3, 0x30,
|
||||
0x14, 0xad, 0xe1, 0xbd, 0x47, 0x6b, 0x24, 0x06, 0xab, 0x42, 0x21, 0xa0, 0xe4, 0xe9, 0xb1, 0x54,
|
||||
0x48, 0xd8, 0x6a, 0xbb, 0xc1, 0x02, 0x15, 0x45, 0x82, 0x31, 0x42, 0x0c, 0x20, 0x21, 0xdc, 0xf4,
|
||||
0x36, 0xb5, 0x94, 0xd8, 0x26, 0x71, 0x82, 0xba, 0xf5, 0x13, 0xf8, 0x18, 0x16, 0xfe, 0xa0, 0x23,
|
||||
0x23, 0x13, 0xd0, 0x7c, 0x09, 0xaa, 0x93, 0x34, 0xd0, 0x0e, 0x54, 0x7a, 0xdb, 0xc9, 0x3d, 0xe7,
|
||||
0xdc, 0x73, 0xef, 0x8d, 0xf1, 0xeb, 0x48, 0x98, 0x65, 0x3e, 0xa3, 0xa1, 0x4a, 0x58, 0xa8, 0xa4,
|
||||
0xe1, 0x42, 0x42, 0x3a, 0xff, 0x1b, 0x72, 0x2d, 0x58, 0x06, 0x69, 0x21, 0x42, 0xc8, 0x98, 0x31,
|
||||
0xa9, 0x0e, 0x19, 0x14, 0x20, 0x4d, 0xc6, 0x8a, 0x61, 0x8d, 0xa8, 0x4e, 0x95, 0x51, 0xe4, 0x61,
|
||||
0xeb, 0xa2, 0x8d, 0x83, 0xd6, 0x0a, 0x6b, 0xa4, 0xc5, 0xd0, 0x7d, 0xf6, 0xdf, 0x40, 0xdb, 0x6c,
|
||||
0x96, 0x2f, 0x98, 0x8e, 0xf3, 0x48, 0x48, 0xb6, 0x10, 0x10, 0xcf, 0x35, 0x37, 0xcb, 0x2a, 0xc6,
|
||||
0xed, 0x47, 0x2a, 0x52, 0x16, 0xb2, 0x1d, 0xaa, 0xab, 0xf7, 0x22, 0xa5, 0xa2, 0x18, 0x5a, 0x37,
|
||||
0x97, 0xab, 0x9a, 0xba, 0x7f, 0x48, 0x41, 0xa2, 0x4d, 0x43, 0xfa, 0x87, 0xa4, 0x11, 0x09, 0x64,
|
||||
0x86, 0x27, 0xba, 0x12, 0x5c, 0xbd, 0xc7, 0x77, 0x5e, 0xaa, 0xf4, 0x33, 0x4f, 0xe7, 0x01, 0x7c,
|
||||
0xca, 0x21, 0x33, 0xe4, 0x15, 0xee, 0x82, 0x2c, 0x20, 0x56, 0x1a, 0x1c, 0x74, 0x89, 0x06, 0xb7,
|
||||
0x47, 0x8f, 0xe9, 0x09, 0xab, 0xd3, 0x69, 0x6d, 0x0a, 0xf6, 0xf6, 0xab, 0xaf, 0x08, 0x77, 0x9b,
|
||||
0x32, 0x99, 0xe0, 0xde, 0x3e, 0xbc, 0x6e, 0xec, 0xd2, 0x6a, 0x3c, 0xda, 0x8c, 0x47, 0xdf, 0x34,
|
||||
0x8a, 0x49, 0x77, 0xf3, 0xd3, 0xef, 0x7c, 0xf9, 0xe5, 0xa3, 0xa0, 0xb5, 0x91, 0x07, 0xb8, 0x27,
|
||||
0x79, 0x02, 0x99, 0xe6, 0x21, 0x38, 0x37, 0x2e, 0xd1, 0xa0, 0x17, 0xb4, 0x05, 0xd2, 0xc7, 0xe7,
|
||||
0x46, 0x69, 0x11, 0x3a, 0x37, 0x2d, 0x53, 0x7d, 0x90, 0x47, 0xf8, 0xdc, 0x8e, 0xea, 0x9c, 0xd9,
|
||||
0xcc, 0xfe, 0x51, 0xe6, 0x73, 0xb9, 0x0a, 0x2a, 0xc9, 0x93, 0xb3, 0xf5, 0x37, 0x1f, 0x8d, 0x3e,
|
||||
0xe2, 0x8b, 0xa9, 0x5d, 0x8e, 0xbc, 0xc5, 0xb7, 0xea, 0xeb, 0x90, 0xf1, 0x49, 0x47, 0xf8, 0xf7,
|
||||
0x96, 0xee, 0xdd, 0xa3, 0xb0, 0xe9, 0xee, 0xe7, 0x4c, 0x3e, 0x6c, 0xb6, 0x5e, 0xe7, 0xc7, 0xd6,
|
||||
0xeb, 0xac, 0x4b, 0x0f, 0x6d, 0x4a, 0x0f, 0x7d, 0x2f, 0x3d, 0xf4, 0xbb, 0xf4, 0xd0, 0xbb, 0x17,
|
||||
0xd7, 0x7a, 0xb1, 0x4f, 0x2b, 0x34, 0xbb, 0xb0, 0x79, 0xe3, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff,
|
||||
0x22, 0x5e, 0xcf, 0x4e, 0x00, 0x03, 0x00, 0x00,
|
||||
// 379 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x52, 0xc1, 0x0e, 0xd2, 0x40,
|
||||
0x10, 0x65, 0x15, 0x10, 0xd6, 0xc4, 0xc3, 0x86, 0x98, 0x5a, 0x4d, 0x21, 0x78, 0x21, 0x26, 0xee,
|
||||
0x06, 0xb8, 0x18, 0xbd, 0xa8, 0x11, 0x13, 0x3d, 0x36, 0xc6, 0x83, 0x26, 0xc6, 0xa5, 0x0c, 0x65,
|
||||
0x93, 0x76, 0x77, 0x6d, 0xb7, 0x35, 0xdc, 0xf8, 0x1e, 0xff, 0xc0, 0x3f, 0xe0, 0xe8, 0xd1, 0xa3,
|
||||
0xf4, 0x4b, 0x0c, 0xdb, 0x96, 0x2a, 0x1c, 0x24, 0xf1, 0xf6, 0x3a, 0xef, 0xbd, 0x79, 0x33, 0xd3,
|
||||
0xc5, 0x6f, 0x43, 0x61, 0x36, 0xd9, 0x92, 0x06, 0x2a, 0x66, 0x81, 0x92, 0x86, 0x0b, 0x09, 0xc9,
|
||||
0xea, 0x4f, 0xc8, 0xb5, 0x60, 0x29, 0x24, 0xb9, 0x08, 0x20, 0x65, 0xc6, 0x24, 0x3a, 0x60, 0x90,
|
||||
0x83, 0x34, 0x29, 0xcb, 0xa7, 0x15, 0xa2, 0x3a, 0x51, 0x46, 0x91, 0x87, 0x8d, 0x8b, 0xd6, 0x0e,
|
||||
0x5a, 0x29, 0xac, 0x91, 0xe6, 0x53, 0xf7, 0xf9, 0x3f, 0x03, 0x6d, 0xb3, 0x65, 0xb6, 0x66, 0x3a,
|
||||
0xca, 0x42, 0x21, 0xd9, 0x5a, 0x40, 0xb4, 0xd2, 0xdc, 0x6c, 0xca, 0x18, 0x77, 0x10, 0xaa, 0x50,
|
||||
0x59, 0xc8, 0x8e, 0xa8, 0xaa, 0xde, 0x0b, 0x95, 0x0a, 0x23, 0x68, 0xdc, 0x5c, 0x6e, 0x2b, 0xea,
|
||||
0xfe, 0x39, 0x05, 0xb1, 0x36, 0x35, 0x39, 0x3c, 0x27, 0x8d, 0x88, 0x21, 0x35, 0x3c, 0xd6, 0xa5,
|
||||
0x60, 0xfc, 0x11, 0xdf, 0x79, 0xad, 0x92, 0xaf, 0x3c, 0x59, 0xf9, 0xf0, 0x25, 0x83, 0xd4, 0x90,
|
||||
0x37, 0xb8, 0x07, 0x32, 0x87, 0x48, 0x69, 0x70, 0xd0, 0x08, 0x4d, 0x6e, 0xcf, 0x1e, 0xd3, 0x2b,
|
||||
0x56, 0xa7, 0x8b, 0xca, 0xe4, 0x9f, 0xec, 0xe3, 0x6f, 0x08, 0xf7, 0xea, 0x32, 0x79, 0x82, 0xfb,
|
||||
0xa7, 0xf0, 0xaa, 0xb1, 0x4b, 0xcb, 0xf1, 0x68, 0x3d, 0x1e, 0x7d, 0x57, 0x2b, 0xfc, 0x46, 0x4c,
|
||||
0x1e, 0xe0, 0xbe, 0xe4, 0x31, 0xa4, 0x9a, 0x07, 0xe0, 0xdc, 0x18, 0xa1, 0x49, 0xdf, 0x6f, 0x0a,
|
||||
0x64, 0x80, 0x3b, 0x46, 0x69, 0x11, 0x38, 0x37, 0x2d, 0x53, 0x7e, 0x90, 0x47, 0xb8, 0x63, 0x07,
|
||||
0x74, 0xda, 0x36, 0x69, 0x70, 0x91, 0xf4, 0x42, 0x6e, 0xfd, 0x52, 0xf2, 0xb4, 0xbd, 0xfb, 0x3e,
|
||||
0x44, 0xb3, 0xcf, 0xb8, 0xbb, 0xb0, 0x2b, 0x91, 0xf7, 0xf8, 0x56, 0x75, 0x13, 0x32, 0xbf, 0x6a,
|
||||
0xf5, 0xbf, 0x2f, 0xe8, 0xde, 0xbd, 0x08, 0x5b, 0x1c, 0x7f, 0xc9, 0xcb, 0x4f, 0xfb, 0x83, 0xd7,
|
||||
0xfa, 0x79, 0xf0, 0x5a, 0xbb, 0xc2, 0x43, 0xfb, 0xc2, 0x43, 0x3f, 0x0a, 0x0f, 0xfd, 0x2a, 0x3c,
|
||||
0xf4, 0xe1, 0xd5, 0x7f, 0xbd, 0xd3, 0x67, 0x25, 0x5a, 0x76, 0x6d, 0xde, 0xfc, 0x77, 0x00, 0x00,
|
||||
0x00, 0xff, 0xff, 0x87, 0xc7, 0x48, 0x3b, 0xf6, 0x02, 0x00, 0x00,
|
||||
}
|
||||
|
||||
// Field returns the value for the given fieldpath as a string, if defined.
|
||||
@@ -268,14 +264,18 @@ func (m *Envelope) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
i--
|
||||
dAtA[i] = 0x12
|
||||
}
|
||||
n3, err3 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Timestamp, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp):])
|
||||
if err3 != nil {
|
||||
return 0, err3
|
||||
if m.Timestamp != nil {
|
||||
{
|
||||
size, err := m.Timestamp.MarshalToSizedBuffer(dAtA[:i])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
i -= size
|
||||
i = encodeVarintEvents(dAtA, i, uint64(size))
|
||||
}
|
||||
i--
|
||||
dAtA[i] = 0xa
|
||||
}
|
||||
i -= n3
|
||||
i = encodeVarintEvents(dAtA, i, uint64(n3))
|
||||
i--
|
||||
dAtA[i] = 0xa
|
||||
return len(dAtA) - i, nil
|
||||
}
|
||||
|
||||
@@ -312,8 +312,10 @@ func (m *Envelope) Size() (n int) {
|
||||
}
|
||||
var l int
|
||||
_ = l
|
||||
l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp)
|
||||
n += 1 + l + sovEvents(uint64(l))
|
||||
if m.Timestamp != nil {
|
||||
l = m.Timestamp.Size()
|
||||
n += 1 + l + sovEvents(uint64(l))
|
||||
}
|
||||
l = len(m.Namespace)
|
||||
if l > 0 {
|
||||
n += 1 + l + sovEvents(uint64(l))
|
||||
@@ -354,7 +356,7 @@ func (this *Envelope) String() string {
|
||||
return "nil"
|
||||
}
|
||||
s := strings.Join([]string{`&Envelope{`,
|
||||
`Timestamp:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Timestamp), "Timestamp", "types.Timestamp", 1), `&`, ``, 1) + `,`,
|
||||
`Timestamp:` + strings.Replace(fmt.Sprintf("%v", this.Timestamp), "Timestamp", "types.Timestamp", 1) + `,`,
|
||||
`Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`,
|
||||
`Topic:` + fmt.Sprintf("%v", this.Topic) + `,`,
|
||||
`Event:` + strings.Replace(fmt.Sprintf("%v", this.Event), "Any", "types.Any", 1) + `,`,
|
||||
@@ -550,7 +552,10 @@ func (m *Envelope) Unmarshal(dAtA []byte) error {
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Timestamp, dAtA[iNdEx:postIndex]); err != nil {
|
||||
if m.Timestamp == nil {
|
||||
m.Timestamp = &types.Timestamp{}
|
||||
}
|
||||
if err := m.Timestamp.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
|
||||
@@ -41,7 +41,7 @@ message ForwardRequest {
|
||||
|
||||
message Envelope {
|
||||
option (containerd.plugin.fieldpath) = true;
|
||||
google.protobuf.Timestamp timestamp = 1 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false];
|
||||
google.protobuf.Timestamp timestamp = 1;
|
||||
string namespace = 2;
|
||||
string topic = 3;
|
||||
google.protobuf.Any event = 4;
|
||||
|
||||
Reference in New Issue
Block a user