Remove all gogoproto extensions

This commit removes the following gogoproto extensions;

- gogoproto.nullable
- gogoproto.customename
- gogoproto.unmarshaller_all
- gogoproto.stringer_all
- gogoproto.sizer_all
- gogoproto.marshaler_all
- gogoproto.goproto_unregonized_all
- gogoproto.goproto_stringer_all
- gogoproto.goproto_getters_all

None of them are supported by Google's toolchain (see #6564).

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
This commit is contained in:
Kazuyoshi Kato
2022-04-20 03:30:52 +00:00
parent 9b33526ef6
commit 237ef0de9b
48 changed files with 1301 additions and 1246 deletions

View File

@@ -32,21 +32,21 @@ type Sandbox struct {
// SandboxID is a unique instance identifier within namespace
SandboxID string `protobuf:"bytes,1,opt,name=sandbox_id,json=sandboxId,proto3" json:"sandbox_id,omitempty"`
// Runtime specifies which runtime to use for executing this container.
Runtime Sandbox_Runtime `protobuf:"bytes,2,opt,name=runtime,proto3" json:"runtime"`
Runtime *Sandbox_Runtime `protobuf:"bytes,2,opt,name=runtime,proto3" json:"runtime,omitempty"`
// Spec is sandbox configuration (kin of OCI runtime spec), spec's data will be written to a config.json file in the
// bundle directory (similary to OCI spec).
Spec *types.Any `protobuf:"bytes,3,opt,name=spec,proto3" json:"spec,omitempty"`
// Labels provides an area to include arbitrary data on containers.
Labels map[string]string `protobuf:"bytes,4,rep,name=labels,proto3" json:"labels" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
Labels map[string]string `protobuf:"bytes,4,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
// CreatedAt is the time the container was first created.
CreatedAt *types.Timestamp `protobuf:"bytes,5,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
// UpdatedAt is the last time the container was mutated.
UpdatedAt *types.Timestamp `protobuf:"bytes,6,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
// Extensions allow clients to provide optional blobs that can be handled by runtime.
Extensions map[string]types.Any `protobuf:"bytes,7,rep,name=extensions,proto3" json:"extensions" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
Extensions map[string]*types.Any `protobuf:"bytes,7,rep,name=extensions,proto3" json:"extensions,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:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Sandbox) Reset() { *m = Sandbox{} }
@@ -126,7 +126,7 @@ var xxx_messageInfo_Sandbox_Runtime proto.InternalMessageInfo
func init() {
proto.RegisterType((*Sandbox)(nil), "containerd.types.Sandbox")
proto.RegisterMapType((map[string]types.Any)(nil), "containerd.types.Sandbox.ExtensionsEntry")
proto.RegisterMapType((map[string]*types.Any)(nil), "containerd.types.Sandbox.ExtensionsEntry")
proto.RegisterMapType((map[string]string)(nil), "containerd.types.Sandbox.LabelsEntry")
proto.RegisterType((*Sandbox_Runtime)(nil), "containerd.types.Sandbox.Runtime")
}
@@ -136,35 +136,35 @@ func init() {
}
var fileDescriptor_f2257af6cf851f1c = []byte{
// 446 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x93, 0x4f, 0x8b, 0xd3, 0x40,
0x18, 0xc6, 0x3b, 0xfd, 0x17, 0xf2, 0x16, 0x71, 0x19, 0x7a, 0x88, 0x39, 0xa4, 0x55, 0x10, 0xaa,
0xc8, 0x44, 0xd6, 0xcb, 0xae, 0x9e, 0x5a, 0xdd, 0xc3, 0x8a, 0x22, 0x64, 0x3d, 0x88, 0x97, 0x65,
0xd2, 0x8c, 0x31, 0xd8, 0xcc, 0x84, 0x64, 0x22, 0x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xea, 0xfb, 0xae, 0x17, 0x8e, 0x95, 0xcd, 0x93,
0x9f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x59, 0xb4, 0xf4, 0x66, 0x86, 0x03, 0x00, 0x00,
// 438 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x93, 0xc1, 0x6b, 0xd4, 0x40,
0x14, 0xc6, 0x77, 0x76, 0xb7, 0x1b, 0xf2, 0x16, 0xb1, 0x0c, 0x7b, 0x88, 0x39, 0xa4, 0xab, 0x20,
0xac, 0x22, 0x13, 0xa9, 0x97, 0xd6, 0xe2, 0x61, 0x8b, 0x3d, 0xac, 0xe8, 0x65, 0xea, 0x41, 0xbc,
0x94, 0xc9, 0x66, 0x8c, 0xc1, 0xcd, 0x4c, 0x48, 0x26, 0xd2, 0xdc, 0xfc, 0xf3, 0x7a, 0xf4, 0xe8,
0x49, 0x6c, 0xfe, 0x0f, 0x41, 0x32, 0x33, 0xb1, 0x61, 0x75, 0xb5, 0x97, 0xf0, 0x86, 0xf7, 0xfb,
0xde, 0xf7, 0xf1, 0x1e, 0x81, 0xa3, 0x24, 0x55, 0x1f, 0xab, 0x88, 0xac, 0x65, 0x16, 0xae, 0xa5,
0x50, 0x2c, 0x15, 0xbc, 0x88, 0xfb, 0x25, 0xcb, 0xd3, 0x50, 0xd5, 0x39, 0x2f, 0xc3, 0x92, 0x89,
0x38, 0x92, 0x97, 0x24, 0x2f, 0xa4, 0x92, 0x78, 0xff, 0x86, 0x21, 0xba, 0xef, 0xcf, 0x12, 0x99,
0x48, 0xdd, 0x0c, 0xdb, 0xca, 0x70, 0xfe, 0xbd, 0x44, 0xca, 0x64, 0xc3, 0x43, 0xfd, 0x8a, 0xaa,
0x0f, 0x21, 0x13, 0xb5, 0x6d, 0x1d, 0x6c, 0xb7, 0x54, 0x9a, 0xf1, 0x52, 0xb1, 0x2c, 0x37, 0xc0,
0x83, 0x9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 0x69, 0x6f, 0x4d, 0x78, 0x1f, 0x46,
0x9f, 0x78, 0x6d, 0x27, 0xb6, 0x25, 0x9e, 0xc1, 0xde, 0x67, 0xb6, 0xa9, 0xcc, 0x51, 0x5d, 0x6a,
0x1e, 0xcf, 0x87, 0x47, 0xc8, 0x3f, 0x87, 0xbb, 0x5b, 0x41, 0xff, 0x22, 0x7f, 0xdc, 0x97, 0xef,
0x4a, 0x73, 0x33, 0xf4, 0xf4, 0xd5, 0xd5, 0x75, 0x30, 0xf8, 0x76, 0x1d, 0x0c, 0xbe, 0x34, 0x01,
0xba, 0x6a, 0x02, 0xf4, 0xb5, 0x09, 0xd0, 0x8f, 0x26, 0x40, 0xef, 0x9f, 0xde, 0xfe, 0xbf, 0x39,
0xd1, 0xdf, 0x77, 0x83, 0x68, 0xa2, 0x6d, 0x9e, 0xfd, 0x0a, 0x00, 0x00, 0xff, 0xff, 0x1b, 0xa8,
0x0f, 0x4d, 0x74, 0x03, 0x00, 0x00,
}
func (m *Sandbox) Marshal() (dAtA []byte, err error) {
@@ -195,16 +195,18 @@ func (m *Sandbox) MarshalToSizedBuffer(dAtA []byte) (int, error) {
for k := range m.Extensions {
v := m.Extensions[k]
baseI := i
{
size, err := (&v).MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
if v != nil {
{
size, err := v.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintSandbox(dAtA, i, uint64(size))
}
i -= size
i = encodeVarintSandbox(dAtA, i, uint64(size))
i--
dAtA[i] = 0x12
}
i--
dAtA[i] = 0x12
i -= len(k)
copy(dAtA[i:], k)
i = encodeVarintSandbox(dAtA, i, uint64(len(k)))
@@ -270,16 +272,18 @@ func (m *Sandbox) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i--
dAtA[i] = 0x1a
}
{
size, err := m.Runtime.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
if m.Runtime != nil {
{
size, err := m.Runtime.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintSandbox(dAtA, i, uint64(size))
}
i -= size
i = encodeVarintSandbox(dAtA, i, uint64(size))
i--
dAtA[i] = 0x12
}
i--
dAtA[i] = 0x12
if len(m.SandboxID) > 0 {
i -= len(m.SandboxID)
copy(dAtA[i:], m.SandboxID)
@@ -357,8 +361,10 @@ func (m *Sandbox) Size() (n int) {
if l > 0 {
n += 1 + l + sovSandbox(uint64(l))
}
l = m.Runtime.Size()
n += 1 + l + sovSandbox(uint64(l))
if m.Runtime != nil {
l = m.Runtime.Size()
n += 1 + l + sovSandbox(uint64(l))
}
if m.Spec != nil {
l = m.Spec.Size()
n += 1 + l + sovSandbox(uint64(l))
@@ -383,8 +389,12 @@ func (m *Sandbox) Size() (n int) {
for k, v := range m.Extensions {
_ = k
_ = v
l = v.Size()
mapEntrySize := 1 + len(k) + sovSandbox(uint64(len(k))) + 1 + l + sovSandbox(uint64(l))
l = 0
if v != nil {
l = v.Size()
l += 1 + sovSandbox(uint64(l))
}
mapEntrySize := 1 + len(k) + sovSandbox(uint64(len(k))) + l
n += mapEntrySize + 1 + sovSandbox(uint64(mapEntrySize))
}
}
@@ -439,14 +449,14 @@ func (this *Sandbox) String() string {
keysForExtensions = append(keysForExtensions, k)
}
github_com_gogo_protobuf_sortkeys.Strings(keysForExtensions)
mapStringForExtensions := "map[string]types.Any{"
mapStringForExtensions := "map[string]*types.Any{"
for _, k := range keysForExtensions {
mapStringForExtensions += fmt.Sprintf("%v: %v,", k, this.Extensions[k])
}
mapStringForExtensions += "}"
s := strings.Join([]string{`&Sandbox{`,
`SandboxID:` + fmt.Sprintf("%v", this.SandboxID) + `,`,
`Runtime:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Runtime), "Sandbox_Runtime", "Sandbox_Runtime", 1), `&`, ``, 1) + `,`,
`Runtime:` + strings.Replace(fmt.Sprintf("%v", this.Runtime), "Sandbox_Runtime", "Sandbox_Runtime", 1) + `,`,
`Spec:` + strings.Replace(fmt.Sprintf("%v", this.Spec), "Any", "types.Any", 1) + `,`,
`Labels:` + mapStringForLabels + `,`,
`CreatedAt:` + strings.Replace(fmt.Sprintf("%v", this.CreatedAt), "Timestamp", "types.Timestamp", 1) + `,`,
@@ -567,6 +577,9 @@ func (m *Sandbox) Unmarshal(dAtA []byte) error {
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Runtime == nil {
m.Runtime = &Sandbox_Runtime{}
}
if err := m.Runtime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
@@ -836,10 +849,10 @@ func (m *Sandbox) Unmarshal(dAtA []byte) error {
return io.ErrUnexpectedEOF
}
if m.Extensions == nil {
m.Extensions = make(map[string]types.Any)
m.Extensions = make(map[string]*types.Any)
}
var mapkey string
mapvalue := &types.Any{}
var mapvalue *types.Any
for iNdEx < postIndex {
entryPreIndex := iNdEx
var wire uint64
@@ -933,7 +946,7 @@ func (m *Sandbox) Unmarshal(dAtA []byte) error {
iNdEx += skippy
}
}
m.Extensions[mapkey] = *mapvalue
m.Extensions[mapkey] = mapvalue
iNdEx = postIndex
default:
iNdEx = preIndex