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:
Kazuyoshi Kato
2022-04-18 22:12:15 +00:00
parent 26a3ab446b
commit 80b825ca2c
71 changed files with 1803 additions and 1594 deletions

View File

@@ -9,7 +9,6 @@ import (
_ "github.com/gogo/protobuf/gogoproto"
proto "github.com/gogo/protobuf/proto"
github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys"
github_com_gogo_protobuf_types "github.com/gogo/protobuf/types"
types "github.com/gogo/protobuf/types"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
@@ -19,14 +18,12 @@ import (
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.
@@ -37,7 +34,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
// Lease is an object which retains resources while it exists.
type Lease struct {
ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
CreatedAt time.Time `protobuf:"bytes,2,opt,name=created_at,json=createdAt,proto3,stdtime" json:"created_at"`
CreatedAt *types.Timestamp `protobuf:"bytes,2,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
Labels map[string]string `protobuf:"bytes,3,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
@@ -501,48 +498,47 @@ func init() {
}
var fileDescriptor_fefd70dfe8d93cbf = []byte{
// 642 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0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4, 0x94,
0x36, 0x7d, 0x58, 0x9b, 0xd1, 0x8b, 0x3b, 0x7b, 0x05, 0x45, 0x99, 0x54, 0x5e, 0xdb, 0x9c, 0x50,
0x63, 0x7f, 0xf5, 0x7b, 0x01, 0x54, 0x76, 0xa9, 0x04, 0x61, 0x50, 0xf9, 0x3e, 0xa3, 0x47, 0xf3,
0xbc, 0x56, 0xfa, 0xe3, 0x8c, 0x6a, 0x81, 0xff, 0x1a, 0x54, 0x7e, 0x07, 0xa9, 0x65, 0xa6, 0xde,
0x07, 0x7d, 0xfd, 0xca, 0x17, 0xed, 0x68, 0xf4, 0x19, 0x45, 0xa7, 0x50, 0x18, 0xcd, 0x09, 0x3d,
0x48, 0x5b, 0xdd, 0xf1, 0x0b, 0xa2, 0x3f, 0xcc, 0xa4, 0x15, 0xc0, 0x27, 0xa0, 0x4d, 0x6c, 0x2b,
0xda, 0x4a, 0xf1, 0x5e, 0xdd, 0xec, 0x6b, 0xd1, 0xdf, 0xc3, 0xca, 0xf4, 0x3a, 0xa2, 0x9d, 0x8c,
0x23, 0xc9, 0x96, 0xff, 0x1c, 0x96, 0xa7, 0x56, 0x08, 0x6d, 0x67, 0xeb, 0x7b, 0x6a, 0x41, 0xf5,
0x9d, 0xf9, 0x4c, 0x7c, 0x6a, 0xb5, 0x93, 0xc1, 0xa5, 0xb1, 0xf0, 0xe3, 0xd2, 0x58, 0xf8, 0x32,
0x34, 0x94, 0xc1, 0xd0, 0x50, 0xbe, 0x0d, 0x0d, 0xe5, 0xd7, 0xd0, 0x50, 0xde, 0x3d, 0xff, 0xcb,
0x7f, 0xe2, 0x03, 0x1e, 0x35, 0x55, 0xd6, 0xe5, 0xf6, 0xef, 0x00, 0x00, 0x00, 0xff, 0xff, 0x72,
0xbb, 0x87, 0xeb, 0xd2, 0x07, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
@@ -868,14 +864,18 @@ func (m *Lease) MarshalToSizedBuffer(dAtA []byte) (int, error) {
dAtA[i] = 0x1a
}
}
n1, err1 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.CreatedAt, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.CreatedAt):])
if err1 != nil {
return 0, err1
if m.CreatedAt != nil {
{
size, err := m.CreatedAt.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintLeases(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x12
}
i -= n1
i = encodeVarintLeases(dAtA, i, uint64(n1))
i--
dAtA[i] = 0x12
if len(m.ID) > 0 {
i -= len(m.ID)
copy(dAtA[i:], m.ID)
@@ -1324,8 +1324,10 @@ func (m *Lease) Size() (n int) {
if l > 0 {
n += 1 + l + sovLeases(uint64(l))
}
l = github_com_gogo_protobuf_types.SizeOfStdTime(m.CreatedAt)
n += 1 + l + sovLeases(uint64(l))
if m.CreatedAt != nil {
l = m.CreatedAt.Size()
n += 1 + l + sovLeases(uint64(l))
}
if len(m.Labels) > 0 {
for k, v := range m.Labels {
_ = k
@@ -1547,7 +1549,7 @@ func (this *Lease) String() string {
mapStringForLabels += "}"
s := strings.Join([]string{`&Lease{`,
`ID:` + fmt.Sprintf("%v", this.ID) + `,`,
`CreatedAt:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.CreatedAt), "Timestamp", "types.Timestamp", 1), `&`, ``, 1) + `,`,
`CreatedAt:` + strings.Replace(fmt.Sprintf("%v", this.CreatedAt), "Timestamp", "types.Timestamp", 1) + `,`,
`Labels:` + mapStringForLabels + `,`,
`XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
@@ -1787,7 +1789,10 @@ func (m *Lease) Unmarshal(dAtA []byte) error {
if postIndex > l {
return io.ErrUnexpectedEOF
}
if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.CreatedAt, dAtA[iNdEx:postIndex]); err != nil {
if m.CreatedAt == nil {
m.CreatedAt = &types.Timestamp{}
}
if err := m.CreatedAt.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex

View File

@@ -52,7 +52,7 @@ service Leases {
message Lease {
string id = 1;
google.protobuf.Timestamp created_at = 2 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false];
google.protobuf.Timestamp created_at = 2;
map<string, string> labels = 3;
}