diff --git a/api/events/container.pb.go b/api/events/container.pb.go
index c89d97f3e..2d0d1fa62 100644
--- a/api/events/container.pb.go
+++ b/api/events/container.pb.go
@@ -1,60 +1,19 @@
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: github.com/containerd/containerd/api/events/container.proto
-/*
- Package events is a generated protocol buffer package.
-
- It is generated from these files:
- github.com/containerd/containerd/api/events/container.proto
- github.com/containerd/containerd/api/events/content.proto
- github.com/containerd/containerd/api/events/image.proto
- github.com/containerd/containerd/api/events/namespace.proto
- github.com/containerd/containerd/api/events/snapshot.proto
- github.com/containerd/containerd/api/events/task.proto
-
- It has these top-level messages:
- ContainerCreate
- ContainerUpdate
- ContainerDelete
- ContentDelete
- ImageCreate
- ImageUpdate
- ImageDelete
- NamespaceCreate
- NamespaceUpdate
- NamespaceDelete
- SnapshotPrepare
- SnapshotCommit
- SnapshotRemove
- TaskCreate
- TaskStart
- TaskDelete
- TaskIO
- TaskExit
- TaskOOM
- TaskExecAdded
- TaskExecStarted
- TaskPaused
- TaskResumed
- TaskCheckpointed
-*/
package events
-import proto "github.com/gogo/protobuf/proto"
-import fmt "fmt"
-import math "math"
-import google_protobuf "github.com/gogo/protobuf/types"
-
-// skipping weak import gogoproto "github.com/gogo/protobuf/gogoproto"
-// skipping weak import containerd_plugin "github.com/containerd/containerd/protobuf/plugin"
-
-import typeurl "github.com/containerd/typeurl"
-
-import strings "strings"
-import reflect "reflect"
-import sortkeys "github.com/gogo/protobuf/sortkeys"
-
-import io "io"
+import (
+ fmt "fmt"
+ github_com_containerd_typeurl "github.com/containerd/typeurl"
+ proto "github.com/gogo/protobuf/proto"
+ github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys"
+ types "github.com/gogo/protobuf/types"
+ io "io"
+ math "math"
+ reflect "reflect"
+ strings "strings"
+)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
@@ -68,52 +27,209 @@ var _ = math.Inf
const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
type ContainerCreate struct {
- ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
- Image string `protobuf:"bytes,2,opt,name=image,proto3" json:"image,omitempty"`
- Runtime *ContainerCreate_Runtime `protobuf:"bytes,3,opt,name=runtime" json:"runtime,omitempty"`
+ ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ Image string `protobuf:"bytes,2,opt,name=image,proto3" json:"image,omitempty"`
+ Runtime *ContainerCreate_Runtime `protobuf:"bytes,3,opt,name=runtime,proto3" json:"runtime,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *ContainerCreate) Reset() { *m = ContainerCreate{} }
-func (*ContainerCreate) ProtoMessage() {}
-func (*ContainerCreate) Descriptor() ([]byte, []int) { return fileDescriptorContainer, []int{0} }
+func (m *ContainerCreate) Reset() { *m = ContainerCreate{} }
+func (*ContainerCreate) ProtoMessage() {}
+func (*ContainerCreate) Descriptor() ([]byte, []int) {
+ return fileDescriptor_0d1f05b8626f83ea, []int{0}
+}
+func (m *ContainerCreate) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *ContainerCreate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_ContainerCreate.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *ContainerCreate) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_ContainerCreate.Merge(m, src)
+}
+func (m *ContainerCreate) XXX_Size() int {
+ return m.Size()
+}
+func (m *ContainerCreate) XXX_DiscardUnknown() {
+ xxx_messageInfo_ContainerCreate.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_ContainerCreate proto.InternalMessageInfo
type ContainerCreate_Runtime struct {
- Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
- Options *google_protobuf.Any `protobuf:"bytes,2,opt,name=options" json:"options,omitempty"`
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ Options *types.Any `protobuf:"bytes,2,opt,name=options,proto3" json:"options,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
func (m *ContainerCreate_Runtime) Reset() { *m = ContainerCreate_Runtime{} }
func (*ContainerCreate_Runtime) ProtoMessage() {}
func (*ContainerCreate_Runtime) Descriptor() ([]byte, []int) {
- return fileDescriptorContainer, []int{0, 0}
+ return fileDescriptor_0d1f05b8626f83ea, []int{0, 0}
}
+func (m *ContainerCreate_Runtime) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *ContainerCreate_Runtime) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_ContainerCreate_Runtime.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *ContainerCreate_Runtime) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_ContainerCreate_Runtime.Merge(m, src)
+}
+func (m *ContainerCreate_Runtime) XXX_Size() int {
+ return m.Size()
+}
+func (m *ContainerCreate_Runtime) XXX_DiscardUnknown() {
+ xxx_messageInfo_ContainerCreate_Runtime.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_ContainerCreate_Runtime proto.InternalMessageInfo
type ContainerUpdate struct {
- ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
- Image string `protobuf:"bytes,2,opt,name=image,proto3" json:"image,omitempty"`
- Labels map[string]string `protobuf:"bytes,3,rep,name=labels" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
- SnapshotKey string `protobuf:"bytes,4,opt,name=snapshot_key,json=snapshotKey,proto3" json:"snapshot_key,omitempty"`
+ ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ Image string `protobuf:"bytes,2,opt,name=image,proto3" json:"image,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"`
+ SnapshotKey string `protobuf:"bytes,4,opt,name=snapshot_key,json=snapshotKey,proto3" json:"snapshot_key,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *ContainerUpdate) Reset() { *m = ContainerUpdate{} }
-func (*ContainerUpdate) ProtoMessage() {}
-func (*ContainerUpdate) Descriptor() ([]byte, []int) { return fileDescriptorContainer, []int{1} }
+func (m *ContainerUpdate) Reset() { *m = ContainerUpdate{} }
+func (*ContainerUpdate) ProtoMessage() {}
+func (*ContainerUpdate) Descriptor() ([]byte, []int) {
+ return fileDescriptor_0d1f05b8626f83ea, []int{1}
+}
+func (m *ContainerUpdate) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *ContainerUpdate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_ContainerUpdate.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *ContainerUpdate) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_ContainerUpdate.Merge(m, src)
+}
+func (m *ContainerUpdate) XXX_Size() int {
+ return m.Size()
+}
+func (m *ContainerUpdate) XXX_DiscardUnknown() {
+ xxx_messageInfo_ContainerUpdate.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_ContainerUpdate proto.InternalMessageInfo
type ContainerDelete struct {
- ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *ContainerDelete) Reset() { *m = ContainerDelete{} }
-func (*ContainerDelete) ProtoMessage() {}
-func (*ContainerDelete) Descriptor() ([]byte, []int) { return fileDescriptorContainer, []int{2} }
+func (m *ContainerDelete) Reset() { *m = ContainerDelete{} }
+func (*ContainerDelete) ProtoMessage() {}
+func (*ContainerDelete) Descriptor() ([]byte, []int) {
+ return fileDescriptor_0d1f05b8626f83ea, []int{2}
+}
+func (m *ContainerDelete) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *ContainerDelete) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_ContainerDelete.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *ContainerDelete) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_ContainerDelete.Merge(m, src)
+}
+func (m *ContainerDelete) XXX_Size() int {
+ return m.Size()
+}
+func (m *ContainerDelete) XXX_DiscardUnknown() {
+ xxx_messageInfo_ContainerDelete.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_ContainerDelete proto.InternalMessageInfo
func init() {
proto.RegisterType((*ContainerCreate)(nil), "containerd.events.ContainerCreate")
proto.RegisterType((*ContainerCreate_Runtime)(nil), "containerd.events.ContainerCreate.Runtime")
proto.RegisterType((*ContainerUpdate)(nil), "containerd.events.ContainerUpdate")
+ proto.RegisterMapType((map[string]string)(nil), "containerd.events.ContainerUpdate.LabelsEntry")
proto.RegisterType((*ContainerDelete)(nil), "containerd.events.ContainerDelete")
}
+func init() {
+ proto.RegisterFile("github.com/containerd/containerd/api/events/container.proto", fileDescriptor_0d1f05b8626f83ea)
+}
+
+var fileDescriptor_0d1f05b8626f83ea = []byte{
+ // 413 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x92, 0xc1, 0x0a, 0xd3, 0x30,
+ 0x18, 0xc7, 0x97, 0x76, 0x6e, 0x98, 0x0a, 0x6a, 0x18, 0x52, 0x7b, 0xa8, 0x73, 0xa7, 0xe9, 0x21,
+ 0x85, 0x7a, 0x51, 0x77, 0xd1, 0x6d, 0x0a, 0xa2, 0x82, 0x14, 0x84, 0xe1, 0x45, 0xd2, 0x35, 0xeb,
+ 0x82, 0x6d, 0x52, 0xda, 0x74, 0xd0, 0x9b, 0x8f, 0xe2, 0xe3, 0xec, 0xe8, 0xc1, 0x83, 0x27, 0x71,
+ 0x05, 0xdf, 0xc0, 0x07, 0x90, 0x26, 0xeb, 0x56, 0x14, 0x95, 0x9d, 0xfa, 0xcf, 0xd7, 0xff, 0x3f,
+ 0xdf, 0xf7, 0xfb, 0x08, 0x9c, 0xc5, 0x4c, 0x6e, 0xcb, 0x10, 0xaf, 0x45, 0xea, 0xad, 0x05, 0x97,
+ 0x84, 0x71, 0x9a, 0x47, 0x5d, 0x49, 0x32, 0xe6, 0xd1, 0x1d, 0xe5, 0xb2, 0x38, 0x57, 0x71, 0x96,
+ 0x0b, 0x29, 0xd0, 0xcd, 0xb3, 0x0d, 0x6b, 0x8b, 0x73, 0x3b, 0x16, 0x22, 0x4e, 0xa8, 0xa7, 0x0c,
+ 0x61, 0xb9, 0xf1, 0x08, 0xaf, 0xb4, 0xdb, 0x19, 0xc5, 0x22, 0x16, 0x4a, 0x7a, 0x8d, 0x3a, 0x56,
+ 0x9f, 0xfc, 0x77, 0x80, 0xd3, 0x55, 0x59, 0x52, 0xc6, 0x8c, 0x7b, 0x1b,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, 0xf8,
+ 0x8d, 0x6c, 0x26, 0xdc, 0x91, 0xa4, 0x3c, 0x4d, 0xa8, 0x0e, 0x8f, 0x8d, 0x87, 0x60, 0x72, 0xaf,
+ 0x83, 0xb9, 0xa4, 0x09, 0xfd, 0x3b, 0xe6, 0xfc, 0xcd, 0xfe, 0xe0, 0xf6, 0xbe, 0x1e, 0xdc, 0xde,
+ 0xc7, 0xda, 0x05, 0xfb, 0xda, 0x05, 0x9f, 0x6b, 0x17, 0x7c, 0xaf, 0x5d, 0xf0, 0xe9, 0xa7, 0x0b,
+ 0xde, 0xf9, 0x17, 0x3c, 0xe5, 0x99, 0xfe, 0xac, 0xc0, 0xca, 0x08, 0x07, 0x6a, 0xff, 0x0f, 0x7e,
+ 0x05, 0x00, 0x00, 0xff, 0xff, 0xf5, 0x09, 0xe0, 0xd6, 0x0b, 0x03, 0x00, 0x00,
+}
+
// Field returns the value for the given fieldpath as a string, if defined.
// If the value is not defined, the second value will be false.
func (m *ContainerCreate) Field(fieldpath []string) (string, bool) {
@@ -153,7 +269,7 @@ func (m *ContainerCreate_Runtime) Field(fieldpath []string) (string, bool) {
case "name":
return string(m.Name), len(m.Name) > 0
case "options":
- decoded, err := typeurl.UnmarshalAny(m.Options)
+ decoded, err := github_com_containerd_typeurl.UnmarshalAny(m.Options)
if err != nil {
return "", false
}
@@ -243,6 +359,9 @@ func (m *ContainerCreate) MarshalTo(dAtA []byte) (int, error) {
}
i += n1
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -277,6 +396,9 @@ func (m *ContainerCreate_Runtime) MarshalTo(dAtA []byte) (int, error) {
}
i += n2
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -330,6 +452,9 @@ func (m *ContainerUpdate) MarshalTo(dAtA []byte) (int, error) {
i = encodeVarintContainer(dAtA, i, uint64(len(m.SnapshotKey)))
i += copy(dAtA[i:], m.SnapshotKey)
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -354,6 +479,9 @@ func (m *ContainerDelete) MarshalTo(dAtA []byte) (int, error) {
i = encodeVarintContainer(dAtA, i, uint64(len(m.ID)))
i += copy(dAtA[i:], m.ID)
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -367,6 +495,9 @@ func encodeVarintContainer(dAtA []byte, offset int, v uint64) int {
return offset + 1
}
func (m *ContainerCreate) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.ID)
@@ -381,10 +512,16 @@ func (m *ContainerCreate) Size() (n int) {
l = m.Runtime.Size()
n += 1 + l + sovContainer(uint64(l))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *ContainerCreate_Runtime) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.Name)
@@ -395,10 +532,16 @@ func (m *ContainerCreate_Runtime) Size() (n int) {
l = m.Options.Size()
n += 1 + l + sovContainer(uint64(l))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *ContainerUpdate) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.ID)
@@ -421,16 +564,25 @@ func (m *ContainerUpdate) Size() (n int) {
if l > 0 {
n += 1 + l + sovContainer(uint64(l))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *ContainerDelete) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.ID)
if l > 0 {
n += 1 + l + sovContainer(uint64(l))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
@@ -455,6 +607,7 @@ func (this *ContainerCreate) String() string {
`ID:` + fmt.Sprintf("%v", this.ID) + `,`,
`Image:` + fmt.Sprintf("%v", this.Image) + `,`,
`Runtime:` + strings.Replace(fmt.Sprintf("%v", this.Runtime), "ContainerCreate_Runtime", "ContainerCreate_Runtime", 1) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -465,7 +618,8 @@ func (this *ContainerCreate_Runtime) String() string {
}
s := strings.Join([]string{`&ContainerCreate_Runtime{`,
`Name:` + fmt.Sprintf("%v", this.Name) + `,`,
- `Options:` + strings.Replace(fmt.Sprintf("%v", this.Options), "Any", "google_protobuf.Any", 1) + `,`,
+ `Options:` + strings.Replace(fmt.Sprintf("%v", this.Options), "Any", "types.Any", 1) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -478,7 +632,7 @@ func (this *ContainerUpdate) String() string {
for k, _ := range this.Labels {
keysForLabels = append(keysForLabels, k)
}
- sortkeys.Strings(keysForLabels)
+ github_com_gogo_protobuf_sortkeys.Strings(keysForLabels)
mapStringForLabels := "map[string]string{"
for _, k := range keysForLabels {
mapStringForLabels += fmt.Sprintf("%v: %v,", k, this.Labels[k])
@@ -489,6 +643,7 @@ func (this *ContainerUpdate) String() string {
`Image:` + fmt.Sprintf("%v", this.Image) + `,`,
`Labels:` + mapStringForLabels + `,`,
`SnapshotKey:` + fmt.Sprintf("%v", this.SnapshotKey) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -499,6 +654,7 @@ func (this *ContainerDelete) String() string {
}
s := strings.Join([]string{`&ContainerDelete{`,
`ID:` + fmt.Sprintf("%v", this.ID) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -526,7 +682,7 @@ func (m *ContainerCreate) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -554,7 +710,7 @@ func (m *ContainerCreate) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -564,6 +720,9 @@ func (m *ContainerCreate) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthContainer
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthContainer
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -583,7 +742,7 @@ func (m *ContainerCreate) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -593,6 +752,9 @@ func (m *ContainerCreate) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthContainer
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthContainer
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -612,7 +774,7 @@ func (m *ContainerCreate) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -621,6 +783,9 @@ func (m *ContainerCreate) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthContainer
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthContainer
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -640,9 +805,13 @@ func (m *ContainerCreate) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthContainer
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthContainer
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -667,7 +836,7 @@ func (m *ContainerCreate_Runtime) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -695,7 +864,7 @@ func (m *ContainerCreate_Runtime) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -705,6 +874,9 @@ func (m *ContainerCreate_Runtime) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthContainer
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthContainer
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -724,7 +896,7 @@ func (m *ContainerCreate_Runtime) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -733,11 +905,14 @@ func (m *ContainerCreate_Runtime) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthContainer
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthContainer
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Options == nil {
- m.Options = &google_protobuf.Any{}
+ m.Options = &types.Any{}
}
if err := m.Options.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
@@ -752,9 +927,13 @@ func (m *ContainerCreate_Runtime) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthContainer
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthContainer
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -779,7 +958,7 @@ func (m *ContainerUpdate) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -807,7 +986,7 @@ func (m *ContainerUpdate) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -817,6 +996,9 @@ func (m *ContainerUpdate) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthContainer
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthContainer
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -836,7 +1018,7 @@ func (m *ContainerUpdate) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -846,6 +1028,9 @@ func (m *ContainerUpdate) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthContainer
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthContainer
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -865,7 +1050,7 @@ func (m *ContainerUpdate) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -874,6 +1059,9 @@ func (m *ContainerUpdate) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthContainer
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthContainer
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -894,7 +1082,7 @@ func (m *ContainerUpdate) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -911,7 +1099,7 @@ func (m *ContainerUpdate) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ stringLenmapkey |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -921,6 +1109,9 @@ func (m *ContainerUpdate) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthContainer
}
postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey < 0 {
+ return ErrInvalidLengthContainer
+ }
if postStringIndexmapkey > l {
return io.ErrUnexpectedEOF
}
@@ -937,7 +1128,7 @@ func (m *ContainerUpdate) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLenmapvalue |= (uint64(b) & 0x7F) << shift
+ stringLenmapvalue |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -947,6 +1138,9 @@ func (m *ContainerUpdate) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthContainer
}
postStringIndexmapvalue := iNdEx + intStringLenmapvalue
+ if postStringIndexmapvalue < 0 {
+ return ErrInvalidLengthContainer
+ }
if postStringIndexmapvalue > l {
return io.ErrUnexpectedEOF
}
@@ -983,7 +1177,7 @@ func (m *ContainerUpdate) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -993,6 +1187,9 @@ func (m *ContainerUpdate) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthContainer
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthContainer
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -1007,9 +1204,13 @@ func (m *ContainerUpdate) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthContainer
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthContainer
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -1034,7 +1235,7 @@ func (m *ContainerDelete) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1062,7 +1263,7 @@ func (m *ContainerDelete) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1072,6 +1273,9 @@ func (m *ContainerDelete) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthContainer
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthContainer
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -1086,9 +1290,13 @@ func (m *ContainerDelete) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthContainer
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthContainer
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -1152,10 +1360,13 @@ func skipContainer(dAtA []byte) (n int, err error) {
break
}
}
- iNdEx += length
if length < 0 {
return 0, ErrInvalidLengthContainer
}
+ iNdEx += length
+ if iNdEx < 0 {
+ return 0, ErrInvalidLengthContainer
+ }
return iNdEx, nil
case 3:
for {
@@ -1184,6 +1395,9 @@ func skipContainer(dAtA []byte) (n int, err error) {
return 0, err
}
iNdEx = start + next
+ if iNdEx < 0 {
+ return 0, ErrInvalidLengthContainer
+ }
}
return iNdEx, nil
case 4:
@@ -1202,37 +1416,3 @@ var (
ErrInvalidLengthContainer = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowContainer = fmt.Errorf("proto: integer overflow")
)
-
-func init() {
- proto.RegisterFile("github.com/containerd/containerd/api/events/container.proto", fileDescriptorContainer)
-}
-
-var fileDescriptorContainer = []byte{
- // 413 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x92, 0xc1, 0x0a, 0xd3, 0x30,
- 0x18, 0xc7, 0x97, 0x76, 0x6e, 0x98, 0x0a, 0x6a, 0x18, 0x52, 0x7b, 0xa8, 0x73, 0xa7, 0xe9, 0x21,
- 0x85, 0x7a, 0x51, 0x77, 0xd1, 0x6d, 0x0a, 0xa2, 0x82, 0x14, 0x84, 0xe1, 0x45, 0xd2, 0x35, 0xeb,
- 0x82, 0x6d, 0x52, 0xda, 0x74, 0xd0, 0x9b, 0x8f, 0xe2, 0xe3, 0xec, 0xe8, 0xc1, 0x83, 0x27, 0x71,
- 0x05, 0xdf, 0xc0, 0x07, 0x90, 0x26, 0xeb, 0x56, 0x14, 0x95, 0x9d, 0xfa, 0xcf, 0xd7, 0xff, 0x3f,
- 0xdf, 0xf7, 0xfb, 0x08, 0x9c, 0xc5, 0x4c, 0x6e, 0xcb, 0x10, 0xaf, 0x45, 0xea, 0xad, 0x05, 0x97,
- 0x84, 0x71, 0x9a, 0x47, 0x5d, 0x49, 0x32, 0xe6, 0xd1, 0x1d, 0xe5, 0xb2, 0x38, 0x57, 0x71, 0x96,
- 0x0b, 0x29, 0xd0, 0xcd, 0xb3, 0x0d, 0x6b, 0x8b, 0x73, 0x3b, 0x16, 0x22, 0x4e, 0xa8, 0xa7, 0x0c,
- 0x61, 0xb9, 0xf1, 0x08, 0xaf, 0xb4, 0xdb, 0x19, 0xc5, 0x22, 0x16, 0x4a, 0x7a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, 0xd6, 0x5e, 0xd2, 0xca, 0x79, 0x04, 0xad, 0x4e, 0x12, 0xdd, 0x80, 0x66, 0x63, 0xd4, 0xf8,
- 0x8d, 0x6c, 0x26, 0xdc, 0x91, 0xa4, 0x3c, 0x4d, 0xa8, 0x0e, 0x8f, 0x8d, 0x87, 0x60, 0x72, 0xaf,
- 0x83, 0xb9, 0xa4, 0x09, 0xfd, 0x3b, 0xe6, 0xfc, 0xcd, 0xfe, 0xe0, 0xf6, 0xbe, 0x1e, 0xdc, 0xde,
- 0xc7, 0xda, 0x05, 0xfb, 0xda, 0x05, 0x9f, 0x6b, 0x17, 0x7c, 0xaf, 0x5d, 0xf0, 0xe9, 0xa7, 0x0b,
- 0xde, 0xf9, 0x17, 0x3c, 0xe5, 0x99, 0xfe, 0xac, 0xc0, 0xca, 0x08, 0x07, 0x6a, 0xff, 0x0f, 0x7e,
- 0x05, 0x00, 0x00, 0xff, 0xff, 0xf5, 0x09, 0xe0, 0xd6, 0x0b, 0x03, 0x00, 0x00,
-}
diff --git a/api/events/content.pb.go b/api/events/content.pb.go
index 87648d193..c6ae8a5f2 100644
--- a/api/events/content.pb.go
+++ b/api/events/content.pb.go
@@ -3,37 +3,93 @@
package events
-import proto "github.com/gogo/protobuf/proto"
-import fmt "fmt"
-import math "math"
-
-// skipping weak import gogoproto "github.com/gogo/protobuf/gogoproto"
-// skipping weak import containerd_plugin "github.com/containerd/containerd/protobuf/plugin"
-
-import github_com_opencontainers_go_digest "github.com/opencontainers/go-digest"
-
-import strings "strings"
-import reflect "reflect"
-
-import io "io"
+import (
+ fmt "fmt"
+ proto "github.com/gogo/protobuf/proto"
+ github_com_opencontainers_go_digest "github.com/opencontainers/go-digest"
+ io "io"
+ math "math"
+ reflect "reflect"
+ strings "strings"
+)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the proto package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// proto package needs to be updated.
+const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
+
type ContentDelete struct {
- Digest github_com_opencontainers_go_digest.Digest `protobuf:"bytes,1,opt,name=digest,proto3,customtype=github.com/opencontainers/go-digest.Digest" json:"digest"`
+ Digest github_com_opencontainers_go_digest.Digest `protobuf:"bytes,1,opt,name=digest,proto3,customtype=github.com/opencontainers/go-digest.Digest" json:"digest"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *ContentDelete) Reset() { *m = ContentDelete{} }
-func (*ContentDelete) ProtoMessage() {}
-func (*ContentDelete) Descriptor() ([]byte, []int) { return fileDescriptorContent, []int{0} }
+func (m *ContentDelete) Reset() { *m = ContentDelete{} }
+func (*ContentDelete) ProtoMessage() {}
+func (*ContentDelete) Descriptor() ([]byte, []int) {
+ return fileDescriptor_dfb34b8b808e2ecd, []int{0}
+}
+func (m *ContentDelete) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *ContentDelete) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_ContentDelete.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *ContentDelete) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_ContentDelete.Merge(m, src)
+}
+func (m *ContentDelete) XXX_Size() int {
+ return m.Size()
+}
+func (m *ContentDelete) XXX_DiscardUnknown() {
+ xxx_messageInfo_ContentDelete.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_ContentDelete proto.InternalMessageInfo
func init() {
proto.RegisterType((*ContentDelete)(nil), "containerd.events.ContentDelete")
}
+func init() {
+ proto.RegisterFile("github.com/containerd/containerd/api/events/content.proto", fileDescriptor_dfb34b8b808e2ecd)
+}
+
+var fileDescriptor_dfb34b8b808e2ecd = []byte{
+ // 228 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xb2, 0x4c, 0xcf, 0x2c, 0xc9,
+ 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xce, 0xcf, 0x2b, 0x49, 0xcc, 0xcc, 0x4b, 0x2d,
+ 0x4a, 0x41, 0x66, 0x26, 0x16, 0x64, 0xea, 0xa7, 0x96, 0xa5, 0xe6, 0x95, 0x14, 0x83, 0x45, 0x53,
+ 0xf3, 0x4a, 0xf4, 0x0a, 0x8a, 0xf2, 0x4b, 0xf2, 0x85, 0x04, 0x11, 0x8a, 0xf4, 0x20, 0x0a, 0xa4,
+ 0x44, 0xd2, 0xf3, 0xd3, 0xf3, 0xc1, 0xb2, 0xfa, 0x20, 0x16, 0x44, 0xa1, 0x94, 0x03, 0x41, 0x3b,
+ 0xc0, 0xea, 0x92, 0x4a, 0xd3, 0xf4, 0x0b, 0x72, 0x4a, 0xd3, 0x33, 0xf3, 0xf4, 0xd3, 0x32, 0x53,
+ 0x73, 0x52, 0x0a, 0x12, 0x4b, 0x32, 0x20, 0x26, 0x28, 0x45, 0x73, 0xf1, 0x3a, 0x43, 0xec, 0x76,
+ 0x49, 0xcd, 0x49, 0x2d, 0x49, 0x15, 0xf2, 0xe2, 0x62, 0x4b, 0xc9, 0x4c, 0x4f, 0x2d, 0x2e, 0x91,
+ 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x74, 0x32, 0x3a, 0x71, 0x4f, 0x9e, 0xe1, 0xd6, 0x3d, 0x79, 0x2d,
+ 0x24, 0xab, 0xf2, 0x0b, 0x52, 0xf3, 0xe0, 0x76, 0x14, 0xeb, 0xa7, 0xe7, 0xeb, 0x42, 0xb4, 0xe8,
+ 0xb9, 0x80, 0xa9, 0x20, 0xa8, 0x09, 0x4e, 0x01, 0x27, 0x1e, 0xca, 0x31, 0xdc, 0x78, 0x28, 0xc7,
+ 0xd0, 0xf0, 0x48, 0x8e, 0xf1, 0xc4, 0x23, 0x39, 0xc6, 0x0b, 0x8f, 0xe4, 0x18, 0x1f, 0x3c, 0x92,
+ 0x63, 0x5c, 0xf0, 0x45, 0x8e, 0x31, 0xca, 0x88, 0x84, 0x00, 0xb2, 0x86, 0x50, 0x11, 0x0c, 0x11,
+ 0x8c, 0x49, 0x6c, 0x60, 0x97, 0x1b, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0x4b, 0x78, 0x99, 0xee,
+ 0x61, 0x01, 0x00, 0x00,
+}
+
// Field returns the value for the given fieldpath as a string, if defined.
// If the value is not defined, the second value will be false.
func (m *ContentDelete) Field(fieldpath []string) (string, bool) {
@@ -68,6 +124,9 @@ func (m *ContentDelete) MarshalTo(dAtA []byte) (int, error) {
i = encodeVarintContent(dAtA, i, uint64(len(m.Digest)))
i += copy(dAtA[i:], m.Digest)
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -81,12 +140,18 @@ func encodeVarintContent(dAtA []byte, offset int, v uint64) int {
return offset + 1
}
func (m *ContentDelete) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.Digest)
if l > 0 {
n += 1 + l + sovContent(uint64(l))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
@@ -109,6 +174,7 @@ func (this *ContentDelete) String() string {
}
s := strings.Join([]string{`&ContentDelete{`,
`Digest:` + fmt.Sprintf("%v", this.Digest) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -136,7 +202,7 @@ func (m *ContentDelete) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -164,7 +230,7 @@ func (m *ContentDelete) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -174,6 +240,9 @@ func (m *ContentDelete) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthContent
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthContent
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -188,9 +257,13 @@ func (m *ContentDelete) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthContent
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthContent
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -254,10 +327,13 @@ func skipContent(dAtA []byte) (n int, err error) {
break
}
}
- iNdEx += length
if length < 0 {
return 0, ErrInvalidLengthContent
}
+ iNdEx += length
+ if iNdEx < 0 {
+ return 0, ErrInvalidLengthContent
+ }
return iNdEx, nil
case 3:
for {
@@ -286,6 +362,9 @@ func skipContent(dAtA []byte) (n int, err error) {
return 0, err
}
iNdEx = start + next
+ if iNdEx < 0 {
+ return 0, ErrInvalidLengthContent
+ }
}
return iNdEx, nil
case 4:
@@ -304,26 +383,3 @@ var (
ErrInvalidLengthContent = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowContent = fmt.Errorf("proto: integer overflow")
)
-
-func init() {
- proto.RegisterFile("github.com/containerd/containerd/api/events/content.proto", fileDescriptorContent)
-}
-
-var fileDescriptorContent = []byte{
- // 228 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xb2, 0x4c, 0xcf, 0x2c, 0xc9,
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0x8e, 0x31, 0xca, 0x88, 0x84, 0x00, 0xb2, 0x86, 0x50, 0x11, 0x0c, 0x11,
- 0x8c, 0x49, 0x6c, 0x60, 0x97, 0x1b, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0x4b, 0x78, 0x99, 0xee,
- 0x61, 0x01, 0x00, 0x00,
-}
diff --git a/api/events/image.pb.go b/api/events/image.pb.go
index 8197005b6..e0c58aa49 100644
--- a/api/events/image.pb.go
+++ b/api/events/image.pb.go
@@ -3,55 +3,181 @@
package events
-import proto "github.com/gogo/protobuf/proto"
-import fmt "fmt"
-import math "math"
-
-// skipping weak import containerd_plugin "github.com/containerd/containerd/protobuf/plugin"
-
-import strings "strings"
-import reflect "reflect"
-import sortkeys "github.com/gogo/protobuf/sortkeys"
-
-import io "io"
+import (
+ fmt "fmt"
+ proto "github.com/gogo/protobuf/proto"
+ github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys"
+ io "io"
+ math "math"
+ reflect "reflect"
+ strings "strings"
+)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the proto package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// proto package needs to be updated.
+const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
+
type ImageCreate struct {
- Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
- Labels map[string]string `protobuf:"bytes,2,rep,name=labels" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ Labels map[string]string `protobuf:"bytes,2,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:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *ImageCreate) Reset() { *m = ImageCreate{} }
-func (*ImageCreate) ProtoMessage() {}
-func (*ImageCreate) Descriptor() ([]byte, []int) { return fileDescriptorImage, []int{0} }
+func (m *ImageCreate) Reset() { *m = ImageCreate{} }
+func (*ImageCreate) ProtoMessage() {}
+func (*ImageCreate) Descriptor() ([]byte, []int) {
+ return fileDescriptor_7085610f7b33e042, []int{0}
+}
+func (m *ImageCreate) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *ImageCreate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_ImageCreate.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *ImageCreate) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_ImageCreate.Merge(m, src)
+}
+func (m *ImageCreate) XXX_Size() int {
+ return m.Size()
+}
+func (m *ImageCreate) XXX_DiscardUnknown() {
+ xxx_messageInfo_ImageCreate.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_ImageCreate proto.InternalMessageInfo
type ImageUpdate struct {
- Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
- Labels map[string]string `protobuf:"bytes,2,rep,name=labels" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ Labels map[string]string `protobuf:"bytes,2,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:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *ImageUpdate) Reset() { *m = ImageUpdate{} }
-func (*ImageUpdate) ProtoMessage() {}
-func (*ImageUpdate) Descriptor() ([]byte, []int) { return fileDescriptorImage, []int{1} }
+func (m *ImageUpdate) Reset() { *m = ImageUpdate{} }
+func (*ImageUpdate) ProtoMessage() {}
+func (*ImageUpdate) Descriptor() ([]byte, []int) {
+ return fileDescriptor_7085610f7b33e042, []int{1}
+}
+func (m *ImageUpdate) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *ImageUpdate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_ImageUpdate.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *ImageUpdate) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_ImageUpdate.Merge(m, src)
+}
+func (m *ImageUpdate) XXX_Size() int {
+ return m.Size()
+}
+func (m *ImageUpdate) XXX_DiscardUnknown() {
+ xxx_messageInfo_ImageUpdate.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_ImageUpdate proto.InternalMessageInfo
type ImageDelete struct {
- Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *ImageDelete) Reset() { *m = ImageDelete{} }
-func (*ImageDelete) ProtoMessage() {}
-func (*ImageDelete) Descriptor() ([]byte, []int) { return fileDescriptorImage, []int{2} }
+func (m *ImageDelete) Reset() { *m = ImageDelete{} }
+func (*ImageDelete) ProtoMessage() {}
+func (*ImageDelete) Descriptor() ([]byte, []int) {
+ return fileDescriptor_7085610f7b33e042, []int{2}
+}
+func (m *ImageDelete) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *ImageDelete) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_ImageDelete.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *ImageDelete) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_ImageDelete.Merge(m, src)
+}
+func (m *ImageDelete) XXX_Size() int {
+ return m.Size()
+}
+func (m *ImageDelete) XXX_DiscardUnknown() {
+ xxx_messageInfo_ImageDelete.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_ImageDelete proto.InternalMessageInfo
func init() {
proto.RegisterType((*ImageCreate)(nil), "containerd.services.images.v1.ImageCreate")
+ proto.RegisterMapType((map[string]string)(nil), "containerd.services.images.v1.ImageCreate.LabelsEntry")
proto.RegisterType((*ImageUpdate)(nil), "containerd.services.images.v1.ImageUpdate")
+ proto.RegisterMapType((map[string]string)(nil), "containerd.services.images.v1.ImageUpdate.LabelsEntry")
proto.RegisterType((*ImageDelete)(nil), "containerd.services.images.v1.ImageDelete")
}
+func init() {
+ proto.RegisterFile("github.com/containerd/containerd/api/events/image.proto", fileDescriptor_7085610f7b33e042)
+}
+
+var fileDescriptor_7085610f7b33e042 = []byte{
+ // 292 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x32, 0x4f, 0xcf, 0x2c, 0xc9,
+ 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xce, 0xcf, 0x2b, 0x49, 0xcc, 0xcc, 0x4b, 0x2d,
+ 0x4a, 0x41, 0x66, 0x26, 0x16, 0x64, 0xea, 0xa7, 0x96, 0xa5, 0xe6, 0x95, 0x14, 0xeb, 0x67, 0xe6,
+ 0x26, 0xa6, 0xa7, 0xea, 0x15, 0x14, 0xe5, 0x97, 0xe4, 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3c,
+ 0x94, 0x63, 0x68, 0x78, 0x24, 0xc7, 0x78, 0xe2, 0x91, 0x1c, 0xe3, 0x85, 0x47, 0x72, 0x8c, 0x0f,
+ 0x1e, 0xc9, 0x31, 0x2e, 0xf8, 0x22, 0xc7, 0x18, 0x65, 0x44, 0x42, 0xc2, 0xb1, 0x86, 0x50, 0x11,
+ 0x0c, 0x49, 0x6c, 0xe0, 0xb8, 0x35, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0x41, 0x80, 0x92, 0x17,
+ 0x77, 0x02, 0x00, 0x00,
+}
+
// Field returns the value for the given fieldpath as a string, if defined.
// If the value is not defined, the second value will be false.
func (m *ImageCreate) Field(fieldpath []string) (string, bool) {
@@ -147,6 +273,9 @@ func (m *ImageCreate) MarshalTo(dAtA []byte) (int, error) {
i += copy(dAtA[i:], v)
}
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -188,6 +317,9 @@ func (m *ImageUpdate) MarshalTo(dAtA []byte) (int, error) {
i += copy(dAtA[i:], v)
}
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -212,6 +344,9 @@ func (m *ImageDelete) MarshalTo(dAtA []byte) (int, error) {
i = encodeVarintImage(dAtA, i, uint64(len(m.Name)))
i += copy(dAtA[i:], m.Name)
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -225,6 +360,9 @@ func encodeVarintImage(dAtA []byte, offset int, v uint64) int {
return offset + 1
}
func (m *ImageCreate) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.Name)
@@ -239,10 +377,16 @@ func (m *ImageCreate) Size() (n int) {
n += mapEntrySize + 1 + sovImage(uint64(mapEntrySize))
}
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *ImageUpdate) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.Name)
@@ -257,16 +401,25 @@ func (m *ImageUpdate) Size() (n int) {
n += mapEntrySize + 1 + sovImage(uint64(mapEntrySize))
}
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *ImageDelete) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.Name)
if l > 0 {
n += 1 + l + sovImage(uint64(l))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
@@ -291,7 +444,7 @@ func (this *ImageCreate) String() string {
for k, _ := range this.Labels {
keysForLabels = append(keysForLabels, k)
}
- sortkeys.Strings(keysForLabels)
+ github_com_gogo_protobuf_sortkeys.Strings(keysForLabels)
mapStringForLabels := "map[string]string{"
for _, k := range keysForLabels {
mapStringForLabels += fmt.Sprintf("%v: %v,", k, this.Labels[k])
@@ -300,6 +453,7 @@ func (this *ImageCreate) String() string {
s := strings.Join([]string{`&ImageCreate{`,
`Name:` + fmt.Sprintf("%v", this.Name) + `,`,
`Labels:` + mapStringForLabels + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -312,7 +466,7 @@ func (this *ImageUpdate) String() string {
for k, _ := range this.Labels {
keysForLabels = append(keysForLabels, k)
}
- sortkeys.Strings(keysForLabels)
+ github_com_gogo_protobuf_sortkeys.Strings(keysForLabels)
mapStringForLabels := "map[string]string{"
for _, k := range keysForLabels {
mapStringForLabels += fmt.Sprintf("%v: %v,", k, this.Labels[k])
@@ -321,6 +475,7 @@ func (this *ImageUpdate) String() string {
s := strings.Join([]string{`&ImageUpdate{`,
`Name:` + fmt.Sprintf("%v", this.Name) + `,`,
`Labels:` + mapStringForLabels + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -331,6 +486,7 @@ func (this *ImageDelete) String() string {
}
s := strings.Join([]string{`&ImageDelete{`,
`Name:` + fmt.Sprintf("%v", this.Name) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -358,7 +514,7 @@ func (m *ImageCreate) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -386,7 +542,7 @@ func (m *ImageCreate) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -396,6 +552,9 @@ func (m *ImageCreate) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthImage
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthImage
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -415,7 +574,7 @@ func (m *ImageCreate) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -424,6 +583,9 @@ func (m *ImageCreate) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthImage
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthImage
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -444,7 +606,7 @@ func (m *ImageCreate) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -461,7 +623,7 @@ func (m *ImageCreate) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ stringLenmapkey |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -471,6 +633,9 @@ func (m *ImageCreate) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthImage
}
postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey < 0 {
+ return ErrInvalidLengthImage
+ }
if postStringIndexmapkey > l {
return io.ErrUnexpectedEOF
}
@@ -487,7 +652,7 @@ func (m *ImageCreate) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLenmapvalue |= (uint64(b) & 0x7F) << shift
+ stringLenmapvalue |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -497,6 +662,9 @@ func (m *ImageCreate) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthImage
}
postStringIndexmapvalue := iNdEx + intStringLenmapvalue
+ if postStringIndexmapvalue < 0 {
+ return ErrInvalidLengthImage
+ }
if postStringIndexmapvalue > l {
return io.ErrUnexpectedEOF
}
@@ -528,9 +696,13 @@ func (m *ImageCreate) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthImage
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthImage
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -555,7 +727,7 @@ func (m *ImageUpdate) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -583,7 +755,7 @@ func (m *ImageUpdate) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -593,6 +765,9 @@ func (m *ImageUpdate) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthImage
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthImage
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -612,7 +787,7 @@ func (m *ImageUpdate) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -621,6 +796,9 @@ func (m *ImageUpdate) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthImage
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthImage
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -641,7 +819,7 @@ func (m *ImageUpdate) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -658,7 +836,7 @@ func (m *ImageUpdate) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ stringLenmapkey |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -668,6 +846,9 @@ func (m *ImageUpdate) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthImage
}
postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey < 0 {
+ return ErrInvalidLengthImage
+ }
if postStringIndexmapkey > l {
return io.ErrUnexpectedEOF
}
@@ -684,7 +865,7 @@ func (m *ImageUpdate) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLenmapvalue |= (uint64(b) & 0x7F) << shift
+ stringLenmapvalue |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -694,6 +875,9 @@ func (m *ImageUpdate) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthImage
}
postStringIndexmapvalue := iNdEx + intStringLenmapvalue
+ if postStringIndexmapvalue < 0 {
+ return ErrInvalidLengthImage
+ }
if postStringIndexmapvalue > l {
return io.ErrUnexpectedEOF
}
@@ -725,9 +909,13 @@ func (m *ImageUpdate) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthImage
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthImage
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -752,7 +940,7 @@ func (m *ImageDelete) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -780,7 +968,7 @@ func (m *ImageDelete) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -790,6 +978,9 @@ func (m *ImageDelete) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthImage
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthImage
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -804,9 +995,13 @@ func (m *ImageDelete) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthImage
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthImage
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -870,10 +1065,13 @@ func skipImage(dAtA []byte) (n int, err error) {
break
}
}
- iNdEx += length
if length < 0 {
return 0, ErrInvalidLengthImage
}
+ iNdEx += length
+ if iNdEx < 0 {
+ return 0, ErrInvalidLengthImage
+ }
return iNdEx, nil
case 3:
for {
@@ -902,6 +1100,9 @@ func skipImage(dAtA []byte) (n int, err error) {
return 0, err
}
iNdEx = start + next
+ if iNdEx < 0 {
+ return 0, ErrInvalidLengthImage
+ }
}
return iNdEx, nil
case 4:
@@ -920,30 +1121,3 @@ var (
ErrInvalidLengthImage = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowImage = fmt.Errorf("proto: integer overflow")
)
-
-func init() {
- proto.RegisterFile("github.com/containerd/containerd/api/events/image.proto", fileDescriptorImage)
-}
-
-var fileDescriptorImage = []byte{
- // 292 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x32, 0x4f, 0xcf, 0x2c, 0xc9,
- 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xce, 0xcf, 0x2b, 0x49, 0xcc, 0xcc, 0x4b, 0x2d,
- 0x4a, 0x41, 0x66, 0x26, 0x16, 0x64, 0xea, 0xa7, 0x96, 0xa5, 0xe6, 0x95, 0x14, 0xeb, 0x67, 0xe6,
- 0x26, 0xa6, 0xa7, 0xea, 0x15, 0x14, 0xe5, 0x97, 0xe4, 0x0b, 0xc9, 0x22, 0x94, 0xe8, 0x15, 0xa7,
- 0x16, 0x95, 0x65, 0x26, 0xa7, 0x16, 0xeb, 0x81, 0x15, 0x14, 0xeb, 0x95, 0x19, 0x4a, 0x39, 0x10,
- 0x34, 0x17, 0x6c, 0x4c, 0x52, 0x69, 0x9a, 0x7e, 0x41, 0x4e, 0x69, 0x7a, 0x66, 0x9e, 0x7e, 0x5a,
- 0x66, 0x6a, 0x4e, 0x4a, 0x41, 0x62, 0x49, 0x06, 0xc4, 0x02, 0xa5, 0x35, 0x8c, 0x5c, 0xdc, 0x9e,
- 0x20, 0xf3, 0x9c, 0x8b, 0x52, 0x13, 0x4b, 0x52, 0x85, 0x84, 0xb8, 0x58, 0xf2, 0x12, 0x73, 0x53,
- 0x25, 0x18, 0x15, 0x18, 0x35, 0x38, 0x83, 0xc0, 0x6c, 0x21, 0x3f, 0x2e, 0xb6, 0x9c, 0xc4, 0xa4,
- 0xd4, 0x9c, 0x62, 0x09, 0x26, 0x05, 0x66, 0x0d, 0x6e, 0x23, 0x33, 0x3d, 0xbc, 0xae, 0xd2, 0x43,
- 0x32, 0x4f, 0xcf, 0x07, 0xac, 0xd1, 0x35, 0xaf, 0xa4, 0xa8, 0x32, 0x08, 0x6a, 0x8a, 0x94, 0x25,
- 0x17, 0x37, 0x92, 0xb0, 0x90, 0x00, 0x17, 0x73, 0x76, 0x6a, 0x25, 0xd4, 0x46, 0x10, 0x53, 0x48,
- 0x84, 0x8b, 0xb5, 0x2c, 0x31, 0xa7, 0x34, 0x55, 0x82, 0x09, 0x2c, 0x06, 0xe1, 0x58, 0x31, 0x59,
- 0x30, 0x22, 0x9c, 0x1b, 0x5a, 0x90, 0x42, 0x55, 0xe7, 0x42, 0xcc, 0xa3, 0xb6, 0x73, 0x15, 0xa1,
- 0xae, 0x75, 0x49, 0xcd, 0x49, 0xc5, 0xee, 0x5a, 0xa7, 0x80, 0x13, 0x0f, 0xe5, 0x18, 0x6e, 0x3c,
- 0x94, 0x63, 0x68, 0x78, 0x24, 0xc7, 0x78, 0xe2, 0x91, 0x1c, 0xe3, 0x85, 0x47, 0x72, 0x8c, 0x0f,
- 0x1e, 0xc9, 0x31, 0x2e, 0xf8, 0x22, 0xc7, 0x18, 0x65, 0x44, 0x42, 0xc2, 0xb1, 0x86, 0x50, 0x11,
- 0x0c, 0x49, 0x6c, 0xe0, 0xb8, 0x35, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0x41, 0x80, 0x92, 0x17,
- 0x77, 0x02, 0x00, 0x00,
-}
diff --git a/api/events/namespace.pb.go b/api/events/namespace.pb.go
index 1c81f9fc4..84882e573 100644
--- a/api/events/namespace.pb.go
+++ b/api/events/namespace.pb.go
@@ -3,56 +3,181 @@
package events
-import proto "github.com/gogo/protobuf/proto"
-import fmt "fmt"
-import math "math"
-
-// skipping weak import gogoproto "github.com/gogo/protobuf/gogoproto"
-// skipping weak import containerd_plugin "github.com/containerd/containerd/protobuf/plugin"
-
-import strings "strings"
-import reflect "reflect"
-import sortkeys "github.com/gogo/protobuf/sortkeys"
-
-import io "io"
+import (
+ fmt "fmt"
+ proto "github.com/gogo/protobuf/proto"
+ github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys"
+ io "io"
+ math "math"
+ reflect "reflect"
+ strings "strings"
+)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the proto package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// proto package needs to be updated.
+const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
+
type NamespaceCreate struct {
- Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
- Labels map[string]string `protobuf:"bytes,2,rep,name=labels" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ Labels map[string]string `protobuf:"bytes,2,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:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *NamespaceCreate) Reset() { *m = NamespaceCreate{} }
-func (*NamespaceCreate) ProtoMessage() {}
-func (*NamespaceCreate) Descriptor() ([]byte, []int) { return fileDescriptorNamespace, []int{0} }
+func (m *NamespaceCreate) Reset() { *m = NamespaceCreate{} }
+func (*NamespaceCreate) ProtoMessage() {}
+func (*NamespaceCreate) Descriptor() ([]byte, []int) {
+ return fileDescriptor_6cd45d1d5adffe29, []int{0}
+}
+func (m *NamespaceCreate) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *NamespaceCreate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_NamespaceCreate.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *NamespaceCreate) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_NamespaceCreate.Merge(m, src)
+}
+func (m *NamespaceCreate) XXX_Size() int {
+ return m.Size()
+}
+func (m *NamespaceCreate) XXX_DiscardUnknown() {
+ xxx_messageInfo_NamespaceCreate.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_NamespaceCreate proto.InternalMessageInfo
type NamespaceUpdate struct {
- Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
- Labels map[string]string `protobuf:"bytes,2,rep,name=labels" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ Labels map[string]string `protobuf:"bytes,2,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:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *NamespaceUpdate) Reset() { *m = NamespaceUpdate{} }
-func (*NamespaceUpdate) ProtoMessage() {}
-func (*NamespaceUpdate) Descriptor() ([]byte, []int) { return fileDescriptorNamespace, []int{1} }
+func (m *NamespaceUpdate) Reset() { *m = NamespaceUpdate{} }
+func (*NamespaceUpdate) ProtoMessage() {}
+func (*NamespaceUpdate) Descriptor() ([]byte, []int) {
+ return fileDescriptor_6cd45d1d5adffe29, []int{1}
+}
+func (m *NamespaceUpdate) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *NamespaceUpdate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_NamespaceUpdate.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *NamespaceUpdate) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_NamespaceUpdate.Merge(m, src)
+}
+func (m *NamespaceUpdate) XXX_Size() int {
+ return m.Size()
+}
+func (m *NamespaceUpdate) XXX_DiscardUnknown() {
+ xxx_messageInfo_NamespaceUpdate.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_NamespaceUpdate proto.InternalMessageInfo
type NamespaceDelete struct {
- Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *NamespaceDelete) Reset() { *m = NamespaceDelete{} }
-func (*NamespaceDelete) ProtoMessage() {}
-func (*NamespaceDelete) Descriptor() ([]byte, []int) { return fileDescriptorNamespace, []int{2} }
+func (m *NamespaceDelete) Reset() { *m = NamespaceDelete{} }
+func (*NamespaceDelete) ProtoMessage() {}
+func (*NamespaceDelete) Descriptor() ([]byte, []int) {
+ return fileDescriptor_6cd45d1d5adffe29, []int{2}
+}
+func (m *NamespaceDelete) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *NamespaceDelete) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_NamespaceDelete.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *NamespaceDelete) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_NamespaceDelete.Merge(m, src)
+}
+func (m *NamespaceDelete) XXX_Size() int {
+ return m.Size()
+}
+func (m *NamespaceDelete) XXX_DiscardUnknown() {
+ xxx_messageInfo_NamespaceDelete.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_NamespaceDelete proto.InternalMessageInfo
func init() {
proto.RegisterType((*NamespaceCreate)(nil), "containerd.events.NamespaceCreate")
+ proto.RegisterMapType((map[string]string)(nil), "containerd.events.NamespaceCreate.LabelsEntry")
proto.RegisterType((*NamespaceUpdate)(nil), "containerd.events.NamespaceUpdate")
+ proto.RegisterMapType((map[string]string)(nil), "containerd.events.NamespaceUpdate.LabelsEntry")
proto.RegisterType((*NamespaceDelete)(nil), "containerd.events.NamespaceDelete")
}
+func init() {
+ proto.RegisterFile("github.com/containerd/containerd/api/events/namespace.proto", fileDescriptor_6cd45d1d5adffe29)
+}
+
+var fileDescriptor_6cd45d1d5adffe29 = []byte{
+ // 296 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xb2, 0x4e, 0xcf, 0x2c, 0xc9,
+ 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xce, 0xcf, 0x2b, 0x49, 0xcc, 0xcc, 0x4b, 0x2d,
+ 0x4a, 0x41, 0x66, 0x26, 0x16, 0x64, 0xea, 0xa7, 0x96, 0xa5, 0xe6, 0x95, 0x14, 0xeb, 0xe7, 0x25,
+ 0xe6, 0xa6, 0x16, 0x17, 0x24, 0x26, 0xa7, 0xea, 0x15, 0x14, 0xe5, 0x97, 0xe4, 0x0b, 0x09, 0x22,
+ 0x94, 0xe9, 0x41, 0x94, 0x48, 0x89, 0xa4, 0xe7, 0xa7, 0xe7, 0x83, 0x65, 0xf5, 0x41, 0x2c, 0x88,
+ 0x42, 0x29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x31, 0x46, 0x19, 0x91, 0x90, 0x84, 0xac, 0x21,
+ 0x54, 0x04, 0x43, 0x04, 0x63, 0x12, 0x1b, 0x38, 0x66, 0x8d, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff,
+ 0x00, 0x50, 0x87, 0x59, 0x83, 0x02, 0x00, 0x00,
+}
+
// Field returns the value for the given fieldpath as a string, if defined.
// If the value is not defined, the second value will be false.
func (m *NamespaceCreate) Field(fieldpath []string) (string, bool) {
@@ -148,6 +273,9 @@ func (m *NamespaceCreate) MarshalTo(dAtA []byte) (int, error) {
i += copy(dAtA[i:], v)
}
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -189,6 +317,9 @@ func (m *NamespaceUpdate) MarshalTo(dAtA []byte) (int, error) {
i += copy(dAtA[i:], v)
}
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -213,6 +344,9 @@ func (m *NamespaceDelete) MarshalTo(dAtA []byte) (int, error) {
i = encodeVarintNamespace(dAtA, i, uint64(len(m.Name)))
i += copy(dAtA[i:], m.Name)
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -226,6 +360,9 @@ func encodeVarintNamespace(dAtA []byte, offset int, v uint64) int {
return offset + 1
}
func (m *NamespaceCreate) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.Name)
@@ -240,10 +377,16 @@ func (m *NamespaceCreate) Size() (n int) {
n += mapEntrySize + 1 + sovNamespace(uint64(mapEntrySize))
}
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *NamespaceUpdate) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.Name)
@@ -258,16 +401,25 @@ func (m *NamespaceUpdate) Size() (n int) {
n += mapEntrySize + 1 + sovNamespace(uint64(mapEntrySize))
}
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *NamespaceDelete) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.Name)
if l > 0 {
n += 1 + l + sovNamespace(uint64(l))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
@@ -292,7 +444,7 @@ func (this *NamespaceCreate) String() string {
for k, _ := range this.Labels {
keysForLabels = append(keysForLabels, k)
}
- sortkeys.Strings(keysForLabels)
+ github_com_gogo_protobuf_sortkeys.Strings(keysForLabels)
mapStringForLabels := "map[string]string{"
for _, k := range keysForLabels {
mapStringForLabels += fmt.Sprintf("%v: %v,", k, this.Labels[k])
@@ -301,6 +453,7 @@ func (this *NamespaceCreate) String() string {
s := strings.Join([]string{`&NamespaceCreate{`,
`Name:` + fmt.Sprintf("%v", this.Name) + `,`,
`Labels:` + mapStringForLabels + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -313,7 +466,7 @@ func (this *NamespaceUpdate) String() string {
for k, _ := range this.Labels {
keysForLabels = append(keysForLabels, k)
}
- sortkeys.Strings(keysForLabels)
+ github_com_gogo_protobuf_sortkeys.Strings(keysForLabels)
mapStringForLabels := "map[string]string{"
for _, k := range keysForLabels {
mapStringForLabels += fmt.Sprintf("%v: %v,", k, this.Labels[k])
@@ -322,6 +475,7 @@ func (this *NamespaceUpdate) String() string {
s := strings.Join([]string{`&NamespaceUpdate{`,
`Name:` + fmt.Sprintf("%v", this.Name) + `,`,
`Labels:` + mapStringForLabels + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -332,6 +486,7 @@ func (this *NamespaceDelete) String() string {
}
s := strings.Join([]string{`&NamespaceDelete{`,
`Name:` + fmt.Sprintf("%v", this.Name) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -359,7 +514,7 @@ func (m *NamespaceCreate) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -387,7 +542,7 @@ func (m *NamespaceCreate) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -397,6 +552,9 @@ func (m *NamespaceCreate) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthNamespace
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthNamespace
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -416,7 +574,7 @@ func (m *NamespaceCreate) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -425,6 +583,9 @@ func (m *NamespaceCreate) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthNamespace
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthNamespace
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -445,7 +606,7 @@ func (m *NamespaceCreate) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -462,7 +623,7 @@ func (m *NamespaceCreate) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ stringLenmapkey |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -472,6 +633,9 @@ func (m *NamespaceCreate) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthNamespace
}
postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey < 0 {
+ return ErrInvalidLengthNamespace
+ }
if postStringIndexmapkey > l {
return io.ErrUnexpectedEOF
}
@@ -488,7 +652,7 @@ func (m *NamespaceCreate) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLenmapvalue |= (uint64(b) & 0x7F) << shift
+ stringLenmapvalue |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -498,6 +662,9 @@ func (m *NamespaceCreate) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthNamespace
}
postStringIndexmapvalue := iNdEx + intStringLenmapvalue
+ if postStringIndexmapvalue < 0 {
+ return ErrInvalidLengthNamespace
+ }
if postStringIndexmapvalue > l {
return io.ErrUnexpectedEOF
}
@@ -529,9 +696,13 @@ func (m *NamespaceCreate) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthNamespace
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthNamespace
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -556,7 +727,7 @@ func (m *NamespaceUpdate) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -584,7 +755,7 @@ func (m *NamespaceUpdate) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -594,6 +765,9 @@ func (m *NamespaceUpdate) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthNamespace
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthNamespace
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -613,7 +787,7 @@ func (m *NamespaceUpdate) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -622,6 +796,9 @@ func (m *NamespaceUpdate) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthNamespace
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthNamespace
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -642,7 +819,7 @@ func (m *NamespaceUpdate) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -659,7 +836,7 @@ func (m *NamespaceUpdate) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ stringLenmapkey |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -669,6 +846,9 @@ func (m *NamespaceUpdate) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthNamespace
}
postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey < 0 {
+ return ErrInvalidLengthNamespace
+ }
if postStringIndexmapkey > l {
return io.ErrUnexpectedEOF
}
@@ -685,7 +865,7 @@ func (m *NamespaceUpdate) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLenmapvalue |= (uint64(b) & 0x7F) << shift
+ stringLenmapvalue |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -695,6 +875,9 @@ func (m *NamespaceUpdate) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthNamespace
}
postStringIndexmapvalue := iNdEx + intStringLenmapvalue
+ if postStringIndexmapvalue < 0 {
+ return ErrInvalidLengthNamespace
+ }
if postStringIndexmapvalue > l {
return io.ErrUnexpectedEOF
}
@@ -726,9 +909,13 @@ func (m *NamespaceUpdate) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthNamespace
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthNamespace
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -753,7 +940,7 @@ func (m *NamespaceDelete) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -781,7 +968,7 @@ func (m *NamespaceDelete) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -791,6 +978,9 @@ func (m *NamespaceDelete) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthNamespace
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthNamespace
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -805,9 +995,13 @@ func (m *NamespaceDelete) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthNamespace
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthNamespace
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -871,10 +1065,13 @@ func skipNamespace(dAtA []byte) (n int, err error) {
break
}
}
- iNdEx += length
if length < 0 {
return 0, ErrInvalidLengthNamespace
}
+ iNdEx += length
+ if iNdEx < 0 {
+ return 0, ErrInvalidLengthNamespace
+ }
return iNdEx, nil
case 3:
for {
@@ -903,6 +1100,9 @@ func skipNamespace(dAtA []byte) (n int, err error) {
return 0, err
}
iNdEx = start + next
+ if iNdEx < 0 {
+ return 0, ErrInvalidLengthNamespace
+ }
}
return iNdEx, nil
case 4:
@@ -921,30 +1121,3 @@ var (
ErrInvalidLengthNamespace = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowNamespace = fmt.Errorf("proto: integer overflow")
)
-
-func init() {
- proto.RegisterFile("github.com/containerd/containerd/api/events/namespace.proto", fileDescriptorNamespace)
-}
-
-var fileDescriptorNamespace = []byte{
- // 296 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xb2, 0x4e, 0xcf, 0x2c, 0xc9,
- 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xce, 0xcf, 0x2b, 0x49, 0xcc, 0xcc, 0x4b, 0x2d,
- 0x4a, 0x41, 0x66, 0x26, 0x16, 0x64, 0xea, 0xa7, 0x96, 0xa5, 0xe6, 0x95, 0x14, 0xeb, 0xe7, 0x25,
- 0xe6, 0xa6, 0x16, 0x17, 0x24, 0x26, 0xa7, 0xea, 0x15, 0x14, 0xe5, 0x97, 0xe4, 0x0b, 0x09, 0x22,
- 0x94, 0xe9, 0x41, 0x94, 0x48, 0x89, 0xa4, 0xe7, 0xa7, 0xe7, 0x83, 0x65, 0xf5, 0x41, 0x2c, 0x88,
- 0x42, 0x29, 0x07, 0x82, 0xb6, 0x80, 0xd5, 0x25, 0x95, 0xa6, 0xe9, 0x17, 0xe4, 0x94, 0xa6, 0x67,
- 0xe6, 0xe9, 0xa7, 0x65, 0xa6, 0xe6, 0xa4, 0x14, 0x24, 0x96, 0x64, 0x40, 0x4c, 0x50, 0x5a, 0xc1,
- 0xc8, 0xc5, 0xef, 0x07, 0xb3, 0xde, 0xb9, 0x28, 0x35, 0xb1, 0x24, 0x55, 0x48, 0x88, 0x8b, 0x05,
- 0xe4, 0x22, 0x09, 0x46, 0x05, 0x46, 0x0d, 0xce, 0x20, 0x30, 0x5b, 0xc8, 0x8d, 0x8b, 0x2d, 0x27,
- 0x31, 0x29, 0x35, 0xa7, 0x58, 0x82, 0x49, 0x81, 0x59, 0x83, 0xdb, 0x48, 0x4f, 0x0f, 0xc3, 0x8d,
- 0x7a, 0x68, 0xe6, 0xe8, 0xf9, 0x80, 0x35, 0xb8, 0xe6, 0x95, 0x14, 0x55, 0x06, 0x41, 0x75, 0x4b,
- 0x59, 0x72, 0x71, 0x23, 0x09, 0x0b, 0x09, 0x70, 0x31, 0x67, 0xa7, 0x56, 0x42, 0x6d, 0x02, 0x31,
- 0x85, 0x44, 0xb8, 0x58, 0xcb, 0x12, 0x73, 0x4a, 0x53, 0x25, 0x98, 0xc0, 0x62, 0x10, 0x8e, 0x15,
- 0x93, 0x05, 0x23, 0xaa, 0x53, 0x43, 0x0b, 0x52, 0xa8, 0xe2, 0x54, 0x88, 0x39, 0xd4, 0x76, 0xaa,
- 0x2a, 0x92, 0x4b, 0x5d, 0x52, 0x73, 0x52, 0xb1, 0xbb, 0xd4, 0x29, 0xe0, 0xc4, 0x43, 0x39, 0x86,
- 0x1b, 0x0f, 0xe5, 0x18, 0x1a, 0x1e, 0xc9, 0x31, 0x9e, 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, 0x1c,
- 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x0b, 0xbe, 0xc8, 0x31, 0x46, 0x19, 0x91, 0x90, 0x84, 0xac, 0x21,
- 0x54, 0x04, 0x43, 0x04, 0x63, 0x12, 0x1b, 0x38, 0x66, 0x8d, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff,
- 0x00, 0x50, 0x87, 0x59, 0x83, 0x02, 0x00, 0x00,
-}
diff --git a/api/events/snapshot.pb.go b/api/events/snapshot.pb.go
index e1f8f5c58..0dbdfdbd6 100644
--- a/api/events/snapshot.pb.go
+++ b/api/events/snapshot.pb.go
@@ -3,47 +3,144 @@
package events
-import proto "github.com/gogo/protobuf/proto"
-import fmt "fmt"
-import math "math"
-
-// skipping weak import containerd_plugin "github.com/containerd/containerd/protobuf/plugin"
-
-import strings "strings"
-import reflect "reflect"
-
-import io "io"
+import (
+ fmt "fmt"
+ proto "github.com/gogo/protobuf/proto"
+ io "io"
+ math "math"
+ reflect "reflect"
+ strings "strings"
+)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the proto package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// proto package needs to be updated.
+const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
+
type SnapshotPrepare struct {
- Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
- Parent string `protobuf:"bytes,2,opt,name=parent,proto3" json:"parent,omitempty"`
+ Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
+ Parent string `protobuf:"bytes,2,opt,name=parent,proto3" json:"parent,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *SnapshotPrepare) Reset() { *m = SnapshotPrepare{} }
-func (*SnapshotPrepare) ProtoMessage() {}
-func (*SnapshotPrepare) Descriptor() ([]byte, []int) { return fileDescriptorSnapshot, []int{0} }
+func (m *SnapshotPrepare) Reset() { *m = SnapshotPrepare{} }
+func (*SnapshotPrepare) ProtoMessage() {}
+func (*SnapshotPrepare) Descriptor() ([]byte, []int) {
+ return fileDescriptor_bd6c184d3d9aa5f2, []int{0}
+}
+func (m *SnapshotPrepare) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *SnapshotPrepare) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_SnapshotPrepare.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *SnapshotPrepare) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_SnapshotPrepare.Merge(m, src)
+}
+func (m *SnapshotPrepare) XXX_Size() int {
+ return m.Size()
+}
+func (m *SnapshotPrepare) XXX_DiscardUnknown() {
+ xxx_messageInfo_SnapshotPrepare.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_SnapshotPrepare proto.InternalMessageInfo
type SnapshotCommit struct {
- Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
- Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
+ Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
+ Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *SnapshotCommit) Reset() { *m = SnapshotCommit{} }
-func (*SnapshotCommit) ProtoMessage() {}
-func (*SnapshotCommit) Descriptor() ([]byte, []int) { return fileDescriptorSnapshot, []int{1} }
+func (m *SnapshotCommit) Reset() { *m = SnapshotCommit{} }
+func (*SnapshotCommit) ProtoMessage() {}
+func (*SnapshotCommit) Descriptor() ([]byte, []int) {
+ return fileDescriptor_bd6c184d3d9aa5f2, []int{1}
+}
+func (m *SnapshotCommit) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *SnapshotCommit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_SnapshotCommit.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *SnapshotCommit) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_SnapshotCommit.Merge(m, src)
+}
+func (m *SnapshotCommit) XXX_Size() int {
+ return m.Size()
+}
+func (m *SnapshotCommit) XXX_DiscardUnknown() {
+ xxx_messageInfo_SnapshotCommit.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_SnapshotCommit proto.InternalMessageInfo
type SnapshotRemove struct {
- Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
+ Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *SnapshotRemove) Reset() { *m = SnapshotRemove{} }
-func (*SnapshotRemove) ProtoMessage() {}
-func (*SnapshotRemove) Descriptor() ([]byte, []int) { return fileDescriptorSnapshot, []int{2} }
+func (m *SnapshotRemove) Reset() { *m = SnapshotRemove{} }
+func (*SnapshotRemove) ProtoMessage() {}
+func (*SnapshotRemove) Descriptor() ([]byte, []int) {
+ return fileDescriptor_bd6c184d3d9aa5f2, []int{2}
+}
+func (m *SnapshotRemove) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *SnapshotRemove) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_SnapshotRemove.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *SnapshotRemove) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_SnapshotRemove.Merge(m, src)
+}
+func (m *SnapshotRemove) XXX_Size() int {
+ return m.Size()
+}
+func (m *SnapshotRemove) XXX_DiscardUnknown() {
+ xxx_messageInfo_SnapshotRemove.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_SnapshotRemove proto.InternalMessageInfo
func init() {
proto.RegisterType((*SnapshotPrepare)(nil), "containerd.events.SnapshotPrepare")
@@ -51,6 +148,29 @@ func init() {
proto.RegisterType((*SnapshotRemove)(nil), "containerd.events.SnapshotRemove")
}
+func init() {
+ proto.RegisterFile("github.com/containerd/containerd/api/events/snapshot.proto", fileDescriptor_bd6c184d3d9aa5f2)
+}
+
+var fileDescriptor_bd6c184d3d9aa5f2 = []byte{
+ // 235 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xb2, 0x4a, 0xcf, 0x2c, 0xc9,
+ 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xce, 0xcf, 0x2b, 0x49, 0xcc, 0xcc, 0x4b, 0x2d,
+ 0x4a, 0x41, 0x66, 0x26, 0x16, 0x64, 0xea, 0xa7, 0x96, 0xa5, 0xe6, 0x95, 0x14, 0xeb, 0x17, 0xe7,
+ 0x25, 0x16, 0x14, 0x67, 0xe4, 0x97, 0xe8, 0x15, 0x14, 0xe5, 0x97, 0xe4, 0x0b, 0x09, 0x22, 0x54,
+ 0xe9, 0x41, 0x54, 0x48, 0x39, 0x10, 0x34, 0x0e, 0xac, 0x35, 0xa9, 0x34, 0x4d, 0xbf, 0x20, 0xa7,
+ 0x34, 0x3d, 0x33, 0x4f, 0x3f, 0x2d, 0x33, 0x35, 0x27, 0xa5, 0x20, 0xb1, 0x24, 0x03, 0x62, 0xa8,
+ 0x92, 0x35, 0x17, 0x7f, 0x30, 0xd4, 0x9a, 0x80, 0xa2, 0xd4, 0x82, 0xc4, 0xa2, 0x54, 0x21, 0x01,
+ 0x2e, 0xe6, 0xec, 0xd4, 0x4a, 0x09, 0x46, 0x05, 0x46, 0x0d, 0xce, 0x20, 0x10, 0x53, 0x48, 0x8c,
+ 0x8b, 0x0d, 0x24, 0x93, 0x57, 0x22, 0xc1, 0x04, 0x16, 0x84, 0xf2, 0x94, 0xcc, 0xb8, 0xf8, 0x60,
+ 0x9a, 0x9d, 0xf3, 0x73, 0x73, 0x33, 0x4b, 0xb0, 0xe8, 0x15, 0xe2, 0x62, 0xc9, 0x4b, 0xcc, 0x4d,
+ 0x85, 0xea, 0x04, 0xb3, 0x95, 0x94, 0x10, 0xfa, 0x82, 0x52, 0x73, 0xf3, 0xcb, 0xb0, 0xd8, 0xe9,
+ 0x14, 0x70, 0xe2, 0xa1, 0x1c, 0xc3, 0x8d, 0x87, 0x72, 0x0c, 0x0d, 0x8f, 0xe4, 0x18, 0x4f, 0x3c,
+ 0x92, 0x63, 0xbc, 0xf0, 0x48, 0x8e, 0xf1, 0xc1, 0x23, 0x39, 0xc6, 0x05, 0x5f, 0xe4, 0x18, 0xa3,
+ 0x8c, 0x48, 0x08, 0x47, 0x6b, 0x08, 0x15, 0xc1, 0x90, 0xc4, 0x06, 0xf6, 0xb3, 0x31, 0x20, 0x00,
+ 0x00, 0xff, 0xff, 0x69, 0x66, 0xa9, 0x2a, 0x86, 0x01, 0x00, 0x00,
+}
+
// Field returns the value for the given fieldpath as a string, if defined.
// If the value is not defined, the second value will be false.
func (m *SnapshotPrepare) Field(fieldpath []string) (string, bool) {
@@ -123,6 +243,9 @@ func (m *SnapshotPrepare) MarshalTo(dAtA []byte) (int, error) {
i = encodeVarintSnapshot(dAtA, i, uint64(len(m.Parent)))
i += copy(dAtA[i:], m.Parent)
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -153,6 +276,9 @@ func (m *SnapshotCommit) MarshalTo(dAtA []byte) (int, error) {
i = encodeVarintSnapshot(dAtA, i, uint64(len(m.Name)))
i += copy(dAtA[i:], m.Name)
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -177,6 +303,9 @@ func (m *SnapshotRemove) MarshalTo(dAtA []byte) (int, error) {
i = encodeVarintSnapshot(dAtA, i, uint64(len(m.Key)))
i += copy(dAtA[i:], m.Key)
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -190,6 +319,9 @@ func encodeVarintSnapshot(dAtA []byte, offset int, v uint64) int {
return offset + 1
}
func (m *SnapshotPrepare) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.Key)
@@ -200,10 +332,16 @@ func (m *SnapshotPrepare) Size() (n int) {
if l > 0 {
n += 1 + l + sovSnapshot(uint64(l))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *SnapshotCommit) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.Key)
@@ -214,16 +352,25 @@ func (m *SnapshotCommit) Size() (n int) {
if l > 0 {
n += 1 + l + sovSnapshot(uint64(l))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *SnapshotRemove) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.Key)
if l > 0 {
n += 1 + l + sovSnapshot(uint64(l))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
@@ -247,6 +394,7 @@ func (this *SnapshotPrepare) String() string {
s := strings.Join([]string{`&SnapshotPrepare{`,
`Key:` + fmt.Sprintf("%v", this.Key) + `,`,
`Parent:` + fmt.Sprintf("%v", this.Parent) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -258,6 +406,7 @@ func (this *SnapshotCommit) String() string {
s := strings.Join([]string{`&SnapshotCommit{`,
`Key:` + fmt.Sprintf("%v", this.Key) + `,`,
`Name:` + fmt.Sprintf("%v", this.Name) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -268,6 +417,7 @@ func (this *SnapshotRemove) String() string {
}
s := strings.Join([]string{`&SnapshotRemove{`,
`Key:` + fmt.Sprintf("%v", this.Key) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -295,7 +445,7 @@ func (m *SnapshotPrepare) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -323,7 +473,7 @@ func (m *SnapshotPrepare) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -333,6 +483,9 @@ func (m *SnapshotPrepare) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthSnapshot
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthSnapshot
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -352,7 +505,7 @@ func (m *SnapshotPrepare) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -362,6 +515,9 @@ func (m *SnapshotPrepare) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthSnapshot
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthSnapshot
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -376,9 +532,13 @@ func (m *SnapshotPrepare) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthSnapshot
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthSnapshot
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -403,7 +563,7 @@ func (m *SnapshotCommit) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -431,7 +591,7 @@ func (m *SnapshotCommit) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -441,6 +601,9 @@ func (m *SnapshotCommit) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthSnapshot
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthSnapshot
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -460,7 +623,7 @@ func (m *SnapshotCommit) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -470,6 +633,9 @@ func (m *SnapshotCommit) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthSnapshot
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthSnapshot
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -484,9 +650,13 @@ func (m *SnapshotCommit) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthSnapshot
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthSnapshot
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -511,7 +681,7 @@ func (m *SnapshotRemove) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -539,7 +709,7 @@ func (m *SnapshotRemove) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -549,6 +719,9 @@ func (m *SnapshotRemove) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthSnapshot
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthSnapshot
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -563,9 +736,13 @@ func (m *SnapshotRemove) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthSnapshot
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthSnapshot
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -629,10 +806,13 @@ func skipSnapshot(dAtA []byte) (n int, err error) {
break
}
}
- iNdEx += length
if length < 0 {
return 0, ErrInvalidLengthSnapshot
}
+ iNdEx += length
+ if iNdEx < 0 {
+ return 0, ErrInvalidLengthSnapshot
+ }
return iNdEx, nil
case 3:
for {
@@ -661,6 +841,9 @@ func skipSnapshot(dAtA []byte) (n int, err error) {
return 0, err
}
iNdEx = start + next
+ if iNdEx < 0 {
+ return 0, ErrInvalidLengthSnapshot
+ }
}
return iNdEx, nil
case 4:
@@ -679,26 +862,3 @@ var (
ErrInvalidLengthSnapshot = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowSnapshot = fmt.Errorf("proto: integer overflow")
)
-
-func init() {
- proto.RegisterFile("github.com/containerd/containerd/api/events/snapshot.proto", fileDescriptorSnapshot)
-}
-
-var fileDescriptorSnapshot = []byte{
- // 235 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0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x63, 0xbc, 0xf0, 0x48, 0x8e, 0xf1, 0xc1, 0x23, 0x39, 0xc6, 0x05, 0x5f, 0xe4, 0x18, 0xa3,
- 0x8c, 0x48, 0x08, 0x47, 0x6b, 0x08, 0x15, 0xc1, 0x90, 0xc4, 0x06, 0xf6, 0xb3, 0x31, 0x20, 0x00,
- 0x00, 0xff, 0xff, 0x69, 0x66, 0xa9, 0x2a, 0x86, 0x01, 0x00, 0x00,
-}
diff --git a/api/events/task.pb.go b/api/events/task.pb.go
index 64fcfa743..fb653d028 100644
--- a/api/events/task.pb.go
+++ b/api/events/task.pb.go
@@ -3,24 +3,18 @@
package events
-import proto "github.com/gogo/protobuf/proto"
-import fmt "fmt"
-import math "math"
-
-// skipping weak import gogoproto "github.com/gogo/protobuf/gogoproto"
-import _ "github.com/gogo/protobuf/types"
-import containerd_types "github.com/containerd/containerd/api/types"
-
-// skipping weak import containerd_plugin "github.com/containerd/containerd/protobuf/plugin"
-
-import time "time"
-
-import types "github.com/gogo/protobuf/types"
-
-import strings "strings"
-import reflect "reflect"
-
-import io "io"
+import (
+ fmt "fmt"
+ types "github.com/containerd/containerd/api/types"
+ proto "github.com/gogo/protobuf/proto"
+ _ "github.com/gogo/protobuf/types"
+ github_com_gogo_protobuf_types "github.com/gogo/protobuf/types"
+ io "io"
+ math "math"
+ reflect "reflect"
+ strings "strings"
+ time "time"
+)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
@@ -28,116 +22,463 @@ 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.
+// A compilation error at this line likely means your copy of the
+// proto package needs to be updated.
+const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
+
type TaskCreate struct {
- ContainerID string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"`
- Bundle string `protobuf:"bytes,2,opt,name=bundle,proto3" json:"bundle,omitempty"`
- Rootfs []*containerd_types.Mount `protobuf:"bytes,3,rep,name=rootfs" json:"rootfs,omitempty"`
- IO *TaskIO `protobuf:"bytes,4,opt,name=io" json:"io,omitempty"`
- Checkpoint string `protobuf:"bytes,5,opt,name=checkpoint,proto3" json:"checkpoint,omitempty"`
- Pid uint32 `protobuf:"varint,6,opt,name=pid,proto3" json:"pid,omitempty"`
+ ContainerID string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"`
+ Bundle string `protobuf:"bytes,2,opt,name=bundle,proto3" json:"bundle,omitempty"`
+ Rootfs []*types.Mount `protobuf:"bytes,3,rep,name=rootfs,proto3" json:"rootfs,omitempty"`
+ IO *TaskIO `protobuf:"bytes,4,opt,name=io,proto3" json:"io,omitempty"`
+ Checkpoint string `protobuf:"bytes,5,opt,name=checkpoint,proto3" json:"checkpoint,omitempty"`
+ Pid uint32 `protobuf:"varint,6,opt,name=pid,proto3" json:"pid,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *TaskCreate) Reset() { *m = TaskCreate{} }
-func (*TaskCreate) ProtoMessage() {}
-func (*TaskCreate) Descriptor() ([]byte, []int) { return fileDescriptorTask, []int{0} }
+func (m *TaskCreate) Reset() { *m = TaskCreate{} }
+func (*TaskCreate) ProtoMessage() {}
+func (*TaskCreate) Descriptor() ([]byte, []int) {
+ return fileDescriptor_8db0813f7adfb63c, []int{0}
+}
+func (m *TaskCreate) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *TaskCreate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_TaskCreate.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *TaskCreate) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_TaskCreate.Merge(m, src)
+}
+func (m *TaskCreate) XXX_Size() int {
+ return m.Size()
+}
+func (m *TaskCreate) XXX_DiscardUnknown() {
+ xxx_messageInfo_TaskCreate.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_TaskCreate proto.InternalMessageInfo
type TaskStart struct {
- ContainerID string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"`
- Pid uint32 `protobuf:"varint,2,opt,name=pid,proto3" json:"pid,omitempty"`
+ ContainerID string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"`
+ Pid uint32 `protobuf:"varint,2,opt,name=pid,proto3" json:"pid,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *TaskStart) Reset() { *m = TaskStart{} }
-func (*TaskStart) ProtoMessage() {}
-func (*TaskStart) Descriptor() ([]byte, []int) { return fileDescriptorTask, []int{1} }
+func (m *TaskStart) Reset() { *m = TaskStart{} }
+func (*TaskStart) ProtoMessage() {}
+func (*TaskStart) Descriptor() ([]byte, []int) {
+ return fileDescriptor_8db0813f7adfb63c, []int{1}
+}
+func (m *TaskStart) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *TaskStart) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_TaskStart.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *TaskStart) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_TaskStart.Merge(m, src)
+}
+func (m *TaskStart) XXX_Size() int {
+ return m.Size()
+}
+func (m *TaskStart) XXX_DiscardUnknown() {
+ xxx_messageInfo_TaskStart.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_TaskStart proto.InternalMessageInfo
type TaskDelete struct {
ContainerID string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"`
Pid uint32 `protobuf:"varint,2,opt,name=pid,proto3" json:"pid,omitempty"`
ExitStatus uint32 `protobuf:"varint,3,opt,name=exit_status,json=exitStatus,proto3" json:"exit_status,omitempty"`
- ExitedAt time.Time `protobuf:"bytes,4,opt,name=exited_at,json=exitedAt,stdtime" json:"exited_at"`
+ ExitedAt time.Time `protobuf:"bytes,4,opt,name=exited_at,json=exitedAt,proto3,stdtime" json:"exited_at"`
// id is the specific exec. By default if omitted will be `""` thus matches
// the init exec of the task matching `container_id`.
- ID string `protobuf:"bytes,5,opt,name=id,proto3" json:"id,omitempty"`
+ ID string `protobuf:"bytes,5,opt,name=id,proto3" json:"id,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *TaskDelete) Reset() { *m = TaskDelete{} }
-func (*TaskDelete) ProtoMessage() {}
-func (*TaskDelete) Descriptor() ([]byte, []int) { return fileDescriptorTask, []int{2} }
+func (m *TaskDelete) Reset() { *m = TaskDelete{} }
+func (*TaskDelete) ProtoMessage() {}
+func (*TaskDelete) Descriptor() ([]byte, []int) {
+ return fileDescriptor_8db0813f7adfb63c, []int{2}
+}
+func (m *TaskDelete) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *TaskDelete) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_TaskDelete.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *TaskDelete) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_TaskDelete.Merge(m, src)
+}
+func (m *TaskDelete) XXX_Size() int {
+ return m.Size()
+}
+func (m *TaskDelete) XXX_DiscardUnknown() {
+ xxx_messageInfo_TaskDelete.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_TaskDelete proto.InternalMessageInfo
type TaskIO struct {
- Stdin string `protobuf:"bytes,1,opt,name=stdin,proto3" json:"stdin,omitempty"`
- Stdout string `protobuf:"bytes,2,opt,name=stdout,proto3" json:"stdout,omitempty"`
- Stderr string `protobuf:"bytes,3,opt,name=stderr,proto3" json:"stderr,omitempty"`
- Terminal bool `protobuf:"varint,4,opt,name=terminal,proto3" json:"terminal,omitempty"`
+ Stdin string `protobuf:"bytes,1,opt,name=stdin,proto3" json:"stdin,omitempty"`
+ Stdout string `protobuf:"bytes,2,opt,name=stdout,proto3" json:"stdout,omitempty"`
+ Stderr string `protobuf:"bytes,3,opt,name=stderr,proto3" json:"stderr,omitempty"`
+ Terminal bool `protobuf:"varint,4,opt,name=terminal,proto3" json:"terminal,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *TaskIO) Reset() { *m = TaskIO{} }
-func (*TaskIO) ProtoMessage() {}
-func (*TaskIO) Descriptor() ([]byte, []int) { return fileDescriptorTask, []int{3} }
+func (m *TaskIO) Reset() { *m = TaskIO{} }
+func (*TaskIO) ProtoMessage() {}
+func (*TaskIO) Descriptor() ([]byte, []int) {
+ return fileDescriptor_8db0813f7adfb63c, []int{3}
+}
+func (m *TaskIO) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *TaskIO) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_TaskIO.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *TaskIO) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_TaskIO.Merge(m, src)
+}
+func (m *TaskIO) XXX_Size() int {
+ return m.Size()
+}
+func (m *TaskIO) XXX_DiscardUnknown() {
+ xxx_messageInfo_TaskIO.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_TaskIO proto.InternalMessageInfo
type TaskExit struct {
- ContainerID string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"`
- ID string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
- Pid uint32 `protobuf:"varint,3,opt,name=pid,proto3" json:"pid,omitempty"`
- ExitStatus uint32 `protobuf:"varint,4,opt,name=exit_status,json=exitStatus,proto3" json:"exit_status,omitempty"`
- ExitedAt time.Time `protobuf:"bytes,5,opt,name=exited_at,json=exitedAt,stdtime" json:"exited_at"`
+ ContainerID string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"`
+ ID string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
+ Pid uint32 `protobuf:"varint,3,opt,name=pid,proto3" json:"pid,omitempty"`
+ ExitStatus uint32 `protobuf:"varint,4,opt,name=exit_status,json=exitStatus,proto3" json:"exit_status,omitempty"`
+ ExitedAt time.Time `protobuf:"bytes,5,opt,name=exited_at,json=exitedAt,proto3,stdtime" json:"exited_at"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *TaskExit) Reset() { *m = TaskExit{} }
-func (*TaskExit) ProtoMessage() {}
-func (*TaskExit) Descriptor() ([]byte, []int) { return fileDescriptorTask, []int{4} }
+func (m *TaskExit) Reset() { *m = TaskExit{} }
+func (*TaskExit) ProtoMessage() {}
+func (*TaskExit) Descriptor() ([]byte, []int) {
+ return fileDescriptor_8db0813f7adfb63c, []int{4}
+}
+func (m *TaskExit) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *TaskExit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_TaskExit.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *TaskExit) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_TaskExit.Merge(m, src)
+}
+func (m *TaskExit) XXX_Size() int {
+ return m.Size()
+}
+func (m *TaskExit) XXX_DiscardUnknown() {
+ xxx_messageInfo_TaskExit.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_TaskExit proto.InternalMessageInfo
type TaskOOM struct {
- ContainerID string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"`
+ ContainerID string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *TaskOOM) Reset() { *m = TaskOOM{} }
-func (*TaskOOM) ProtoMessage() {}
-func (*TaskOOM) Descriptor() ([]byte, []int) { return fileDescriptorTask, []int{5} }
+func (m *TaskOOM) Reset() { *m = TaskOOM{} }
+func (*TaskOOM) ProtoMessage() {}
+func (*TaskOOM) Descriptor() ([]byte, []int) {
+ return fileDescriptor_8db0813f7adfb63c, []int{5}
+}
+func (m *TaskOOM) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *TaskOOM) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_TaskOOM.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *TaskOOM) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_TaskOOM.Merge(m, src)
+}
+func (m *TaskOOM) XXX_Size() int {
+ return m.Size()
+}
+func (m *TaskOOM) XXX_DiscardUnknown() {
+ xxx_messageInfo_TaskOOM.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_TaskOOM proto.InternalMessageInfo
type TaskExecAdded struct {
- ContainerID string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"`
- ExecID string `protobuf:"bytes,2,opt,name=exec_id,json=execId,proto3" json:"exec_id,omitempty"`
+ ContainerID string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"`
+ ExecID string `protobuf:"bytes,2,opt,name=exec_id,json=execId,proto3" json:"exec_id,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *TaskExecAdded) Reset() { *m = TaskExecAdded{} }
-func (*TaskExecAdded) ProtoMessage() {}
-func (*TaskExecAdded) Descriptor() ([]byte, []int) { return fileDescriptorTask, []int{6} }
+func (m *TaskExecAdded) Reset() { *m = TaskExecAdded{} }
+func (*TaskExecAdded) ProtoMessage() {}
+func (*TaskExecAdded) Descriptor() ([]byte, []int) {
+ return fileDescriptor_8db0813f7adfb63c, []int{6}
+}
+func (m *TaskExecAdded) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *TaskExecAdded) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_TaskExecAdded.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *TaskExecAdded) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_TaskExecAdded.Merge(m, src)
+}
+func (m *TaskExecAdded) XXX_Size() int {
+ return m.Size()
+}
+func (m *TaskExecAdded) XXX_DiscardUnknown() {
+ xxx_messageInfo_TaskExecAdded.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_TaskExecAdded proto.InternalMessageInfo
type TaskExecStarted struct {
- ContainerID string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"`
- ExecID string `protobuf:"bytes,2,opt,name=exec_id,json=execId,proto3" json:"exec_id,omitempty"`
- Pid uint32 `protobuf:"varint,3,opt,name=pid,proto3" json:"pid,omitempty"`
+ ContainerID string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"`
+ ExecID string `protobuf:"bytes,2,opt,name=exec_id,json=execId,proto3" json:"exec_id,omitempty"`
+ Pid uint32 `protobuf:"varint,3,opt,name=pid,proto3" json:"pid,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *TaskExecStarted) Reset() { *m = TaskExecStarted{} }
-func (*TaskExecStarted) ProtoMessage() {}
-func (*TaskExecStarted) Descriptor() ([]byte, []int) { return fileDescriptorTask, []int{7} }
+func (m *TaskExecStarted) Reset() { *m = TaskExecStarted{} }
+func (*TaskExecStarted) ProtoMessage() {}
+func (*TaskExecStarted) Descriptor() ([]byte, []int) {
+ return fileDescriptor_8db0813f7adfb63c, []int{7}
+}
+func (m *TaskExecStarted) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *TaskExecStarted) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_TaskExecStarted.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *TaskExecStarted) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_TaskExecStarted.Merge(m, src)
+}
+func (m *TaskExecStarted) XXX_Size() int {
+ return m.Size()
+}
+func (m *TaskExecStarted) XXX_DiscardUnknown() {
+ xxx_messageInfo_TaskExecStarted.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_TaskExecStarted proto.InternalMessageInfo
type TaskPaused struct {
- ContainerID string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"`
+ ContainerID string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *TaskPaused) Reset() { *m = TaskPaused{} }
-func (*TaskPaused) ProtoMessage() {}
-func (*TaskPaused) Descriptor() ([]byte, []int) { return fileDescriptorTask, []int{8} }
+func (m *TaskPaused) Reset() { *m = TaskPaused{} }
+func (*TaskPaused) ProtoMessage() {}
+func (*TaskPaused) Descriptor() ([]byte, []int) {
+ return fileDescriptor_8db0813f7adfb63c, []int{8}
+}
+func (m *TaskPaused) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *TaskPaused) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_TaskPaused.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *TaskPaused) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_TaskPaused.Merge(m, src)
+}
+func (m *TaskPaused) XXX_Size() int {
+ return m.Size()
+}
+func (m *TaskPaused) XXX_DiscardUnknown() {
+ xxx_messageInfo_TaskPaused.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_TaskPaused proto.InternalMessageInfo
type TaskResumed struct {
- ContainerID string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"`
+ ContainerID string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *TaskResumed) Reset() { *m = TaskResumed{} }
-func (*TaskResumed) ProtoMessage() {}
-func (*TaskResumed) Descriptor() ([]byte, []int) { return fileDescriptorTask, []int{9} }
+func (m *TaskResumed) Reset() { *m = TaskResumed{} }
+func (*TaskResumed) ProtoMessage() {}
+func (*TaskResumed) Descriptor() ([]byte, []int) {
+ return fileDescriptor_8db0813f7adfb63c, []int{9}
+}
+func (m *TaskResumed) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *TaskResumed) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_TaskResumed.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *TaskResumed) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_TaskResumed.Merge(m, src)
+}
+func (m *TaskResumed) XXX_Size() int {
+ return m.Size()
+}
+func (m *TaskResumed) XXX_DiscardUnknown() {
+ xxx_messageInfo_TaskResumed.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_TaskResumed proto.InternalMessageInfo
type TaskCheckpointed struct {
- ContainerID string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"`
- Checkpoint string `protobuf:"bytes,2,opt,name=checkpoint,proto3" json:"checkpoint,omitempty"`
+ ContainerID string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"`
+ Checkpoint string `protobuf:"bytes,2,opt,name=checkpoint,proto3" json:"checkpoint,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *TaskCheckpointed) Reset() { *m = TaskCheckpointed{} }
-func (*TaskCheckpointed) ProtoMessage() {}
-func (*TaskCheckpointed) Descriptor() ([]byte, []int) { return fileDescriptorTask, []int{10} }
+func (m *TaskCheckpointed) Reset() { *m = TaskCheckpointed{} }
+func (*TaskCheckpointed) ProtoMessage() {}
+func (*TaskCheckpointed) Descriptor() ([]byte, []int) {
+ return fileDescriptor_8db0813f7adfb63c, []int{10}
+}
+func (m *TaskCheckpointed) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *TaskCheckpointed) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_TaskCheckpointed.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *TaskCheckpointed) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_TaskCheckpointed.Merge(m, src)
+}
+func (m *TaskCheckpointed) XXX_Size() int {
+ return m.Size()
+}
+func (m *TaskCheckpointed) XXX_DiscardUnknown() {
+ xxx_messageInfo_TaskCheckpointed.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_TaskCheckpointed proto.InternalMessageInfo
func init() {
proto.RegisterType((*TaskCreate)(nil), "containerd.events.TaskCreate")
@@ -153,6 +494,55 @@ func init() {
proto.RegisterType((*TaskCheckpointed)(nil), "containerd.events.TaskCheckpointed")
}
+func init() {
+ proto.RegisterFile("github.com/containerd/containerd/api/events/task.proto", fileDescriptor_8db0813f7adfb63c)
+}
+
+var fileDescriptor_8db0813f7adfb63c = []byte{
+ // 644 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x95, 0xcd, 0x6e, 0xd3, 0x40,
+ 0x10, 0xc7, 0x63, 0xa7, 0x75, 0xd3, 0x09, 0x55, 0x8b, 0x55, 0x95, 0x90, 0x83, 0x1d, 0x99, 0x4b,
+ 0x4e, 0xb6, 0x08, 0x12, 0x17, 0x84, 0xd4, 0xa4, 0xe1, 0x90, 0x43, 0x95, 0xe2, 0xf6, 0x50, 0x71,
+ 0x89, 0x36, 0xd9, 0x4d, 0xb2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0x42, 0x9d, 0xa3, 0x8b, 0x4b, 0xab,
+ 0xf4, 0xf9, 0xd2, 0x2a, 0xbd, 0x4d, 0x2d, 0xed, 0x22, 0xb5, 0xb4, 0x4f, 0xa9, 0xa5, 0x7d, 0x4d,
+ 0x2d, 0xed, 0xfd, 0x77, 0x4b, 0x7b, 0xd1, 0xfa, 0x87, 0x7f, 0x9f, 0x27, 0xea, 0xe7, 0xb4, 0x74,
+ 0x5a, 0x1e, 0x1a, 0x59, 0x47, 0x3e, 0xfa, 0x11, 0x00, 0x00, 0xff, 0xff, 0xc5, 0x58, 0x0f, 0xec,
+ 0xbe, 0x06, 0x00, 0x00,
+}
+
// Field returns the value for the given fieldpath as a string, if defined.
// If the value is not defined, the second value will be false.
func (m *TaskCreate) Field(fieldpath []string) (string, bool) {
@@ -408,6 +798,9 @@ func (m *TaskCreate) MarshalTo(dAtA []byte) (int, error) {
i++
i = encodeVarintTask(dAtA, i, uint64(m.Pid))
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -437,6 +830,9 @@ func (m *TaskStart) MarshalTo(dAtA []byte) (int, error) {
i++
i = encodeVarintTask(dAtA, i, uint64(m.Pid))
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -473,8 +869,8 @@ func (m *TaskDelete) MarshalTo(dAtA []byte) (int, error) {
}
dAtA[i] = 0x22
i++
- i = encodeVarintTask(dAtA, i, uint64(types.SizeOfStdTime(m.ExitedAt)))
- n2, err := types.StdTimeMarshalTo(m.ExitedAt, dAtA[i:])
+ i = encodeVarintTask(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.ExitedAt)))
+ n2, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.ExitedAt, dAtA[i:])
if err != nil {
return 0, err
}
@@ -485,6 +881,9 @@ func (m *TaskDelete) MarshalTo(dAtA []byte) (int, error) {
i = encodeVarintTask(dAtA, i, uint64(len(m.ID)))
i += copy(dAtA[i:], m.ID)
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -531,6 +930,9 @@ func (m *TaskIO) MarshalTo(dAtA []byte) (int, error) {
}
i++
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -573,12 +975,15 @@ func (m *TaskExit) MarshalTo(dAtA []byte) (int, error) {
}
dAtA[i] = 0x2a
i++
- i = encodeVarintTask(dAtA, i, uint64(types.SizeOfStdTime(m.ExitedAt)))
- n3, err := types.StdTimeMarshalTo(m.ExitedAt, dAtA[i:])
+ i = encodeVarintTask(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.ExitedAt)))
+ n3, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.ExitedAt, dAtA[i:])
if err != nil {
return 0, err
}
i += n3
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -603,6 +1008,9 @@ func (m *TaskOOM) MarshalTo(dAtA []byte) (int, error) {
i = encodeVarintTask(dAtA, i, uint64(len(m.ContainerID)))
i += copy(dAtA[i:], m.ContainerID)
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -633,6 +1041,9 @@ func (m *TaskExecAdded) MarshalTo(dAtA []byte) (int, error) {
i = encodeVarintTask(dAtA, i, uint64(len(m.ExecID)))
i += copy(dAtA[i:], m.ExecID)
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -668,6 +1079,9 @@ func (m *TaskExecStarted) MarshalTo(dAtA []byte) (int, error) {
i++
i = encodeVarintTask(dAtA, i, uint64(m.Pid))
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -692,6 +1106,9 @@ func (m *TaskPaused) MarshalTo(dAtA []byte) (int, error) {
i = encodeVarintTask(dAtA, i, uint64(len(m.ContainerID)))
i += copy(dAtA[i:], m.ContainerID)
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -716,6 +1133,9 @@ func (m *TaskResumed) MarshalTo(dAtA []byte) (int, error) {
i = encodeVarintTask(dAtA, i, uint64(len(m.ContainerID)))
i += copy(dAtA[i:], m.ContainerID)
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -746,6 +1166,9 @@ func (m *TaskCheckpointed) MarshalTo(dAtA []byte) (int, error) {
i = encodeVarintTask(dAtA, i, uint64(len(m.Checkpoint)))
i += copy(dAtA[i:], m.Checkpoint)
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -759,6 +1182,9 @@ func encodeVarintTask(dAtA []byte, offset int, v uint64) int {
return offset + 1
}
func (m *TaskCreate) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.ContainerID)
@@ -786,10 +1212,16 @@ func (m *TaskCreate) Size() (n int) {
if m.Pid != 0 {
n += 1 + sovTask(uint64(m.Pid))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *TaskStart) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.ContainerID)
@@ -799,10 +1231,16 @@ func (m *TaskStart) Size() (n int) {
if m.Pid != 0 {
n += 1 + sovTask(uint64(m.Pid))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *TaskDelete) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.ContainerID)
@@ -815,16 +1253,22 @@ func (m *TaskDelete) Size() (n int) {
if m.ExitStatus != 0 {
n += 1 + sovTask(uint64(m.ExitStatus))
}
- l = types.SizeOfStdTime(m.ExitedAt)
+ l = github_com_gogo_protobuf_types.SizeOfStdTime(m.ExitedAt)
n += 1 + l + sovTask(uint64(l))
l = len(m.ID)
if l > 0 {
n += 1 + l + sovTask(uint64(l))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *TaskIO) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.Stdin)
@@ -842,10 +1286,16 @@ func (m *TaskIO) Size() (n int) {
if m.Terminal {
n += 2
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *TaskExit) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.ContainerID)
@@ -862,22 +1312,34 @@ func (m *TaskExit) Size() (n int) {
if m.ExitStatus != 0 {
n += 1 + sovTask(uint64(m.ExitStatus))
}
- l = types.SizeOfStdTime(m.ExitedAt)
+ l = github_com_gogo_protobuf_types.SizeOfStdTime(m.ExitedAt)
n += 1 + l + sovTask(uint64(l))
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *TaskOOM) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.ContainerID)
if l > 0 {
n += 1 + l + sovTask(uint64(l))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *TaskExecAdded) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.ContainerID)
@@ -888,10 +1350,16 @@ func (m *TaskExecAdded) Size() (n int) {
if l > 0 {
n += 1 + l + sovTask(uint64(l))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *TaskExecStarted) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.ContainerID)
@@ -905,30 +1373,48 @@ func (m *TaskExecStarted) Size() (n int) {
if m.Pid != 0 {
n += 1 + sovTask(uint64(m.Pid))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *TaskPaused) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.ContainerID)
if l > 0 {
n += 1 + l + sovTask(uint64(l))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *TaskResumed) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.ContainerID)
if l > 0 {
n += 1 + l + sovTask(uint64(l))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *TaskCheckpointed) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.ContainerID)
@@ -939,6 +1425,9 @@ func (m *TaskCheckpointed) Size() (n int) {
if l > 0 {
n += 1 + l + sovTask(uint64(l))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
@@ -962,10 +1451,11 @@ func (this *TaskCreate) String() string {
s := strings.Join([]string{`&TaskCreate{`,
`ContainerID:` + fmt.Sprintf("%v", this.ContainerID) + `,`,
`Bundle:` + fmt.Sprintf("%v", this.Bundle) + `,`,
- `Rootfs:` + strings.Replace(fmt.Sprintf("%v", this.Rootfs), "Mount", "containerd_types.Mount", 1) + `,`,
+ `Rootfs:` + strings.Replace(fmt.Sprintf("%v", this.Rootfs), "Mount", "types.Mount", 1) + `,`,
`IO:` + strings.Replace(fmt.Sprintf("%v", this.IO), "TaskIO", "TaskIO", 1) + `,`,
`Checkpoint:` + fmt.Sprintf("%v", this.Checkpoint) + `,`,
`Pid:` + fmt.Sprintf("%v", this.Pid) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -977,6 +1467,7 @@ func (this *TaskStart) String() string {
s := strings.Join([]string{`&TaskStart{`,
`ContainerID:` + fmt.Sprintf("%v", this.ContainerID) + `,`,
`Pid:` + fmt.Sprintf("%v", this.Pid) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -989,8 +1480,9 @@ func (this *TaskDelete) String() string {
`ContainerID:` + fmt.Sprintf("%v", this.ContainerID) + `,`,
`Pid:` + fmt.Sprintf("%v", this.Pid) + `,`,
`ExitStatus:` + fmt.Sprintf("%v", this.ExitStatus) + `,`,
- `ExitedAt:` + strings.Replace(strings.Replace(this.ExitedAt.String(), "Timestamp", "google_protobuf2.Timestamp", 1), `&`, ``, 1) + `,`,
+ `ExitedAt:` + strings.Replace(strings.Replace(this.ExitedAt.String(), "Timestamp", "types1.Timestamp", 1), `&`, ``, 1) + `,`,
`ID:` + fmt.Sprintf("%v", this.ID) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -1004,6 +1496,7 @@ func (this *TaskIO) String() string {
`Stdout:` + fmt.Sprintf("%v", this.Stdout) + `,`,
`Stderr:` + fmt.Sprintf("%v", this.Stderr) + `,`,
`Terminal:` + fmt.Sprintf("%v", this.Terminal) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -1017,7 +1510,8 @@ func (this *TaskExit) String() string {
`ID:` + fmt.Sprintf("%v", this.ID) + `,`,
`Pid:` + fmt.Sprintf("%v", this.Pid) + `,`,
`ExitStatus:` + fmt.Sprintf("%v", this.ExitStatus) + `,`,
- `ExitedAt:` + strings.Replace(strings.Replace(this.ExitedAt.String(), "Timestamp", "google_protobuf2.Timestamp", 1), `&`, ``, 1) + `,`,
+ `ExitedAt:` + strings.Replace(strings.Replace(this.ExitedAt.String(), "Timestamp", "types1.Timestamp", 1), `&`, ``, 1) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -1028,6 +1522,7 @@ func (this *TaskOOM) String() string {
}
s := strings.Join([]string{`&TaskOOM{`,
`ContainerID:` + fmt.Sprintf("%v", this.ContainerID) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -1039,6 +1534,7 @@ func (this *TaskExecAdded) String() string {
s := strings.Join([]string{`&TaskExecAdded{`,
`ContainerID:` + fmt.Sprintf("%v", this.ContainerID) + `,`,
`ExecID:` + fmt.Sprintf("%v", this.ExecID) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -1051,6 +1547,7 @@ func (this *TaskExecStarted) String() string {
`ContainerID:` + fmt.Sprintf("%v", this.ContainerID) + `,`,
`ExecID:` + fmt.Sprintf("%v", this.ExecID) + `,`,
`Pid:` + fmt.Sprintf("%v", this.Pid) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -1061,6 +1558,7 @@ func (this *TaskPaused) String() string {
}
s := strings.Join([]string{`&TaskPaused{`,
`ContainerID:` + fmt.Sprintf("%v", this.ContainerID) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -1071,6 +1569,7 @@ func (this *TaskResumed) String() string {
}
s := strings.Join([]string{`&TaskResumed{`,
`ContainerID:` + fmt.Sprintf("%v", this.ContainerID) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -1082,6 +1581,7 @@ func (this *TaskCheckpointed) String() string {
s := strings.Join([]string{`&TaskCheckpointed{`,
`ContainerID:` + fmt.Sprintf("%v", this.ContainerID) + `,`,
`Checkpoint:` + fmt.Sprintf("%v", this.Checkpoint) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -1109,7 +1609,7 @@ func (m *TaskCreate) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1137,7 +1637,7 @@ func (m *TaskCreate) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1147,6 +1647,9 @@ func (m *TaskCreate) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthTask
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthTask
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -1166,7 +1669,7 @@ func (m *TaskCreate) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1176,6 +1679,9 @@ func (m *TaskCreate) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthTask
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthTask
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -1195,7 +1701,7 @@ func (m *TaskCreate) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1204,10 +1710,13 @@ func (m *TaskCreate) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthTask
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthTask
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
- m.Rootfs = append(m.Rootfs, &containerd_types.Mount{})
+ m.Rootfs = append(m.Rootfs, &types.Mount{})
if err := m.Rootfs[len(m.Rootfs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
@@ -1226,7 +1735,7 @@ func (m *TaskCreate) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1235,6 +1744,9 @@ func (m *TaskCreate) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthTask
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthTask
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -1259,7 +1771,7 @@ func (m *TaskCreate) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1269,6 +1781,9 @@ func (m *TaskCreate) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthTask
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthTask
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -1288,7 +1803,7 @@ func (m *TaskCreate) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- m.Pid |= (uint32(b) & 0x7F) << shift
+ m.Pid |= uint32(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1302,9 +1817,13 @@ func (m *TaskCreate) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthTask
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthTask
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -1329,7 +1848,7 @@ func (m *TaskStart) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1357,7 +1876,7 @@ func (m *TaskStart) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1367,6 +1886,9 @@ func (m *TaskStart) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthTask
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthTask
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -1386,7 +1908,7 @@ func (m *TaskStart) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- m.Pid |= (uint32(b) & 0x7F) << shift
+ m.Pid |= uint32(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1400,9 +1922,13 @@ func (m *TaskStart) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthTask
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthTask
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -1427,7 +1953,7 @@ func (m *TaskDelete) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1455,7 +1981,7 @@ func (m *TaskDelete) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1465,6 +1991,9 @@ func (m *TaskDelete) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthTask
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthTask
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -1484,7 +2013,7 @@ func (m *TaskDelete) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- m.Pid |= (uint32(b) & 0x7F) << shift
+ m.Pid |= uint32(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1503,7 +2032,7 @@ func (m *TaskDelete) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- m.ExitStatus |= (uint32(b) & 0x7F) << shift
+ m.ExitStatus |= uint32(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1522,7 +2051,7 @@ func (m *TaskDelete) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1531,10 +2060,13 @@ func (m *TaskDelete) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthTask
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthTask
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
- if err := types.StdTimeUnmarshal(&m.ExitedAt, dAtA[iNdEx:postIndex]); err != nil {
+ if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.ExitedAt, dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
@@ -1552,7 +2084,7 @@ func (m *TaskDelete) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1562,6 +2094,9 @@ func (m *TaskDelete) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthTask
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthTask
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -1576,9 +2111,13 @@ func (m *TaskDelete) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthTask
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthTask
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -1603,7 +2142,7 @@ func (m *TaskIO) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1631,7 +2170,7 @@ func (m *TaskIO) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1641,6 +2180,9 @@ func (m *TaskIO) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthTask
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthTask
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -1660,7 +2202,7 @@ func (m *TaskIO) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1670,6 +2212,9 @@ func (m *TaskIO) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthTask
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthTask
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -1689,7 +2234,7 @@ func (m *TaskIO) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1699,6 +2244,9 @@ func (m *TaskIO) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthTask
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthTask
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -1718,7 +2266,7 @@ func (m *TaskIO) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- v |= (int(b) & 0x7F) << shift
+ v |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1733,9 +2281,13 @@ func (m *TaskIO) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthTask
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthTask
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -1760,7 +2312,7 @@ func (m *TaskExit) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1788,7 +2340,7 @@ func (m *TaskExit) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1798,6 +2350,9 @@ func (m *TaskExit) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthTask
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthTask
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -1817,7 +2372,7 @@ func (m *TaskExit) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1827,6 +2382,9 @@ func (m *TaskExit) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthTask
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthTask
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -1846,7 +2404,7 @@ func (m *TaskExit) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- m.Pid |= (uint32(b) & 0x7F) << shift
+ m.Pid |= uint32(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1865,7 +2423,7 @@ func (m *TaskExit) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- m.ExitStatus |= (uint32(b) & 0x7F) << shift
+ m.ExitStatus |= uint32(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1884,7 +2442,7 @@ func (m *TaskExit) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1893,10 +2451,13 @@ func (m *TaskExit) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthTask
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthTask
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
- if err := types.StdTimeUnmarshal(&m.ExitedAt, dAtA[iNdEx:postIndex]); err != nil {
+ if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.ExitedAt, dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
@@ -1909,9 +2470,13 @@ func (m *TaskExit) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthTask
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthTask
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -1936,7 +2501,7 @@ func (m *TaskOOM) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1964,7 +2529,7 @@ func (m *TaskOOM) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1974,6 +2539,9 @@ func (m *TaskOOM) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthTask
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthTask
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -1988,9 +2556,13 @@ func (m *TaskOOM) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthTask
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthTask
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -2015,7 +2587,7 @@ func (m *TaskExecAdded) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2043,7 +2615,7 @@ func (m *TaskExecAdded) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2053,6 +2625,9 @@ func (m *TaskExecAdded) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthTask
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthTask
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -2072,7 +2647,7 @@ func (m *TaskExecAdded) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2082,6 +2657,9 @@ func (m *TaskExecAdded) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthTask
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthTask
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -2096,9 +2674,13 @@ func (m *TaskExecAdded) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthTask
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthTask
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -2123,7 +2705,7 @@ func (m *TaskExecStarted) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2151,7 +2733,7 @@ func (m *TaskExecStarted) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2161,6 +2743,9 @@ func (m *TaskExecStarted) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthTask
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthTask
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -2180,7 +2765,7 @@ func (m *TaskExecStarted) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2190,6 +2775,9 @@ func (m *TaskExecStarted) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthTask
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthTask
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -2209,7 +2797,7 @@ func (m *TaskExecStarted) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- m.Pid |= (uint32(b) & 0x7F) << shift
+ m.Pid |= uint32(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2223,9 +2811,13 @@ func (m *TaskExecStarted) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthTask
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthTask
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -2250,7 +2842,7 @@ func (m *TaskPaused) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2278,7 +2870,7 @@ func (m *TaskPaused) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2288,6 +2880,9 @@ func (m *TaskPaused) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthTask
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthTask
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -2302,9 +2897,13 @@ func (m *TaskPaused) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthTask
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthTask
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -2329,7 +2928,7 @@ func (m *TaskResumed) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2357,7 +2956,7 @@ func (m *TaskResumed) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2367,6 +2966,9 @@ func (m *TaskResumed) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthTask
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthTask
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -2381,9 +2983,13 @@ func (m *TaskResumed) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthTask
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthTask
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -2408,7 +3014,7 @@ func (m *TaskCheckpointed) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2436,7 +3042,7 @@ func (m *TaskCheckpointed) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2446,6 +3052,9 @@ func (m *TaskCheckpointed) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthTask
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthTask
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -2465,7 +3074,7 @@ func (m *TaskCheckpointed) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2475,6 +3084,9 @@ func (m *TaskCheckpointed) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthTask
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthTask
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -2489,9 +3101,13 @@ func (m *TaskCheckpointed) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthTask
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthTask
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -2555,10 +3171,13 @@ func skipTask(dAtA []byte) (n int, err error) {
break
}
}
- iNdEx += length
if length < 0 {
return 0, ErrInvalidLengthTask
}
+ iNdEx += length
+ if iNdEx < 0 {
+ return 0, ErrInvalidLengthTask
+ }
return iNdEx, nil
case 3:
for {
@@ -2587,6 +3206,9 @@ func skipTask(dAtA []byte) (n int, err error) {
return 0, err
}
iNdEx = start + next
+ if iNdEx < 0 {
+ return 0, ErrInvalidLengthTask
+ }
}
return iNdEx, nil
case 4:
@@ -2605,52 +3227,3 @@ var (
ErrInvalidLengthTask = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowTask = fmt.Errorf("proto: integer overflow")
)
-
-func init() {
- proto.RegisterFile("github.com/containerd/containerd/api/events/task.proto", fileDescriptorTask)
-}
-
-var fileDescriptorTask = []byte{
- // 644 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08,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xdf, 0xc2, 0x7f, 0xcc, 0x75, 0xfb, 0x29, 0x9c, 0x7d, 0xf5, 0xc5, 0x1c, 0x91, 0x24, 0x2e, 0x96,
- 0xd8, 0x69, 0x43, 0x55, 0x2a, 0xf8, 0x2c, 0x4e, 0xe6, 0x05, 0x25, 0xc6, 0xb0, 0x93, 0x8d, 0xbe,
- 0xd5, 0xb8, 0x28, 0xc8, 0xe0, 0xe6, 0x10, 0xd2, 0x7f, 0x1e, 0x42, 0x9d, 0xa3, 0x8b, 0x4b, 0xab,
- 0xf4, 0xf9, 0xd2, 0x2a, 0xbd, 0x4d, 0x2d, 0xed, 0x22, 0xb5, 0xb4, 0x4f, 0xa9, 0xa5, 0x7d, 0x4d,
- 0x2d, 0xed, 0xfd, 0x77, 0x4b, 0x7b, 0xd1, 0xfa, 0x87, 0x7f, 0x9f, 0x27, 0xea, 0xe7, 0xb4, 0x74,
- 0x5a, 0x1e, 0x1a, 0x59, 0x47, 0x3e, 0xfa, 0x11, 0x00, 0x00, 0xff, 0xff, 0xc5, 0x58, 0x0f, 0xec,
- 0xbe, 0x06, 0x00, 0x00,
-}
diff --git a/api/services/containers/v1/containers.pb.go b/api/services/containers/v1/containers.pb.go
index 4d9322164..ce3cef07d 100644
--- a/api/services/containers/v1/containers.pb.go
+++ b/api/services/containers/v1/containers.pb.go
@@ -1,49 +1,22 @@
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: github.com/containerd/containerd/api/services/containers/v1/containers.proto
-/*
- Package containers is a generated protocol buffer package.
-
- It is generated from these files:
- github.com/containerd/containerd/api/services/containers/v1/containers.proto
-
- It has these top-level messages:
- Container
- GetContainerRequest
- GetContainerResponse
- ListContainersRequest
- ListContainersResponse
- CreateContainerRequest
- CreateContainerResponse
- UpdateContainerRequest
- UpdateContainerResponse
- DeleteContainerRequest
- ListContainerMessage
-*/
package containers
-import proto "github.com/gogo/protobuf/proto"
-import fmt "fmt"
-import math "math"
-
-// skipping weak import gogoproto "github.com/gogo/protobuf/gogoproto"
-import google_protobuf1 "github.com/gogo/protobuf/types"
-import google_protobuf2 "github.com/gogo/protobuf/types"
-import google_protobuf3 "github.com/gogo/protobuf/types"
-import _ "github.com/gogo/protobuf/types"
-
-import time "time"
-
-import context "golang.org/x/net/context"
-import grpc "google.golang.org/grpc"
-
-import types "github.com/gogo/protobuf/types"
-
-import strings "strings"
-import reflect "reflect"
-import sortkeys "github.com/gogo/protobuf/sortkeys"
-
-import io "io"
+import (
+ context "context"
+ fmt "fmt"
+ 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"
+ io "io"
+ math "math"
+ reflect "reflect"
+ strings "strings"
+ time "time"
+)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
@@ -68,16 +41,16 @@ type Container struct {
//
// Note that to add a new value to this field, read the existing set and
// include the entire result in the update call.
- Labels map[string]string `protobuf:"bytes,2,rep,name=labels" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
+ Labels map[string]string `protobuf:"bytes,2,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
// Image contains the reference of the image used to build the
// specification and snapshots for running this container.
//
// If this field is updated, the spec and rootfs needed to updated, as well.
Image string `protobuf:"bytes,3,opt,name=image,proto3" json:"image,omitempty"`
// Runtime specifies which runtime to use for executing this container.
- Runtime *Container_Runtime `protobuf:"bytes,4,opt,name=runtime" json:"runtime,omitempty"`
+ Runtime *Container_Runtime `protobuf:"bytes,4,opt,name=runtime,proto3" json:"runtime,omitempty"`
// Spec to be used when creating the container. This is runtime specific.
- Spec *google_protobuf1.Any `protobuf:"bytes,5,opt,name=spec" json:"spec,omitempty"`
+ Spec *types.Any `protobuf:"bytes,5,opt,name=spec,proto3" json:"spec,omitempty"`
// Snapshotter specifies the snapshotter name used for rootfs
Snapshotter string `protobuf:"bytes,6,opt,name=snapshotter,proto3" json:"snapshotter,omitempty"`
// SnapshotKey specifies the snapshot key to use for the container's root
@@ -92,9 +65,9 @@ type Container struct {
// This field may be updated.
SnapshotKey string `protobuf:"bytes,7,opt,name=snapshot_key,json=snapshotKey,proto3" json:"snapshot_key,omitempty"`
// CreatedAt is the time the container was first created.
- CreatedAt time.Time `protobuf:"bytes,8,opt,name=created_at,json=createdAt,stdtime" json:"created_at"`
+ CreatedAt time.Time `protobuf:"bytes,8,opt,name=created_at,json=createdAt,proto3,stdtime" json:"created_at"`
// UpdatedAt is the last time the container was mutated.
- UpdatedAt time.Time `protobuf:"bytes,9,opt,name=updated_at,json=updatedAt,stdtime" json:"updated_at"`
+ UpdatedAt time.Time `protobuf:"bytes,9,opt,name=updated_at,json=updatedAt,proto3,stdtime" json:"updated_at"`
// Extensions allow clients to provide zero or more blobs that are directly
// associated with the container. One may provide protobuf, json, or other
// encoding formats. The primary use of this is to further decorate the
@@ -104,39 +77,163 @@ type Container struct {
// that should be unique against other extensions. When updating extension
// data, one should only update the specified extension using field paths
// to select a specific map key.
- Extensions map[string]google_protobuf1.Any `protobuf:"bytes,10,rep,name=extensions" json:"extensions" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"`
+ Extensions map[string]types.Any `protobuf:"bytes,10,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:"-"`
}
-func (m *Container) Reset() { *m = Container{} }
-func (*Container) ProtoMessage() {}
-func (*Container) Descriptor() ([]byte, []int) { return fileDescriptorContainers, []int{0} }
+func (m *Container) Reset() { *m = Container{} }
+func (*Container) ProtoMessage() {}
+func (*Container) Descriptor() ([]byte, []int) {
+ return fileDescriptor_311afb8e15951042, []int{0}
+}
+func (m *Container) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *Container) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_Container.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *Container) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_Container.Merge(m, src)
+}
+func (m *Container) XXX_Size() int {
+ return m.Size()
+}
+func (m *Container) XXX_DiscardUnknown() {
+ xxx_messageInfo_Container.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Container proto.InternalMessageInfo
type Container_Runtime struct {
// Name is the name of the runtime.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Options specify additional runtime initialization options.
- Options *google_protobuf1.Any `protobuf:"bytes,2,opt,name=options" json:"options,omitempty"`
+ Options *types.Any `protobuf:"bytes,2,opt,name=options,proto3" json:"options,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *Container_Runtime) Reset() { *m = Container_Runtime{} }
-func (*Container_Runtime) ProtoMessage() {}
-func (*Container_Runtime) Descriptor() ([]byte, []int) { return fileDescriptorContainers, []int{0, 1} }
+func (m *Container_Runtime) Reset() { *m = Container_Runtime{} }
+func (*Container_Runtime) ProtoMessage() {}
+func (*Container_Runtime) Descriptor() ([]byte, []int) {
+ return fileDescriptor_311afb8e15951042, []int{0, 1}
+}
+func (m *Container_Runtime) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *Container_Runtime) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_Container_Runtime.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *Container_Runtime) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_Container_Runtime.Merge(m, src)
+}
+func (m *Container_Runtime) XXX_Size() int {
+ return m.Size()
+}
+func (m *Container_Runtime) XXX_DiscardUnknown() {
+ xxx_messageInfo_Container_Runtime.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Container_Runtime proto.InternalMessageInfo
type GetContainerRequest struct {
- ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *GetContainerRequest) Reset() { *m = GetContainerRequest{} }
-func (*GetContainerRequest) ProtoMessage() {}
-func (*GetContainerRequest) Descriptor() ([]byte, []int) { return fileDescriptorContainers, []int{1} }
+func (m *GetContainerRequest) Reset() { *m = GetContainerRequest{} }
+func (*GetContainerRequest) ProtoMessage() {}
+func (*GetContainerRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_311afb8e15951042, []int{1}
+}
+func (m *GetContainerRequest) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *GetContainerRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_GetContainerRequest.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *GetContainerRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_GetContainerRequest.Merge(m, src)
+}
+func (m *GetContainerRequest) XXX_Size() int {
+ return m.Size()
+}
+func (m *GetContainerRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_GetContainerRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_GetContainerRequest proto.InternalMessageInfo
type GetContainerResponse struct {
- Container Container `protobuf:"bytes,1,opt,name=container" json:"container"`
+ Container Container `protobuf:"bytes,1,opt,name=container,proto3" json:"container"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *GetContainerResponse) Reset() { *m = GetContainerResponse{} }
-func (*GetContainerResponse) ProtoMessage() {}
-func (*GetContainerResponse) Descriptor() ([]byte, []int) { return fileDescriptorContainers, []int{2} }
+func (m *GetContainerResponse) Reset() { *m = GetContainerResponse{} }
+func (*GetContainerResponse) ProtoMessage() {}
+func (*GetContainerResponse) Descriptor() ([]byte, []int) {
+ return fileDescriptor_311afb8e15951042, []int{2}
+}
+func (m *GetContainerResponse) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *GetContainerResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_GetContainerResponse.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *GetContainerResponse) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_GetContainerResponse.Merge(m, src)
+}
+func (m *GetContainerResponse) XXX_Size() int {
+ return m.Size()
+}
+func (m *GetContainerResponse) XXX_DiscardUnknown() {
+ xxx_messageInfo_GetContainerResponse.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_GetContainerResponse proto.InternalMessageInfo
type ListContainersRequest struct {
// Filters contains one or more filters using the syntax defined in the
@@ -149,38 +246,160 @@ type ListContainersRequest struct {
// filters[0] or filters[1] or ... or filters[n-1] or filters[n]
//
// If filters is zero-length or nil, all items will be returned.
- Filters []string `protobuf:"bytes,1,rep,name=filters" json:"filters,omitempty"`
+ Filters []string `protobuf:"bytes,1,rep,name=filters,proto3" json:"filters,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *ListContainersRequest) Reset() { *m = ListContainersRequest{} }
-func (*ListContainersRequest) ProtoMessage() {}
-func (*ListContainersRequest) Descriptor() ([]byte, []int) { return fileDescriptorContainers, []int{3} }
+func (m *ListContainersRequest) Reset() { *m = ListContainersRequest{} }
+func (*ListContainersRequest) ProtoMessage() {}
+func (*ListContainersRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_311afb8e15951042, []int{3}
+}
+func (m *ListContainersRequest) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *ListContainersRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_ListContainersRequest.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *ListContainersRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_ListContainersRequest.Merge(m, src)
+}
+func (m *ListContainersRequest) XXX_Size() int {
+ return m.Size()
+}
+func (m *ListContainersRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_ListContainersRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_ListContainersRequest proto.InternalMessageInfo
type ListContainersResponse struct {
- Containers []Container `protobuf:"bytes,1,rep,name=containers" json:"containers"`
+ Containers []Container `protobuf:"bytes,1,rep,name=containers,proto3" json:"containers"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *ListContainersResponse) Reset() { *m = ListContainersResponse{} }
-func (*ListContainersResponse) ProtoMessage() {}
-func (*ListContainersResponse) Descriptor() ([]byte, []int) { return fileDescriptorContainers, []int{4} }
+func (m *ListContainersResponse) Reset() { *m = ListContainersResponse{} }
+func (*ListContainersResponse) ProtoMessage() {}
+func (*ListContainersResponse) Descriptor() ([]byte, []int) {
+ return fileDescriptor_311afb8e15951042, []int{4}
+}
+func (m *ListContainersResponse) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *ListContainersResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_ListContainersResponse.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *ListContainersResponse) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_ListContainersResponse.Merge(m, src)
+}
+func (m *ListContainersResponse) XXX_Size() int {
+ return m.Size()
+}
+func (m *ListContainersResponse) XXX_DiscardUnknown() {
+ xxx_messageInfo_ListContainersResponse.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_ListContainersResponse proto.InternalMessageInfo
type CreateContainerRequest struct {
- Container Container `protobuf:"bytes,1,opt,name=container" json:"container"`
+ Container Container `protobuf:"bytes,1,opt,name=container,proto3" json:"container"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *CreateContainerRequest) Reset() { *m = CreateContainerRequest{} }
-func (*CreateContainerRequest) ProtoMessage() {}
-func (*CreateContainerRequest) Descriptor() ([]byte, []int) { return fileDescriptorContainers, []int{5} }
+func (m *CreateContainerRequest) Reset() { *m = CreateContainerRequest{} }
+func (*CreateContainerRequest) ProtoMessage() {}
+func (*CreateContainerRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_311afb8e15951042, []int{5}
+}
+func (m *CreateContainerRequest) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *CreateContainerRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_CreateContainerRequest.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *CreateContainerRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_CreateContainerRequest.Merge(m, src)
+}
+func (m *CreateContainerRequest) XXX_Size() int {
+ return m.Size()
+}
+func (m *CreateContainerRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_CreateContainerRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_CreateContainerRequest proto.InternalMessageInfo
type CreateContainerResponse struct {
- Container Container `protobuf:"bytes,1,opt,name=container" json:"container"`
+ Container Container `protobuf:"bytes,1,opt,name=container,proto3" json:"container"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
func (m *CreateContainerResponse) Reset() { *m = CreateContainerResponse{} }
func (*CreateContainerResponse) ProtoMessage() {}
func (*CreateContainerResponse) Descriptor() ([]byte, []int) {
- return fileDescriptorContainers, []int{6}
+ return fileDescriptor_311afb8e15951042, []int{6}
}
+func (m *CreateContainerResponse) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *CreateContainerResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_CreateContainerResponse.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *CreateContainerResponse) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_CreateContainerResponse.Merge(m, src)
+}
+func (m *CreateContainerResponse) XXX_Size() int {
+ return m.Size()
+}
+func (m *CreateContainerResponse) XXX_DiscardUnknown() {
+ xxx_messageInfo_CreateContainerResponse.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_CreateContainerResponse proto.InternalMessageInfo
// UpdateContainerRequest updates the metadata on one or more container.
//
@@ -191,44 +410,168 @@ type UpdateContainerRequest struct {
// Container provides the target values, as declared by the mask, for the update.
//
// The ID field must be set.
- Container Container `protobuf:"bytes,1,opt,name=container" json:"container"`
+ Container Container `protobuf:"bytes,1,opt,name=container,proto3" json:"container"`
// UpdateMask specifies which fields to perform the update on. If empty,
// the operation applies to all fields.
- UpdateMask *google_protobuf3.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask" json:"update_mask,omitempty"`
+ UpdateMask *types.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *UpdateContainerRequest) Reset() { *m = UpdateContainerRequest{} }
-func (*UpdateContainerRequest) ProtoMessage() {}
-func (*UpdateContainerRequest) Descriptor() ([]byte, []int) { return fileDescriptorContainers, []int{7} }
+func (m *UpdateContainerRequest) Reset() { *m = UpdateContainerRequest{} }
+func (*UpdateContainerRequest) ProtoMessage() {}
+func (*UpdateContainerRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_311afb8e15951042, []int{7}
+}
+func (m *UpdateContainerRequest) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *UpdateContainerRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_UpdateContainerRequest.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *UpdateContainerRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_UpdateContainerRequest.Merge(m, src)
+}
+func (m *UpdateContainerRequest) XXX_Size() int {
+ return m.Size()
+}
+func (m *UpdateContainerRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_UpdateContainerRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_UpdateContainerRequest proto.InternalMessageInfo
type UpdateContainerResponse struct {
- Container Container `protobuf:"bytes,1,opt,name=container" json:"container"`
+ Container Container `protobuf:"bytes,1,opt,name=container,proto3" json:"container"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
func (m *UpdateContainerResponse) Reset() { *m = UpdateContainerResponse{} }
func (*UpdateContainerResponse) ProtoMessage() {}
func (*UpdateContainerResponse) Descriptor() ([]byte, []int) {
- return fileDescriptorContainers, []int{8}
+ return fileDescriptor_311afb8e15951042, []int{8}
}
+func (m *UpdateContainerResponse) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *UpdateContainerResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_UpdateContainerResponse.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *UpdateContainerResponse) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_UpdateContainerResponse.Merge(m, src)
+}
+func (m *UpdateContainerResponse) XXX_Size() int {
+ return m.Size()
+}
+func (m *UpdateContainerResponse) XXX_DiscardUnknown() {
+ xxx_messageInfo_UpdateContainerResponse.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_UpdateContainerResponse proto.InternalMessageInfo
type DeleteContainerRequest struct {
- ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *DeleteContainerRequest) Reset() { *m = DeleteContainerRequest{} }
-func (*DeleteContainerRequest) ProtoMessage() {}
-func (*DeleteContainerRequest) Descriptor() ([]byte, []int) { return fileDescriptorContainers, []int{9} }
+func (m *DeleteContainerRequest) Reset() { *m = DeleteContainerRequest{} }
+func (*DeleteContainerRequest) ProtoMessage() {}
+func (*DeleteContainerRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_311afb8e15951042, []int{9}
+}
+func (m *DeleteContainerRequest) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *DeleteContainerRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_DeleteContainerRequest.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *DeleteContainerRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_DeleteContainerRequest.Merge(m, src)
+}
+func (m *DeleteContainerRequest) XXX_Size() int {
+ return m.Size()
+}
+func (m *DeleteContainerRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_DeleteContainerRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_DeleteContainerRequest proto.InternalMessageInfo
type ListContainerMessage struct {
- Container *Container `protobuf:"bytes,1,opt,name=container" json:"container,omitempty"`
+ Container *Container `protobuf:"bytes,1,opt,name=container,proto3" json:"container,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *ListContainerMessage) Reset() { *m = ListContainerMessage{} }
-func (*ListContainerMessage) ProtoMessage() {}
-func (*ListContainerMessage) Descriptor() ([]byte, []int) { return fileDescriptorContainers, []int{10} }
+func (m *ListContainerMessage) Reset() { *m = ListContainerMessage{} }
+func (*ListContainerMessage) ProtoMessage() {}
+func (*ListContainerMessage) Descriptor() ([]byte, []int) {
+ return fileDescriptor_311afb8e15951042, []int{10}
+}
+func (m *ListContainerMessage) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *ListContainerMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_ListContainerMessage.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *ListContainerMessage) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_ListContainerMessage.Merge(m, src)
+}
+func (m *ListContainerMessage) XXX_Size() int {
+ return m.Size()
+}
+func (m *ListContainerMessage) XXX_DiscardUnknown() {
+ xxx_messageInfo_ListContainerMessage.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_ListContainerMessage proto.InternalMessageInfo
func init() {
proto.RegisterType((*Container)(nil), "containerd.services.containers.v1.Container")
+ proto.RegisterMapType((map[string]types.Any)(nil), "containerd.services.containers.v1.Container.ExtensionsEntry")
+ proto.RegisterMapType((map[string]string)(nil), "containerd.services.containers.v1.Container.LabelsEntry")
proto.RegisterType((*Container_Runtime)(nil), "containerd.services.containers.v1.Container.Runtime")
proto.RegisterType((*GetContainerRequest)(nil), "containerd.services.containers.v1.GetContainerRequest")
proto.RegisterType((*GetContainerResponse)(nil), "containerd.services.containers.v1.GetContainerResponse")
@@ -242,6 +585,66 @@ func init() {
proto.RegisterType((*ListContainerMessage)(nil), "containerd.services.containers.v1.ListContainerMessage")
}
+func init() {
+ proto.RegisterFile("github.com/containerd/containerd/api/services/containers/v1/containers.proto", fileDescriptor_311afb8e15951042)
+}
+
+var fileDescriptor_311afb8e15951042 = []byte{
+ // 820 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0xcb, 0x6e, 0x13, 0x49,
+ 0x14, 0x75, 0xdb, 0x4e, 0x3b, 0xbe, 0x1e,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e1, 0x14, 0x44, 0xdf, 0x0b, 0x53, 0x11, 0x18, 0xef, 0xef, 0xa9, 0x08, 0x4c, 0x72, 0xdc, 0x73,
+ 0x10, 0x7d, 0x7f, 0x4c, 0x45, 0x60, 0xbc, 0x95, 0xe4, 0xdc, 0x88, 0xf3, 0xb7, 0xbd, 0x2f, 0xc1,
+ 0xda, 0x8b, 0xb3, 0x8b, 0x7c, 0xec, 0xf3, 0x45, 0x3e, 0xf6, 0xb6, 0x9f, 0x17, 0xce, 0xfa, 0x79,
+ 0xe1, 0x53, 0x3f, 0x2f, 0x7c, 0xed, 0xe7, 0x85, 0x67, 0x3b, 0xd7, 0xf8, 0xb8, 0x5d, 0x0f, 0xa3,
+ 0xa7, 0xb1, 0xba, 0xc8, 0x7a, 0xde, 0xfe, 0x1e, 0x00, 0x00, 0xff, 0xff, 0xd0, 0xae, 0xca, 0xcb,
+ 0x2f, 0x0b, 0x00, 0x00,
+}
+
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn
@@ -250,15 +653,16 @@ var _ grpc.ClientConn
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4
-// Client API for Containers service
-
+// ContainersClient is the client API for Containers service.
+//
+// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type ContainersClient interface {
Get(ctx context.Context, in *GetContainerRequest, opts ...grpc.CallOption) (*GetContainerResponse, error)
List(ctx context.Context, in *ListContainersRequest, opts ...grpc.CallOption) (*ListContainersResponse, error)
ListStream(ctx context.Context, in *ListContainersRequest, opts ...grpc.CallOption) (Containers_ListStreamClient, error)
Create(ctx context.Context, in *CreateContainerRequest, opts ...grpc.CallOption) (*CreateContainerResponse, error)
Update(ctx context.Context, in *UpdateContainerRequest, opts ...grpc.CallOption) (*UpdateContainerResponse, error)
- Delete(ctx context.Context, in *DeleteContainerRequest, opts ...grpc.CallOption) (*google_protobuf2.Empty, error)
+ Delete(ctx context.Context, in *DeleteContainerRequest, opts ...grpc.CallOption) (*types.Empty, error)
}
type containersClient struct {
@@ -271,7 +675,7 @@ func NewContainersClient(cc *grpc.ClientConn) ContainersClient {
func (c *containersClient) Get(ctx context.Context, in *GetContainerRequest, opts ...grpc.CallOption) (*GetContainerResponse, error) {
out := new(GetContainerResponse)
- err := grpc.Invoke(ctx, "/containerd.services.containers.v1.Containers/Get", in, out, c.cc, opts...)
+ err := c.cc.Invoke(ctx, "/containerd.services.containers.v1.Containers/Get", in, out, opts...)
if err != nil {
return nil, err
}
@@ -280,7 +684,7 @@ func (c *containersClient) Get(ctx context.Context, in *GetContainerRequest, opt
func (c *containersClient) List(ctx context.Context, in *ListContainersRequest, opts ...grpc.CallOption) (*ListContainersResponse, error) {
out := new(ListContainersResponse)
- err := grpc.Invoke(ctx, "/containerd.services.containers.v1.Containers/List", in, out, c.cc, opts...)
+ err := c.cc.Invoke(ctx, "/containerd.services.containers.v1.Containers/List", in, out, opts...)
if err != nil {
return nil, err
}
@@ -288,7 +692,7 @@ func (c *containersClient) List(ctx context.Context, in *ListContainersRequest,
}
func (c *containersClient) ListStream(ctx context.Context, in *ListContainersRequest, opts ...grpc.CallOption) (Containers_ListStreamClient, error) {
- stream, err := grpc.NewClientStream(ctx, &_Containers_serviceDesc.Streams[0], c.cc, "/containerd.services.containers.v1.Containers/ListStream", opts...)
+ stream, err := c.cc.NewStream(ctx, &_Containers_serviceDesc.Streams[0], "/containerd.services.containers.v1.Containers/ListStream", opts...)
if err != nil {
return nil, err
}
@@ -321,7 +725,7 @@ func (x *containersListStreamClient) Recv() (*ListContainerMessage, error) {
func (c *containersClient) Create(ctx context.Context, in *CreateContainerRequest, opts ...grpc.CallOption) (*CreateContainerResponse, error) {
out := new(CreateContainerResponse)
- err := grpc.Invoke(ctx, "/containerd.services.containers.v1.Containers/Create", in, out, c.cc, opts...)
+ err := c.cc.Invoke(ctx, "/containerd.services.containers.v1.Containers/Create", in, out, opts...)
if err != nil {
return nil, err
}
@@ -330,31 +734,30 @@ func (c *containersClient) Create(ctx context.Context, in *CreateContainerReques
func (c *containersClient) Update(ctx context.Context, in *UpdateContainerRequest, opts ...grpc.CallOption) (*UpdateContainerResponse, error) {
out := new(UpdateContainerResponse)
- err := grpc.Invoke(ctx, "/containerd.services.containers.v1.Containers/Update", in, out, c.cc, opts...)
+ err := c.cc.Invoke(ctx, "/containerd.services.containers.v1.Containers/Update", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
-func (c *containersClient) Delete(ctx context.Context, in *DeleteContainerRequest, opts ...grpc.CallOption) (*google_protobuf2.Empty, error) {
- out := new(google_protobuf2.Empty)
- err := grpc.Invoke(ctx, "/containerd.services.containers.v1.Containers/Delete", in, out, c.cc, opts...)
+func (c *containersClient) Delete(ctx context.Context, in *DeleteContainerRequest, opts ...grpc.CallOption) (*types.Empty, error) {
+ out := new(types.Empty)
+ err := c.cc.Invoke(ctx, "/containerd.services.containers.v1.Containers/Delete", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
-// Server API for Containers service
-
+// ContainersServer is the server API for Containers service.
type ContainersServer interface {
Get(context.Context, *GetContainerRequest) (*GetContainerResponse, error)
List(context.Context, *ListContainersRequest) (*ListContainersResponse, error)
ListStream(*ListContainersRequest, Containers_ListStreamServer) error
Create(context.Context, *CreateContainerRequest) (*CreateContainerResponse, error)
Update(context.Context, *UpdateContainerRequest) (*UpdateContainerResponse, error)
- Delete(context.Context, *DeleteContainerRequest) (*google_protobuf2.Empty, error)
+ Delete(context.Context, *DeleteContainerRequest) (*types.Empty, error)
}
func RegisterContainersServer(s *grpc.Server, srv ContainersServer) {
@@ -585,16 +988,16 @@ func (m *Container) MarshalTo(dAtA []byte) (int, error) {
}
dAtA[i] = 0x42
i++
- i = encodeVarintContainers(dAtA, i, uint64(types.SizeOfStdTime(m.CreatedAt)))
- n3, err := types.StdTimeMarshalTo(m.CreatedAt, dAtA[i:])
+ i = encodeVarintContainers(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.CreatedAt)))
+ n3, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.CreatedAt, dAtA[i:])
if err != nil {
return 0, err
}
i += n3
dAtA[i] = 0x4a
i++
- i = encodeVarintContainers(dAtA, i, uint64(types.SizeOfStdTime(m.UpdatedAt)))
- n4, err := types.StdTimeMarshalTo(m.UpdatedAt, dAtA[i:])
+ i = encodeVarintContainers(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.UpdatedAt)))
+ n4, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.UpdatedAt, dAtA[i:])
if err != nil {
return 0, err
}
@@ -625,6 +1028,9 @@ func (m *Container) MarshalTo(dAtA []byte) (int, error) {
i += n5
}
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -659,6 +1065,9 @@ func (m *Container_Runtime) MarshalTo(dAtA []byte) (int, error) {
}
i += n6
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -683,6 +1092,9 @@ func (m *GetContainerRequest) MarshalTo(dAtA []byte) (int, error) {
i = encodeVarintContainers(dAtA, i, uint64(len(m.ID)))
i += copy(dAtA[i:], m.ID)
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -709,6 +1121,9 @@ func (m *GetContainerResponse) MarshalTo(dAtA []byte) (int, error) {
return 0, err
}
i += n7
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -742,6 +1157,9 @@ func (m *ListContainersRequest) MarshalTo(dAtA []byte) (int, error) {
i += copy(dAtA[i:], s)
}
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -772,6 +1190,9 @@ func (m *ListContainersResponse) MarshalTo(dAtA []byte) (int, error) {
i += n
}
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -798,6 +1219,9 @@ func (m *CreateContainerRequest) MarshalTo(dAtA []byte) (int, error) {
return 0, err
}
i += n8
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -824,6 +1248,9 @@ func (m *CreateContainerResponse) MarshalTo(dAtA []byte) (int, error) {
return 0, err
}
i += n9
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -860,6 +1287,9 @@ func (m *UpdateContainerRequest) MarshalTo(dAtA []byte) (int, error) {
}
i += n11
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -886,6 +1316,9 @@ func (m *UpdateContainerResponse) MarshalTo(dAtA []byte) (int, error) {
return 0, err
}
i += n12
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -910,6 +1343,9 @@ func (m *DeleteContainerRequest) MarshalTo(dAtA []byte) (int, error) {
i = encodeVarintContainers(dAtA, i, uint64(len(m.ID)))
i += copy(dAtA[i:], m.ID)
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -938,6 +1374,9 @@ func (m *ListContainerMessage) MarshalTo(dAtA []byte) (int, error) {
}
i += n13
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -951,6 +1390,9 @@ func encodeVarintContainers(dAtA []byte, offset int, v uint64) int {
return offset + 1
}
func (m *Container) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.ID)
@@ -985,9 +1427,9 @@ func (m *Container) Size() (n int) {
if l > 0 {
n += 1 + l + sovContainers(uint64(l))
}
- l = types.SizeOfStdTime(m.CreatedAt)
+ l = github_com_gogo_protobuf_types.SizeOfStdTime(m.CreatedAt)
n += 1 + l + sovContainers(uint64(l))
- l = types.SizeOfStdTime(m.UpdatedAt)
+ l = github_com_gogo_protobuf_types.SizeOfStdTime(m.UpdatedAt)
n += 1 + l + sovContainers(uint64(l))
if len(m.Extensions) > 0 {
for k, v := range m.Extensions {
@@ -998,10 +1440,16 @@ func (m *Container) Size() (n int) {
n += mapEntrySize + 1 + sovContainers(uint64(mapEntrySize))
}
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *Container_Runtime) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.Name)
@@ -1012,28 +1460,46 @@ func (m *Container_Runtime) Size() (n int) {
l = m.Options.Size()
n += 1 + l + sovContainers(uint64(l))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *GetContainerRequest) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.ID)
if l > 0 {
n += 1 + l + sovContainers(uint64(l))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *GetContainerResponse) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = m.Container.Size()
n += 1 + l + sovContainers(uint64(l))
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *ListContainersRequest) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
if len(m.Filters) > 0 {
@@ -1042,10 +1508,16 @@ func (m *ListContainersRequest) Size() (n int) {
n += 1 + l + sovContainers(uint64(l))
}
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *ListContainersResponse) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
if len(m.Containers) > 0 {
@@ -1054,26 +1526,44 @@ func (m *ListContainersResponse) Size() (n int) {
n += 1 + l + sovContainers(uint64(l))
}
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *CreateContainerRequest) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = m.Container.Size()
n += 1 + l + sovContainers(uint64(l))
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *CreateContainerResponse) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = m.Container.Size()
n += 1 + l + sovContainers(uint64(l))
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *UpdateContainerRequest) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = m.Container.Size()
@@ -1082,34 +1572,55 @@ func (m *UpdateContainerRequest) Size() (n int) {
l = m.UpdateMask.Size()
n += 1 + l + sovContainers(uint64(l))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *UpdateContainerResponse) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = m.Container.Size()
n += 1 + l + sovContainers(uint64(l))
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *DeleteContainerRequest) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.ID)
if l > 0 {
n += 1 + l + sovContainers(uint64(l))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *ListContainerMessage) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
if m.Container != nil {
l = m.Container.Size()
n += 1 + l + sovContainers(uint64(l))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
@@ -1134,7 +1645,7 @@ func (this *Container) String() string {
for k, _ := range this.Labels {
keysForLabels = append(keysForLabels, k)
}
- sortkeys.Strings(keysForLabels)
+ github_com_gogo_protobuf_sortkeys.Strings(keysForLabels)
mapStringForLabels := "map[string]string{"
for _, k := range keysForLabels {
mapStringForLabels += fmt.Sprintf("%v: %v,", k, this.Labels[k])
@@ -1144,8 +1655,8 @@ func (this *Container) String() string {
for k, _ := range this.Extensions {
keysForExtensions = append(keysForExtensions, k)
}
- sortkeys.Strings(keysForExtensions)
- mapStringForExtensions := "map[string]google_protobuf1.Any{"
+ github_com_gogo_protobuf_sortkeys.Strings(keysForExtensions)
+ mapStringForExtensions := "map[string]types.Any{"
for _, k := range keysForExtensions {
mapStringForExtensions += fmt.Sprintf("%v: %v,", k, this.Extensions[k])
}
@@ -1155,12 +1666,13 @@ func (this *Container) String() string {
`Labels:` + mapStringForLabels + `,`,
`Image:` + fmt.Sprintf("%v", this.Image) + `,`,
`Runtime:` + strings.Replace(fmt.Sprintf("%v", this.Runtime), "Container_Runtime", "Container_Runtime", 1) + `,`,
- `Spec:` + strings.Replace(fmt.Sprintf("%v", this.Spec), "Any", "google_protobuf1.Any", 1) + `,`,
+ `Spec:` + strings.Replace(fmt.Sprintf("%v", this.Spec), "Any", "types.Any", 1) + `,`,
`Snapshotter:` + fmt.Sprintf("%v", this.Snapshotter) + `,`,
`SnapshotKey:` + fmt.Sprintf("%v", this.SnapshotKey) + `,`,
- `CreatedAt:` + strings.Replace(strings.Replace(this.CreatedAt.String(), "Timestamp", "google_protobuf4.Timestamp", 1), `&`, ``, 1) + `,`,
- `UpdatedAt:` + strings.Replace(strings.Replace(this.UpdatedAt.String(), "Timestamp", "google_protobuf4.Timestamp", 1), `&`, ``, 1) + `,`,
+ `CreatedAt:` + strings.Replace(strings.Replace(this.CreatedAt.String(), "Timestamp", "types.Timestamp", 1), `&`, ``, 1) + `,`,
+ `UpdatedAt:` + strings.Replace(strings.Replace(this.UpdatedAt.String(), "Timestamp", "types.Timestamp", 1), `&`, ``, 1) + `,`,
`Extensions:` + mapStringForExtensions + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -1171,7 +1683,8 @@ func (this *Container_Runtime) String() string {
}
s := strings.Join([]string{`&Container_Runtime{`,
`Name:` + fmt.Sprintf("%v", this.Name) + `,`,
- `Options:` + strings.Replace(fmt.Sprintf("%v", this.Options), "Any", "google_protobuf1.Any", 1) + `,`,
+ `Options:` + strings.Replace(fmt.Sprintf("%v", this.Options), "Any", "types.Any", 1) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -1182,6 +1695,7 @@ func (this *GetContainerRequest) String() string {
}
s := strings.Join([]string{`&GetContainerRequest{`,
`ID:` + fmt.Sprintf("%v", this.ID) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -1192,6 +1706,7 @@ func (this *GetContainerResponse) String() string {
}
s := strings.Join([]string{`&GetContainerResponse{`,
`Container:` + strings.Replace(strings.Replace(this.Container.String(), "Container", "Container", 1), `&`, ``, 1) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -1202,6 +1717,7 @@ func (this *ListContainersRequest) String() string {
}
s := strings.Join([]string{`&ListContainersRequest{`,
`Filters:` + fmt.Sprintf("%v", this.Filters) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -1212,6 +1728,7 @@ func (this *ListContainersResponse) String() string {
}
s := strings.Join([]string{`&ListContainersResponse{`,
`Containers:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Containers), "Container", "Container", 1), `&`, ``, 1) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -1222,6 +1739,7 @@ func (this *CreateContainerRequest) String() string {
}
s := strings.Join([]string{`&CreateContainerRequest{`,
`Container:` + strings.Replace(strings.Replace(this.Container.String(), "Container", "Container", 1), `&`, ``, 1) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -1232,6 +1750,7 @@ func (this *CreateContainerResponse) String() string {
}
s := strings.Join([]string{`&CreateContainerResponse{`,
`Container:` + strings.Replace(strings.Replace(this.Container.String(), "Container", "Container", 1), `&`, ``, 1) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -1242,7 +1761,8 @@ func (this *UpdateContainerRequest) String() string {
}
s := strings.Join([]string{`&UpdateContainerRequest{`,
`Container:` + strings.Replace(strings.Replace(this.Container.String(), "Container", "Container", 1), `&`, ``, 1) + `,`,
- `UpdateMask:` + strings.Replace(fmt.Sprintf("%v", this.UpdateMask), "FieldMask", "google_protobuf3.FieldMask", 1) + `,`,
+ `UpdateMask:` + strings.Replace(fmt.Sprintf("%v", this.UpdateMask), "FieldMask", "types.FieldMask", 1) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -1253,6 +1773,7 @@ func (this *UpdateContainerResponse) String() string {
}
s := strings.Join([]string{`&UpdateContainerResponse{`,
`Container:` + strings.Replace(strings.Replace(this.Container.String(), "Container", "Container", 1), `&`, ``, 1) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -1263,6 +1784,7 @@ func (this *DeleteContainerRequest) String() string {
}
s := strings.Join([]string{`&DeleteContainerRequest{`,
`ID:` + fmt.Sprintf("%v", this.ID) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -1273,6 +1795,7 @@ func (this *ListContainerMessage) String() string {
}
s := strings.Join([]string{`&ListContainerMessage{`,
`Container:` + strings.Replace(fmt.Sprintf("%v", this.Container), "Container", "Container", 1) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -1300,7 +1823,7 @@ func (m *Container) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1328,7 +1851,7 @@ func (m *Container) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1338,6 +1861,9 @@ func (m *Container) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthContainers
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthContainers
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -1357,7 +1883,7 @@ func (m *Container) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1366,6 +1892,9 @@ func (m *Container) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthContainers
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthContainers
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -1386,7 +1915,7 @@ func (m *Container) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1403,7 +1932,7 @@ func (m *Container) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ stringLenmapkey |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1413,6 +1942,9 @@ func (m *Container) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthContainers
}
postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey < 0 {
+ return ErrInvalidLengthContainers
+ }
if postStringIndexmapkey > l {
return io.ErrUnexpectedEOF
}
@@ -1429,7 +1961,7 @@ func (m *Container) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLenmapvalue |= (uint64(b) & 0x7F) << shift
+ stringLenmapvalue |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1439,6 +1971,9 @@ func (m *Container) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthContainers
}
postStringIndexmapvalue := iNdEx + intStringLenmapvalue
+ if postStringIndexmapvalue < 0 {
+ return ErrInvalidLengthContainers
+ }
if postStringIndexmapvalue > l {
return io.ErrUnexpectedEOF
}
@@ -1475,7 +2010,7 @@ func (m *Container) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1485,6 +2020,9 @@ func (m *Container) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthContainers
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthContainers
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -1504,7 +2042,7 @@ func (m *Container) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1513,6 +2051,9 @@ func (m *Container) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthContainers
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthContainers
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -1537,7 +2078,7 @@ func (m *Container) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1546,11 +2087,14 @@ func (m *Container) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthContainers
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthContainers
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Spec == nil {
- m.Spec = &google_protobuf1.Any{}
+ m.Spec = &types.Any{}
}
if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
@@ -1570,7 +2114,7 @@ func (m *Container) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1580,6 +2124,9 @@ func (m *Container) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthContainers
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthContainers
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -1599,7 +2146,7 @@ func (m *Container) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1609,6 +2156,9 @@ func (m *Container) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthContainers
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthContainers
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -1628,7 +2178,7 @@ func (m *Container) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1637,10 +2187,13 @@ func (m *Container) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthContainers
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthContainers
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
- if err := types.StdTimeUnmarshal(&m.CreatedAt, dAtA[iNdEx:postIndex]); err != nil {
+ if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.CreatedAt, dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
@@ -1658,7 +2211,7 @@ func (m *Container) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1667,10 +2220,13 @@ func (m *Container) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthContainers
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthContainers
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
- if err := types.StdTimeUnmarshal(&m.UpdatedAt, dAtA[iNdEx:postIndex]); err != nil {
+ if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.UpdatedAt, dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
@@ -1688,7 +2244,7 @@ func (m *Container) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1697,14 +2253,17 @@ func (m *Container) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthContainers
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthContainers
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Extensions == nil {
- m.Extensions = make(map[string]google_protobuf1.Any)
+ m.Extensions = make(map[string]types.Any)
}
var mapkey string
- mapvalue := &google_protobuf1.Any{}
+ mapvalue := &types.Any{}
for iNdEx < postIndex {
entryPreIndex := iNdEx
var wire uint64
@@ -1717,7 +2276,7 @@ func (m *Container) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1734,7 +2293,7 @@ func (m *Container) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ stringLenmapkey |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1744,6 +2303,9 @@ func (m *Container) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthContainers
}
postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey < 0 {
+ return ErrInvalidLengthContainers
+ }
if postStringIndexmapkey > l {
return io.ErrUnexpectedEOF
}
@@ -1760,7 +2322,7 @@ func (m *Container) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- mapmsglen |= (int(b) & 0x7F) << shift
+ mapmsglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1769,13 +2331,13 @@ func (m *Container) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthContainers
}
postmsgIndex := iNdEx + mapmsglen
- if mapmsglen < 0 {
+ if postmsgIndex < 0 {
return ErrInvalidLengthContainers
}
if postmsgIndex > l {
return io.ErrUnexpectedEOF
}
- mapvalue = &google_protobuf1.Any{}
+ mapvalue = &types.Any{}
if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil {
return err
}
@@ -1806,9 +2368,13 @@ func (m *Container) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthContainers
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthContainers
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -1833,7 +2399,7 @@ func (m *Container_Runtime) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1861,7 +2427,7 @@ func (m *Container_Runtime) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1871,6 +2437,9 @@ func (m *Container_Runtime) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthContainers
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthContainers
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -1890,7 +2459,7 @@ func (m *Container_Runtime) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1899,11 +2468,14 @@ func (m *Container_Runtime) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthContainers
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthContainers
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Options == nil {
- m.Options = &google_protobuf1.Any{}
+ m.Options = &types.Any{}
}
if err := m.Options.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
@@ -1918,9 +2490,13 @@ func (m *Container_Runtime) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthContainers
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthContainers
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -1945,7 +2521,7 @@ func (m *GetContainerRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1973,7 +2549,7 @@ func (m *GetContainerRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1983,6 +2559,9 @@ func (m *GetContainerRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthContainers
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthContainers
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -1997,9 +2576,13 @@ func (m *GetContainerRequest) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthContainers
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthContainers
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -2024,7 +2607,7 @@ func (m *GetContainerResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2052,7 +2635,7 @@ func (m *GetContainerResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2061,6 +2644,9 @@ func (m *GetContainerResponse) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthContainers
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthContainers
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -2077,9 +2663,13 @@ func (m *GetContainerResponse) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthContainers
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthContainers
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -2104,7 +2694,7 @@ func (m *ListContainersRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2132,7 +2722,7 @@ func (m *ListContainersRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2142,6 +2732,9 @@ func (m *ListContainersRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthContainers
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthContainers
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -2156,9 +2749,13 @@ func (m *ListContainersRequest) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthContainers
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthContainers
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -2183,7 +2780,7 @@ func (m *ListContainersResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2211,7 +2808,7 @@ func (m *ListContainersResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2220,6 +2817,9 @@ func (m *ListContainersResponse) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthContainers
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthContainers
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -2237,9 +2837,13 @@ func (m *ListContainersResponse) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthContainers
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthContainers
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -2264,7 +2868,7 @@ func (m *CreateContainerRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2292,7 +2896,7 @@ func (m *CreateContainerRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2301,6 +2905,9 @@ func (m *CreateContainerRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthContainers
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthContainers
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -2317,9 +2924,13 @@ func (m *CreateContainerRequest) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthContainers
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthContainers
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -2344,7 +2955,7 @@ func (m *CreateContainerResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2372,7 +2983,7 @@ func (m *CreateContainerResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2381,6 +2992,9 @@ func (m *CreateContainerResponse) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthContainers
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthContainers
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -2397,9 +3011,13 @@ func (m *CreateContainerResponse) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthContainers
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthContainers
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -2424,7 +3042,7 @@ func (m *UpdateContainerRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2452,7 +3070,7 @@ func (m *UpdateContainerRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2461,6 +3079,9 @@ func (m *UpdateContainerRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthContainers
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthContainers
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -2482,7 +3103,7 @@ func (m *UpdateContainerRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2491,11 +3112,14 @@ func (m *UpdateContainerRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthContainers
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthContainers
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.UpdateMask == nil {
- m.UpdateMask = &google_protobuf3.FieldMask{}
+ m.UpdateMask = &types.FieldMask{}
}
if err := m.UpdateMask.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
@@ -2510,9 +3134,13 @@ func (m *UpdateContainerRequest) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthContainers
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthContainers
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -2537,7 +3165,7 @@ func (m *UpdateContainerResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2565,7 +3193,7 @@ func (m *UpdateContainerResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2574,6 +3202,9 @@ func (m *UpdateContainerResponse) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthContainers
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthContainers
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -2590,9 +3221,13 @@ func (m *UpdateContainerResponse) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthContainers
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthContainers
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -2617,7 +3252,7 @@ func (m *DeleteContainerRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2645,7 +3280,7 @@ func (m *DeleteContainerRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2655,6 +3290,9 @@ func (m *DeleteContainerRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthContainers
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthContainers
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -2669,9 +3307,13 @@ func (m *DeleteContainerRequest) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthContainers
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthContainers
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -2696,7 +3338,7 @@ func (m *ListContainerMessage) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2724,7 +3366,7 @@ func (m *ListContainerMessage) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2733,6 +3375,9 @@ func (m *ListContainerMessage) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthContainers
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthContainers
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -2752,9 +3397,13 @@ func (m *ListContainerMessage) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthContainers
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthContainers
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -2818,10 +3467,13 @@ func skipContainers(dAtA []byte) (n int, err error) {
break
}
}
- iNdEx += length
if length < 0 {
return 0, ErrInvalidLengthContainers
}
+ iNdEx += length
+ if iNdEx < 0 {
+ return 0, ErrInvalidLengthContainers
+ }
return iNdEx, nil
case 3:
for {
@@ -2850,6 +3502,9 @@ func skipContainers(dAtA []byte) (n int, err error) {
return 0, err
}
iNdEx = start + next
+ if iNdEx < 0 {
+ return 0, ErrInvalidLengthContainers
+ }
}
return iNdEx, nil
case 4:
@@ -2868,63 +3523,3 @@ var (
ErrInvalidLengthContainers = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowContainers = fmt.Errorf("proto: integer overflow")
)
-
-func init() {
- proto.RegisterFile("github.com/containerd/containerd/api/services/containers/v1/containers.proto", fileDescriptorContainers)
-}
-
-var fileDescriptorContainers = []byte{
- // 820 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0xcb, 0x6e, 0x13, 0x49,
- 0x14, 0x75, 0xdb, 0x4e, 0x3b, 0xbe, 0x1e, 0x69, 0x46, 0x35, 0x1e, 0x4f, 0x4f, 0x8f, 0x64,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, 0x7d, 0x7f, 0x4c, 0x45, 0x60, 0xbc, 0x95, 0xe4, 0xdc, 0x88, 0xf3, 0xb7, 0xbd, 0x2f, 0xc1,
- 0xda, 0x8b, 0xb3, 0x8b, 0x7c, 0xec, 0xf3, 0x45, 0x3e, 0xf6, 0xb6, 0x9f, 0x17, 0xce, 0xfa, 0x79,
- 0xe1, 0x53, 0x3f, 0x2f, 0x7c, 0xed, 0xe7, 0x85, 0x67, 0x3b, 0xd7, 0xf8, 0xb8, 0x5d, 0x0f, 0xa3,
- 0xa7, 0xb1, 0xba, 0xc8, 0x7a, 0xde, 0xfe, 0x1e, 0x00, 0x00, 0xff, 0xff, 0xd0, 0xae, 0xca, 0xcb,
- 0x2f, 0x0b, 0x00, 0x00,
-}
diff --git a/api/services/content/v1/content.pb.go b/api/services/content/v1/content.pb.go
index ec08c3b23..3e4580024 100644
--- a/api/services/content/v1/content.pb.go
+++ b/api/services/content/v1/content.pb.go
@@ -1,56 +1,23 @@
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: github.com/containerd/containerd/api/services/content/v1/content.proto
-/*
- Package content is a generated protocol buffer package.
-
- It is generated from these files:
- github.com/containerd/containerd/api/services/content/v1/content.proto
-
- It has these top-level messages:
- Info
- InfoRequest
- InfoResponse
- UpdateRequest
- UpdateResponse
- ListContentRequest
- ListContentResponse
- DeleteContentRequest
- ReadContentRequest
- ReadContentResponse
- Status
- StatusRequest
- StatusResponse
- ListStatusesRequest
- ListStatusesResponse
- WriteContentRequest
- WriteContentResponse
- AbortRequest
-*/
package content
-import proto "github.com/gogo/protobuf/proto"
-import fmt "fmt"
-import math "math"
-
-// skipping weak import gogoproto "github.com/gogo/protobuf/gogoproto"
-import google_protobuf1 "github.com/gogo/protobuf/types"
-import _ "github.com/gogo/protobuf/types"
-import google_protobuf3 "github.com/gogo/protobuf/types"
-
-import github_com_opencontainers_go_digest "github.com/opencontainers/go-digest"
-import time "time"
-
-import context "golang.org/x/net/context"
-import grpc "google.golang.org/grpc"
-
-import types "github.com/gogo/protobuf/types"
-
-import strings "strings"
-import reflect "reflect"
-import sortkeys "github.com/gogo/protobuf/sortkeys"
-
-import io "io"
+import (
+ context "context"
+ fmt "fmt"
+ 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"
+ github_com_opencontainers_go_digest "github.com/opencontainers/go-digest"
+ grpc "google.golang.org/grpc"
+ io "io"
+ math "math"
+ reflect "reflect"
+ strings "strings"
+ time "time"
+)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
@@ -93,6 +60,7 @@ var WriteAction_name = map[int32]string{
1: "WRITE",
2: "COMMIT",
}
+
var WriteAction_value = map[string]int32{
"STAT": 0,
"WRITE": 1,
@@ -102,7 +70,10 @@ var WriteAction_value = map[string]int32{
func (x WriteAction) String() string {
return proto.EnumName(WriteAction_name, int32(x))
}
-func (WriteAction) EnumDescriptor() ([]byte, []int) { return fileDescriptorContent, []int{0} }
+
+func (WriteAction) EnumDescriptor() ([]byte, []int) {
+ return fileDescriptor_468430ba3e400391, []int{0}
+}
type Info struct {
// Digest is the hash identity of the blob.
@@ -110,57 +81,212 @@ type Info struct {
// Size is the total number of bytes in the blob.
Size_ int64 `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"`
// CreatedAt provides the time at which the blob was committed.
- CreatedAt time.Time `protobuf:"bytes,3,opt,name=created_at,json=createdAt,stdtime" json:"created_at"`
+ CreatedAt time.Time `protobuf:"bytes,3,opt,name=created_at,json=createdAt,proto3,stdtime" json:"created_at"`
// UpdatedAt provides the time the info was last updated.
- UpdatedAt time.Time `protobuf:"bytes,4,opt,name=updated_at,json=updatedAt,stdtime" json:"updated_at"`
+ UpdatedAt time.Time `protobuf:"bytes,4,opt,name=updated_at,json=updatedAt,proto3,stdtime" json:"updated_at"`
// Labels are arbitrary data on snapshots.
//
// The combined size of a key/value pair cannot exceed 4096 bytes.
- Labels map[string]string `protobuf:"bytes,5,rep,name=labels" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
+ Labels map[string]string `protobuf:"bytes,5,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:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *Info) Reset() { *m = Info{} }
-func (*Info) ProtoMessage() {}
-func (*Info) Descriptor() ([]byte, []int) { return fileDescriptorContent, []int{0} }
+func (m *Info) Reset() { *m = Info{} }
+func (*Info) ProtoMessage() {}
+func (*Info) Descriptor() ([]byte, []int) {
+ return fileDescriptor_468430ba3e400391, []int{0}
+}
+func (m *Info) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *Info) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_Info.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *Info) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_Info.Merge(m, src)
+}
+func (m *Info) XXX_Size() int {
+ return m.Size()
+}
+func (m *Info) XXX_DiscardUnknown() {
+ xxx_messageInfo_Info.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Info proto.InternalMessageInfo
type InfoRequest struct {
- Digest github_com_opencontainers_go_digest.Digest `protobuf:"bytes,1,opt,name=digest,proto3,customtype=github.com/opencontainers/go-digest.Digest" json:"digest"`
+ Digest github_com_opencontainers_go_digest.Digest `protobuf:"bytes,1,opt,name=digest,proto3,customtype=github.com/opencontainers/go-digest.Digest" json:"digest"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *InfoRequest) Reset() { *m = InfoRequest{} }
-func (*InfoRequest) ProtoMessage() {}
-func (*InfoRequest) Descriptor() ([]byte, []int) { return fileDescriptorContent, []int{1} }
+func (m *InfoRequest) Reset() { *m = InfoRequest{} }
+func (*InfoRequest) ProtoMessage() {}
+func (*InfoRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_468430ba3e400391, []int{1}
+}
+func (m *InfoRequest) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *InfoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_InfoRequest.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *InfoRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_InfoRequest.Merge(m, src)
+}
+func (m *InfoRequest) XXX_Size() int {
+ return m.Size()
+}
+func (m *InfoRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_InfoRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_InfoRequest proto.InternalMessageInfo
type InfoResponse struct {
- Info Info `protobuf:"bytes,1,opt,name=info" json:"info"`
+ Info Info `protobuf:"bytes,1,opt,name=info,proto3" json:"info"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *InfoResponse) Reset() { *m = InfoResponse{} }
-func (*InfoResponse) ProtoMessage() {}
-func (*InfoResponse) Descriptor() ([]byte, []int) { return fileDescriptorContent, []int{2} }
+func (m *InfoResponse) Reset() { *m = InfoResponse{} }
+func (*InfoResponse) ProtoMessage() {}
+func (*InfoResponse) Descriptor() ([]byte, []int) {
+ return fileDescriptor_468430ba3e400391, []int{2}
+}
+func (m *InfoResponse) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *InfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_InfoResponse.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *InfoResponse) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_InfoResponse.Merge(m, src)
+}
+func (m *InfoResponse) XXX_Size() int {
+ return m.Size()
+}
+func (m *InfoResponse) XXX_DiscardUnknown() {
+ xxx_messageInfo_InfoResponse.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_InfoResponse proto.InternalMessageInfo
type UpdateRequest struct {
- Info Info `protobuf:"bytes,1,opt,name=info" json:"info"`
+ Info Info `protobuf:"bytes,1,opt,name=info,proto3" json:"info"`
// UpdateMask specifies which fields to perform the update on. If empty,
// the operation applies to all fields.
//
// In info, Digest, Size, and CreatedAt are immutable,
// other field may be updated using this mask.
// If no mask is provided, all mutable field are updated.
- UpdateMask *google_protobuf1.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask" json:"update_mask,omitempty"`
+ UpdateMask *types.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *UpdateRequest) Reset() { *m = UpdateRequest{} }
-func (*UpdateRequest) ProtoMessage() {}
-func (*UpdateRequest) Descriptor() ([]byte, []int) { return fileDescriptorContent, []int{3} }
+func (m *UpdateRequest) Reset() { *m = UpdateRequest{} }
+func (*UpdateRequest) ProtoMessage() {}
+func (*UpdateRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_468430ba3e400391, []int{3}
+}
+func (m *UpdateRequest) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *UpdateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_UpdateRequest.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *UpdateRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_UpdateRequest.Merge(m, src)
+}
+func (m *UpdateRequest) XXX_Size() int {
+ return m.Size()
+}
+func (m *UpdateRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_UpdateRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_UpdateRequest proto.InternalMessageInfo
type UpdateResponse struct {
- Info Info `protobuf:"bytes,1,opt,name=info" json:"info"`
+ Info Info `protobuf:"bytes,1,opt,name=info,proto3" json:"info"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *UpdateResponse) Reset() { *m = UpdateResponse{} }
-func (*UpdateResponse) ProtoMessage() {}
-func (*UpdateResponse) Descriptor() ([]byte, []int) { return fileDescriptorContent, []int{4} }
+func (m *UpdateResponse) Reset() { *m = UpdateResponse{} }
+func (*UpdateResponse) ProtoMessage() {}
+func (*UpdateResponse) Descriptor() ([]byte, []int) {
+ return fileDescriptor_468430ba3e400391, []int{4}
+}
+func (m *UpdateResponse) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *UpdateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_UpdateResponse.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *UpdateResponse) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_UpdateResponse.Merge(m, src)
+}
+func (m *UpdateResponse) XXX_Size() int {
+ return m.Size()
+}
+func (m *UpdateResponse) XXX_DiscardUnknown() {
+ xxx_messageInfo_UpdateResponse.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_UpdateResponse proto.InternalMessageInfo
type ListContentRequest struct {
// Filters contains one or more filters using the syntax defined in the
@@ -173,29 +299,122 @@ type ListContentRequest struct {
// filters[0] or filters[1] or ... or filters[n-1] or filters[n]
//
// If filters is zero-length or nil, all items will be returned.
- Filters []string `protobuf:"bytes,1,rep,name=filters" json:"filters,omitempty"`
+ Filters []string `protobuf:"bytes,1,rep,name=filters,proto3" json:"filters,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *ListContentRequest) Reset() { *m = ListContentRequest{} }
-func (*ListContentRequest) ProtoMessage() {}
-func (*ListContentRequest) Descriptor() ([]byte, []int) { return fileDescriptorContent, []int{5} }
+func (m *ListContentRequest) Reset() { *m = ListContentRequest{} }
+func (*ListContentRequest) ProtoMessage() {}
+func (*ListContentRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_468430ba3e400391, []int{5}
+}
+func (m *ListContentRequest) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *ListContentRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_ListContentRequest.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *ListContentRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_ListContentRequest.Merge(m, src)
+}
+func (m *ListContentRequest) XXX_Size() int {
+ return m.Size()
+}
+func (m *ListContentRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_ListContentRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_ListContentRequest proto.InternalMessageInfo
type ListContentResponse struct {
- Info []Info `protobuf:"bytes,1,rep,name=info" json:"info"`
+ Info []Info `protobuf:"bytes,1,rep,name=info,proto3" json:"info"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *ListContentResponse) Reset() { *m = ListContentResponse{} }
-func (*ListContentResponse) ProtoMessage() {}
-func (*ListContentResponse) Descriptor() ([]byte, []int) { return fileDescriptorContent, []int{6} }
+func (m *ListContentResponse) Reset() { *m = ListContentResponse{} }
+func (*ListContentResponse) ProtoMessage() {}
+func (*ListContentResponse) Descriptor() ([]byte, []int) {
+ return fileDescriptor_468430ba3e400391, []int{6}
+}
+func (m *ListContentResponse) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *ListContentResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_ListContentResponse.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *ListContentResponse) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_ListContentResponse.Merge(m, src)
+}
+func (m *ListContentResponse) XXX_Size() int {
+ return m.Size()
+}
+func (m *ListContentResponse) XXX_DiscardUnknown() {
+ xxx_messageInfo_ListContentResponse.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_ListContentResponse proto.InternalMessageInfo
type DeleteContentRequest struct {
// Digest specifies which content to delete.
- Digest github_com_opencontainers_go_digest.Digest `protobuf:"bytes,1,opt,name=digest,proto3,customtype=github.com/opencontainers/go-digest.Digest" json:"digest"`
+ Digest github_com_opencontainers_go_digest.Digest `protobuf:"bytes,1,opt,name=digest,proto3,customtype=github.com/opencontainers/go-digest.Digest" json:"digest"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *DeleteContentRequest) Reset() { *m = DeleteContentRequest{} }
-func (*DeleteContentRequest) ProtoMessage() {}
-func (*DeleteContentRequest) Descriptor() ([]byte, []int) { return fileDescriptorContent, []int{7} }
+func (m *DeleteContentRequest) Reset() { *m = DeleteContentRequest{} }
+func (*DeleteContentRequest) ProtoMessage() {}
+func (*DeleteContentRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_468430ba3e400391, []int{7}
+}
+func (m *DeleteContentRequest) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *DeleteContentRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_DeleteContentRequest.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *DeleteContentRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_DeleteContentRequest.Merge(m, src)
+}
+func (m *DeleteContentRequest) XXX_Size() int {
+ return m.Size()
+}
+func (m *DeleteContentRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_DeleteContentRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_DeleteContentRequest proto.InternalMessageInfo
// ReadContentRequest defines the fields that make up a request to read a portion of
// data from a stored object.
@@ -208,67 +427,284 @@ type ReadContentRequest struct {
Offset int64 `protobuf:"varint,2,opt,name=offset,proto3" json:"offset,omitempty"`
// size is the total size of the read. If zero, the entire blob will be
// returned by the service.
- Size_ int64 `protobuf:"varint,3,opt,name=size,proto3" json:"size,omitempty"`
+ Size_ int64 `protobuf:"varint,3,opt,name=size,proto3" json:"size,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *ReadContentRequest) Reset() { *m = ReadContentRequest{} }
-func (*ReadContentRequest) ProtoMessage() {}
-func (*ReadContentRequest) Descriptor() ([]byte, []int) { return fileDescriptorContent, []int{8} }
+func (m *ReadContentRequest) Reset() { *m = ReadContentRequest{} }
+func (*ReadContentRequest) ProtoMessage() {}
+func (*ReadContentRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_468430ba3e400391, []int{8}
+}
+func (m *ReadContentRequest) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *ReadContentRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_ReadContentRequest.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *ReadContentRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_ReadContentRequest.Merge(m, src)
+}
+func (m *ReadContentRequest) XXX_Size() int {
+ return m.Size()
+}
+func (m *ReadContentRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_ReadContentRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_ReadContentRequest proto.InternalMessageInfo
// ReadContentResponse carries byte data for a read request.
type ReadContentResponse struct {
- Offset int64 `protobuf:"varint,1,opt,name=offset,proto3" json:"offset,omitempty"`
- Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
+ Offset int64 `protobuf:"varint,1,opt,name=offset,proto3" json:"offset,omitempty"`
+ Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *ReadContentResponse) Reset() { *m = ReadContentResponse{} }
-func (*ReadContentResponse) ProtoMessage() {}
-func (*ReadContentResponse) Descriptor() ([]byte, []int) { return fileDescriptorContent, []int{9} }
+func (m *ReadContentResponse) Reset() { *m = ReadContentResponse{} }
+func (*ReadContentResponse) ProtoMessage() {}
+func (*ReadContentResponse) Descriptor() ([]byte, []int) {
+ return fileDescriptor_468430ba3e400391, []int{9}
+}
+func (m *ReadContentResponse) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *ReadContentResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_ReadContentResponse.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *ReadContentResponse) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_ReadContentResponse.Merge(m, src)
+}
+func (m *ReadContentResponse) XXX_Size() int {
+ return m.Size()
+}
+func (m *ReadContentResponse) XXX_DiscardUnknown() {
+ xxx_messageInfo_ReadContentResponse.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_ReadContentResponse proto.InternalMessageInfo
type Status struct {
- StartedAt time.Time `protobuf:"bytes,1,opt,name=started_at,json=startedAt,stdtime" json:"started_at"`
- UpdatedAt time.Time `protobuf:"bytes,2,opt,name=updated_at,json=updatedAt,stdtime" json:"updated_at"`
- Ref string `protobuf:"bytes,3,opt,name=ref,proto3" json:"ref,omitempty"`
- Offset int64 `protobuf:"varint,4,opt,name=offset,proto3" json:"offset,omitempty"`
- Total int64 `protobuf:"varint,5,opt,name=total,proto3" json:"total,omitempty"`
- Expected github_com_opencontainers_go_digest.Digest `protobuf:"bytes,6,opt,name=expected,proto3,customtype=github.com/opencontainers/go-digest.Digest" json:"expected"`
+ StartedAt time.Time `protobuf:"bytes,1,opt,name=started_at,json=startedAt,proto3,stdtime" json:"started_at"`
+ UpdatedAt time.Time `protobuf:"bytes,2,opt,name=updated_at,json=updatedAt,proto3,stdtime" json:"updated_at"`
+ Ref string `protobuf:"bytes,3,opt,name=ref,proto3" json:"ref,omitempty"`
+ Offset int64 `protobuf:"varint,4,opt,name=offset,proto3" json:"offset,omitempty"`
+ Total int64 `protobuf:"varint,5,opt,name=total,proto3" json:"total,omitempty"`
+ Expected github_com_opencontainers_go_digest.Digest `protobuf:"bytes,6,opt,name=expected,proto3,customtype=github.com/opencontainers/go-digest.Digest" json:"expected"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *Status) Reset() { *m = Status{} }
-func (*Status) ProtoMessage() {}
-func (*Status) Descriptor() ([]byte, []int) { return fileDescriptorContent, []int{10} }
+func (m *Status) Reset() { *m = Status{} }
+func (*Status) ProtoMessage() {}
+func (*Status) Descriptor() ([]byte, []int) {
+ return fileDescriptor_468430ba3e400391, []int{10}
+}
+func (m *Status) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *Status) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_Status.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *Status) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_Status.Merge(m, src)
+}
+func (m *Status) XXX_Size() int {
+ return m.Size()
+}
+func (m *Status) XXX_DiscardUnknown() {
+ xxx_messageInfo_Status.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Status proto.InternalMessageInfo
type StatusRequest struct {
- Ref string `protobuf:"bytes,1,opt,name=ref,proto3" json:"ref,omitempty"`
+ Ref string `protobuf:"bytes,1,opt,name=ref,proto3" json:"ref,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *StatusRequest) Reset() { *m = StatusRequest{} }
-func (*StatusRequest) ProtoMessage() {}
-func (*StatusRequest) Descriptor() ([]byte, []int) { return fileDescriptorContent, []int{11} }
+func (m *StatusRequest) Reset() { *m = StatusRequest{} }
+func (*StatusRequest) ProtoMessage() {}
+func (*StatusRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_468430ba3e400391, []int{11}
+}
+func (m *StatusRequest) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *StatusRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_StatusRequest.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *StatusRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_StatusRequest.Merge(m, src)
+}
+func (m *StatusRequest) XXX_Size() int {
+ return m.Size()
+}
+func (m *StatusRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_StatusRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_StatusRequest proto.InternalMessageInfo
type StatusResponse struct {
- Status *Status `protobuf:"bytes,1,opt,name=status" json:"status,omitempty"`
+ Status *Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *StatusResponse) Reset() { *m = StatusResponse{} }
-func (*StatusResponse) ProtoMessage() {}
-func (*StatusResponse) Descriptor() ([]byte, []int) { return fileDescriptorContent, []int{12} }
+func (m *StatusResponse) Reset() { *m = StatusResponse{} }
+func (*StatusResponse) ProtoMessage() {}
+func (*StatusResponse) Descriptor() ([]byte, []int) {
+ return fileDescriptor_468430ba3e400391, []int{12}
+}
+func (m *StatusResponse) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *StatusResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_StatusResponse.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *StatusResponse) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_StatusResponse.Merge(m, src)
+}
+func (m *StatusResponse) XXX_Size() int {
+ return m.Size()
+}
+func (m *StatusResponse) XXX_DiscardUnknown() {
+ xxx_messageInfo_StatusResponse.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_StatusResponse proto.InternalMessageInfo
type ListStatusesRequest struct {
- Filters []string `protobuf:"bytes,1,rep,name=filters" json:"filters,omitempty"`
+ Filters []string `protobuf:"bytes,1,rep,name=filters,proto3" json:"filters,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *ListStatusesRequest) Reset() { *m = ListStatusesRequest{} }
-func (*ListStatusesRequest) ProtoMessage() {}
-func (*ListStatusesRequest) Descriptor() ([]byte, []int) { return fileDescriptorContent, []int{13} }
+func (m *ListStatusesRequest) Reset() { *m = ListStatusesRequest{} }
+func (*ListStatusesRequest) ProtoMessage() {}
+func (*ListStatusesRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_468430ba3e400391, []int{13}
+}
+func (m *ListStatusesRequest) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *ListStatusesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_ListStatusesRequest.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *ListStatusesRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_ListStatusesRequest.Merge(m, src)
+}
+func (m *ListStatusesRequest) XXX_Size() int {
+ return m.Size()
+}
+func (m *ListStatusesRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_ListStatusesRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_ListStatusesRequest proto.InternalMessageInfo
type ListStatusesResponse struct {
- Statuses []Status `protobuf:"bytes,1,rep,name=statuses" json:"statuses"`
+ Statuses []Status `protobuf:"bytes,1,rep,name=statuses,proto3" json:"statuses"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *ListStatusesResponse) Reset() { *m = ListStatusesResponse{} }
-func (*ListStatusesResponse) ProtoMessage() {}
-func (*ListStatusesResponse) Descriptor() ([]byte, []int) { return fileDescriptorContent, []int{14} }
+func (m *ListStatusesResponse) Reset() { *m = ListStatusesResponse{} }
+func (*ListStatusesResponse) ProtoMessage() {}
+func (*ListStatusesResponse) Descriptor() ([]byte, []int) {
+ return fileDescriptor_468430ba3e400391, []int{14}
+}
+func (m *ListStatusesResponse) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *ListStatusesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_ListStatusesResponse.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *ListStatusesResponse) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_ListStatusesResponse.Merge(m, src)
+}
+func (m *ListStatusesResponse) XXX_Size() int {
+ return m.Size()
+}
+func (m *ListStatusesResponse) XXX_DiscardUnknown() {
+ xxx_messageInfo_ListStatusesResponse.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_ListStatusesResponse proto.InternalMessageInfo
// WriteContentRequest writes data to the request ref at offset.
type WriteContentRequest struct {
@@ -324,12 +760,43 @@ type WriteContentRequest struct {
// Labels are arbitrary data on snapshots.
//
// The combined size of a key/value pair cannot exceed 4096 bytes.
- Labels map[string]string `protobuf:"bytes,7,rep,name=labels" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
+ Labels map[string]string `protobuf:"bytes,7,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:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *WriteContentRequest) Reset() { *m = WriteContentRequest{} }
-func (*WriteContentRequest) ProtoMessage() {}
-func (*WriteContentRequest) Descriptor() ([]byte, []int) { return fileDescriptorContent, []int{15} }
+func (m *WriteContentRequest) Reset() { *m = WriteContentRequest{} }
+func (*WriteContentRequest) ProtoMessage() {}
+func (*WriteContentRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_468430ba3e400391, []int{15}
+}
+func (m *WriteContentRequest) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *WriteContentRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_WriteContentRequest.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *WriteContentRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_WriteContentRequest.Merge(m, src)
+}
+func (m *WriteContentRequest) XXX_Size() int {
+ return m.Size()
+}
+func (m *WriteContentRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_WriteContentRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_WriteContentRequest proto.InternalMessageInfo
// WriteContentResponse is returned on the culmination of a write call.
type WriteContentResponse struct {
@@ -340,12 +807,12 @@ type WriteContentResponse struct {
//
// This must be set for stat and commit write actions. All other write
// actions may omit this.
- StartedAt time.Time `protobuf:"bytes,2,opt,name=started_at,json=startedAt,stdtime" json:"started_at"`
+ StartedAt time.Time `protobuf:"bytes,2,opt,name=started_at,json=startedAt,proto3,stdtime" json:"started_at"`
// UpdatedAt provides the last time of a successful write.
//
// This must be set for stat and commit write actions. All other write
// actions may omit this.
- UpdatedAt time.Time `protobuf:"bytes,3,opt,name=updated_at,json=updatedAt,stdtime" json:"updated_at"`
+ UpdatedAt time.Time `protobuf:"bytes,3,opt,name=updated_at,json=updatedAt,proto3,stdtime" json:"updated_at"`
// Offset is the current committed size for the write.
Offset int64 `protobuf:"varint,4,opt,name=offset,proto3" json:"offset,omitempty"`
// Total provides the current, expected total size of the write.
@@ -358,23 +825,87 @@ type WriteContentResponse struct {
// Digest, if present, includes the digest up to the currently committed
// bytes. If action is commit, this field will be set. It is implementation
// defined if this is set for other actions.
- Digest github_com_opencontainers_go_digest.Digest `protobuf:"bytes,6,opt,name=digest,proto3,customtype=github.com/opencontainers/go-digest.Digest" json:"digest"`
+ Digest github_com_opencontainers_go_digest.Digest `protobuf:"bytes,6,opt,name=digest,proto3,customtype=github.com/opencontainers/go-digest.Digest" json:"digest"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *WriteContentResponse) Reset() { *m = WriteContentResponse{} }
-func (*WriteContentResponse) ProtoMessage() {}
-func (*WriteContentResponse) Descriptor() ([]byte, []int) { return fileDescriptorContent, []int{16} }
+func (m *WriteContentResponse) Reset() { *m = WriteContentResponse{} }
+func (*WriteContentResponse) ProtoMessage() {}
+func (*WriteContentResponse) Descriptor() ([]byte, []int) {
+ return fileDescriptor_468430ba3e400391, []int{16}
+}
+func (m *WriteContentResponse) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *WriteContentResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_WriteContentResponse.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *WriteContentResponse) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_WriteContentResponse.Merge(m, src)
+}
+func (m *WriteContentResponse) XXX_Size() int {
+ return m.Size()
+}
+func (m *WriteContentResponse) XXX_DiscardUnknown() {
+ xxx_messageInfo_WriteContentResponse.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_WriteContentResponse proto.InternalMessageInfo
type AbortRequest struct {
- Ref string `protobuf:"bytes,1,opt,name=ref,proto3" json:"ref,omitempty"`
+ Ref string `protobuf:"bytes,1,opt,name=ref,proto3" json:"ref,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *AbortRequest) Reset() { *m = AbortRequest{} }
-func (*AbortRequest) ProtoMessage() {}
-func (*AbortRequest) Descriptor() ([]byte, []int) { return fileDescriptorContent, []int{17} }
+func (m *AbortRequest) Reset() { *m = AbortRequest{} }
+func (*AbortRequest) ProtoMessage() {}
+func (*AbortRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_468430ba3e400391, []int{17}
+}
+func (m *AbortRequest) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *AbortRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_AbortRequest.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *AbortRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_AbortRequest.Merge(m, src)
+}
+func (m *AbortRequest) XXX_Size() int {
+ return m.Size()
+}
+func (m *AbortRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_AbortRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_AbortRequest proto.InternalMessageInfo
func init() {
+ proto.RegisterEnum("containerd.services.content.v1.WriteAction", WriteAction_name, WriteAction_value)
proto.RegisterType((*Info)(nil), "containerd.services.content.v1.Info")
+ proto.RegisterMapType((map[string]string)(nil), "containerd.services.content.v1.Info.LabelsEntry")
proto.RegisterType((*InfoRequest)(nil), "containerd.services.content.v1.InfoRequest")
proto.RegisterType((*InfoResponse)(nil), "containerd.services.content.v1.InfoResponse")
proto.RegisterType((*UpdateRequest)(nil), "containerd.services.content.v1.UpdateRequest")
@@ -390,9 +921,85 @@ func init() {
proto.RegisterType((*ListStatusesRequest)(nil), "containerd.services.content.v1.ListStatusesRequest")
proto.RegisterType((*ListStatusesResponse)(nil), "containerd.services.content.v1.ListStatusesResponse")
proto.RegisterType((*WriteContentRequest)(nil), "containerd.services.content.v1.WriteContentRequest")
+ proto.RegisterMapType((map[string]string)(nil), "containerd.services.content.v1.WriteContentRequest.LabelsEntry")
proto.RegisterType((*WriteContentResponse)(nil), "containerd.services.content.v1.WriteContentResponse")
proto.RegisterType((*AbortRequest)(nil), "containerd.services.content.v1.AbortRequest")
- proto.RegisterEnum("containerd.services.content.v1.WriteAction", WriteAction_name, WriteAction_value)
+}
+
+func init() {
+ proto.RegisterFile("github.com/containerd/containerd/api/services/content/v1/content.proto", fileDescriptor_468430ba3e400391)
+}
+
+var fileDescriptor_468430ba3e400391 = []byte{
+ // 1081 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x57, 0xcd, 0x6f, 0x1b, 0x45,
+ 0x14, 0xf7, 0x78, 0xed, 0x4d, 0xf2, 0x9c, 0x16, 0x33, 0x31, 0x95, 0xb5, 0x08, 0x67, 0xbb, 0x42,
+ 0xc8, 0x6a, 0xc9, 0x3a, 0x75, 0x7a, 0x00, 0x2a, 0x01, 0x8e, 0x9b, 0xaa, 0x41, 0x4d, 0x41, 0x5b,
+ 0x97, 0x40, 0x2f, 0x65, 0x6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36, 0x51, 0xdf, 0x7b, 0xfc, 0x7f, 0x03, 0x77, 0x85, 0xef, 0xec, 0x68, 0x57, 0x26, 0xdf, 0x19,
+ 0xd1, 0xae, 0x4c, 0x79, 0x0d, 0x6c, 0x23, 0x9e, 0x26, 0xb9, 0xe2, 0xb7, 0x66, 0xdc, 0x41, 0xb3,
+ 0xa6, 0x69, 0x6c, 0xe5, 0x1d, 0xc3, 0x7a, 0x78, 0x03, 0xe1, 0x99, 0x42, 0x3f, 0xb6, 0xe0, 0xb4,
+ 0xdb, 0xf3, 0x81, 0xa4, 0xea, 0x3e, 0x24, 0xfd, 0xd6, 0xd9, 0x59, 0x60, 0x24, 0x47, 0xeb, 0x9c,
+ 0x36, 0x60, 0xf3, 0x68, 0x1b, 0xe1, 0x03, 0x48, 0x8a, 0xd9, 0x80, 0x23, 0x3b, 0x27, 0x3c, 0x42,
+ 0x2e, 0xaa, 0x8e, 0xdd, 0x27, 0x67, 0xaf, 0x72, 0xb1, 0x3f, 0x5f, 0xe5, 0x62, 0xdf, 0x9d, 0xe7,
+ 0xd0, 0xd9, 0x79, 0x0e, 0xfd, 0x71, 0x9e, 0x43, 0x7f, 0x9f, 0xe7, 0xd0, 0x93, 0x8f, 0x17, 0xfd,
+ 0x1f, 0x7d, 0x47, 0x92, 0x5f, 0xc4, 0xaa, 0xaa, 0xd0, 0xb6, 0xf3, 0x6f, 0x00, 0x00, 0x00, 0xff,
+ 0xff, 0xc0, 0xc2, 0x35, 0xb1, 0x94, 0x0f, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
@@ -403,8 +1010,9 @@ var _ grpc.ClientConn
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4
-// Client API for Content service
-
+// ContentClient is the client API for Content service.
+//
+// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type ContentClient interface {
// Info returns information about a committed object.
//
@@ -425,7 +1033,7 @@ type ContentClient interface {
// set.
List(ctx context.Context, in *ListContentRequest, opts ...grpc.CallOption) (Content_ListClient, error)
// Delete will delete the referenced object.
- Delete(ctx context.Context, in *DeleteContentRequest, opts ...grpc.CallOption) (*google_protobuf3.Empty, error)
+ Delete(ctx context.Context, in *DeleteContentRequest, opts ...grpc.CallOption) (*types.Empty, error)
// Read allows one to read an object based on the offset into the content.
//
// The requested data may be returned in one or more messages.
@@ -458,7 +1066,7 @@ type ContentClient interface {
Write(ctx context.Context, opts ...grpc.CallOption) (Content_WriteClient, error)
// Abort cancels the ongoing write named in the request. Any resources
// associated with the write will be collected.
- Abort(ctx context.Context, in *AbortRequest, opts ...grpc.CallOption) (*google_protobuf3.Empty, error)
+ Abort(ctx context.Context, in *AbortRequest, opts ...grpc.CallOption) (*types.Empty, error)
}
type contentClient struct {
@@ -471,7 +1079,7 @@ func NewContentClient(cc *grpc.ClientConn) ContentClient {
func (c *contentClient) Info(ctx context.Context, in *InfoRequest, opts ...grpc.CallOption) (*InfoResponse, error) {
out := new(InfoResponse)
- err := grpc.Invoke(ctx, "/containerd.services.content.v1.Content/Info", in, out, c.cc, opts...)
+ err := c.cc.Invoke(ctx, "/containerd.services.content.v1.Content/Info", in, out, opts...)
if err != nil {
return nil, err
}
@@ -480,7 +1088,7 @@ func (c *contentClient) Info(ctx context.Context, in *InfoRequest, opts ...grpc.
func (c *contentClient) Update(ctx context.Context, in *UpdateRequest, opts ...grpc.CallOption) (*UpdateResponse, error) {
out := new(UpdateResponse)
- err := grpc.Invoke(ctx, "/containerd.services.content.v1.Content/Update", in, out, c.cc, opts...)
+ err := c.cc.Invoke(ctx, "/containerd.services.content.v1.Content/Update", in, out, opts...)
if err != nil {
return nil, err
}
@@ -488,7 +1096,7 @@ func (c *contentClient) Update(ctx context.Context, in *UpdateRequest, opts ...g
}
func (c *contentClient) List(ctx context.Context, in *ListContentRequest, opts ...grpc.CallOption) (Content_ListClient, error) {
- stream, err := grpc.NewClientStream(ctx, &_Content_serviceDesc.Streams[0], c.cc, "/containerd.services.content.v1.Content/List", opts...)
+ stream, err := c.cc.NewStream(ctx, &_Content_serviceDesc.Streams[0], "/containerd.services.content.v1.Content/List", opts...)
if err != nil {
return nil, err
}
@@ -519,9 +1127,9 @@ func (x *contentListClient) Recv() (*ListContentResponse, error) {
return m, nil
}
-func (c *contentClient) Delete(ctx context.Context, in *DeleteContentRequest, opts ...grpc.CallOption) (*google_protobuf3.Empty, error) {
- out := new(google_protobuf3.Empty)
- err := grpc.Invoke(ctx, "/containerd.services.content.v1.Content/Delete", in, out, c.cc, opts...)
+func (c *contentClient) Delete(ctx context.Context, in *DeleteContentRequest, opts ...grpc.CallOption) (*types.Empty, error) {
+ out := new(types.Empty)
+ err := c.cc.Invoke(ctx, "/containerd.services.content.v1.Content/Delete", in, out, opts...)
if err != nil {
return nil, err
}
@@ -529,7 +1137,7 @@ func (c *contentClient) Delete(ctx context.Context, in *DeleteContentRequest, op
}
func (c *contentClient) Read(ctx context.Context, in *ReadContentRequest, opts ...grpc.CallOption) (Content_ReadClient, error) {
- stream, err := grpc.NewClientStream(ctx, &_Content_serviceDesc.Streams[1], c.cc, "/containerd.services.content.v1.Content/Read", opts...)
+ stream, err := c.cc.NewStream(ctx, &_Content_serviceDesc.Streams[1], "/containerd.services.content.v1.Content/Read", opts...)
if err != nil {
return nil, err
}
@@ -562,7 +1170,7 @@ func (x *contentReadClient) Recv() (*ReadContentResponse, error) {
func (c *contentClient) Status(ctx context.Context, in *StatusRequest, opts ...grpc.CallOption) (*StatusResponse, error) {
out := new(StatusResponse)
- err := grpc.Invoke(ctx, "/containerd.services.content.v1.Content/Status", in, out, c.cc, opts...)
+ err := c.cc.Invoke(ctx, "/containerd.services.content.v1.Content/Status", in, out, opts...)
if err != nil {
return nil, err
}
@@ -571,7 +1179,7 @@ func (c *contentClient) Status(ctx context.Context, in *StatusRequest, opts ...g
func (c *contentClient) ListStatuses(ctx context.Context, in *ListStatusesRequest, opts ...grpc.CallOption) (*ListStatusesResponse, error) {
out := new(ListStatusesResponse)
- err := grpc.Invoke(ctx, "/containerd.services.content.v1.Content/ListStatuses", in, out, c.cc, opts...)
+ err := c.cc.Invoke(ctx, "/containerd.services.content.v1.Content/ListStatuses", in, out, opts...)
if err != nil {
return nil, err
}
@@ -579,7 +1187,7 @@ func (c *contentClient) ListStatuses(ctx context.Context, in *ListStatusesReques
}
func (c *contentClient) Write(ctx context.Context, opts ...grpc.CallOption) (Content_WriteClient, error) {
- stream, err := grpc.NewClientStream(ctx, &_Content_serviceDesc.Streams[2], c.cc, "/containerd.services.content.v1.Content/Write", opts...)
+ stream, err := c.cc.NewStream(ctx, &_Content_serviceDesc.Streams[2], "/containerd.services.content.v1.Content/Write", opts...)
if err != nil {
return nil, err
}
@@ -609,17 +1217,16 @@ func (x *contentWriteClient) Recv() (*WriteContentResponse, error) {
return m, nil
}
-func (c *contentClient) Abort(ctx context.Context, in *AbortRequest, opts ...grpc.CallOption) (*google_protobuf3.Empty, error) {
- out := new(google_protobuf3.Empty)
- err := grpc.Invoke(ctx, "/containerd.services.content.v1.Content/Abort", in, out, c.cc, opts...)
+func (c *contentClient) Abort(ctx context.Context, in *AbortRequest, opts ...grpc.CallOption) (*types.Empty, error) {
+ out := new(types.Empty)
+ err := c.cc.Invoke(ctx, "/containerd.services.content.v1.Content/Abort", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
-// Server API for Content service
-
+// ContentServer is the server API for Content service.
type ContentServer interface {
// Info returns information about a committed object.
//
@@ -640,7 +1247,7 @@ type ContentServer interface {
// set.
List(*ListContentRequest, Content_ListServer) error
// Delete will delete the referenced object.
- Delete(context.Context, *DeleteContentRequest) (*google_protobuf3.Empty, error)
+ Delete(context.Context, *DeleteContentRequest) (*types.Empty, error)
// Read allows one to read an object based on the offset into the content.
//
// The requested data may be returned in one or more messages.
@@ -673,7 +1280,7 @@ type ContentServer interface {
Write(Content_WriteServer) error
// Abort cancels the ongoing write named in the request. Any resources
// associated with the write will be collected.
- Abort(context.Context, *AbortRequest) (*google_protobuf3.Empty, error)
+ Abort(context.Context, *AbortRequest) (*types.Empty, error)
}
func RegisterContentServer(s *grpc.Server, srv ContentServer) {
@@ -934,16 +1541,16 @@ func (m *Info) MarshalTo(dAtA []byte) (int, error) {
}
dAtA[i] = 0x1a
i++
- i = encodeVarintContent(dAtA, i, uint64(types.SizeOfStdTime(m.CreatedAt)))
- n1, err := types.StdTimeMarshalTo(m.CreatedAt, dAtA[i:])
+ i = encodeVarintContent(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.CreatedAt)))
+ n1, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.CreatedAt, dAtA[i:])
if err != nil {
return 0, err
}
i += n1
dAtA[i] = 0x22
i++
- i = encodeVarintContent(dAtA, i, uint64(types.SizeOfStdTime(m.UpdatedAt)))
- n2, err := types.StdTimeMarshalTo(m.UpdatedAt, dAtA[i:])
+ i = encodeVarintContent(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.UpdatedAt)))
+ n2, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.UpdatedAt, dAtA[i:])
if err != nil {
return 0, err
}
@@ -965,6 +1572,9 @@ func (m *Info) MarshalTo(dAtA []byte) (int, error) {
i += copy(dAtA[i:], v)
}
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -989,6 +1599,9 @@ func (m *InfoRequest) MarshalTo(dAtA []byte) (int, error) {
i = encodeVarintContent(dAtA, i, uint64(len(m.Digest)))
i += copy(dAtA[i:], m.Digest)
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -1015,6 +1628,9 @@ func (m *InfoResponse) MarshalTo(dAtA []byte) (int, error) {
return 0, err
}
i += n3
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -1051,6 +1667,9 @@ func (m *UpdateRequest) MarshalTo(dAtA []byte) (int, error) {
}
i += n5
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -1077,6 +1696,9 @@ func (m *UpdateResponse) MarshalTo(dAtA []byte) (int, error) {
return 0, err
}
i += n6
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -1110,6 +1732,9 @@ func (m *ListContentRequest) MarshalTo(dAtA []byte) (int, error) {
i += copy(dAtA[i:], s)
}
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -1140,6 +1765,9 @@ func (m *ListContentResponse) MarshalTo(dAtA []byte) (int, error) {
i += n
}
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -1164,6 +1792,9 @@ func (m *DeleteContentRequest) MarshalTo(dAtA []byte) (int, error) {
i = encodeVarintContent(dAtA, i, uint64(len(m.Digest)))
i += copy(dAtA[i:], m.Digest)
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -1198,6 +1829,9 @@ func (m *ReadContentRequest) MarshalTo(dAtA []byte) (int, error) {
i++
i = encodeVarintContent(dAtA, i, uint64(m.Size_))
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -1227,6 +1861,9 @@ func (m *ReadContentResponse) MarshalTo(dAtA []byte) (int, error) {
i = encodeVarintContent(dAtA, i, uint64(len(m.Data)))
i += copy(dAtA[i:], m.Data)
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -1247,16 +1884,16 @@ func (m *Status) MarshalTo(dAtA []byte) (int, error) {
_ = l
dAtA[i] = 0xa
i++
- i = encodeVarintContent(dAtA, i, uint64(types.SizeOfStdTime(m.StartedAt)))
- n7, err := types.StdTimeMarshalTo(m.StartedAt, dAtA[i:])
+ i = encodeVarintContent(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.StartedAt)))
+ n7, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.StartedAt, dAtA[i:])
if err != nil {
return 0, err
}
i += n7
dAtA[i] = 0x12
i++
- i = encodeVarintContent(dAtA, i, uint64(types.SizeOfStdTime(m.UpdatedAt)))
- n8, err := types.StdTimeMarshalTo(m.UpdatedAt, dAtA[i:])
+ i = encodeVarintContent(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.UpdatedAt)))
+ n8, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.UpdatedAt, dAtA[i:])
if err != nil {
return 0, err
}
@@ -1283,6 +1920,9 @@ func (m *Status) MarshalTo(dAtA []byte) (int, error) {
i = encodeVarintContent(dAtA, i, uint64(len(m.Expected)))
i += copy(dAtA[i:], m.Expected)
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -1307,6 +1947,9 @@ func (m *StatusRequest) MarshalTo(dAtA []byte) (int, error) {
i = encodeVarintContent(dAtA, i, uint64(len(m.Ref)))
i += copy(dAtA[i:], m.Ref)
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -1335,6 +1978,9 @@ func (m *StatusResponse) MarshalTo(dAtA []byte) (int, error) {
}
i += n9
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -1368,6 +2014,9 @@ func (m *ListStatusesRequest) MarshalTo(dAtA []byte) (int, error) {
i += copy(dAtA[i:], s)
}
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -1398,6 +2047,9 @@ func (m *ListStatusesResponse) MarshalTo(dAtA []byte) (int, error) {
i += n
}
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -1466,6 +2118,9 @@ func (m *WriteContentRequest) MarshalTo(dAtA []byte) (int, error) {
i += copy(dAtA[i:], v)
}
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -1491,16 +2146,16 @@ func (m *WriteContentResponse) MarshalTo(dAtA []byte) (int, error) {
}
dAtA[i] = 0x12
i++
- i = encodeVarintContent(dAtA, i, uint64(types.SizeOfStdTime(m.StartedAt)))
- n10, err := types.StdTimeMarshalTo(m.StartedAt, dAtA[i:])
+ i = encodeVarintContent(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.StartedAt)))
+ n10, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.StartedAt, dAtA[i:])
if err != nil {
return 0, err
}
i += n10
dAtA[i] = 0x1a
i++
- i = encodeVarintContent(dAtA, i, uint64(types.SizeOfStdTime(m.UpdatedAt)))
- n11, err := types.StdTimeMarshalTo(m.UpdatedAt, dAtA[i:])
+ i = encodeVarintContent(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.UpdatedAt)))
+ n11, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.UpdatedAt, dAtA[i:])
if err != nil {
return 0, err
}
@@ -1521,6 +2176,9 @@ func (m *WriteContentResponse) MarshalTo(dAtA []byte) (int, error) {
i = encodeVarintContent(dAtA, i, uint64(len(m.Digest)))
i += copy(dAtA[i:], m.Digest)
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -1545,6 +2203,9 @@ func (m *AbortRequest) MarshalTo(dAtA []byte) (int, error) {
i = encodeVarintContent(dAtA, i, uint64(len(m.Ref)))
i += copy(dAtA[i:], m.Ref)
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -1558,6 +2219,9 @@ func encodeVarintContent(dAtA []byte, offset int, v uint64) int {
return offset + 1
}
func (m *Info) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.Digest)
@@ -1567,9 +2231,9 @@ func (m *Info) Size() (n int) {
if m.Size_ != 0 {
n += 1 + sovContent(uint64(m.Size_))
}
- l = types.SizeOfStdTime(m.CreatedAt)
+ l = github_com_gogo_protobuf_types.SizeOfStdTime(m.CreatedAt)
n += 1 + l + sovContent(uint64(l))
- l = types.SizeOfStdTime(m.UpdatedAt)
+ l = github_com_gogo_protobuf_types.SizeOfStdTime(m.UpdatedAt)
n += 1 + l + sovContent(uint64(l))
if len(m.Labels) > 0 {
for k, v := range m.Labels {
@@ -1579,28 +2243,46 @@ func (m *Info) Size() (n int) {
n += mapEntrySize + 1 + sovContent(uint64(mapEntrySize))
}
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *InfoRequest) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.Digest)
if l > 0 {
n += 1 + l + sovContent(uint64(l))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *InfoResponse) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = m.Info.Size()
n += 1 + l + sovContent(uint64(l))
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *UpdateRequest) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = m.Info.Size()
@@ -1609,18 +2291,30 @@ func (m *UpdateRequest) Size() (n int) {
l = m.UpdateMask.Size()
n += 1 + l + sovContent(uint64(l))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *UpdateResponse) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = m.Info.Size()
n += 1 + l + sovContent(uint64(l))
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *ListContentRequest) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
if len(m.Filters) > 0 {
@@ -1629,10 +2323,16 @@ func (m *ListContentRequest) Size() (n int) {
n += 1 + l + sovContent(uint64(l))
}
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *ListContentResponse) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
if len(m.Info) > 0 {
@@ -1641,20 +2341,32 @@ func (m *ListContentResponse) Size() (n int) {
n += 1 + l + sovContent(uint64(l))
}
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *DeleteContentRequest) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.Digest)
if l > 0 {
n += 1 + l + sovContent(uint64(l))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *ReadContentRequest) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.Digest)
@@ -1667,10 +2379,16 @@ func (m *ReadContentRequest) Size() (n int) {
if m.Size_ != 0 {
n += 1 + sovContent(uint64(m.Size_))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *ReadContentResponse) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
if m.Offset != 0 {
@@ -1680,15 +2398,21 @@ func (m *ReadContentResponse) Size() (n int) {
if l > 0 {
n += 1 + l + sovContent(uint64(l))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *Status) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
- l = types.SizeOfStdTime(m.StartedAt)
+ l = github_com_gogo_protobuf_types.SizeOfStdTime(m.StartedAt)
n += 1 + l + sovContent(uint64(l))
- l = types.SizeOfStdTime(m.UpdatedAt)
+ l = github_com_gogo_protobuf_types.SizeOfStdTime(m.UpdatedAt)
n += 1 + l + sovContent(uint64(l))
l = len(m.Ref)
if l > 0 {
@@ -1704,30 +2428,48 @@ func (m *Status) Size() (n int) {
if l > 0 {
n += 1 + l + sovContent(uint64(l))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *StatusRequest) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.Ref)
if l > 0 {
n += 1 + l + sovContent(uint64(l))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *StatusResponse) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
if m.Status != nil {
l = m.Status.Size()
n += 1 + l + sovContent(uint64(l))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *ListStatusesRequest) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
if len(m.Filters) > 0 {
@@ -1736,10 +2478,16 @@ func (m *ListStatusesRequest) Size() (n int) {
n += 1 + l + sovContent(uint64(l))
}
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *ListStatusesResponse) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
if len(m.Statuses) > 0 {
@@ -1748,10 +2496,16 @@ func (m *ListStatusesResponse) Size() (n int) {
n += 1 + l + sovContent(uint64(l))
}
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *WriteContentRequest) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
if m.Action != 0 {
@@ -1783,18 +2537,24 @@ func (m *WriteContentRequest) Size() (n int) {
n += mapEntrySize + 1 + sovContent(uint64(mapEntrySize))
}
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *WriteContentResponse) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
if m.Action != 0 {
n += 1 + sovContent(uint64(m.Action))
}
- l = types.SizeOfStdTime(m.StartedAt)
+ l = github_com_gogo_protobuf_types.SizeOfStdTime(m.StartedAt)
n += 1 + l + sovContent(uint64(l))
- l = types.SizeOfStdTime(m.UpdatedAt)
+ l = github_com_gogo_protobuf_types.SizeOfStdTime(m.UpdatedAt)
n += 1 + l + sovContent(uint64(l))
if m.Offset != 0 {
n += 1 + sovContent(uint64(m.Offset))
@@ -1806,16 +2566,25 @@ func (m *WriteContentResponse) Size() (n int) {
if l > 0 {
n += 1 + l + sovContent(uint64(l))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *AbortRequest) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.Ref)
if l > 0 {
n += 1 + l + sovContent(uint64(l))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
@@ -1840,7 +2609,7 @@ func (this *Info) String() string {
for k, _ := range this.Labels {
keysForLabels = append(keysForLabels, k)
}
- sortkeys.Strings(keysForLabels)
+ github_com_gogo_protobuf_sortkeys.Strings(keysForLabels)
mapStringForLabels := "map[string]string{"
for _, k := range keysForLabels {
mapStringForLabels += fmt.Sprintf("%v: %v,", k, this.Labels[k])
@@ -1849,9 +2618,10 @@ func (this *Info) String() string {
s := strings.Join([]string{`&Info{`,
`Digest:` + fmt.Sprintf("%v", this.Digest) + `,`,
`Size_:` + fmt.Sprintf("%v", this.Size_) + `,`,
- `CreatedAt:` + strings.Replace(strings.Replace(this.CreatedAt.String(), "Timestamp", "google_protobuf2.Timestamp", 1), `&`, ``, 1) + `,`,
- `UpdatedAt:` + strings.Replace(strings.Replace(this.UpdatedAt.String(), "Timestamp", "google_protobuf2.Timestamp", 1), `&`, ``, 1) + `,`,
+ `CreatedAt:` + strings.Replace(strings.Replace(this.CreatedAt.String(), "Timestamp", "types.Timestamp", 1), `&`, ``, 1) + `,`,
+ `UpdatedAt:` + strings.Replace(strings.Replace(this.UpdatedAt.String(), "Timestamp", "types.Timestamp", 1), `&`, ``, 1) + `,`,
`Labels:` + mapStringForLabels + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -1862,6 +2632,7 @@ func (this *InfoRequest) String() string {
}
s := strings.Join([]string{`&InfoRequest{`,
`Digest:` + fmt.Sprintf("%v", this.Digest) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -1872,6 +2643,7 @@ func (this *InfoResponse) String() string {
}
s := strings.Join([]string{`&InfoResponse{`,
`Info:` + strings.Replace(strings.Replace(this.Info.String(), "Info", "Info", 1), `&`, ``, 1) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -1882,7 +2654,8 @@ func (this *UpdateRequest) String() string {
}
s := strings.Join([]string{`&UpdateRequest{`,
`Info:` + strings.Replace(strings.Replace(this.Info.String(), "Info", "Info", 1), `&`, ``, 1) + `,`,
- `UpdateMask:` + strings.Replace(fmt.Sprintf("%v", this.UpdateMask), "FieldMask", "google_protobuf1.FieldMask", 1) + `,`,
+ `UpdateMask:` + strings.Replace(fmt.Sprintf("%v", this.UpdateMask), "FieldMask", "types.FieldMask", 1) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -1893,6 +2666,7 @@ func (this *UpdateResponse) String() string {
}
s := strings.Join([]string{`&UpdateResponse{`,
`Info:` + strings.Replace(strings.Replace(this.Info.String(), "Info", "Info", 1), `&`, ``, 1) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -1903,6 +2677,7 @@ func (this *ListContentRequest) String() string {
}
s := strings.Join([]string{`&ListContentRequest{`,
`Filters:` + fmt.Sprintf("%v", this.Filters) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -1913,6 +2688,7 @@ func (this *ListContentResponse) String() string {
}
s := strings.Join([]string{`&ListContentResponse{`,
`Info:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Info), "Info", "Info", 1), `&`, ``, 1) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -1923,6 +2699,7 @@ func (this *DeleteContentRequest) String() string {
}
s := strings.Join([]string{`&DeleteContentRequest{`,
`Digest:` + fmt.Sprintf("%v", this.Digest) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -1935,6 +2712,7 @@ func (this *ReadContentRequest) String() string {
`Digest:` + fmt.Sprintf("%v", this.Digest) + `,`,
`Offset:` + fmt.Sprintf("%v", this.Offset) + `,`,
`Size_:` + fmt.Sprintf("%v", this.Size_) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -1946,6 +2724,7 @@ func (this *ReadContentResponse) String() string {
s := strings.Join([]string{`&ReadContentResponse{`,
`Offset:` + fmt.Sprintf("%v", this.Offset) + `,`,
`Data:` + fmt.Sprintf("%v", this.Data) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -1955,12 +2734,13 @@ func (this *Status) String() string {
return "nil"
}
s := strings.Join([]string{`&Status{`,
- `StartedAt:` + strings.Replace(strings.Replace(this.StartedAt.String(), "Timestamp", "google_protobuf2.Timestamp", 1), `&`, ``, 1) + `,`,
- `UpdatedAt:` + strings.Replace(strings.Replace(this.UpdatedAt.String(), "Timestamp", "google_protobuf2.Timestamp", 1), `&`, ``, 1) + `,`,
+ `StartedAt:` + strings.Replace(strings.Replace(this.StartedAt.String(), "Timestamp", "types.Timestamp", 1), `&`, ``, 1) + `,`,
+ `UpdatedAt:` + strings.Replace(strings.Replace(this.UpdatedAt.String(), "Timestamp", "types.Timestamp", 1), `&`, ``, 1) + `,`,
`Ref:` + fmt.Sprintf("%v", this.Ref) + `,`,
`Offset:` + fmt.Sprintf("%v", this.Offset) + `,`,
`Total:` + fmt.Sprintf("%v", this.Total) + `,`,
`Expected:` + fmt.Sprintf("%v", this.Expected) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -1971,6 +2751,7 @@ func (this *StatusRequest) String() string {
}
s := strings.Join([]string{`&StatusRequest{`,
`Ref:` + fmt.Sprintf("%v", this.Ref) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -1981,6 +2762,7 @@ func (this *StatusResponse) String() string {
}
s := strings.Join([]string{`&StatusResponse{`,
`Status:` + strings.Replace(fmt.Sprintf("%v", this.Status), "Status", "Status", 1) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -1991,6 +2773,7 @@ func (this *ListStatusesRequest) String() string {
}
s := strings.Join([]string{`&ListStatusesRequest{`,
`Filters:` + fmt.Sprintf("%v", this.Filters) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -2001,6 +2784,7 @@ func (this *ListStatusesResponse) String() string {
}
s := strings.Join([]string{`&ListStatusesResponse{`,
`Statuses:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Statuses), "Status", "Status", 1), `&`, ``, 1) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -2013,7 +2797,7 @@ func (this *WriteContentRequest) String() string {
for k, _ := range this.Labels {
keysForLabels = append(keysForLabels, k)
}
- sortkeys.Strings(keysForLabels)
+ github_com_gogo_protobuf_sortkeys.Strings(keysForLabels)
mapStringForLabels := "map[string]string{"
for _, k := range keysForLabels {
mapStringForLabels += fmt.Sprintf("%v: %v,", k, this.Labels[k])
@@ -2027,6 +2811,7 @@ func (this *WriteContentRequest) String() string {
`Offset:` + fmt.Sprintf("%v", this.Offset) + `,`,
`Data:` + fmt.Sprintf("%v", this.Data) + `,`,
`Labels:` + mapStringForLabels + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -2037,11 +2822,12 @@ func (this *WriteContentResponse) String() string {
}
s := strings.Join([]string{`&WriteContentResponse{`,
`Action:` + fmt.Sprintf("%v", this.Action) + `,`,
- `StartedAt:` + strings.Replace(strings.Replace(this.StartedAt.String(), "Timestamp", "google_protobuf2.Timestamp", 1), `&`, ``, 1) + `,`,
- `UpdatedAt:` + strings.Replace(strings.Replace(this.UpdatedAt.String(), "Timestamp", "google_protobuf2.Timestamp", 1), `&`, ``, 1) + `,`,
+ `StartedAt:` + strings.Replace(strings.Replace(this.StartedAt.String(), "Timestamp", "types.Timestamp", 1), `&`, ``, 1) + `,`,
+ `UpdatedAt:` + strings.Replace(strings.Replace(this.UpdatedAt.String(), "Timestamp", "types.Timestamp", 1), `&`, ``, 1) + `,`,
`Offset:` + fmt.Sprintf("%v", this.Offset) + `,`,
`Total:` + fmt.Sprintf("%v", this.Total) + `,`,
`Digest:` + fmt.Sprintf("%v", this.Digest) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -2052,6 +2838,7 @@ func (this *AbortRequest) String() string {
}
s := strings.Join([]string{`&AbortRequest{`,
`Ref:` + fmt.Sprintf("%v", this.Ref) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -2079,7 +2866,7 @@ func (m *Info) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2107,7 +2894,7 @@ func (m *Info) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2117,6 +2904,9 @@ func (m *Info) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthContent
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthContent
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -2136,7 +2926,7 @@ func (m *Info) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- m.Size_ |= (int64(b) & 0x7F) << shift
+ m.Size_ |= int64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2155,7 +2945,7 @@ func (m *Info) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2164,10 +2954,13 @@ func (m *Info) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthContent
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthContent
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
- if err := types.StdTimeUnmarshal(&m.CreatedAt, dAtA[iNdEx:postIndex]); err != nil {
+ if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.CreatedAt, dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
@@ -2185,7 +2978,7 @@ func (m *Info) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2194,10 +2987,13 @@ func (m *Info) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthContent
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthContent
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
- if err := types.StdTimeUnmarshal(&m.UpdatedAt, dAtA[iNdEx:postIndex]); err != nil {
+ if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.UpdatedAt, dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
@@ -2215,7 +3011,7 @@ func (m *Info) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2224,6 +3020,9 @@ func (m *Info) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthContent
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthContent
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -2244,7 +3043,7 @@ func (m *Info) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2261,7 +3060,7 @@ func (m *Info) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ stringLenmapkey |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2271,6 +3070,9 @@ func (m *Info) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthContent
}
postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey < 0 {
+ return ErrInvalidLengthContent
+ }
if postStringIndexmapkey > l {
return io.ErrUnexpectedEOF
}
@@ -2287,7 +3089,7 @@ func (m *Info) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLenmapvalue |= (uint64(b) & 0x7F) << shift
+ stringLenmapvalue |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2297,6 +3099,9 @@ func (m *Info) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthContent
}
postStringIndexmapvalue := iNdEx + intStringLenmapvalue
+ if postStringIndexmapvalue < 0 {
+ return ErrInvalidLengthContent
+ }
if postStringIndexmapvalue > l {
return io.ErrUnexpectedEOF
}
@@ -2328,9 +3133,13 @@ func (m *Info) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthContent
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthContent
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -2355,7 +3164,7 @@ func (m *InfoRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2383,7 +3192,7 @@ func (m *InfoRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2393,6 +3202,9 @@ func (m *InfoRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthContent
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthContent
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -2407,9 +3219,13 @@ func (m *InfoRequest) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthContent
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthContent
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -2434,7 +3250,7 @@ func (m *InfoResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2462,7 +3278,7 @@ func (m *InfoResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2471,6 +3287,9 @@ func (m *InfoResponse) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthContent
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthContent
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -2487,9 +3306,13 @@ func (m *InfoResponse) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthContent
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthContent
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -2514,7 +3337,7 @@ func (m *UpdateRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2542,7 +3365,7 @@ func (m *UpdateRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2551,6 +3374,9 @@ func (m *UpdateRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthContent
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthContent
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -2572,7 +3398,7 @@ func (m *UpdateRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2581,11 +3407,14 @@ func (m *UpdateRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthContent
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthContent
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.UpdateMask == nil {
- m.UpdateMask = &google_protobuf1.FieldMask{}
+ m.UpdateMask = &types.FieldMask{}
}
if err := m.UpdateMask.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
@@ -2600,9 +3429,13 @@ func (m *UpdateRequest) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthContent
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthContent
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -2627,7 +3460,7 @@ func (m *UpdateResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2655,7 +3488,7 @@ func (m *UpdateResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2664,6 +3497,9 @@ func (m *UpdateResponse) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthContent
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthContent
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -2680,9 +3516,13 @@ func (m *UpdateResponse) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthContent
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthContent
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -2707,7 +3547,7 @@ func (m *ListContentRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2735,7 +3575,7 @@ func (m *ListContentRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2745,6 +3585,9 @@ func (m *ListContentRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthContent
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthContent
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -2759,9 +3602,13 @@ func (m *ListContentRequest) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthContent
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthContent
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -2786,7 +3633,7 @@ func (m *ListContentResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2814,7 +3661,7 @@ func (m *ListContentResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2823,6 +3670,9 @@ func (m *ListContentResponse) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthContent
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthContent
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -2840,9 +3690,13 @@ func (m *ListContentResponse) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthContent
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthContent
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -2867,7 +3721,7 @@ func (m *DeleteContentRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2895,7 +3749,7 @@ func (m *DeleteContentRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2905,6 +3759,9 @@ func (m *DeleteContentRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthContent
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthContent
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -2919,9 +3776,13 @@ func (m *DeleteContentRequest) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthContent
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthContent
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -2946,7 +3807,7 @@ func (m *ReadContentRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2974,7 +3835,7 @@ func (m *ReadContentRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2984,6 +3845,9 @@ func (m *ReadContentRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthContent
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthContent
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -3003,7 +3867,7 @@ func (m *ReadContentRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- m.Offset |= (int64(b) & 0x7F) << shift
+ m.Offset |= int64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3022,7 +3886,7 @@ func (m *ReadContentRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- m.Size_ |= (int64(b) & 0x7F) << shift
+ m.Size_ |= int64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3036,9 +3900,13 @@ func (m *ReadContentRequest) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthContent
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthContent
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -3063,7 +3931,7 @@ func (m *ReadContentResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3091,7 +3959,7 @@ func (m *ReadContentResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- m.Offset |= (int64(b) & 0x7F) << shift
+ m.Offset |= int64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3110,7 +3978,7 @@ func (m *ReadContentResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- byteLen |= (int(b) & 0x7F) << shift
+ byteLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3119,6 +3987,9 @@ func (m *ReadContentResponse) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthContent
}
postIndex := iNdEx + byteLen
+ if postIndex < 0 {
+ return ErrInvalidLengthContent
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -3136,9 +4007,13 @@ func (m *ReadContentResponse) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthContent
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthContent
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -3163,7 +4038,7 @@ func (m *Status) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3191,7 +4066,7 @@ func (m *Status) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3200,10 +4075,13 @@ func (m *Status) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthContent
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthContent
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
- if err := types.StdTimeUnmarshal(&m.StartedAt, dAtA[iNdEx:postIndex]); err != nil {
+ if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.StartedAt, dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
@@ -3221,7 +4099,7 @@ func (m *Status) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3230,10 +4108,13 @@ func (m *Status) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthContent
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthContent
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
- if err := types.StdTimeUnmarshal(&m.UpdatedAt, dAtA[iNdEx:postIndex]); err != nil {
+ if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.UpdatedAt, dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
@@ -3251,7 +4132,7 @@ func (m *Status) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3261,6 +4142,9 @@ func (m *Status) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthContent
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthContent
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -3280,7 +4164,7 @@ func (m *Status) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- m.Offset |= (int64(b) & 0x7F) << shift
+ m.Offset |= int64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3299,7 +4183,7 @@ func (m *Status) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- m.Total |= (int64(b) & 0x7F) << shift
+ m.Total |= int64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3318,7 +4202,7 @@ func (m *Status) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3328,6 +4212,9 @@ func (m *Status) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthContent
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthContent
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -3342,9 +4229,13 @@ func (m *Status) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthContent
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthContent
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -3369,7 +4260,7 @@ func (m *StatusRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3397,7 +4288,7 @@ func (m *StatusRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3407,6 +4298,9 @@ func (m *StatusRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthContent
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthContent
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -3421,9 +4315,13 @@ func (m *StatusRequest) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthContent
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthContent
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -3448,7 +4346,7 @@ func (m *StatusResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3476,7 +4374,7 @@ func (m *StatusResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3485,6 +4383,9 @@ func (m *StatusResponse) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthContent
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthContent
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -3504,9 +4405,13 @@ func (m *StatusResponse) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthContent
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthContent
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -3531,7 +4436,7 @@ func (m *ListStatusesRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3559,7 +4464,7 @@ func (m *ListStatusesRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3569,6 +4474,9 @@ func (m *ListStatusesRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthContent
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthContent
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -3583,9 +4491,13 @@ func (m *ListStatusesRequest) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthContent
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthContent
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -3610,7 +4522,7 @@ func (m *ListStatusesResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3638,7 +4550,7 @@ func (m *ListStatusesResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3647,6 +4559,9 @@ func (m *ListStatusesResponse) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthContent
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthContent
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -3664,9 +4579,13 @@ func (m *ListStatusesResponse) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthContent
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthContent
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -3691,7 +4610,7 @@ func (m *WriteContentRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3719,7 +4638,7 @@ func (m *WriteContentRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- m.Action |= (WriteAction(b) & 0x7F) << shift
+ m.Action |= WriteAction(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3738,7 +4657,7 @@ func (m *WriteContentRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3748,6 +4667,9 @@ func (m *WriteContentRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthContent
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthContent
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -3767,7 +4689,7 @@ func (m *WriteContentRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- m.Total |= (int64(b) & 0x7F) << shift
+ m.Total |= int64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3786,7 +4708,7 @@ func (m *WriteContentRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3796,6 +4718,9 @@ func (m *WriteContentRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthContent
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthContent
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -3815,7 +4740,7 @@ func (m *WriteContentRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- m.Offset |= (int64(b) & 0x7F) << shift
+ m.Offset |= int64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3834,7 +4759,7 @@ func (m *WriteContentRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- byteLen |= (int(b) & 0x7F) << shift
+ byteLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3843,6 +4768,9 @@ func (m *WriteContentRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthContent
}
postIndex := iNdEx + byteLen
+ if postIndex < 0 {
+ return ErrInvalidLengthContent
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -3865,7 +4793,7 @@ func (m *WriteContentRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3874,6 +4802,9 @@ func (m *WriteContentRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthContent
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthContent
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -3894,7 +4825,7 @@ func (m *WriteContentRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3911,7 +4842,7 @@ func (m *WriteContentRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ stringLenmapkey |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3921,6 +4852,9 @@ func (m *WriteContentRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthContent
}
postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey < 0 {
+ return ErrInvalidLengthContent
+ }
if postStringIndexmapkey > l {
return io.ErrUnexpectedEOF
}
@@ -3937,7 +4871,7 @@ func (m *WriteContentRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLenmapvalue |= (uint64(b) & 0x7F) << shift
+ stringLenmapvalue |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3947,6 +4881,9 @@ func (m *WriteContentRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthContent
}
postStringIndexmapvalue := iNdEx + intStringLenmapvalue
+ if postStringIndexmapvalue < 0 {
+ return ErrInvalidLengthContent
+ }
if postStringIndexmapvalue > l {
return io.ErrUnexpectedEOF
}
@@ -3978,9 +4915,13 @@ func (m *WriteContentRequest) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthContent
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthContent
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -4005,7 +4946,7 @@ func (m *WriteContentResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -4033,7 +4974,7 @@ func (m *WriteContentResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- m.Action |= (WriteAction(b) & 0x7F) << shift
+ m.Action |= WriteAction(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -4052,7 +4993,7 @@ func (m *WriteContentResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -4061,10 +5002,13 @@ func (m *WriteContentResponse) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthContent
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthContent
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
- if err := types.StdTimeUnmarshal(&m.StartedAt, dAtA[iNdEx:postIndex]); err != nil {
+ if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.StartedAt, dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
@@ -4082,7 +5026,7 @@ func (m *WriteContentResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -4091,10 +5035,13 @@ func (m *WriteContentResponse) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthContent
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthContent
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
- if err := types.StdTimeUnmarshal(&m.UpdatedAt, dAtA[iNdEx:postIndex]); err != nil {
+ if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.UpdatedAt, dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
@@ -4112,7 +5059,7 @@ func (m *WriteContentResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- m.Offset |= (int64(b) & 0x7F) << shift
+ m.Offset |= int64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -4131,7 +5078,7 @@ func (m *WriteContentResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- m.Total |= (int64(b) & 0x7F) << shift
+ m.Total |= int64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -4150,7 +5097,7 @@ func (m *WriteContentResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -4160,6 +5107,9 @@ func (m *WriteContentResponse) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthContent
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthContent
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -4174,9 +5124,13 @@ func (m *WriteContentResponse) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthContent
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthContent
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -4201,7 +5155,7 @@ func (m *AbortRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -4229,7 +5183,7 @@ func (m *AbortRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -4239,6 +5193,9 @@ func (m *AbortRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthContent
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthContent
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -4253,9 +5210,13 @@ func (m *AbortRequest) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthContent
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthContent
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -4319,10 +5280,13 @@ func skipContent(dAtA []byte) (n int, err error) {
break
}
}
- iNdEx += length
if length < 0 {
return 0, ErrInvalidLengthContent
}
+ iNdEx += length
+ if iNdEx < 0 {
+ return 0, ErrInvalidLengthContent
+ }
return iNdEx, nil
case 3:
for {
@@ -4351,6 +5315,9 @@ func skipContent(dAtA []byte) (n int, err error) {
return 0, err
}
iNdEx = start + next
+ if iNdEx < 0 {
+ return 0, ErrInvalidLengthContent
+ }
}
return iNdEx, nil
case 4:
@@ -4369,79 +5336,3 @@ var (
ErrInvalidLengthContent = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowContent = fmt.Errorf("proto: integer overflow")
)
-
-func init() {
- proto.RegisterFile("github.com/containerd/containerd/api/services/content/v1/content.proto", fileDescriptorContent)
-}
-
-var fileDescriptorContent = []byte{
- // 1081 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x57, 0xcd, 0x6f, 0x1b, 0x45,
- 0x14, 0xf7, 0x78, 0xed, 0x4d, 0xf2, 0x9c, 0x16, 0x33, 0x31, 0x95, 0xb5, 0x08, 0x67, 0xbb, 0x42,
- 0xc8, 0x6a, 0xc9, 0x3a, 0x75, 0x7a, 0x00, 0x2a, 0x01, 0x8e, 0x9b, 0xaa, 0x41, 0x4d, 0x41, 0x5b,
- 0x97, 0x40, 0x2f, 0x65, 0x6d, 0x8f, 0xcd, 0x2a, 0xb6, 0xd7, 0xdd, 0x19, 0x5b, 0x84, 0x13, 0x17,
- 0x24, 0x14, 0xf5, 0x80, 0xb8, 0xe7, 0x02, 0xfc, 0x15, 0x1c, 0x38, 0xe7, 0xc8, 0x11, 0x71, 0x68,
- 0x69, 0xfe, 0x07, 0xee, 0x68, 0x66, 0x67, 0xed, 0xf5, 0x47, 0x58, 0xdb, 0x31, 0x27, 0xbf, 0x99,
- 0x7d, 0xbf, 0xf7, 0xfd, 0x31, 0x86, 0x7b, 0x4d, 0x87, 0x7d, 0xdd, 0xab, 0x9a, 0x35, 0xb7, 0x5d,
- 0xa8, 0xb9, 0x1d, 0x66, 0x3b, 0x1d, 0xe2, 0xd5, 0xc3, 0xa4, 0xdd, 0x75, 0x0a, 0x94, 0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 0x27, 0x67, 0xaf, 0x72, 0xb1, 0x3f, 0x5f, 0xe5, 0x62, 0xdf, 0x9d, 0xe7,
- 0xd0, 0xd9, 0x79, 0x0e, 0xfd, 0x71, 0x9e, 0x43, 0x7f, 0x9f, 0xe7, 0xd0, 0x93, 0x8f, 0x17, 0xfd,
- 0x1f, 0x7d, 0x47, 0x92, 0x5f, 0xc4, 0xaa, 0xaa, 0xd0, 0xb6, 0xf3, 0x6f, 0x00, 0x00, 0x00, 0xff,
- 0xff, 0xc0, 0xc2, 0x35, 0xb1, 0x94, 0x0f, 0x00, 0x00,
-}
diff --git a/api/services/diff/v1/diff.pb.go b/api/services/diff/v1/diff.pb.go
index 6eba311ff..9ada87346 100644
--- a/api/services/diff/v1/diff.pb.go
+++ b/api/services/diff/v1/diff.pb.go
@@ -1,36 +1,20 @@
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: github.com/containerd/containerd/api/services/diff/v1/diff.proto
-/*
- Package diff is a generated protocol buffer package.
-
- It is generated from these files:
- github.com/containerd/containerd/api/services/diff/v1/diff.proto
-
- It has these top-level messages:
- ApplyRequest
- ApplyResponse
- DiffRequest
- DiffResponse
-*/
package diff
-import proto "github.com/gogo/protobuf/proto"
-import fmt "fmt"
-import math "math"
-
-// skipping weak import gogoproto "github.com/gogo/protobuf/gogoproto"
-import containerd_types "github.com/containerd/containerd/api/types"
-import containerd_types1 "github.com/containerd/containerd/api/types"
-
-import context "golang.org/x/net/context"
-import grpc "google.golang.org/grpc"
-
-import strings "strings"
-import reflect "reflect"
-import sortkeys "github.com/gogo/protobuf/sortkeys"
-
-import io "io"
+import (
+ context "context"
+ fmt "fmt"
+ types "github.com/containerd/containerd/api/types"
+ proto "github.com/gogo/protobuf/proto"
+ github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys"
+ grpc "google.golang.org/grpc"
+ io "io"
+ math "math"
+ reflect "reflect"
+ strings "strings"
+)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
@@ -45,32 +29,94 @@ const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
type ApplyRequest struct {
// Diff is the descriptor of the diff to be extracted
- Diff *containerd_types1.Descriptor `protobuf:"bytes,1,opt,name=diff" json:"diff,omitempty"`
- Mounts []*containerd_types.Mount `protobuf:"bytes,2,rep,name=mounts" json:"mounts,omitempty"`
+ Diff *types.Descriptor `protobuf:"bytes,1,opt,name=diff,proto3" json:"diff,omitempty"`
+ Mounts []*types.Mount `protobuf:"bytes,2,rep,name=mounts,proto3" json:"mounts,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *ApplyRequest) Reset() { *m = ApplyRequest{} }
-func (*ApplyRequest) ProtoMessage() {}
-func (*ApplyRequest) Descriptor() ([]byte, []int) { return fileDescriptorDiff, []int{0} }
+func (m *ApplyRequest) Reset() { *m = ApplyRequest{} }
+func (*ApplyRequest) ProtoMessage() {}
+func (*ApplyRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_3b36a99e6faaa935, []int{0}
+}
+func (m *ApplyRequest) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *ApplyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_ApplyRequest.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *ApplyRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_ApplyRequest.Merge(m, src)
+}
+func (m *ApplyRequest) XXX_Size() int {
+ return m.Size()
+}
+func (m *ApplyRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_ApplyRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_ApplyRequest proto.InternalMessageInfo
type ApplyResponse struct {
// Applied is the descriptor for the object which was applied.
// If the input was a compressed blob then the result will be
// the descriptor for the uncompressed blob.
- Applied *containerd_types1.Descriptor `protobuf:"bytes,1,opt,name=applied" json:"applied,omitempty"`
+ Applied *types.Descriptor `protobuf:"bytes,1,opt,name=applied,proto3" json:"applied,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *ApplyResponse) Reset() { *m = ApplyResponse{} }
-func (*ApplyResponse) ProtoMessage() {}
-func (*ApplyResponse) Descriptor() ([]byte, []int) { return fileDescriptorDiff, []int{1} }
+func (m *ApplyResponse) Reset() { *m = ApplyResponse{} }
+func (*ApplyResponse) ProtoMessage() {}
+func (*ApplyResponse) Descriptor() ([]byte, []int) {
+ return fileDescriptor_3b36a99e6faaa935, []int{1}
+}
+func (m *ApplyResponse) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *ApplyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_ApplyResponse.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *ApplyResponse) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_ApplyResponse.Merge(m, src)
+}
+func (m *ApplyResponse) XXX_Size() int {
+ return m.Size()
+}
+func (m *ApplyResponse) XXX_DiscardUnknown() {
+ xxx_messageInfo_ApplyResponse.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_ApplyResponse proto.InternalMessageInfo
type DiffRequest struct {
// Left are the mounts which represent the older copy
// in which is the base of the computed changes.
- Left []*containerd_types.Mount `protobuf:"bytes,1,rep,name=left" json:"left,omitempty"`
+ Left []*types.Mount `protobuf:"bytes,1,rep,name=left,proto3" json:"left,omitempty"`
// Right are the mounts which represents the newer copy
// in which changes from the left were made into.
- Right []*containerd_types.Mount `protobuf:"bytes,2,rep,name=right" json:"right,omitempty"`
+ Right []*types.Mount `protobuf:"bytes,2,rep,name=right,proto3" json:"right,omitempty"`
// MediaType is the media type descriptor for the created diff
// object
MediaType string `protobuf:"bytes,3,opt,name=media_type,json=mediaType,proto3" json:"media_type,omitempty"`
@@ -79,29 +125,129 @@ type DiffRequest struct {
Ref string `protobuf:"bytes,4,opt,name=ref,proto3" json:"ref,omitempty"`
// Labels are the labels to apply to the generated content
// on content store commit.
- Labels map[string]string `protobuf:"bytes,5,rep,name=labels" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
+ Labels map[string]string `protobuf:"bytes,5,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:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *DiffRequest) Reset() { *m = DiffRequest{} }
-func (*DiffRequest) ProtoMessage() {}
-func (*DiffRequest) Descriptor() ([]byte, []int) { return fileDescriptorDiff, []int{2} }
+func (m *DiffRequest) Reset() { *m = DiffRequest{} }
+func (*DiffRequest) ProtoMessage() {}
+func (*DiffRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_3b36a99e6faaa935, []int{2}
+}
+func (m *DiffRequest) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *DiffRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_DiffRequest.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *DiffRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_DiffRequest.Merge(m, src)
+}
+func (m *DiffRequest) XXX_Size() int {
+ return m.Size()
+}
+func (m *DiffRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_DiffRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_DiffRequest proto.InternalMessageInfo
type DiffResponse struct {
// Diff is the descriptor of the diff which can be applied
- Diff *containerd_types1.Descriptor `protobuf:"bytes,3,opt,name=diff" json:"diff,omitempty"`
+ Diff *types.Descriptor `protobuf:"bytes,3,opt,name=diff,proto3" json:"diff,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *DiffResponse) Reset() { *m = DiffResponse{} }
-func (*DiffResponse) ProtoMessage() {}
-func (*DiffResponse) Descriptor() ([]byte, []int) { return fileDescriptorDiff, []int{3} }
+func (m *DiffResponse) Reset() { *m = DiffResponse{} }
+func (*DiffResponse) ProtoMessage() {}
+func (*DiffResponse) Descriptor() ([]byte, []int) {
+ return fileDescriptor_3b36a99e6faaa935, []int{3}
+}
+func (m *DiffResponse) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *DiffResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_DiffResponse.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *DiffResponse) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_DiffResponse.Merge(m, src)
+}
+func (m *DiffResponse) XXX_Size() int {
+ return m.Size()
+}
+func (m *DiffResponse) XXX_DiscardUnknown() {
+ xxx_messageInfo_DiffResponse.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_DiffResponse proto.InternalMessageInfo
func init() {
proto.RegisterType((*ApplyRequest)(nil), "containerd.services.diff.v1.ApplyRequest")
proto.RegisterType((*ApplyResponse)(nil), "containerd.services.diff.v1.ApplyResponse")
proto.RegisterType((*DiffRequest)(nil), "containerd.services.diff.v1.DiffRequest")
+ proto.RegisterMapType((map[string]string)(nil), "containerd.services.diff.v1.DiffRequest.LabelsEntry")
proto.RegisterType((*DiffResponse)(nil), "containerd.services.diff.v1.DiffResponse")
}
+func init() {
+ proto.RegisterFile("github.com/containerd/containerd/api/services/diff/v1/diff.proto", fileDescriptor_3b36a99e6faaa935)
+}
+
+var fileDescriptor_3b36a99e6faaa935 = []byte{
+ // 457 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x53, 0x4f, 0x6f, 0xd3, 0x30,
+ 0x14, 0xaf, 0xfb, 0x0f, 0xf5, 0x75, 0x48, 0xc8, 0x9a, 0x44, 0x14, 0x20, 0xaa, 0x7a, 0xea, 0x40,
+ 0x38, 0xac, 0xa0, 0x09, 0xb6, 0xcb, 0x40, 0x43, 0x5c, 0xc6, 0x25, 0xda, 0x01, 0x81, 0x04, 0x4a,
+ 0x9b, 0x97, 0xce, 0x22, 0x8d, 0xbd, 0xd8, 0xad, 0x94, 0x1b, 0xdf, 0x85, 0x8f, 0xc2, 0x65, 0x47,
+ 0x8e, 0x1c, 0x69, 0x3f, 0x09, 0xb2, 0x93, 0x40, 0x24, 0xa4, 0x12, 0x76, 0xca, 0xcb, 0xf3, 0xef,
+ 0x9f, 0xfd, 0x6c, 0x38, 0x5d, 0x70, 0x7d, 0xb9, 0x9a, 0xb1, 0xb9, 0x58, 0xfa, 0x73, 0x91, 0xea,
+ 0x90, 0xa7, 0x98, 0x45, 0xf5, 0x32, 0x94, 0xdc, 0x57, 0x98, 0xad, 0xf9, 0x1c, 0x95, 0x1f, 0xf1,
+ 0x38, 0xf6, 0xd7, 0x87, 0xf6, 0xcb, 0x64, 0x26, 0xb4, 0xa0, 0xf7, 0xfe, 0x60, 0x59, 0x85, 0x63,
+ 0x76, 0x7d, 0x7d, 0xe8, 0xee, 0x2f, 0xc4, 0x42, 0x58, 0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, 0x08, 0x56, 0xdb, 0x06, 0x3b,
+ 0xb7, 0xb4, 0xd7, 0xa9, 0xce, 0xf2, 0xa0, 0xd4, 0x70, 0x5f, 0xc0, 0xb0, 0xd6, 0x36, 0x76, 0x9f,
+ 0x31, 0xb7, 0xa7, 0x35, 0x08, 0x4c, 0x49, 0xf7, 0xa1, 0xb7, 0x0e, 0x93, 0x15, 0x3a, 0x6d, 0xdb,
+ 0x2b, 0x7e, 0x8e, 0xdb, 0xcf, 0xc9, 0xf8, 0x14, 0xf6, 0x0a, 0xf5, 0xf2, 0xb4, 0xab, 0x09, 0x77,
+ 0x9a, 0x4e, 0x78, 0xfa, 0x8d, 0x40, 0xd7, 0x48, 0xd0, 0x8f, 0xd0, 0xb3, 0x93, 0xa3, 0x07, 0x3b,
+ 0x37, 0x53, 0xbf, 0x50, 0xee, 0xc3, 0x26, 0xd0, 0x32, 0xda, 0x87, 0xd2, 0x67, 0xd2, 0xf4, 0xac,
+ 0xdc, 0x83, 0x06, 0xc8, 0x42, 0xfc, 0xd5, 0xc5, 0xf5, 0xc6, 0x6b, 0xfd, 0xd8, 0x78, 0xad, 0x2f,
+ 0x5b, 0x8f, 0x5c, 0x6f, 0x3d, 0xf2, 0x7d, 0xeb, 0x91, 0x9f, 0x5b, 0x8f, 0xbc, 0x3f, 0xbe, 0xd1,
+ 0x6b, 0x3f, 0x31, 0xdf, 0x77, 0xad, 0x59, 0xdf, 0x3e, 0xa4, 0xa7, 0xbf, 0x02, 0x00, 0x00, 0xff,
+ 0xff, 0x61, 0xd1, 0x6e, 0x9e, 0x34, 0x04, 0x00, 0x00,
+}
+
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn
@@ -110,8 +256,9 @@ var _ grpc.ClientConn
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4
-// Client API for Diff service
-
+// DiffClient is the client API for Diff service.
+//
+// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type DiffClient interface {
// Apply applies the content associated with the provided digests onto
// the provided mounts. Archive content will be extracted and
@@ -132,7 +279,7 @@ func NewDiffClient(cc *grpc.ClientConn) DiffClient {
func (c *diffClient) Apply(ctx context.Context, in *ApplyRequest, opts ...grpc.CallOption) (*ApplyResponse, error) {
out := new(ApplyResponse)
- err := grpc.Invoke(ctx, "/containerd.services.diff.v1.Diff/Apply", in, out, c.cc, opts...)
+ err := c.cc.Invoke(ctx, "/containerd.services.diff.v1.Diff/Apply", in, out, opts...)
if err != nil {
return nil, err
}
@@ -141,15 +288,14 @@ func (c *diffClient) Apply(ctx context.Context, in *ApplyRequest, opts ...grpc.C
func (c *diffClient) Diff(ctx context.Context, in *DiffRequest, opts ...grpc.CallOption) (*DiffResponse, error) {
out := new(DiffResponse)
- err := grpc.Invoke(ctx, "/containerd.services.diff.v1.Diff/Diff", in, out, c.cc, opts...)
+ err := c.cc.Invoke(ctx, "/containerd.services.diff.v1.Diff/Diff", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
-// Server API for Diff service
-
+// DiffServer is the server API for Diff service.
type DiffServer interface {
// Apply applies the content associated with the provided digests onto
// the provided mounts. Archive content will be extracted and
@@ -254,6 +400,9 @@ func (m *ApplyRequest) MarshalTo(dAtA []byte) (int, error) {
i += n
}
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -282,6 +431,9 @@ func (m *ApplyResponse) MarshalTo(dAtA []byte) (int, error) {
}
i += n2
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -353,6 +505,9 @@ func (m *DiffRequest) MarshalTo(dAtA []byte) (int, error) {
i += copy(dAtA[i:], v)
}
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -381,6 +536,9 @@ func (m *DiffResponse) MarshalTo(dAtA []byte) (int, error) {
}
i += n3
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -394,6 +552,9 @@ func encodeVarintDiff(dAtA []byte, offset int, v uint64) int {
return offset + 1
}
func (m *ApplyRequest) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
if m.Diff != nil {
@@ -406,20 +567,32 @@ func (m *ApplyRequest) Size() (n int) {
n += 1 + l + sovDiff(uint64(l))
}
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *ApplyResponse) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
if m.Applied != nil {
l = m.Applied.Size()
n += 1 + l + sovDiff(uint64(l))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *DiffRequest) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
if len(m.Left) > 0 {
@@ -450,16 +623,25 @@ func (m *DiffRequest) Size() (n int) {
n += mapEntrySize + 1 + sovDiff(uint64(mapEntrySize))
}
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *DiffResponse) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
if m.Diff != nil {
l = m.Diff.Size()
n += 1 + l + sovDiff(uint64(l))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
@@ -481,8 +663,9 @@ func (this *ApplyRequest) String() string {
return "nil"
}
s := strings.Join([]string{`&ApplyRequest{`,
- `Diff:` + strings.Replace(fmt.Sprintf("%v", this.Diff), "Descriptor", "containerd_types1.Descriptor", 1) + `,`,
- `Mounts:` + strings.Replace(fmt.Sprintf("%v", this.Mounts), "Mount", "containerd_types.Mount", 1) + `,`,
+ `Diff:` + strings.Replace(fmt.Sprintf("%v", this.Diff), "Descriptor", "types.Descriptor", 1) + `,`,
+ `Mounts:` + strings.Replace(fmt.Sprintf("%v", this.Mounts), "Mount", "types.Mount", 1) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -492,7 +675,8 @@ func (this *ApplyResponse) String() string {
return "nil"
}
s := strings.Join([]string{`&ApplyResponse{`,
- `Applied:` + strings.Replace(fmt.Sprintf("%v", this.Applied), "Descriptor", "containerd_types1.Descriptor", 1) + `,`,
+ `Applied:` + strings.Replace(fmt.Sprintf("%v", this.Applied), "Descriptor", "types.Descriptor", 1) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -505,18 +689,19 @@ func (this *DiffRequest) String() string {
for k, _ := range this.Labels {
keysForLabels = append(keysForLabels, k)
}
- sortkeys.Strings(keysForLabels)
+ github_com_gogo_protobuf_sortkeys.Strings(keysForLabels)
mapStringForLabels := "map[string]string{"
for _, k := range keysForLabels {
mapStringForLabels += fmt.Sprintf("%v: %v,", k, this.Labels[k])
}
mapStringForLabels += "}"
s := strings.Join([]string{`&DiffRequest{`,
- `Left:` + strings.Replace(fmt.Sprintf("%v", this.Left), "Mount", "containerd_types.Mount", 1) + `,`,
- `Right:` + strings.Replace(fmt.Sprintf("%v", this.Right), "Mount", "containerd_types.Mount", 1) + `,`,
+ `Left:` + strings.Replace(fmt.Sprintf("%v", this.Left), "Mount", "types.Mount", 1) + `,`,
+ `Right:` + strings.Replace(fmt.Sprintf("%v", this.Right), "Mount", "types.Mount", 1) + `,`,
`MediaType:` + fmt.Sprintf("%v", this.MediaType) + `,`,
`Ref:` + fmt.Sprintf("%v", this.Ref) + `,`,
`Labels:` + mapStringForLabels + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -526,7 +711,8 @@ func (this *DiffResponse) String() string {
return "nil"
}
s := strings.Join([]string{`&DiffResponse{`,
- `Diff:` + strings.Replace(fmt.Sprintf("%v", this.Diff), "Descriptor", "containerd_types1.Descriptor", 1) + `,`,
+ `Diff:` + strings.Replace(fmt.Sprintf("%v", this.Diff), "Descriptor", "types.Descriptor", 1) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -554,7 +740,7 @@ func (m *ApplyRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -582,7 +768,7 @@ func (m *ApplyRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -591,11 +777,14 @@ func (m *ApplyRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthDiff
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthDiff
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Diff == nil {
- m.Diff = &containerd_types1.Descriptor{}
+ m.Diff = &types.Descriptor{}
}
if err := m.Diff.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
@@ -615,7 +804,7 @@ func (m *ApplyRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -624,10 +813,13 @@ func (m *ApplyRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthDiff
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthDiff
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
- m.Mounts = append(m.Mounts, &containerd_types.Mount{})
+ m.Mounts = append(m.Mounts, &types.Mount{})
if err := m.Mounts[len(m.Mounts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
@@ -641,9 +833,13 @@ func (m *ApplyRequest) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthDiff
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthDiff
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -668,7 +864,7 @@ func (m *ApplyResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -696,7 +892,7 @@ func (m *ApplyResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -705,11 +901,14 @@ func (m *ApplyResponse) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthDiff
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthDiff
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Applied == nil {
- m.Applied = &containerd_types1.Descriptor{}
+ m.Applied = &types.Descriptor{}
}
if err := m.Applied.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
@@ -724,9 +923,13 @@ func (m *ApplyResponse) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthDiff
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthDiff
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -751,7 +954,7 @@ func (m *DiffRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -779,7 +982,7 @@ func (m *DiffRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -788,10 +991,13 @@ func (m *DiffRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthDiff
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthDiff
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
- m.Left = append(m.Left, &containerd_types.Mount{})
+ m.Left = append(m.Left, &types.Mount{})
if err := m.Left[len(m.Left)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
@@ -810,7 +1016,7 @@ func (m *DiffRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -819,10 +1025,13 @@ func (m *DiffRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthDiff
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthDiff
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
- m.Right = append(m.Right, &containerd_types.Mount{})
+ m.Right = append(m.Right, &types.Mount{})
if err := m.Right[len(m.Right)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
@@ -841,7 +1050,7 @@ func (m *DiffRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -851,6 +1060,9 @@ func (m *DiffRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthDiff
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthDiff
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -870,7 +1082,7 @@ func (m *DiffRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -880,6 +1092,9 @@ func (m *DiffRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthDiff
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthDiff
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -899,7 +1114,7 @@ func (m *DiffRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -908,6 +1123,9 @@ func (m *DiffRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthDiff
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthDiff
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -928,7 +1146,7 @@ func (m *DiffRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -945,7 +1163,7 @@ func (m *DiffRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ stringLenmapkey |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -955,6 +1173,9 @@ func (m *DiffRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthDiff
}
postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey < 0 {
+ return ErrInvalidLengthDiff
+ }
if postStringIndexmapkey > l {
return io.ErrUnexpectedEOF
}
@@ -971,7 +1192,7 @@ func (m *DiffRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLenmapvalue |= (uint64(b) & 0x7F) << shift
+ stringLenmapvalue |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -981,6 +1202,9 @@ func (m *DiffRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthDiff
}
postStringIndexmapvalue := iNdEx + intStringLenmapvalue
+ if postStringIndexmapvalue < 0 {
+ return ErrInvalidLengthDiff
+ }
if postStringIndexmapvalue > l {
return io.ErrUnexpectedEOF
}
@@ -1012,9 +1236,13 @@ func (m *DiffRequest) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthDiff
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthDiff
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -1039,7 +1267,7 @@ func (m *DiffResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1067,7 +1295,7 @@ func (m *DiffResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1076,11 +1304,14 @@ func (m *DiffResponse) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthDiff
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthDiff
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Diff == nil {
- m.Diff = &containerd_types1.Descriptor{}
+ m.Diff = &types.Descriptor{}
}
if err := m.Diff.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
@@ -1095,9 +1326,13 @@ func (m *DiffResponse) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthDiff
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthDiff
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -1161,10 +1396,13 @@ func skipDiff(dAtA []byte) (n int, err error) {
break
}
}
- iNdEx += length
if length < 0 {
return 0, ErrInvalidLengthDiff
}
+ iNdEx += length
+ if iNdEx < 0 {
+ return 0, ErrInvalidLengthDiff
+ }
return iNdEx, nil
case 3:
for {
@@ -1193,6 +1431,9 @@ func skipDiff(dAtA []byte) (n int, err error) {
return 0, err
}
iNdEx = start + next
+ if iNdEx < 0 {
+ return 0, ErrInvalidLengthDiff
+ }
}
return iNdEx, nil
case 4:
@@ -1211,40 +1452,3 @@ var (
ErrInvalidLengthDiff = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowDiff = fmt.Errorf("proto: integer overflow")
)
-
-func init() {
- proto.RegisterFile("github.com/containerd/containerd/api/services/diff/v1/diff.proto", fileDescriptorDiff)
-}
-
-var fileDescriptorDiff = []byte{
- // 457 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x53, 0x4f, 0x6f, 0xd3, 0x30,
- 0x14, 0xaf, 0xfb, 0x0f, 0xf5, 0x75, 0x48, 0xc8, 0x9a, 0x44, 0x14, 0x20, 0xaa, 0x7a, 0xea, 0x40,
- 0x38, 0xac, 0xa0, 0x09, 0xb6, 0xcb, 0x40, 0x43, 0x5c, 0xc6, 0x25, 0xda, 0x01, 0x81, 0x04, 0x4a,
- 0x9b, 0x97, 0xce, 0x22, 0x8d, 0xbd, 0xd8, 0xad, 0x94, 0x1b, 0xdf, 0x85, 0x8f, 0xc2, 0x65, 0x47,
- 0x8e, 0x1c, 0x69, 0x3f, 0x09, 0xb2, 0x93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 0x3f, 0xbe, 0xd1,
- 0x6b, 0x3f, 0x31, 0xdf, 0x77, 0xad, 0x59, 0xdf, 0x3e, 0xa4, 0xa7, 0xbf, 0x02, 0x00, 0x00, 0xff,
- 0xff, 0x61, 0xd1, 0x6e, 0x9e, 0x34, 0x04, 0x00, 0x00,
-}
diff --git a/api/services/events/v1/events.pb.go b/api/services/events/v1/events.pb.go
index d6a7b38a8..dcaebbf2d 100644
--- a/api/services/events/v1/events.pb.go
+++ b/api/services/events/v1/events.pb.go
@@ -1,43 +1,22 @@
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: github.com/containerd/containerd/api/services/events/v1/events.proto
-/*
- Package events is a generated protocol buffer package.
-
- It is generated from these files:
- github.com/containerd/containerd/api/services/events/v1/events.proto
-
- It has these top-level messages:
- PublishRequest
- ForwardRequest
- SubscribeRequest
- Envelope
-*/
package events
-import proto "github.com/gogo/protobuf/proto"
-import fmt "fmt"
-import math "math"
-
-// skipping weak import containerd_plugin "github.com/containerd/containerd/protobuf/plugin"
-// skipping weak import gogoproto "github.com/gogo/protobuf/gogoproto"
-import google_protobuf1 "github.com/gogo/protobuf/types"
-import google_protobuf2 "github.com/gogo/protobuf/types"
-import _ "github.com/gogo/protobuf/types"
-
-import time "time"
-
-import typeurl "github.com/containerd/typeurl"
-
-import context "golang.org/x/net/context"
-import grpc "google.golang.org/grpc"
-
-import types "github.com/gogo/protobuf/types"
-
-import strings "strings"
-import reflect "reflect"
-
-import io "io"
+import (
+ context "context"
+ fmt "fmt"
+ github_com_containerd_typeurl "github.com/containerd/typeurl"
+ proto "github.com/gogo/protobuf/proto"
+ github_com_gogo_protobuf_types "github.com/gogo/protobuf/types"
+ types "github.com/gogo/protobuf/types"
+ grpc "google.golang.org/grpc"
+ io "io"
+ math "math"
+ reflect "reflect"
+ strings "strings"
+ time "time"
+)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
@@ -52,40 +31,164 @@ var _ = time.Kitchen
const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
type PublishRequest struct {
- Topic string `protobuf:"bytes,1,opt,name=topic,proto3" json:"topic,omitempty"`
- Event *google_protobuf1.Any `protobuf:"bytes,2,opt,name=event" json:"event,omitempty"`
+ Topic string `protobuf:"bytes,1,opt,name=topic,proto3" json:"topic,omitempty"`
+ Event *types.Any `protobuf:"bytes,2,opt,name=event,proto3" json:"event,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *PublishRequest) Reset() { *m = PublishRequest{} }
-func (*PublishRequest) ProtoMessage() {}
-func (*PublishRequest) Descriptor() ([]byte, []int) { return fileDescriptorEvents, []int{0} }
+func (m *PublishRequest) Reset() { *m = PublishRequest{} }
+func (*PublishRequest) ProtoMessage() {}
+func (*PublishRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_43fcd20dc1642376, []int{0}
+}
+func (m *PublishRequest) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *PublishRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_PublishRequest.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *PublishRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_PublishRequest.Merge(m, src)
+}
+func (m *PublishRequest) XXX_Size() int {
+ return m.Size()
+}
+func (m *PublishRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_PublishRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_PublishRequest proto.InternalMessageInfo
type ForwardRequest struct {
- Envelope *Envelope `protobuf:"bytes,1,opt,name=envelope" json:"envelope,omitempty"`
+ Envelope *Envelope `protobuf:"bytes,1,opt,name=envelope,proto3" json:"envelope,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *ForwardRequest) Reset() { *m = ForwardRequest{} }
-func (*ForwardRequest) ProtoMessage() {}
-func (*ForwardRequest) Descriptor() ([]byte, []int) { return fileDescriptorEvents, []int{1} }
+func (m *ForwardRequest) Reset() { *m = ForwardRequest{} }
+func (*ForwardRequest) ProtoMessage() {}
+func (*ForwardRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_43fcd20dc1642376, []int{1}
+}
+func (m *ForwardRequest) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *ForwardRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_ForwardRequest.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *ForwardRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_ForwardRequest.Merge(m, src)
+}
+func (m *ForwardRequest) XXX_Size() int {
+ return m.Size()
+}
+func (m *ForwardRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_ForwardRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_ForwardRequest proto.InternalMessageInfo
type SubscribeRequest struct {
- Filters []string `protobuf:"bytes,1,rep,name=filters" json:"filters,omitempty"`
+ Filters []string `protobuf:"bytes,1,rep,name=filters,proto3" json:"filters,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *SubscribeRequest) Reset() { *m = SubscribeRequest{} }
-func (*SubscribeRequest) ProtoMessage() {}
-func (*SubscribeRequest) Descriptor() ([]byte, []int) { return fileDescriptorEvents, []int{2} }
+func (m *SubscribeRequest) Reset() { *m = SubscribeRequest{} }
+func (*SubscribeRequest) ProtoMessage() {}
+func (*SubscribeRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_43fcd20dc1642376, []int{2}
+}
+func (m *SubscribeRequest) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *SubscribeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_SubscribeRequest.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *SubscribeRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_SubscribeRequest.Merge(m, src)
+}
+func (m *SubscribeRequest) XXX_Size() int {
+ return m.Size()
+}
+func (m *SubscribeRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_SubscribeRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_SubscribeRequest proto.InternalMessageInfo
type Envelope struct {
- Timestamp time.Time `protobuf:"bytes,1,opt,name=timestamp,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 *google_protobuf1.Any `protobuf:"bytes,4,opt,name=event" json:"event,omitempty"`
+ 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:"-"`
}
-func (m *Envelope) Reset() { *m = Envelope{} }
-func (*Envelope) ProtoMessage() {}
-func (*Envelope) Descriptor() ([]byte, []int) { return fileDescriptorEvents, []int{3} }
+func (m *Envelope) Reset() { *m = Envelope{} }
+func (*Envelope) ProtoMessage() {}
+func (*Envelope) Descriptor() ([]byte, []int) {
+ return fileDescriptor_43fcd20dc1642376, []int{3}
+}
+func (m *Envelope) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *Envelope) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_Envelope.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *Envelope) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_Envelope.Merge(m, src)
+}
+func (m *Envelope) XXX_Size() int {
+ return m.Size()
+}
+func (m *Envelope) XXX_DiscardUnknown() {
+ xxx_messageInfo_Envelope.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Envelope proto.InternalMessageInfo
func init() {
proto.RegisterType((*PublishRequest)(nil), "containerd.services.events.v1.PublishRequest")
@@ -94,6 +197,44 @@ func init() {
proto.RegisterType((*Envelope)(nil), "containerd.services.events.v1.Envelope")
}
+func init() {
+ proto.RegisterFile("github.com/containerd/containerd/api/services/events/v1/events.proto", fileDescriptor_43fcd20dc1642376)
+}
+
+var fileDescriptor_43fcd20dc1642376 = []byte{
+ // 466 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x93, 0xcd, 0x8e, 0xd3, 0x30,
+ 0x14, 0x85, 0xeb, 0xf9, 0x6d, 0x3c, 0xd2, 0x08, 0x45, 0x15, 0x2a, 0x01, 0xd2, 0xaa, 0x1b, 0x2a,
+ 0x04, 0x0e, 0x53, 0x76, 0x20, 0x21, 0x28, 0x94, 0xf5, 0x28, 0x80, 0x54, 0xb1, 0x4b, 0xd2, 0xdb,
+ 0xd4, 0x52, 0x62, 0x9b, 0xd8, 0x09, 0x9a, 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0x8f, 0xe0, 0x01, 0x1a, 0x4f, 0x97,
+ 0x17, 0x6e, 0xeb, 0xeb, 0x85, 0xdb, 0x3a, 0x5f, 0xb9, 0x68, 0xb9, 0x72, 0xd1, 0x97, 0x95, 0x8b,
+ 0x7e, 0xac, 0x5c, 0xf4, 0xf6, 0xc9, 0x7f, 0xfe, 0xd7, 0x8f, 0xab, 0x6a, 0xda, 0x9a, 0xa2, 0xf0,
+ 0xa0, 0x1c, 0xeb, 0xe1, 0xcf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xe6, 0xbf, 0x19, 0xa6, 0x24, 0x04,
+ 0x00, 0x00,
+}
+
// Field returns the value for the given fieldpath as a string, if defined.
// If the value is not defined, the second value will be false.
func (m *Envelope) Field(fieldpath []string) (string, bool) {
@@ -108,7 +249,7 @@ func (m *Envelope) Field(fieldpath []string) (string, bool) {
case "topic":
return string(m.Topic), len(m.Topic) > 0
case "event":
- decoded, err := typeurl.UnmarshalAny(m.Event)
+ decoded, err := github_com_containerd_typeurl.UnmarshalAny(m.Event)
if err != nil {
return "", false
}
@@ -130,20 +271,21 @@ var _ grpc.ClientConn
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4
-// Client API for Events service
-
+// EventsClient is the client API for Events service.
+//
+// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type EventsClient interface {
// Publish an event to a topic.
//
// The event will be packed into a timestamp envelope with the namespace
// introspected from the context. The envelope will then be dispatched.
- Publish(ctx context.Context, in *PublishRequest, opts ...grpc.CallOption) (*google_protobuf2.Empty, error)
+ Publish(ctx context.Context, in *PublishRequest, opts ...grpc.CallOption) (*types.Empty, error)
// Forward sends an event that has already been packaged into an envelope
// with a timestamp and namespace.
//
// This is useful if earlier timestamping is required or when forwarding on
// behalf of another component, namespace or publisher.
- Forward(ctx context.Context, in *ForwardRequest, opts ...grpc.CallOption) (*google_protobuf2.Empty, error)
+ Forward(ctx context.Context, in *ForwardRequest, opts ...grpc.CallOption) (*types.Empty, error)
// Subscribe to a stream of events, possibly returning only that match any
// of the provided filters.
//
@@ -162,18 +304,18 @@ func NewEventsClient(cc *grpc.ClientConn) EventsClient {
return &eventsClient{cc}
}
-func (c *eventsClient) Publish(ctx context.Context, in *PublishRequest, opts ...grpc.CallOption) (*google_protobuf2.Empty, error) {
- out := new(google_protobuf2.Empty)
- err := grpc.Invoke(ctx, "/containerd.services.events.v1.Events/Publish", in, out, c.cc, opts...)
+func (c *eventsClient) Publish(ctx context.Context, in *PublishRequest, opts ...grpc.CallOption) (*types.Empty, error) {
+ out := new(types.Empty)
+ err := c.cc.Invoke(ctx, "/containerd.services.events.v1.Events/Publish", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
-func (c *eventsClient) Forward(ctx context.Context, in *ForwardRequest, opts ...grpc.CallOption) (*google_protobuf2.Empty, error) {
- out := new(google_protobuf2.Empty)
- err := grpc.Invoke(ctx, "/containerd.services.events.v1.Events/Forward", in, out, c.cc, opts...)
+func (c *eventsClient) Forward(ctx context.Context, in *ForwardRequest, opts ...grpc.CallOption) (*types.Empty, error) {
+ out := new(types.Empty)
+ err := c.cc.Invoke(ctx, "/containerd.services.events.v1.Events/Forward", in, out, opts...)
if err != nil {
return nil, err
}
@@ -181,7 +323,7 @@ func (c *eventsClient) Forward(ctx context.Context, in *ForwardRequest, opts ...
}
func (c *eventsClient) Subscribe(ctx context.Context, in *SubscribeRequest, opts ...grpc.CallOption) (Events_SubscribeClient, error) {
- stream, err := grpc.NewClientStream(ctx, &_Events_serviceDesc.Streams[0], c.cc, "/containerd.services.events.v1.Events/Subscribe", opts...)
+ stream, err := c.cc.NewStream(ctx, &_Events_serviceDesc.Streams[0], "/containerd.services.events.v1.Events/Subscribe", opts...)
if err != nil {
return nil, err
}
@@ -212,20 +354,19 @@ func (x *eventsSubscribeClient) Recv() (*Envelope, error) {
return m, nil
}
-// Server API for Events service
-
+// EventsServer is the server API for Events service.
type EventsServer interface {
// Publish an event to a topic.
//
// The event will be packed into a timestamp envelope with the namespace
// introspected from the context. The envelope will then be dispatched.
- Publish(context.Context, *PublishRequest) (*google_protobuf2.Empty, error)
+ Publish(context.Context, *PublishRequest) (*types.Empty, error)
// Forward sends an event that has already been packaged into an envelope
// with a timestamp and namespace.
//
// This is useful if earlier timestamping is required or when forwarding on
// behalf of another component, namespace or publisher.
- Forward(context.Context, *ForwardRequest) (*google_protobuf2.Empty, error)
+ Forward(context.Context, *ForwardRequest) (*types.Empty, error)
// Subscribe to a stream of events, possibly returning only that match any
// of the provided filters.
//
@@ -351,6 +492,9 @@ func (m *PublishRequest) MarshalTo(dAtA []byte) (int, error) {
}
i += n1
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -379,6 +523,9 @@ func (m *ForwardRequest) MarshalTo(dAtA []byte) (int, error) {
}
i += n2
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -412,6 +559,9 @@ func (m *SubscribeRequest) MarshalTo(dAtA []byte) (int, error) {
i += copy(dAtA[i:], s)
}
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -432,8 +582,8 @@ func (m *Envelope) MarshalTo(dAtA []byte) (int, error) {
_ = l
dAtA[i] = 0xa
i++
- i = encodeVarintEvents(dAtA, i, uint64(types.SizeOfStdTime(m.Timestamp)))
- n3, err := types.StdTimeMarshalTo(m.Timestamp, dAtA[i:])
+ i = encodeVarintEvents(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp)))
+ n3, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Timestamp, dAtA[i:])
if err != nil {
return 0, err
}
@@ -460,6 +610,9 @@ func (m *Envelope) MarshalTo(dAtA []byte) (int, error) {
}
i += n4
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -473,6 +626,9 @@ func encodeVarintEvents(dAtA []byte, offset int, v uint64) int {
return offset + 1
}
func (m *PublishRequest) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.Topic)
@@ -483,20 +639,32 @@ func (m *PublishRequest) Size() (n int) {
l = m.Event.Size()
n += 1 + l + sovEvents(uint64(l))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *ForwardRequest) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
if m.Envelope != nil {
l = m.Envelope.Size()
n += 1 + l + sovEvents(uint64(l))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *SubscribeRequest) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
if len(m.Filters) > 0 {
@@ -505,13 +673,19 @@ func (m *SubscribeRequest) Size() (n int) {
n += 1 + l + sovEvents(uint64(l))
}
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *Envelope) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
- l = types.SizeOfStdTime(m.Timestamp)
+ l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp)
n += 1 + l + sovEvents(uint64(l))
l = len(m.Namespace)
if l > 0 {
@@ -525,6 +699,9 @@ func (m *Envelope) Size() (n int) {
l = m.Event.Size()
n += 1 + l + sovEvents(uint64(l))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
@@ -547,7 +724,8 @@ func (this *PublishRequest) String() string {
}
s := strings.Join([]string{`&PublishRequest{`,
`Topic:` + fmt.Sprintf("%v", this.Topic) + `,`,
- `Event:` + strings.Replace(fmt.Sprintf("%v", this.Event), "Any", "google_protobuf1.Any", 1) + `,`,
+ `Event:` + strings.Replace(fmt.Sprintf("%v", this.Event), "Any", "types.Any", 1) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -558,6 +736,7 @@ func (this *ForwardRequest) String() string {
}
s := strings.Join([]string{`&ForwardRequest{`,
`Envelope:` + strings.Replace(fmt.Sprintf("%v", this.Envelope), "Envelope", "Envelope", 1) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -568,6 +747,7 @@ func (this *SubscribeRequest) String() string {
}
s := strings.Join([]string{`&SubscribeRequest{`,
`Filters:` + fmt.Sprintf("%v", this.Filters) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -577,10 +757,11 @@ func (this *Envelope) String() string {
return "nil"
}
s := strings.Join([]string{`&Envelope{`,
- `Timestamp:` + strings.Replace(strings.Replace(this.Timestamp.String(), "Timestamp", "google_protobuf3.Timestamp", 1), `&`, ``, 1) + `,`,
+ `Timestamp:` + strings.Replace(strings.Replace(this.Timestamp.String(), "Timestamp", "types.Timestamp", 1), `&`, ``, 1) + `,`,
`Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`,
`Topic:` + fmt.Sprintf("%v", this.Topic) + `,`,
- `Event:` + strings.Replace(fmt.Sprintf("%v", this.Event), "Any", "google_protobuf1.Any", 1) + `,`,
+ `Event:` + strings.Replace(fmt.Sprintf("%v", this.Event), "Any", "types.Any", 1) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -608,7 +789,7 @@ func (m *PublishRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -636,7 +817,7 @@ func (m *PublishRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -646,6 +827,9 @@ func (m *PublishRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthEvents
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthEvents
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -665,7 +849,7 @@ func (m *PublishRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -674,11 +858,14 @@ func (m *PublishRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthEvents
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthEvents
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Event == nil {
- m.Event = &google_protobuf1.Any{}
+ m.Event = &types.Any{}
}
if err := m.Event.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
@@ -693,9 +880,13 @@ func (m *PublishRequest) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthEvents
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthEvents
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -720,7 +911,7 @@ func (m *ForwardRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -748,7 +939,7 @@ func (m *ForwardRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -757,6 +948,9 @@ func (m *ForwardRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthEvents
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthEvents
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -776,9 +970,13 @@ func (m *ForwardRequest) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthEvents
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthEvents
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -803,7 +1001,7 @@ func (m *SubscribeRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -831,7 +1029,7 @@ func (m *SubscribeRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -841,6 +1039,9 @@ func (m *SubscribeRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthEvents
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthEvents
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -855,9 +1056,13 @@ func (m *SubscribeRequest) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthEvents
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthEvents
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -882,7 +1087,7 @@ func (m *Envelope) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -910,7 +1115,7 @@ func (m *Envelope) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -919,10 +1124,13 @@ func (m *Envelope) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthEvents
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthEvents
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
- if err := types.StdTimeUnmarshal(&m.Timestamp, dAtA[iNdEx:postIndex]); err != nil {
+ if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Timestamp, dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
@@ -940,7 +1148,7 @@ func (m *Envelope) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -950,6 +1158,9 @@ func (m *Envelope) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthEvents
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthEvents
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -969,7 +1180,7 @@ func (m *Envelope) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -979,6 +1190,9 @@ func (m *Envelope) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthEvents
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthEvents
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -998,7 +1212,7 @@ func (m *Envelope) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1007,11 +1221,14 @@ func (m *Envelope) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthEvents
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthEvents
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Event == nil {
- m.Event = &google_protobuf1.Any{}
+ m.Event = &types.Any{}
}
if err := m.Event.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
@@ -1026,9 +1243,13 @@ func (m *Envelope) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthEvents
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthEvents
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -1092,10 +1313,13 @@ func skipEvents(dAtA []byte) (n int, err error) {
break
}
}
- iNdEx += length
if length < 0 {
return 0, ErrInvalidLengthEvents
}
+ iNdEx += length
+ if iNdEx < 0 {
+ return 0, ErrInvalidLengthEvents
+ }
return iNdEx, nil
case 3:
for {
@@ -1124,6 +1348,9 @@ func skipEvents(dAtA []byte) (n int, err error) {
return 0, err
}
iNdEx = start + next
+ if iNdEx < 0 {
+ return 0, ErrInvalidLengthEvents
+ }
}
return iNdEx, nil
case 4:
@@ -1142,41 +1369,3 @@ var (
ErrInvalidLengthEvents = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowEvents = fmt.Errorf("proto: integer overflow")
)
-
-func init() {
- proto.RegisterFile("github.com/containerd/containerd/api/services/events/v1/events.proto", fileDescriptorEvents)
-}
-
-var fileDescriptorEvents = []byte{
- // 466 bytes of a gzipped FileDescriptorProto
- 0x1f, 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7, 0x1d, 0x7c, 0x30, 0x29, 0x5d,
- 0xb0, 0x4f, 0xf1, 0xa1, 0x8e, 0xc6, 0xbe, 0xdf, 0xe0, 0xd6, 0xe5, 0x08, 0x9d, 0xeb, 0x57, 0xee,
- 0x99, 0xac, 0xdf, 0xc4, 0x9a, 0xa8, 0x83, 0x69, 0x24, 0x5e, 0x0e, 0xf0, 0x8f, 0xc4, 0x18, 0x5b,
- 0x9b, 0x4c, 0x6c, 0xaf, 0x81, 0xb9, 0x9d, 0x9e, 0xf3, 0xaf, 0x8f, 0xe0, 0x01, 0x1a, 0x4f, 0x97,
- 0x17, 0x6e, 0xeb, 0xeb, 0x85, 0xdb, 0x3a, 0x5f, 0xb9, 0x68, 0xb9, 0x72, 0xd1, 0x97, 0x95, 0x8b,
- 0x7e, 0xac, 0x5c, 0xf4, 0xf6, 0xc9, 0x7f, 0xfe, 0xd7, 0x8f, 0xab, 0x6a, 0xda, 0x9a, 0xa2, 0xf0,
- 0xa0, 0x1c, 0xeb, 0xe1, 0xcf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xe6, 0xbf, 0x19, 0xa6, 0x24, 0x04,
- 0x00, 0x00,
-}
diff --git a/api/services/images/v1/images.pb.go b/api/services/images/v1/images.pb.go
index 08090748e..eaa1d1750 100644
--- a/api/services/images/v1/images.pb.go
+++ b/api/services/images/v1/images.pb.go
@@ -1,48 +1,23 @@
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: github.com/containerd/containerd/api/services/images/v1/images.proto
-/*
- Package images is a generated protocol buffer package.
-
- It is generated from these files:
- github.com/containerd/containerd/api/services/images/v1/images.proto
-
- It has these top-level messages:
- Image
- GetImageRequest
- GetImageResponse
- CreateImageRequest
- CreateImageResponse
- UpdateImageRequest
- UpdateImageResponse
- ListImagesRequest
- ListImagesResponse
- DeleteImageRequest
-*/
package images
-import proto "github.com/gogo/protobuf/proto"
-import fmt "fmt"
-import math "math"
-
-// skipping weak import gogoproto "github.com/gogo/protobuf/gogoproto"
-import google_protobuf1 "github.com/gogo/protobuf/types"
-import google_protobuf2 "github.com/gogo/protobuf/types"
-import _ "github.com/gogo/protobuf/types"
-import containerd_types "github.com/containerd/containerd/api/types"
-
-import time "time"
-
-import context "golang.org/x/net/context"
-import grpc "google.golang.org/grpc"
-
-import types "github.com/gogo/protobuf/types"
-
-import strings "strings"
-import reflect "reflect"
-import sortkeys "github.com/gogo/protobuf/sortkeys"
-
-import io "io"
+import (
+ context "context"
+ fmt "fmt"
+ types "github.com/containerd/containerd/api/types"
+ 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"
+ types1 "github.com/gogo/protobuf/types"
+ grpc "google.golang.org/grpc"
+ io "io"
+ math "math"
+ reflect "reflect"
+ strings "strings"
+ time "time"
+)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
@@ -66,72 +41,289 @@ type Image struct {
//
// Labels may be updated using the field mask.
// The combined size of a key/value pair cannot exceed 4096 bytes.
- Labels map[string]string `protobuf:"bytes,2,rep,name=labels" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
+ Labels map[string]string `protobuf:"bytes,2,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
// Target describes the content entry point of the image.
- Target containerd_types.Descriptor `protobuf:"bytes,3,opt,name=target" json:"target"`
+ Target types.Descriptor `protobuf:"bytes,3,opt,name=target,proto3" json:"target"`
// CreatedAt is the time the image was first created.
- CreatedAt time.Time `protobuf:"bytes,7,opt,name=created_at,json=createdAt,stdtime" json:"created_at"`
+ CreatedAt time.Time `protobuf:"bytes,7,opt,name=created_at,json=createdAt,proto3,stdtime" json:"created_at"`
// UpdatedAt is the last time the image was mutated.
- UpdatedAt time.Time `protobuf:"bytes,8,opt,name=updated_at,json=updatedAt,stdtime" json:"updated_at"`
+ UpdatedAt time.Time `protobuf:"bytes,8,opt,name=updated_at,json=updatedAt,proto3,stdtime" json:"updated_at"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *Image) Reset() { *m = Image{} }
-func (*Image) ProtoMessage() {}
-func (*Image) Descriptor() ([]byte, []int) { return fileDescriptorImages, []int{0} }
+func (m *Image) Reset() { *m = Image{} }
+func (*Image) ProtoMessage() {}
+func (*Image) Descriptor() ([]byte, []int) {
+ return fileDescriptor_8666fa071128ae5f, []int{0}
+}
+func (m *Image) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *Image) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_Image.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *Image) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_Image.Merge(m, src)
+}
+func (m *Image) XXX_Size() int {
+ return m.Size()
+}
+func (m *Image) XXX_DiscardUnknown() {
+ xxx_messageInfo_Image.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Image proto.InternalMessageInfo
type GetImageRequest struct {
- Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *GetImageRequest) Reset() { *m = GetImageRequest{} }
-func (*GetImageRequest) ProtoMessage() {}
-func (*GetImageRequest) Descriptor() ([]byte, []int) { return fileDescriptorImages, []int{1} }
+func (m *GetImageRequest) Reset() { *m = GetImageRequest{} }
+func (*GetImageRequest) ProtoMessage() {}
+func (*GetImageRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_8666fa071128ae5f, []int{1}
+}
+func (m *GetImageRequest) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *GetImageRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_GetImageRequest.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *GetImageRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_GetImageRequest.Merge(m, src)
+}
+func (m *GetImageRequest) XXX_Size() int {
+ return m.Size()
+}
+func (m *GetImageRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_GetImageRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_GetImageRequest proto.InternalMessageInfo
type GetImageResponse struct {
- Image *Image `protobuf:"bytes,1,opt,name=image" json:"image,omitempty"`
+ Image *Image `protobuf:"bytes,1,opt,name=image,proto3" json:"image,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *GetImageResponse) Reset() { *m = GetImageResponse{} }
-func (*GetImageResponse) ProtoMessage() {}
-func (*GetImageResponse) Descriptor() ([]byte, []int) { return fileDescriptorImages, []int{2} }
+func (m *GetImageResponse) Reset() { *m = GetImageResponse{} }
+func (*GetImageResponse) ProtoMessage() {}
+func (*GetImageResponse) Descriptor() ([]byte, []int) {
+ return fileDescriptor_8666fa071128ae5f, []int{2}
+}
+func (m *GetImageResponse) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *GetImageResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_GetImageResponse.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *GetImageResponse) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_GetImageResponse.Merge(m, src)
+}
+func (m *GetImageResponse) XXX_Size() int {
+ return m.Size()
+}
+func (m *GetImageResponse) XXX_DiscardUnknown() {
+ xxx_messageInfo_GetImageResponse.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_GetImageResponse proto.InternalMessageInfo
type CreateImageRequest struct {
- Image Image `protobuf:"bytes,1,opt,name=image" json:"image"`
+ Image Image `protobuf:"bytes,1,opt,name=image,proto3" json:"image"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *CreateImageRequest) Reset() { *m = CreateImageRequest{} }
-func (*CreateImageRequest) ProtoMessage() {}
-func (*CreateImageRequest) Descriptor() ([]byte, []int) { return fileDescriptorImages, []int{3} }
+func (m *CreateImageRequest) Reset() { *m = CreateImageRequest{} }
+func (*CreateImageRequest) ProtoMessage() {}
+func (*CreateImageRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_8666fa071128ae5f, []int{3}
+}
+func (m *CreateImageRequest) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *CreateImageRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_CreateImageRequest.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *CreateImageRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_CreateImageRequest.Merge(m, src)
+}
+func (m *CreateImageRequest) XXX_Size() int {
+ return m.Size()
+}
+func (m *CreateImageRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_CreateImageRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_CreateImageRequest proto.InternalMessageInfo
type CreateImageResponse struct {
- Image Image `protobuf:"bytes,1,opt,name=image" json:"image"`
+ Image Image `protobuf:"bytes,1,opt,name=image,proto3" json:"image"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *CreateImageResponse) Reset() { *m = CreateImageResponse{} }
-func (*CreateImageResponse) ProtoMessage() {}
-func (*CreateImageResponse) Descriptor() ([]byte, []int) { return fileDescriptorImages, []int{4} }
+func (m *CreateImageResponse) Reset() { *m = CreateImageResponse{} }
+func (*CreateImageResponse) ProtoMessage() {}
+func (*CreateImageResponse) Descriptor() ([]byte, []int) {
+ return fileDescriptor_8666fa071128ae5f, []int{4}
+}
+func (m *CreateImageResponse) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *CreateImageResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_CreateImageResponse.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *CreateImageResponse) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_CreateImageResponse.Merge(m, src)
+}
+func (m *CreateImageResponse) XXX_Size() int {
+ return m.Size()
+}
+func (m *CreateImageResponse) XXX_DiscardUnknown() {
+ xxx_messageInfo_CreateImageResponse.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_CreateImageResponse proto.InternalMessageInfo
type UpdateImageRequest struct {
// Image provides a full or partial image for update.
//
// The name field must be set or an error will be returned.
- Image Image `protobuf:"bytes,1,opt,name=image" json:"image"`
+ Image Image `protobuf:"bytes,1,opt,name=image,proto3" json:"image"`
// UpdateMask specifies which fields to perform the update on. If empty,
// the operation applies to all fields.
- UpdateMask *google_protobuf2.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask" json:"update_mask,omitempty"`
+ UpdateMask *types1.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *UpdateImageRequest) Reset() { *m = UpdateImageRequest{} }
-func (*UpdateImageRequest) ProtoMessage() {}
-func (*UpdateImageRequest) Descriptor() ([]byte, []int) { return fileDescriptorImages, []int{5} }
+func (m *UpdateImageRequest) Reset() { *m = UpdateImageRequest{} }
+func (*UpdateImageRequest) ProtoMessage() {}
+func (*UpdateImageRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_8666fa071128ae5f, []int{5}
+}
+func (m *UpdateImageRequest) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *UpdateImageRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_UpdateImageRequest.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *UpdateImageRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_UpdateImageRequest.Merge(m, src)
+}
+func (m *UpdateImageRequest) XXX_Size() int {
+ return m.Size()
+}
+func (m *UpdateImageRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_UpdateImageRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_UpdateImageRequest proto.InternalMessageInfo
type UpdateImageResponse struct {
- Image Image `protobuf:"bytes,1,opt,name=image" json:"image"`
+ Image Image `protobuf:"bytes,1,opt,name=image,proto3" json:"image"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *UpdateImageResponse) Reset() { *m = UpdateImageResponse{} }
-func (*UpdateImageResponse) ProtoMessage() {}
-func (*UpdateImageResponse) Descriptor() ([]byte, []int) { return fileDescriptorImages, []int{6} }
+func (m *UpdateImageResponse) Reset() { *m = UpdateImageResponse{} }
+func (*UpdateImageResponse) ProtoMessage() {}
+func (*UpdateImageResponse) Descriptor() ([]byte, []int) {
+ return fileDescriptor_8666fa071128ae5f, []int{6}
+}
+func (m *UpdateImageResponse) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *UpdateImageResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_UpdateImageResponse.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *UpdateImageResponse) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_UpdateImageResponse.Merge(m, src)
+}
+func (m *UpdateImageResponse) XXX_Size() int {
+ return m.Size()
+}
+func (m *UpdateImageResponse) XXX_DiscardUnknown() {
+ xxx_messageInfo_UpdateImageResponse.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_UpdateImageResponse proto.InternalMessageInfo
type ListImagesRequest struct {
// Filters contains one or more filters using the syntax defined in the
@@ -144,20 +336,82 @@ type ListImagesRequest struct {
// filters[0] or filters[1] or ... or filters[n-1] or filters[n]
//
// If filters is zero-length or nil, all items will be returned.
- Filters []string `protobuf:"bytes,1,rep,name=filters" json:"filters,omitempty"`
+ Filters []string `protobuf:"bytes,1,rep,name=filters,proto3" json:"filters,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *ListImagesRequest) Reset() { *m = ListImagesRequest{} }
-func (*ListImagesRequest) ProtoMessage() {}
-func (*ListImagesRequest) Descriptor() ([]byte, []int) { return fileDescriptorImages, []int{7} }
+func (m *ListImagesRequest) Reset() { *m = ListImagesRequest{} }
+func (*ListImagesRequest) ProtoMessage() {}
+func (*ListImagesRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_8666fa071128ae5f, []int{7}
+}
+func (m *ListImagesRequest) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *ListImagesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_ListImagesRequest.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *ListImagesRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_ListImagesRequest.Merge(m, src)
+}
+func (m *ListImagesRequest) XXX_Size() int {
+ return m.Size()
+}
+func (m *ListImagesRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_ListImagesRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_ListImagesRequest proto.InternalMessageInfo
type ListImagesResponse struct {
- Images []Image `protobuf:"bytes,1,rep,name=images" json:"images"`
+ Images []Image `protobuf:"bytes,1,rep,name=images,proto3" json:"images"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *ListImagesResponse) Reset() { *m = ListImagesResponse{} }
-func (*ListImagesResponse) ProtoMessage() {}
-func (*ListImagesResponse) Descriptor() ([]byte, []int) { return fileDescriptorImages, []int{8} }
+func (m *ListImagesResponse) Reset() { *m = ListImagesResponse{} }
+func (*ListImagesResponse) ProtoMessage() {}
+func (*ListImagesResponse) Descriptor() ([]byte, []int) {
+ return fileDescriptor_8666fa071128ae5f, []int{8}
+}
+func (m *ListImagesResponse) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *ListImagesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_ListImagesResponse.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *ListImagesResponse) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_ListImagesResponse.Merge(m, src)
+}
+func (m *ListImagesResponse) XXX_Size() int {
+ return m.Size()
+}
+func (m *ListImagesResponse) XXX_DiscardUnknown() {
+ xxx_messageInfo_ListImagesResponse.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_ListImagesResponse proto.InternalMessageInfo
type DeleteImageRequest struct {
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
@@ -165,15 +419,47 @@ type DeleteImageRequest struct {
// synchronously before returning to the caller
//
// Default is false
- Sync bool `protobuf:"varint,2,opt,name=sync,proto3" json:"sync,omitempty"`
+ Sync bool `protobuf:"varint,2,opt,name=sync,proto3" json:"sync,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *DeleteImageRequest) Reset() { *m = DeleteImageRequest{} }
-func (*DeleteImageRequest) ProtoMessage() {}
-func (*DeleteImageRequest) Descriptor() ([]byte, []int) { return fileDescriptorImages, []int{9} }
+func (m *DeleteImageRequest) Reset() { *m = DeleteImageRequest{} }
+func (*DeleteImageRequest) ProtoMessage() {}
+func (*DeleteImageRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_8666fa071128ae5f, []int{9}
+}
+func (m *DeleteImageRequest) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *DeleteImageRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_DeleteImageRequest.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *DeleteImageRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_DeleteImageRequest.Merge(m, src)
+}
+func (m *DeleteImageRequest) XXX_Size() int {
+ return m.Size()
+}
+func (m *DeleteImageRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_DeleteImageRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_DeleteImageRequest proto.InternalMessageInfo
func init() {
proto.RegisterType((*Image)(nil), "containerd.services.images.v1.Image")
+ proto.RegisterMapType((map[string]string)(nil), "containerd.services.images.v1.Image.LabelsEntry")
proto.RegisterType((*GetImageRequest)(nil), "containerd.services.images.v1.GetImageRequest")
proto.RegisterType((*GetImageResponse)(nil), "containerd.services.images.v1.GetImageResponse")
proto.RegisterType((*CreateImageRequest)(nil), "containerd.services.images.v1.CreateImageRequest")
@@ -185,6 +471,56 @@ func init() {
proto.RegisterType((*DeleteImageRequest)(nil), "containerd.services.images.v1.DeleteImageRequest")
}
+func init() {
+ proto.RegisterFile("github.com/containerd/containerd/api/services/images/v1/images.proto", fileDescriptor_8666fa071128ae5f)
+}
+
+var fileDescriptor_8666fa071128ae5f = []byte{
+ // 659 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x55, 0xcd, 0x6e, 0xd3, 0x40,
+ 0x10, 0x8e, 0x93, 0xd4, 0x6d, 0x27, 0x07, 0xca, 0x52, 0x21, 0xcb, 0x40, 0x1a, 0x45, 0x20, 0xe5,
+ 0xc2, 0x9a, 0x86, 0x0b, 0xb4, 0x08, 0xd1, 0xb4, 0xa5, 0x20, 0x15, 0x0e, 0xe6, 0xaf, 0xe2, 0x52,
+ 0x6d, 0x92, 0x89, 0xb1, 0x62, 0xc7, 0xc6, 0xbb, 0x89, 0x94, 0x1b, 0x8f, 0x80, 0x04, 0x0f, 0xd5,
+ 0x23, 0x47, 0x4e, 0x40, 0x73, 0xe0, 0x39, 0x90, 0x77, 0x37, 0x34, 0x4d, 0x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, 0x16, 0x33, 0xdf, 0x4f, 0x8b, 0x99, 0x4f, 0x83, 0xa2, 0x71, 0x32, 0x28, 0x1a,
+ 0xdf, 0x06, 0x45, 0xe3, 0xd7, 0xa0, 0x68, 0xbc, 0x7f, 0x7c, 0xc1, 0xf7, 0x78, 0x5b, 0x59, 0x47,
+ 0x99, 0xba, 0x29, 0x63, 0xdd, 0xff, 0x13, 0x00, 0x00, 0xff, 0xff, 0x24, 0x4e, 0xca, 0x64, 0xda,
+ 0x07, 0x00, 0x00,
+}
+
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn
@@ -193,8 +529,9 @@ var _ grpc.ClientConn
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4
-// Client API for Images service
-
+// ImagesClient is the client API for Images service.
+//
+// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type ImagesClient interface {
// Get returns an image by name.
Get(ctx context.Context, in *GetImageRequest, opts ...grpc.CallOption) (*GetImageResponse, error)
@@ -208,7 +545,7 @@ type ImagesClient interface {
// image.
Update(ctx context.Context, in *UpdateImageRequest, opts ...grpc.CallOption) (*UpdateImageResponse, error)
// Delete deletes the image by name.
- Delete(ctx context.Context, in *DeleteImageRequest, opts ...grpc.CallOption) (*google_protobuf1.Empty, error)
+ Delete(ctx context.Context, in *DeleteImageRequest, opts ...grpc.CallOption) (*types1.Empty, error)
}
type imagesClient struct {
@@ -221,7 +558,7 @@ func NewImagesClient(cc *grpc.ClientConn) ImagesClient {
func (c *imagesClient) Get(ctx context.Context, in *GetImageRequest, opts ...grpc.CallOption) (*GetImageResponse, error) {
out := new(GetImageResponse)
- err := grpc.Invoke(ctx, "/containerd.services.images.v1.Images/Get", in, out, c.cc, opts...)
+ err := c.cc.Invoke(ctx, "/containerd.services.images.v1.Images/Get", in, out, opts...)
if err != nil {
return nil, err
}
@@ -230,7 +567,7 @@ func (c *imagesClient) Get(ctx context.Context, in *GetImageRequest, opts ...grp
func (c *imagesClient) List(ctx context.Context, in *ListImagesRequest, opts ...grpc.CallOption) (*ListImagesResponse, error) {
out := new(ListImagesResponse)
- err := grpc.Invoke(ctx, "/containerd.services.images.v1.Images/List", in, out, c.cc, opts...)
+ err := c.cc.Invoke(ctx, "/containerd.services.images.v1.Images/List", in, out, opts...)
if err != nil {
return nil, err
}
@@ -239,7 +576,7 @@ func (c *imagesClient) List(ctx context.Context, in *ListImagesRequest, opts ...
func (c *imagesClient) Create(ctx context.Context, in *CreateImageRequest, opts ...grpc.CallOption) (*CreateImageResponse, error) {
out := new(CreateImageResponse)
- err := grpc.Invoke(ctx, "/containerd.services.images.v1.Images/Create", in, out, c.cc, opts...)
+ err := c.cc.Invoke(ctx, "/containerd.services.images.v1.Images/Create", in, out, opts...)
if err != nil {
return nil, err
}
@@ -248,24 +585,23 @@ func (c *imagesClient) Create(ctx context.Context, in *CreateImageRequest, opts
func (c *imagesClient) Update(ctx context.Context, in *UpdateImageRequest, opts ...grpc.CallOption) (*UpdateImageResponse, error) {
out := new(UpdateImageResponse)
- err := grpc.Invoke(ctx, "/containerd.services.images.v1.Images/Update", in, out, c.cc, opts...)
+ err := c.cc.Invoke(ctx, "/containerd.services.images.v1.Images/Update", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
-func (c *imagesClient) Delete(ctx context.Context, in *DeleteImageRequest, opts ...grpc.CallOption) (*google_protobuf1.Empty, error) {
- out := new(google_protobuf1.Empty)
- err := grpc.Invoke(ctx, "/containerd.services.images.v1.Images/Delete", in, out, c.cc, opts...)
+func (c *imagesClient) Delete(ctx context.Context, in *DeleteImageRequest, opts ...grpc.CallOption) (*types1.Empty, error) {
+ out := new(types1.Empty)
+ err := c.cc.Invoke(ctx, "/containerd.services.images.v1.Images/Delete", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
-// Server API for Images service
-
+// ImagesServer is the server API for Images service.
type ImagesServer interface {
// Get returns an image by name.
Get(context.Context, *GetImageRequest) (*GetImageResponse, error)
@@ -279,7 +615,7 @@ type ImagesServer interface {
// image.
Update(context.Context, *UpdateImageRequest) (*UpdateImageResponse, error)
// Delete deletes the image by name.
- Delete(context.Context, *DeleteImageRequest) (*google_protobuf1.Empty, error)
+ Delete(context.Context, *DeleteImageRequest) (*types1.Empty, error)
}
func RegisterImagesServer(s *grpc.Server, srv ImagesServer) {
@@ -453,20 +789,23 @@ func (m *Image) MarshalTo(dAtA []byte) (int, error) {
i += n1
dAtA[i] = 0x3a
i++
- i = encodeVarintImages(dAtA, i, uint64(types.SizeOfStdTime(m.CreatedAt)))
- n2, err := types.StdTimeMarshalTo(m.CreatedAt, dAtA[i:])
+ i = encodeVarintImages(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.CreatedAt)))
+ n2, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.CreatedAt, dAtA[i:])
if err != nil {
return 0, err
}
i += n2
dAtA[i] = 0x42
i++
- i = encodeVarintImages(dAtA, i, uint64(types.SizeOfStdTime(m.UpdatedAt)))
- n3, err := types.StdTimeMarshalTo(m.UpdatedAt, dAtA[i:])
+ i = encodeVarintImages(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.UpdatedAt)))
+ n3, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.UpdatedAt, dAtA[i:])
if err != nil {
return 0, err
}
i += n3
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -491,6 +830,9 @@ func (m *GetImageRequest) MarshalTo(dAtA []byte) (int, error) {
i = encodeVarintImages(dAtA, i, uint64(len(m.Name)))
i += copy(dAtA[i:], m.Name)
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -519,6 +861,9 @@ func (m *GetImageResponse) MarshalTo(dAtA []byte) (int, error) {
}
i += n4
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -545,6 +890,9 @@ func (m *CreateImageRequest) MarshalTo(dAtA []byte) (int, error) {
return 0, err
}
i += n5
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -571,6 +919,9 @@ func (m *CreateImageResponse) MarshalTo(dAtA []byte) (int, error) {
return 0, err
}
i += n6
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -607,6 +958,9 @@ func (m *UpdateImageRequest) MarshalTo(dAtA []byte) (int, error) {
}
i += n8
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -633,6 +987,9 @@ func (m *UpdateImageResponse) MarshalTo(dAtA []byte) (int, error) {
return 0, err
}
i += n9
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -666,6 +1023,9 @@ func (m *ListImagesRequest) MarshalTo(dAtA []byte) (int, error) {
i += copy(dAtA[i:], s)
}
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -696,6 +1056,9 @@ func (m *ListImagesResponse) MarshalTo(dAtA []byte) (int, error) {
i += n
}
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -730,6 +1093,9 @@ func (m *DeleteImageRequest) MarshalTo(dAtA []byte) (int, error) {
}
i++
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -743,6 +1109,9 @@ func encodeVarintImages(dAtA []byte, offset int, v uint64) int {
return offset + 1
}
func (m *Image) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.Name)
@@ -759,50 +1128,80 @@ func (m *Image) Size() (n int) {
}
l = m.Target.Size()
n += 1 + l + sovImages(uint64(l))
- l = types.SizeOfStdTime(m.CreatedAt)
+ l = github_com_gogo_protobuf_types.SizeOfStdTime(m.CreatedAt)
n += 1 + l + sovImages(uint64(l))
- l = types.SizeOfStdTime(m.UpdatedAt)
+ l = github_com_gogo_protobuf_types.SizeOfStdTime(m.UpdatedAt)
n += 1 + l + sovImages(uint64(l))
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *GetImageRequest) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.Name)
if l > 0 {
n += 1 + l + sovImages(uint64(l))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *GetImageResponse) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
if m.Image != nil {
l = m.Image.Size()
n += 1 + l + sovImages(uint64(l))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *CreateImageRequest) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = m.Image.Size()
n += 1 + l + sovImages(uint64(l))
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *CreateImageResponse) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = m.Image.Size()
n += 1 + l + sovImages(uint64(l))
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *UpdateImageRequest) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = m.Image.Size()
@@ -811,18 +1210,30 @@ func (m *UpdateImageRequest) Size() (n int) {
l = m.UpdateMask.Size()
n += 1 + l + sovImages(uint64(l))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *UpdateImageResponse) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = m.Image.Size()
n += 1 + l + sovImages(uint64(l))
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *ListImagesRequest) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
if len(m.Filters) > 0 {
@@ -831,10 +1242,16 @@ func (m *ListImagesRequest) Size() (n int) {
n += 1 + l + sovImages(uint64(l))
}
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *ListImagesResponse) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
if len(m.Images) > 0 {
@@ -843,10 +1260,16 @@ func (m *ListImagesResponse) Size() (n int) {
n += 1 + l + sovImages(uint64(l))
}
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *DeleteImageRequest) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.Name)
@@ -856,6 +1279,9 @@ func (m *DeleteImageRequest) Size() (n int) {
if m.Sync {
n += 2
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
@@ -880,7 +1306,7 @@ func (this *Image) String() string {
for k, _ := range this.Labels {
keysForLabels = append(keysForLabels, k)
}
- sortkeys.Strings(keysForLabels)
+ github_com_gogo_protobuf_sortkeys.Strings(keysForLabels)
mapStringForLabels := "map[string]string{"
for _, k := range keysForLabels {
mapStringForLabels += fmt.Sprintf("%v: %v,", k, this.Labels[k])
@@ -889,9 +1315,10 @@ func (this *Image) String() string {
s := strings.Join([]string{`&Image{`,
`Name:` + fmt.Sprintf("%v", this.Name) + `,`,
`Labels:` + mapStringForLabels + `,`,
- `Target:` + strings.Replace(strings.Replace(this.Target.String(), "Descriptor", "containerd_types.Descriptor", 1), `&`, ``, 1) + `,`,
- `CreatedAt:` + strings.Replace(strings.Replace(this.CreatedAt.String(), "Timestamp", "google_protobuf3.Timestamp", 1), `&`, ``, 1) + `,`,
- `UpdatedAt:` + strings.Replace(strings.Replace(this.UpdatedAt.String(), "Timestamp", "google_protobuf3.Timestamp", 1), `&`, ``, 1) + `,`,
+ `Target:` + strings.Replace(strings.Replace(this.Target.String(), "Descriptor", "types.Descriptor", 1), `&`, ``, 1) + `,`,
+ `CreatedAt:` + strings.Replace(strings.Replace(this.CreatedAt.String(), "Timestamp", "types1.Timestamp", 1), `&`, ``, 1) + `,`,
+ `UpdatedAt:` + strings.Replace(strings.Replace(this.UpdatedAt.String(), "Timestamp", "types1.Timestamp", 1), `&`, ``, 1) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -902,6 +1329,7 @@ func (this *GetImageRequest) String() string {
}
s := strings.Join([]string{`&GetImageRequest{`,
`Name:` + fmt.Sprintf("%v", this.Name) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -912,6 +1340,7 @@ func (this *GetImageResponse) String() string {
}
s := strings.Join([]string{`&GetImageResponse{`,
`Image:` + strings.Replace(fmt.Sprintf("%v", this.Image), "Image", "Image", 1) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -922,6 +1351,7 @@ func (this *CreateImageRequest) String() string {
}
s := strings.Join([]string{`&CreateImageRequest{`,
`Image:` + strings.Replace(strings.Replace(this.Image.String(), "Image", "Image", 1), `&`, ``, 1) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -932,6 +1362,7 @@ func (this *CreateImageResponse) String() string {
}
s := strings.Join([]string{`&CreateImageResponse{`,
`Image:` + strings.Replace(strings.Replace(this.Image.String(), "Image", "Image", 1), `&`, ``, 1) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -942,7 +1373,8 @@ func (this *UpdateImageRequest) String() string {
}
s := strings.Join([]string{`&UpdateImageRequest{`,
`Image:` + strings.Replace(strings.Replace(this.Image.String(), "Image", "Image", 1), `&`, ``, 1) + `,`,
- `UpdateMask:` + strings.Replace(fmt.Sprintf("%v", this.UpdateMask), "FieldMask", "google_protobuf2.FieldMask", 1) + `,`,
+ `UpdateMask:` + strings.Replace(fmt.Sprintf("%v", this.UpdateMask), "FieldMask", "types1.FieldMask", 1) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -953,6 +1385,7 @@ func (this *UpdateImageResponse) String() string {
}
s := strings.Join([]string{`&UpdateImageResponse{`,
`Image:` + strings.Replace(strings.Replace(this.Image.String(), "Image", "Image", 1), `&`, ``, 1) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -963,6 +1396,7 @@ func (this *ListImagesRequest) String() string {
}
s := strings.Join([]string{`&ListImagesRequest{`,
`Filters:` + fmt.Sprintf("%v", this.Filters) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -973,6 +1407,7 @@ func (this *ListImagesResponse) String() string {
}
s := strings.Join([]string{`&ListImagesResponse{`,
`Images:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Images), "Image", "Image", 1), `&`, ``, 1) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -984,6 +1419,7 @@ func (this *DeleteImageRequest) String() string {
s := strings.Join([]string{`&DeleteImageRequest{`,
`Name:` + fmt.Sprintf("%v", this.Name) + `,`,
`Sync:` + fmt.Sprintf("%v", this.Sync) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -1011,7 +1447,7 @@ func (m *Image) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1039,7 +1475,7 @@ func (m *Image) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1049,6 +1485,9 @@ func (m *Image) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthImages
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthImages
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -1068,7 +1507,7 @@ func (m *Image) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1077,6 +1516,9 @@ func (m *Image) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthImages
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthImages
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -1097,7 +1539,7 @@ func (m *Image) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1114,7 +1556,7 @@ func (m *Image) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ stringLenmapkey |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1124,6 +1566,9 @@ func (m *Image) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthImages
}
postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey < 0 {
+ return ErrInvalidLengthImages
+ }
if postStringIndexmapkey > l {
return io.ErrUnexpectedEOF
}
@@ -1140,7 +1585,7 @@ func (m *Image) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLenmapvalue |= (uint64(b) & 0x7F) << shift
+ stringLenmapvalue |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1150,6 +1595,9 @@ func (m *Image) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthImages
}
postStringIndexmapvalue := iNdEx + intStringLenmapvalue
+ if postStringIndexmapvalue < 0 {
+ return ErrInvalidLengthImages
+ }
if postStringIndexmapvalue > l {
return io.ErrUnexpectedEOF
}
@@ -1186,7 +1634,7 @@ func (m *Image) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1195,6 +1643,9 @@ func (m *Image) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthImages
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthImages
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -1216,7 +1667,7 @@ func (m *Image) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1225,10 +1676,13 @@ func (m *Image) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthImages
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthImages
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
- if err := types.StdTimeUnmarshal(&m.CreatedAt, dAtA[iNdEx:postIndex]); err != nil {
+ if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.CreatedAt, dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
@@ -1246,7 +1700,7 @@ func (m *Image) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1255,10 +1709,13 @@ func (m *Image) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthImages
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthImages
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
- if err := types.StdTimeUnmarshal(&m.UpdatedAt, dAtA[iNdEx:postIndex]); err != nil {
+ if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.UpdatedAt, dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
@@ -1271,9 +1728,13 @@ func (m *Image) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthImages
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthImages
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -1298,7 +1759,7 @@ func (m *GetImageRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1326,7 +1787,7 @@ func (m *GetImageRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1336,6 +1797,9 @@ func (m *GetImageRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthImages
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthImages
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -1350,9 +1814,13 @@ func (m *GetImageRequest) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthImages
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthImages
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -1377,7 +1845,7 @@ func (m *GetImageResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1405,7 +1873,7 @@ func (m *GetImageResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1414,6 +1882,9 @@ func (m *GetImageResponse) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthImages
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthImages
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -1433,9 +1904,13 @@ func (m *GetImageResponse) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthImages
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthImages
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -1460,7 +1935,7 @@ func (m *CreateImageRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1488,7 +1963,7 @@ func (m *CreateImageRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1497,6 +1972,9 @@ func (m *CreateImageRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthImages
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthImages
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -1513,9 +1991,13 @@ func (m *CreateImageRequest) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthImages
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthImages
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -1540,7 +2022,7 @@ func (m *CreateImageResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1568,7 +2050,7 @@ func (m *CreateImageResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1577,6 +2059,9 @@ func (m *CreateImageResponse) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthImages
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthImages
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -1593,9 +2078,13 @@ func (m *CreateImageResponse) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthImages
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthImages
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -1620,7 +2109,7 @@ func (m *UpdateImageRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1648,7 +2137,7 @@ func (m *UpdateImageRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1657,6 +2146,9 @@ func (m *UpdateImageRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthImages
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthImages
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -1678,7 +2170,7 @@ func (m *UpdateImageRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1687,11 +2179,14 @@ func (m *UpdateImageRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthImages
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthImages
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.UpdateMask == nil {
- m.UpdateMask = &google_protobuf2.FieldMask{}
+ m.UpdateMask = &types1.FieldMask{}
}
if err := m.UpdateMask.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
@@ -1706,9 +2201,13 @@ func (m *UpdateImageRequest) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthImages
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthImages
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -1733,7 +2232,7 @@ func (m *UpdateImageResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1761,7 +2260,7 @@ func (m *UpdateImageResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1770,6 +2269,9 @@ func (m *UpdateImageResponse) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthImages
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthImages
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -1786,9 +2288,13 @@ func (m *UpdateImageResponse) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthImages
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthImages
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -1813,7 +2319,7 @@ func (m *ListImagesRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1841,7 +2347,7 @@ func (m *ListImagesRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1851,6 +2357,9 @@ func (m *ListImagesRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthImages
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthImages
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -1865,9 +2374,13 @@ func (m *ListImagesRequest) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthImages
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthImages
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -1892,7 +2405,7 @@ func (m *ListImagesResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1920,7 +2433,7 @@ func (m *ListImagesResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1929,6 +2442,9 @@ func (m *ListImagesResponse) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthImages
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthImages
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -1946,9 +2462,13 @@ func (m *ListImagesResponse) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthImages
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthImages
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -1973,7 +2493,7 @@ func (m *DeleteImageRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2001,7 +2521,7 @@ func (m *DeleteImageRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2011,6 +2531,9 @@ func (m *DeleteImageRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthImages
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthImages
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -2030,7 +2553,7 @@ func (m *DeleteImageRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- v |= (int(b) & 0x7F) << shift
+ v |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2045,9 +2568,13 @@ func (m *DeleteImageRequest) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthImages
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthImages
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -2111,10 +2638,13 @@ func skipImages(dAtA []byte) (n int, err error) {
break
}
}
- iNdEx += length
if length < 0 {
return 0, ErrInvalidLengthImages
}
+ iNdEx += length
+ if iNdEx < 0 {
+ return 0, ErrInvalidLengthImages
+ }
return iNdEx, nil
case 3:
for {
@@ -2143,6 +2673,9 @@ func skipImages(dAtA []byte) (n int, err error) {
return 0, err
}
iNdEx = start + next
+ if iNdEx < 0 {
+ return 0, ErrInvalidLengthImages
+ }
}
return iNdEx, nil
case 4:
@@ -2161,53 +2694,3 @@ var (
ErrInvalidLengthImages = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowImages = fmt.Errorf("proto: integer overflow")
)
-
-func init() {
- proto.RegisterFile("github.com/containerd/containerd/api/services/images/v1/images.proto", fileDescriptorImages)
-}
-
-var fileDescriptorImages = []byte{
- // 659 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x55, 0xcd, 0x6e, 0xd3, 0x40,
- 0x10, 0x8e, 0x93, 0xd4, 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x86, 0x0e, 0x16, 0x81, 0xa9, 0xc6, 0x9d, 0xcc, 0x22, 0x4f, 0x6e, 0x9b, 0x5d, 0x5d, 0x84,
- 0x72, 0x16, 0x50, 0x0d, 0xdc, 0xcc, 0x80, 0x93, 0xcb, 0x32, 0x33, 0xe0, 0xb4, 0x51, 0x7e, 0x05,
- 0xa6, 0xea, 0xff, 0xcc, 0x80, 0x93, 0x63, 0x62, 0x5f, 0x9f, 0x58, 0xa3, 0xfd, 0xf4, 0x8d, 0xab,
- 0x1d, 0x9d, 0x9c, 0x16, 0x33, 0xdf, 0x4f, 0x8b, 0x99, 0x4f, 0x83, 0xa2, 0x71, 0x32, 0x28, 0x1a,
- 0xdf, 0x06, 0x45, 0xe3, 0xd7, 0xa0, 0x68, 0xbc, 0x7f, 0x7c, 0xc1, 0xf7, 0x78, 0x5b, 0x59, 0x47,
- 0x99, 0xba, 0x29, 0x63, 0xdd, 0xff, 0x13, 0x00, 0x00, 0xff, 0xff, 0x24, 0x4e, 0xca, 0x64, 0xda,
- 0x07, 0x00, 0x00,
-}
diff --git a/api/services/introspection/v1/introspection.pb.go b/api/services/introspection/v1/introspection.pb.go
index 02bac622d..016ced4b7 100644
--- a/api/services/introspection/v1/introspection.pb.go
+++ b/api/services/introspection/v1/introspection.pb.go
@@ -1,35 +1,21 @@
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: github.com/containerd/containerd/api/services/introspection/v1/introspection.proto
-/*
- Package introspection is a generated protocol buffer package.
-
- It is generated from these files:
- github.com/containerd/containerd/api/services/introspection/v1/introspection.proto
-
- It has these top-level messages:
- Plugin
- PluginsRequest
- PluginsResponse
-*/
package introspection
-import proto "github.com/gogo/protobuf/proto"
-import fmt "fmt"
-import math "math"
-import containerd_types "github.com/containerd/containerd/api/types"
-import google_rpc "github.com/gogo/googleapis/google/rpc"
-
-// skipping weak import gogoproto "github.com/gogo/protobuf/gogoproto"
-
-import context "golang.org/x/net/context"
-import grpc "google.golang.org/grpc"
-
-import strings "strings"
-import reflect "reflect"
-import sortkeys "github.com/gogo/protobuf/sortkeys"
-
-import io "io"
+import (
+ context "context"
+ fmt "fmt"
+ types "github.com/containerd/containerd/api/types"
+ rpc "github.com/gogo/googleapis/google/rpc"
+ proto "github.com/gogo/protobuf/proto"
+ github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys"
+ grpc "google.golang.org/grpc"
+ io "io"
+ math "math"
+ reflect "reflect"
+ strings "strings"
+)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
@@ -51,7 +37,7 @@ type Plugin struct {
// ID identifies the plugin uniquely in the system.
ID string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
// Requires lists the plugin types required by this plugin.
- Requires []string `protobuf:"bytes,3,rep,name=requires" json:"requires,omitempty"`
+ Requires []string `protobuf:"bytes,3,rep,name=requires,proto3" json:"requires,omitempty"`
// Platforms enumerates the platforms this plugin will support.
//
// If values are provided here, the plugin will only be operable under the
@@ -61,30 +47,61 @@ type Plugin struct {
//
// If the plugin prefers certain platforms over others, they should be
// listed from most to least preferred.
- Platforms []containerd_types.Platform `protobuf:"bytes,4,rep,name=platforms" json:"platforms"`
+ Platforms []types.Platform `protobuf:"bytes,4,rep,name=platforms,proto3" json:"platforms"`
// Exports allows plugins to provide values about state or configuration to
// interested parties.
//
// One example is exposing the configured path of a snapshotter plugin.
- Exports map[string]string `protobuf:"bytes,5,rep,name=exports" json:"exports,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
+ Exports map[string]string `protobuf:"bytes,5,rep,name=exports,proto3" json:"exports,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
// Capabilities allows plugins to communicate feature switches to allow
// clients to detect features that may not be on be default or may be
// different from version to version.
//
// Use this sparingly.
- Capabilities []string `protobuf:"bytes,6,rep,name=capabilities" json:"capabilities,omitempty"`
+ Capabilities []string `protobuf:"bytes,6,rep,name=capabilities,proto3" json:"capabilities,omitempty"`
// InitErr will be set if the plugin fails initialization.
//
// This means the plugin may have been registered but a non-terminal error
// was encountered during initialization.
//
// Plugins that have this value set cannot be used.
- InitErr *google_rpc.Status `protobuf:"bytes,7,opt,name=init_err,json=initErr" json:"init_err,omitempty"`
+ InitErr *rpc.Status `protobuf:"bytes,7,opt,name=init_err,json=initErr,proto3" json:"init_err,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *Plugin) Reset() { *m = Plugin{} }
-func (*Plugin) ProtoMessage() {}
-func (*Plugin) Descriptor() ([]byte, []int) { return fileDescriptorIntrospection, []int{0} }
+func (m *Plugin) Reset() { *m = Plugin{} }
+func (*Plugin) ProtoMessage() {}
+func (*Plugin) Descriptor() ([]byte, []int) {
+ return fileDescriptor_1a14fda866f10715, []int{0}
+}
+func (m *Plugin) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *Plugin) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_Plugin.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *Plugin) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_Plugin.Merge(m, src)
+}
+func (m *Plugin) XXX_Size() int {
+ return m.Size()
+}
+func (m *Plugin) XXX_DiscardUnknown() {
+ xxx_messageInfo_Plugin.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Plugin proto.InternalMessageInfo
type PluginsRequest struct {
// Filters contains one or more filters using the syntax defined in the
@@ -97,27 +114,129 @@ type PluginsRequest struct {
// filters[0] or filters[1] or ... or filters[n-1] or filters[n]
//
// If filters is zero-length or nil, all items will be returned.
- Filters []string `protobuf:"bytes,1,rep,name=filters" json:"filters,omitempty"`
+ Filters []string `protobuf:"bytes,1,rep,name=filters,proto3" json:"filters,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *PluginsRequest) Reset() { *m = PluginsRequest{} }
-func (*PluginsRequest) ProtoMessage() {}
-func (*PluginsRequest) Descriptor() ([]byte, []int) { return fileDescriptorIntrospection, []int{1} }
+func (m *PluginsRequest) Reset() { *m = PluginsRequest{} }
+func (*PluginsRequest) ProtoMessage() {}
+func (*PluginsRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_1a14fda866f10715, []int{1}
+}
+func (m *PluginsRequest) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *PluginsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_PluginsRequest.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *PluginsRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_PluginsRequest.Merge(m, src)
+}
+func (m *PluginsRequest) XXX_Size() int {
+ return m.Size()
+}
+func (m *PluginsRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_PluginsRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_PluginsRequest proto.InternalMessageInfo
type PluginsResponse struct {
- Plugins []Plugin `protobuf:"bytes,1,rep,name=plugins" json:"plugins"`
+ Plugins []Plugin `protobuf:"bytes,1,rep,name=plugins,proto3" json:"plugins"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *PluginsResponse) Reset() { *m = PluginsResponse{} }
-func (*PluginsResponse) ProtoMessage() {}
-func (*PluginsResponse) Descriptor() ([]byte, []int) { return fileDescriptorIntrospection, []int{2} }
+func (m *PluginsResponse) Reset() { *m = PluginsResponse{} }
+func (*PluginsResponse) ProtoMessage() {}
+func (*PluginsResponse) Descriptor() ([]byte, []int) {
+ return fileDescriptor_1a14fda866f10715, []int{2}
+}
+func (m *PluginsResponse) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *PluginsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_PluginsResponse.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *PluginsResponse) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_PluginsResponse.Merge(m, src)
+}
+func (m *PluginsResponse) XXX_Size() int {
+ return m.Size()
+}
+func (m *PluginsResponse) XXX_DiscardUnknown() {
+ xxx_messageInfo_PluginsResponse.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_PluginsResponse proto.InternalMessageInfo
func init() {
proto.RegisterType((*Plugin)(nil), "containerd.services.introspection.v1.Plugin")
+ proto.RegisterMapType((map[string]string)(nil), "containerd.services.introspection.v1.Plugin.ExportsEntry")
proto.RegisterType((*PluginsRequest)(nil), "containerd.services.introspection.v1.PluginsRequest")
proto.RegisterType((*PluginsResponse)(nil), "containerd.services.introspection.v1.PluginsResponse")
}
+func init() {
+ proto.RegisterFile("github.com/containerd/containerd/api/services/introspection/v1/introspection.proto", fileDescriptor_1a14fda866f10715)
+}
+
+var fileDescriptor_1a14fda866f10715 = []byte{
+ // 487 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x53, 0x4d, 0x6f, 0xd3, 0x40,
+ 0x10, 0xcd, 0x3a, 0x69, 0xdc, 0x4c, 0xca, 0x87, 0x56, 0x15, 0x58, 0x3e, 0xb8, 0x51, 0xc4, 0x21,
+ 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0x9e, 0xdc, 0x73, 0x95, 0xe0, 0xa9, 0xa2, 0xf8, 0x1c, 0x6c,
+ 0x61, 0xa0, 0x8a, 0xdc, 0x1f, 0xbf, 0xda, 0x25, 0xa2, 0x3a, 0xf2, 0x66, 0xc4, 0xf8, 0x27, 0x82,
+ 0x47, 0x67, 0xeb, 0x54, 0x9c, 0x83, 0x5d, 0xaf, 0xc4, 0x6f, 0x77, 0x99, 0xdc, 0x5c, 0xe3, 0xbe,
+ 0xdb, 0x51, 0x65, 0xee, 0x9a, 0x2c, 0x56, 0x77, 0x5e, 0xeb, 0xf7, 0x9d, 0xd7, 0xfa, 0x51, 0x78,
+ 0x68, 0x55, 0x78, 0xe8, 0x57, 0xe1, 0xa1, 0x3f, 0x85, 0x87, 0xbe, 0x9c, 0xff, 0xdf, 0x5b, 0xfc,
+ 0xb0, 0x01, 0x7c, 0xb6, 0x66, 0xdd, 0xea, 0xf7, 0x7f, 0xf3, 0x2f, 0x00, 0x00, 0xff, 0xff, 0xe6,
+ 0x72, 0xde, 0x35, 0xe4, 0x03, 0x00, 0x00,
+}
+
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn
@@ -126,8 +245,9 @@ var _ grpc.ClientConn
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4
-// Client API for Introspection service
-
+// IntrospectionClient is the client API for Introspection service.
+//
+// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type IntrospectionClient interface {
// Plugins returns a list of plugins in containerd.
//
@@ -146,15 +266,14 @@ func NewIntrospectionClient(cc *grpc.ClientConn) IntrospectionClient {
func (c *introspectionClient) Plugins(ctx context.Context, in *PluginsRequest, opts ...grpc.CallOption) (*PluginsResponse, error) {
out := new(PluginsResponse)
- err := grpc.Invoke(ctx, "/containerd.services.introspection.v1.Introspection/Plugins", in, out, c.cc, opts...)
+ err := c.cc.Invoke(ctx, "/containerd.services.introspection.v1.Introspection/Plugins", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
-// Server API for Introspection service
-
+// IntrospectionServer is the server API for Introspection service.
type IntrospectionServer interface {
// Plugins returns a list of plugins in containerd.
//
@@ -294,6 +413,9 @@ func (m *Plugin) MarshalTo(dAtA []byte) (int, error) {
}
i += n1
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -327,6 +449,9 @@ func (m *PluginsRequest) MarshalTo(dAtA []byte) (int, error) {
i += copy(dAtA[i:], s)
}
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -357,6 +482,9 @@ func (m *PluginsResponse) MarshalTo(dAtA []byte) (int, error) {
i += n
}
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -370,6 +498,9 @@ func encodeVarintIntrospection(dAtA []byte, offset int, v uint64) int {
return offset + 1
}
func (m *Plugin) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.Type)
@@ -410,10 +541,16 @@ func (m *Plugin) Size() (n int) {
l = m.InitErr.Size()
n += 1 + l + sovIntrospection(uint64(l))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *PluginsRequest) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
if len(m.Filters) > 0 {
@@ -422,10 +559,16 @@ func (m *PluginsRequest) Size() (n int) {
n += 1 + l + sovIntrospection(uint64(l))
}
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *PluginsResponse) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
if len(m.Plugins) > 0 {
@@ -434,6 +577,9 @@ func (m *PluginsResponse) Size() (n int) {
n += 1 + l + sovIntrospection(uint64(l))
}
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
@@ -458,7 +604,7 @@ func (this *Plugin) String() string {
for k, _ := range this.Exports {
keysForExports = append(keysForExports, k)
}
- sortkeys.Strings(keysForExports)
+ github_com_gogo_protobuf_sortkeys.Strings(keysForExports)
mapStringForExports := "map[string]string{"
for _, k := range keysForExports {
mapStringForExports += fmt.Sprintf("%v: %v,", k, this.Exports[k])
@@ -468,10 +614,11 @@ func (this *Plugin) String() string {
`Type:` + fmt.Sprintf("%v", this.Type) + `,`,
`ID:` + fmt.Sprintf("%v", this.ID) + `,`,
`Requires:` + fmt.Sprintf("%v", this.Requires) + `,`,
- `Platforms:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Platforms), "Platform", "containerd_types.Platform", 1), `&`, ``, 1) + `,`,
+ `Platforms:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Platforms), "Platform", "types.Platform", 1), `&`, ``, 1) + `,`,
`Exports:` + mapStringForExports + `,`,
`Capabilities:` + fmt.Sprintf("%v", this.Capabilities) + `,`,
- `InitErr:` + strings.Replace(fmt.Sprintf("%v", this.InitErr), "Status", "google_rpc.Status", 1) + `,`,
+ `InitErr:` + strings.Replace(fmt.Sprintf("%v", this.InitErr), "Status", "rpc.Status", 1) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -482,6 +629,7 @@ func (this *PluginsRequest) String() string {
}
s := strings.Join([]string{`&PluginsRequest{`,
`Filters:` + fmt.Sprintf("%v", this.Filters) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -492,6 +640,7 @@ func (this *PluginsResponse) String() string {
}
s := strings.Join([]string{`&PluginsResponse{`,
`Plugins:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Plugins), "Plugin", "Plugin", 1), `&`, ``, 1) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -519,7 +668,7 @@ func (m *Plugin) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -547,7 +696,7 @@ func (m *Plugin) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -557,6 +706,9 @@ func (m *Plugin) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthIntrospection
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthIntrospection
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -576,7 +728,7 @@ func (m *Plugin) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -586,6 +738,9 @@ func (m *Plugin) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthIntrospection
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthIntrospection
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -605,7 +760,7 @@ func (m *Plugin) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -615,6 +770,9 @@ func (m *Plugin) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthIntrospection
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthIntrospection
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -634,7 +792,7 @@ func (m *Plugin) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -643,10 +801,13 @@ func (m *Plugin) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthIntrospection
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthIntrospection
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
- m.Platforms = append(m.Platforms, containerd_types.Platform{})
+ m.Platforms = append(m.Platforms, types.Platform{})
if err := m.Platforms[len(m.Platforms)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
@@ -665,7 +826,7 @@ func (m *Plugin) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -674,6 +835,9 @@ func (m *Plugin) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthIntrospection
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthIntrospection
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -694,7 +858,7 @@ func (m *Plugin) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -711,7 +875,7 @@ func (m *Plugin) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ stringLenmapkey |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -721,6 +885,9 @@ func (m *Plugin) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthIntrospection
}
postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey < 0 {
+ return ErrInvalidLengthIntrospection
+ }
if postStringIndexmapkey > l {
return io.ErrUnexpectedEOF
}
@@ -737,7 +904,7 @@ func (m *Plugin) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLenmapvalue |= (uint64(b) & 0x7F) << shift
+ stringLenmapvalue |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -747,6 +914,9 @@ func (m *Plugin) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthIntrospection
}
postStringIndexmapvalue := iNdEx + intStringLenmapvalue
+ if postStringIndexmapvalue < 0 {
+ return ErrInvalidLengthIntrospection
+ }
if postStringIndexmapvalue > l {
return io.ErrUnexpectedEOF
}
@@ -783,7 +953,7 @@ func (m *Plugin) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -793,6 +963,9 @@ func (m *Plugin) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthIntrospection
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthIntrospection
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -812,7 +985,7 @@ func (m *Plugin) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -821,11 +994,14 @@ func (m *Plugin) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthIntrospection
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthIntrospection
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.InitErr == nil {
- m.InitErr = &google_rpc.Status{}
+ m.InitErr = &rpc.Status{}
}
if err := m.InitErr.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
@@ -840,9 +1016,13 @@ func (m *Plugin) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthIntrospection
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthIntrospection
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -867,7 +1047,7 @@ func (m *PluginsRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -895,7 +1075,7 @@ func (m *PluginsRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -905,6 +1085,9 @@ func (m *PluginsRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthIntrospection
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthIntrospection
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -919,9 +1102,13 @@ func (m *PluginsRequest) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthIntrospection
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthIntrospection
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -946,7 +1133,7 @@ func (m *PluginsResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -974,7 +1161,7 @@ func (m *PluginsResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -983,6 +1170,9 @@ func (m *PluginsResponse) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthIntrospection
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthIntrospection
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -1000,9 +1190,13 @@ func (m *PluginsResponse) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthIntrospection
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthIntrospection
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -1066,10 +1260,13 @@ func skipIntrospection(dAtA []byte) (n int, err error) {
break
}
}
- iNdEx += length
if length < 0 {
return 0, ErrInvalidLengthIntrospection
}
+ iNdEx += length
+ if iNdEx < 0 {
+ return 0, ErrInvalidLengthIntrospection
+ }
return iNdEx, nil
case 3:
for {
@@ -1098,6 +1295,9 @@ func skipIntrospection(dAtA []byte) (n int, err error) {
return 0, err
}
iNdEx = start + next
+ if iNdEx < 0 {
+ return 0, ErrInvalidLengthIntrospection
+ }
}
return iNdEx, nil
case 4:
@@ -1116,42 +1316,3 @@ var (
ErrInvalidLengthIntrospection = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowIntrospection = fmt.Errorf("proto: integer overflow")
)
-
-func init() {
- proto.RegisterFile("github.com/containerd/containerd/api/services/introspection/v1/introspection.proto", fileDescriptorIntrospection)
-}
-
-var fileDescriptorIntrospection = []byte{
- // 487 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x53, 0x4d, 0x6f, 0xd3, 0x40,
- 0x10, 0xcd, 0x3a, 0x69, 0xdc, 0x4c, 0xca, 0x87, 0x56, 0x15, 0x58, 0x3e, 0xb8, 0x51, 0xc4, 0x21,
- 0x42, 0xb0, 0x56, 0x03, 0x48, 0xb4, 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6c,
- 0x61, 0xa0, 0x8a, 0xdc, 0x1f, 0xbf, 0xda, 0x25, 0xa2, 0x3a, 0xf2, 0x66, 0xc4, 0xf8, 0x27, 0x82,
- 0x47, 0x67, 0xeb, 0x54, 0x9c, 0x83, 0x5d, 0xaf, 0xc4, 0x6f, 0x77, 0x99, 0xdc, 0x5c, 0xe3, 0xbe,
- 0xdb, 0x51, 0x65, 0xee, 0x9a, 0x2c, 0x56, 0x77, 0x5e, 0xeb, 0xf7, 0x9d, 0xd7, 0xfa, 0x51, 0x78,
- 0x68, 0x55, 0x78, 0xe8, 0x57, 0xe1, 0xa1, 0x3f, 0x85, 0x87, 0xbe, 0x9c, 0xff, 0xdf, 0x5b, 0xfc,
- 0xb0, 0x01, 0x7c, 0xb6, 0x66, 0xdd, 0xea, 0xf7, 0x7f, 0xf3, 0x2f, 0x00, 0x00, 0xff, 0xff, 0xe6,
- 0x72, 0xde, 0x35, 0xe4, 0x03, 0x00, 0x00,
-}
diff --git a/api/services/leases/v1/leases.pb.go b/api/services/leases/v1/leases.pb.go
index 1222c1aec..3cf21383e 100644
--- a/api/services/leases/v1/leases.pb.go
+++ b/api/services/leases/v1/leases.pb.go
@@ -1,42 +1,22 @@
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: github.com/containerd/containerd/api/services/leases/v1/leases.proto
-/*
- Package leases is a generated protocol buffer package.
-
- It is generated from these files:
- github.com/containerd/containerd/api/services/leases/v1/leases.proto
-
- It has these top-level messages:
- Lease
- CreateRequest
- CreateResponse
- DeleteRequest
- ListRequest
- ListResponse
-*/
package leases
-import proto "github.com/gogo/protobuf/proto"
-import fmt "fmt"
-import math "math"
-
-// skipping weak import gogoproto "github.com/gogo/protobuf/gogoproto"
-import google_protobuf1 "github.com/gogo/protobuf/types"
-import _ "github.com/gogo/protobuf/types"
-
-import time "time"
-
-import context "golang.org/x/net/context"
-import grpc "google.golang.org/grpc"
-
-import types "github.com/gogo/protobuf/types"
-
-import strings "strings"
-import reflect "reflect"
-import sortkeys "github.com/gogo/protobuf/sortkeys"
-
-import io "io"
+import (
+ context "context"
+ fmt "fmt"
+ 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"
+ io "io"
+ math "math"
+ reflect "reflect"
+ strings "strings"
+ time "time"
+)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
@@ -52,33 +32,126 @@ const _ = proto.GoGoProtoPackageIsVersion2 // 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,stdtime" json:"created_at"`
- Labels map[string]string `protobuf:"bytes,3,rep,name=labels" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
+ 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"`
+ 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:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *Lease) Reset() { *m = Lease{} }
-func (*Lease) ProtoMessage() {}
-func (*Lease) Descriptor() ([]byte, []int) { return fileDescriptorLeases, []int{0} }
+func (m *Lease) Reset() { *m = Lease{} }
+func (*Lease) ProtoMessage() {}
+func (*Lease) Descriptor() ([]byte, []int) {
+ return fileDescriptor_fefd70dfe8d93cbf, []int{0}
+}
+func (m *Lease) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *Lease) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_Lease.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *Lease) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_Lease.Merge(m, src)
+}
+func (m *Lease) XXX_Size() int {
+ return m.Size()
+}
+func (m *Lease) XXX_DiscardUnknown() {
+ xxx_messageInfo_Lease.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Lease proto.InternalMessageInfo
type CreateRequest struct {
// ID is used to identity the lease, when the id is not set the service
// generates a random identifier for the lease.
- ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
- Labels map[string]string `protobuf:"bytes,3,rep,name=labels" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
+ ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,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:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *CreateRequest) Reset() { *m = CreateRequest{} }
-func (*CreateRequest) ProtoMessage() {}
-func (*CreateRequest) Descriptor() ([]byte, []int) { return fileDescriptorLeases, []int{1} }
+func (m *CreateRequest) Reset() { *m = CreateRequest{} }
+func (*CreateRequest) ProtoMessage() {}
+func (*CreateRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_fefd70dfe8d93cbf, []int{1}
+}
+func (m *CreateRequest) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *CreateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_CreateRequest.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *CreateRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_CreateRequest.Merge(m, src)
+}
+func (m *CreateRequest) XXX_Size() int {
+ return m.Size()
+}
+func (m *CreateRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_CreateRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_CreateRequest proto.InternalMessageInfo
type CreateResponse struct {
- Lease *Lease `protobuf:"bytes,1,opt,name=lease" json:"lease,omitempty"`
+ Lease *Lease `protobuf:"bytes,1,opt,name=lease,proto3" json:"lease,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *CreateResponse) Reset() { *m = CreateResponse{} }
-func (*CreateResponse) ProtoMessage() {}
-func (*CreateResponse) Descriptor() ([]byte, []int) { return fileDescriptorLeases, []int{2} }
+func (m *CreateResponse) Reset() { *m = CreateResponse{} }
+func (*CreateResponse) ProtoMessage() {}
+func (*CreateResponse) Descriptor() ([]byte, []int) {
+ return fileDescriptor_fefd70dfe8d93cbf, []int{2}
+}
+func (m *CreateResponse) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *CreateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_CreateResponse.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *CreateResponse) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_CreateResponse.Merge(m, src)
+}
+func (m *CreateResponse) XXX_Size() int {
+ return m.Size()
+}
+func (m *CreateResponse) XXX_DiscardUnknown() {
+ xxx_messageInfo_CreateResponse.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_CreateResponse proto.InternalMessageInfo
type DeleteRequest struct {
ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
@@ -86,38 +159,174 @@ type DeleteRequest struct {
// synchronously before returning to the caller
//
// Default is false
- Sync bool `protobuf:"varint,2,opt,name=sync,proto3" json:"sync,omitempty"`
+ Sync bool `protobuf:"varint,2,opt,name=sync,proto3" json:"sync,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *DeleteRequest) Reset() { *m = DeleteRequest{} }
-func (*DeleteRequest) ProtoMessage() {}
-func (*DeleteRequest) Descriptor() ([]byte, []int) { return fileDescriptorLeases, []int{3} }
+func (m *DeleteRequest) Reset() { *m = DeleteRequest{} }
+func (*DeleteRequest) ProtoMessage() {}
+func (*DeleteRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_fefd70dfe8d93cbf, []int{3}
+}
+func (m *DeleteRequest) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *DeleteRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_DeleteRequest.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *DeleteRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_DeleteRequest.Merge(m, src)
+}
+func (m *DeleteRequest) XXX_Size() int {
+ return m.Size()
+}
+func (m *DeleteRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_DeleteRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_DeleteRequest proto.InternalMessageInfo
type ListRequest struct {
- Filters []string `protobuf:"bytes,1,rep,name=filters" json:"filters,omitempty"`
+ Filters []string `protobuf:"bytes,1,rep,name=filters,proto3" json:"filters,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *ListRequest) Reset() { *m = ListRequest{} }
-func (*ListRequest) ProtoMessage() {}
-func (*ListRequest) Descriptor() ([]byte, []int) { return fileDescriptorLeases, []int{4} }
+func (m *ListRequest) Reset() { *m = ListRequest{} }
+func (*ListRequest) ProtoMessage() {}
+func (*ListRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_fefd70dfe8d93cbf, []int{4}
+}
+func (m *ListRequest) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *ListRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_ListRequest.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *ListRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_ListRequest.Merge(m, src)
+}
+func (m *ListRequest) XXX_Size() int {
+ return m.Size()
+}
+func (m *ListRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_ListRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_ListRequest proto.InternalMessageInfo
type ListResponse struct {
- Leases []*Lease `protobuf:"bytes,1,rep,name=leases" json:"leases,omitempty"`
+ Leases []*Lease `protobuf:"bytes,1,rep,name=leases,proto3" json:"leases,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *ListResponse) Reset() { *m = ListResponse{} }
-func (*ListResponse) ProtoMessage() {}
-func (*ListResponse) Descriptor() ([]byte, []int) { return fileDescriptorLeases, []int{5} }
+func (m *ListResponse) Reset() { *m = ListResponse{} }
+func (*ListResponse) ProtoMessage() {}
+func (*ListResponse) Descriptor() ([]byte, []int) {
+ return fileDescriptor_fefd70dfe8d93cbf, []int{5}
+}
+func (m *ListResponse) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *ListResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_ListResponse.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *ListResponse) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_ListResponse.Merge(m, src)
+}
+func (m *ListResponse) XXX_Size() int {
+ return m.Size()
+}
+func (m *ListResponse) XXX_DiscardUnknown() {
+ xxx_messageInfo_ListResponse.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_ListResponse proto.InternalMessageInfo
func init() {
proto.RegisterType((*Lease)(nil), "containerd.services.leases.v1.Lease")
+ proto.RegisterMapType((map[string]string)(nil), "containerd.services.leases.v1.Lease.LabelsEntry")
proto.RegisterType((*CreateRequest)(nil), "containerd.services.leases.v1.CreateRequest")
+ proto.RegisterMapType((map[string]string)(nil), "containerd.services.leases.v1.CreateRequest.LabelsEntry")
proto.RegisterType((*CreateResponse)(nil), "containerd.services.leases.v1.CreateResponse")
proto.RegisterType((*DeleteRequest)(nil), "containerd.services.leases.v1.DeleteRequest")
proto.RegisterType((*ListRequest)(nil), "containerd.services.leases.v1.ListRequest")
proto.RegisterType((*ListResponse)(nil), "containerd.services.leases.v1.ListResponse")
}
+func init() {
+ proto.RegisterFile("github.com/containerd/containerd/api/services/leases/v1/leases.proto", fileDescriptor_fefd70dfe8d93cbf)
+}
+
+var fileDescriptor_fefd70dfe8d93cbf = []byte{
+ // 515 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x94, 0xd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 0x75, 0x57, 0xd6, 0xd6, 0x5d, 0x68, 0x39, 0x21, 0x17, 0x95, 0xb5, 0x0d, 0xd7, 0x8e, 0xc3, 0x48,
+ 0x60, 0xc6, 0xdb, 0xa4, 0x5b, 0xef, 0x35, 0xdd, 0x6a, 0x69, 0x39, 0x70, 0x5d, 0x09, 0x4b, 0xe2,
+ 0xa7, 0xa0, 0x2b, 0x1e, 0x29, 0x5c, 0x15, 0xb9, 0xf4, 0xf4, 0x3f, 0x6b, 0xa0, 0xcb, 0x1d, 0x4e,
+ 0x11, 0x74, 0x15, 0x06, 0x7d, 0xf0, 0x2f, 0xdf, 0xc4, 0x78, 0xb8, 0xa2, 0xba, 0xe4, 0x7d, 0x05,
+ 0xba, 0x4a, 0x69, 0xe9, 0x35, 0x17, 0xc2, 0x34, 0xb6, 0x7e, 0x7b, 0x18, 0x07, 0xc5, 0x6b, 0xa4,
+ 0x47, 0xb0, 0x56, 0xe4, 0x41, 0xef, 0x2d, 0x9b, 0xfb, 0x2c, 0x5d, 0xe3, 0xfe, 0x4a, 0x5a, 0x05,
+ 0x3c, 0x38, 0x5c, 0x9c, 0x9a, 0xb5, 0x6f, 0xa7, 0x66, 0xed, 0x63, 0x6e, 0x92, 0x45, 0x6e, 0x92,
+ 0xaf, 0xb9, 0x49, 0x7e, 0xe4, 0x26, 0x79, 0xfb, 0xec, 0x3f, 0x7f, 0x4d, 0x7b, 0xaa, 0x3a, 0xac,
+ 0x8d, 0x74, 0x39, 0xcc, 0xe3, 0x5f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x14, 0x74, 0xdd, 0x12, 0xe5,
+ 0x04, 0x00, 0x00,
+}
+
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn
@@ -126,8 +335,9 @@ var _ grpc.ClientConn
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4
-// Client API for Leases service
-
+// LeasesClient is the client API for Leases service.
+//
+// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type LeasesClient interface {
// Create creates a new lease for managing changes to metadata. A lease
// can be used to protect objects from being removed.
@@ -135,7 +345,7 @@ type LeasesClient interface {
// Delete deletes the lease and makes any unreferenced objects created
// during the lease eligible for garbage collection if not referenced
// or retained by other resources during the lease.
- Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*google_protobuf1.Empty, error)
+ Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*types.Empty, error)
// List lists all active leases, returning the full list of
// leases and optionally including the referenced resources.
List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error)
@@ -151,16 +361,16 @@ func NewLeasesClient(cc *grpc.ClientConn) LeasesClient {
func (c *leasesClient) Create(ctx context.Context, in *CreateRequest, opts ...grpc.CallOption) (*CreateResponse, error) {
out := new(CreateResponse)
- err := grpc.Invoke(ctx, "/containerd.services.leases.v1.Leases/Create", in, out, c.cc, opts...)
+ err := c.cc.Invoke(ctx, "/containerd.services.leases.v1.Leases/Create", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
-func (c *leasesClient) Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*google_protobuf1.Empty, error) {
- out := new(google_protobuf1.Empty)
- err := grpc.Invoke(ctx, "/containerd.services.leases.v1.Leases/Delete", in, out, c.cc, opts...)
+func (c *leasesClient) Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*types.Empty, error) {
+ out := new(types.Empty)
+ err := c.cc.Invoke(ctx, "/containerd.services.leases.v1.Leases/Delete", in, out, opts...)
if err != nil {
return nil, err
}
@@ -169,15 +379,14 @@ func (c *leasesClient) Delete(ctx context.Context, in *DeleteRequest, opts ...gr
func (c *leasesClient) List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error) {
out := new(ListResponse)
- err := grpc.Invoke(ctx, "/containerd.services.leases.v1.Leases/List", in, out, c.cc, opts...)
+ err := c.cc.Invoke(ctx, "/containerd.services.leases.v1.Leases/List", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
-// Server API for Leases service
-
+// LeasesServer is the server API for Leases service.
type LeasesServer interface {
// Create creates a new lease for managing changes to metadata. A lease
// can be used to protect objects from being removed.
@@ -185,7 +394,7 @@ type LeasesServer interface {
// Delete deletes the lease and makes any unreferenced objects created
// during the lease eligible for garbage collection if not referenced
// or retained by other resources during the lease.
- Delete(context.Context, *DeleteRequest) (*google_protobuf1.Empty, error)
+ Delete(context.Context, *DeleteRequest) (*types.Empty, error)
// List lists all active leases, returning the full list of
// leases and optionally including the referenced resources.
List(context.Context, *ListRequest) (*ListResponse, error)
@@ -293,8 +502,8 @@ func (m *Lease) MarshalTo(dAtA []byte) (int, error) {
}
dAtA[i] = 0x12
i++
- i = encodeVarintLeases(dAtA, i, uint64(types.SizeOfStdTime(m.CreatedAt)))
- n1, err := types.StdTimeMarshalTo(m.CreatedAt, dAtA[i:])
+ i = encodeVarintLeases(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.CreatedAt)))
+ n1, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.CreatedAt, dAtA[i:])
if err != nil {
return 0, err
}
@@ -316,6 +525,9 @@ func (m *Lease) MarshalTo(dAtA []byte) (int, error) {
i += copy(dAtA[i:], v)
}
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -357,6 +569,9 @@ func (m *CreateRequest) MarshalTo(dAtA []byte) (int, error) {
i += copy(dAtA[i:], v)
}
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -385,6 +600,9 @@ func (m *CreateResponse) MarshalTo(dAtA []byte) (int, error) {
}
i += n2
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -419,6 +637,9 @@ func (m *DeleteRequest) MarshalTo(dAtA []byte) (int, error) {
}
i++
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -452,6 +673,9 @@ func (m *ListRequest) MarshalTo(dAtA []byte) (int, error) {
i += copy(dAtA[i:], s)
}
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -482,6 +706,9 @@ func (m *ListResponse) MarshalTo(dAtA []byte) (int, error) {
i += n
}
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -495,13 +722,16 @@ func encodeVarintLeases(dAtA []byte, offset int, v uint64) int {
return offset + 1
}
func (m *Lease) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.ID)
if l > 0 {
n += 1 + l + sovLeases(uint64(l))
}
- l = types.SizeOfStdTime(m.CreatedAt)
+ l = github_com_gogo_protobuf_types.SizeOfStdTime(m.CreatedAt)
n += 1 + l + sovLeases(uint64(l))
if len(m.Labels) > 0 {
for k, v := range m.Labels {
@@ -511,10 +741,16 @@ func (m *Lease) Size() (n int) {
n += mapEntrySize + 1 + sovLeases(uint64(mapEntrySize))
}
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *CreateRequest) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.ID)
@@ -529,20 +765,32 @@ func (m *CreateRequest) Size() (n int) {
n += mapEntrySize + 1 + sovLeases(uint64(mapEntrySize))
}
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *CreateResponse) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
if m.Lease != nil {
l = m.Lease.Size()
n += 1 + l + sovLeases(uint64(l))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *DeleteRequest) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.ID)
@@ -552,10 +800,16 @@ func (m *DeleteRequest) Size() (n int) {
if m.Sync {
n += 2
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *ListRequest) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
if len(m.Filters) > 0 {
@@ -564,10 +818,16 @@ func (m *ListRequest) Size() (n int) {
n += 1 + l + sovLeases(uint64(l))
}
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *ListResponse) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
if len(m.Leases) > 0 {
@@ -576,6 +836,9 @@ func (m *ListResponse) Size() (n int) {
n += 1 + l + sovLeases(uint64(l))
}
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
@@ -600,7 +863,7 @@ func (this *Lease) String() string {
for k, _ := range this.Labels {
keysForLabels = append(keysForLabels, k)
}
- sortkeys.Strings(keysForLabels)
+ github_com_gogo_protobuf_sortkeys.Strings(keysForLabels)
mapStringForLabels := "map[string]string{"
for _, k := range keysForLabels {
mapStringForLabels += fmt.Sprintf("%v: %v,", k, this.Labels[k])
@@ -608,8 +871,9 @@ func (this *Lease) String() string {
mapStringForLabels += "}"
s := strings.Join([]string{`&Lease{`,
`ID:` + fmt.Sprintf("%v", this.ID) + `,`,
- `CreatedAt:` + strings.Replace(strings.Replace(this.CreatedAt.String(), "Timestamp", "google_protobuf2.Timestamp", 1), `&`, ``, 1) + `,`,
+ `CreatedAt:` + strings.Replace(strings.Replace(this.CreatedAt.String(), "Timestamp", "types.Timestamp", 1), `&`, ``, 1) + `,`,
`Labels:` + mapStringForLabels + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -622,7 +886,7 @@ func (this *CreateRequest) String() string {
for k, _ := range this.Labels {
keysForLabels = append(keysForLabels, k)
}
- sortkeys.Strings(keysForLabels)
+ github_com_gogo_protobuf_sortkeys.Strings(keysForLabels)
mapStringForLabels := "map[string]string{"
for _, k := range keysForLabels {
mapStringForLabels += fmt.Sprintf("%v: %v,", k, this.Labels[k])
@@ -631,6 +895,7 @@ func (this *CreateRequest) String() string {
s := strings.Join([]string{`&CreateRequest{`,
`ID:` + fmt.Sprintf("%v", this.ID) + `,`,
`Labels:` + mapStringForLabels + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -641,6 +906,7 @@ func (this *CreateResponse) String() string {
}
s := strings.Join([]string{`&CreateResponse{`,
`Lease:` + strings.Replace(fmt.Sprintf("%v", this.Lease), "Lease", "Lease", 1) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -652,6 +918,7 @@ func (this *DeleteRequest) String() string {
s := strings.Join([]string{`&DeleteRequest{`,
`ID:` + fmt.Sprintf("%v", this.ID) + `,`,
`Sync:` + fmt.Sprintf("%v", this.Sync) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -662,6 +929,7 @@ func (this *ListRequest) String() string {
}
s := strings.Join([]string{`&ListRequest{`,
`Filters:` + fmt.Sprintf("%v", this.Filters) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -672,6 +940,7 @@ func (this *ListResponse) String() string {
}
s := strings.Join([]string{`&ListResponse{`,
`Leases:` + strings.Replace(fmt.Sprintf("%v", this.Leases), "Lease", "Lease", 1) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -699,7 +968,7 @@ func (m *Lease) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -727,7 +996,7 @@ func (m *Lease) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -737,6 +1006,9 @@ func (m *Lease) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthLeases
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthLeases
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -756,7 +1028,7 @@ func (m *Lease) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -765,10 +1037,13 @@ func (m *Lease) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthLeases
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthLeases
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
- if err := types.StdTimeUnmarshal(&m.CreatedAt, dAtA[iNdEx:postIndex]); err != nil {
+ if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.CreatedAt, dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
@@ -786,7 +1061,7 @@ func (m *Lease) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -795,6 +1070,9 @@ func (m *Lease) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthLeases
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthLeases
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -815,7 +1093,7 @@ func (m *Lease) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -832,7 +1110,7 @@ func (m *Lease) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ stringLenmapkey |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -842,6 +1120,9 @@ func (m *Lease) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthLeases
}
postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey < 0 {
+ return ErrInvalidLengthLeases
+ }
if postStringIndexmapkey > l {
return io.ErrUnexpectedEOF
}
@@ -858,7 +1139,7 @@ func (m *Lease) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLenmapvalue |= (uint64(b) & 0x7F) << shift
+ stringLenmapvalue |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -868,6 +1149,9 @@ func (m *Lease) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthLeases
}
postStringIndexmapvalue := iNdEx + intStringLenmapvalue
+ if postStringIndexmapvalue < 0 {
+ return ErrInvalidLengthLeases
+ }
if postStringIndexmapvalue > l {
return io.ErrUnexpectedEOF
}
@@ -899,9 +1183,13 @@ func (m *Lease) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthLeases
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthLeases
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -926,7 +1214,7 @@ func (m *CreateRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -954,7 +1242,7 @@ func (m *CreateRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -964,6 +1252,9 @@ func (m *CreateRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthLeases
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthLeases
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -983,7 +1274,7 @@ func (m *CreateRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -992,6 +1283,9 @@ func (m *CreateRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthLeases
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthLeases
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -1012,7 +1306,7 @@ func (m *CreateRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1029,7 +1323,7 @@ func (m *CreateRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ stringLenmapkey |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1039,6 +1333,9 @@ func (m *CreateRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthLeases
}
postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey < 0 {
+ return ErrInvalidLengthLeases
+ }
if postStringIndexmapkey > l {
return io.ErrUnexpectedEOF
}
@@ -1055,7 +1352,7 @@ func (m *CreateRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLenmapvalue |= (uint64(b) & 0x7F) << shift
+ stringLenmapvalue |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1065,6 +1362,9 @@ func (m *CreateRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthLeases
}
postStringIndexmapvalue := iNdEx + intStringLenmapvalue
+ if postStringIndexmapvalue < 0 {
+ return ErrInvalidLengthLeases
+ }
if postStringIndexmapvalue > l {
return io.ErrUnexpectedEOF
}
@@ -1096,9 +1396,13 @@ func (m *CreateRequest) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthLeases
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthLeases
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -1123,7 +1427,7 @@ func (m *CreateResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1151,7 +1455,7 @@ func (m *CreateResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1160,6 +1464,9 @@ func (m *CreateResponse) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthLeases
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthLeases
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -1179,9 +1486,13 @@ func (m *CreateResponse) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthLeases
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthLeases
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -1206,7 +1517,7 @@ func (m *DeleteRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1234,7 +1545,7 @@ func (m *DeleteRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1244,6 +1555,9 @@ func (m *DeleteRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthLeases
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthLeases
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -1263,7 +1577,7 @@ func (m *DeleteRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- v |= (int(b) & 0x7F) << shift
+ v |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1278,9 +1592,13 @@ func (m *DeleteRequest) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthLeases
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthLeases
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -1305,7 +1623,7 @@ func (m *ListRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1333,7 +1651,7 @@ func (m *ListRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1343,6 +1661,9 @@ func (m *ListRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthLeases
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthLeases
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -1357,9 +1678,13 @@ func (m *ListRequest) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthLeases
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthLeases
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -1384,7 +1709,7 @@ func (m *ListResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1412,7 +1737,7 @@ func (m *ListResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1421,6 +1746,9 @@ func (m *ListResponse) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthLeases
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthLeases
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -1438,9 +1766,13 @@ func (m *ListResponse) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthLeases
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthLeases
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -1504,10 +1836,13 @@ func skipLeases(dAtA []byte) (n int, err error) {
break
}
}
- iNdEx += length
if length < 0 {
return 0, ErrInvalidLengthLeases
}
+ iNdEx += length
+ if iNdEx < 0 {
+ return 0, ErrInvalidLengthLeases
+ }
return iNdEx, nil
case 3:
for {
@@ -1536,6 +1871,9 @@ func skipLeases(dAtA []byte) (n int, err error) {
return 0, err
}
iNdEx = start + next
+ if iNdEx < 0 {
+ return 0, ErrInvalidLengthLeases
+ }
}
return iNdEx, nil
case 4:
@@ -1554,44 +1892,3 @@ var (
ErrInvalidLengthLeases = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowLeases = fmt.Errorf("proto: integer overflow")
)
-
-func init() {
- proto.RegisterFile("github.com/containerd/containerd/api/services/leases/v1/leases.proto", fileDescriptorLeases)
-}
-
-var fileDescriptorLeases = []byte{
- // 515 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x94, 0xdf, 0x8a, 0xd3, 0x40,
- 0x14, 0xc6, 0x3b, 0xe9, 0x36, 0x6e, 0x4f, 0x5d, 0x91, 0x61, 0x59, 0x4a, 0xc4, 0xb4, 0x04, 0xc1,
- 0xe2, 0x9f, 0x89, 0x5b, 0x6f, 0xd6, 0x5d, 0x11, 0xec, 0x76, 0x41, 0x21, 0x88, 0x04, 0x2f, 0x16,
- 0x6f, 0x96, 0x34, 0x3d, 0x1b, 0x83, 0x69, 0x12, 0x33, 0xd3, 0x42, 0xef, 0x7c, 0x04, 0x1f, 0xc1,
- 0x87, 0xf0, 0x21, 0x7a, 0xe9, 0xa5, 0x57, 0xab, 0x9b, 0x3b, 0xdf, 0x42, 0x32, 0x93, 0xb0, 0x7f,
- 0x44, 0x5b, 0x65, 0xef, 0xce, 0xcc, 0x7c, 0xdf, 0x99, 0xdf, 0xf9, 0xc2, 0x04, 0x86, 0x41, 0x28,
- 0xde, 0x4d, 0x47, 0xcc, 0x4f, 0x26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, 0xfe, 0x4a, 0x5a, 0x05,
- 0x3c, 0x38, 0x5c, 0x9c, 0x9a, 0xb5, 0x6f, 0xa7, 0x66, 0xed, 0x63, 0x6e, 0x92, 0x45, 0x6e, 0x92,
- 0xaf, 0xb9, 0x49, 0x7e, 0xe4, 0x26, 0x79, 0xfb, 0xec, 0x3f, 0x7f, 0x4d, 0x7b, 0xaa, 0x3a, 0xac,
- 0x8d, 0x74, 0x39, 0xcc, 0xe3, 0x5f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x14, 0x74, 0xdd, 0x12, 0xe5,
- 0x04, 0x00, 0x00,
-}
diff --git a/api/services/namespaces/v1/namespace.pb.go b/api/services/namespaces/v1/namespace.pb.go
index f471f1c12..3c6cdd7af 100644
--- a/api/services/namespaces/v1/namespace.pb.go
+++ b/api/services/namespaces/v1/namespace.pb.go
@@ -1,42 +1,20 @@
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: github.com/containerd/containerd/api/services/namespaces/v1/namespace.proto
-/*
- Package namespaces is a generated protocol buffer package.
-
- It is generated from these files:
- github.com/containerd/containerd/api/services/namespaces/v1/namespace.proto
-
- It has these top-level messages:
- Namespace
- GetNamespaceRequest
- GetNamespaceResponse
- ListNamespacesRequest
- ListNamespacesResponse
- CreateNamespaceRequest
- CreateNamespaceResponse
- UpdateNamespaceRequest
- UpdateNamespaceResponse
- DeleteNamespaceRequest
-*/
package namespaces
-import proto "github.com/gogo/protobuf/proto"
-import fmt "fmt"
-import math "math"
-
-// skipping weak import gogoproto "github.com/gogo/protobuf/gogoproto"
-import google_protobuf1 "github.com/gogo/protobuf/types"
-import google_protobuf2 "github.com/gogo/protobuf/types"
-
-import context "golang.org/x/net/context"
-import grpc "google.golang.org/grpc"
-
-import strings "strings"
-import reflect "reflect"
-import sortkeys "github.com/gogo/protobuf/sortkeys"
-
-import io "io"
+import (
+ context "context"
+ fmt "fmt"
+ proto "github.com/gogo/protobuf/proto"
+ github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys"
+ types "github.com/gogo/protobuf/types"
+ grpc "google.golang.org/grpc"
+ io "io"
+ math "math"
+ reflect "reflect"
+ strings "strings"
+)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
@@ -57,60 +35,277 @@ type Namespace struct {
//
// Note that to add a new value to this field, read the existing set and
// include the entire result in the update call.
- Labels map[string]string `protobuf:"bytes,2,rep,name=labels" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
+ Labels map[string]string `protobuf:"bytes,2,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:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *Namespace) Reset() { *m = Namespace{} }
-func (*Namespace) ProtoMessage() {}
-func (*Namespace) Descriptor() ([]byte, []int) { return fileDescriptorNamespace, []int{0} }
+func (m *Namespace) Reset() { *m = Namespace{} }
+func (*Namespace) ProtoMessage() {}
+func (*Namespace) Descriptor() ([]byte, []int) {
+ return fileDescriptor_8c41761eaeea4fd3, []int{0}
+}
+func (m *Namespace) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *Namespace) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_Namespace.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *Namespace) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_Namespace.Merge(m, src)
+}
+func (m *Namespace) XXX_Size() int {
+ return m.Size()
+}
+func (m *Namespace) XXX_DiscardUnknown() {
+ xxx_messageInfo_Namespace.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Namespace proto.InternalMessageInfo
type GetNamespaceRequest struct {
- Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *GetNamespaceRequest) Reset() { *m = GetNamespaceRequest{} }
-func (*GetNamespaceRequest) ProtoMessage() {}
-func (*GetNamespaceRequest) Descriptor() ([]byte, []int) { return fileDescriptorNamespace, []int{1} }
+func (m *GetNamespaceRequest) Reset() { *m = GetNamespaceRequest{} }
+func (*GetNamespaceRequest) ProtoMessage() {}
+func (*GetNamespaceRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_8c41761eaeea4fd3, []int{1}
+}
+func (m *GetNamespaceRequest) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *GetNamespaceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_GetNamespaceRequest.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *GetNamespaceRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_GetNamespaceRequest.Merge(m, src)
+}
+func (m *GetNamespaceRequest) XXX_Size() int {
+ return m.Size()
+}
+func (m *GetNamespaceRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_GetNamespaceRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_GetNamespaceRequest proto.InternalMessageInfo
type GetNamespaceResponse struct {
- Namespace Namespace `protobuf:"bytes,1,opt,name=namespace" json:"namespace"`
+ Namespace Namespace `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *GetNamespaceResponse) Reset() { *m = GetNamespaceResponse{} }
-func (*GetNamespaceResponse) ProtoMessage() {}
-func (*GetNamespaceResponse) Descriptor() ([]byte, []int) { return fileDescriptorNamespace, []int{2} }
+func (m *GetNamespaceResponse) Reset() { *m = GetNamespaceResponse{} }
+func (*GetNamespaceResponse) ProtoMessage() {}
+func (*GetNamespaceResponse) Descriptor() ([]byte, []int) {
+ return fileDescriptor_8c41761eaeea4fd3, []int{2}
+}
+func (m *GetNamespaceResponse) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *GetNamespaceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_GetNamespaceResponse.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *GetNamespaceResponse) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_GetNamespaceResponse.Merge(m, src)
+}
+func (m *GetNamespaceResponse) XXX_Size() int {
+ return m.Size()
+}
+func (m *GetNamespaceResponse) XXX_DiscardUnknown() {
+ xxx_messageInfo_GetNamespaceResponse.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_GetNamespaceResponse proto.InternalMessageInfo
type ListNamespacesRequest struct {
- Filter string `protobuf:"bytes,1,opt,name=filter,proto3" json:"filter,omitempty"`
+ Filter string `protobuf:"bytes,1,opt,name=filter,proto3" json:"filter,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *ListNamespacesRequest) Reset() { *m = ListNamespacesRequest{} }
-func (*ListNamespacesRequest) ProtoMessage() {}
-func (*ListNamespacesRequest) Descriptor() ([]byte, []int) { return fileDescriptorNamespace, []int{3} }
+func (m *ListNamespacesRequest) Reset() { *m = ListNamespacesRequest{} }
+func (*ListNamespacesRequest) ProtoMessage() {}
+func (*ListNamespacesRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_8c41761eaeea4fd3, []int{3}
+}
+func (m *ListNamespacesRequest) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *ListNamespacesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_ListNamespacesRequest.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *ListNamespacesRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_ListNamespacesRequest.Merge(m, src)
+}
+func (m *ListNamespacesRequest) XXX_Size() int {
+ return m.Size()
+}
+func (m *ListNamespacesRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_ListNamespacesRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_ListNamespacesRequest proto.InternalMessageInfo
type ListNamespacesResponse struct {
- Namespaces []Namespace `protobuf:"bytes,1,rep,name=namespaces" json:"namespaces"`
+ Namespaces []Namespace `protobuf:"bytes,1,rep,name=namespaces,proto3" json:"namespaces"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *ListNamespacesResponse) Reset() { *m = ListNamespacesResponse{} }
-func (*ListNamespacesResponse) ProtoMessage() {}
-func (*ListNamespacesResponse) Descriptor() ([]byte, []int) { return fileDescriptorNamespace, []int{4} }
+func (m *ListNamespacesResponse) Reset() { *m = ListNamespacesResponse{} }
+func (*ListNamespacesResponse) ProtoMessage() {}
+func (*ListNamespacesResponse) Descriptor() ([]byte, []int) {
+ return fileDescriptor_8c41761eaeea4fd3, []int{4}
+}
+func (m *ListNamespacesResponse) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *ListNamespacesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_ListNamespacesResponse.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *ListNamespacesResponse) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_ListNamespacesResponse.Merge(m, src)
+}
+func (m *ListNamespacesResponse) XXX_Size() int {
+ return m.Size()
+}
+func (m *ListNamespacesResponse) XXX_DiscardUnknown() {
+ xxx_messageInfo_ListNamespacesResponse.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_ListNamespacesResponse proto.InternalMessageInfo
type CreateNamespaceRequest struct {
- Namespace Namespace `protobuf:"bytes,1,opt,name=namespace" json:"namespace"`
+ Namespace Namespace `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *CreateNamespaceRequest) Reset() { *m = CreateNamespaceRequest{} }
-func (*CreateNamespaceRequest) ProtoMessage() {}
-func (*CreateNamespaceRequest) Descriptor() ([]byte, []int) { return fileDescriptorNamespace, []int{5} }
+func (m *CreateNamespaceRequest) Reset() { *m = CreateNamespaceRequest{} }
+func (*CreateNamespaceRequest) ProtoMessage() {}
+func (*CreateNamespaceRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_8c41761eaeea4fd3, []int{5}
+}
+func (m *CreateNamespaceRequest) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *CreateNamespaceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_CreateNamespaceRequest.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *CreateNamespaceRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_CreateNamespaceRequest.Merge(m, src)
+}
+func (m *CreateNamespaceRequest) XXX_Size() int {
+ return m.Size()
+}
+func (m *CreateNamespaceRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_CreateNamespaceRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_CreateNamespaceRequest proto.InternalMessageInfo
type CreateNamespaceResponse struct {
- Namespace Namespace `protobuf:"bytes,1,opt,name=namespace" json:"namespace"`
+ Namespace Namespace `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *CreateNamespaceResponse) Reset() { *m = CreateNamespaceResponse{} }
-func (*CreateNamespaceResponse) ProtoMessage() {}
-func (*CreateNamespaceResponse) Descriptor() ([]byte, []int) { return fileDescriptorNamespace, []int{6} }
+func (m *CreateNamespaceResponse) Reset() { *m = CreateNamespaceResponse{} }
+func (*CreateNamespaceResponse) ProtoMessage() {}
+func (*CreateNamespaceResponse) Descriptor() ([]byte, []int) {
+ return fileDescriptor_8c41761eaeea4fd3, []int{6}
+}
+func (m *CreateNamespaceResponse) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *CreateNamespaceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_CreateNamespaceResponse.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *CreateNamespaceResponse) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_CreateNamespaceResponse.Merge(m, src)
+}
+func (m *CreateNamespaceResponse) XXX_Size() int {
+ return m.Size()
+}
+func (m *CreateNamespaceResponse) XXX_DiscardUnknown() {
+ xxx_messageInfo_CreateNamespaceResponse.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_CreateNamespaceResponse proto.InternalMessageInfo
// UpdateNamespaceRequest updates the metadata for a namespace.
//
@@ -121,38 +316,132 @@ type UpdateNamespaceRequest struct {
// Namespace provides the target value, as declared by the mask, for the update.
//
// The namespace field must be set.
- Namespace Namespace `protobuf:"bytes,1,opt,name=namespace" json:"namespace"`
+ Namespace Namespace `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace"`
// UpdateMask specifies which fields to perform the update on. If empty,
// the operation applies to all fields.
//
// For the most part, this applies only to selectively updating labels on
// the namespace. While field masks are typically limited to ascii alphas
// and digits, we just take everything after the "labels." as the map key.
- UpdateMask *google_protobuf2.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask" json:"update_mask,omitempty"`
+ UpdateMask *types.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *UpdateNamespaceRequest) Reset() { *m = UpdateNamespaceRequest{} }
-func (*UpdateNamespaceRequest) ProtoMessage() {}
-func (*UpdateNamespaceRequest) Descriptor() ([]byte, []int) { return fileDescriptorNamespace, []int{7} }
+func (m *UpdateNamespaceRequest) Reset() { *m = UpdateNamespaceRequest{} }
+func (*UpdateNamespaceRequest) ProtoMessage() {}
+func (*UpdateNamespaceRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_8c41761eaeea4fd3, []int{7}
+}
+func (m *UpdateNamespaceRequest) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *UpdateNamespaceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_UpdateNamespaceRequest.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *UpdateNamespaceRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_UpdateNamespaceRequest.Merge(m, src)
+}
+func (m *UpdateNamespaceRequest) XXX_Size() int {
+ return m.Size()
+}
+func (m *UpdateNamespaceRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_UpdateNamespaceRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_UpdateNamespaceRequest proto.InternalMessageInfo
type UpdateNamespaceResponse struct {
- Namespace Namespace `protobuf:"bytes,1,opt,name=namespace" json:"namespace"`
+ Namespace Namespace `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *UpdateNamespaceResponse) Reset() { *m = UpdateNamespaceResponse{} }
-func (*UpdateNamespaceResponse) ProtoMessage() {}
-func (*UpdateNamespaceResponse) Descriptor() ([]byte, []int) { return fileDescriptorNamespace, []int{8} }
+func (m *UpdateNamespaceResponse) Reset() { *m = UpdateNamespaceResponse{} }
+func (*UpdateNamespaceResponse) ProtoMessage() {}
+func (*UpdateNamespaceResponse) Descriptor() ([]byte, []int) {
+ return fileDescriptor_8c41761eaeea4fd3, []int{8}
+}
+func (m *UpdateNamespaceResponse) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *UpdateNamespaceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_UpdateNamespaceResponse.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *UpdateNamespaceResponse) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_UpdateNamespaceResponse.Merge(m, src)
+}
+func (m *UpdateNamespaceResponse) XXX_Size() int {
+ return m.Size()
+}
+func (m *UpdateNamespaceResponse) XXX_DiscardUnknown() {
+ xxx_messageInfo_UpdateNamespaceResponse.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_UpdateNamespaceResponse proto.InternalMessageInfo
type DeleteNamespaceRequest struct {
- Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *DeleteNamespaceRequest) Reset() { *m = DeleteNamespaceRequest{} }
-func (*DeleteNamespaceRequest) ProtoMessage() {}
-func (*DeleteNamespaceRequest) Descriptor() ([]byte, []int) { return fileDescriptorNamespace, []int{9} }
+func (m *DeleteNamespaceRequest) Reset() { *m = DeleteNamespaceRequest{} }
+func (*DeleteNamespaceRequest) ProtoMessage() {}
+func (*DeleteNamespaceRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_8c41761eaeea4fd3, []int{9}
+}
+func (m *DeleteNamespaceRequest) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *DeleteNamespaceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_DeleteNamespaceRequest.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *DeleteNamespaceRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_DeleteNamespaceRequest.Merge(m, src)
+}
+func (m *DeleteNamespaceRequest) XXX_Size() int {
+ return m.Size()
+}
+func (m *DeleteNamespaceRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_DeleteNamespaceRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_DeleteNamespaceRequest proto.InternalMessageInfo
func init() {
proto.RegisterType((*Namespace)(nil), "containerd.services.namespaces.v1.Namespace")
+ proto.RegisterMapType((map[string]string)(nil), "containerd.services.namespaces.v1.Namespace.LabelsEntry")
proto.RegisterType((*GetNamespaceRequest)(nil), "containerd.services.namespaces.v1.GetNamespaceRequest")
proto.RegisterType((*GetNamespaceResponse)(nil), "containerd.services.namespaces.v1.GetNamespaceResponse")
proto.RegisterType((*ListNamespacesRequest)(nil), "containerd.services.namespaces.v1.ListNamespacesRequest")
@@ -164,6 +453,49 @@ func init() {
proto.RegisterType((*DeleteNamespaceRequest)(nil), "containerd.services.namespaces.v1.DeleteNamespaceRequest")
}
+func init() {
+ proto.RegisterFile("github.com/containerd/containerd/api/services/namespaces/v1/namespace.proto", fileDescriptor_8c41761eaeea4fd3)
+}
+
+var fileDescriptor_8c41761eaeea4fd3 = []byte{
+ // 551 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x55, 0xcd, 0x6e, 0xd3, 0x4c,
+ 0x14, 0xcd, 0x24, 0xf9, 0x2c, 0xe5, 0x7a, 0xf3, 0x69, 0x08, 0x26, 0x32, 0x92, 0x09, 0x5e, 0x15,
+ 0xa9, 0x1a, 0xab, 0x41, 0x82, 0xfe, 0xec, 0x0a, 0x6d, 0x17, 0x14, 0x84, 0x2c, 0x21, 0x21, 0x58,
+ 0x80, 0x93, 0x4c, 0x5c, 0x13, 0xc7, 0x36, 0x9e, 0xb1, 0xa5, 0x88, 0x05, 0xbc, 0x0d, 0x1b, 0x1e,
+ 0x24, 0x4b, 0x96, 0xac, 0x50, 0x9b, 0x27, 0x41, 0x33, 0x76, 0xe2, 0xd0, 0x18, 0xe1, 0x06, 0xca,
+ 0xee, 0x5e, 0x7b, 0xce, 0x3d, 0x67, 0xae, 0xce, 0xb1, 0xe1, 0x89, 0xeb, 0xf1, 0xb3, 0xa4, 0x4f,
+ 0x06, 0xe1, 0xc4, 0x1a, 0x84, 0x01, 0x77, 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0x8f, 0xa0, 0x64, 0xae, 0xc5, 0x55, 0x86,
+ 0x94, 0x87, 0x49, 0xdf, 0xdf, 0x04, 0x5a, 0x08, 0xc8, 0xfc, 0x51, 0x49, 0x40, 0xb9, 0xe7, 0x2b,
+ 0x09, 0xf8, 0x95, 0x0b, 0x5f, 0x83, 0x92, 0x79, 0xa6, 0x92, 0x80, 0x72, 0x7b, 0xe9, 0xda, 0x5a,
+ 0x1a, 0x8e, 0xc4, 0xbf, 0xe8, 0xf0, 0xed, 0xec, 0xc2, 0xa8, 0x7d, 0xbb, 0x30, 0x6a, 0x9f, 0xe6,
+ 0x06, 0x9a, 0xcd, 0x0d, 0xf4, 0x75, 0x6e, 0xa0, 0xf3, 0xb9, 0x81, 0x5e, 0x1d, 0xff, 0xc1, 0x2f,
+ 0xf4, 0xa0, 0xe8, 0x5e, 0xd6, 0xfa, 0x8a, 0xe4, 0xbc, 0xff, 0x23, 0x00, 0x00, 0xff, 0xff, 0x4f,
+ 0x4a, 0x87, 0xf3, 0x95, 0x07, 0x00, 0x00,
+}
+
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn
@@ -172,14 +504,15 @@ var _ grpc.ClientConn
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4
-// Client API for Namespaces service
-
+// NamespacesClient is the client API for Namespaces service.
+//
+// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type NamespacesClient interface {
Get(ctx context.Context, in *GetNamespaceRequest, opts ...grpc.CallOption) (*GetNamespaceResponse, error)
List(ctx context.Context, in *ListNamespacesRequest, opts ...grpc.CallOption) (*ListNamespacesResponse, error)
Create(ctx context.Context, in *CreateNamespaceRequest, opts ...grpc.CallOption) (*CreateNamespaceResponse, error)
Update(ctx context.Context, in *UpdateNamespaceRequest, opts ...grpc.CallOption) (*UpdateNamespaceResponse, error)
- Delete(ctx context.Context, in *DeleteNamespaceRequest, opts ...grpc.CallOption) (*google_protobuf1.Empty, error)
+ Delete(ctx context.Context, in *DeleteNamespaceRequest, opts ...grpc.CallOption) (*types.Empty, error)
}
type namespacesClient struct {
@@ -192,7 +525,7 @@ func NewNamespacesClient(cc *grpc.ClientConn) NamespacesClient {
func (c *namespacesClient) Get(ctx context.Context, in *GetNamespaceRequest, opts ...grpc.CallOption) (*GetNamespaceResponse, error) {
out := new(GetNamespaceResponse)
- err := grpc.Invoke(ctx, "/containerd.services.namespaces.v1.Namespaces/Get", in, out, c.cc, opts...)
+ err := c.cc.Invoke(ctx, "/containerd.services.namespaces.v1.Namespaces/Get", in, out, opts...)
if err != nil {
return nil, err
}
@@ -201,7 +534,7 @@ func (c *namespacesClient) Get(ctx context.Context, in *GetNamespaceRequest, opt
func (c *namespacesClient) List(ctx context.Context, in *ListNamespacesRequest, opts ...grpc.CallOption) (*ListNamespacesResponse, error) {
out := new(ListNamespacesResponse)
- err := grpc.Invoke(ctx, "/containerd.services.namespaces.v1.Namespaces/List", in, out, c.cc, opts...)
+ err := c.cc.Invoke(ctx, "/containerd.services.namespaces.v1.Namespaces/List", in, out, opts...)
if err != nil {
return nil, err
}
@@ -210,7 +543,7 @@ func (c *namespacesClient) List(ctx context.Context, in *ListNamespacesRequest,
func (c *namespacesClient) Create(ctx context.Context, in *CreateNamespaceRequest, opts ...grpc.CallOption) (*CreateNamespaceResponse, error) {
out := new(CreateNamespaceResponse)
- err := grpc.Invoke(ctx, "/containerd.services.namespaces.v1.Namespaces/Create", in, out, c.cc, opts...)
+ err := c.cc.Invoke(ctx, "/containerd.services.namespaces.v1.Namespaces/Create", in, out, opts...)
if err != nil {
return nil, err
}
@@ -219,30 +552,29 @@ func (c *namespacesClient) Create(ctx context.Context, in *CreateNamespaceReques
func (c *namespacesClient) Update(ctx context.Context, in *UpdateNamespaceRequest, opts ...grpc.CallOption) (*UpdateNamespaceResponse, error) {
out := new(UpdateNamespaceResponse)
- err := grpc.Invoke(ctx, "/containerd.services.namespaces.v1.Namespaces/Update", in, out, c.cc, opts...)
+ err := c.cc.Invoke(ctx, "/containerd.services.namespaces.v1.Namespaces/Update", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
-func (c *namespacesClient) Delete(ctx context.Context, in *DeleteNamespaceRequest, opts ...grpc.CallOption) (*google_protobuf1.Empty, error) {
- out := new(google_protobuf1.Empty)
- err := grpc.Invoke(ctx, "/containerd.services.namespaces.v1.Namespaces/Delete", in, out, c.cc, opts...)
+func (c *namespacesClient) Delete(ctx context.Context, in *DeleteNamespaceRequest, opts ...grpc.CallOption) (*types.Empty, error) {
+ out := new(types.Empty)
+ err := c.cc.Invoke(ctx, "/containerd.services.namespaces.v1.Namespaces/Delete", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
-// Server API for Namespaces service
-
+// NamespacesServer is the server API for Namespaces service.
type NamespacesServer interface {
Get(context.Context, *GetNamespaceRequest) (*GetNamespaceResponse, error)
List(context.Context, *ListNamespacesRequest) (*ListNamespacesResponse, error)
Create(context.Context, *CreateNamespaceRequest) (*CreateNamespaceResponse, error)
Update(context.Context, *UpdateNamespaceRequest) (*UpdateNamespaceResponse, error)
- Delete(context.Context, *DeleteNamespaceRequest) (*google_protobuf1.Empty, error)
+ Delete(context.Context, *DeleteNamespaceRequest) (*types.Empty, error)
}
func RegisterNamespacesServer(s *grpc.Server, srv NamespacesServer) {
@@ -406,6 +738,9 @@ func (m *Namespace) MarshalTo(dAtA []byte) (int, error) {
i += copy(dAtA[i:], v)
}
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -430,6 +765,9 @@ func (m *GetNamespaceRequest) MarshalTo(dAtA []byte) (int, error) {
i = encodeVarintNamespace(dAtA, i, uint64(len(m.Name)))
i += copy(dAtA[i:], m.Name)
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -456,6 +794,9 @@ func (m *GetNamespaceResponse) MarshalTo(dAtA []byte) (int, error) {
return 0, err
}
i += n1
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -480,6 +821,9 @@ func (m *ListNamespacesRequest) MarshalTo(dAtA []byte) (int, error) {
i = encodeVarintNamespace(dAtA, i, uint64(len(m.Filter)))
i += copy(dAtA[i:], m.Filter)
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -510,6 +854,9 @@ func (m *ListNamespacesResponse) MarshalTo(dAtA []byte) (int, error) {
i += n
}
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -536,6 +883,9 @@ func (m *CreateNamespaceRequest) MarshalTo(dAtA []byte) (int, error) {
return 0, err
}
i += n2
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -562,6 +912,9 @@ func (m *CreateNamespaceResponse) MarshalTo(dAtA []byte) (int, error) {
return 0, err
}
i += n3
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -598,6 +951,9 @@ func (m *UpdateNamespaceRequest) MarshalTo(dAtA []byte) (int, error) {
}
i += n5
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -624,6 +980,9 @@ func (m *UpdateNamespaceResponse) MarshalTo(dAtA []byte) (int, error) {
return 0, err
}
i += n6
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -648,6 +1007,9 @@ func (m *DeleteNamespaceRequest) MarshalTo(dAtA []byte) (int, error) {
i = encodeVarintNamespace(dAtA, i, uint64(len(m.Name)))
i += copy(dAtA[i:], m.Name)
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -661,6 +1023,9 @@ func encodeVarintNamespace(dAtA []byte, offset int, v uint64) int {
return offset + 1
}
func (m *Namespace) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.Name)
@@ -675,38 +1040,62 @@ func (m *Namespace) Size() (n int) {
n += mapEntrySize + 1 + sovNamespace(uint64(mapEntrySize))
}
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *GetNamespaceRequest) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.Name)
if l > 0 {
n += 1 + l + sovNamespace(uint64(l))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *GetNamespaceResponse) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = m.Namespace.Size()
n += 1 + l + sovNamespace(uint64(l))
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *ListNamespacesRequest) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.Filter)
if l > 0 {
n += 1 + l + sovNamespace(uint64(l))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *ListNamespacesResponse) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
if len(m.Namespaces) > 0 {
@@ -715,26 +1104,44 @@ func (m *ListNamespacesResponse) Size() (n int) {
n += 1 + l + sovNamespace(uint64(l))
}
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *CreateNamespaceRequest) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = m.Namespace.Size()
n += 1 + l + sovNamespace(uint64(l))
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *CreateNamespaceResponse) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = m.Namespace.Size()
n += 1 + l + sovNamespace(uint64(l))
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *UpdateNamespaceRequest) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = m.Namespace.Size()
@@ -743,24 +1150,39 @@ func (m *UpdateNamespaceRequest) Size() (n int) {
l = m.UpdateMask.Size()
n += 1 + l + sovNamespace(uint64(l))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *UpdateNamespaceResponse) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = m.Namespace.Size()
n += 1 + l + sovNamespace(uint64(l))
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *DeleteNamespaceRequest) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.Name)
if l > 0 {
n += 1 + l + sovNamespace(uint64(l))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
@@ -785,7 +1207,7 @@ func (this *Namespace) String() string {
for k, _ := range this.Labels {
keysForLabels = append(keysForLabels, k)
}
- sortkeys.Strings(keysForLabels)
+ github_com_gogo_protobuf_sortkeys.Strings(keysForLabels)
mapStringForLabels := "map[string]string{"
for _, k := range keysForLabels {
mapStringForLabels += fmt.Sprintf("%v: %v,", k, this.Labels[k])
@@ -794,6 +1216,7 @@ func (this *Namespace) String() string {
s := strings.Join([]string{`&Namespace{`,
`Name:` + fmt.Sprintf("%v", this.Name) + `,`,
`Labels:` + mapStringForLabels + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -804,6 +1227,7 @@ func (this *GetNamespaceRequest) String() string {
}
s := strings.Join([]string{`&GetNamespaceRequest{`,
`Name:` + fmt.Sprintf("%v", this.Name) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -814,6 +1238,7 @@ func (this *GetNamespaceResponse) String() string {
}
s := strings.Join([]string{`&GetNamespaceResponse{`,
`Namespace:` + strings.Replace(strings.Replace(this.Namespace.String(), "Namespace", "Namespace", 1), `&`, ``, 1) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -824,6 +1249,7 @@ func (this *ListNamespacesRequest) String() string {
}
s := strings.Join([]string{`&ListNamespacesRequest{`,
`Filter:` + fmt.Sprintf("%v", this.Filter) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -834,6 +1260,7 @@ func (this *ListNamespacesResponse) String() string {
}
s := strings.Join([]string{`&ListNamespacesResponse{`,
`Namespaces:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Namespaces), "Namespace", "Namespace", 1), `&`, ``, 1) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -844,6 +1271,7 @@ func (this *CreateNamespaceRequest) String() string {
}
s := strings.Join([]string{`&CreateNamespaceRequest{`,
`Namespace:` + strings.Replace(strings.Replace(this.Namespace.String(), "Namespace", "Namespace", 1), `&`, ``, 1) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -854,6 +1282,7 @@ func (this *CreateNamespaceResponse) String() string {
}
s := strings.Join([]string{`&CreateNamespaceResponse{`,
`Namespace:` + strings.Replace(strings.Replace(this.Namespace.String(), "Namespace", "Namespace", 1), `&`, ``, 1) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -864,7 +1293,8 @@ func (this *UpdateNamespaceRequest) String() string {
}
s := strings.Join([]string{`&UpdateNamespaceRequest{`,
`Namespace:` + strings.Replace(strings.Replace(this.Namespace.String(), "Namespace", "Namespace", 1), `&`, ``, 1) + `,`,
- `UpdateMask:` + strings.Replace(fmt.Sprintf("%v", this.UpdateMask), "FieldMask", "google_protobuf2.FieldMask", 1) + `,`,
+ `UpdateMask:` + strings.Replace(fmt.Sprintf("%v", this.UpdateMask), "FieldMask", "types.FieldMask", 1) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -875,6 +1305,7 @@ func (this *UpdateNamespaceResponse) String() string {
}
s := strings.Join([]string{`&UpdateNamespaceResponse{`,
`Namespace:` + strings.Replace(strings.Replace(this.Namespace.String(), "Namespace", "Namespace", 1), `&`, ``, 1) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -885,6 +1316,7 @@ func (this *DeleteNamespaceRequest) String() string {
}
s := strings.Join([]string{`&DeleteNamespaceRequest{`,
`Name:` + fmt.Sprintf("%v", this.Name) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -912,7 +1344,7 @@ func (m *Namespace) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -940,7 +1372,7 @@ func (m *Namespace) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -950,6 +1382,9 @@ func (m *Namespace) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthNamespace
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthNamespace
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -969,7 +1404,7 @@ func (m *Namespace) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -978,6 +1413,9 @@ func (m *Namespace) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthNamespace
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthNamespace
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -998,7 +1436,7 @@ func (m *Namespace) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1015,7 +1453,7 @@ func (m *Namespace) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ stringLenmapkey |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1025,6 +1463,9 @@ func (m *Namespace) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthNamespace
}
postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey < 0 {
+ return ErrInvalidLengthNamespace
+ }
if postStringIndexmapkey > l {
return io.ErrUnexpectedEOF
}
@@ -1041,7 +1482,7 @@ func (m *Namespace) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLenmapvalue |= (uint64(b) & 0x7F) << shift
+ stringLenmapvalue |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1051,6 +1492,9 @@ func (m *Namespace) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthNamespace
}
postStringIndexmapvalue := iNdEx + intStringLenmapvalue
+ if postStringIndexmapvalue < 0 {
+ return ErrInvalidLengthNamespace
+ }
if postStringIndexmapvalue > l {
return io.ErrUnexpectedEOF
}
@@ -1082,9 +1526,13 @@ func (m *Namespace) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthNamespace
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthNamespace
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -1109,7 +1557,7 @@ func (m *GetNamespaceRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1137,7 +1585,7 @@ func (m *GetNamespaceRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1147,6 +1595,9 @@ func (m *GetNamespaceRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthNamespace
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthNamespace
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -1161,9 +1612,13 @@ func (m *GetNamespaceRequest) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthNamespace
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthNamespace
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -1188,7 +1643,7 @@ func (m *GetNamespaceResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1216,7 +1671,7 @@ func (m *GetNamespaceResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1225,6 +1680,9 @@ func (m *GetNamespaceResponse) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthNamespace
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthNamespace
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -1241,9 +1699,13 @@ func (m *GetNamespaceResponse) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthNamespace
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthNamespace
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -1268,7 +1730,7 @@ func (m *ListNamespacesRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1296,7 +1758,7 @@ func (m *ListNamespacesRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1306,6 +1768,9 @@ func (m *ListNamespacesRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthNamespace
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthNamespace
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -1320,9 +1785,13 @@ func (m *ListNamespacesRequest) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthNamespace
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthNamespace
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -1347,7 +1816,7 @@ func (m *ListNamespacesResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1375,7 +1844,7 @@ func (m *ListNamespacesResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1384,6 +1853,9 @@ func (m *ListNamespacesResponse) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthNamespace
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthNamespace
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -1401,9 +1873,13 @@ func (m *ListNamespacesResponse) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthNamespace
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthNamespace
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -1428,7 +1904,7 @@ func (m *CreateNamespaceRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1456,7 +1932,7 @@ func (m *CreateNamespaceRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1465,6 +1941,9 @@ func (m *CreateNamespaceRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthNamespace
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthNamespace
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -1481,9 +1960,13 @@ func (m *CreateNamespaceRequest) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthNamespace
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthNamespace
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -1508,7 +1991,7 @@ func (m *CreateNamespaceResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1536,7 +2019,7 @@ func (m *CreateNamespaceResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1545,6 +2028,9 @@ func (m *CreateNamespaceResponse) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthNamespace
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthNamespace
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -1561,9 +2047,13 @@ func (m *CreateNamespaceResponse) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthNamespace
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthNamespace
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -1588,7 +2078,7 @@ func (m *UpdateNamespaceRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1616,7 +2106,7 @@ func (m *UpdateNamespaceRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1625,6 +2115,9 @@ func (m *UpdateNamespaceRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthNamespace
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthNamespace
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -1646,7 +2139,7 @@ func (m *UpdateNamespaceRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1655,11 +2148,14 @@ func (m *UpdateNamespaceRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthNamespace
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthNamespace
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.UpdateMask == nil {
- m.UpdateMask = &google_protobuf2.FieldMask{}
+ m.UpdateMask = &types.FieldMask{}
}
if err := m.UpdateMask.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
@@ -1674,9 +2170,13 @@ func (m *UpdateNamespaceRequest) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthNamespace
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthNamespace
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -1701,7 +2201,7 @@ func (m *UpdateNamespaceResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1729,7 +2229,7 @@ func (m *UpdateNamespaceResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1738,6 +2238,9 @@ func (m *UpdateNamespaceResponse) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthNamespace
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthNamespace
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -1754,9 +2257,13 @@ func (m *UpdateNamespaceResponse) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthNamespace
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthNamespace
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -1781,7 +2288,7 @@ func (m *DeleteNamespaceRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1809,7 +2316,7 @@ func (m *DeleteNamespaceRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1819,6 +2326,9 @@ func (m *DeleteNamespaceRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthNamespace
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthNamespace
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -1833,9 +2343,13 @@ func (m *DeleteNamespaceRequest) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthNamespace
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthNamespace
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -1899,10 +2413,13 @@ func skipNamespace(dAtA []byte) (n int, err error) {
break
}
}
- iNdEx += length
if length < 0 {
return 0, ErrInvalidLengthNamespace
}
+ iNdEx += length
+ if iNdEx < 0 {
+ return 0, ErrInvalidLengthNamespace
+ }
return iNdEx, nil
case 3:
for {
@@ -1931,6 +2448,9 @@ func skipNamespace(dAtA []byte) (n int, err error) {
return 0, err
}
iNdEx = start + next
+ if iNdEx < 0 {
+ return 0, ErrInvalidLengthNamespace
+ }
}
return iNdEx, nil
case 4:
@@ -1949,46 +2469,3 @@ var (
ErrInvalidLengthNamespace = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowNamespace = fmt.Errorf("proto: integer overflow")
)
-
-func init() {
- proto.RegisterFile("github.com/containerd/containerd/api/services/namespaces/v1/namespace.proto", fileDescriptorNamespace)
-}
-
-var fileDescriptorNamespace = []byte{
- // 551 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x55, 0xcd, 0x6e, 0xd3, 0x4c,
- 0x14, 0xcd, 0x24, 0xf9, 0x2c, 0xe5, 0x7a, 0xf3, 0x69, 0x08, 0x26, 0x32, 0x92, 0x09, 0x5e, 0x15,
- 0xa9, 0x1a, 0xab, 0x41, 0x82, 0xfe, 0xec, 0x0a, 0x6d, 0x17, 0x14, 0x84, 0x2c, 0x21, 0x21, 0x58,
- 0x80, 0x93, 0x4c, 0x5c, 0x13, 0xc7, 0x36, 0x9e, 0xb1, 0xa5, 0x88, 0x05, 0xbc, 0x0d, 0x1b, 0x1e,
- 0x24, 0x4b, 0x96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d, 0x13, 0xca, 0xf1, 0x83, 0x0a, 0x12,
- 0x4a, 0x82, 0xa8, 0x3f, 0xbc, 0x32, 0x2e, 0x5f, 0xc3, 0x07, 0x68, 0x8a, 0x48, 0xe0, 0x2a, 0x5f,
- 0x97, 0xd2, 0xb0, 0xe9, 0x7b, 0x1b, 0x20, 0x73, 0xf2, 0x8f, 0xa0, 0x64, 0xae, 0xc5, 0x55, 0x86,
- 0x94, 0x87, 0x49, 0xdf, 0xdf, 0x04, 0x5a, 0x08, 0xc8, 0xfc, 0x51, 0x49, 0x40, 0xb9, 0xe7, 0x2b,
- 0x09, 0xf8, 0x95, 0x0b, 0x5f, 0x83, 0x92, 0x79, 0xa6, 0x92, 0x80, 0x72, 0x7b, 0xe9, 0xda, 0x5a,
- 0x1a, 0x8e, 0xc4, 0xbf, 0xe8, 0xf0, 0xed, 0xec, 0xc2, 0xa8, 0x7d, 0xbb, 0x30, 0x6a, 0x9f, 0xe6,
- 0x06, 0x9a, 0xcd, 0x0d, 0xf4, 0x75, 0x6e, 0xa0, 0xf3, 0xb9, 0x81, 0x5e, 0x1d, 0xff, 0xc1, 0x2f,
- 0xf4, 0xa0, 0xe8, 0x5e, 0xd6, 0xfa, 0x8a, 0xe4, 0xbc, 0xff, 0x23, 0x00, 0x00, 0xff, 0xff, 0x4f,
- 0x4a, 0x87, 0xf3, 0x95, 0x07, 0x00, 0x00,
-}
diff --git a/api/services/snapshots/v1/snapshots.pb.go b/api/services/snapshots/v1/snapshots.pb.go
index 1693af0ff..1aa7585be 100644
--- a/api/services/snapshots/v1/snapshots.pb.go
+++ b/api/services/snapshots/v1/snapshots.pb.go
@@ -1,55 +1,23 @@
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: github.com/containerd/containerd/api/services/snapshots/v1/snapshots.proto
-/*
- Package snapshots is a generated protocol buffer package.
-
- It is generated from these files:
- github.com/containerd/containerd/api/services/snapshots/v1/snapshots.proto
-
- It has these top-level messages:
- PrepareSnapshotRequest
- PrepareSnapshotResponse
- ViewSnapshotRequest
- ViewSnapshotResponse
- MountsRequest
- MountsResponse
- RemoveSnapshotRequest
- CommitSnapshotRequest
- StatSnapshotRequest
- Info
- StatSnapshotResponse
- UpdateSnapshotRequest
- UpdateSnapshotResponse
- ListSnapshotsRequest
- ListSnapshotsResponse
- UsageRequest
- UsageResponse
-*/
package snapshots
-import proto "github.com/gogo/protobuf/proto"
-import fmt "fmt"
-import math "math"
-
-// skipping weak import gogoproto "github.com/gogo/protobuf/gogoproto"
-import google_protobuf1 "github.com/gogo/protobuf/types"
-import google_protobuf2 "github.com/gogo/protobuf/types"
-import _ "github.com/gogo/protobuf/types"
-import containerd_types "github.com/containerd/containerd/api/types"
-
-import time "time"
-
-import context "golang.org/x/net/context"
-import grpc "google.golang.org/grpc"
-
-import types "github.com/gogo/protobuf/types"
-
-import strings "strings"
-import reflect "reflect"
-import sortkeys "github.com/gogo/protobuf/sortkeys"
-
-import io "io"
+import (
+ context "context"
+ fmt "fmt"
+ types "github.com/containerd/containerd/api/types"
+ 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"
+ types1 "github.com/gogo/protobuf/types"
+ grpc "google.golang.org/grpc"
+ io "io"
+ math "math"
+ reflect "reflect"
+ strings "strings"
+ time "time"
+)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
@@ -78,6 +46,7 @@ var Kind_name = map[int32]string{
2: "ACTIVE",
3: "COMMITTED",
}
+
var Kind_value = map[string]int32{
"UNKNOWN": 0,
"VIEW": 1,
@@ -88,7 +57,10 @@ var Kind_value = map[string]int32{
func (x Kind) String() string {
return proto.EnumName(Kind_name, int32(x))
}
-func (Kind) EnumDescriptor() ([]byte, []int) { return fileDescriptorSnapshots, []int{0} }
+
+func (Kind) EnumDescriptor() ([]byte, []int) {
+ return fileDescriptor_cfc0ddf12791f168, []int{0}
+}
type PrepareSnapshotRequest struct {
Snapshotter string `protobuf:"bytes,1,opt,name=snapshotter,proto3" json:"snapshotter,omitempty"`
@@ -97,20 +69,82 @@ type PrepareSnapshotRequest struct {
// Labels are arbitrary data on snapshots.
//
// The combined size of a key/value pair cannot exceed 4096 bytes.
- Labels map[string]string `protobuf:"bytes,4,rep,name=labels" json:"labels,omitempty" 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"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *PrepareSnapshotRequest) Reset() { *m = PrepareSnapshotRequest{} }
-func (*PrepareSnapshotRequest) ProtoMessage() {}
-func (*PrepareSnapshotRequest) Descriptor() ([]byte, []int) { return fileDescriptorSnapshots, []int{0} }
+func (m *PrepareSnapshotRequest) Reset() { *m = PrepareSnapshotRequest{} }
+func (*PrepareSnapshotRequest) ProtoMessage() {}
+func (*PrepareSnapshotRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_cfc0ddf12791f168, []int{0}
+}
+func (m *PrepareSnapshotRequest) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *PrepareSnapshotRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_PrepareSnapshotRequest.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *PrepareSnapshotRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_PrepareSnapshotRequest.Merge(m, src)
+}
+func (m *PrepareSnapshotRequest) XXX_Size() int {
+ return m.Size()
+}
+func (m *PrepareSnapshotRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_PrepareSnapshotRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_PrepareSnapshotRequest proto.InternalMessageInfo
type PrepareSnapshotResponse struct {
- Mounts []*containerd_types.Mount `protobuf:"bytes,1,rep,name=mounts" json:"mounts,omitempty"`
+ Mounts []*types.Mount `protobuf:"bytes,1,rep,name=mounts,proto3" json:"mounts,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *PrepareSnapshotResponse) Reset() { *m = PrepareSnapshotResponse{} }
-func (*PrepareSnapshotResponse) ProtoMessage() {}
-func (*PrepareSnapshotResponse) Descriptor() ([]byte, []int) { return fileDescriptorSnapshots, []int{1} }
+func (m *PrepareSnapshotResponse) Reset() { *m = PrepareSnapshotResponse{} }
+func (*PrepareSnapshotResponse) ProtoMessage() {}
+func (*PrepareSnapshotResponse) Descriptor() ([]byte, []int) {
+ return fileDescriptor_cfc0ddf12791f168, []int{1}
+}
+func (m *PrepareSnapshotResponse) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *PrepareSnapshotResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_PrepareSnapshotResponse.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *PrepareSnapshotResponse) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_PrepareSnapshotResponse.Merge(m, src)
+}
+func (m *PrepareSnapshotResponse) XXX_Size() int {
+ return m.Size()
+}
+func (m *PrepareSnapshotResponse) XXX_DiscardUnknown() {
+ xxx_messageInfo_PrepareSnapshotResponse.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_PrepareSnapshotResponse proto.InternalMessageInfo
type ViewSnapshotRequest struct {
Snapshotter string `protobuf:"bytes,1,opt,name=snapshotter,proto3" json:"snapshotter,omitempty"`
@@ -119,46 +153,201 @@ type ViewSnapshotRequest struct {
// Labels are arbitrary data on snapshots.
//
// The combined size of a key/value pair cannot exceed 4096 bytes.
- Labels map[string]string `protobuf:"bytes,4,rep,name=labels" json:"labels,omitempty" 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"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *ViewSnapshotRequest) Reset() { *m = ViewSnapshotRequest{} }
-func (*ViewSnapshotRequest) ProtoMessage() {}
-func (*ViewSnapshotRequest) Descriptor() ([]byte, []int) { return fileDescriptorSnapshots, []int{2} }
+func (m *ViewSnapshotRequest) Reset() { *m = ViewSnapshotRequest{} }
+func (*ViewSnapshotRequest) ProtoMessage() {}
+func (*ViewSnapshotRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_cfc0ddf12791f168, []int{2}
+}
+func (m *ViewSnapshotRequest) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *ViewSnapshotRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_ViewSnapshotRequest.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *ViewSnapshotRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_ViewSnapshotRequest.Merge(m, src)
+}
+func (m *ViewSnapshotRequest) XXX_Size() int {
+ return m.Size()
+}
+func (m *ViewSnapshotRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_ViewSnapshotRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_ViewSnapshotRequest proto.InternalMessageInfo
type ViewSnapshotResponse struct {
- Mounts []*containerd_types.Mount `protobuf:"bytes,1,rep,name=mounts" json:"mounts,omitempty"`
+ Mounts []*types.Mount `protobuf:"bytes,1,rep,name=mounts,proto3" json:"mounts,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *ViewSnapshotResponse) Reset() { *m = ViewSnapshotResponse{} }
-func (*ViewSnapshotResponse) ProtoMessage() {}
-func (*ViewSnapshotResponse) Descriptor() ([]byte, []int) { return fileDescriptorSnapshots, []int{3} }
+func (m *ViewSnapshotResponse) Reset() { *m = ViewSnapshotResponse{} }
+func (*ViewSnapshotResponse) ProtoMessage() {}
+func (*ViewSnapshotResponse) Descriptor() ([]byte, []int) {
+ return fileDescriptor_cfc0ddf12791f168, []int{3}
+}
+func (m *ViewSnapshotResponse) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *ViewSnapshotResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_ViewSnapshotResponse.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *ViewSnapshotResponse) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_ViewSnapshotResponse.Merge(m, src)
+}
+func (m *ViewSnapshotResponse) XXX_Size() int {
+ return m.Size()
+}
+func (m *ViewSnapshotResponse) XXX_DiscardUnknown() {
+ xxx_messageInfo_ViewSnapshotResponse.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_ViewSnapshotResponse proto.InternalMessageInfo
type MountsRequest struct {
- Snapshotter string `protobuf:"bytes,1,opt,name=snapshotter,proto3" json:"snapshotter,omitempty"`
- Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
+ Snapshotter string `protobuf:"bytes,1,opt,name=snapshotter,proto3" json:"snapshotter,omitempty"`
+ Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *MountsRequest) Reset() { *m = MountsRequest{} }
-func (*MountsRequest) ProtoMessage() {}
-func (*MountsRequest) Descriptor() ([]byte, []int) { return fileDescriptorSnapshots, []int{4} }
+func (m *MountsRequest) Reset() { *m = MountsRequest{} }
+func (*MountsRequest) ProtoMessage() {}
+func (*MountsRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_cfc0ddf12791f168, []int{4}
+}
+func (m *MountsRequest) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *MountsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_MountsRequest.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *MountsRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_MountsRequest.Merge(m, src)
+}
+func (m *MountsRequest) XXX_Size() int {
+ return m.Size()
+}
+func (m *MountsRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_MountsRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_MountsRequest proto.InternalMessageInfo
type MountsResponse struct {
- Mounts []*containerd_types.Mount `protobuf:"bytes,1,rep,name=mounts" json:"mounts,omitempty"`
+ Mounts []*types.Mount `protobuf:"bytes,1,rep,name=mounts,proto3" json:"mounts,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *MountsResponse) Reset() { *m = MountsResponse{} }
-func (*MountsResponse) ProtoMessage() {}
-func (*MountsResponse) Descriptor() ([]byte, []int) { return fileDescriptorSnapshots, []int{5} }
+func (m *MountsResponse) Reset() { *m = MountsResponse{} }
+func (*MountsResponse) ProtoMessage() {}
+func (*MountsResponse) Descriptor() ([]byte, []int) {
+ return fileDescriptor_cfc0ddf12791f168, []int{5}
+}
+func (m *MountsResponse) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *MountsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_MountsResponse.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *MountsResponse) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_MountsResponse.Merge(m, src)
+}
+func (m *MountsResponse) XXX_Size() int {
+ return m.Size()
+}
+func (m *MountsResponse) XXX_DiscardUnknown() {
+ xxx_messageInfo_MountsResponse.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_MountsResponse proto.InternalMessageInfo
type RemoveSnapshotRequest struct {
- Snapshotter string `protobuf:"bytes,1,opt,name=snapshotter,proto3" json:"snapshotter,omitempty"`
- Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
+ Snapshotter string `protobuf:"bytes,1,opt,name=snapshotter,proto3" json:"snapshotter,omitempty"`
+ Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *RemoveSnapshotRequest) Reset() { *m = RemoveSnapshotRequest{} }
-func (*RemoveSnapshotRequest) ProtoMessage() {}
-func (*RemoveSnapshotRequest) Descriptor() ([]byte, []int) { return fileDescriptorSnapshots, []int{6} }
+func (m *RemoveSnapshotRequest) Reset() { *m = RemoveSnapshotRequest{} }
+func (*RemoveSnapshotRequest) ProtoMessage() {}
+func (*RemoveSnapshotRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_cfc0ddf12791f168, []int{6}
+}
+func (m *RemoveSnapshotRequest) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *RemoveSnapshotRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_RemoveSnapshotRequest.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *RemoveSnapshotRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_RemoveSnapshotRequest.Merge(m, src)
+}
+func (m *RemoveSnapshotRequest) XXX_Size() int {
+ return m.Size()
+}
+func (m *RemoveSnapshotRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_RemoveSnapshotRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_RemoveSnapshotRequest proto.InternalMessageInfo
type CommitSnapshotRequest struct {
Snapshotter string `protobuf:"bytes,1,opt,name=snapshotter,proto3" json:"snapshotter,omitempty"`
@@ -167,117 +356,432 @@ type CommitSnapshotRequest struct {
// Labels are arbitrary data on snapshots.
//
// The combined size of a key/value pair cannot exceed 4096 bytes.
- Labels map[string]string `protobuf:"bytes,4,rep,name=labels" json:"labels,omitempty" 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"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *CommitSnapshotRequest) Reset() { *m = CommitSnapshotRequest{} }
-func (*CommitSnapshotRequest) ProtoMessage() {}
-func (*CommitSnapshotRequest) Descriptor() ([]byte, []int) { return fileDescriptorSnapshots, []int{7} }
+func (m *CommitSnapshotRequest) Reset() { *m = CommitSnapshotRequest{} }
+func (*CommitSnapshotRequest) ProtoMessage() {}
+func (*CommitSnapshotRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_cfc0ddf12791f168, []int{7}
+}
+func (m *CommitSnapshotRequest) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *CommitSnapshotRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_CommitSnapshotRequest.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *CommitSnapshotRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_CommitSnapshotRequest.Merge(m, src)
+}
+func (m *CommitSnapshotRequest) XXX_Size() int {
+ return m.Size()
+}
+func (m *CommitSnapshotRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_CommitSnapshotRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_CommitSnapshotRequest proto.InternalMessageInfo
type StatSnapshotRequest struct {
- Snapshotter string `protobuf:"bytes,1,opt,name=snapshotter,proto3" json:"snapshotter,omitempty"`
- Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
+ Snapshotter string `protobuf:"bytes,1,opt,name=snapshotter,proto3" json:"snapshotter,omitempty"`
+ Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *StatSnapshotRequest) Reset() { *m = StatSnapshotRequest{} }
-func (*StatSnapshotRequest) ProtoMessage() {}
-func (*StatSnapshotRequest) Descriptor() ([]byte, []int) { return fileDescriptorSnapshots, []int{8} }
+func (m *StatSnapshotRequest) Reset() { *m = StatSnapshotRequest{} }
+func (*StatSnapshotRequest) ProtoMessage() {}
+func (*StatSnapshotRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_cfc0ddf12791f168, []int{8}
+}
+func (m *StatSnapshotRequest) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *StatSnapshotRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_StatSnapshotRequest.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *StatSnapshotRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_StatSnapshotRequest.Merge(m, src)
+}
+func (m *StatSnapshotRequest) XXX_Size() int {
+ return m.Size()
+}
+func (m *StatSnapshotRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_StatSnapshotRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_StatSnapshotRequest proto.InternalMessageInfo
type Info struct {
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Parent string `protobuf:"bytes,2,opt,name=parent,proto3" json:"parent,omitempty"`
Kind Kind `protobuf:"varint,3,opt,name=kind,proto3,enum=containerd.services.snapshots.v1.Kind" json:"kind,omitempty"`
// CreatedAt provides the time at which the snapshot was created.
- CreatedAt time.Time `protobuf:"bytes,4,opt,name=created_at,json=createdAt,stdtime" json:"created_at"`
+ CreatedAt time.Time `protobuf:"bytes,4,opt,name=created_at,json=createdAt,proto3,stdtime" json:"created_at"`
// UpdatedAt provides the time the info was last updated.
- UpdatedAt time.Time `protobuf:"bytes,5,opt,name=updated_at,json=updatedAt,stdtime" json:"updated_at"`
+ UpdatedAt time.Time `protobuf:"bytes,5,opt,name=updated_at,json=updatedAt,proto3,stdtime" json:"updated_at"`
// Labels are arbitrary data on snapshots.
//
// The combined size of a key/value pair cannot exceed 4096 bytes.
- Labels map[string]string `protobuf:"bytes,6,rep,name=labels" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
+ Labels map[string]string `protobuf:"bytes,6,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:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *Info) Reset() { *m = Info{} }
-func (*Info) ProtoMessage() {}
-func (*Info) Descriptor() ([]byte, []int) { return fileDescriptorSnapshots, []int{9} }
+func (m *Info) Reset() { *m = Info{} }
+func (*Info) ProtoMessage() {}
+func (*Info) Descriptor() ([]byte, []int) {
+ return fileDescriptor_cfc0ddf12791f168, []int{9}
+}
+func (m *Info) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *Info) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_Info.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *Info) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_Info.Merge(m, src)
+}
+func (m *Info) XXX_Size() int {
+ return m.Size()
+}
+func (m *Info) XXX_DiscardUnknown() {
+ xxx_messageInfo_Info.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Info proto.InternalMessageInfo
type StatSnapshotResponse struct {
- Info Info `protobuf:"bytes,1,opt,name=info" json:"info"`
+ Info Info `protobuf:"bytes,1,opt,name=info,proto3" json:"info"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *StatSnapshotResponse) Reset() { *m = StatSnapshotResponse{} }
-func (*StatSnapshotResponse) ProtoMessage() {}
-func (*StatSnapshotResponse) Descriptor() ([]byte, []int) { return fileDescriptorSnapshots, []int{10} }
+func (m *StatSnapshotResponse) Reset() { *m = StatSnapshotResponse{} }
+func (*StatSnapshotResponse) ProtoMessage() {}
+func (*StatSnapshotResponse) Descriptor() ([]byte, []int) {
+ return fileDescriptor_cfc0ddf12791f168, []int{10}
+}
+func (m *StatSnapshotResponse) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *StatSnapshotResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_StatSnapshotResponse.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *StatSnapshotResponse) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_StatSnapshotResponse.Merge(m, src)
+}
+func (m *StatSnapshotResponse) XXX_Size() int {
+ return m.Size()
+}
+func (m *StatSnapshotResponse) XXX_DiscardUnknown() {
+ xxx_messageInfo_StatSnapshotResponse.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_StatSnapshotResponse proto.InternalMessageInfo
type UpdateSnapshotRequest struct {
Snapshotter string `protobuf:"bytes,1,opt,name=snapshotter,proto3" json:"snapshotter,omitempty"`
- Info Info `protobuf:"bytes,2,opt,name=info" json:"info"`
+ Info Info `protobuf:"bytes,2,opt,name=info,proto3" json:"info"`
// UpdateMask specifies which fields to perform the update on. If empty,
// the operation applies to all fields.
//
// In info, Name, Parent, Kind, Created are immutable,
// other field may be updated using this mask.
// If no mask is provided, all mutable field are updated.
- UpdateMask *google_protobuf2.FieldMask `protobuf:"bytes,3,opt,name=update_mask,json=updateMask" json:"update_mask,omitempty"`
+ UpdateMask *types1.FieldMask `protobuf:"bytes,3,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *UpdateSnapshotRequest) Reset() { *m = UpdateSnapshotRequest{} }
-func (*UpdateSnapshotRequest) ProtoMessage() {}
-func (*UpdateSnapshotRequest) Descriptor() ([]byte, []int) { return fileDescriptorSnapshots, []int{11} }
+func (m *UpdateSnapshotRequest) Reset() { *m = UpdateSnapshotRequest{} }
+func (*UpdateSnapshotRequest) ProtoMessage() {}
+func (*UpdateSnapshotRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_cfc0ddf12791f168, []int{11}
+}
+func (m *UpdateSnapshotRequest) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *UpdateSnapshotRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_UpdateSnapshotRequest.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *UpdateSnapshotRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_UpdateSnapshotRequest.Merge(m, src)
+}
+func (m *UpdateSnapshotRequest) XXX_Size() int {
+ return m.Size()
+}
+func (m *UpdateSnapshotRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_UpdateSnapshotRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_UpdateSnapshotRequest proto.InternalMessageInfo
type UpdateSnapshotResponse struct {
- Info Info `protobuf:"bytes,1,opt,name=info" json:"info"`
+ Info Info `protobuf:"bytes,1,opt,name=info,proto3" json:"info"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *UpdateSnapshotResponse) Reset() { *m = UpdateSnapshotResponse{} }
-func (*UpdateSnapshotResponse) ProtoMessage() {}
-func (*UpdateSnapshotResponse) Descriptor() ([]byte, []int) { return fileDescriptorSnapshots, []int{12} }
+func (m *UpdateSnapshotResponse) Reset() { *m = UpdateSnapshotResponse{} }
+func (*UpdateSnapshotResponse) ProtoMessage() {}
+func (*UpdateSnapshotResponse) Descriptor() ([]byte, []int) {
+ return fileDescriptor_cfc0ddf12791f168, []int{12}
+}
+func (m *UpdateSnapshotResponse) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *UpdateSnapshotResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_UpdateSnapshotResponse.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *UpdateSnapshotResponse) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_UpdateSnapshotResponse.Merge(m, src)
+}
+func (m *UpdateSnapshotResponse) XXX_Size() int {
+ return m.Size()
+}
+func (m *UpdateSnapshotResponse) XXX_DiscardUnknown() {
+ xxx_messageInfo_UpdateSnapshotResponse.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_UpdateSnapshotResponse proto.InternalMessageInfo
type ListSnapshotsRequest struct {
- Snapshotter string `protobuf:"bytes,1,opt,name=snapshotter,proto3" json:"snapshotter,omitempty"`
+ Snapshotter string `protobuf:"bytes,1,opt,name=snapshotter,proto3" json:"snapshotter,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *ListSnapshotsRequest) Reset() { *m = ListSnapshotsRequest{} }
-func (*ListSnapshotsRequest) ProtoMessage() {}
-func (*ListSnapshotsRequest) Descriptor() ([]byte, []int) { return fileDescriptorSnapshots, []int{13} }
+func (m *ListSnapshotsRequest) Reset() { *m = ListSnapshotsRequest{} }
+func (*ListSnapshotsRequest) ProtoMessage() {}
+func (*ListSnapshotsRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_cfc0ddf12791f168, []int{13}
+}
+func (m *ListSnapshotsRequest) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *ListSnapshotsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_ListSnapshotsRequest.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *ListSnapshotsRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_ListSnapshotsRequest.Merge(m, src)
+}
+func (m *ListSnapshotsRequest) XXX_Size() int {
+ return m.Size()
+}
+func (m *ListSnapshotsRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_ListSnapshotsRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_ListSnapshotsRequest proto.InternalMessageInfo
type ListSnapshotsResponse struct {
- Info []Info `protobuf:"bytes,1,rep,name=info" json:"info"`
+ Info []Info `protobuf:"bytes,1,rep,name=info,proto3" json:"info"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *ListSnapshotsResponse) Reset() { *m = ListSnapshotsResponse{} }
-func (*ListSnapshotsResponse) ProtoMessage() {}
-func (*ListSnapshotsResponse) Descriptor() ([]byte, []int) { return fileDescriptorSnapshots, []int{14} }
+func (m *ListSnapshotsResponse) Reset() { *m = ListSnapshotsResponse{} }
+func (*ListSnapshotsResponse) ProtoMessage() {}
+func (*ListSnapshotsResponse) Descriptor() ([]byte, []int) {
+ return fileDescriptor_cfc0ddf12791f168, []int{14}
+}
+func (m *ListSnapshotsResponse) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *ListSnapshotsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_ListSnapshotsResponse.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *ListSnapshotsResponse) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_ListSnapshotsResponse.Merge(m, src)
+}
+func (m *ListSnapshotsResponse) XXX_Size() int {
+ return m.Size()
+}
+func (m *ListSnapshotsResponse) XXX_DiscardUnknown() {
+ xxx_messageInfo_ListSnapshotsResponse.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_ListSnapshotsResponse proto.InternalMessageInfo
type UsageRequest struct {
- Snapshotter string `protobuf:"bytes,1,opt,name=snapshotter,proto3" json:"snapshotter,omitempty"`
- Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
+ Snapshotter string `protobuf:"bytes,1,opt,name=snapshotter,proto3" json:"snapshotter,omitempty"`
+ Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *UsageRequest) Reset() { *m = UsageRequest{} }
-func (*UsageRequest) ProtoMessage() {}
-func (*UsageRequest) Descriptor() ([]byte, []int) { return fileDescriptorSnapshots, []int{15} }
+func (m *UsageRequest) Reset() { *m = UsageRequest{} }
+func (*UsageRequest) ProtoMessage() {}
+func (*UsageRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_cfc0ddf12791f168, []int{15}
+}
+func (m *UsageRequest) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *UsageRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_UsageRequest.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *UsageRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_UsageRequest.Merge(m, src)
+}
+func (m *UsageRequest) XXX_Size() int {
+ return m.Size()
+}
+func (m *UsageRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_UsageRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_UsageRequest proto.InternalMessageInfo
type UsageResponse struct {
- Size_ int64 `protobuf:"varint,1,opt,name=size,proto3" json:"size,omitempty"`
- Inodes int64 `protobuf:"varint,2,opt,name=inodes,proto3" json:"inodes,omitempty"`
+ Size_ int64 `protobuf:"varint,1,opt,name=size,proto3" json:"size,omitempty"`
+ Inodes int64 `protobuf:"varint,2,opt,name=inodes,proto3" json:"inodes,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *UsageResponse) Reset() { *m = UsageResponse{} }
-func (*UsageResponse) ProtoMessage() {}
-func (*UsageResponse) Descriptor() ([]byte, []int) { return fileDescriptorSnapshots, []int{16} }
+func (m *UsageResponse) Reset() { *m = UsageResponse{} }
+func (*UsageResponse) ProtoMessage() {}
+func (*UsageResponse) Descriptor() ([]byte, []int) {
+ return fileDescriptor_cfc0ddf12791f168, []int{16}
+}
+func (m *UsageResponse) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *UsageResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_UsageResponse.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *UsageResponse) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_UsageResponse.Merge(m, src)
+}
+func (m *UsageResponse) XXX_Size() int {
+ return m.Size()
+}
+func (m *UsageResponse) XXX_DiscardUnknown() {
+ xxx_messageInfo_UsageResponse.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_UsageResponse proto.InternalMessageInfo
func init() {
+ proto.RegisterEnum("containerd.services.snapshots.v1.Kind", Kind_name, Kind_value)
proto.RegisterType((*PrepareSnapshotRequest)(nil), "containerd.services.snapshots.v1.PrepareSnapshotRequest")
+ proto.RegisterMapType((map[string]string)(nil), "containerd.services.snapshots.v1.PrepareSnapshotRequest.LabelsEntry")
proto.RegisterType((*PrepareSnapshotResponse)(nil), "containerd.services.snapshots.v1.PrepareSnapshotResponse")
proto.RegisterType((*ViewSnapshotRequest)(nil), "containerd.services.snapshots.v1.ViewSnapshotRequest")
+ proto.RegisterMapType((map[string]string)(nil), "containerd.services.snapshots.v1.ViewSnapshotRequest.LabelsEntry")
proto.RegisterType((*ViewSnapshotResponse)(nil), "containerd.services.snapshots.v1.ViewSnapshotResponse")
proto.RegisterType((*MountsRequest)(nil), "containerd.services.snapshots.v1.MountsRequest")
proto.RegisterType((*MountsResponse)(nil), "containerd.services.snapshots.v1.MountsResponse")
proto.RegisterType((*RemoveSnapshotRequest)(nil), "containerd.services.snapshots.v1.RemoveSnapshotRequest")
proto.RegisterType((*CommitSnapshotRequest)(nil), "containerd.services.snapshots.v1.CommitSnapshotRequest")
+ proto.RegisterMapType((map[string]string)(nil), "containerd.services.snapshots.v1.CommitSnapshotRequest.LabelsEntry")
proto.RegisterType((*StatSnapshotRequest)(nil), "containerd.services.snapshots.v1.StatSnapshotRequest")
proto.RegisterType((*Info)(nil), "containerd.services.snapshots.v1.Info")
+ proto.RegisterMapType((map[string]string)(nil), "containerd.services.snapshots.v1.Info.LabelsEntry")
proto.RegisterType((*StatSnapshotResponse)(nil), "containerd.services.snapshots.v1.StatSnapshotResponse")
proto.RegisterType((*UpdateSnapshotRequest)(nil), "containerd.services.snapshots.v1.UpdateSnapshotRequest")
proto.RegisterType((*UpdateSnapshotResponse)(nil), "containerd.services.snapshots.v1.UpdateSnapshotResponse")
@@ -285,7 +789,77 @@ func init() {
proto.RegisterType((*ListSnapshotsResponse)(nil), "containerd.services.snapshots.v1.ListSnapshotsResponse")
proto.RegisterType((*UsageRequest)(nil), "containerd.services.snapshots.v1.UsageRequest")
proto.RegisterType((*UsageResponse)(nil), "containerd.services.snapshots.v1.UsageResponse")
- proto.RegisterEnum("containerd.services.snapshots.v1.Kind", Kind_name, Kind_value)
+}
+
+func init() {
+ proto.RegisterFile("github.com/containerd/containerd/api/services/snapshots/v1/snapshots.proto", fileDescriptor_cfc0ddf12791f168)
+}
+
+var fileDescriptor_cfc0ddf12791f168 = []byte{
+ // 1007 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x57, 0x4f, 0x6f, 0x1a, 0x47,
+ 0x14, 0x67, 0x60, 0x8d, 0xe3, 0x87, 0xed, 0xd2, 0x09, 0x26, 0x68, 0x5b, 0xe1, 0x15, 0x87, 0xca,
+ 0xea, 0x61, 0x37, 0xa1, 0x6a, 0xe2, 0xc4, 0x97, 0x62, 0x4c, 0x2b, 0xec, 0xd8, 0xa9, 0x36, 0xb6,
+ 0x13, 0xa7, 0x55, 0xa3, 0x35, 0x8c, 0xf1, 0x0a, 0x76, 0x97, 0x32, 0x03, 0x11, 0xad, 0x54, 0xf5,
+ 0x18, 0xf9, 0xd4, 0x2f, 0xe0, 0x53, 0xfb, 0x21, 0xaa, 0x7e, 0x02, 0x1f, 0x7b, 0xec, 0xa9, 0x6d,
+ 0xfc, 0x25, 0x7a, 0xea, 0x1f, 0xcd, 0xec, 0x2c, 0x60, 0x4c, 0xc5, 0x82, 0xc9, 0x6d, 0x66, 0x67,
+ 0x7e, 0xef, 0xfd, 0xe6, 0xf7, 0xe6, 0xbd, 0x37, 0x0b, 0xdb, 0x35, 0x9b, 0x9d, 0xb6, 0x8f, 0xf5,
+ 0x8a, 0xe7, 0x18, 0x15, 0xcf, 0x65, 0x96, 0xed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imports to suppress errors if they are not otherwise used.
@@ -296,14 +870,15 @@ var _ grpc.ClientConn
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4
-// Client API for Snapshots service
-
+// SnapshotsClient is the client API for Snapshots service.
+//
+// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type SnapshotsClient interface {
Prepare(ctx context.Context, in *PrepareSnapshotRequest, opts ...grpc.CallOption) (*PrepareSnapshotResponse, error)
View(ctx context.Context, in *ViewSnapshotRequest, opts ...grpc.CallOption) (*ViewSnapshotResponse, error)
Mounts(ctx context.Context, in *MountsRequest, opts ...grpc.CallOption) (*MountsResponse, error)
- Commit(ctx context.Context, in *CommitSnapshotRequest, opts ...grpc.CallOption) (*google_protobuf1.Empty, error)
- Remove(ctx context.Context, in *RemoveSnapshotRequest, opts ...grpc.CallOption) (*google_protobuf1.Empty, error)
+ Commit(ctx context.Context, in *CommitSnapshotRequest, opts ...grpc.CallOption) (*types1.Empty, error)
+ Remove(ctx context.Context, in *RemoveSnapshotRequest, opts ...grpc.CallOption) (*types1.Empty, error)
Stat(ctx context.Context, in *StatSnapshotRequest, opts ...grpc.CallOption) (*StatSnapshotResponse, error)
Update(ctx context.Context, in *UpdateSnapshotRequest, opts ...grpc.CallOption) (*UpdateSnapshotResponse, error)
List(ctx context.Context, in *ListSnapshotsRequest, opts ...grpc.CallOption) (Snapshots_ListClient, error)
@@ -320,7 +895,7 @@ func NewSnapshotsClient(cc *grpc.ClientConn) SnapshotsClient {
func (c *snapshotsClient) Prepare(ctx context.Context, in *PrepareSnapshotRequest, opts ...grpc.CallOption) (*PrepareSnapshotResponse, error) {
out := new(PrepareSnapshotResponse)
- err := grpc.Invoke(ctx, "/containerd.services.snapshots.v1.Snapshots/Prepare", in, out, c.cc, opts...)
+ err := c.cc.Invoke(ctx, "/containerd.services.snapshots.v1.Snapshots/Prepare", in, out, opts...)
if err != nil {
return nil, err
}
@@ -329,7 +904,7 @@ func (c *snapshotsClient) Prepare(ctx context.Context, in *PrepareSnapshotReques
func (c *snapshotsClient) View(ctx context.Context, in *ViewSnapshotRequest, opts ...grpc.CallOption) (*ViewSnapshotResponse, error) {
out := new(ViewSnapshotResponse)
- err := grpc.Invoke(ctx, "/containerd.services.snapshots.v1.Snapshots/View", in, out, c.cc, opts...)
+ err := c.cc.Invoke(ctx, "/containerd.services.snapshots.v1.Snapshots/View", in, out, opts...)
if err != nil {
return nil, err
}
@@ -338,25 +913,25 @@ func (c *snapshotsClient) View(ctx context.Context, in *ViewSnapshotRequest, opt
func (c *snapshotsClient) Mounts(ctx context.Context, in *MountsRequest, opts ...grpc.CallOption) (*MountsResponse, error) {
out := new(MountsResponse)
- err := grpc.Invoke(ctx, "/containerd.services.snapshots.v1.Snapshots/Mounts", in, out, c.cc, opts...)
+ err := c.cc.Invoke(ctx, "/containerd.services.snapshots.v1.Snapshots/Mounts", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
-func (c *snapshotsClient) Commit(ctx context.Context, in *CommitSnapshotRequest, opts ...grpc.CallOption) (*google_protobuf1.Empty, error) {
- out := new(google_protobuf1.Empty)
- err := grpc.Invoke(ctx, "/containerd.services.snapshots.v1.Snapshots/Commit", in, out, c.cc, opts...)
+func (c *snapshotsClient) Commit(ctx context.Context, in *CommitSnapshotRequest, opts ...grpc.CallOption) (*types1.Empty, error) {
+ out := new(types1.Empty)
+ err := c.cc.Invoke(ctx, "/containerd.services.snapshots.v1.Snapshots/Commit", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
-func (c *snapshotsClient) Remove(ctx context.Context, in *RemoveSnapshotRequest, opts ...grpc.CallOption) (*google_protobuf1.Empty, error) {
- out := new(google_protobuf1.Empty)
- err := grpc.Invoke(ctx, "/containerd.services.snapshots.v1.Snapshots/Remove", in, out, c.cc, opts...)
+func (c *snapshotsClient) Remove(ctx context.Context, in *RemoveSnapshotRequest, opts ...grpc.CallOption) (*types1.Empty, error) {
+ out := new(types1.Empty)
+ err := c.cc.Invoke(ctx, "/containerd.services.snapshots.v1.Snapshots/Remove", in, out, opts...)
if err != nil {
return nil, err
}
@@ -365,7 +940,7 @@ func (c *snapshotsClient) Remove(ctx context.Context, in *RemoveSnapshotRequest,
func (c *snapshotsClient) Stat(ctx context.Context, in *StatSnapshotRequest, opts ...grpc.CallOption) (*StatSnapshotResponse, error) {
out := new(StatSnapshotResponse)
- err := grpc.Invoke(ctx, "/containerd.services.snapshots.v1.Snapshots/Stat", in, out, c.cc, opts...)
+ err := c.cc.Invoke(ctx, "/containerd.services.snapshots.v1.Snapshots/Stat", in, out, opts...)
if err != nil {
return nil, err
}
@@ -374,7 +949,7 @@ func (c *snapshotsClient) Stat(ctx context.Context, in *StatSnapshotRequest, opt
func (c *snapshotsClient) Update(ctx context.Context, in *UpdateSnapshotRequest, opts ...grpc.CallOption) (*UpdateSnapshotResponse, error) {
out := new(UpdateSnapshotResponse)
- err := grpc.Invoke(ctx, "/containerd.services.snapshots.v1.Snapshots/Update", in, out, c.cc, opts...)
+ err := c.cc.Invoke(ctx, "/containerd.services.snapshots.v1.Snapshots/Update", in, out, opts...)
if err != nil {
return nil, err
}
@@ -382,7 +957,7 @@ func (c *snapshotsClient) Update(ctx context.Context, in *UpdateSnapshotRequest,
}
func (c *snapshotsClient) List(ctx context.Context, in *ListSnapshotsRequest, opts ...grpc.CallOption) (Snapshots_ListClient, error) {
- stream, err := grpc.NewClientStream(ctx, &_Snapshots_serviceDesc.Streams[0], c.cc, "/containerd.services.snapshots.v1.Snapshots/List", opts...)
+ stream, err := c.cc.NewStream(ctx, &_Snapshots_serviceDesc.Streams[0], "/containerd.services.snapshots.v1.Snapshots/List", opts...)
if err != nil {
return nil, err
}
@@ -415,21 +990,20 @@ func (x *snapshotsListClient) Recv() (*ListSnapshotsResponse, error) {
func (c *snapshotsClient) Usage(ctx context.Context, in *UsageRequest, opts ...grpc.CallOption) (*UsageResponse, error) {
out := new(UsageResponse)
- err := grpc.Invoke(ctx, "/containerd.services.snapshots.v1.Snapshots/Usage", in, out, c.cc, opts...)
+ err := c.cc.Invoke(ctx, "/containerd.services.snapshots.v1.Snapshots/Usage", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
-// Server API for Snapshots service
-
+// SnapshotsServer is the server API for Snapshots service.
type SnapshotsServer interface {
Prepare(context.Context, *PrepareSnapshotRequest) (*PrepareSnapshotResponse, error)
View(context.Context, *ViewSnapshotRequest) (*ViewSnapshotResponse, error)
Mounts(context.Context, *MountsRequest) (*MountsResponse, error)
- Commit(context.Context, *CommitSnapshotRequest) (*google_protobuf1.Empty, error)
- Remove(context.Context, *RemoveSnapshotRequest) (*google_protobuf1.Empty, error)
+ Commit(context.Context, *CommitSnapshotRequest) (*types1.Empty, error)
+ Remove(context.Context, *RemoveSnapshotRequest) (*types1.Empty, error)
Stat(context.Context, *StatSnapshotRequest) (*StatSnapshotResponse, error)
Update(context.Context, *UpdateSnapshotRequest) (*UpdateSnapshotResponse, error)
List(*ListSnapshotsRequest, Snapshots_ListServer) error
@@ -702,6 +1276,9 @@ func (m *PrepareSnapshotRequest) MarshalTo(dAtA []byte) (int, error) {
i += copy(dAtA[i:], v)
}
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -732,6 +1309,9 @@ func (m *PrepareSnapshotResponse) MarshalTo(dAtA []byte) (int, error) {
i += n
}
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -785,6 +1365,9 @@ func (m *ViewSnapshotRequest) MarshalTo(dAtA []byte) (int, error) {
i += copy(dAtA[i:], v)
}
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -815,6 +1398,9 @@ func (m *ViewSnapshotResponse) MarshalTo(dAtA []byte) (int, error) {
i += n
}
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -845,6 +1431,9 @@ func (m *MountsRequest) MarshalTo(dAtA []byte) (int, error) {
i = encodeVarintSnapshots(dAtA, i, uint64(len(m.Key)))
i += copy(dAtA[i:], m.Key)
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -875,6 +1464,9 @@ func (m *MountsResponse) MarshalTo(dAtA []byte) (int, error) {
i += n
}
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -905,6 +1497,9 @@ func (m *RemoveSnapshotRequest) MarshalTo(dAtA []byte) (int, error) {
i = encodeVarintSnapshots(dAtA, i, uint64(len(m.Key)))
i += copy(dAtA[i:], m.Key)
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -958,6 +1553,9 @@ func (m *CommitSnapshotRequest) MarshalTo(dAtA []byte) (int, error) {
i += copy(dAtA[i:], v)
}
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -988,6 +1586,9 @@ func (m *StatSnapshotRequest) MarshalTo(dAtA []byte) (int, error) {
i = encodeVarintSnapshots(dAtA, i, uint64(len(m.Key)))
i += copy(dAtA[i:], m.Key)
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -1025,16 +1626,16 @@ func (m *Info) MarshalTo(dAtA []byte) (int, error) {
}
dAtA[i] = 0x22
i++
- i = encodeVarintSnapshots(dAtA, i, uint64(types.SizeOfStdTime(m.CreatedAt)))
- n1, err := types.StdTimeMarshalTo(m.CreatedAt, dAtA[i:])
+ i = encodeVarintSnapshots(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.CreatedAt)))
+ n1, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.CreatedAt, dAtA[i:])
if err != nil {
return 0, err
}
i += n1
dAtA[i] = 0x2a
i++
- i = encodeVarintSnapshots(dAtA, i, uint64(types.SizeOfStdTime(m.UpdatedAt)))
- n2, err := types.StdTimeMarshalTo(m.UpdatedAt, dAtA[i:])
+ i = encodeVarintSnapshots(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.UpdatedAt)))
+ n2, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.UpdatedAt, dAtA[i:])
if err != nil {
return 0, err
}
@@ -1056,6 +1657,9 @@ func (m *Info) MarshalTo(dAtA []byte) (int, error) {
i += copy(dAtA[i:], v)
}
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -1082,6 +1686,9 @@ func (m *StatSnapshotResponse) MarshalTo(dAtA []byte) (int, error) {
return 0, err
}
i += n3
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -1124,6 +1731,9 @@ func (m *UpdateSnapshotRequest) MarshalTo(dAtA []byte) (int, error) {
}
i += n5
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -1150,6 +1760,9 @@ func (m *UpdateSnapshotResponse) MarshalTo(dAtA []byte) (int, error) {
return 0, err
}
i += n6
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -1174,6 +1787,9 @@ func (m *ListSnapshotsRequest) MarshalTo(dAtA []byte) (int, error) {
i = encodeVarintSnapshots(dAtA, i, uint64(len(m.Snapshotter)))
i += copy(dAtA[i:], m.Snapshotter)
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -1204,6 +1820,9 @@ func (m *ListSnapshotsResponse) MarshalTo(dAtA []byte) (int, error) {
i += n
}
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -1234,6 +1853,9 @@ func (m *UsageRequest) MarshalTo(dAtA []byte) (int, error) {
i = encodeVarintSnapshots(dAtA, i, uint64(len(m.Key)))
i += copy(dAtA[i:], m.Key)
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -1262,6 +1884,9 @@ func (m *UsageResponse) MarshalTo(dAtA []byte) (int, error) {
i++
i = encodeVarintSnapshots(dAtA, i, uint64(m.Inodes))
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -1275,6 +1900,9 @@ func encodeVarintSnapshots(dAtA []byte, offset int, v uint64) int {
return offset + 1
}
func (m *PrepareSnapshotRequest) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.Snapshotter)
@@ -1297,10 +1925,16 @@ func (m *PrepareSnapshotRequest) Size() (n int) {
n += mapEntrySize + 1 + sovSnapshots(uint64(mapEntrySize))
}
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *PrepareSnapshotResponse) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
if len(m.Mounts) > 0 {
@@ -1309,10 +1943,16 @@ func (m *PrepareSnapshotResponse) Size() (n int) {
n += 1 + l + sovSnapshots(uint64(l))
}
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *ViewSnapshotRequest) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.Snapshotter)
@@ -1335,10 +1975,16 @@ func (m *ViewSnapshotRequest) Size() (n int) {
n += mapEntrySize + 1 + sovSnapshots(uint64(mapEntrySize))
}
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *ViewSnapshotResponse) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
if len(m.Mounts) > 0 {
@@ -1347,10 +1993,16 @@ func (m *ViewSnapshotResponse) Size() (n int) {
n += 1 + l + sovSnapshots(uint64(l))
}
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *MountsRequest) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.Snapshotter)
@@ -1361,10 +2013,16 @@ func (m *MountsRequest) Size() (n int) {
if l > 0 {
n += 1 + l + sovSnapshots(uint64(l))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *MountsResponse) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
if len(m.Mounts) > 0 {
@@ -1373,10 +2031,16 @@ func (m *MountsResponse) Size() (n int) {
n += 1 + l + sovSnapshots(uint64(l))
}
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *RemoveSnapshotRequest) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.Snapshotter)
@@ -1387,10 +2051,16 @@ func (m *RemoveSnapshotRequest) Size() (n int) {
if l > 0 {
n += 1 + l + sovSnapshots(uint64(l))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *CommitSnapshotRequest) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.Snapshotter)
@@ -1413,10 +2083,16 @@ func (m *CommitSnapshotRequest) Size() (n int) {
n += mapEntrySize + 1 + sovSnapshots(uint64(mapEntrySize))
}
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *StatSnapshotRequest) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.Snapshotter)
@@ -1427,10 +2103,16 @@ func (m *StatSnapshotRequest) Size() (n int) {
if l > 0 {
n += 1 + l + sovSnapshots(uint64(l))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *Info) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.Name)
@@ -1444,9 +2126,9 @@ func (m *Info) Size() (n int) {
if m.Kind != 0 {
n += 1 + sovSnapshots(uint64(m.Kind))
}
- l = types.SizeOfStdTime(m.CreatedAt)
+ l = github_com_gogo_protobuf_types.SizeOfStdTime(m.CreatedAt)
n += 1 + l + sovSnapshots(uint64(l))
- l = types.SizeOfStdTime(m.UpdatedAt)
+ l = github_com_gogo_protobuf_types.SizeOfStdTime(m.UpdatedAt)
n += 1 + l + sovSnapshots(uint64(l))
if len(m.Labels) > 0 {
for k, v := range m.Labels {
@@ -1456,18 +2138,30 @@ func (m *Info) Size() (n int) {
n += mapEntrySize + 1 + sovSnapshots(uint64(mapEntrySize))
}
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *StatSnapshotResponse) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = m.Info.Size()
n += 1 + l + sovSnapshots(uint64(l))
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *UpdateSnapshotRequest) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.Snapshotter)
@@ -1480,28 +2174,46 @@ func (m *UpdateSnapshotRequest) Size() (n int) {
l = m.UpdateMask.Size()
n += 1 + l + sovSnapshots(uint64(l))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *UpdateSnapshotResponse) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = m.Info.Size()
n += 1 + l + sovSnapshots(uint64(l))
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *ListSnapshotsRequest) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.Snapshotter)
if l > 0 {
n += 1 + l + sovSnapshots(uint64(l))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *ListSnapshotsResponse) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
if len(m.Info) > 0 {
@@ -1510,10 +2222,16 @@ func (m *ListSnapshotsResponse) Size() (n int) {
n += 1 + l + sovSnapshots(uint64(l))
}
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *UsageRequest) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.Snapshotter)
@@ -1524,10 +2242,16 @@ func (m *UsageRequest) Size() (n int) {
if l > 0 {
n += 1 + l + sovSnapshots(uint64(l))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *UsageResponse) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
if m.Size_ != 0 {
@@ -1536,6 +2260,9 @@ func (m *UsageResponse) Size() (n int) {
if m.Inodes != 0 {
n += 1 + sovSnapshots(uint64(m.Inodes))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
@@ -1560,7 +2287,7 @@ func (this *PrepareSnapshotRequest) String() string {
for k, _ := range this.Labels {
keysForLabels = append(keysForLabels, k)
}
- sortkeys.Strings(keysForLabels)
+ github_com_gogo_protobuf_sortkeys.Strings(keysForLabels)
mapStringForLabels := "map[string]string{"
for _, k := range keysForLabels {
mapStringForLabels += fmt.Sprintf("%v: %v,", k, this.Labels[k])
@@ -1571,6 +2298,7 @@ func (this *PrepareSnapshotRequest) String() string {
`Key:` + fmt.Sprintf("%v", this.Key) + `,`,
`Parent:` + fmt.Sprintf("%v", this.Parent) + `,`,
`Labels:` + mapStringForLabels + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -1580,7 +2308,8 @@ func (this *PrepareSnapshotResponse) String() string {
return "nil"
}
s := strings.Join([]string{`&PrepareSnapshotResponse{`,
- `Mounts:` + strings.Replace(fmt.Sprintf("%v", this.Mounts), "Mount", "containerd_types.Mount", 1) + `,`,
+ `Mounts:` + strings.Replace(fmt.Sprintf("%v", this.Mounts), "Mount", "types.Mount", 1) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -1593,7 +2322,7 @@ func (this *ViewSnapshotRequest) String() string {
for k, _ := range this.Labels {
keysForLabels = append(keysForLabels, k)
}
- sortkeys.Strings(keysForLabels)
+ github_com_gogo_protobuf_sortkeys.Strings(keysForLabels)
mapStringForLabels := "map[string]string{"
for _, k := range keysForLabels {
mapStringForLabels += fmt.Sprintf("%v: %v,", k, this.Labels[k])
@@ -1604,6 +2333,7 @@ func (this *ViewSnapshotRequest) String() string {
`Key:` + fmt.Sprintf("%v", this.Key) + `,`,
`Parent:` + fmt.Sprintf("%v", this.Parent) + `,`,
`Labels:` + mapStringForLabels + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -1613,7 +2343,8 @@ func (this *ViewSnapshotResponse) String() string {
return "nil"
}
s := strings.Join([]string{`&ViewSnapshotResponse{`,
- `Mounts:` + strings.Replace(fmt.Sprintf("%v", this.Mounts), "Mount", "containerd_types.Mount", 1) + `,`,
+ `Mounts:` + strings.Replace(fmt.Sprintf("%v", this.Mounts), "Mount", "types.Mount", 1) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -1625,6 +2356,7 @@ func (this *MountsRequest) String() string {
s := strings.Join([]string{`&MountsRequest{`,
`Snapshotter:` + fmt.Sprintf("%v", this.Snapshotter) + `,`,
`Key:` + fmt.Sprintf("%v", this.Key) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -1634,7 +2366,8 @@ func (this *MountsResponse) String() string {
return "nil"
}
s := strings.Join([]string{`&MountsResponse{`,
- `Mounts:` + strings.Replace(fmt.Sprintf("%v", this.Mounts), "Mount", "containerd_types.Mount", 1) + `,`,
+ `Mounts:` + strings.Replace(fmt.Sprintf("%v", this.Mounts), "Mount", "types.Mount", 1) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -1646,6 +2379,7 @@ func (this *RemoveSnapshotRequest) String() string {
s := strings.Join([]string{`&RemoveSnapshotRequest{`,
`Snapshotter:` + fmt.Sprintf("%v", this.Snapshotter) + `,`,
`Key:` + fmt.Sprintf("%v", this.Key) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -1658,7 +2392,7 @@ func (this *CommitSnapshotRequest) String() string {
for k, _ := range this.Labels {
keysForLabels = append(keysForLabels, k)
}
- sortkeys.Strings(keysForLabels)
+ github_com_gogo_protobuf_sortkeys.Strings(keysForLabels)
mapStringForLabels := "map[string]string{"
for _, k := range keysForLabels {
mapStringForLabels += fmt.Sprintf("%v: %v,", k, this.Labels[k])
@@ -1669,6 +2403,7 @@ func (this *CommitSnapshotRequest) String() string {
`Name:` + fmt.Sprintf("%v", this.Name) + `,`,
`Key:` + fmt.Sprintf("%v", this.Key) + `,`,
`Labels:` + mapStringForLabels + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -1680,6 +2415,7 @@ func (this *StatSnapshotRequest) String() string {
s := strings.Join([]string{`&StatSnapshotRequest{`,
`Snapshotter:` + fmt.Sprintf("%v", this.Snapshotter) + `,`,
`Key:` + fmt.Sprintf("%v", this.Key) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -1692,7 +2428,7 @@ func (this *Info) String() string {
for k, _ := range this.Labels {
keysForLabels = append(keysForLabels, k)
}
- sortkeys.Strings(keysForLabels)
+ github_com_gogo_protobuf_sortkeys.Strings(keysForLabels)
mapStringForLabels := "map[string]string{"
for _, k := range keysForLabels {
mapStringForLabels += fmt.Sprintf("%v: %v,", k, this.Labels[k])
@@ -1702,9 +2438,10 @@ func (this *Info) String() string {
`Name:` + fmt.Sprintf("%v", this.Name) + `,`,
`Parent:` + fmt.Sprintf("%v", this.Parent) + `,`,
`Kind:` + fmt.Sprintf("%v", this.Kind) + `,`,
- `CreatedAt:` + strings.Replace(strings.Replace(this.CreatedAt.String(), "Timestamp", "google_protobuf3.Timestamp", 1), `&`, ``, 1) + `,`,
- `UpdatedAt:` + strings.Replace(strings.Replace(this.UpdatedAt.String(), "Timestamp", "google_protobuf3.Timestamp", 1), `&`, ``, 1) + `,`,
+ `CreatedAt:` + strings.Replace(strings.Replace(this.CreatedAt.String(), "Timestamp", "types1.Timestamp", 1), `&`, ``, 1) + `,`,
+ `UpdatedAt:` + strings.Replace(strings.Replace(this.UpdatedAt.String(), "Timestamp", "types1.Timestamp", 1), `&`, ``, 1) + `,`,
`Labels:` + mapStringForLabels + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -1715,6 +2452,7 @@ func (this *StatSnapshotResponse) String() string {
}
s := strings.Join([]string{`&StatSnapshotResponse{`,
`Info:` + strings.Replace(strings.Replace(this.Info.String(), "Info", "Info", 1), `&`, ``, 1) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -1726,7 +2464,8 @@ func (this *UpdateSnapshotRequest) String() string {
s := strings.Join([]string{`&UpdateSnapshotRequest{`,
`Snapshotter:` + fmt.Sprintf("%v", this.Snapshotter) + `,`,
`Info:` + strings.Replace(strings.Replace(this.Info.String(), "Info", "Info", 1), `&`, ``, 1) + `,`,
- `UpdateMask:` + strings.Replace(fmt.Sprintf("%v", this.UpdateMask), "FieldMask", "google_protobuf2.FieldMask", 1) + `,`,
+ `UpdateMask:` + strings.Replace(fmt.Sprintf("%v", this.UpdateMask), "FieldMask", "types1.FieldMask", 1) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -1737,6 +2476,7 @@ func (this *UpdateSnapshotResponse) String() string {
}
s := strings.Join([]string{`&UpdateSnapshotResponse{`,
`Info:` + strings.Replace(strings.Replace(this.Info.String(), "Info", "Info", 1), `&`, ``, 1) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -1747,6 +2487,7 @@ func (this *ListSnapshotsRequest) String() string {
}
s := strings.Join([]string{`&ListSnapshotsRequest{`,
`Snapshotter:` + fmt.Sprintf("%v", this.Snapshotter) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -1757,6 +2498,7 @@ func (this *ListSnapshotsResponse) String() string {
}
s := strings.Join([]string{`&ListSnapshotsResponse{`,
`Info:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Info), "Info", "Info", 1), `&`, ``, 1) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -1768,6 +2510,7 @@ func (this *UsageRequest) String() string {
s := strings.Join([]string{`&UsageRequest{`,
`Snapshotter:` + fmt.Sprintf("%v", this.Snapshotter) + `,`,
`Key:` + fmt.Sprintf("%v", this.Key) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -1779,6 +2522,7 @@ func (this *UsageResponse) String() string {
s := strings.Join([]string{`&UsageResponse{`,
`Size_:` + fmt.Sprintf("%v", this.Size_) + `,`,
`Inodes:` + fmt.Sprintf("%v", this.Inodes) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -1806,7 +2550,7 @@ func (m *PrepareSnapshotRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1834,7 +2578,7 @@ func (m *PrepareSnapshotRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1844,6 +2588,9 @@ func (m *PrepareSnapshotRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthSnapshots
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthSnapshots
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -1863,7 +2610,7 @@ func (m *PrepareSnapshotRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1873,6 +2620,9 @@ func (m *PrepareSnapshotRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthSnapshots
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthSnapshots
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -1892,7 +2642,7 @@ func (m *PrepareSnapshotRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1902,6 +2652,9 @@ func (m *PrepareSnapshotRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthSnapshots
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthSnapshots
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -1921,7 +2674,7 @@ func (m *PrepareSnapshotRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1930,6 +2683,9 @@ func (m *PrepareSnapshotRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthSnapshots
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthSnapshots
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -1950,7 +2706,7 @@ func (m *PrepareSnapshotRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1967,7 +2723,7 @@ func (m *PrepareSnapshotRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ stringLenmapkey |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1977,6 +2733,9 @@ func (m *PrepareSnapshotRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthSnapshots
}
postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey < 0 {
+ return ErrInvalidLengthSnapshots
+ }
if postStringIndexmapkey > l {
return io.ErrUnexpectedEOF
}
@@ -1993,7 +2752,7 @@ func (m *PrepareSnapshotRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLenmapvalue |= (uint64(b) & 0x7F) << shift
+ stringLenmapvalue |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2003,6 +2762,9 @@ func (m *PrepareSnapshotRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthSnapshots
}
postStringIndexmapvalue := iNdEx + intStringLenmapvalue
+ if postStringIndexmapvalue < 0 {
+ return ErrInvalidLengthSnapshots
+ }
if postStringIndexmapvalue > l {
return io.ErrUnexpectedEOF
}
@@ -2034,9 +2796,13 @@ func (m *PrepareSnapshotRequest) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthSnapshots
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthSnapshots
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -2061,7 +2827,7 @@ func (m *PrepareSnapshotResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2089,7 +2855,7 @@ func (m *PrepareSnapshotResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2098,10 +2864,13 @@ func (m *PrepareSnapshotResponse) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthSnapshots
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthSnapshots
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
- m.Mounts = append(m.Mounts, &containerd_types.Mount{})
+ m.Mounts = append(m.Mounts, &types.Mount{})
if err := m.Mounts[len(m.Mounts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
@@ -2115,9 +2884,13 @@ func (m *PrepareSnapshotResponse) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthSnapshots
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthSnapshots
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -2142,7 +2915,7 @@ func (m *ViewSnapshotRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2170,7 +2943,7 @@ func (m *ViewSnapshotRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2180,6 +2953,9 @@ func (m *ViewSnapshotRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthSnapshots
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthSnapshots
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -2199,7 +2975,7 @@ func (m *ViewSnapshotRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2209,6 +2985,9 @@ func (m *ViewSnapshotRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthSnapshots
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthSnapshots
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -2228,7 +3007,7 @@ func (m *ViewSnapshotRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2238,6 +3017,9 @@ func (m *ViewSnapshotRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthSnapshots
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthSnapshots
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -2257,7 +3039,7 @@ func (m *ViewSnapshotRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2266,6 +3048,9 @@ func (m *ViewSnapshotRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthSnapshots
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthSnapshots
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -2286,7 +3071,7 @@ func (m *ViewSnapshotRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2303,7 +3088,7 @@ func (m *ViewSnapshotRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ stringLenmapkey |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2313,6 +3098,9 @@ func (m *ViewSnapshotRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthSnapshots
}
postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey < 0 {
+ return ErrInvalidLengthSnapshots
+ }
if postStringIndexmapkey > l {
return io.ErrUnexpectedEOF
}
@@ -2329,7 +3117,7 @@ func (m *ViewSnapshotRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLenmapvalue |= (uint64(b) & 0x7F) << shift
+ stringLenmapvalue |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2339,6 +3127,9 @@ func (m *ViewSnapshotRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthSnapshots
}
postStringIndexmapvalue := iNdEx + intStringLenmapvalue
+ if postStringIndexmapvalue < 0 {
+ return ErrInvalidLengthSnapshots
+ }
if postStringIndexmapvalue > l {
return io.ErrUnexpectedEOF
}
@@ -2370,9 +3161,13 @@ func (m *ViewSnapshotRequest) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthSnapshots
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthSnapshots
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -2397,7 +3192,7 @@ func (m *ViewSnapshotResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2425,7 +3220,7 @@ func (m *ViewSnapshotResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2434,10 +3229,13 @@ func (m *ViewSnapshotResponse) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthSnapshots
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthSnapshots
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
- m.Mounts = append(m.Mounts, &containerd_types.Mount{})
+ m.Mounts = append(m.Mounts, &types.Mount{})
if err := m.Mounts[len(m.Mounts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
@@ -2451,9 +3249,13 @@ func (m *ViewSnapshotResponse) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthSnapshots
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthSnapshots
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -2478,7 +3280,7 @@ func (m *MountsRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2506,7 +3308,7 @@ func (m *MountsRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2516,6 +3318,9 @@ func (m *MountsRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthSnapshots
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthSnapshots
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -2535,7 +3340,7 @@ func (m *MountsRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2545,6 +3350,9 @@ func (m *MountsRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthSnapshots
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthSnapshots
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -2559,9 +3367,13 @@ func (m *MountsRequest) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthSnapshots
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthSnapshots
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -2586,7 +3398,7 @@ func (m *MountsResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2614,7 +3426,7 @@ func (m *MountsResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2623,10 +3435,13 @@ func (m *MountsResponse) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthSnapshots
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthSnapshots
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
- m.Mounts = append(m.Mounts, &containerd_types.Mount{})
+ m.Mounts = append(m.Mounts, &types.Mount{})
if err := m.Mounts[len(m.Mounts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
@@ -2640,9 +3455,13 @@ func (m *MountsResponse) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthSnapshots
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthSnapshots
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -2667,7 +3486,7 @@ func (m *RemoveSnapshotRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2695,7 +3514,7 @@ func (m *RemoveSnapshotRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2705,6 +3524,9 @@ func (m *RemoveSnapshotRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthSnapshots
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthSnapshots
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -2724,7 +3546,7 @@ func (m *RemoveSnapshotRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2734,6 +3556,9 @@ func (m *RemoveSnapshotRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthSnapshots
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthSnapshots
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -2748,9 +3573,13 @@ func (m *RemoveSnapshotRequest) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthSnapshots
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthSnapshots
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -2775,7 +3604,7 @@ func (m *CommitSnapshotRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2803,7 +3632,7 @@ func (m *CommitSnapshotRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2813,6 +3642,9 @@ func (m *CommitSnapshotRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthSnapshots
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthSnapshots
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -2832,7 +3664,7 @@ func (m *CommitSnapshotRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2842,6 +3674,9 @@ func (m *CommitSnapshotRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthSnapshots
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthSnapshots
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -2861,7 +3696,7 @@ func (m *CommitSnapshotRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2871,6 +3706,9 @@ func (m *CommitSnapshotRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthSnapshots
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthSnapshots
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -2890,7 +3728,7 @@ func (m *CommitSnapshotRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2899,6 +3737,9 @@ func (m *CommitSnapshotRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthSnapshots
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthSnapshots
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -2919,7 +3760,7 @@ func (m *CommitSnapshotRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2936,7 +3777,7 @@ func (m *CommitSnapshotRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ stringLenmapkey |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2946,6 +3787,9 @@ func (m *CommitSnapshotRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthSnapshots
}
postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey < 0 {
+ return ErrInvalidLengthSnapshots
+ }
if postStringIndexmapkey > l {
return io.ErrUnexpectedEOF
}
@@ -2962,7 +3806,7 @@ func (m *CommitSnapshotRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLenmapvalue |= (uint64(b) & 0x7F) << shift
+ stringLenmapvalue |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2972,6 +3816,9 @@ func (m *CommitSnapshotRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthSnapshots
}
postStringIndexmapvalue := iNdEx + intStringLenmapvalue
+ if postStringIndexmapvalue < 0 {
+ return ErrInvalidLengthSnapshots
+ }
if postStringIndexmapvalue > l {
return io.ErrUnexpectedEOF
}
@@ -3003,9 +3850,13 @@ func (m *CommitSnapshotRequest) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthSnapshots
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthSnapshots
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -3030,7 +3881,7 @@ func (m *StatSnapshotRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3058,7 +3909,7 @@ func (m *StatSnapshotRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3068,6 +3919,9 @@ func (m *StatSnapshotRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthSnapshots
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthSnapshots
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -3087,7 +3941,7 @@ func (m *StatSnapshotRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3097,6 +3951,9 @@ func (m *StatSnapshotRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthSnapshots
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthSnapshots
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -3111,9 +3968,13 @@ func (m *StatSnapshotRequest) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthSnapshots
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthSnapshots
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -3138,7 +3999,7 @@ func (m *Info) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3166,7 +4027,7 @@ func (m *Info) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3176,6 +4037,9 @@ func (m *Info) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthSnapshots
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthSnapshots
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -3195,7 +4059,7 @@ func (m *Info) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3205,6 +4069,9 @@ func (m *Info) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthSnapshots
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthSnapshots
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -3224,7 +4091,7 @@ func (m *Info) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- m.Kind |= (Kind(b) & 0x7F) << shift
+ m.Kind |= Kind(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3243,7 +4110,7 @@ func (m *Info) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3252,10 +4119,13 @@ func (m *Info) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthSnapshots
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthSnapshots
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
- if err := types.StdTimeUnmarshal(&m.CreatedAt, dAtA[iNdEx:postIndex]); err != nil {
+ if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.CreatedAt, dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
@@ -3273,7 +4143,7 @@ func (m *Info) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3282,10 +4152,13 @@ func (m *Info) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthSnapshots
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthSnapshots
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
- if err := types.StdTimeUnmarshal(&m.UpdatedAt, dAtA[iNdEx:postIndex]); err != nil {
+ if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.UpdatedAt, dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
@@ -3303,7 +4176,7 @@ func (m *Info) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3312,6 +4185,9 @@ func (m *Info) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthSnapshots
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthSnapshots
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -3332,7 +4208,7 @@ func (m *Info) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3349,7 +4225,7 @@ func (m *Info) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ stringLenmapkey |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3359,6 +4235,9 @@ func (m *Info) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthSnapshots
}
postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey < 0 {
+ return ErrInvalidLengthSnapshots
+ }
if postStringIndexmapkey > l {
return io.ErrUnexpectedEOF
}
@@ -3375,7 +4254,7 @@ func (m *Info) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLenmapvalue |= (uint64(b) & 0x7F) << shift
+ stringLenmapvalue |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3385,6 +4264,9 @@ func (m *Info) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthSnapshots
}
postStringIndexmapvalue := iNdEx + intStringLenmapvalue
+ if postStringIndexmapvalue < 0 {
+ return ErrInvalidLengthSnapshots
+ }
if postStringIndexmapvalue > l {
return io.ErrUnexpectedEOF
}
@@ -3416,9 +4298,13 @@ func (m *Info) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthSnapshots
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthSnapshots
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -3443,7 +4329,7 @@ func (m *StatSnapshotResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3471,7 +4357,7 @@ func (m *StatSnapshotResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3480,6 +4366,9 @@ func (m *StatSnapshotResponse) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthSnapshots
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthSnapshots
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -3496,9 +4385,13 @@ func (m *StatSnapshotResponse) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthSnapshots
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthSnapshots
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -3523,7 +4416,7 @@ func (m *UpdateSnapshotRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3551,7 +4444,7 @@ func (m *UpdateSnapshotRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3561,6 +4454,9 @@ func (m *UpdateSnapshotRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthSnapshots
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthSnapshots
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -3580,7 +4476,7 @@ func (m *UpdateSnapshotRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3589,6 +4485,9 @@ func (m *UpdateSnapshotRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthSnapshots
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthSnapshots
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -3610,7 +4509,7 @@ func (m *UpdateSnapshotRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3619,11 +4518,14 @@ func (m *UpdateSnapshotRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthSnapshots
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthSnapshots
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.UpdateMask == nil {
- m.UpdateMask = &google_protobuf2.FieldMask{}
+ m.UpdateMask = &types1.FieldMask{}
}
if err := m.UpdateMask.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
@@ -3638,9 +4540,13 @@ func (m *UpdateSnapshotRequest) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthSnapshots
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthSnapshots
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -3665,7 +4571,7 @@ func (m *UpdateSnapshotResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3693,7 +4599,7 @@ func (m *UpdateSnapshotResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3702,6 +4608,9 @@ func (m *UpdateSnapshotResponse) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthSnapshots
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthSnapshots
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -3718,9 +4627,13 @@ func (m *UpdateSnapshotResponse) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthSnapshots
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthSnapshots
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -3745,7 +4658,7 @@ func (m *ListSnapshotsRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3773,7 +4686,7 @@ func (m *ListSnapshotsRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3783,6 +4696,9 @@ func (m *ListSnapshotsRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthSnapshots
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthSnapshots
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -3797,9 +4713,13 @@ func (m *ListSnapshotsRequest) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthSnapshots
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthSnapshots
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -3824,7 +4744,7 @@ func (m *ListSnapshotsResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3852,7 +4772,7 @@ func (m *ListSnapshotsResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3861,6 +4781,9 @@ func (m *ListSnapshotsResponse) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthSnapshots
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthSnapshots
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -3878,9 +4801,13 @@ func (m *ListSnapshotsResponse) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthSnapshots
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthSnapshots
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -3905,7 +4832,7 @@ func (m *UsageRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3933,7 +4860,7 @@ func (m *UsageRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3943,6 +4870,9 @@ func (m *UsageRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthSnapshots
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthSnapshots
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -3962,7 +4892,7 @@ func (m *UsageRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3972,6 +4902,9 @@ func (m *UsageRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthSnapshots
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthSnapshots
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -3986,9 +4919,13 @@ func (m *UsageRequest) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthSnapshots
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthSnapshots
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -4013,7 +4950,7 @@ func (m *UsageResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -4041,7 +4978,7 @@ func (m *UsageResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- m.Size_ |= (int64(b) & 0x7F) << shift
+ m.Size_ |= int64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -4060,7 +4997,7 @@ func (m *UsageResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- m.Inodes |= (int64(b) & 0x7F) << shift
+ m.Inodes |= int64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -4074,9 +5011,13 @@ func (m *UsageResponse) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthSnapshots
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthSnapshots
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -4140,10 +5081,13 @@ func skipSnapshots(dAtA []byte) (n int, err error) {
break
}
}
- iNdEx += length
if length < 0 {
return 0, ErrInvalidLengthSnapshots
}
+ iNdEx += length
+ if iNdEx < 0 {
+ return 0, ErrInvalidLengthSnapshots
+ }
return iNdEx, nil
case 3:
for {
@@ -4172,6 +5116,9 @@ func skipSnapshots(dAtA []byte) (n int, err error) {
return 0, err
}
iNdEx = start + next
+ if iNdEx < 0 {
+ return 0, ErrInvalidLengthSnapshots
+ }
}
return iNdEx, nil
case 4:
@@ -4190,74 +5137,3 @@ var (
ErrInvalidLengthSnapshots = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowSnapshots = fmt.Errorf("proto: integer overflow")
)
-
-func init() {
- proto.RegisterFile("github.com/containerd/containerd/api/services/snapshots/v1/snapshots.proto", fileDescriptorSnapshots)
-}
-
-var fileDescriptorSnapshots = []byte{
- // 1007 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x57, 0x4f, 0x6f, 0x1a, 0x47,
- 0x14, 0x67, 0x60, 0x8d, 0xe3, 0x87, 0xed, 0xd2, 0x09, 0x26, 0x68, 0x5b, 0xe1, 0x15, 0x87, 0xca,
- 0xea, 0x61, 0x37, 0xa1, 0x6a, 0xe2, 0xc4, 0x97, 0x62, 0x4c, 0x2b, 0xec, 0xd8, 0xa9, 0x36, 0xb6,
- 0x13, 0xa7, 0x55, 0xa3, 0x35, 0x8c, 0xf1, 0x0a, 0x76, 0x97, 0x32, 0x03, 0x11, 0xad, 0x54, 0xf5,
- 0x18, 0xf9, 0xd4, 0x2f, 0xe0, 0x53, 0xfb, 0x21, 0xaa, 0x7e, 0x02, 0x1f, 0x7b, 0xec, 0xa9, 0x6d,
- 0xfc, 0x25, 0x7a, 0xea, 0x1f, 0xcd, 0xec, 0x2c, 0x60, 0x4c, 0xc5, 0x82, 0xc9, 0x6d, 0x66, 0x67,
- 0x7e, 0xef, 0xfd, 0xe6, 0xf7, 0xe6, 0xbd, 0x37, 0x0b, 0xdb, 0x35, 0x9b, 0x9d, 0xb6, 0x8f, 0xf5,
- 0x8a, 0xe7, 0x18, 0x15, 0xcf, 0x65, 0x96, 0xed, 0x92, 0x56, 0x75, 0x70, 0x68, 0x35, 0x6d, 0x83,
- 0x92, 0x56, 0xc7, 0xae, 0x10, 0x6a, 0x50, 0xd7, 0x6a, 0xd2, 0x53, 0x8f, 0x51, 0xa3, 0x73, 0xaf,
- 0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 0x07,
- 0x53, 0xb6, 0x38, 0x35, 0x7d, 0x2d, 0xb3, 0x4b, 0xfc, 0x29, 0xce, 0x4d, 0xfb, 0x2d, 0x3f, 0x8c,
- 0xe9, 0x91, 0x8f, 0x83, 0xff, 0x35, 0xdd, 0x06, 0x85, 0x57, 0xce, 0x30, 0x91, 0x19, 0xd1, 0x2e,
- 0xc3, 0x44, 0x66, 0x64, 0x61, 0xfe, 0x16, 0xe2, 0x7e, 0x6d, 0x0a, 0x73, 0xa2, 0x91, 0xf5, 0x57,
- 0x5d, 0x9f, 0x1c, 0x28, 0x9d, 0x77, 0x41, 0xe1, 0x25, 0x08, 0x87, 0x20, 0x3f, 0xaa, 0xc8, 0xa9,
- 0x0f, 0x26, 0xc6, 0xf9, 0x8e, 0xef, 0x22, 0x7c, 0x0a, 0x73, 0xa2, 0xbc, 0x60, 0x3d, 0x04, 0xfb,
- 0x81, 0x5a, 0xa6, 0x1a, 0xa1, 0xf7, 0xfb, 0xbe, 0x36, 0xbf, 0xba, 0x78, 0x93, 0x8d, 0xfc, 0xf6,
- 0x26, 0x1b, 0xf9, 0xfe, 0x32, 0x8b, 0x2e, 0x2e, 0xb3, 0xe8, 0xd7, 0xcb, 0x2c, 0xfa, 0xf3, 0x32,
- 0x8b, 0x5e, 0x6c, 0x4d, 0xff, 0xcf, 0xb9, 0xd1, 0x9b, 0x3c, 0x8f, 0x1c, 0xc7, 0xc5, 0x55, 0xfa,
- 0xe8, 0xbf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x8e, 0xa0, 0xb2, 0xda, 0xc4, 0x0e, 0x00, 0x00,
-}
diff --git a/api/services/tasks/v1/tasks.pb.go b/api/services/tasks/v1/tasks.pb.go
index 0dfee9156..cadaf745f 100644
--- a/api/services/tasks/v1/tasks.pb.go
+++ b/api/services/tasks/v1/tasks.pb.go
@@ -1,68 +1,24 @@
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: github.com/containerd/containerd/api/services/tasks/v1/tasks.proto
-/*
- Package tasks is a generated protocol buffer package.
-
- It is generated from these files:
- github.com/containerd/containerd/api/services/tasks/v1/tasks.proto
-
- It has these top-level messages:
- CreateTaskRequest
- CreateTaskResponse
- StartRequest
- StartResponse
- DeleteTaskRequest
- DeleteResponse
- DeleteProcessRequest
- GetRequest
- GetResponse
- ListTasksRequest
- ListTasksResponse
- KillRequest
- ExecProcessRequest
- ExecProcessResponse
- ResizePtyRequest
- CloseIORequest
- PauseTaskRequest
- ResumeTaskRequest
- ListPidsRequest
- ListPidsResponse
- CheckpointTaskRequest
- CheckpointTaskResponse
- UpdateTaskRequest
- MetricsRequest
- MetricsResponse
- WaitRequest
- WaitResponse
-*/
package tasks
-import proto "github.com/gogo/protobuf/proto"
-import fmt "fmt"
-import math "math"
-import google_protobuf "github.com/gogo/protobuf/types"
-import google_protobuf1 "github.com/gogo/protobuf/types"
-
-// skipping weak import gogoproto "github.com/gogo/protobuf/gogoproto"
-import containerd_types "github.com/containerd/containerd/api/types"
-import containerd_types1 "github.com/containerd/containerd/api/types"
-import containerd_types2 "github.com/containerd/containerd/api/types"
-import containerd_v1_types "github.com/containerd/containerd/api/types/task"
-import _ "github.com/gogo/protobuf/types"
-
-import time "time"
-import github_com_opencontainers_go_digest "github.com/opencontainers/go-digest"
-
-import context "golang.org/x/net/context"
-import grpc "google.golang.org/grpc"
-
-import types "github.com/gogo/protobuf/types"
-
-import strings "strings"
-import reflect "reflect"
-
-import io "io"
+import (
+ context "context"
+ fmt "fmt"
+ types "github.com/containerd/containerd/api/types"
+ task "github.com/containerd/containerd/api/types/task"
+ proto "github.com/gogo/protobuf/proto"
+ github_com_gogo_protobuf_types "github.com/gogo/protobuf/types"
+ types1 "github.com/gogo/protobuf/types"
+ github_com_opencontainers_go_digest "github.com/opencontainers/go-digest"
+ grpc "google.golang.org/grpc"
+ io "io"
+ math "math"
+ reflect "reflect"
+ strings "strings"
+ time "time"
+)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
@@ -84,116 +40,488 @@ type CreateTaskRequest struct {
// These are for mounts that cannot be performed in the user namespace.
// Typically, these mounts should be resolved from snapshots specified on
// the container object.
- Rootfs []*containerd_types.Mount `protobuf:"bytes,3,rep,name=rootfs" json:"rootfs,omitempty"`
- Stdin string `protobuf:"bytes,4,opt,name=stdin,proto3" json:"stdin,omitempty"`
- Stdout string `protobuf:"bytes,5,opt,name=stdout,proto3" json:"stdout,omitempty"`
- Stderr string `protobuf:"bytes,6,opt,name=stderr,proto3" json:"stderr,omitempty"`
- Terminal bool `protobuf:"varint,7,opt,name=terminal,proto3" json:"terminal,omitempty"`
- Checkpoint *containerd_types2.Descriptor `protobuf:"bytes,8,opt,name=checkpoint" json:"checkpoint,omitempty"`
- Options *google_protobuf1.Any `protobuf:"bytes,9,opt,name=options" json:"options,omitempty"`
+ Rootfs []*types.Mount `protobuf:"bytes,3,rep,name=rootfs,proto3" json:"rootfs,omitempty"`
+ Stdin string `protobuf:"bytes,4,opt,name=stdin,proto3" json:"stdin,omitempty"`
+ Stdout string `protobuf:"bytes,5,opt,name=stdout,proto3" json:"stdout,omitempty"`
+ Stderr string `protobuf:"bytes,6,opt,name=stderr,proto3" json:"stderr,omitempty"`
+ Terminal bool `protobuf:"varint,7,opt,name=terminal,proto3" json:"terminal,omitempty"`
+ Checkpoint *types.Descriptor `protobuf:"bytes,8,opt,name=checkpoint,proto3" json:"checkpoint,omitempty"`
+ Options *types1.Any `protobuf:"bytes,9,opt,name=options,proto3" json:"options,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *CreateTaskRequest) Reset() { *m = CreateTaskRequest{} }
-func (*CreateTaskRequest) ProtoMessage() {}
-func (*CreateTaskRequest) Descriptor() ([]byte, []int) { return fileDescriptorTasks, []int{0} }
+func (m *CreateTaskRequest) Reset() { *m = CreateTaskRequest{} }
+func (*CreateTaskRequest) ProtoMessage() {}
+func (*CreateTaskRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_310e7127b8a26f14, []int{0}
+}
+func (m *CreateTaskRequest) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *CreateTaskRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_CreateTaskRequest.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *CreateTaskRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_CreateTaskRequest.Merge(m, src)
+}
+func (m *CreateTaskRequest) XXX_Size() int {
+ return m.Size()
+}
+func (m *CreateTaskRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_CreateTaskRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_CreateTaskRequest proto.InternalMessageInfo
type CreateTaskResponse struct {
- ContainerID string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"`
- Pid uint32 `protobuf:"varint,2,opt,name=pid,proto3" json:"pid,omitempty"`
+ ContainerID string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"`
+ Pid uint32 `protobuf:"varint,2,opt,name=pid,proto3" json:"pid,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *CreateTaskResponse) Reset() { *m = CreateTaskResponse{} }
-func (*CreateTaskResponse) ProtoMessage() {}
-func (*CreateTaskResponse) Descriptor() ([]byte, []int) { return fileDescriptorTasks, []int{1} }
+func (m *CreateTaskResponse) Reset() { *m = CreateTaskResponse{} }
+func (*CreateTaskResponse) ProtoMessage() {}
+func (*CreateTaskResponse) Descriptor() ([]byte, []int) {
+ return fileDescriptor_310e7127b8a26f14, []int{1}
+}
+func (m *CreateTaskResponse) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *CreateTaskResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_CreateTaskResponse.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *CreateTaskResponse) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_CreateTaskResponse.Merge(m, src)
+}
+func (m *CreateTaskResponse) XXX_Size() int {
+ return m.Size()
+}
+func (m *CreateTaskResponse) XXX_DiscardUnknown() {
+ xxx_messageInfo_CreateTaskResponse.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_CreateTaskResponse proto.InternalMessageInfo
type StartRequest struct {
- ContainerID string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"`
- ExecID string `protobuf:"bytes,2,opt,name=exec_id,json=execId,proto3" json:"exec_id,omitempty"`
+ ContainerID string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"`
+ ExecID string `protobuf:"bytes,2,opt,name=exec_id,json=execId,proto3" json:"exec_id,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *StartRequest) Reset() { *m = StartRequest{} }
-func (*StartRequest) ProtoMessage() {}
-func (*StartRequest) Descriptor() ([]byte, []int) { return fileDescriptorTasks, []int{2} }
+func (m *StartRequest) Reset() { *m = StartRequest{} }
+func (*StartRequest) ProtoMessage() {}
+func (*StartRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_310e7127b8a26f14, []int{2}
+}
+func (m *StartRequest) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *StartRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_StartRequest.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *StartRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_StartRequest.Merge(m, src)
+}
+func (m *StartRequest) XXX_Size() int {
+ return m.Size()
+}
+func (m *StartRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_StartRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_StartRequest proto.InternalMessageInfo
type StartResponse struct {
- Pid uint32 `protobuf:"varint,1,opt,name=pid,proto3" json:"pid,omitempty"`
+ Pid uint32 `protobuf:"varint,1,opt,name=pid,proto3" json:"pid,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *StartResponse) Reset() { *m = StartResponse{} }
-func (*StartResponse) ProtoMessage() {}
-func (*StartResponse) Descriptor() ([]byte, []int) { return fileDescriptorTasks, []int{3} }
+func (m *StartResponse) Reset() { *m = StartResponse{} }
+func (*StartResponse) ProtoMessage() {}
+func (*StartResponse) Descriptor() ([]byte, []int) {
+ return fileDescriptor_310e7127b8a26f14, []int{3}
+}
+func (m *StartResponse) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *StartResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_StartResponse.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *StartResponse) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_StartResponse.Merge(m, src)
+}
+func (m *StartResponse) XXX_Size() int {
+ return m.Size()
+}
+func (m *StartResponse) XXX_DiscardUnknown() {
+ xxx_messageInfo_StartResponse.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_StartResponse proto.InternalMessageInfo
type DeleteTaskRequest struct {
- ContainerID string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"`
+ ContainerID string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *DeleteTaskRequest) Reset() { *m = DeleteTaskRequest{} }
-func (*DeleteTaskRequest) ProtoMessage() {}
-func (*DeleteTaskRequest) Descriptor() ([]byte, []int) { return fileDescriptorTasks, []int{4} }
+func (m *DeleteTaskRequest) Reset() { *m = DeleteTaskRequest{} }
+func (*DeleteTaskRequest) ProtoMessage() {}
+func (*DeleteTaskRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_310e7127b8a26f14, []int{4}
+}
+func (m *DeleteTaskRequest) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *DeleteTaskRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_DeleteTaskRequest.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *DeleteTaskRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_DeleteTaskRequest.Merge(m, src)
+}
+func (m *DeleteTaskRequest) XXX_Size() int {
+ return m.Size()
+}
+func (m *DeleteTaskRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_DeleteTaskRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_DeleteTaskRequest proto.InternalMessageInfo
type DeleteResponse struct {
- ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
- Pid uint32 `protobuf:"varint,2,opt,name=pid,proto3" json:"pid,omitempty"`
- ExitStatus uint32 `protobuf:"varint,3,opt,name=exit_status,json=exitStatus,proto3" json:"exit_status,omitempty"`
- ExitedAt time.Time `protobuf:"bytes,4,opt,name=exited_at,json=exitedAt,stdtime" json:"exited_at"`
+ ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ Pid uint32 `protobuf:"varint,2,opt,name=pid,proto3" json:"pid,omitempty"`
+ ExitStatus uint32 `protobuf:"varint,3,opt,name=exit_status,json=exitStatus,proto3" json:"exit_status,omitempty"`
+ ExitedAt time.Time `protobuf:"bytes,4,opt,name=exited_at,json=exitedAt,proto3,stdtime" json:"exited_at"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *DeleteResponse) Reset() { *m = DeleteResponse{} }
-func (*DeleteResponse) ProtoMessage() {}
-func (*DeleteResponse) Descriptor() ([]byte, []int) { return fileDescriptorTasks, []int{5} }
+func (m *DeleteResponse) Reset() { *m = DeleteResponse{} }
+func (*DeleteResponse) ProtoMessage() {}
+func (*DeleteResponse) Descriptor() ([]byte, []int) {
+ return fileDescriptor_310e7127b8a26f14, []int{5}
+}
+func (m *DeleteResponse) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *DeleteResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_DeleteResponse.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *DeleteResponse) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_DeleteResponse.Merge(m, src)
+}
+func (m *DeleteResponse) XXX_Size() int {
+ return m.Size()
+}
+func (m *DeleteResponse) XXX_DiscardUnknown() {
+ xxx_messageInfo_DeleteResponse.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_DeleteResponse proto.InternalMessageInfo
type DeleteProcessRequest struct {
- ContainerID string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"`
- ExecID string `protobuf:"bytes,2,opt,name=exec_id,json=execId,proto3" json:"exec_id,omitempty"`
+ ContainerID string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"`
+ ExecID string `protobuf:"bytes,2,opt,name=exec_id,json=execId,proto3" json:"exec_id,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *DeleteProcessRequest) Reset() { *m = DeleteProcessRequest{} }
-func (*DeleteProcessRequest) ProtoMessage() {}
-func (*DeleteProcessRequest) Descriptor() ([]byte, []int) { return fileDescriptorTasks, []int{6} }
+func (m *DeleteProcessRequest) Reset() { *m = DeleteProcessRequest{} }
+func (*DeleteProcessRequest) ProtoMessage() {}
+func (*DeleteProcessRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_310e7127b8a26f14, []int{6}
+}
+func (m *DeleteProcessRequest) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *DeleteProcessRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_DeleteProcessRequest.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *DeleteProcessRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_DeleteProcessRequest.Merge(m, src)
+}
+func (m *DeleteProcessRequest) XXX_Size() int {
+ return m.Size()
+}
+func (m *DeleteProcessRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_DeleteProcessRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_DeleteProcessRequest proto.InternalMessageInfo
type GetRequest struct {
- ContainerID string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"`
- ExecID string `protobuf:"bytes,2,opt,name=exec_id,json=execId,proto3" json:"exec_id,omitempty"`
+ ContainerID string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"`
+ ExecID string `protobuf:"bytes,2,opt,name=exec_id,json=execId,proto3" json:"exec_id,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *GetRequest) Reset() { *m = GetRequest{} }
-func (*GetRequest) ProtoMessage() {}
-func (*GetRequest) Descriptor() ([]byte, []int) { return fileDescriptorTasks, []int{7} }
+func (m *GetRequest) Reset() { *m = GetRequest{} }
+func (*GetRequest) ProtoMessage() {}
+func (*GetRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_310e7127b8a26f14, []int{7}
+}
+func (m *GetRequest) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *GetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_GetRequest.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *GetRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_GetRequest.Merge(m, src)
+}
+func (m *GetRequest) XXX_Size() int {
+ return m.Size()
+}
+func (m *GetRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_GetRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_GetRequest proto.InternalMessageInfo
type GetResponse struct {
- Process *containerd_v1_types.Process `protobuf:"bytes,1,opt,name=process" json:"process,omitempty"`
+ Process *task.Process `protobuf:"bytes,1,opt,name=process,proto3" json:"process,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *GetResponse) Reset() { *m = GetResponse{} }
-func (*GetResponse) ProtoMessage() {}
-func (*GetResponse) Descriptor() ([]byte, []int) { return fileDescriptorTasks, []int{8} }
+func (m *GetResponse) Reset() { *m = GetResponse{} }
+func (*GetResponse) ProtoMessage() {}
+func (*GetResponse) Descriptor() ([]byte, []int) {
+ return fileDescriptor_310e7127b8a26f14, []int{8}
+}
+func (m *GetResponse) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *GetResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_GetResponse.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *GetResponse) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_GetResponse.Merge(m, src)
+}
+func (m *GetResponse) XXX_Size() int {
+ return m.Size()
+}
+func (m *GetResponse) XXX_DiscardUnknown() {
+ xxx_messageInfo_GetResponse.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_GetResponse proto.InternalMessageInfo
type ListTasksRequest struct {
- Filter string `protobuf:"bytes,1,opt,name=filter,proto3" json:"filter,omitempty"`
+ Filter string `protobuf:"bytes,1,opt,name=filter,proto3" json:"filter,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *ListTasksRequest) Reset() { *m = ListTasksRequest{} }
-func (*ListTasksRequest) ProtoMessage() {}
-func (*ListTasksRequest) Descriptor() ([]byte, []int) { return fileDescriptorTasks, []int{9} }
+func (m *ListTasksRequest) Reset() { *m = ListTasksRequest{} }
+func (*ListTasksRequest) ProtoMessage() {}
+func (*ListTasksRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_310e7127b8a26f14, []int{9}
+}
+func (m *ListTasksRequest) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *ListTasksRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_ListTasksRequest.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *ListTasksRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_ListTasksRequest.Merge(m, src)
+}
+func (m *ListTasksRequest) XXX_Size() int {
+ return m.Size()
+}
+func (m *ListTasksRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_ListTasksRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_ListTasksRequest proto.InternalMessageInfo
type ListTasksResponse struct {
- Tasks []*containerd_v1_types.Process `protobuf:"bytes,1,rep,name=tasks" json:"tasks,omitempty"`
+ Tasks []*task.Process `protobuf:"bytes,1,rep,name=tasks,proto3" json:"tasks,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *ListTasksResponse) Reset() { *m = ListTasksResponse{} }
-func (*ListTasksResponse) ProtoMessage() {}
-func (*ListTasksResponse) Descriptor() ([]byte, []int) { return fileDescriptorTasks, []int{10} }
+func (m *ListTasksResponse) Reset() { *m = ListTasksResponse{} }
+func (*ListTasksResponse) ProtoMessage() {}
+func (*ListTasksResponse) Descriptor() ([]byte, []int) {
+ return fileDescriptor_310e7127b8a26f14, []int{10}
+}
+func (m *ListTasksResponse) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *ListTasksResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_ListTasksResponse.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *ListTasksResponse) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_ListTasksResponse.Merge(m, src)
+}
+func (m *ListTasksResponse) XXX_Size() int {
+ return m.Size()
+}
+func (m *ListTasksResponse) XXX_DiscardUnknown() {
+ xxx_messageInfo_ListTasksResponse.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_ListTasksResponse proto.InternalMessageInfo
type KillRequest struct {
- ContainerID string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"`
- ExecID string `protobuf:"bytes,2,opt,name=exec_id,json=execId,proto3" json:"exec_id,omitempty"`
- Signal uint32 `protobuf:"varint,3,opt,name=signal,proto3" json:"signal,omitempty"`
- All bool `protobuf:"varint,4,opt,name=all,proto3" json:"all,omitempty"`
+ ContainerID string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"`
+ ExecID string `protobuf:"bytes,2,opt,name=exec_id,json=execId,proto3" json:"exec_id,omitempty"`
+ Signal uint32 `protobuf:"varint,3,opt,name=signal,proto3" json:"signal,omitempty"`
+ All bool `protobuf:"varint,4,opt,name=all,proto3" json:"all,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *KillRequest) Reset() { *m = KillRequest{} }
-func (*KillRequest) ProtoMessage() {}
-func (*KillRequest) Descriptor() ([]byte, []int) { return fileDescriptorTasks, []int{11} }
+func (m *KillRequest) Reset() { *m = KillRequest{} }
+func (*KillRequest) ProtoMessage() {}
+func (*KillRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_310e7127b8a26f14, []int{11}
+}
+func (m *KillRequest) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *KillRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_KillRequest.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *KillRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_KillRequest.Merge(m, src)
+}
+func (m *KillRequest) XXX_Size() int {
+ return m.Size()
+}
+func (m *KillRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_KillRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_KillRequest proto.InternalMessageInfo
type ExecProcessRequest struct {
ContainerID string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"`
@@ -204,136 +532,601 @@ type ExecProcessRequest struct {
// Spec for starting a process in the target container.
//
// For runc, this is a process spec, for example.
- Spec *google_protobuf1.Any `protobuf:"bytes,6,opt,name=spec" json:"spec,omitempty"`
+ Spec *types1.Any `protobuf:"bytes,6,opt,name=spec,proto3" json:"spec,omitempty"`
// id of the exec process
- ExecID string `protobuf:"bytes,7,opt,name=exec_id,json=execId,proto3" json:"exec_id,omitempty"`
+ ExecID string `protobuf:"bytes,7,opt,name=exec_id,json=execId,proto3" json:"exec_id,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *ExecProcessRequest) Reset() { *m = ExecProcessRequest{} }
-func (*ExecProcessRequest) ProtoMessage() {}
-func (*ExecProcessRequest) Descriptor() ([]byte, []int) { return fileDescriptorTasks, []int{12} }
+func (m *ExecProcessRequest) Reset() { *m = ExecProcessRequest{} }
+func (*ExecProcessRequest) ProtoMessage() {}
+func (*ExecProcessRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_310e7127b8a26f14, []int{12}
+}
+func (m *ExecProcessRequest) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *ExecProcessRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_ExecProcessRequest.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *ExecProcessRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_ExecProcessRequest.Merge(m, src)
+}
+func (m *ExecProcessRequest) XXX_Size() int {
+ return m.Size()
+}
+func (m *ExecProcessRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_ExecProcessRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_ExecProcessRequest proto.InternalMessageInfo
type ExecProcessResponse struct {
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *ExecProcessResponse) Reset() { *m = ExecProcessResponse{} }
-func (*ExecProcessResponse) ProtoMessage() {}
-func (*ExecProcessResponse) Descriptor() ([]byte, []int) { return fileDescriptorTasks, []int{13} }
+func (m *ExecProcessResponse) Reset() { *m = ExecProcessResponse{} }
+func (*ExecProcessResponse) ProtoMessage() {}
+func (*ExecProcessResponse) Descriptor() ([]byte, []int) {
+ return fileDescriptor_310e7127b8a26f14, []int{13}
+}
+func (m *ExecProcessResponse) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *ExecProcessResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_ExecProcessResponse.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *ExecProcessResponse) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_ExecProcessResponse.Merge(m, src)
+}
+func (m *ExecProcessResponse) XXX_Size() int {
+ return m.Size()
+}
+func (m *ExecProcessResponse) XXX_DiscardUnknown() {
+ xxx_messageInfo_ExecProcessResponse.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_ExecProcessResponse proto.InternalMessageInfo
type ResizePtyRequest struct {
- ContainerID string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"`
- ExecID string `protobuf:"bytes,2,opt,name=exec_id,json=execId,proto3" json:"exec_id,omitempty"`
- Width uint32 `protobuf:"varint,3,opt,name=width,proto3" json:"width,omitempty"`
- Height uint32 `protobuf:"varint,4,opt,name=height,proto3" json:"height,omitempty"`
+ ContainerID string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"`
+ ExecID string `protobuf:"bytes,2,opt,name=exec_id,json=execId,proto3" json:"exec_id,omitempty"`
+ Width uint32 `protobuf:"varint,3,opt,name=width,proto3" json:"width,omitempty"`
+ Height uint32 `protobuf:"varint,4,opt,name=height,proto3" json:"height,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *ResizePtyRequest) Reset() { *m = ResizePtyRequest{} }
-func (*ResizePtyRequest) ProtoMessage() {}
-func (*ResizePtyRequest) Descriptor() ([]byte, []int) { return fileDescriptorTasks, []int{14} }
+func (m *ResizePtyRequest) Reset() { *m = ResizePtyRequest{} }
+func (*ResizePtyRequest) ProtoMessage() {}
+func (*ResizePtyRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_310e7127b8a26f14, []int{14}
+}
+func (m *ResizePtyRequest) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *ResizePtyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_ResizePtyRequest.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *ResizePtyRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_ResizePtyRequest.Merge(m, src)
+}
+func (m *ResizePtyRequest) XXX_Size() int {
+ return m.Size()
+}
+func (m *ResizePtyRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_ResizePtyRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_ResizePtyRequest proto.InternalMessageInfo
type CloseIORequest struct {
- ContainerID string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"`
- ExecID string `protobuf:"bytes,2,opt,name=exec_id,json=execId,proto3" json:"exec_id,omitempty"`
- Stdin bool `protobuf:"varint,3,opt,name=stdin,proto3" json:"stdin,omitempty"`
+ ContainerID string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"`
+ ExecID string `protobuf:"bytes,2,opt,name=exec_id,json=execId,proto3" json:"exec_id,omitempty"`
+ Stdin bool `protobuf:"varint,3,opt,name=stdin,proto3" json:"stdin,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *CloseIORequest) Reset() { *m = CloseIORequest{} }
-func (*CloseIORequest) ProtoMessage() {}
-func (*CloseIORequest) Descriptor() ([]byte, []int) { return fileDescriptorTasks, []int{15} }
+func (m *CloseIORequest) Reset() { *m = CloseIORequest{} }
+func (*CloseIORequest) ProtoMessage() {}
+func (*CloseIORequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_310e7127b8a26f14, []int{15}
+}
+func (m *CloseIORequest) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *CloseIORequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_CloseIORequest.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *CloseIORequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_CloseIORequest.Merge(m, src)
+}
+func (m *CloseIORequest) XXX_Size() int {
+ return m.Size()
+}
+func (m *CloseIORequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_CloseIORequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_CloseIORequest proto.InternalMessageInfo
type PauseTaskRequest struct {
- ContainerID string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"`
+ ContainerID string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *PauseTaskRequest) Reset() { *m = PauseTaskRequest{} }
-func (*PauseTaskRequest) ProtoMessage() {}
-func (*PauseTaskRequest) Descriptor() ([]byte, []int) { return fileDescriptorTasks, []int{16} }
+func (m *PauseTaskRequest) Reset() { *m = PauseTaskRequest{} }
+func (*PauseTaskRequest) ProtoMessage() {}
+func (*PauseTaskRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_310e7127b8a26f14, []int{16}
+}
+func (m *PauseTaskRequest) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *PauseTaskRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_PauseTaskRequest.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *PauseTaskRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_PauseTaskRequest.Merge(m, src)
+}
+func (m *PauseTaskRequest) XXX_Size() int {
+ return m.Size()
+}
+func (m *PauseTaskRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_PauseTaskRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_PauseTaskRequest proto.InternalMessageInfo
type ResumeTaskRequest struct {
- ContainerID string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"`
+ ContainerID string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *ResumeTaskRequest) Reset() { *m = ResumeTaskRequest{} }
-func (*ResumeTaskRequest) ProtoMessage() {}
-func (*ResumeTaskRequest) Descriptor() ([]byte, []int) { return fileDescriptorTasks, []int{17} }
+func (m *ResumeTaskRequest) Reset() { *m = ResumeTaskRequest{} }
+func (*ResumeTaskRequest) ProtoMessage() {}
+func (*ResumeTaskRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_310e7127b8a26f14, []int{17}
+}
+func (m *ResumeTaskRequest) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *ResumeTaskRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_ResumeTaskRequest.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *ResumeTaskRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_ResumeTaskRequest.Merge(m, src)
+}
+func (m *ResumeTaskRequest) XXX_Size() int {
+ return m.Size()
+}
+func (m *ResumeTaskRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_ResumeTaskRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_ResumeTaskRequest proto.InternalMessageInfo
type ListPidsRequest struct {
- ContainerID string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"`
+ ContainerID string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *ListPidsRequest) Reset() { *m = ListPidsRequest{} }
-func (*ListPidsRequest) ProtoMessage() {}
-func (*ListPidsRequest) Descriptor() ([]byte, []int) { return fileDescriptorTasks, []int{18} }
+func (m *ListPidsRequest) Reset() { *m = ListPidsRequest{} }
+func (*ListPidsRequest) ProtoMessage() {}
+func (*ListPidsRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_310e7127b8a26f14, []int{18}
+}
+func (m *ListPidsRequest) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *ListPidsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_ListPidsRequest.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *ListPidsRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_ListPidsRequest.Merge(m, src)
+}
+func (m *ListPidsRequest) XXX_Size() int {
+ return m.Size()
+}
+func (m *ListPidsRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_ListPidsRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_ListPidsRequest proto.InternalMessageInfo
type ListPidsResponse struct {
// Processes includes the process ID and additional process information
- Processes []*containerd_v1_types.ProcessInfo `protobuf:"bytes,1,rep,name=processes" json:"processes,omitempty"`
+ Processes []*task.ProcessInfo `protobuf:"bytes,1,rep,name=processes,proto3" json:"processes,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *ListPidsResponse) Reset() { *m = ListPidsResponse{} }
-func (*ListPidsResponse) ProtoMessage() {}
-func (*ListPidsResponse) Descriptor() ([]byte, []int) { return fileDescriptorTasks, []int{19} }
+func (m *ListPidsResponse) Reset() { *m = ListPidsResponse{} }
+func (*ListPidsResponse) ProtoMessage() {}
+func (*ListPidsResponse) Descriptor() ([]byte, []int) {
+ return fileDescriptor_310e7127b8a26f14, []int{19}
+}
+func (m *ListPidsResponse) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *ListPidsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_ListPidsResponse.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *ListPidsResponse) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_ListPidsResponse.Merge(m, src)
+}
+func (m *ListPidsResponse) XXX_Size() int {
+ return m.Size()
+}
+func (m *ListPidsResponse) XXX_DiscardUnknown() {
+ xxx_messageInfo_ListPidsResponse.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_ListPidsResponse proto.InternalMessageInfo
type CheckpointTaskRequest struct {
- ContainerID string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"`
- ParentCheckpoint github_com_opencontainers_go_digest.Digest `protobuf:"bytes,2,opt,name=parent_checkpoint,json=parentCheckpoint,proto3,customtype=github.com/opencontainers/go-digest.Digest" json:"parent_checkpoint"`
- Options *google_protobuf1.Any `protobuf:"bytes,3,opt,name=options" json:"options,omitempty"`
+ ContainerID string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"`
+ ParentCheckpoint github_com_opencontainers_go_digest.Digest `protobuf:"bytes,2,opt,name=parent_checkpoint,json=parentCheckpoint,proto3,customtype=github.com/opencontainers/go-digest.Digest" json:"parent_checkpoint"`
+ Options *types1.Any `protobuf:"bytes,3,opt,name=options,proto3" json:"options,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *CheckpointTaskRequest) Reset() { *m = CheckpointTaskRequest{} }
-func (*CheckpointTaskRequest) ProtoMessage() {}
-func (*CheckpointTaskRequest) Descriptor() ([]byte, []int) { return fileDescriptorTasks, []int{20} }
+func (m *CheckpointTaskRequest) Reset() { *m = CheckpointTaskRequest{} }
+func (*CheckpointTaskRequest) ProtoMessage() {}
+func (*CheckpointTaskRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_310e7127b8a26f14, []int{20}
+}
+func (m *CheckpointTaskRequest) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *CheckpointTaskRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_CheckpointTaskRequest.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *CheckpointTaskRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_CheckpointTaskRequest.Merge(m, src)
+}
+func (m *CheckpointTaskRequest) XXX_Size() int {
+ return m.Size()
+}
+func (m *CheckpointTaskRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_CheckpointTaskRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_CheckpointTaskRequest proto.InternalMessageInfo
type CheckpointTaskResponse struct {
- Descriptors []*containerd_types2.Descriptor `protobuf:"bytes,1,rep,name=descriptors" json:"descriptors,omitempty"`
+ Descriptors []*types.Descriptor `protobuf:"bytes,1,rep,name=descriptors,proto3" json:"descriptors,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *CheckpointTaskResponse) Reset() { *m = CheckpointTaskResponse{} }
-func (*CheckpointTaskResponse) ProtoMessage() {}
-func (*CheckpointTaskResponse) Descriptor() ([]byte, []int) { return fileDescriptorTasks, []int{21} }
+func (m *CheckpointTaskResponse) Reset() { *m = CheckpointTaskResponse{} }
+func (*CheckpointTaskResponse) ProtoMessage() {}
+func (*CheckpointTaskResponse) Descriptor() ([]byte, []int) {
+ return fileDescriptor_310e7127b8a26f14, []int{21}
+}
+func (m *CheckpointTaskResponse) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *CheckpointTaskResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_CheckpointTaskResponse.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *CheckpointTaskResponse) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_CheckpointTaskResponse.Merge(m, src)
+}
+func (m *CheckpointTaskResponse) XXX_Size() int {
+ return m.Size()
+}
+func (m *CheckpointTaskResponse) XXX_DiscardUnknown() {
+ xxx_messageInfo_CheckpointTaskResponse.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_CheckpointTaskResponse proto.InternalMessageInfo
type UpdateTaskRequest struct {
- ContainerID string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"`
- Resources *google_protobuf1.Any `protobuf:"bytes,2,opt,name=resources" json:"resources,omitempty"`
+ ContainerID string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"`
+ Resources *types1.Any `protobuf:"bytes,2,opt,name=resources,proto3" json:"resources,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *UpdateTaskRequest) Reset() { *m = UpdateTaskRequest{} }
-func (*UpdateTaskRequest) ProtoMessage() {}
-func (*UpdateTaskRequest) Descriptor() ([]byte, []int) { return fileDescriptorTasks, []int{22} }
+func (m *UpdateTaskRequest) Reset() { *m = UpdateTaskRequest{} }
+func (*UpdateTaskRequest) ProtoMessage() {}
+func (*UpdateTaskRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_310e7127b8a26f14, []int{22}
+}
+func (m *UpdateTaskRequest) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *UpdateTaskRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_UpdateTaskRequest.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *UpdateTaskRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_UpdateTaskRequest.Merge(m, src)
+}
+func (m *UpdateTaskRequest) XXX_Size() int {
+ return m.Size()
+}
+func (m *UpdateTaskRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_UpdateTaskRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_UpdateTaskRequest proto.InternalMessageInfo
type MetricsRequest struct {
- Filters []string `protobuf:"bytes,1,rep,name=filters" json:"filters,omitempty"`
+ Filters []string `protobuf:"bytes,1,rep,name=filters,proto3" json:"filters,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *MetricsRequest) Reset() { *m = MetricsRequest{} }
-func (*MetricsRequest) ProtoMessage() {}
-func (*MetricsRequest) Descriptor() ([]byte, []int) { return fileDescriptorTasks, []int{23} }
+func (m *MetricsRequest) Reset() { *m = MetricsRequest{} }
+func (*MetricsRequest) ProtoMessage() {}
+func (*MetricsRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_310e7127b8a26f14, []int{23}
+}
+func (m *MetricsRequest) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *MetricsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_MetricsRequest.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *MetricsRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_MetricsRequest.Merge(m, src)
+}
+func (m *MetricsRequest) XXX_Size() int {
+ return m.Size()
+}
+func (m *MetricsRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_MetricsRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_MetricsRequest proto.InternalMessageInfo
type MetricsResponse struct {
- Metrics []*containerd_types1.Metric `protobuf:"bytes,1,rep,name=metrics" json:"metrics,omitempty"`
+ Metrics []*types.Metric `protobuf:"bytes,1,rep,name=metrics,proto3" json:"metrics,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *MetricsResponse) Reset() { *m = MetricsResponse{} }
-func (*MetricsResponse) ProtoMessage() {}
-func (*MetricsResponse) Descriptor() ([]byte, []int) { return fileDescriptorTasks, []int{24} }
+func (m *MetricsResponse) Reset() { *m = MetricsResponse{} }
+func (*MetricsResponse) ProtoMessage() {}
+func (*MetricsResponse) Descriptor() ([]byte, []int) {
+ return fileDescriptor_310e7127b8a26f14, []int{24}
+}
+func (m *MetricsResponse) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *MetricsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_MetricsResponse.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *MetricsResponse) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_MetricsResponse.Merge(m, src)
+}
+func (m *MetricsResponse) XXX_Size() int {
+ return m.Size()
+}
+func (m *MetricsResponse) XXX_DiscardUnknown() {
+ xxx_messageInfo_MetricsResponse.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_MetricsResponse proto.InternalMessageInfo
type WaitRequest struct {
- ContainerID string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"`
- ExecID string `protobuf:"bytes,2,opt,name=exec_id,json=execId,proto3" json:"exec_id,omitempty"`
+ ContainerID string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"`
+ ExecID string `protobuf:"bytes,2,opt,name=exec_id,json=execId,proto3" json:"exec_id,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *WaitRequest) Reset() { *m = WaitRequest{} }
-func (*WaitRequest) ProtoMessage() {}
-func (*WaitRequest) Descriptor() ([]byte, []int) { return fileDescriptorTasks, []int{25} }
+func (m *WaitRequest) Reset() { *m = WaitRequest{} }
+func (*WaitRequest) ProtoMessage() {}
+func (*WaitRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_310e7127b8a26f14, []int{25}
+}
+func (m *WaitRequest) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *WaitRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_WaitRequest.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *WaitRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_WaitRequest.Merge(m, src)
+}
+func (m *WaitRequest) XXX_Size() int {
+ return m.Size()
+}
+func (m *WaitRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_WaitRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_WaitRequest proto.InternalMessageInfo
type WaitResponse struct {
- ExitStatus uint32 `protobuf:"varint,1,opt,name=exit_status,json=exitStatus,proto3" json:"exit_status,omitempty"`
- ExitedAt time.Time `protobuf:"bytes,2,opt,name=exited_at,json=exitedAt,stdtime" json:"exited_at"`
+ ExitStatus uint32 `protobuf:"varint,1,opt,name=exit_status,json=exitStatus,proto3" json:"exit_status,omitempty"`
+ ExitedAt time.Time `protobuf:"bytes,2,opt,name=exited_at,json=exitedAt,proto3,stdtime" json:"exited_at"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *WaitResponse) Reset() { *m = WaitResponse{} }
-func (*WaitResponse) ProtoMessage() {}
-func (*WaitResponse) Descriptor() ([]byte, []int) { return fileDescriptorTasks, []int{26} }
+func (m *WaitResponse) Reset() { *m = WaitResponse{} }
+func (*WaitResponse) ProtoMessage() {}
+func (*WaitResponse) Descriptor() ([]byte, []int) {
+ return fileDescriptor_310e7127b8a26f14, []int{26}
+}
+func (m *WaitResponse) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *WaitResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_WaitResponse.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *WaitResponse) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_WaitResponse.Merge(m, src)
+}
+func (m *WaitResponse) XXX_Size() int {
+ return m.Size()
+}
+func (m *WaitResponse) XXX_DiscardUnknown() {
+ xxx_messageInfo_WaitResponse.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_WaitResponse proto.InternalMessageInfo
func init() {
proto.RegisterType((*CreateTaskRequest)(nil), "containerd.services.tasks.v1.CreateTaskRequest")
@@ -365,6 +1158,97 @@ func init() {
proto.RegisterType((*WaitResponse)(nil), "containerd.services.tasks.v1.WaitResponse")
}
+func init() {
+ proto.RegisterFile("github.com/containerd/containerd/api/services/tasks/v1/tasks.proto", fileDescriptor_310e7127b8a26f14)
+}
+
+var fileDescriptor_310e7127b8a26f14 = []byte{
+ // 1318 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x58, 0x4b, 0x6f, 0x1b, 0x45,
+ 0x1c, 0xef, 0xfa, 0xed, 0xbf, 0x93, 0x36, 0x59, 0xd2, 0x60, 0x96, 0x2a, 0x0e, 0xcb, 0xc5, 0x04,
+ 0xba, 0x4b, 0x5d, 0x54, 0x21, 0x5a, 0x21, 0x35, 0x0f, 0x22, 0x0b, 0xaa, 0xa6, 0xdb, 0x02, 0x55,
+ 0x25, 0x14, 0xb6, 0xbb, 0x13, 0x67, 0x14, 0x7b, 0x67, 0xbb, 0x33, 0x4e, 0x1b, 0x38, 0xc0, 0x47,
+ 0xe8, 0x95, 0x0b, 0x9f, 0x27, 0x47, 0x8e, 0x08, 0x55, 0x81, 0xfa, 0x5b, 0x70, 0x43, 0xf3, 0xd8,
+ 0xcd, 0xc6, 0x8e, 0xbd, 0x4e, 0xd3, 0x70, 0x69, 0x67, 0x66, 0xff, 0xaf, 0xf9, 0xcd, 0xff, 0xf1,
+ 0x73, 0x60, 0xb5, 0x83, 0xd9, 0x6e, 0xff, 0xa9, 0xe5, 0x91, 0x9e, 0xed, 0x91, 0x80, 0xb9, 0x38,
+ 0x40, 0x91, 0x9f, 0x5e, 0xba, 0x21, 0xb6, 0x29, 0x8a, 0xf6, 0xb1, 0x87, 0xa8, 0xcd, 0x5c, 0xba,
+ 0x47, 0xed, 0xfd, 0x1b, 0x72, 0x61, 0x85, 0x11, 0x61, 0x44, 0xbf, 0x76, 0x2c, 0x6d, 0xc5, 0x92,
+ 0x96, 0x14, 0xd8, 0xbf, 0x61, 0xbc, 0xdf, 0x21, 0xa4, 0xd3, 0x45, 0xb6, 0x90, 0x7d, 0xda, 0xdf,
+ 0xb1, 0x51, 0x2f, 0x64, 0x07, 0x52, 0xd5, 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, 0xd7, 0xa7, 0x94, 0x56, 0xa1, 0xff, 0x00,
+ 0x05, 0x3e, 0x73, 0xb2, 0xaa, 0x30, 0x35, 0xff, 0x8c, 0x95, 0x69, 0x44, 0xa5, 0xf9, 0xd5, 0xef,
+ 0x0e, 0x5f, 0x2f, 0x5d, 0xfa, 0xf3, 0xf5, 0xd2, 0xa5, 0x5f, 0x07, 0x4b, 0xda, 0xe1, 0x60, 0x49,
+ 0xfb, 0x63, 0xb0, 0xa4, 0xfd, 0x33, 0x58, 0xd2, 0x9e, 0xdc, 0x79, 0xb3, 0xbf, 0xec, 0xdd, 0x16,
+ 0x8b, 0xc7, 0xb9, 0xa7, 0x25, 0x01, 0xd8, 0xcd, 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0x85, 0xa2,
+ 0x4f, 0xd1, 0x22, 0x14, 0x00, 0x00,
+}
+
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn
@@ -373,8 +1257,9 @@ var _ grpc.ClientConn
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4
-// Client API for Tasks service
-
+// TasksClient is the client API for Tasks service.
+//
+// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type TasksClient interface {
// Create a task.
Create(ctx context.Context, in *CreateTaskRequest, opts ...grpc.CallOption) (*CreateTaskResponse, error)
@@ -386,15 +1271,15 @@ type TasksClient interface {
Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error)
List(ctx context.Context, in *ListTasksRequest, opts ...grpc.CallOption) (*ListTasksResponse, error)
// Kill a task or process.
- Kill(ctx context.Context, in *KillRequest, opts ...grpc.CallOption) (*google_protobuf.Empty, error)
- Exec(ctx context.Context, in *ExecProcessRequest, opts ...grpc.CallOption) (*google_protobuf.Empty, error)
- ResizePty(ctx context.Context, in *ResizePtyRequest, opts ...grpc.CallOption) (*google_protobuf.Empty, error)
- CloseIO(ctx context.Context, in *CloseIORequest, opts ...grpc.CallOption) (*google_protobuf.Empty, error)
- Pause(ctx context.Context, in *PauseTaskRequest, opts ...grpc.CallOption) (*google_protobuf.Empty, error)
- Resume(ctx context.Context, in *ResumeTaskRequest, opts ...grpc.CallOption) (*google_protobuf.Empty, error)
+ Kill(ctx context.Context, in *KillRequest, opts ...grpc.CallOption) (*types1.Empty, error)
+ Exec(ctx context.Context, in *ExecProcessRequest, opts ...grpc.CallOption) (*types1.Empty, error)
+ ResizePty(ctx context.Context, in *ResizePtyRequest, opts ...grpc.CallOption) (*types1.Empty, error)
+ CloseIO(ctx context.Context, in *CloseIORequest, opts ...grpc.CallOption) (*types1.Empty, error)
+ Pause(ctx context.Context, in *PauseTaskRequest, opts ...grpc.CallOption) (*types1.Empty, error)
+ Resume(ctx context.Context, in *ResumeTaskRequest, opts ...grpc.CallOption) (*types1.Empty, error)
ListPids(ctx context.Context, in *ListPidsRequest, opts ...grpc.CallOption) (*ListPidsResponse, error)
Checkpoint(ctx context.Context, in *CheckpointTaskRequest, opts ...grpc.CallOption) (*CheckpointTaskResponse, error)
- Update(ctx context.Context, in *UpdateTaskRequest, opts ...grpc.CallOption) (*google_protobuf.Empty, error)
+ Update(ctx context.Context, in *UpdateTaskRequest, opts ...grpc.CallOption) (*types1.Empty, error)
Metrics(ctx context.Context, in *MetricsRequest, opts ...grpc.CallOption) (*MetricsResponse, error)
Wait(ctx context.Context, in *WaitRequest, opts ...grpc.CallOption) (*WaitResponse, error)
}
@@ -409,7 +1294,7 @@ func NewTasksClient(cc *grpc.ClientConn) TasksClient {
func (c *tasksClient) Create(ctx context.Context, in *CreateTaskRequest, opts ...grpc.CallOption) (*CreateTaskResponse, error) {
out := new(CreateTaskResponse)
- err := grpc.Invoke(ctx, "/containerd.services.tasks.v1.Tasks/Create", in, out, c.cc, opts...)
+ err := c.cc.Invoke(ctx, "/containerd.services.tasks.v1.Tasks/Create", in, out, opts...)
if err != nil {
return nil, err
}
@@ -418,7 +1303,7 @@ func (c *tasksClient) Create(ctx context.Context, in *CreateTaskRequest, opts ..
func (c *tasksClient) Start(ctx context.Context, in *StartRequest, opts ...grpc.CallOption) (*StartResponse, error) {
out := new(StartResponse)
- err := grpc.Invoke(ctx, "/containerd.services.tasks.v1.Tasks/Start", in, out, c.cc, opts...)
+ err := c.cc.Invoke(ctx, "/containerd.services.tasks.v1.Tasks/Start", in, out, opts...)
if err != nil {
return nil, err
}
@@ -427,7 +1312,7 @@ func (c *tasksClient) Start(ctx context.Context, in *StartRequest, opts ...grpc.
func (c *tasksClient) Delete(ctx context.Context, in *DeleteTaskRequest, opts ...grpc.CallOption) (*DeleteResponse, error) {
out := new(DeleteResponse)
- err := grpc.Invoke(ctx, "/containerd.services.tasks.v1.Tasks/Delete", in, out, c.cc, opts...)
+ err := c.cc.Invoke(ctx, "/containerd.services.tasks.v1.Tasks/Delete", in, out, opts...)
if err != nil {
return nil, err
}
@@ -436,7 +1321,7 @@ func (c *tasksClient) Delete(ctx context.Context, in *DeleteTaskRequest, opts ..
func (c *tasksClient) DeleteProcess(ctx context.Context, in *DeleteProcessRequest, opts ...grpc.CallOption) (*DeleteResponse, error) {
out := new(DeleteResponse)
- err := grpc.Invoke(ctx, "/containerd.services.tasks.v1.Tasks/DeleteProcess", in, out, c.cc, opts...)
+ err := c.cc.Invoke(ctx, "/containerd.services.tasks.v1.Tasks/DeleteProcess", in, out, opts...)
if err != nil {
return nil, err
}
@@ -445,7 +1330,7 @@ func (c *tasksClient) DeleteProcess(ctx context.Context, in *DeleteProcessReques
func (c *tasksClient) Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error) {
out := new(GetResponse)
- err := grpc.Invoke(ctx, "/containerd.services.tasks.v1.Tasks/Get", in, out, c.cc, opts...)
+ err := c.cc.Invoke(ctx, "/containerd.services.tasks.v1.Tasks/Get", in, out, opts...)
if err != nil {
return nil, err
}
@@ -454,61 +1339,61 @@ func (c *tasksClient) Get(ctx context.Context, in *GetRequest, opts ...grpc.Call
func (c *tasksClient) List(ctx context.Context, in *ListTasksRequest, opts ...grpc.CallOption) (*ListTasksResponse, error) {
out := new(ListTasksResponse)
- err := grpc.Invoke(ctx, "/containerd.services.tasks.v1.Tasks/List", in, out, c.cc, opts...)
+ err := c.cc.Invoke(ctx, "/containerd.services.tasks.v1.Tasks/List", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
-func (c *tasksClient) Kill(ctx context.Context, in *KillRequest, opts ...grpc.CallOption) (*google_protobuf.Empty, error) {
- out := new(google_protobuf.Empty)
- err := grpc.Invoke(ctx, "/containerd.services.tasks.v1.Tasks/Kill", in, out, c.cc, opts...)
+func (c *tasksClient) Kill(ctx context.Context, in *KillRequest, opts ...grpc.CallOption) (*types1.Empty, error) {
+ out := new(types1.Empty)
+ err := c.cc.Invoke(ctx, "/containerd.services.tasks.v1.Tasks/Kill", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
-func (c *tasksClient) Exec(ctx context.Context, in *ExecProcessRequest, opts ...grpc.CallOption) (*google_protobuf.Empty, error) {
- out := new(google_protobuf.Empty)
- err := grpc.Invoke(ctx, "/containerd.services.tasks.v1.Tasks/Exec", in, out, c.cc, opts...)
+func (c *tasksClient) Exec(ctx context.Context, in *ExecProcessRequest, opts ...grpc.CallOption) (*types1.Empty, error) {
+ out := new(types1.Empty)
+ err := c.cc.Invoke(ctx, "/containerd.services.tasks.v1.Tasks/Exec", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
-func (c *tasksClient) ResizePty(ctx context.Context, in *ResizePtyRequest, opts ...grpc.CallOption) (*google_protobuf.Empty, error) {
- out := new(google_protobuf.Empty)
- err := grpc.Invoke(ctx, "/containerd.services.tasks.v1.Tasks/ResizePty", in, out, c.cc, opts...)
+func (c *tasksClient) ResizePty(ctx context.Context, in *ResizePtyRequest, opts ...grpc.CallOption) (*types1.Empty, error) {
+ out := new(types1.Empty)
+ err := c.cc.Invoke(ctx, "/containerd.services.tasks.v1.Tasks/ResizePty", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
-func (c *tasksClient) CloseIO(ctx context.Context, in *CloseIORequest, opts ...grpc.CallOption) (*google_protobuf.Empty, error) {
- out := new(google_protobuf.Empty)
- err := grpc.Invoke(ctx, "/containerd.services.tasks.v1.Tasks/CloseIO", in, out, c.cc, opts...)
+func (c *tasksClient) CloseIO(ctx context.Context, in *CloseIORequest, opts ...grpc.CallOption) (*types1.Empty, error) {
+ out := new(types1.Empty)
+ err := c.cc.Invoke(ctx, "/containerd.services.tasks.v1.Tasks/CloseIO", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
-func (c *tasksClient) Pause(ctx context.Context, in *PauseTaskRequest, opts ...grpc.CallOption) (*google_protobuf.Empty, error) {
- out := new(google_protobuf.Empty)
- err := grpc.Invoke(ctx, "/containerd.services.tasks.v1.Tasks/Pause", in, out, c.cc, opts...)
+func (c *tasksClient) Pause(ctx context.Context, in *PauseTaskRequest, opts ...grpc.CallOption) (*types1.Empty, error) {
+ out := new(types1.Empty)
+ err := c.cc.Invoke(ctx, "/containerd.services.tasks.v1.Tasks/Pause", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
-func (c *tasksClient) Resume(ctx context.Context, in *ResumeTaskRequest, opts ...grpc.CallOption) (*google_protobuf.Empty, error) {
- out := new(google_protobuf.Empty)
- err := grpc.Invoke(ctx, "/containerd.services.tasks.v1.Tasks/Resume", in, out, c.cc, opts...)
+func (c *tasksClient) Resume(ctx context.Context, in *ResumeTaskRequest, opts ...grpc.CallOption) (*types1.Empty, error) {
+ out := new(types1.Empty)
+ err := c.cc.Invoke(ctx, "/containerd.services.tasks.v1.Tasks/Resume", in, out, opts...)
if err != nil {
return nil, err
}
@@ -517,7 +1402,7 @@ func (c *tasksClient) Resume(ctx context.Context, in *ResumeTaskRequest, opts ..
func (c *tasksClient) ListPids(ctx context.Context, in *ListPidsRequest, opts ...grpc.CallOption) (*ListPidsResponse, error) {
out := new(ListPidsResponse)
- err := grpc.Invoke(ctx, "/containerd.services.tasks.v1.Tasks/ListPids", in, out, c.cc, opts...)
+ err := c.cc.Invoke(ctx, "/containerd.services.tasks.v1.Tasks/ListPids", in, out, opts...)
if err != nil {
return nil, err
}
@@ -526,16 +1411,16 @@ func (c *tasksClient) ListPids(ctx context.Context, in *ListPidsRequest, opts ..
func (c *tasksClient) Checkpoint(ctx context.Context, in *CheckpointTaskRequest, opts ...grpc.CallOption) (*CheckpointTaskResponse, error) {
out := new(CheckpointTaskResponse)
- err := grpc.Invoke(ctx, "/containerd.services.tasks.v1.Tasks/Checkpoint", in, out, c.cc, opts...)
+ err := c.cc.Invoke(ctx, "/containerd.services.tasks.v1.Tasks/Checkpoint", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
-func (c *tasksClient) Update(ctx context.Context, in *UpdateTaskRequest, opts ...grpc.CallOption) (*google_protobuf.Empty, error) {
- out := new(google_protobuf.Empty)
- err := grpc.Invoke(ctx, "/containerd.services.tasks.v1.Tasks/Update", in, out, c.cc, opts...)
+func (c *tasksClient) Update(ctx context.Context, in *UpdateTaskRequest, opts ...grpc.CallOption) (*types1.Empty, error) {
+ out := new(types1.Empty)
+ err := c.cc.Invoke(ctx, "/containerd.services.tasks.v1.Tasks/Update", in, out, opts...)
if err != nil {
return nil, err
}
@@ -544,7 +1429,7 @@ func (c *tasksClient) Update(ctx context.Context, in *UpdateTaskRequest, opts ..
func (c *tasksClient) Metrics(ctx context.Context, in *MetricsRequest, opts ...grpc.CallOption) (*MetricsResponse, error) {
out := new(MetricsResponse)
- err := grpc.Invoke(ctx, "/containerd.services.tasks.v1.Tasks/Metrics", in, out, c.cc, opts...)
+ err := c.cc.Invoke(ctx, "/containerd.services.tasks.v1.Tasks/Metrics", in, out, opts...)
if err != nil {
return nil, err
}
@@ -553,15 +1438,14 @@ func (c *tasksClient) Metrics(ctx context.Context, in *MetricsRequest, opts ...g
func (c *tasksClient) Wait(ctx context.Context, in *WaitRequest, opts ...grpc.CallOption) (*WaitResponse, error) {
out := new(WaitResponse)
- err := grpc.Invoke(ctx, "/containerd.services.tasks.v1.Tasks/Wait", in, out, c.cc, opts...)
+ err := c.cc.Invoke(ctx, "/containerd.services.tasks.v1.Tasks/Wait", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
-// Server API for Tasks service
-
+// TasksServer is the server API for Tasks service.
type TasksServer interface {
// Create a task.
Create(context.Context, *CreateTaskRequest) (*CreateTaskResponse, error)
@@ -573,15 +1457,15 @@ type TasksServer interface {
Get(context.Context, *GetRequest) (*GetResponse, error)
List(context.Context, *ListTasksRequest) (*ListTasksResponse, error)
// Kill a task or process.
- Kill(context.Context, *KillRequest) (*google_protobuf.Empty, error)
- Exec(context.Context, *ExecProcessRequest) (*google_protobuf.Empty, error)
- ResizePty(context.Context, *ResizePtyRequest) (*google_protobuf.Empty, error)
- CloseIO(context.Context, *CloseIORequest) (*google_protobuf.Empty, error)
- Pause(context.Context, *PauseTaskRequest) (*google_protobuf.Empty, error)
- Resume(context.Context, *ResumeTaskRequest) (*google_protobuf.Empty, error)
+ Kill(context.Context, *KillRequest) (*types1.Empty, error)
+ Exec(context.Context, *ExecProcessRequest) (*types1.Empty, error)
+ ResizePty(context.Context, *ResizePtyRequest) (*types1.Empty, error)
+ CloseIO(context.Context, *CloseIORequest) (*types1.Empty, error)
+ Pause(context.Context, *PauseTaskRequest) (*types1.Empty, error)
+ Resume(context.Context, *ResumeTaskRequest) (*types1.Empty, error)
ListPids(context.Context, *ListPidsRequest) (*ListPidsResponse, error)
Checkpoint(context.Context, *CheckpointTaskRequest) (*CheckpointTaskResponse, error)
- Update(context.Context, *UpdateTaskRequest) (*google_protobuf.Empty, error)
+ Update(context.Context, *UpdateTaskRequest) (*types1.Empty, error)
Metrics(context.Context, *MetricsRequest) (*MetricsResponse, error)
Wait(context.Context, *WaitRequest) (*WaitResponse, error)
}
@@ -1054,6 +1938,9 @@ func (m *CreateTaskRequest) MarshalTo(dAtA []byte) (int, error) {
}
i += n2
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -1083,6 +1970,9 @@ func (m *CreateTaskResponse) MarshalTo(dAtA []byte) (int, error) {
i++
i = encodeVarintTasks(dAtA, i, uint64(m.Pid))
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -1113,6 +2003,9 @@ func (m *StartRequest) MarshalTo(dAtA []byte) (int, error) {
i = encodeVarintTasks(dAtA, i, uint64(len(m.ExecID)))
i += copy(dAtA[i:], m.ExecID)
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -1136,6 +2029,9 @@ func (m *StartResponse) MarshalTo(dAtA []byte) (int, error) {
i++
i = encodeVarintTasks(dAtA, i, uint64(m.Pid))
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -1160,6 +2056,9 @@ func (m *DeleteTaskRequest) MarshalTo(dAtA []byte) (int, error) {
i = encodeVarintTasks(dAtA, i, uint64(len(m.ContainerID)))
i += copy(dAtA[i:], m.ContainerID)
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -1196,12 +2095,15 @@ func (m *DeleteResponse) MarshalTo(dAtA []byte) (int, error) {
}
dAtA[i] = 0x22
i++
- i = encodeVarintTasks(dAtA, i, uint64(types.SizeOfStdTime(m.ExitedAt)))
- n3, err := types.StdTimeMarshalTo(m.ExitedAt, dAtA[i:])
+ i = encodeVarintTasks(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.ExitedAt)))
+ n3, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.ExitedAt, dAtA[i:])
if err != nil {
return 0, err
}
i += n3
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -1232,6 +2134,9 @@ func (m *DeleteProcessRequest) MarshalTo(dAtA []byte) (int, error) {
i = encodeVarintTasks(dAtA, i, uint64(len(m.ExecID)))
i += copy(dAtA[i:], m.ExecID)
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -1262,6 +2167,9 @@ func (m *GetRequest) MarshalTo(dAtA []byte) (int, error) {
i = encodeVarintTasks(dAtA, i, uint64(len(m.ExecID)))
i += copy(dAtA[i:], m.ExecID)
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -1290,6 +2198,9 @@ func (m *GetResponse) MarshalTo(dAtA []byte) (int, error) {
}
i += n4
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -1314,6 +2225,9 @@ func (m *ListTasksRequest) MarshalTo(dAtA []byte) (int, error) {
i = encodeVarintTasks(dAtA, i, uint64(len(m.Filter)))
i += copy(dAtA[i:], m.Filter)
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -1344,6 +2258,9 @@ func (m *ListTasksResponse) MarshalTo(dAtA []byte) (int, error) {
i += n
}
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -1389,6 +2306,9 @@ func (m *KillRequest) MarshalTo(dAtA []byte) (int, error) {
}
i++
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -1457,6 +2377,9 @@ func (m *ExecProcessRequest) MarshalTo(dAtA []byte) (int, error) {
i = encodeVarintTasks(dAtA, i, uint64(len(m.ExecID)))
i += copy(dAtA[i:], m.ExecID)
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -1475,6 +2398,9 @@ func (m *ExecProcessResponse) MarshalTo(dAtA []byte) (int, error) {
_ = i
var l int
_ = l
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -1515,6 +2441,9 @@ func (m *ResizePtyRequest) MarshalTo(dAtA []byte) (int, error) {
i++
i = encodeVarintTasks(dAtA, i, uint64(m.Height))
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -1555,6 +2484,9 @@ func (m *CloseIORequest) MarshalTo(dAtA []byte) (int, error) {
}
i++
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -1579,6 +2511,9 @@ func (m *PauseTaskRequest) MarshalTo(dAtA []byte) (int, error) {
i = encodeVarintTasks(dAtA, i, uint64(len(m.ContainerID)))
i += copy(dAtA[i:], m.ContainerID)
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -1603,6 +2538,9 @@ func (m *ResumeTaskRequest) MarshalTo(dAtA []byte) (int, error) {
i = encodeVarintTasks(dAtA, i, uint64(len(m.ContainerID)))
i += copy(dAtA[i:], m.ContainerID)
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -1627,6 +2565,9 @@ func (m *ListPidsRequest) MarshalTo(dAtA []byte) (int, error) {
i = encodeVarintTasks(dAtA, i, uint64(len(m.ContainerID)))
i += copy(dAtA[i:], m.ContainerID)
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -1657,6 +2598,9 @@ func (m *ListPidsResponse) MarshalTo(dAtA []byte) (int, error) {
i += n
}
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -1697,6 +2641,9 @@ func (m *CheckpointTaskRequest) MarshalTo(dAtA []byte) (int, error) {
}
i += n6
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -1727,6 +2674,9 @@ func (m *CheckpointTaskResponse) MarshalTo(dAtA []byte) (int, error) {
i += n
}
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -1761,6 +2711,9 @@ func (m *UpdateTaskRequest) MarshalTo(dAtA []byte) (int, error) {
}
i += n7
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -1794,6 +2747,9 @@ func (m *MetricsRequest) MarshalTo(dAtA []byte) (int, error) {
i += copy(dAtA[i:], s)
}
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -1824,6 +2780,9 @@ func (m *MetricsResponse) MarshalTo(dAtA []byte) (int, error) {
i += n
}
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -1854,6 +2813,9 @@ func (m *WaitRequest) MarshalTo(dAtA []byte) (int, error) {
i = encodeVarintTasks(dAtA, i, uint64(len(m.ExecID)))
i += copy(dAtA[i:], m.ExecID)
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -1879,12 +2841,15 @@ func (m *WaitResponse) MarshalTo(dAtA []byte) (int, error) {
}
dAtA[i] = 0x12
i++
- i = encodeVarintTasks(dAtA, i, uint64(types.SizeOfStdTime(m.ExitedAt)))
- n8, err := types.StdTimeMarshalTo(m.ExitedAt, dAtA[i:])
+ i = encodeVarintTasks(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.ExitedAt)))
+ n8, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.ExitedAt, dAtA[i:])
if err != nil {
return 0, err
}
i += n8
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -1898,6 +2863,9 @@ func encodeVarintTasks(dAtA []byte, offset int, v uint64) int {
return offset + 1
}
func (m *CreateTaskRequest) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.ContainerID)
@@ -1933,10 +2901,16 @@ func (m *CreateTaskRequest) Size() (n int) {
l = m.Options.Size()
n += 1 + l + sovTasks(uint64(l))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *CreateTaskResponse) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.ContainerID)
@@ -1946,10 +2920,16 @@ func (m *CreateTaskResponse) Size() (n int) {
if m.Pid != 0 {
n += 1 + sovTasks(uint64(m.Pid))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *StartRequest) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.ContainerID)
@@ -1960,29 +2940,47 @@ func (m *StartRequest) Size() (n int) {
if l > 0 {
n += 1 + l + sovTasks(uint64(l))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *StartResponse) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
if m.Pid != 0 {
n += 1 + sovTasks(uint64(m.Pid))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *DeleteTaskRequest) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.ContainerID)
if l > 0 {
n += 1 + l + sovTasks(uint64(l))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *DeleteResponse) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.ID)
@@ -1995,12 +2993,18 @@ func (m *DeleteResponse) Size() (n int) {
if m.ExitStatus != 0 {
n += 1 + sovTasks(uint64(m.ExitStatus))
}
- l = types.SizeOfStdTime(m.ExitedAt)
+ l = github_com_gogo_protobuf_types.SizeOfStdTime(m.ExitedAt)
n += 1 + l + sovTasks(uint64(l))
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *DeleteProcessRequest) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.ContainerID)
@@ -2011,10 +3015,16 @@ func (m *DeleteProcessRequest) Size() (n int) {
if l > 0 {
n += 1 + l + sovTasks(uint64(l))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *GetRequest) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.ContainerID)
@@ -2025,30 +3035,48 @@ func (m *GetRequest) Size() (n int) {
if l > 0 {
n += 1 + l + sovTasks(uint64(l))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *GetResponse) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
if m.Process != nil {
l = m.Process.Size()
n += 1 + l + sovTasks(uint64(l))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *ListTasksRequest) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.Filter)
if l > 0 {
n += 1 + l + sovTasks(uint64(l))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *ListTasksResponse) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
if len(m.Tasks) > 0 {
@@ -2057,10 +3085,16 @@ func (m *ListTasksResponse) Size() (n int) {
n += 1 + l + sovTasks(uint64(l))
}
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *KillRequest) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.ContainerID)
@@ -2077,10 +3111,16 @@ func (m *KillRequest) Size() (n int) {
if m.All {
n += 2
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *ExecProcessRequest) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.ContainerID)
@@ -2110,16 +3150,28 @@ func (m *ExecProcessRequest) Size() (n int) {
if l > 0 {
n += 1 + l + sovTasks(uint64(l))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *ExecProcessResponse) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *ResizePtyRequest) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.ContainerID)
@@ -2136,10 +3188,16 @@ func (m *ResizePtyRequest) Size() (n int) {
if m.Height != 0 {
n += 1 + sovTasks(uint64(m.Height))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *CloseIORequest) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.ContainerID)
@@ -2153,40 +3211,64 @@ func (m *CloseIORequest) Size() (n int) {
if m.Stdin {
n += 2
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *PauseTaskRequest) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.ContainerID)
if l > 0 {
n += 1 + l + sovTasks(uint64(l))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *ResumeTaskRequest) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.ContainerID)
if l > 0 {
n += 1 + l + sovTasks(uint64(l))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *ListPidsRequest) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.ContainerID)
if l > 0 {
n += 1 + l + sovTasks(uint64(l))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *ListPidsResponse) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
if len(m.Processes) > 0 {
@@ -2195,10 +3277,16 @@ func (m *ListPidsResponse) Size() (n int) {
n += 1 + l + sovTasks(uint64(l))
}
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *CheckpointTaskRequest) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.ContainerID)
@@ -2213,10 +3301,16 @@ func (m *CheckpointTaskRequest) Size() (n int) {
l = m.Options.Size()
n += 1 + l + sovTasks(uint64(l))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *CheckpointTaskResponse) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
if len(m.Descriptors) > 0 {
@@ -2225,10 +3319,16 @@ func (m *CheckpointTaskResponse) Size() (n int) {
n += 1 + l + sovTasks(uint64(l))
}
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *UpdateTaskRequest) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.ContainerID)
@@ -2239,10 +3339,16 @@ func (m *UpdateTaskRequest) Size() (n int) {
l = m.Resources.Size()
n += 1 + l + sovTasks(uint64(l))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *MetricsRequest) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
if len(m.Filters) > 0 {
@@ -2251,10 +3357,16 @@ func (m *MetricsRequest) Size() (n int) {
n += 1 + l + sovTasks(uint64(l))
}
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *MetricsResponse) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
if len(m.Metrics) > 0 {
@@ -2263,10 +3375,16 @@ func (m *MetricsResponse) Size() (n int) {
n += 1 + l + sovTasks(uint64(l))
}
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *WaitRequest) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.ContainerID)
@@ -2277,17 +3395,26 @@ func (m *WaitRequest) Size() (n int) {
if l > 0 {
n += 1 + l + sovTasks(uint64(l))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *WaitResponse) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
if m.ExitStatus != 0 {
n += 1 + sovTasks(uint64(m.ExitStatus))
}
- l = types.SizeOfStdTime(m.ExitedAt)
+ l = github_com_gogo_protobuf_types.SizeOfStdTime(m.ExitedAt)
n += 1 + l + sovTasks(uint64(l))
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
@@ -2310,13 +3437,14 @@ func (this *CreateTaskRequest) String() string {
}
s := strings.Join([]string{`&CreateTaskRequest{`,
`ContainerID:` + fmt.Sprintf("%v", this.ContainerID) + `,`,
- `Rootfs:` + strings.Replace(fmt.Sprintf("%v", this.Rootfs), "Mount", "containerd_types.Mount", 1) + `,`,
+ `Rootfs:` + strings.Replace(fmt.Sprintf("%v", this.Rootfs), "Mount", "types.Mount", 1) + `,`,
`Stdin:` + fmt.Sprintf("%v", this.Stdin) + `,`,
`Stdout:` + fmt.Sprintf("%v", this.Stdout) + `,`,
`Stderr:` + fmt.Sprintf("%v", this.Stderr) + `,`,
`Terminal:` + fmt.Sprintf("%v", this.Terminal) + `,`,
- `Checkpoint:` + strings.Replace(fmt.Sprintf("%v", this.Checkpoint), "Descriptor", "containerd_types2.Descriptor", 1) + `,`,
- `Options:` + strings.Replace(fmt.Sprintf("%v", this.Options), "Any", "google_protobuf1.Any", 1) + `,`,
+ `Checkpoint:` + strings.Replace(fmt.Sprintf("%v", this.Checkpoint), "Descriptor", "types.Descriptor", 1) + `,`,
+ `Options:` + strings.Replace(fmt.Sprintf("%v", this.Options), "Any", "types1.Any", 1) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -2328,6 +3456,7 @@ func (this *CreateTaskResponse) String() string {
s := strings.Join([]string{`&CreateTaskResponse{`,
`ContainerID:` + fmt.Sprintf("%v", this.ContainerID) + `,`,
`Pid:` + fmt.Sprintf("%v", this.Pid) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -2339,6 +3468,7 @@ func (this *StartRequest) String() string {
s := strings.Join([]string{`&StartRequest{`,
`ContainerID:` + fmt.Sprintf("%v", this.ContainerID) + `,`,
`ExecID:` + fmt.Sprintf("%v", this.ExecID) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -2349,6 +3479,7 @@ func (this *StartResponse) String() string {
}
s := strings.Join([]string{`&StartResponse{`,
`Pid:` + fmt.Sprintf("%v", this.Pid) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -2359,6 +3490,7 @@ func (this *DeleteTaskRequest) String() string {
}
s := strings.Join([]string{`&DeleteTaskRequest{`,
`ContainerID:` + fmt.Sprintf("%v", this.ContainerID) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -2371,7 +3503,8 @@ func (this *DeleteResponse) String() string {
`ID:` + fmt.Sprintf("%v", this.ID) + `,`,
`Pid:` + fmt.Sprintf("%v", this.Pid) + `,`,
`ExitStatus:` + fmt.Sprintf("%v", this.ExitStatus) + `,`,
- `ExitedAt:` + strings.Replace(strings.Replace(this.ExitedAt.String(), "Timestamp", "google_protobuf3.Timestamp", 1), `&`, ``, 1) + `,`,
+ `ExitedAt:` + strings.Replace(strings.Replace(this.ExitedAt.String(), "Timestamp", "types1.Timestamp", 1), `&`, ``, 1) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -2383,6 +3516,7 @@ func (this *DeleteProcessRequest) String() string {
s := strings.Join([]string{`&DeleteProcessRequest{`,
`ContainerID:` + fmt.Sprintf("%v", this.ContainerID) + `,`,
`ExecID:` + fmt.Sprintf("%v", this.ExecID) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -2394,6 +3528,7 @@ func (this *GetRequest) String() string {
s := strings.Join([]string{`&GetRequest{`,
`ContainerID:` + fmt.Sprintf("%v", this.ContainerID) + `,`,
`ExecID:` + fmt.Sprintf("%v", this.ExecID) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -2403,7 +3538,8 @@ func (this *GetResponse) String() string {
return "nil"
}
s := strings.Join([]string{`&GetResponse{`,
- `Process:` + strings.Replace(fmt.Sprintf("%v", this.Process), "Process", "containerd_v1_types.Process", 1) + `,`,
+ `Process:` + strings.Replace(fmt.Sprintf("%v", this.Process), "Process", "task.Process", 1) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -2414,6 +3550,7 @@ func (this *ListTasksRequest) String() string {
}
s := strings.Join([]string{`&ListTasksRequest{`,
`Filter:` + fmt.Sprintf("%v", this.Filter) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -2423,7 +3560,8 @@ func (this *ListTasksResponse) String() string {
return "nil"
}
s := strings.Join([]string{`&ListTasksResponse{`,
- `Tasks:` + strings.Replace(fmt.Sprintf("%v", this.Tasks), "Process", "containerd_v1_types.Process", 1) + `,`,
+ `Tasks:` + strings.Replace(fmt.Sprintf("%v", this.Tasks), "Process", "task.Process", 1) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -2437,6 +3575,7 @@ func (this *KillRequest) String() string {
`ExecID:` + fmt.Sprintf("%v", this.ExecID) + `,`,
`Signal:` + fmt.Sprintf("%v", this.Signal) + `,`,
`All:` + fmt.Sprintf("%v", this.All) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -2451,8 +3590,9 @@ func (this *ExecProcessRequest) String() string {
`Stdout:` + fmt.Sprintf("%v", this.Stdout) + `,`,
`Stderr:` + fmt.Sprintf("%v", this.Stderr) + `,`,
`Terminal:` + fmt.Sprintf("%v", this.Terminal) + `,`,
- `Spec:` + strings.Replace(fmt.Sprintf("%v", this.Spec), "Any", "google_protobuf1.Any", 1) + `,`,
+ `Spec:` + strings.Replace(fmt.Sprintf("%v", this.Spec), "Any", "types1.Any", 1) + `,`,
`ExecID:` + fmt.Sprintf("%v", this.ExecID) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -2462,6 +3602,7 @@ func (this *ExecProcessResponse) String() string {
return "nil"
}
s := strings.Join([]string{`&ExecProcessResponse{`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -2475,6 +3616,7 @@ func (this *ResizePtyRequest) String() string {
`ExecID:` + fmt.Sprintf("%v", this.ExecID) + `,`,
`Width:` + fmt.Sprintf("%v", this.Width) + `,`,
`Height:` + fmt.Sprintf("%v", this.Height) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -2487,6 +3629,7 @@ func (this *CloseIORequest) String() string {
`ContainerID:` + fmt.Sprintf("%v", this.ContainerID) + `,`,
`ExecID:` + fmt.Sprintf("%v", this.ExecID) + `,`,
`Stdin:` + fmt.Sprintf("%v", this.Stdin) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -2497,6 +3640,7 @@ func (this *PauseTaskRequest) String() string {
}
s := strings.Join([]string{`&PauseTaskRequest{`,
`ContainerID:` + fmt.Sprintf("%v", this.ContainerID) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -2507,6 +3651,7 @@ func (this *ResumeTaskRequest) String() string {
}
s := strings.Join([]string{`&ResumeTaskRequest{`,
`ContainerID:` + fmt.Sprintf("%v", this.ContainerID) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -2517,6 +3662,7 @@ func (this *ListPidsRequest) String() string {
}
s := strings.Join([]string{`&ListPidsRequest{`,
`ContainerID:` + fmt.Sprintf("%v", this.ContainerID) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -2526,7 +3672,8 @@ func (this *ListPidsResponse) String() string {
return "nil"
}
s := strings.Join([]string{`&ListPidsResponse{`,
- `Processes:` + strings.Replace(fmt.Sprintf("%v", this.Processes), "ProcessInfo", "containerd_v1_types.ProcessInfo", 1) + `,`,
+ `Processes:` + strings.Replace(fmt.Sprintf("%v", this.Processes), "ProcessInfo", "task.ProcessInfo", 1) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -2538,7 +3685,8 @@ func (this *CheckpointTaskRequest) String() string {
s := strings.Join([]string{`&CheckpointTaskRequest{`,
`ContainerID:` + fmt.Sprintf("%v", this.ContainerID) + `,`,
`ParentCheckpoint:` + fmt.Sprintf("%v", this.ParentCheckpoint) + `,`,
- `Options:` + strings.Replace(fmt.Sprintf("%v", this.Options), "Any", "google_protobuf1.Any", 1) + `,`,
+ `Options:` + strings.Replace(fmt.Sprintf("%v", this.Options), "Any", "types1.Any", 1) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -2548,7 +3696,8 @@ func (this *CheckpointTaskResponse) String() string {
return "nil"
}
s := strings.Join([]string{`&CheckpointTaskResponse{`,
- `Descriptors:` + strings.Replace(fmt.Sprintf("%v", this.Descriptors), "Descriptor", "containerd_types2.Descriptor", 1) + `,`,
+ `Descriptors:` + strings.Replace(fmt.Sprintf("%v", this.Descriptors), "Descriptor", "types.Descriptor", 1) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -2559,7 +3708,8 @@ func (this *UpdateTaskRequest) String() string {
}
s := strings.Join([]string{`&UpdateTaskRequest{`,
`ContainerID:` + fmt.Sprintf("%v", this.ContainerID) + `,`,
- `Resources:` + strings.Replace(fmt.Sprintf("%v", this.Resources), "Any", "google_protobuf1.Any", 1) + `,`,
+ `Resources:` + strings.Replace(fmt.Sprintf("%v", this.Resources), "Any", "types1.Any", 1) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -2570,6 +3720,7 @@ func (this *MetricsRequest) String() string {
}
s := strings.Join([]string{`&MetricsRequest{`,
`Filters:` + fmt.Sprintf("%v", this.Filters) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -2579,7 +3730,8 @@ func (this *MetricsResponse) String() string {
return "nil"
}
s := strings.Join([]string{`&MetricsResponse{`,
- `Metrics:` + strings.Replace(fmt.Sprintf("%v", this.Metrics), "Metric", "containerd_types1.Metric", 1) + `,`,
+ `Metrics:` + strings.Replace(fmt.Sprintf("%v", this.Metrics), "Metric", "types.Metric", 1) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -2591,6 +3743,7 @@ func (this *WaitRequest) String() string {
s := strings.Join([]string{`&WaitRequest{`,
`ContainerID:` + fmt.Sprintf("%v", this.ContainerID) + `,`,
`ExecID:` + fmt.Sprintf("%v", this.ExecID) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -2601,7 +3754,8 @@ func (this *WaitResponse) String() string {
}
s := strings.Join([]string{`&WaitResponse{`,
`ExitStatus:` + fmt.Sprintf("%v", this.ExitStatus) + `,`,
- `ExitedAt:` + strings.Replace(strings.Replace(this.ExitedAt.String(), "Timestamp", "google_protobuf3.Timestamp", 1), `&`, ``, 1) + `,`,
+ `ExitedAt:` + strings.Replace(strings.Replace(this.ExitedAt.String(), "Timestamp", "types1.Timestamp", 1), `&`, ``, 1) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -2629,7 +3783,7 @@ func (m *CreateTaskRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2657,7 +3811,7 @@ func (m *CreateTaskRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2667,6 +3821,9 @@ func (m *CreateTaskRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthTasks
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthTasks
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -2686,7 +3843,7 @@ func (m *CreateTaskRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2695,10 +3852,13 @@ func (m *CreateTaskRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthTasks
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthTasks
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
- m.Rootfs = append(m.Rootfs, &containerd_types.Mount{})
+ m.Rootfs = append(m.Rootfs, &types.Mount{})
if err := m.Rootfs[len(m.Rootfs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
@@ -2717,7 +3877,7 @@ func (m *CreateTaskRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2727,6 +3887,9 @@ func (m *CreateTaskRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthTasks
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthTasks
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -2746,7 +3909,7 @@ func (m *CreateTaskRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2756,6 +3919,9 @@ func (m *CreateTaskRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthTasks
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthTasks
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -2775,7 +3941,7 @@ func (m *CreateTaskRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2785,6 +3951,9 @@ func (m *CreateTaskRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthTasks
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthTasks
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -2804,7 +3973,7 @@ func (m *CreateTaskRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- v |= (int(b) & 0x7F) << shift
+ v |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2824,7 +3993,7 @@ func (m *CreateTaskRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2833,11 +4002,14 @@ func (m *CreateTaskRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthTasks
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthTasks
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Checkpoint == nil {
- m.Checkpoint = &containerd_types2.Descriptor{}
+ m.Checkpoint = &types.Descriptor{}
}
if err := m.Checkpoint.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
@@ -2857,7 +4029,7 @@ func (m *CreateTaskRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2866,11 +4038,14 @@ func (m *CreateTaskRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthTasks
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthTasks
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Options == nil {
- m.Options = &google_protobuf1.Any{}
+ m.Options = &types1.Any{}
}
if err := m.Options.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
@@ -2885,9 +4060,13 @@ func (m *CreateTaskRequest) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthTasks
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthTasks
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -2912,7 +4091,7 @@ func (m *CreateTaskResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2940,7 +4119,7 @@ func (m *CreateTaskResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2950,6 +4129,9 @@ func (m *CreateTaskResponse) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthTasks
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthTasks
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -2969,7 +4151,7 @@ func (m *CreateTaskResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- m.Pid |= (uint32(b) & 0x7F) << shift
+ m.Pid |= uint32(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2983,9 +4165,13 @@ func (m *CreateTaskResponse) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthTasks
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthTasks
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -3010,7 +4196,7 @@ func (m *StartRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3038,7 +4224,7 @@ func (m *StartRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3048,6 +4234,9 @@ func (m *StartRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthTasks
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthTasks
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -3067,7 +4256,7 @@ func (m *StartRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3077,6 +4266,9 @@ func (m *StartRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthTasks
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthTasks
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -3091,9 +4283,13 @@ func (m *StartRequest) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthTasks
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthTasks
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -3118,7 +4314,7 @@ func (m *StartResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3146,7 +4342,7 @@ func (m *StartResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- m.Pid |= (uint32(b) & 0x7F) << shift
+ m.Pid |= uint32(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3160,9 +4356,13 @@ func (m *StartResponse) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthTasks
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthTasks
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -3187,7 +4387,7 @@ func (m *DeleteTaskRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3215,7 +4415,7 @@ func (m *DeleteTaskRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3225,6 +4425,9 @@ func (m *DeleteTaskRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthTasks
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthTasks
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -3239,9 +4442,13 @@ func (m *DeleteTaskRequest) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthTasks
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthTasks
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -3266,7 +4473,7 @@ func (m *DeleteResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3294,7 +4501,7 @@ func (m *DeleteResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3304,6 +4511,9 @@ func (m *DeleteResponse) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthTasks
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthTasks
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -3323,7 +4533,7 @@ func (m *DeleteResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- m.Pid |= (uint32(b) & 0x7F) << shift
+ m.Pid |= uint32(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3342,7 +4552,7 @@ func (m *DeleteResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- m.ExitStatus |= (uint32(b) & 0x7F) << shift
+ m.ExitStatus |= uint32(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3361,7 +4571,7 @@ func (m *DeleteResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3370,10 +4580,13 @@ func (m *DeleteResponse) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthTasks
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthTasks
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
- if err := types.StdTimeUnmarshal(&m.ExitedAt, dAtA[iNdEx:postIndex]); err != nil {
+ if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.ExitedAt, dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
@@ -3386,9 +4599,13 @@ func (m *DeleteResponse) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthTasks
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthTasks
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -3413,7 +4630,7 @@ func (m *DeleteProcessRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3441,7 +4658,7 @@ func (m *DeleteProcessRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3451,6 +4668,9 @@ func (m *DeleteProcessRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthTasks
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthTasks
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -3470,7 +4690,7 @@ func (m *DeleteProcessRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3480,6 +4700,9 @@ func (m *DeleteProcessRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthTasks
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthTasks
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -3494,9 +4717,13 @@ func (m *DeleteProcessRequest) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthTasks
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthTasks
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -3521,7 +4748,7 @@ func (m *GetRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3549,7 +4776,7 @@ func (m *GetRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3559,6 +4786,9 @@ func (m *GetRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthTasks
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthTasks
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -3578,7 +4808,7 @@ func (m *GetRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3588,6 +4818,9 @@ func (m *GetRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthTasks
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthTasks
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -3602,9 +4835,13 @@ func (m *GetRequest) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthTasks
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthTasks
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -3629,7 +4866,7 @@ func (m *GetResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3657,7 +4894,7 @@ func (m *GetResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3666,11 +4903,14 @@ func (m *GetResponse) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthTasks
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthTasks
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Process == nil {
- m.Process = &containerd_v1_types.Process{}
+ m.Process = &task.Process{}
}
if err := m.Process.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
@@ -3685,9 +4925,13 @@ func (m *GetResponse) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthTasks
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthTasks
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -3712,7 +4956,7 @@ func (m *ListTasksRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3740,7 +4984,7 @@ func (m *ListTasksRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3750,6 +4994,9 @@ func (m *ListTasksRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthTasks
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthTasks
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -3764,9 +5011,13 @@ func (m *ListTasksRequest) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthTasks
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthTasks
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -3791,7 +5042,7 @@ func (m *ListTasksResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3819,7 +5070,7 @@ func (m *ListTasksResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3828,10 +5079,13 @@ func (m *ListTasksResponse) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthTasks
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthTasks
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
- m.Tasks = append(m.Tasks, &containerd_v1_types.Process{})
+ m.Tasks = append(m.Tasks, &task.Process{})
if err := m.Tasks[len(m.Tasks)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
@@ -3845,9 +5099,13 @@ func (m *ListTasksResponse) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthTasks
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthTasks
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -3872,7 +5130,7 @@ func (m *KillRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3900,7 +5158,7 @@ func (m *KillRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3910,6 +5168,9 @@ func (m *KillRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthTasks
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthTasks
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -3929,7 +5190,7 @@ func (m *KillRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3939,6 +5200,9 @@ func (m *KillRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthTasks
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthTasks
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -3958,7 +5222,7 @@ func (m *KillRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- m.Signal |= (uint32(b) & 0x7F) << shift
+ m.Signal |= uint32(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3977,7 +5241,7 @@ func (m *KillRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- v |= (int(b) & 0x7F) << shift
+ v |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3992,9 +5256,13 @@ func (m *KillRequest) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthTasks
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthTasks
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -4019,7 +5287,7 @@ func (m *ExecProcessRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -4047,7 +5315,7 @@ func (m *ExecProcessRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -4057,6 +5325,9 @@ func (m *ExecProcessRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthTasks
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthTasks
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -4076,7 +5347,7 @@ func (m *ExecProcessRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -4086,6 +5357,9 @@ func (m *ExecProcessRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthTasks
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthTasks
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -4105,7 +5379,7 @@ func (m *ExecProcessRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -4115,6 +5389,9 @@ func (m *ExecProcessRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthTasks
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthTasks
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -4134,7 +5411,7 @@ func (m *ExecProcessRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -4144,6 +5421,9 @@ func (m *ExecProcessRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthTasks
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthTasks
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -4163,7 +5443,7 @@ func (m *ExecProcessRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- v |= (int(b) & 0x7F) << shift
+ v |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -4183,7 +5463,7 @@ func (m *ExecProcessRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -4192,11 +5472,14 @@ func (m *ExecProcessRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthTasks
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthTasks
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Spec == nil {
- m.Spec = &google_protobuf1.Any{}
+ m.Spec = &types1.Any{}
}
if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
@@ -4216,7 +5499,7 @@ func (m *ExecProcessRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -4226,6 +5509,9 @@ func (m *ExecProcessRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthTasks
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthTasks
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -4240,9 +5526,13 @@ func (m *ExecProcessRequest) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthTasks
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthTasks
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -4267,7 +5557,7 @@ func (m *ExecProcessResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -4290,9 +5580,13 @@ func (m *ExecProcessResponse) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthTasks
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthTasks
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -4317,7 +5611,7 @@ func (m *ResizePtyRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -4345,7 +5639,7 @@ func (m *ResizePtyRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -4355,6 +5649,9 @@ func (m *ResizePtyRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthTasks
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthTasks
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -4374,7 +5671,7 @@ func (m *ResizePtyRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -4384,6 +5681,9 @@ func (m *ResizePtyRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthTasks
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthTasks
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -4403,7 +5703,7 @@ func (m *ResizePtyRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- m.Width |= (uint32(b) & 0x7F) << shift
+ m.Width |= uint32(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -4422,7 +5722,7 @@ func (m *ResizePtyRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- m.Height |= (uint32(b) & 0x7F) << shift
+ m.Height |= uint32(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -4436,9 +5736,13 @@ func (m *ResizePtyRequest) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthTasks
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthTasks
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -4463,7 +5767,7 @@ func (m *CloseIORequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -4491,7 +5795,7 @@ func (m *CloseIORequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -4501,6 +5805,9 @@ func (m *CloseIORequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthTasks
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthTasks
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -4520,7 +5827,7 @@ func (m *CloseIORequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -4530,6 +5837,9 @@ func (m *CloseIORequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthTasks
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthTasks
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -4549,7 +5859,7 @@ func (m *CloseIORequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- v |= (int(b) & 0x7F) << shift
+ v |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -4564,9 +5874,13 @@ func (m *CloseIORequest) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthTasks
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthTasks
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -4591,7 +5905,7 @@ func (m *PauseTaskRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -4619,7 +5933,7 @@ func (m *PauseTaskRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -4629,6 +5943,9 @@ func (m *PauseTaskRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthTasks
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthTasks
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -4643,9 +5960,13 @@ func (m *PauseTaskRequest) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthTasks
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthTasks
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -4670,7 +5991,7 @@ func (m *ResumeTaskRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -4698,7 +6019,7 @@ func (m *ResumeTaskRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -4708,6 +6029,9 @@ func (m *ResumeTaskRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthTasks
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthTasks
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -4722,9 +6046,13 @@ func (m *ResumeTaskRequest) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthTasks
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthTasks
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -4749,7 +6077,7 @@ func (m *ListPidsRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -4777,7 +6105,7 @@ func (m *ListPidsRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -4787,6 +6115,9 @@ func (m *ListPidsRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthTasks
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthTasks
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -4801,9 +6132,13 @@ func (m *ListPidsRequest) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthTasks
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthTasks
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -4828,7 +6163,7 @@ func (m *ListPidsResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -4856,7 +6191,7 @@ func (m *ListPidsResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -4865,10 +6200,13 @@ func (m *ListPidsResponse) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthTasks
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthTasks
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
- m.Processes = append(m.Processes, &containerd_v1_types.ProcessInfo{})
+ m.Processes = append(m.Processes, &task.ProcessInfo{})
if err := m.Processes[len(m.Processes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
@@ -4882,9 +6220,13 @@ func (m *ListPidsResponse) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthTasks
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthTasks
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -4909,7 +6251,7 @@ func (m *CheckpointTaskRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -4937,7 +6279,7 @@ func (m *CheckpointTaskRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -4947,6 +6289,9 @@ func (m *CheckpointTaskRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthTasks
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthTasks
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -4966,7 +6311,7 @@ func (m *CheckpointTaskRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -4976,6 +6321,9 @@ func (m *CheckpointTaskRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthTasks
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthTasks
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -4995,7 +6343,7 @@ func (m *CheckpointTaskRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -5004,11 +6352,14 @@ func (m *CheckpointTaskRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthTasks
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthTasks
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Options == nil {
- m.Options = &google_protobuf1.Any{}
+ m.Options = &types1.Any{}
}
if err := m.Options.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
@@ -5023,9 +6374,13 @@ func (m *CheckpointTaskRequest) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthTasks
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthTasks
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -5050,7 +6405,7 @@ func (m *CheckpointTaskResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -5078,7 +6433,7 @@ func (m *CheckpointTaskResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -5087,10 +6442,13 @@ func (m *CheckpointTaskResponse) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthTasks
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthTasks
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
- m.Descriptors = append(m.Descriptors, &containerd_types2.Descriptor{})
+ m.Descriptors = append(m.Descriptors, &types.Descriptor{})
if err := m.Descriptors[len(m.Descriptors)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
@@ -5104,9 +6462,13 @@ func (m *CheckpointTaskResponse) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthTasks
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthTasks
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -5131,7 +6493,7 @@ func (m *UpdateTaskRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -5159,7 +6521,7 @@ func (m *UpdateTaskRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -5169,6 +6531,9 @@ func (m *UpdateTaskRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthTasks
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthTasks
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -5188,7 +6553,7 @@ func (m *UpdateTaskRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -5197,11 +6562,14 @@ func (m *UpdateTaskRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthTasks
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthTasks
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Resources == nil {
- m.Resources = &google_protobuf1.Any{}
+ m.Resources = &types1.Any{}
}
if err := m.Resources.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
@@ -5216,9 +6584,13 @@ func (m *UpdateTaskRequest) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthTasks
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthTasks
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -5243,7 +6615,7 @@ func (m *MetricsRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -5271,7 +6643,7 @@ func (m *MetricsRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -5281,6 +6653,9 @@ func (m *MetricsRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthTasks
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthTasks
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -5295,9 +6670,13 @@ func (m *MetricsRequest) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthTasks
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthTasks
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -5322,7 +6701,7 @@ func (m *MetricsResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -5350,7 +6729,7 @@ func (m *MetricsResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -5359,10 +6738,13 @@ func (m *MetricsResponse) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthTasks
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthTasks
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
- m.Metrics = append(m.Metrics, &containerd_types1.Metric{})
+ m.Metrics = append(m.Metrics, &types.Metric{})
if err := m.Metrics[len(m.Metrics)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
@@ -5376,9 +6758,13 @@ func (m *MetricsResponse) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthTasks
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthTasks
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -5403,7 +6789,7 @@ func (m *WaitRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -5431,7 +6817,7 @@ func (m *WaitRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -5441,6 +6827,9 @@ func (m *WaitRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthTasks
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthTasks
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -5460,7 +6849,7 @@ func (m *WaitRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -5470,6 +6859,9 @@ func (m *WaitRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthTasks
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthTasks
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -5484,9 +6876,13 @@ func (m *WaitRequest) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthTasks
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthTasks
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -5511,7 +6907,7 @@ func (m *WaitResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -5539,7 +6935,7 @@ func (m *WaitResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- m.ExitStatus |= (uint32(b) & 0x7F) << shift
+ m.ExitStatus |= uint32(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -5558,7 +6954,7 @@ func (m *WaitResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -5567,10 +6963,13 @@ func (m *WaitResponse) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthTasks
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthTasks
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
- if err := types.StdTimeUnmarshal(&m.ExitedAt, dAtA[iNdEx:postIndex]); err != nil {
+ if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.ExitedAt, dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
@@ -5583,9 +6982,13 @@ func (m *WaitResponse) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthTasks
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthTasks
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -5649,10 +7052,13 @@ func skipTasks(dAtA []byte) (n int, err error) {
break
}
}
- iNdEx += length
if length < 0 {
return 0, ErrInvalidLengthTasks
}
+ iNdEx += length
+ if iNdEx < 0 {
+ return 0, ErrInvalidLengthTasks
+ }
return iNdEx, nil
case 3:
for {
@@ -5681,6 +7087,9 @@ func skipTasks(dAtA []byte) (n int, err error) {
return 0, err
}
iNdEx = start + next
+ if iNdEx < 0 {
+ return 0, ErrInvalidLengthTasks
+ }
}
return iNdEx, nil
case 4:
@@ -5699,94 +7108,3 @@ var (
ErrInvalidLengthTasks = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowTasks = fmt.Errorf("proto: integer overflow")
)
-
-func init() {
- proto.RegisterFile("github.com/containerd/containerd/api/services/tasks/v1/tasks.proto", fileDescriptorTasks)
-}
-
-var fileDescriptorTasks = []byte{
- // 1318 bytes of a gzipped F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x2f, 0x5d, 0xfa, 0xf3, 0xf5, 0xd2, 0xa5, 0x5f, 0x07, 0x4b, 0xda, 0xe1, 0x60, 0x49,
- 0xfb, 0x63, 0xb0, 0xa4, 0xfd, 0x33, 0x58, 0xd2, 0x9e, 0xdc, 0x79, 0xb3, 0xbf, 0xec, 0xdd, 0x16,
- 0x8b, 0xc7, 0xb9, 0xa7, 0x25, 0x01, 0xd8, 0xcd, 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0x85, 0xa2,
- 0x4f, 0xd1, 0x22, 0x14, 0x00, 0x00,
-}
diff --git a/api/services/version/v1/version.pb.go b/api/services/version/v1/version.pb.go
index 829987c41..cc392889b 100644
--- a/api/services/version/v1/version.pb.go
+++ b/api/services/version/v1/version.pb.go
@@ -1,31 +1,19 @@
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: github.com/containerd/containerd/api/services/version/v1/version.proto
-/*
- Package version is a generated protocol buffer package.
-
- It is generated from these files:
- github.com/containerd/containerd/api/services/version/v1/version.proto
-
- It has these top-level messages:
- VersionResponse
-*/
package version
-import proto "github.com/gogo/protobuf/proto"
-import fmt "fmt"
-import math "math"
-import google_protobuf "github.com/gogo/protobuf/types"
-
-// skipping weak import gogoproto "github.com/gogo/protobuf/gogoproto"
-
-import context "golang.org/x/net/context"
-import grpc "google.golang.org/grpc"
-
-import strings "strings"
-import reflect "reflect"
-
-import io "io"
+import (
+ context "context"
+ fmt "fmt"
+ proto "github.com/gogo/protobuf/proto"
+ types "github.com/gogo/protobuf/types"
+ grpc "google.golang.org/grpc"
+ io "io"
+ math "math"
+ reflect "reflect"
+ strings "strings"
+)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
@@ -39,18 +27,73 @@ var _ = math.Inf
const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
type VersionResponse struct {
- Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"`
- Revision string `protobuf:"bytes,2,opt,name=revision,proto3" json:"revision,omitempty"`
+ Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"`
+ Revision string `protobuf:"bytes,2,opt,name=revision,proto3" json:"revision,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *VersionResponse) Reset() { *m = VersionResponse{} }
-func (*VersionResponse) ProtoMessage() {}
-func (*VersionResponse) Descriptor() ([]byte, []int) { return fileDescriptorVersion, []int{0} }
+func (m *VersionResponse) Reset() { *m = VersionResponse{} }
+func (*VersionResponse) ProtoMessage() {}
+func (*VersionResponse) Descriptor() ([]byte, []int) {
+ return fileDescriptor_128109001e578ffe, []int{0}
+}
+func (m *VersionResponse) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *VersionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_VersionResponse.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *VersionResponse) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_VersionResponse.Merge(m, src)
+}
+func (m *VersionResponse) XXX_Size() int {
+ return m.Size()
+}
+func (m *VersionResponse) XXX_DiscardUnknown() {
+ xxx_messageInfo_VersionResponse.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_VersionResponse proto.InternalMessageInfo
func init() {
proto.RegisterType((*VersionResponse)(nil), "containerd.services.version.v1.VersionResponse")
}
+func init() {
+ proto.RegisterFile("github.com/containerd/containerd/api/services/version/v1/version.proto", fileDescriptor_128109001e578ffe)
+}
+
+var fileDescriptor_128109001e578ffe = []byte{
+ // 243 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x72, 0x4b, 0xcf, 0x2c, 0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, 0x43, 0x39, 0x86, 0x86, 0x47, 0x72, 0x8c, 0x27, 0x1e, 0xc9, 0x31, 0x5e, 0x78,
+ 0x24, 0xc7, 0xf8, 0xe0, 0x91, 0x1c, 0x63, 0x94, 0x03, 0xb9, 0x81, 0x6b, 0x0d, 0x65, 0x46, 0x30,
+ 0x26, 0xb1, 0x81, 0x9d, 0x67, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0x95, 0x0d, 0x52, 0x23, 0xa9,
+ 0x01, 0x00, 0x00,
+}
+
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn
@@ -59,10 +102,11 @@ var _ grpc.ClientConn
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4
-// Client API for Version service
-
+// VersionClient is the client API for Version service.
+//
+// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type VersionClient interface {
- Version(ctx context.Context, in *google_protobuf.Empty, opts ...grpc.CallOption) (*VersionResponse, error)
+ Version(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*VersionResponse, error)
}
type versionClient struct {
@@ -73,19 +117,18 @@ func NewVersionClient(cc *grpc.ClientConn) VersionClient {
return &versionClient{cc}
}
-func (c *versionClient) Version(ctx context.Context, in *google_protobuf.Empty, opts ...grpc.CallOption) (*VersionResponse, error) {
+func (c *versionClient) Version(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*VersionResponse, error) {
out := new(VersionResponse)
- err := grpc.Invoke(ctx, "/containerd.services.version.v1.Version/Version", in, out, c.cc, opts...)
+ err := c.cc.Invoke(ctx, "/containerd.services.version.v1.Version/Version", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
-// Server API for Version service
-
+// VersionServer is the server API for Version service.
type VersionServer interface {
- Version(context.Context, *google_protobuf.Empty) (*VersionResponse, error)
+ Version(context.Context, *types.Empty) (*VersionResponse, error)
}
func RegisterVersionServer(s *grpc.Server, srv VersionServer) {
@@ -93,7 +136,7 @@ func RegisterVersionServer(s *grpc.Server, srv VersionServer) {
}
func _Version_Version_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(google_protobuf.Empty)
+ in := new(types.Empty)
if err := dec(in); err != nil {
return nil, err
}
@@ -105,7 +148,7 @@ func _Version_Version_Handler(srv interface{}, ctx context.Context, dec func(int
FullMethod: "/containerd.services.version.v1.Version/Version",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(VersionServer).Version(ctx, req.(*google_protobuf.Empty))
+ return srv.(VersionServer).Version(ctx, req.(*types.Empty))
}
return interceptor(ctx, in, info, handler)
}
@@ -150,6 +193,9 @@ func (m *VersionResponse) MarshalTo(dAtA []byte) (int, error) {
i = encodeVarintVersion(dAtA, i, uint64(len(m.Revision)))
i += copy(dAtA[i:], m.Revision)
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -163,6 +209,9 @@ func encodeVarintVersion(dAtA []byte, offset int, v uint64) int {
return offset + 1
}
func (m *VersionResponse) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.Version)
@@ -173,6 +222,9 @@ func (m *VersionResponse) Size() (n int) {
if l > 0 {
n += 1 + l + sovVersion(uint64(l))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
@@ -196,6 +248,7 @@ func (this *VersionResponse) String() string {
s := strings.Join([]string{`&VersionResponse{`,
`Version:` + fmt.Sprintf("%v", this.Version) + `,`,
`Revision:` + fmt.Sprintf("%v", this.Revision) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -223,7 +276,7 @@ func (m *VersionResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -251,7 +304,7 @@ func (m *VersionResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -261,6 +314,9 @@ func (m *VersionResponse) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthVersion
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthVersion
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -280,7 +336,7 @@ func (m *VersionResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -290,6 +346,9 @@ func (m *VersionResponse) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthVersion
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthVersion
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -304,9 +363,13 @@ func (m *VersionResponse) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthVersion
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthVersion
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -370,10 +433,13 @@ func skipVersion(dAtA []byte) (n int, err error) {
break
}
}
- iNdEx += length
if length < 0 {
return 0, ErrInvalidLengthVersion
}
+ iNdEx += length
+ if iNdEx < 0 {
+ return 0, ErrInvalidLengthVersion
+ }
return iNdEx, nil
case 3:
for {
@@ -402,6 +468,9 @@ func skipVersion(dAtA []byte) (n int, err error) {
return 0, err
}
iNdEx = start + next
+ if iNdEx < 0 {
+ return 0, ErrInvalidLengthVersion
+ }
}
return iNdEx, nil
case 4:
@@ -420,27 +489,3 @@ var (
ErrInvalidLengthVersion = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowVersion = fmt.Errorf("proto: integer overflow")
)
-
-func init() {
- proto.RegisterFile("github.com/containerd/containerd/api/services/version/v1/version.proto", fileDescriptorVersion)
-}
-
-var fileDescriptorVersion = []byte{
- // 243 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x72, 0x4b, 0xcf, 0x2c, 0xc9,
- 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xce, 0xcf, 0x2b, 0x49, 0xcc, 0xcc, 0x4b, 0x2d,
- 0x4a, 0x41, 0x66, 0x26, 0x16, 0x64, 0xea, 0x17, 0xa7, 0x16, 0x95, 0x65, 0x26, 0xa7, 0x16, 0xeb,
- 0x97, 0xa5, 0x16, 0x15, 0x67, 0xe6, 0xe7, 0xe9, 0x97, 0x19, 0xc2, 0x98, 0x7a, 0x05, 0x45, 0xf9,
- 0x25, 0xf9, 0x42, 0x72, 0x08, 0x1d, 0x7a, 0x30, 0xd5, 0x7a, 0x30, 0x25, 0x65, 0x86, 0x52, 0xd2,
- 0xe9, 0xf9, 0xf9, 0xe9, 0x39, 0xa9, 0xfa, 0x60, 0xd5, 0x49, 0xa5, 0x69, 0xfa, 0xa9, 0xb9, 0x05,
- 0x25, 0x95, 0x10, 0xcd, 0x52, 0x22, 0xe9, 0xf9, 0xe9, 0xf9, 0x60, 0xa6, 0x3e, 0x88, 0x05, 0x11,
- 0x55, 0x72, 0xe7, 0xe2, 0x0f, 0x83, 0x18, 0x10, 0x94, 0x5a, 0x5c, 0x90, 0x9f, 0x57, 0x9c, 0x2a,
- 0x24, 0xc1, 0xc5, 0x0e, 0x35, 0x53, 0x82, 0x51, 0x81, 0x51, 0x83, 0x33, 0x08, 0xc6, 0x15, 0x92,
- 0xe2, 0xe2, 0x28, 0x4a, 0x2d, 0xcb, 0x04, 0x4b, 0x31, 0x81, 0xa5, 0xe0, 0x7c, 0xa3, 0x58, 0x2e,
- 0x76, 0xa8, 0x41, 0x42, 0x41, 0x08, 0xa6, 0x98, 0x1e, 0xc4, 0x49, 0x7a, 0x30, 0x27, 0xe9, 0xb9,
- 0x82, 0x9c, 0x24, 0xa5, 0xaf, 0x87, 0xdf, 0x2b, 0x7a, 0x68, 0x8e, 0x72, 0x8a, 0x3a, 0xf1, 0x50,
- 0x8e, 0xe1, 0xc6, 0x43, 0x39, 0x86, 0x86, 0x47, 0x72, 0x8c, 0x27, 0x1e, 0xc9, 0x31, 0x5e, 0x78,
- 0x24, 0xc7, 0xf8, 0xe0, 0x91, 0x1c, 0x63, 0x94, 0x03, 0xb9, 0x81, 0x6b, 0x0d, 0x65, 0x46, 0x30,
- 0x26, 0xb1, 0x81, 0x9d, 0x67, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0x95, 0x0d, 0x52, 0x23, 0xa9,
- 0x01, 0x00, 0x00,
-}
diff --git a/api/types/descriptor.pb.go b/api/types/descriptor.pb.go
index 4f5f6c61f..c0179d297 100644
--- a/api/types/descriptor.pb.go
+++ b/api/types/descriptor.pb.go
@@ -1,36 +1,18 @@
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: github.com/containerd/containerd/api/types/descriptor.proto
-/*
- Package types is a generated protocol buffer package.
-
- It is generated from these files:
- github.com/containerd/containerd/api/types/descriptor.proto
- github.com/containerd/containerd/api/types/metrics.proto
- github.com/containerd/containerd/api/types/mount.proto
- github.com/containerd/containerd/api/types/platform.proto
-
- It has these top-level messages:
- Descriptor
- Metric
- Mount
- Platform
-*/
package types
-import proto "github.com/gogo/protobuf/proto"
-import fmt "fmt"
-import math "math"
-
-// skipping weak import gogoproto "github.com/gogo/protobuf/gogoproto"
-
-import github_com_opencontainers_go_digest "github.com/opencontainers/go-digest"
-
-import strings "strings"
-import reflect "reflect"
-import sortkeys "github.com/gogo/protobuf/sortkeys"
-
-import io "io"
+import (
+ fmt "fmt"
+ proto "github.com/gogo/protobuf/proto"
+ github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys"
+ github_com_opencontainers_go_digest "github.com/opencontainers/go-digest"
+ io "io"
+ math "math"
+ reflect "reflect"
+ strings "strings"
+)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
@@ -49,19 +31,80 @@ const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
// oci descriptor found in a manifest.
// See https://godoc.org/github.com/opencontainers/image-spec/specs-go/v1#Descriptor
type Descriptor struct {
- MediaType string `protobuf:"bytes,1,opt,name=media_type,json=mediaType,proto3" json:"media_type,omitempty"`
- Digest github_com_opencontainers_go_digest.Digest `protobuf:"bytes,2,opt,name=digest,proto3,customtype=github.com/opencontainers/go-digest.Digest" json:"digest"`
- Size_ int64 `protobuf:"varint,3,opt,name=size,proto3" json:"size,omitempty"`
- Annotations map[string]string `protobuf:"bytes,5,rep,name=annotations" json:"annotations,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
+ MediaType string `protobuf:"bytes,1,opt,name=media_type,json=mediaType,proto3" json:"media_type,omitempty"`
+ Digest github_com_opencontainers_go_digest.Digest `protobuf:"bytes,2,opt,name=digest,proto3,customtype=github.com/opencontainers/go-digest.Digest" json:"digest"`
+ Size_ int64 `protobuf:"varint,3,opt,name=size,proto3" json:"size,omitempty"`
+ Annotations map[string]string `protobuf:"bytes,5,rep,name=annotations,proto3" json:"annotations,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 *Descriptor) Reset() { *m = Descriptor{} }
-func (*Descriptor) ProtoMessage() {}
-func (*Descriptor) Descriptor() ([]byte, []int) { return fileDescriptorDescriptor, []int{0} }
+func (m *Descriptor) Reset() { *m = Descriptor{} }
+func (*Descriptor) ProtoMessage() {}
+func (*Descriptor) Descriptor() ([]byte, []int) {
+ return fileDescriptor_37f958df3707db9e, []int{0}
+}
+func (m *Descriptor) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *Descriptor) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_Descriptor.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *Descriptor) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_Descriptor.Merge(m, src)
+}
+func (m *Descriptor) XXX_Size() int {
+ return m.Size()
+}
+func (m *Descriptor) XXX_DiscardUnknown() {
+ xxx_messageInfo_Descriptor.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Descriptor proto.InternalMessageInfo
func init() {
proto.RegisterType((*Descriptor)(nil), "containerd.types.Descriptor")
+ proto.RegisterMapType((map[string]string)(nil), "containerd.types.Descriptor.AnnotationsEntry")
}
+
+func init() {
+ proto.RegisterFile("github.com/containerd/containerd/api/types/descriptor.proto", fileDescriptor_37f958df3707db9e)
+}
+
+var fileDescriptor_37f958df3707db9e = []byte{
+ // 311 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xb2, 0x4e, 0xcf, 0x2c, 0xc9,
+ 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xce, 0xcf, 0x2b, 0x49, 0xcc, 0xcc, 0x4b, 0x2d,
+ 0x4a, 0x41, 0x66, 0x26, 0x16, 0x64, 0xea, 0x97, 0x54, 0x16, 0xa4, 0x16, 0xeb, 0xa7, 0xa4, 0x16,
+ 0x27, 0x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0x31, 0x67, 0xa7, 0x56, 0x42, 0x3d, 0x07, 0x62, 0x0a, 0x89, 0x70,
+ 0xb1, 0x96, 0x25, 0xe6, 0x94, 0xa6, 0x42, 0x7c, 0x15, 0x04, 0xe1, 0x58, 0x31, 0x59, 0x30, 0x3a,
+ 0x79, 0x9d, 0x78, 0x28, 0xc7, 0x70, 0xe3, 0xa1, 0x1c, 0x43, 0xc3, 0x23, 0x39, 0xc6, 0x13, 0x8f,
+ 0xe4, 0x18, 0x2f, 0x3c, 0x92, 0x63, 0x7c, 0xf0, 0x48, 0x8e, 0x31, 0xca, 0x80, 0xf8, 0xd8, 0xb1,
+ 0x06, 0x93, 0x11, 0x0c, 0x49, 0x6c, 0xe0, 0x30, 0x37, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0x22,
+ 0x8a, 0x20, 0x4a, 0xda, 0x01, 0x00, 0x00,
+}
+
func (m *Descriptor) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
@@ -111,6 +154,9 @@ func (m *Descriptor) MarshalTo(dAtA []byte) (int, error) {
i += copy(dAtA[i:], v)
}
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -124,6 +170,9 @@ func encodeVarintDescriptor(dAtA []byte, offset int, v uint64) int {
return offset + 1
}
func (m *Descriptor) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.MediaType)
@@ -145,6 +194,9 @@ func (m *Descriptor) Size() (n int) {
n += mapEntrySize + 1 + sovDescriptor(uint64(mapEntrySize))
}
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
@@ -169,7 +221,7 @@ func (this *Descriptor) String() string {
for k, _ := range this.Annotations {
keysForAnnotations = append(keysForAnnotations, k)
}
- sortkeys.Strings(keysForAnnotations)
+ github_com_gogo_protobuf_sortkeys.Strings(keysForAnnotations)
mapStringForAnnotations := "map[string]string{"
for _, k := range keysForAnnotations {
mapStringForAnnotations += fmt.Sprintf("%v: %v,", k, this.Annotations[k])
@@ -180,6 +232,7 @@ func (this *Descriptor) String() string {
`Digest:` + fmt.Sprintf("%v", this.Digest) + `,`,
`Size_:` + fmt.Sprintf("%v", this.Size_) + `,`,
`Annotations:` + mapStringForAnnotations + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -207,7 +260,7 @@ func (m *Descriptor) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -235,7 +288,7 @@ func (m *Descriptor) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -245,6 +298,9 @@ func (m *Descriptor) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthDescriptor
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthDescriptor
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -264,7 +320,7 @@ func (m *Descriptor) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -274,6 +330,9 @@ func (m *Descriptor) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthDescriptor
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthDescriptor
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -293,7 +352,7 @@ func (m *Descriptor) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- m.Size_ |= (int64(b) & 0x7F) << shift
+ m.Size_ |= int64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -312,7 +371,7 @@ func (m *Descriptor) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -321,6 +380,9 @@ func (m *Descriptor) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthDescriptor
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthDescriptor
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -341,7 +403,7 @@ func (m *Descriptor) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -358,7 +420,7 @@ func (m *Descriptor) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ stringLenmapkey |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -368,6 +430,9 @@ func (m *Descriptor) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthDescriptor
}
postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey < 0 {
+ return ErrInvalidLengthDescriptor
+ }
if postStringIndexmapkey > l {
return io.ErrUnexpectedEOF
}
@@ -384,7 +449,7 @@ func (m *Descriptor) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLenmapvalue |= (uint64(b) & 0x7F) << shift
+ stringLenmapvalue |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -394,6 +459,9 @@ func (m *Descriptor) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthDescriptor
}
postStringIndexmapvalue := iNdEx + intStringLenmapvalue
+ if postStringIndexmapvalue < 0 {
+ return ErrInvalidLengthDescriptor
+ }
if postStringIndexmapvalue > l {
return io.ErrUnexpectedEOF
}
@@ -425,9 +493,13 @@ func (m *Descriptor) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthDescriptor
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthDescriptor
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -491,10 +563,13 @@ func skipDescriptor(dAtA []byte) (n int, err error) {
break
}
}
- iNdEx += length
if length < 0 {
return 0, ErrInvalidLengthDescriptor
}
+ iNdEx += length
+ if iNdEx < 0 {
+ return 0, ErrInvalidLengthDescriptor
+ }
return iNdEx, nil
case 3:
for {
@@ -523,6 +598,9 @@ func skipDescriptor(dAtA []byte) (n int, err error) {
return 0, err
}
iNdEx = start + next
+ if iNdEx < 0 {
+ return 0, ErrInvalidLengthDescriptor
+ }
}
return iNdEx, nil
case 4:
@@ -541,31 +619,3 @@ var (
ErrInvalidLengthDescriptor = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowDescriptor = fmt.Errorf("proto: integer overflow")
)
-
-func init() {
- proto.RegisterFile("github.com/containerd/containerd/api/types/descriptor.proto", fileDescriptorDescriptor)
-}
-
-var fileDescriptorDescriptor = []byte{
- // 311 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xb2, 0x4e, 0xcf, 0x2c, 0xc9,
- 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xce, 0xcf, 0x2b, 0x49, 0xcc, 0xcc, 0x4b, 0x2d,
- 0x4a, 0x41, 0x66, 0x26, 0x16, 0x64, 0xea, 0x97, 0x54, 0x16, 0xa4, 0x16, 0xeb, 0xa7, 0xa4, 0x16,
- 0x27, 0x17, 0x65, 0x16, 0x94, 0xe4, 0x17, 0xe9, 0x15, 0x14, 0xe5, 0x97, 0xe4, 0x0b, 0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, 0x94, 0xa6, 0x42, 0x7c, 0x15, 0x04, 0xe1, 0x58, 0x31, 0x59, 0x30, 0x3a,
- 0x79, 0x9d, 0x78, 0x28, 0xc7, 0x70, 0xe3, 0xa1, 0x1c, 0x43, 0xc3, 0x23, 0x39, 0xc6, 0x13, 0x8f,
- 0xe4, 0x18, 0x2f, 0x3c, 0x92, 0x63, 0x7c, 0xf0, 0x48, 0x8e, 0x31, 0xca, 0x80, 0xf8, 0xd8, 0xb1,
- 0x06, 0x93, 0x11, 0x0c, 0x49, 0x6c, 0xe0, 0x30, 0x37, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0x22,
- 0x8a, 0x20, 0x4a, 0xda, 0x01, 0x00, 0x00,
-}
diff --git a/api/types/metrics.pb.go b/api/types/metrics.pb.go
index 52e9f40a5..c231d343a 100644
--- a/api/types/metrics.pb.go
+++ b/api/types/metrics.pb.go
@@ -3,22 +3,17 @@
package types
-import proto "github.com/gogo/protobuf/proto"
-import fmt "fmt"
-import math "math"
-
-// skipping weak import gogoproto "github.com/gogo/protobuf/gogoproto"
-import google_protobuf1 "github.com/gogo/protobuf/types"
-import _ "github.com/gogo/protobuf/types"
-
-import time "time"
-
-import types1 "github.com/gogo/protobuf/types"
-
-import strings "strings"
-import reflect "reflect"
-
-import io "io"
+import (
+ fmt "fmt"
+ 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"
+ reflect "reflect"
+ strings "strings"
+ time "time"
+)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
@@ -26,19 +21,82 @@ 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.
+// A compilation error at this line likely means your copy of the
+// proto package needs to be updated.
+const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
+
type Metric struct {
- Timestamp time.Time `protobuf:"bytes,1,opt,name=timestamp,stdtime" json:"timestamp"`
- ID string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
- Data *google_protobuf1.Any `protobuf:"bytes,3,opt,name=data" json:"data,omitempty"`
+ Timestamp time.Time `protobuf:"bytes,1,opt,name=timestamp,proto3,stdtime" json:"timestamp"`
+ ID string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
+ Data *types.Any `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *Metric) Reset() { *m = Metric{} }
-func (*Metric) ProtoMessage() {}
-func (*Metric) Descriptor() ([]byte, []int) { return fileDescriptorMetrics, []int{0} }
+func (m *Metric) Reset() { *m = Metric{} }
+func (*Metric) ProtoMessage() {}
+func (*Metric) Descriptor() ([]byte, []int) {
+ return fileDescriptor_8d594d87edf6e6bc, []int{0}
+}
+func (m *Metric) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *Metric) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_Metric.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *Metric) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_Metric.Merge(m, src)
+}
+func (m *Metric) XXX_Size() int {
+ return m.Size()
+}
+func (m *Metric) XXX_DiscardUnknown() {
+ xxx_messageInfo_Metric.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Metric proto.InternalMessageInfo
func init() {
proto.RegisterType((*Metric)(nil), "containerd.types.Metric")
}
+
+func init() {
+ proto.RegisterFile("github.com/containerd/containerd/api/types/metrics.proto", fileDescriptor_8d594d87edf6e6bc)
+}
+
+var fileDescriptor_8d594d87edf6e6bc = []byte{
+ // 258 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xb2, 0x48, 0xcf, 0x2c, 0xc9,
+ 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xce, 0xcf, 0x2b, 0x49, 0xcc, 0xcc, 0x4b, 0x2d,
+ 0x4a, 0x41, 0x66, 0x26, 0x16, 0x64, 0xea, 0x97, 0x54, 0x16, 0xa4, 0x16, 0xeb, 0xe7, 0xa6, 0x96,
+ 0x14, 0x65, 0x26, 0x17, 0xeb, 0x15, 0x14, 0xe5, 0x97, 0xe4, 0x0b, 0x09, 0x20, 0xd4, 0xe8, 0x81,
+ 0xe5, 0xa5, 0x44, 0xd2, 0xf3, 0xd3, 0xf3, 0xc1, 0x92, 0xfa, 0x20, 0x16, 0x44, 0x9d, 0x94, 0x64,
+ 0x7a, 0x7e, 0x7e, 0x7a, 0x4e, 0xaa, 0x3e, 0x98, 0x97, 0x54, 0x9a, 0xa6, 0x9f, 0x98, 0x57, 0x09,
+ 0x95, 0x92, 0x47, 0x97, 0x2a, 0xc9, 0xcc, 0x4d, 0x2d, 0x2e, 0x49, 0xcc, 0x2d, 0x80, 0x28, 0x50,
+ 0xea, 0x63, 0xe4, 0x62, 0xf3, 0x05, 0xdb, 0x2a, 0xe4, 0xc4, 0xc5, 0x09, 0x97, 0x95, 0x60, 0x54,
+ 0x60, 0xd4, 0xe0, 0x36, 0x92, 0xd2, 0x83, 0xe8, 0xd7, 0x83, 0xe9, 0xd7, 0x0b, 0x81, 0xa9, 0x70,
+ 0xe2, 0x38, 0x71, 0x4f, 0x9e, 0x61, 0xc2, 0x7d, 0x79, 0xc6, 0x20, 0x84, 0x36, 0x21, 0x31, 0x2e,
+ 0xa6, 0xcc, 0x14, 0x09, 0x26, 0x05, 0x46, 0x0d, 0x4e, 0x27, 0xb6, 0x47, 0xf7, 0xe4, 0x99, 0x3c,
+ 0x5d, 0x82, 0x98, 0x32, 0x53, 0x84, 0x34, 0xb8, 0x58, 0x52, 0x12, 0x4b, 0x12, 0x25, 0x98, 0xc1,
+ 0xc6, 0x8a, 0x60, 0x18, 0xeb, 0x98, 0x57, 0x19, 0x04, 0x56, 0xe1, 0xe4, 0x75, 0xe2, 0xa1, 0x1c,
+ 0xc3, 0x8d, 0x87, 0x72, 0x0c, 0x0d, 0x8f, 0xe4, 0x18, 0x4f, 0x3c, 0x92, 0x63, 0xbc, 0xf0, 0x48,
+ 0x8e, 0xf1, 0xc1, 0x23, 0x39, 0xc6, 0x28, 0x03, 0xe2, 0x03, 0xd2, 0x1a, 0x4c, 0x46, 0x30, 0x24,
+ 0xb1, 0x81, 0x6d, 0x30, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0xde, 0x0d, 0x02, 0xfe, 0x85, 0x01,
+ 0x00, 0x00,
+}
+
func (m *Metric) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
@@ -56,8 +114,8 @@ func (m *Metric) MarshalTo(dAtA []byte) (int, error) {
_ = l
dAtA[i] = 0xa
i++
- i = encodeVarintMetrics(dAtA, i, uint64(types1.SizeOfStdTime(m.Timestamp)))
- n1, err := types1.StdTimeMarshalTo(m.Timestamp, dAtA[i:])
+ i = encodeVarintMetrics(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp)))
+ n1, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Timestamp, dAtA[i:])
if err != nil {
return 0, err
}
@@ -78,6 +136,9 @@ func (m *Metric) MarshalTo(dAtA []byte) (int, error) {
}
i += n2
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -91,9 +152,12 @@ func encodeVarintMetrics(dAtA []byte, offset int, v uint64) int {
return offset + 1
}
func (m *Metric) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
- l = types1.SizeOfStdTime(m.Timestamp)
+ l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp)
n += 1 + l + sovMetrics(uint64(l))
l = len(m.ID)
if l > 0 {
@@ -103,6 +167,9 @@ func (m *Metric) Size() (n int) {
l = m.Data.Size()
n += 1 + l + sovMetrics(uint64(l))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
@@ -124,9 +191,10 @@ func (this *Metric) String() string {
return "nil"
}
s := strings.Join([]string{`&Metric{`,
- `Timestamp:` + strings.Replace(strings.Replace(this.Timestamp.String(), "Timestamp", "google_protobuf2.Timestamp", 1), `&`, ``, 1) + `,`,
+ `Timestamp:` + strings.Replace(strings.Replace(this.Timestamp.String(), "Timestamp", "types.Timestamp", 1), `&`, ``, 1) + `,`,
`ID:` + fmt.Sprintf("%v", this.ID) + `,`,
- `Data:` + strings.Replace(fmt.Sprintf("%v", this.Data), "Any", "google_protobuf1.Any", 1) + `,`,
+ `Data:` + strings.Replace(fmt.Sprintf("%v", this.Data), "Any", "types.Any", 1) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -154,7 +222,7 @@ func (m *Metric) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -182,7 +250,7 @@ func (m *Metric) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -191,10 +259,13 @@ func (m *Metric) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthMetrics
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthMetrics
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
- if err := types1.StdTimeUnmarshal(&m.Timestamp, dAtA[iNdEx:postIndex]); err != nil {
+ if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Timestamp, dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
@@ -212,7 +283,7 @@ func (m *Metric) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -222,6 +293,9 @@ func (m *Metric) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthMetrics
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthMetrics
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -241,7 +315,7 @@ func (m *Metric) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -250,11 +324,14 @@ func (m *Metric) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthMetrics
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthMetrics
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Data == nil {
- m.Data = &google_protobuf1.Any{}
+ m.Data = &types.Any{}
}
if err := m.Data.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
@@ -269,9 +346,13 @@ func (m *Metric) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthMetrics
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthMetrics
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -335,10 +416,13 @@ func skipMetrics(dAtA []byte) (n int, err error) {
break
}
}
- iNdEx += length
if length < 0 {
return 0, ErrInvalidLengthMetrics
}
+ iNdEx += length
+ if iNdEx < 0 {
+ return 0, ErrInvalidLengthMetrics
+ }
return iNdEx, nil
case 3:
for {
@@ -367,6 +451,9 @@ func skipMetrics(dAtA []byte) (n int, err error) {
return 0, err
}
iNdEx = start + next
+ if iNdEx < 0 {
+ return 0, ErrInvalidLengthMetrics
+ }
}
return iNdEx, nil
case 4:
@@ -385,28 +472,3 @@ var (
ErrInvalidLengthMetrics = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowMetrics = fmt.Errorf("proto: integer overflow")
)
-
-func init() {
- proto.RegisterFile("github.com/containerd/containerd/api/types/metrics.proto", fileDescriptorMetrics)
-}
-
-var fileDescriptorMetrics = []byte{
- // 258 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xb2, 0x48, 0xcf, 0x2c, 0xc9,
- 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xce, 0xcf, 0x2b, 0x49, 0xcc, 0xcc, 0x4b, 0x2d,
- 0x4a, 0x41, 0x66, 0x26, 0x16, 0x64, 0xea, 0x97, 0x54, 0x16, 0xa4, 0x16, 0xeb, 0xe7, 0xa6, 0x96,
- 0x14, 0x65, 0x26, 0x17, 0xeb, 0x15, 0x14, 0xe5, 0x97, 0xe4, 0x0b, 0x09, 0x20, 0xd4, 0xe8, 0x81,
- 0xe5, 0xa5, 0x44, 0xd2, 0xf3, 0xd3, 0xf3, 0xc1, 0x92, 0xfa, 0x20, 0x16, 0x44, 0x9d, 0x94, 0x64,
- 0x7a, 0x7e, 0x7e, 0x7a, 0x4e, 0xaa, 0x3e, 0x98, 0x97, 0x54, 0x9a, 0xa6, 0x9f, 0x98, 0x57, 0x09,
- 0x95, 0x92, 0x47, 0x97, 0x2a, 0xc9, 0xcc, 0x4d, 0x2d, 0x2e, 0x49, 0xcc, 0x2d, 0x80, 0x28, 0x50,
- 0xea, 0x63, 0xe4, 0x62, 0xf3, 0x05, 0xdb, 0x2a, 0xe4, 0xc4, 0xc5, 0x09, 0x97, 0x95, 0x60, 0x54,
- 0x60, 0xd4, 0xe0, 0x36, 0x92, 0xd2, 0x83, 0xe8, 0xd7, 0x83, 0xe9, 0xd7, 0x0b, 0x81, 0xa9, 0x70,
- 0xe2, 0x38, 0x71, 0x4f, 0x9e, 0x61, 0xc2, 0x7d, 0x79, 0xc6, 0x20, 0x84, 0x36, 0x21, 0x31, 0x2e,
- 0xa6, 0xcc, 0x14, 0x09, 0x26, 0x05, 0x46, 0x0d, 0x4e, 0x27, 0xb6, 0x47, 0xf7, 0xe4, 0x99, 0x3c,
- 0x5d, 0x82, 0x98, 0x32, 0x53, 0x84, 0x34, 0xb8, 0x58, 0x52, 0x12, 0x4b, 0x12, 0x25, 0x98, 0xc1,
- 0xc6, 0x8a, 0x60, 0x18, 0xeb, 0x98, 0x57, 0x19, 0x04, 0x56, 0xe1, 0xe4, 0x75, 0xe2, 0xa1, 0x1c,
- 0xc3, 0x8d, 0x87, 0x72, 0x0c, 0x0d, 0x8f, 0xe4, 0x18, 0x4f, 0x3c, 0x92, 0x63, 0xbc, 0xf0, 0x48,
- 0x8e, 0xf1, 0xc1, 0x23, 0x39, 0xc6, 0x28, 0x03, 0xe2, 0x03, 0xd2, 0x1a, 0x4c, 0x46, 0x30, 0x24,
- 0xb1, 0x81, 0x6d, 0x30, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0xde, 0x0d, 0x02, 0xfe, 0x85, 0x01,
- 0x00, 0x00,
-}
diff --git a/api/types/mount.pb.go b/api/types/mount.pb.go
index f7a9c3c1f..54af8ea2f 100644
--- a/api/types/mount.pb.go
+++ b/api/types/mount.pb.go
@@ -3,22 +3,26 @@
package types
-import proto "github.com/gogo/protobuf/proto"
-import fmt "fmt"
-import math "math"
-
-// skipping weak import gogoproto "github.com/gogo/protobuf/gogoproto"
-
-import strings "strings"
-import reflect "reflect"
-
-import io "io"
+import (
+ fmt "fmt"
+ proto "github.com/gogo/protobuf/proto"
+ io "io"
+ math "math"
+ reflect "reflect"
+ strings "strings"
+)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the proto package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// proto package needs to be updated.
+const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
+
// Mount describes mounts for a container.
//
// This type is the lingua franca of ContainerD. All services provide mounts
@@ -35,16 +39,69 @@ type Mount struct {
// Target path in container
Target string `protobuf:"bytes,3,opt,name=target,proto3" json:"target,omitempty"`
// Options specifies zero or more fstab style mount options.
- Options []string `protobuf:"bytes,4,rep,name=options" json:"options,omitempty"`
+ Options []string `protobuf:"bytes,4,rep,name=options,proto3" json:"options,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *Mount) Reset() { *m = Mount{} }
-func (*Mount) ProtoMessage() {}
-func (*Mount) Descriptor() ([]byte, []int) { return fileDescriptorMount, []int{0} }
+func (m *Mount) Reset() { *m = Mount{} }
+func (*Mount) ProtoMessage() {}
+func (*Mount) Descriptor() ([]byte, []int) {
+ return fileDescriptor_920196890d4a7b9f, []int{0}
+}
+func (m *Mount) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *Mount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_Mount.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *Mount) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_Mount.Merge(m, src)
+}
+func (m *Mount) XXX_Size() int {
+ return m.Size()
+}
+func (m *Mount) XXX_DiscardUnknown() {
+ xxx_messageInfo_Mount.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Mount proto.InternalMessageInfo
func init() {
proto.RegisterType((*Mount)(nil), "containerd.types.Mount")
}
+
+func init() {
+ proto.RegisterFile("github.com/containerd/containerd/api/types/mount.proto", fileDescriptor_920196890d4a7b9f)
+}
+
+var fileDescriptor_920196890d4a7b9f = []byte{
+ // 202 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x32, 0x4b, 0xcf, 0x2c, 0xc9,
+ 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xce, 0xcf, 0x2b, 0x49, 0xcc, 0xcc, 0x4b, 0x2d,
+ 0x4a, 0x41, 0x66, 0x26, 0x16, 0x64, 0xea, 0x97, 0x54, 0x16, 0xa4, 0x16, 0xeb, 0xe7, 0xe6, 0x97,
+ 0xe6, 0x95, 0xe8, 0x15, 0x14, 0xe5, 0x97, 0xe4, 0x0b, 0x09, 0x20, 0x54, 0xe8, 0x81, 0x65, 0xa5,
+ 0x44, 0xd2, 0xf3, 0xd3, 0xf3, 0xc1, 0x92, 0xfa, 0x20, 0x16, 0x44, 0x9d, 0x52, 0x2a, 0x17, 0xab,
+ 0x2f, 0x48, 0x9b, 0x90, 0x10, 0x17, 0x0b, 0x48, 0x9d, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0x67, 0x10,
+ 0x98, 0x2d, 0x24, 0xc6, 0xc5, 0x56, 0x9c, 0x5f, 0x5a, 0x94, 0x9c, 0x2a, 0xc1, 0x04, 0x16, 0x85,
+ 0xf2, 0x40, 0xe2, 0x25, 0x89, 0x45, 0xe9, 0xa9, 0x25, 0x12, 0xcc, 0x10, 0x71, 0x08, 0x4f, 0x48,
+ 0x82, 0x8b, 0x3d, 0xbf, 0xa0, 0x24, 0x33, 0x3f, 0xaf, 0x58, 0x82, 0x45, 0x81, 0x59, 0x83, 0x33,
+ 0x08, 0xc6, 0x75, 0xf2, 0x3a, 0xf1, 0x50, 0x8e, 0xe1, 0xc6, 0x43, 0x39, 0x86, 0x86, 0x47, 0x72,
+ 0x8c, 0x27, 0x1e, 0xc9, 0x31, 0x5e, 0x78, 0x24, 0xc7, 0xf8, 0xe0, 0x91, 0x1c, 0x63, 0x94, 0x01,
+ 0xf1, 0x1e, 0xb4, 0x06, 0x93, 0x11, 0x0c, 0x49, 0x6c, 0x60, 0xb7, 0x1b, 0x03, 0x02, 0x00, 0x00,
+ 0xff, 0xff, 0x82, 0x1c, 0x02, 0x18, 0x1d, 0x01, 0x00, 0x00,
+}
+
func (m *Mount) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
@@ -93,6 +150,9 @@ func (m *Mount) MarshalTo(dAtA []byte) (int, error) {
i += copy(dAtA[i:], s)
}
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -106,6 +166,9 @@ func encodeVarintMount(dAtA []byte, offset int, v uint64) int {
return offset + 1
}
func (m *Mount) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.Type)
@@ -126,6 +189,9 @@ func (m *Mount) Size() (n int) {
n += 1 + l + sovMount(uint64(l))
}
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
@@ -151,6 +217,7 @@ func (this *Mount) String() string {
`Source:` + fmt.Sprintf("%v", this.Source) + `,`,
`Target:` + fmt.Sprintf("%v", this.Target) + `,`,
`Options:` + fmt.Sprintf("%v", this.Options) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -178,7 +245,7 @@ func (m *Mount) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -206,7 +273,7 @@ func (m *Mount) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -216,6 +283,9 @@ func (m *Mount) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthMount
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthMount
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -235,7 +305,7 @@ func (m *Mount) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -245,6 +315,9 @@ func (m *Mount) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthMount
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthMount
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -264,7 +337,7 @@ func (m *Mount) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -274,6 +347,9 @@ func (m *Mount) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthMount
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthMount
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -293,7 +369,7 @@ func (m *Mount) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -303,6 +379,9 @@ func (m *Mount) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthMount
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthMount
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -317,9 +396,13 @@ func (m *Mount) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthMount
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthMount
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -383,10 +466,13 @@ func skipMount(dAtA []byte) (n int, err error) {
break
}
}
- iNdEx += length
if length < 0 {
return 0, ErrInvalidLengthMount
}
+ iNdEx += length
+ if iNdEx < 0 {
+ return 0, ErrInvalidLengthMount
+ }
return iNdEx, nil
case 3:
for {
@@ -415,6 +501,9 @@ func skipMount(dAtA []byte) (n int, err error) {
return 0, err
}
iNdEx = start + next
+ if iNdEx < 0 {
+ return 0, ErrInvalidLengthMount
+ }
}
return iNdEx, nil
case 4:
@@ -433,24 +522,3 @@ var (
ErrInvalidLengthMount = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowMount = fmt.Errorf("proto: integer overflow")
)
-
-func init() {
- proto.RegisterFile("github.com/containerd/containerd/api/types/mount.proto", fileDescriptorMount)
-}
-
-var fileDescriptorMount = []byte{
- // 202 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x32, 0x4b, 0xcf, 0x2c, 0xc9,
- 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xce, 0xcf, 0x2b, 0x49, 0xcc, 0xcc, 0x4b, 0x2d,
- 0x4a, 0x41, 0x66, 0x26, 0x16, 0x64, 0xea, 0x97, 0x54, 0x16, 0xa4, 0x16, 0xeb, 0xe7, 0xe6, 0x97,
- 0xe6, 0x95, 0xe8, 0x15, 0x14, 0xe5, 0x97, 0xe4, 0x0b, 0x09, 0x20, 0x54, 0xe8, 0x81, 0x65, 0xa5,
- 0x44, 0xd2, 0xf3, 0xd3, 0xf3, 0xc1, 0x92, 0xfa, 0x20, 0x16, 0x44, 0x9d, 0x52, 0x2a, 0x17, 0xab,
- 0x2f, 0x48, 0x9b, 0x90, 0x10, 0x17, 0x0b, 0x48, 0x9d, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0x67, 0x10,
- 0x98, 0x2d, 0x24, 0xc6, 0xc5, 0x56, 0x9c, 0x5f, 0x5a, 0x94, 0x9c, 0x2a, 0xc1, 0x04, 0x16, 0x85,
- 0xf2, 0x40, 0xe2, 0x25, 0x89, 0x45, 0xe9, 0xa9, 0x25, 0x12, 0xcc, 0x10, 0x71, 0x08, 0x4f, 0x48,
- 0x82, 0x8b, 0x3d, 0xbf, 0xa0, 0x24, 0x33, 0x3f, 0xaf, 0x58, 0x82, 0x45, 0x81, 0x59, 0x83, 0x33,
- 0x08, 0xc6, 0x75, 0xf2, 0x3a, 0xf1, 0x50, 0x8e, 0xe1, 0xc6, 0x43, 0x39, 0x86, 0x86, 0x47, 0x72,
- 0x8c, 0x27, 0x1e, 0xc9, 0x31, 0x5e, 0x78, 0x24, 0xc7, 0xf8, 0xe0, 0x91, 0x1c, 0x63, 0x94, 0x01,
- 0xf1, 0x1e, 0xb4, 0x06, 0x93, 0x11, 0x0c, 0x49, 0x6c, 0x60, 0xb7, 0x1b, 0x03, 0x02, 0x00, 0x00,
- 0xff, 0xff, 0x82, 0x1c, 0x02, 0x18, 0x1d, 0x01, 0x00, 0x00,
-}
diff --git a/api/types/platform.pb.go b/api/types/platform.pb.go
index ba9a3bf88..558f94732 100644
--- a/api/types/platform.pb.go
+++ b/api/types/platform.pb.go
@@ -3,37 +3,94 @@
package types
-import proto "github.com/gogo/protobuf/proto"
-import fmt "fmt"
-import math "math"
-
-// skipping weak import gogoproto "github.com/gogo/protobuf/gogoproto"
-
-import strings "strings"
-import reflect "reflect"
-
-import io "io"
+import (
+ fmt "fmt"
+ proto "github.com/gogo/protobuf/proto"
+ io "io"
+ math "math"
+ reflect "reflect"
+ strings "strings"
+)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the proto package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// proto package needs to be updated.
+const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
+
// Platform follows the structure of the OCI platform specification, from
// descriptors.
type Platform struct {
- OS string `protobuf:"bytes,1,opt,name=os,proto3" json:"os,omitempty"`
- Architecture string `protobuf:"bytes,2,opt,name=architecture,proto3" json:"architecture,omitempty"`
- Variant string `protobuf:"bytes,3,opt,name=variant,proto3" json:"variant,omitempty"`
+ OS string `protobuf:"bytes,1,opt,name=os,proto3" json:"os,omitempty"`
+ Architecture string `protobuf:"bytes,2,opt,name=architecture,proto3" json:"architecture,omitempty"`
+ Variant string `protobuf:"bytes,3,opt,name=variant,proto3" json:"variant,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *Platform) Reset() { *m = Platform{} }
-func (*Platform) ProtoMessage() {}
-func (*Platform) Descriptor() ([]byte, []int) { return fileDescriptorPlatform, []int{0} }
+func (m *Platform) Reset() { *m = Platform{} }
+func (*Platform) ProtoMessage() {}
+func (*Platform) Descriptor() ([]byte, []int) {
+ return fileDescriptor_24ba7a4b83e2367e, []int{0}
+}
+func (m *Platform) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *Platform) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_Platform.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *Platform) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_Platform.Merge(m, src)
+}
+func (m *Platform) XXX_Size() int {
+ return m.Size()
+}
+func (m *Platform) XXX_DiscardUnknown() {
+ xxx_messageInfo_Platform.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Platform proto.InternalMessageInfo
func init() {
proto.RegisterType((*Platform)(nil), "containerd.types.Platform")
}
+
+func init() {
+ proto.RegisterFile("github.com/containerd/containerd/api/types/platform.proto", fileDescriptor_24ba7a4b83e2367e)
+}
+
+var fileDescriptor_24ba7a4b83e2367e = []byte{
+ // 205 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xb2, 0x4c, 0xcf, 0x2c, 0xc9,
+ 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xce, 0xcf, 0x2b, 0x49, 0xcc, 0xcc, 0x4b, 0x2d,
+ 0x4a, 0x41, 0x66, 0x26, 0x16, 0x64, 0xea, 0x97, 0x54, 0x16, 0xa4, 0x16, 0xeb, 0x17, 0xe4, 0x24,
+ 0x96, 0xa4, 0xe5, 0x17, 0xe5, 0xea, 0x15, 0x14, 0xe5, 0x97, 0xe4, 0x0b, 0x09, 0x20, 0x14, 0xe9,
+ 0x81, 0x15, 0x48, 0x89, 0xa4, 0xe7, 0xa7, 0xe7, 0x83, 0x25, 0xf5, 0x41, 0x2c, 0x88, 0x3a, 0xa5,
+ 0x04, 0x2e, 0x8e, 0x00, 0xa8, 0x4e, 0x21, 0x31, 0x2e, 0xa6, 0xfc, 0x62, 0x09, 0x46, 0x05, 0x46,
+ 0x0d, 0x4e, 0x27, 0xb6, 0x47, 0xf7, 0xe4, 0x99, 0xfc, 0x83, 0x83, 0x98, 0xf2, 0x8b, 0x85, 0x94,
+ 0xb8, 0x78, 0x12, 0x8b, 0x92, 0x33, 0x32, 0x4b, 0x52, 0x93, 0x4b, 0x4a, 0x8b, 0x52, 0x25, 0x98,
+ 0x40, 0x2a, 0x82, 0x50, 0xc4, 0x84, 0x24, 0xb8, 0xd8, 0xcb, 0x12, 0x8b, 0x32, 0x13, 0xf3, 0x4a,
+ 0x24, 0x98, 0xc1, 0xd2, 0x30, 0xae, 0x93, 0xd7, 0x89, 0x87, 0x72, 0x0c, 0x37, 0x1e, 0xca, 0x31,
+ 0x34, 0x3c, 0x92, 0x63, 0x3c, 0xf1, 0x48, 0x8e, 0xf1, 0xc2, 0x23, 0x39, 0xc6, 0x07, 0x8f, 0xe4,
+ 0x18, 0xa3, 0x0c, 0x88, 0xf7, 0x9e, 0x35, 0x98, 0x8c, 0x60, 0x48, 0x62, 0x03, 0x3b, 0xdb, 0x18,
+ 0x10, 0x00, 0x00, 0xff, 0xff, 0x05, 0xaa, 0xda, 0xa1, 0x1b, 0x01, 0x00, 0x00,
+}
+
func (m *Platform) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
@@ -67,6 +124,9 @@ func (m *Platform) MarshalTo(dAtA []byte) (int, error) {
i = encodeVarintPlatform(dAtA, i, uint64(len(m.Variant)))
i += copy(dAtA[i:], m.Variant)
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -80,6 +140,9 @@ func encodeVarintPlatform(dAtA []byte, offset int, v uint64) int {
return offset + 1
}
func (m *Platform) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.OS)
@@ -94,6 +157,9 @@ func (m *Platform) Size() (n int) {
if l > 0 {
n += 1 + l + sovPlatform(uint64(l))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
@@ -118,6 +184,7 @@ func (this *Platform) String() string {
`OS:` + fmt.Sprintf("%v", this.OS) + `,`,
`Architecture:` + fmt.Sprintf("%v", this.Architecture) + `,`,
`Variant:` + fmt.Sprintf("%v", this.Variant) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -145,7 +212,7 @@ func (m *Platform) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -173,7 +240,7 @@ func (m *Platform) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -183,6 +250,9 @@ func (m *Platform) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthPlatform
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthPlatform
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -202,7 +272,7 @@ func (m *Platform) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -212,6 +282,9 @@ func (m *Platform) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthPlatform
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthPlatform
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -231,7 +304,7 @@ func (m *Platform) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -241,6 +314,9 @@ func (m *Platform) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthPlatform
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthPlatform
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -255,9 +331,13 @@ func (m *Platform) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthPlatform
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthPlatform
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -321,10 +401,13 @@ func skipPlatform(dAtA []byte) (n int, err error) {
break
}
}
- iNdEx += length
if length < 0 {
return 0, ErrInvalidLengthPlatform
}
+ iNdEx += length
+ if iNdEx < 0 {
+ return 0, ErrInvalidLengthPlatform
+ }
return iNdEx, nil
case 3:
for {
@@ -353,6 +436,9 @@ func skipPlatform(dAtA []byte) (n int, err error) {
return 0, err
}
iNdEx = start + next
+ if iNdEx < 0 {
+ return 0, ErrInvalidLengthPlatform
+ }
}
return iNdEx, nil
case 4:
@@ -371,24 +457,3 @@ var (
ErrInvalidLengthPlatform = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowPlatform = fmt.Errorf("proto: integer overflow")
)
-
-func init() {
- proto.RegisterFile("github.com/containerd/containerd/api/types/platform.proto", fileDescriptorPlatform)
-}
-
-var fileDescriptorPlatform = []byte{
- // 205 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xb2, 0x4c, 0xcf, 0x2c, 0xc9,
- 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xce, 0xcf, 0x2b, 0x49, 0xcc, 0xcc, 0x4b, 0x2d,
- 0x4a, 0x41, 0x66, 0x26, 0x16, 0x64, 0xea, 0x97, 0x54, 0x16, 0xa4, 0x16, 0xeb, 0x17, 0xe4, 0x24,
- 0x96, 0xa4, 0xe5, 0x17, 0xe5, 0xea, 0x15, 0x14, 0xe5, 0x97, 0xe4, 0x0b, 0x09, 0x20, 0x14, 0xe9,
- 0x81, 0x15, 0x48, 0x89, 0xa4, 0xe7, 0xa7, 0xe7, 0x83, 0x25, 0xf5, 0x41, 0x2c, 0x88, 0x3a, 0xa5,
- 0x04, 0x2e, 0x8e, 0x00, 0xa8, 0x4e, 0x21, 0x31, 0x2e, 0xa6, 0xfc, 0x62, 0x09, 0x46, 0x05, 0x46,
- 0x0d, 0x4e, 0x27, 0xb6, 0x47, 0xf7, 0xe4, 0x99, 0xfc, 0x83, 0x83, 0x98, 0xf2, 0x8b, 0x85, 0x94,
- 0xb8, 0x78, 0x12, 0x8b, 0x92, 0x33, 0x32, 0x4b, 0x52, 0x93, 0x4b, 0x4a, 0x8b, 0x52, 0x25, 0x98,
- 0x40, 0x2a, 0x82, 0x50, 0xc4, 0x84, 0x24, 0xb8, 0xd8, 0xcb, 0x12, 0x8b, 0x32, 0x13, 0xf3, 0x4a,
- 0x24, 0x98, 0xc1, 0xd2, 0x30, 0xae, 0x93, 0xd7, 0x89, 0x87, 0x72, 0x0c, 0x37, 0x1e, 0xca, 0x31,
- 0x34, 0x3c, 0x92, 0x63, 0x3c, 0xf1, 0x48, 0x8e, 0xf1, 0xc2, 0x23, 0x39, 0xc6, 0x07, 0x8f, 0xe4,
- 0x18, 0xa3, 0x0c, 0x88, 0xf7, 0x9e, 0x35, 0x98, 0x8c, 0x60, 0x48, 0x62, 0x03, 0x3b, 0xdb, 0x18,
- 0x10, 0x00, 0x00, 0xff, 0xff, 0x05, 0xaa, 0xda, 0xa1, 0x1b, 0x01, 0x00, 0x00,
-}
diff --git a/api/types/task/task.pb.go b/api/types/task/task.pb.go
index 437abe8f4..69d851c93 100644
--- a/api/types/task/task.pb.go
+++ b/api/types/task/task.pb.go
@@ -1,34 +1,19 @@
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: github.com/containerd/containerd/api/types/task/task.proto
-/*
- Package task is a generated protocol buffer package.
-
- It is generated from these files:
- github.com/containerd/containerd/api/types/task/task.proto
-
- It has these top-level messages:
- Process
- ProcessInfo
-*/
package task
-import proto "github.com/gogo/protobuf/proto"
-import fmt "fmt"
-import math "math"
-
-// skipping weak import gogoproto "github.com/gogo/protobuf/gogoproto"
-import _ "github.com/gogo/protobuf/types"
-import google_protobuf2 "github.com/gogo/protobuf/types"
-
-import time "time"
-
-import types "github.com/gogo/protobuf/types"
-
-import strings "strings"
-import reflect "reflect"
-
-import io "io"
+import (
+ fmt "fmt"
+ 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"
+ reflect "reflect"
+ strings "strings"
+ time "time"
+)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
@@ -61,6 +46,7 @@ var Status_name = map[int32]string{
4: "PAUSED",
5: "PAUSING",
}
+
var Status_value = map[string]int32{
"UNKNOWN": 0,
"CREATED": 1,
@@ -73,24 +59,58 @@ var Status_value = map[string]int32{
func (x Status) String() string {
return proto.EnumName(Status_name, int32(x))
}
-func (Status) EnumDescriptor() ([]byte, []int) { return fileDescriptorTask, []int{0} }
-type Process struct {
- ContainerID string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"`
- ID string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
- Pid uint32 `protobuf:"varint,3,opt,name=pid,proto3" json:"pid,omitempty"`
- Status Status `protobuf:"varint,4,opt,name=status,proto3,enum=containerd.v1.types.Status" json:"status,omitempty"`
- Stdin string `protobuf:"bytes,5,opt,name=stdin,proto3" json:"stdin,omitempty"`
- Stdout string `protobuf:"bytes,6,opt,name=stdout,proto3" json:"stdout,omitempty"`
- Stderr string `protobuf:"bytes,7,opt,name=stderr,proto3" json:"stderr,omitempty"`
- Terminal bool `protobuf:"varint,8,opt,name=terminal,proto3" json:"terminal,omitempty"`
- ExitStatus uint32 `protobuf:"varint,9,opt,name=exit_status,json=exitStatus,proto3" json:"exit_status,omitempty"`
- ExitedAt time.Time `protobuf:"bytes,10,opt,name=exited_at,json=exitedAt,stdtime" json:"exited_at"`
+func (Status) EnumDescriptor() ([]byte, []int) {
+ return fileDescriptor_391ef18c8ab0dc16, []int{0}
}
-func (m *Process) Reset() { *m = Process{} }
-func (*Process) ProtoMessage() {}
-func (*Process) Descriptor() ([]byte, []int) { return fileDescriptorTask, []int{0} }
+type Process struct {
+ ContainerID string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"`
+ ID string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
+ Pid uint32 `protobuf:"varint,3,opt,name=pid,proto3" json:"pid,omitempty"`
+ Status Status `protobuf:"varint,4,opt,name=status,proto3,enum=containerd.v1.types.Status" json:"status,omitempty"`
+ Stdin string `protobuf:"bytes,5,opt,name=stdin,proto3" json:"stdin,omitempty"`
+ Stdout string `protobuf:"bytes,6,opt,name=stdout,proto3" json:"stdout,omitempty"`
+ Stderr string `protobuf:"bytes,7,opt,name=stderr,proto3" json:"stderr,omitempty"`
+ Terminal bool `protobuf:"varint,8,opt,name=terminal,proto3" json:"terminal,omitempty"`
+ ExitStatus uint32 `protobuf:"varint,9,opt,name=exit_status,json=exitStatus,proto3" json:"exit_status,omitempty"`
+ ExitedAt time.Time `protobuf:"bytes,10,opt,name=exited_at,json=exitedAt,proto3,stdtime" json:"exited_at"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *Process) Reset() { *m = Process{} }
+func (*Process) ProtoMessage() {}
+func (*Process) Descriptor() ([]byte, []int) {
+ return fileDescriptor_391ef18c8ab0dc16, []int{0}
+}
+func (m *Process) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *Process) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_Process.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *Process) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_Process.Merge(m, src)
+}
+func (m *Process) XXX_Size() int {
+ return m.Size()
+}
+func (m *Process) XXX_DiscardUnknown() {
+ xxx_messageInfo_Process.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Process proto.InternalMessageInfo
type ProcessInfo struct {
// PID is the process ID.
@@ -98,18 +118,93 @@ type ProcessInfo struct {
// Info contains additional process information.
//
// Info varies by platform.
- Info *google_protobuf2.Any `protobuf:"bytes,2,opt,name=info" json:"info,omitempty"`
+ Info *types.Any `protobuf:"bytes,2,opt,name=info,proto3" json:"info,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *ProcessInfo) Reset() { *m = ProcessInfo{} }
-func (*ProcessInfo) ProtoMessage() {}
-func (*ProcessInfo) Descriptor() ([]byte, []int) { return fileDescriptorTask, []int{1} }
+func (m *ProcessInfo) Reset() { *m = ProcessInfo{} }
+func (*ProcessInfo) ProtoMessage() {}
+func (*ProcessInfo) Descriptor() ([]byte, []int) {
+ return fileDescriptor_391ef18c8ab0dc16, []int{1}
+}
+func (m *ProcessInfo) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *ProcessInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_ProcessInfo.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *ProcessInfo) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_ProcessInfo.Merge(m, src)
+}
+func (m *ProcessInfo) XXX_Size() int {
+ return m.Size()
+}
+func (m *ProcessInfo) XXX_DiscardUnknown() {
+ xxx_messageInfo_ProcessInfo.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_ProcessInfo proto.InternalMessageInfo
func init() {
+ proto.RegisterEnum("containerd.v1.types.Status", Status_name, Status_value)
proto.RegisterType((*Process)(nil), "containerd.v1.types.Process")
proto.RegisterType((*ProcessInfo)(nil), "containerd.v1.types.ProcessInfo")
- proto.RegisterEnum("containerd.v1.types.Status", Status_name, Status_value)
}
+
+func init() {
+ proto.RegisterFile("github.com/containerd/containerd/api/types/task/task.proto", fileDescriptor_391ef18c8ab0dc16)
+}
+
+var fileDescriptor_391ef18c8ab0dc16 = []byte{
+ // 545 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x90, 0x3f, 0x6f, 0xd3, 0x40,
+ 0x18, 0xc6, 0x7d, 0x6e, 0xeb, 0xa6, 0xe7, 0xb6, 0x18, 0x13, 0x55, 0xc6, 0x20, 0xdb, 0xea, 0x64,
+ 0x31, 0xd8, 0x22, 0xdd, 0xd8, 0xf2, 0x4f, 0xc8, 0x42, 0x72, 0x23, 0x27, 0x11, 0x6c, 0x91, 0x13,
+ 0x5f, 0xcc, 0xa9, 0xcd, 0x9d, 0x65, 0x9f, 0x81, 0x6c, 0x8c, 0xa8, 0x13, 0x5f, 0xa0, 0x13, 0x7c,
+ 0x0a, 0x3e, 0x41, 0x46, 0x26, 0xc4, 0x14, 0xa8, 0x3f, 0x09, 0x3a, 0xdb, 0x49, 0x23, 0x60, 0x39,
+ 0xbd, 0xef, 0xf3, 0x7b, 0xee, 0xbd, 0xf7, 0x1e, 0xf8, 0x22, 0xc6, 0xec, 0x6d, 0x3e, 0x75, 0x66,
+ 0x74, 0xe1, 0xce, 0x28, 0x61, 0x21, 0x26, 0x28, 0x8d, 0x76, 0xcb, 0x30, 0xc1, 0x2e, 0x5b, 0x26,
+ 0x28, 0x73, 0x59, 0x98, 0x5d, 0x95, 0x87, 0x93, 0xa4, 0x94, 0x51, 0xf5, 0xd1, 0xbd, 0xcb, 0x79,
+ 0xf7, 0xdc, 0x29, 0x4d, 0x7a, 0x33, 0xa6, 0x31, 0x2d, 0xb9, 0xcb, 0xab, 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 0x57, 0xa3, 0xfe, 0x4d, 0x47, 0x5b, 0xdd, 0x19, 0xc2, 0xcf, 0x3b, 0x43, 0xf8,
+ 0x58, 0x18, 0x60, 0x55, 0x18, 0xe0, 0x7b, 0x61, 0x80, 0xdf, 0x85, 0x01, 0xde, 0x08, 0x53, 0xa9,
+ 0x0c, 0xe2, 0xe2, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xc3, 0x32, 0xd2, 0x86, 0x50, 0x03, 0x00,
+ 0x00,
+}
+
func (m *Process) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
@@ -182,12 +277,15 @@ func (m *Process) MarshalTo(dAtA []byte) (int, error) {
}
dAtA[i] = 0x52
i++
- i = encodeVarintTask(dAtA, i, uint64(types.SizeOfStdTime(m.ExitedAt)))
- n1, err := types.StdTimeMarshalTo(m.ExitedAt, dAtA[i:])
+ i = encodeVarintTask(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.ExitedAt)))
+ n1, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.ExitedAt, dAtA[i:])
if err != nil {
return 0, err
}
i += n1
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -221,6 +319,9 @@ func (m *ProcessInfo) MarshalTo(dAtA []byte) (int, error) {
}
i += n2
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -234,6 +335,9 @@ func encodeVarintTask(dAtA []byte, offset int, v uint64) int {
return offset + 1
}
func (m *Process) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.ContainerID)
@@ -268,12 +372,18 @@ func (m *Process) Size() (n int) {
if m.ExitStatus != 0 {
n += 1 + sovTask(uint64(m.ExitStatus))
}
- l = types.SizeOfStdTime(m.ExitedAt)
+ l = github_com_gogo_protobuf_types.SizeOfStdTime(m.ExitedAt)
n += 1 + l + sovTask(uint64(l))
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *ProcessInfo) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
if m.Pid != 0 {
@@ -283,6 +393,9 @@ func (m *ProcessInfo) Size() (n int) {
l = m.Info.Size()
n += 1 + l + sovTask(uint64(l))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
@@ -313,7 +426,8 @@ func (this *Process) String() string {
`Stderr:` + fmt.Sprintf("%v", this.Stderr) + `,`,
`Terminal:` + fmt.Sprintf("%v", this.Terminal) + `,`,
`ExitStatus:` + fmt.Sprintf("%v", this.ExitStatus) + `,`,
- `ExitedAt:` + strings.Replace(strings.Replace(this.ExitedAt.String(), "Timestamp", "google_protobuf1.Timestamp", 1), `&`, ``, 1) + `,`,
+ `ExitedAt:` + strings.Replace(strings.Replace(this.ExitedAt.String(), "Timestamp", "types.Timestamp", 1), `&`, ``, 1) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -324,7 +438,8 @@ func (this *ProcessInfo) String() string {
}
s := strings.Join([]string{`&ProcessInfo{`,
`Pid:` + fmt.Sprintf("%v", this.Pid) + `,`,
- `Info:` + strings.Replace(fmt.Sprintf("%v", this.Info), "Any", "google_protobuf2.Any", 1) + `,`,
+ `Info:` + strings.Replace(fmt.Sprintf("%v", this.Info), "Any", "types.Any", 1) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -352,7 +467,7 @@ func (m *Process) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -380,7 +495,7 @@ func (m *Process) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -390,6 +505,9 @@ func (m *Process) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthTask
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthTask
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -409,7 +527,7 @@ func (m *Process) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -419,6 +537,9 @@ func (m *Process) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthTask
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthTask
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -438,7 +559,7 @@ func (m *Process) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- m.Pid |= (uint32(b) & 0x7F) << shift
+ m.Pid |= uint32(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -457,7 +578,7 @@ func (m *Process) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- m.Status |= (Status(b) & 0x7F) << shift
+ m.Status |= Status(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -476,7 +597,7 @@ func (m *Process) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -486,6 +607,9 @@ func (m *Process) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthTask
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthTask
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -505,7 +629,7 @@ func (m *Process) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -515,6 +639,9 @@ func (m *Process) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthTask
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthTask
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -534,7 +661,7 @@ func (m *Process) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -544,6 +671,9 @@ func (m *Process) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthTask
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthTask
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -563,7 +693,7 @@ func (m *Process) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- v |= (int(b) & 0x7F) << shift
+ v |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -583,7 +713,7 @@ func (m *Process) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- m.ExitStatus |= (uint32(b) & 0x7F) << shift
+ m.ExitStatus |= uint32(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -602,7 +732,7 @@ func (m *Process) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -611,10 +741,13 @@ func (m *Process) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthTask
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthTask
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
- if err := types.StdTimeUnmarshal(&m.ExitedAt, dAtA[iNdEx:postIndex]); err != nil {
+ if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.ExitedAt, dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
@@ -627,9 +760,13 @@ func (m *Process) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthTask
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthTask
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -654,7 +791,7 @@ func (m *ProcessInfo) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -682,7 +819,7 @@ func (m *ProcessInfo) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- m.Pid |= (uint32(b) & 0x7F) << shift
+ m.Pid |= uint32(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -701,7 +838,7 @@ func (m *ProcessInfo) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -710,11 +847,14 @@ func (m *ProcessInfo) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthTask
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthTask
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Info == nil {
- m.Info = &google_protobuf2.Any{}
+ m.Info = &types.Any{}
}
if err := m.Info.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
@@ -729,9 +869,13 @@ func (m *ProcessInfo) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthTask
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthTask
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -795,10 +939,13 @@ func skipTask(dAtA []byte) (n int, err error) {
break
}
}
- iNdEx += length
if length < 0 {
return 0, ErrInvalidLengthTask
}
+ iNdEx += length
+ if iNdEx < 0 {
+ return 0, ErrInvalidLengthTask
+ }
return iNdEx, nil
case 3:
for {
@@ -827,6 +974,9 @@ func skipTask(dAtA []byte) (n int, err error) {
return 0, err
}
iNdEx = start + next
+ if iNdEx < 0 {
+ return 0, ErrInvalidLengthTask
+ }
}
return iNdEx, nil
case 4:
@@ -845,46 +995,3 @@ var (
ErrInvalidLengthTask = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowTask = fmt.Errorf("proto: integer overflow")
)
-
-func init() {
- proto.RegisterFile("github.com/containerd/containerd/api/types/task/task.proto", fileDescriptorTask)
-}
-
-var fileDescriptorTask = []byte{
- // 545 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x90, 0x3f, 0x6f, 0xd3, 0x40,
- 0x18, 0xc6, 0x7d, 0x6e, 0xeb, 0xa6, 0xe7, 0xb6, 0x18, 0x13, 0x55, 0xc6, 0x20, 0xdb, 0xea, 0x64,
- 0x31, 0xd8, 0x22, 0xdd, 0xd8, 0xf2, 0x4f, 0xc8, 0x42, 0x72, 0x23, 0x27, 0x11, 0x6c, 0x91, 0x13,
- 0x5f, 0xcc, 0xa9, 0xcd, 0x9d, 0x65, 0x9f, 0x81, 0x6c, 0x8c, 0xa8, 0x13, 0x5f, 0xa0, 0x13, 0x7c,
- 0x0a, 0x3e, 0x41, 0x46, 0x26, 0xc4, 0x14, 0xa8, 0x3f, 0x09, 0x3a, 0xdb, 0x49, 0x23, 0x60, 0x39,
- 0xbd, 0xef, 0xf3, 0x7b, 0xee, 0xbd, 0xf7, 0x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 0xa7, 0xec, 0xed, 0xf2, 0x21, 0xa3, 0x49, 0x82, 0x22, 0xf5, 0x29, 0x94,
- 0x06, 0xed, 0xf1, 0xb0, 0xdf, 0x53, 0xf6, 0x75, 0xe5, 0xe6, 0xd6, 0x3a, 0xae, 0xf0, 0x20, 0xcc,
- 0xb3, 0x6a, 0x3a, 0xa7, 0x7c, 0xfa, 0xc1, 0xee, 0x6d, 0x8e, 0x31, 0x89, 0xf5, 0xd3, 0x4f, 0x5f,
- 0x0c, 0xe1, 0xdb, 0x57, 0xa3, 0xfe, 0x4d, 0x47, 0x5b, 0xdd, 0x19, 0xc2, 0xcf, 0x3b, 0x43, 0xf8,
- 0x58, 0x18, 0x60, 0x55, 0x18, 0xe0, 0x7b, 0x61, 0x80, 0xdf, 0x85, 0x01, 0xde, 0x08, 0x53, 0xa9,
- 0x0c, 0xe2, 0xe2, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xc3, 0x32, 0xd2, 0x86, 0x50, 0x03, 0x00,
- 0x00,
-}
diff --git a/protobuf/plugin/fieldpath.pb.go b/protobuf/plugin/fieldpath.pb.go
index be21df4fb..5662d1906 100644
--- a/protobuf/plugin/fieldpath.pb.go
+++ b/protobuf/plugin/fieldpath.pb.go
@@ -1,20 +1,14 @@
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: github.com/containerd/containerd/protobuf/plugin/fieldpath.proto
-/*
-Package plugin is a generated protocol buffer package.
-
-It is generated from these files:
- github.com/containerd/containerd/protobuf/plugin/fieldpath.proto
-
-It has these top-level messages:
-*/
package plugin
-import proto "github.com/gogo/protobuf/proto"
-import fmt "fmt"
-import math "math"
-import google_protobuf "github.com/gogo/protobuf/protoc-gen-gogo/descriptor"
+import (
+ fmt "fmt"
+ proto "github.com/gogo/protobuf/proto"
+ descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor"
+ math "math"
+)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
@@ -28,16 +22,16 @@ var _ = math.Inf
const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
var E_FieldpathAll = &proto.ExtensionDesc{
- ExtendedType: (*google_protobuf.FileOptions)(nil),
+ ExtendedType: (*descriptor.FileOptions)(nil),
ExtensionType: (*bool)(nil),
Field: 63300,
Name: "containerd.plugin.fieldpath_all",
- Tag: "varint,63300,opt,name=fieldpath_all,json=fieldpathAll",
+ Tag: "varint,63300,opt,name=fieldpath_all",
Filename: "github.com/containerd/containerd/protobuf/plugin/fieldpath.proto",
}
var E_Fieldpath = &proto.ExtensionDesc{
- ExtendedType: (*google_protobuf.MessageOptions)(nil),
+ ExtendedType: (*descriptor.MessageOptions)(nil),
ExtensionType: (*bool)(nil),
Field: 64400,
Name: "containerd.plugin.fieldpath",
@@ -51,10 +45,10 @@ func init() {
}
func init() {
- proto.RegisterFile("github.com/containerd/containerd/protobuf/plugin/fieldpath.proto", fileDescriptorFieldpath)
+ proto.RegisterFile("github.com/containerd/containerd/protobuf/plugin/fieldpath.proto", fileDescriptor_604a244430167409)
}
-var fileDescriptorFieldpath = []byte{
+var fileDescriptor_604a244430167409 = []byte{
// 203 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x72, 0x48, 0xcf, 0x2c, 0xc9,
0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xce, 0xcf, 0x2b, 0x49, 0xcc, 0xcc, 0x4b, 0x2d,
diff --git a/runtime/linux/runctypes/runc.pb.go b/runtime/linux/runctypes/runc.pb.go
index b6b573887..96dfebe6b 100644
--- a/runtime/linux/runctypes/runc.pb.go
+++ b/runtime/linux/runctypes/runc.pb.go
@@ -1,30 +1,16 @@
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: github.com/containerd/containerd/runtime/linux/runctypes/runc.proto
-/*
- Package runctypes is a generated protocol buffer package.
-
- It is generated from these files:
- github.com/containerd/containerd/runtime/linux/runctypes/runc.proto
-
- It has these top-level messages:
- RuncOptions
- CreateOptions
- CheckpointOptions
- ProcessDetails
-*/
package runctypes
-import proto "github.com/gogo/protobuf/proto"
-import fmt "fmt"
-import math "math"
-
-// skipping weak import gogoproto "github.com/gogo/protobuf/gogoproto"
-
-import strings "strings"
-import reflect "reflect"
-
-import io "io"
+import (
+ fmt "fmt"
+ proto "github.com/gogo/protobuf/proto"
+ io "io"
+ math "math"
+ reflect "reflect"
+ strings "strings"
+)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
@@ -38,59 +24,183 @@ var _ = math.Inf
const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
type RuncOptions struct {
- Runtime string `protobuf:"bytes,1,opt,name=runtime,proto3" json:"runtime,omitempty"`
- RuntimeRoot string `protobuf:"bytes,2,opt,name=runtime_root,json=runtimeRoot,proto3" json:"runtime_root,omitempty"`
- CriuPath string `protobuf:"bytes,3,opt,name=criu_path,json=criuPath,proto3" json:"criu_path,omitempty"`
- SystemdCgroup bool `protobuf:"varint,4,opt,name=systemd_cgroup,json=systemdCgroup,proto3" json:"systemd_cgroup,omitempty"`
+ Runtime string `protobuf:"bytes,1,opt,name=runtime,proto3" json:"runtime,omitempty"`
+ RuntimeRoot string `protobuf:"bytes,2,opt,name=runtime_root,json=runtimeRoot,proto3" json:"runtime_root,omitempty"`
+ CriuPath string `protobuf:"bytes,3,opt,name=criu_path,json=criuPath,proto3" json:"criu_path,omitempty"`
+ SystemdCgroup bool `protobuf:"varint,4,opt,name=systemd_cgroup,json=systemdCgroup,proto3" json:"systemd_cgroup,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *RuncOptions) Reset() { *m = RuncOptions{} }
-func (*RuncOptions) ProtoMessage() {}
-func (*RuncOptions) Descriptor() ([]byte, []int) { return fileDescriptorRunc, []int{0} }
+func (m *RuncOptions) Reset() { *m = RuncOptions{} }
+func (*RuncOptions) ProtoMessage() {}
+func (*RuncOptions) Descriptor() ([]byte, []int) {
+ return fileDescriptor_d20e2ba8b3cc58b9, []int{0}
+}
+func (m *RuncOptions) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *RuncOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_RuncOptions.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *RuncOptions) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_RuncOptions.Merge(m, src)
+}
+func (m *RuncOptions) XXX_Size() int {
+ return m.Size()
+}
+func (m *RuncOptions) XXX_DiscardUnknown() {
+ xxx_messageInfo_RuncOptions.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_RuncOptions proto.InternalMessageInfo
type CreateOptions struct {
- NoPivotRoot bool `protobuf:"varint,1,opt,name=no_pivot_root,json=noPivotRoot,proto3" json:"no_pivot_root,omitempty"`
- OpenTcp bool `protobuf:"varint,2,opt,name=open_tcp,json=openTcp,proto3" json:"open_tcp,omitempty"`
- ExternalUnixSockets bool `protobuf:"varint,3,opt,name=external_unix_sockets,json=externalUnixSockets,proto3" json:"external_unix_sockets,omitempty"`
- Terminal bool `protobuf:"varint,4,opt,name=terminal,proto3" json:"terminal,omitempty"`
- FileLocks bool `protobuf:"varint,5,opt,name=file_locks,json=fileLocks,proto3" json:"file_locks,omitempty"`
- EmptyNamespaces []string `protobuf:"bytes,6,rep,name=empty_namespaces,json=emptyNamespaces" json:"empty_namespaces,omitempty"`
- CgroupsMode string `protobuf:"bytes,7,opt,name=cgroups_mode,json=cgroupsMode,proto3" json:"cgroups_mode,omitempty"`
- NoNewKeyring bool `protobuf:"varint,8,opt,name=no_new_keyring,json=noNewKeyring,proto3" json:"no_new_keyring,omitempty"`
- ShimCgroup string `protobuf:"bytes,9,opt,name=shim_cgroup,json=shimCgroup,proto3" json:"shim_cgroup,omitempty"`
- IoUid uint32 `protobuf:"varint,10,opt,name=io_uid,json=ioUid,proto3" json:"io_uid,omitempty"`
- IoGid uint32 `protobuf:"varint,11,opt,name=io_gid,json=ioGid,proto3" json:"io_gid,omitempty"`
- CriuWorkPath string `protobuf:"bytes,12,opt,name=criu_work_path,json=criuWorkPath,proto3" json:"criu_work_path,omitempty"`
- CriuImagePath string `protobuf:"bytes,13,opt,name=criu_image_path,json=criuImagePath,proto3" json:"criu_image_path,omitempty"`
+ NoPivotRoot bool `protobuf:"varint,1,opt,name=no_pivot_root,json=noPivotRoot,proto3" json:"no_pivot_root,omitempty"`
+ OpenTcp bool `protobuf:"varint,2,opt,name=open_tcp,json=openTcp,proto3" json:"open_tcp,omitempty"`
+ ExternalUnixSockets bool `protobuf:"varint,3,opt,name=external_unix_sockets,json=externalUnixSockets,proto3" json:"external_unix_sockets,omitempty"`
+ Terminal bool `protobuf:"varint,4,opt,name=terminal,proto3" json:"terminal,omitempty"`
+ FileLocks bool `protobuf:"varint,5,opt,name=file_locks,json=fileLocks,proto3" json:"file_locks,omitempty"`
+ EmptyNamespaces []string `protobuf:"bytes,6,rep,name=empty_namespaces,json=emptyNamespaces,proto3" json:"empty_namespaces,omitempty"`
+ CgroupsMode string `protobuf:"bytes,7,opt,name=cgroups_mode,json=cgroupsMode,proto3" json:"cgroups_mode,omitempty"`
+ NoNewKeyring bool `protobuf:"varint,8,opt,name=no_new_keyring,json=noNewKeyring,proto3" json:"no_new_keyring,omitempty"`
+ ShimCgroup string `protobuf:"bytes,9,opt,name=shim_cgroup,json=shimCgroup,proto3" json:"shim_cgroup,omitempty"`
+ IoUid uint32 `protobuf:"varint,10,opt,name=io_uid,json=ioUid,proto3" json:"io_uid,omitempty"`
+ IoGid uint32 `protobuf:"varint,11,opt,name=io_gid,json=ioGid,proto3" json:"io_gid,omitempty"`
+ CriuWorkPath string `protobuf:"bytes,12,opt,name=criu_work_path,json=criuWorkPath,proto3" json:"criu_work_path,omitempty"`
+ CriuImagePath string `protobuf:"bytes,13,opt,name=criu_image_path,json=criuImagePath,proto3" json:"criu_image_path,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *CreateOptions) Reset() { *m = CreateOptions{} }
-func (*CreateOptions) ProtoMessage() {}
-func (*CreateOptions) Descriptor() ([]byte, []int) { return fileDescriptorRunc, []int{1} }
+func (m *CreateOptions) Reset() { *m = CreateOptions{} }
+func (*CreateOptions) ProtoMessage() {}
+func (*CreateOptions) Descriptor() ([]byte, []int) {
+ return fileDescriptor_d20e2ba8b3cc58b9, []int{1}
+}
+func (m *CreateOptions) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *CreateOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_CreateOptions.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *CreateOptions) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_CreateOptions.Merge(m, src)
+}
+func (m *CreateOptions) XXX_Size() int {
+ return m.Size()
+}
+func (m *CreateOptions) XXX_DiscardUnknown() {
+ xxx_messageInfo_CreateOptions.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_CreateOptions proto.InternalMessageInfo
type CheckpointOptions struct {
- Exit bool `protobuf:"varint,1,opt,name=exit,proto3" json:"exit,omitempty"`
- OpenTcp bool `protobuf:"varint,2,opt,name=open_tcp,json=openTcp,proto3" json:"open_tcp,omitempty"`
- ExternalUnixSockets bool `protobuf:"varint,3,opt,name=external_unix_sockets,json=externalUnixSockets,proto3" json:"external_unix_sockets,omitempty"`
- Terminal bool `protobuf:"varint,4,opt,name=terminal,proto3" json:"terminal,omitempty"`
- FileLocks bool `protobuf:"varint,5,opt,name=file_locks,json=fileLocks,proto3" json:"file_locks,omitempty"`
- EmptyNamespaces []string `protobuf:"bytes,6,rep,name=empty_namespaces,json=emptyNamespaces" json:"empty_namespaces,omitempty"`
- CgroupsMode string `protobuf:"bytes,7,opt,name=cgroups_mode,json=cgroupsMode,proto3" json:"cgroups_mode,omitempty"`
- WorkPath string `protobuf:"bytes,8,opt,name=work_path,json=workPath,proto3" json:"work_path,omitempty"`
- ImagePath string `protobuf:"bytes,9,opt,name=image_path,json=imagePath,proto3" json:"image_path,omitempty"`
+ Exit bool `protobuf:"varint,1,opt,name=exit,proto3" json:"exit,omitempty"`
+ OpenTcp bool `protobuf:"varint,2,opt,name=open_tcp,json=openTcp,proto3" json:"open_tcp,omitempty"`
+ ExternalUnixSockets bool `protobuf:"varint,3,opt,name=external_unix_sockets,json=externalUnixSockets,proto3" json:"external_unix_sockets,omitempty"`
+ Terminal bool `protobuf:"varint,4,opt,name=terminal,proto3" json:"terminal,omitempty"`
+ FileLocks bool `protobuf:"varint,5,opt,name=file_locks,json=fileLocks,proto3" json:"file_locks,omitempty"`
+ EmptyNamespaces []string `protobuf:"bytes,6,rep,name=empty_namespaces,json=emptyNamespaces,proto3" json:"empty_namespaces,omitempty"`
+ CgroupsMode string `protobuf:"bytes,7,opt,name=cgroups_mode,json=cgroupsMode,proto3" json:"cgroups_mode,omitempty"`
+ WorkPath string `protobuf:"bytes,8,opt,name=work_path,json=workPath,proto3" json:"work_path,omitempty"`
+ ImagePath string `protobuf:"bytes,9,opt,name=image_path,json=imagePath,proto3" json:"image_path,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *CheckpointOptions) Reset() { *m = CheckpointOptions{} }
-func (*CheckpointOptions) ProtoMessage() {}
-func (*CheckpointOptions) Descriptor() ([]byte, []int) { return fileDescriptorRunc, []int{2} }
+func (m *CheckpointOptions) Reset() { *m = CheckpointOptions{} }
+func (*CheckpointOptions) ProtoMessage() {}
+func (*CheckpointOptions) Descriptor() ([]byte, []int) {
+ return fileDescriptor_d20e2ba8b3cc58b9, []int{2}
+}
+func (m *CheckpointOptions) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *CheckpointOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_CheckpointOptions.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *CheckpointOptions) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_CheckpointOptions.Merge(m, src)
+}
+func (m *CheckpointOptions) XXX_Size() int {
+ return m.Size()
+}
+func (m *CheckpointOptions) XXX_DiscardUnknown() {
+ xxx_messageInfo_CheckpointOptions.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_CheckpointOptions proto.InternalMessageInfo
type ProcessDetails struct {
- ExecID string `protobuf:"bytes,1,opt,name=exec_id,json=execId,proto3" json:"exec_id,omitempty"`
+ ExecID string `protobuf:"bytes,1,opt,name=exec_id,json=execId,proto3" json:"exec_id,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *ProcessDetails) Reset() { *m = ProcessDetails{} }
-func (*ProcessDetails) ProtoMessage() {}
-func (*ProcessDetails) Descriptor() ([]byte, []int) { return fileDescriptorRunc, []int{3} }
+func (m *ProcessDetails) Reset() { *m = ProcessDetails{} }
+func (*ProcessDetails) ProtoMessage() {}
+func (*ProcessDetails) Descriptor() ([]byte, []int) {
+ return fileDescriptor_d20e2ba8b3cc58b9, []int{3}
+}
+func (m *ProcessDetails) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *ProcessDetails) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_ProcessDetails.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *ProcessDetails) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_ProcessDetails.Merge(m, src)
+}
+func (m *ProcessDetails) XXX_Size() int {
+ return m.Size()
+}
+func (m *ProcessDetails) XXX_DiscardUnknown() {
+ xxx_messageInfo_ProcessDetails.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_ProcessDetails proto.InternalMessageInfo
func init() {
proto.RegisterType((*RuncOptions)(nil), "containerd.linux.runc.RuncOptions")
@@ -98,6 +208,53 @@ func init() {
proto.RegisterType((*CheckpointOptions)(nil), "containerd.linux.runc.CheckpointOptions")
proto.RegisterType((*ProcessDetails)(nil), "containerd.linux.runc.ProcessDetails")
}
+
+func init() {
+ proto.RegisterFile("github.com/containerd/containerd/runtime/linux/runctypes/runc.proto", fileDescriptor_d20e2ba8b3cc58b9)
+}
+
+var fileDescriptor_d20e2ba8b3cc58b9 = []byte{
+ // 604 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x94, 0xcf, 0x6e, 0xd3, 0x40,
+ 0x10, 0xc6, 0xeb, 0xfe, 0x49, 0x9c, 0x49, 0xd2, 0xc2, 0x42, 0x25, 0xd3, 0xaa, 0x69, 0x08, 0x7f,
+ 0x14, 0x2e, 0xa9, 0x04, 0xe2, 0xc4, 0xad, 0x29, 0x42, 0x15, 0x50, 0x2a, 0x43, 0x05, 0x42, 0x48,
+ 0x2b, 0x77, 0x3d, 0x24, 0xab, 0xc4, 0x3b, 0x96, 0x77, 0x4d, 0x92, 0x1b, 0x4f, 0xc0, 0x0b, 0xf1,
+ 0x02, 0x3d, 0x21, 0x8e, 0x9c, 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RuncOptions) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
@@ -141,6 +298,9 @@ func (m *RuncOptions) MarshalTo(dAtA []byte) (int, error) {
}
i++
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -268,6 +428,9 @@ func (m *CreateOptions) MarshalTo(dAtA []byte) (int, error) {
i = encodeVarintRunc(dAtA, i, uint64(len(m.CriuImagePath)))
i += copy(dAtA[i:], m.CriuImagePath)
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -369,6 +532,9 @@ func (m *CheckpointOptions) MarshalTo(dAtA []byte) (int, error) {
i = encodeVarintRunc(dAtA, i, uint64(len(m.ImagePath)))
i += copy(dAtA[i:], m.ImagePath)
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -393,6 +559,9 @@ func (m *ProcessDetails) MarshalTo(dAtA []byte) (int, error) {
i = encodeVarintRunc(dAtA, i, uint64(len(m.ExecID)))
i += copy(dAtA[i:], m.ExecID)
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -406,6 +575,9 @@ func encodeVarintRunc(dAtA []byte, offset int, v uint64) int {
return offset + 1
}
func (m *RuncOptions) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.Runtime)
@@ -423,10 +595,16 @@ func (m *RuncOptions) Size() (n int) {
if m.SystemdCgroup {
n += 2
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *CreateOptions) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
if m.NoPivotRoot {
@@ -475,10 +653,16 @@ func (m *CreateOptions) Size() (n int) {
if l > 0 {
n += 1 + l + sovRunc(uint64(l))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *CheckpointOptions) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
if m.Exit {
@@ -514,16 +698,25 @@ func (m *CheckpointOptions) Size() (n int) {
if l > 0 {
n += 1 + l + sovRunc(uint64(l))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *ProcessDetails) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.ExecID)
if l > 0 {
n += 1 + l + sovRunc(uint64(l))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
@@ -549,6 +742,7 @@ func (this *RuncOptions) String() string {
`RuntimeRoot:` + fmt.Sprintf("%v", this.RuntimeRoot) + `,`,
`CriuPath:` + fmt.Sprintf("%v", this.CriuPath) + `,`,
`SystemdCgroup:` + fmt.Sprintf("%v", this.SystemdCgroup) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -571,6 +765,7 @@ func (this *CreateOptions) String() string {
`IoGid:` + fmt.Sprintf("%v", this.IoGid) + `,`,
`CriuWorkPath:` + fmt.Sprintf("%v", this.CriuWorkPath) + `,`,
`CriuImagePath:` + fmt.Sprintf("%v", this.CriuImagePath) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -589,6 +784,7 @@ func (this *CheckpointOptions) String() string {
`CgroupsMode:` + fmt.Sprintf("%v", this.CgroupsMode) + `,`,
`WorkPath:` + fmt.Sprintf("%v", this.WorkPath) + `,`,
`ImagePath:` + fmt.Sprintf("%v", this.ImagePath) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -599,6 +795,7 @@ func (this *ProcessDetails) String() string {
}
s := strings.Join([]string{`&ProcessDetails{`,
`ExecID:` + fmt.Sprintf("%v", this.ExecID) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -626,7 +823,7 @@ func (m *RuncOptions) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -654,7 +851,7 @@ func (m *RuncOptions) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -664,6 +861,9 @@ func (m *RuncOptions) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthRunc
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthRunc
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -683,7 +883,7 @@ func (m *RuncOptions) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -693,6 +893,9 @@ func (m *RuncOptions) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthRunc
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthRunc
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -712,7 +915,7 @@ func (m *RuncOptions) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -722,6 +925,9 @@ func (m *RuncOptions) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthRunc
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthRunc
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -741,7 +947,7 @@ func (m *RuncOptions) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- v |= (int(b) & 0x7F) << shift
+ v |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -756,9 +962,13 @@ func (m *RuncOptions) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthRunc
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthRunc
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -783,7 +993,7 @@ func (m *CreateOptions) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -811,7 +1021,7 @@ func (m *CreateOptions) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- v |= (int(b) & 0x7F) << shift
+ v |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -831,7 +1041,7 @@ func (m *CreateOptions) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- v |= (int(b) & 0x7F) << shift
+ v |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -851,7 +1061,7 @@ func (m *CreateOptions) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- v |= (int(b) & 0x7F) << shift
+ v |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -871,7 +1081,7 @@ func (m *CreateOptions) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- v |= (int(b) & 0x7F) << shift
+ v |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -891,7 +1101,7 @@ func (m *CreateOptions) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- v |= (int(b) & 0x7F) << shift
+ v |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -911,7 +1121,7 @@ func (m *CreateOptions) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -921,6 +1131,9 @@ func (m *CreateOptions) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthRunc
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthRunc
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -940,7 +1153,7 @@ func (m *CreateOptions) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -950,6 +1163,9 @@ func (m *CreateOptions) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthRunc
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthRunc
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -969,7 +1185,7 @@ func (m *CreateOptions) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- v |= (int(b) & 0x7F) << shift
+ v |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -989,7 +1205,7 @@ func (m *CreateOptions) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -999,6 +1215,9 @@ func (m *CreateOptions) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthRunc
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthRunc
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -1018,7 +1237,7 @@ func (m *CreateOptions) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- m.IoUid |= (uint32(b) & 0x7F) << shift
+ m.IoUid |= uint32(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1037,7 +1256,7 @@ func (m *CreateOptions) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- m.IoGid |= (uint32(b) & 0x7F) << shift
+ m.IoGid |= uint32(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1056,7 +1275,7 @@ func (m *CreateOptions) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1066,6 +1285,9 @@ func (m *CreateOptions) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthRunc
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthRunc
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -1085,7 +1307,7 @@ func (m *CreateOptions) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1095,6 +1317,9 @@ func (m *CreateOptions) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthRunc
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthRunc
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -1109,9 +1334,13 @@ func (m *CreateOptions) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthRunc
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthRunc
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -1136,7 +1365,7 @@ func (m *CheckpointOptions) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1164,7 +1393,7 @@ func (m *CheckpointOptions) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- v |= (int(b) & 0x7F) << shift
+ v |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1184,7 +1413,7 @@ func (m *CheckpointOptions) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- v |= (int(b) & 0x7F) << shift
+ v |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1204,7 +1433,7 @@ func (m *CheckpointOptions) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- v |= (int(b) & 0x7F) << shift
+ v |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1224,7 +1453,7 @@ func (m *CheckpointOptions) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- v |= (int(b) & 0x7F) << shift
+ v |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1244,7 +1473,7 @@ func (m *CheckpointOptions) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- v |= (int(b) & 0x7F) << shift
+ v |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1264,7 +1493,7 @@ func (m *CheckpointOptions) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1274,6 +1503,9 @@ func (m *CheckpointOptions) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthRunc
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthRunc
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -1293,7 +1525,7 @@ func (m *CheckpointOptions) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1303,6 +1535,9 @@ func (m *CheckpointOptions) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthRunc
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthRunc
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -1322,7 +1557,7 @@ func (m *CheckpointOptions) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1332,6 +1567,9 @@ func (m *CheckpointOptions) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthRunc
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthRunc
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -1351,7 +1589,7 @@ func (m *CheckpointOptions) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1361,6 +1599,9 @@ func (m *CheckpointOptions) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthRunc
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthRunc
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -1375,9 +1616,13 @@ func (m *CheckpointOptions) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthRunc
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthRunc
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -1402,7 +1647,7 @@ func (m *ProcessDetails) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1430,7 +1675,7 @@ func (m *ProcessDetails) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1440,6 +1685,9 @@ func (m *ProcessDetails) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthRunc
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthRunc
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -1454,9 +1702,13 @@ func (m *ProcessDetails) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthRunc
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthRunc
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -1520,10 +1772,13 @@ func skipRunc(dAtA []byte) (n int, err error) {
break
}
}
- iNdEx += length
if length < 0 {
return 0, ErrInvalidLengthRunc
}
+ iNdEx += length
+ if iNdEx < 0 {
+ return 0, ErrInvalidLengthRunc
+ }
return iNdEx, nil
case 3:
for {
@@ -1552,6 +1807,9 @@ func skipRunc(dAtA []byte) (n int, err error) {
return 0, err
}
iNdEx = start + next
+ if iNdEx < 0 {
+ return 0, ErrInvalidLengthRunc
+ }
}
return iNdEx, nil
case 4:
@@ -1570,49 +1828,3 @@ var (
ErrInvalidLengthRunc = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowRunc = fmt.Errorf("proto: integer overflow")
)
-
-func init() {
- proto.RegisterFile("github.com/containerd/containerd/runtime/linux/runctypes/runc.proto", fileDescriptorRunc)
-}
-
-var fileDescriptorRunc = []byte{
- // 604 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x94, 0xcf, 0x6e, 0xd3, 0x40,
- 0x10, 0xc6, 0xeb, 0xfe, 0x49, 0x9c, 0x49, 0xd2, 0xc2, 0x42, 0x25, 0xd3, 0xaa, 0x69, 0x08, 0x7f,
- 0x14, 0x2e, 0xa9, 0x04, 0xe2, 0xc4, 0xad, 0x29, 0x42, 0x15, 0x50, 0x2a, 0x43, 0x05, 0x42, 0x48,
- 0x2b, 0x77, 0x3d, 0x24, 0xab, 0xc4, 0x3b, 0x96, 0x77, 0x4d, 0x92, 0x1b, 0x4f, 0xc0, 0x0b, 0xf1,
- 0x02, 0x3d, 0x21, 0x8e, 0x9c, 0x10, 0xcd, 0x93, 0xa0, 0x5d, 0xc7, 0x69, 0xcf, 0x1c, 0xb9, 0xcd,
- 0xfc, 0xe6, 0xb3, 0x67, 0xf4, 0x7d, 0xb2, 0xa1, 0x3f, 0x90, 0x66, 0x98, 0x9f, 0xf7, 0x04, 0x25,
- 0x07, 0x82, 0x94, 0x89, 0xa4, 0xc2, 0x2c, 0xbe, 0x5e, 0x66, 0xb9, 0x32, 0x32, 0xc1, 0x83, 0xb1,
- 0x54, 0xf9, 0xd4, 0x76, 0xc2, 0xcc, 0x52, 0xd4, 0xae, 0xea, 0xa5, 0x19, 0x19, 0x62, 0xdb, 0x57,
- 0xf2, 0x9e, 0x93, 0xf5, 0xec, 0x70, 0xe7, 0xf6, 0x80, 0x06, 0xe4, 0x14, 0x07, 0xb6, 0x2a, 0xc4,
- 0x9d, 0x6f, 0x1e, 0xd4, 0xc3, 0x5c, 0x89, 0x37, 0xa9, 0x91, 0xa4, 0x34, 0x0b, 0xa0, 0xba, 0x58,
- 0x11, 0x78, 0x6d, 0xaf, 0x5b, 0x0b, 0xcb, 0x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x5c, 0xc6, 0xc5, 0x17, 0x7a, 0x08, 0xf3, 0xdf, 0xfb, 0x95, 0xe7, 0x53, 0x14, 0xc7,
- 0x47, 0x61, 0xc5, 0x8e, 0x8e, 0xe3, 0xc3, 0x4f, 0x17, 0x97, 0xad, 0x95, 0x5f, 0x97, 0xad, 0x95,
- 0xaf, 0xf3, 0x96, 0x77, 0x31, 0x6f, 0x79, 0x3f, 0xe7, 0x2d, 0xef, 0xcf, 0xbc, 0xe5, 0x7d, 0x3c,
- 0xfc, 0xd7, 0x5f, 0xcc, 0xb3, 0x65, 0xf5, 0x61, 0xe5, 0xbc, 0xe2, 0xfe, 0x1e, 0x4f, 0xfe, 0x06,
- 0x00, 0x00, 0xff, 0xff, 0x7f, 0x24, 0x6f, 0x2e, 0xb1, 0x04, 0x00, 0x00,
-}
diff --git a/runtime/v1/shim/v1/shim.pb.go b/runtime/v1/shim/v1/shim.pb.go
index 9bd2889ba..7cc57803c 100644
--- a/runtime/v1/shim/v1/shim.pb.go
+++ b/runtime/v1/shim/v1/shim.pb.go
@@ -1,58 +1,23 @@
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: github.com/containerd/containerd/runtime/v1/shim/v1/shim.proto
-/*
- Package shim is a generated protocol buffer package.
-
- It is generated from these files:
- github.com/containerd/containerd/runtime/v1/shim/v1/shim.proto
-
- It has these top-level messages:
- CreateTaskRequest
- CreateTaskResponse
- DeleteResponse
- DeleteProcessRequest
- ExecProcessRequest
- ExecProcessResponse
- ResizePtyRequest
- StateRequest
- StateResponse
- KillRequest
- CloseIORequest
- ListPidsRequest
- ListPidsResponse
- CheckpointTaskRequest
- ShimInfoResponse
- UpdateTaskRequest
- StartRequest
- StartResponse
- WaitRequest
- WaitResponse
-*/
package shim
-import proto "github.com/gogo/protobuf/proto"
-import fmt "fmt"
-import math "math"
-import google_protobuf "github.com/gogo/protobuf/types"
-import google_protobuf1 "github.com/gogo/protobuf/types"
-
-// skipping weak import gogoproto "github.com/gogo/protobuf/gogoproto"
-import _ "github.com/gogo/protobuf/types"
-import containerd_types "github.com/containerd/containerd/api/types"
-import containerd_v1_types "github.com/containerd/containerd/api/types/task"
-
-import time "time"
-
-import types "github.com/gogo/protobuf/types"
-
-import strings "strings"
-import reflect "reflect"
-
-import context "context"
-import ttrpc "github.com/containerd/ttrpc"
-
-import io "io"
+import (
+ context "context"
+ fmt "fmt"
+ types "github.com/containerd/containerd/api/types"
+ task "github.com/containerd/containerd/api/types/task"
+ github_com_containerd_ttrpc "github.com/containerd/ttrpc"
+ proto "github.com/gogo/protobuf/proto"
+ github_com_gogo_protobuf_types "github.com/gogo/protobuf/types"
+ types1 "github.com/gogo/protobuf/types"
+ io "io"
+ math "math"
+ reflect "reflect"
+ strings "strings"
+ time "time"
+)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
@@ -67,197 +32,817 @@ var _ = time.Kitchen
const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
type CreateTaskRequest struct {
- ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
- Bundle string `protobuf:"bytes,2,opt,name=bundle,proto3" json:"bundle,omitempty"`
- Runtime string `protobuf:"bytes,3,opt,name=runtime,proto3" json:"runtime,omitempty"`
- Rootfs []*containerd_types.Mount `protobuf:"bytes,4,rep,name=rootfs" json:"rootfs,omitempty"`
- Terminal bool `protobuf:"varint,5,opt,name=terminal,proto3" json:"terminal,omitempty"`
- Stdin string `protobuf:"bytes,6,opt,name=stdin,proto3" json:"stdin,omitempty"`
- Stdout string `protobuf:"bytes,7,opt,name=stdout,proto3" json:"stdout,omitempty"`
- Stderr string `protobuf:"bytes,8,opt,name=stderr,proto3" json:"stderr,omitempty"`
- Checkpoint string `protobuf:"bytes,9,opt,name=checkpoint,proto3" json:"checkpoint,omitempty"`
- ParentCheckpoint string `protobuf:"bytes,10,opt,name=parent_checkpoint,json=parentCheckpoint,proto3" json:"parent_checkpoint,omitempty"`
- Options *google_protobuf.Any `protobuf:"bytes,11,opt,name=options" json:"options,omitempty"`
+ ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ Bundle string `protobuf:"bytes,2,opt,name=bundle,proto3" json:"bundle,omitempty"`
+ Runtime string `protobuf:"bytes,3,opt,name=runtime,proto3" json:"runtime,omitempty"`
+ Rootfs []*types.Mount `protobuf:"bytes,4,rep,name=rootfs,proto3" json:"rootfs,omitempty"`
+ Terminal bool `protobuf:"varint,5,opt,name=terminal,proto3" json:"terminal,omitempty"`
+ Stdin string `protobuf:"bytes,6,opt,name=stdin,proto3" json:"stdin,omitempty"`
+ Stdout string `protobuf:"bytes,7,opt,name=stdout,proto3" json:"stdout,omitempty"`
+ Stderr string `protobuf:"bytes,8,opt,name=stderr,proto3" json:"stderr,omitempty"`
+ Checkpoint string `protobuf:"bytes,9,opt,name=checkpoint,proto3" json:"checkpoint,omitempty"`
+ ParentCheckpoint string `protobuf:"bytes,10,opt,name=parent_checkpoint,json=parentCheckpoint,proto3" json:"parent_checkpoint,omitempty"`
+ Options *types1.Any `protobuf:"bytes,11,opt,name=options,proto3" json:"options,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *CreateTaskRequest) Reset() { *m = CreateTaskRequest{} }
-func (*CreateTaskRequest) ProtoMessage() {}
-func (*CreateTaskRequest) Descriptor() ([]byte, []int) { return fileDescriptorShim, []int{0} }
+func (m *CreateTaskRequest) Reset() { *m = CreateTaskRequest{} }
+func (*CreateTaskRequest) ProtoMessage() {}
+func (*CreateTaskRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_be1b2ef30ea3b8ef, []int{0}
+}
+func (m *CreateTaskRequest) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *CreateTaskRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_CreateTaskRequest.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *CreateTaskRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_CreateTaskRequest.Merge(m, src)
+}
+func (m *CreateTaskRequest) XXX_Size() int {
+ return m.Size()
+}
+func (m *CreateTaskRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_CreateTaskRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_CreateTaskRequest proto.InternalMessageInfo
type CreateTaskResponse struct {
- Pid uint32 `protobuf:"varint,1,opt,name=pid,proto3" json:"pid,omitempty"`
+ Pid uint32 `protobuf:"varint,1,opt,name=pid,proto3" json:"pid,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *CreateTaskResponse) Reset() { *m = CreateTaskResponse{} }
-func (*CreateTaskResponse) ProtoMessage() {}
-func (*CreateTaskResponse) Descriptor() ([]byte, []int) { return fileDescriptorShim, []int{1} }
+func (m *CreateTaskResponse) Reset() { *m = CreateTaskResponse{} }
+func (*CreateTaskResponse) ProtoMessage() {}
+func (*CreateTaskResponse) Descriptor() ([]byte, []int) {
+ return fileDescriptor_be1b2ef30ea3b8ef, []int{1}
+}
+func (m *CreateTaskResponse) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *CreateTaskResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_CreateTaskResponse.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *CreateTaskResponse) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_CreateTaskResponse.Merge(m, src)
+}
+func (m *CreateTaskResponse) XXX_Size() int {
+ return m.Size()
+}
+func (m *CreateTaskResponse) XXX_DiscardUnknown() {
+ xxx_messageInfo_CreateTaskResponse.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_CreateTaskResponse proto.InternalMessageInfo
type DeleteResponse struct {
- Pid uint32 `protobuf:"varint,1,opt,name=pid,proto3" json:"pid,omitempty"`
- ExitStatus uint32 `protobuf:"varint,2,opt,name=exit_status,json=exitStatus,proto3" json:"exit_status,omitempty"`
- ExitedAt time.Time `protobuf:"bytes,3,opt,name=exited_at,json=exitedAt,stdtime" json:"exited_at"`
+ Pid uint32 `protobuf:"varint,1,opt,name=pid,proto3" json:"pid,omitempty"`
+ ExitStatus uint32 `protobuf:"varint,2,opt,name=exit_status,json=exitStatus,proto3" json:"exit_status,omitempty"`
+ ExitedAt time.Time `protobuf:"bytes,3,opt,name=exited_at,json=exitedAt,proto3,stdtime" json:"exited_at"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *DeleteResponse) Reset() { *m = DeleteResponse{} }
-func (*DeleteResponse) ProtoMessage() {}
-func (*DeleteResponse) Descriptor() ([]byte, []int) { return fileDescriptorShim, []int{2} }
+func (m *DeleteResponse) Reset() { *m = DeleteResponse{} }
+func (*DeleteResponse) ProtoMessage() {}
+func (*DeleteResponse) Descriptor() ([]byte, []int) {
+ return fileDescriptor_be1b2ef30ea3b8ef, []int{2}
+}
+func (m *DeleteResponse) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *DeleteResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_DeleteResponse.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *DeleteResponse) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_DeleteResponse.Merge(m, src)
+}
+func (m *DeleteResponse) XXX_Size() int {
+ return m.Size()
+}
+func (m *DeleteResponse) XXX_DiscardUnknown() {
+ xxx_messageInfo_DeleteResponse.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_DeleteResponse proto.InternalMessageInfo
type DeleteProcessRequest struct {
- ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *DeleteProcessRequest) Reset() { *m = DeleteProcessRequest{} }
-func (*DeleteProcessRequest) ProtoMessage() {}
-func (*DeleteProcessRequest) Descriptor() ([]byte, []int) { return fileDescriptorShim, []int{3} }
+func (m *DeleteProcessRequest) Reset() { *m = DeleteProcessRequest{} }
+func (*DeleteProcessRequest) ProtoMessage() {}
+func (*DeleteProcessRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_be1b2ef30ea3b8ef, []int{3}
+}
+func (m *DeleteProcessRequest) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *DeleteProcessRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_DeleteProcessRequest.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *DeleteProcessRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_DeleteProcessRequest.Merge(m, src)
+}
+func (m *DeleteProcessRequest) XXX_Size() int {
+ return m.Size()
+}
+func (m *DeleteProcessRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_DeleteProcessRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_DeleteProcessRequest proto.InternalMessageInfo
type ExecProcessRequest struct {
- ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
- Terminal bool `protobuf:"varint,2,opt,name=terminal,proto3" json:"terminal,omitempty"`
- Stdin string `protobuf:"bytes,3,opt,name=stdin,proto3" json:"stdin,omitempty"`
- Stdout string `protobuf:"bytes,4,opt,name=stdout,proto3" json:"stdout,omitempty"`
- Stderr string `protobuf:"bytes,5,opt,name=stderr,proto3" json:"stderr,omitempty"`
- Spec *google_protobuf.Any `protobuf:"bytes,6,opt,name=spec" json:"spec,omitempty"`
+ ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ Terminal bool `protobuf:"varint,2,opt,name=terminal,proto3" json:"terminal,omitempty"`
+ Stdin string `protobuf:"bytes,3,opt,name=stdin,proto3" json:"stdin,omitempty"`
+ Stdout string `protobuf:"bytes,4,opt,name=stdout,proto3" json:"stdout,omitempty"`
+ Stderr string `protobuf:"bytes,5,opt,name=stderr,proto3" json:"stderr,omitempty"`
+ Spec *types1.Any `protobuf:"bytes,6,opt,name=spec,proto3" json:"spec,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *ExecProcessRequest) Reset() { *m = ExecProcessRequest{} }
-func (*ExecProcessRequest) ProtoMessage() {}
-func (*ExecProcessRequest) Descriptor() ([]byte, []int) { return fileDescriptorShim, []int{4} }
+func (m *ExecProcessRequest) Reset() { *m = ExecProcessRequest{} }
+func (*ExecProcessRequest) ProtoMessage() {}
+func (*ExecProcessRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_be1b2ef30ea3b8ef, []int{4}
+}
+func (m *ExecProcessRequest) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *ExecProcessRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_ExecProcessRequest.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *ExecProcessRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_ExecProcessRequest.Merge(m, src)
+}
+func (m *ExecProcessRequest) XXX_Size() int {
+ return m.Size()
+}
+func (m *ExecProcessRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_ExecProcessRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_ExecProcessRequest proto.InternalMessageInfo
type ExecProcessResponse struct {
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *ExecProcessResponse) Reset() { *m = ExecProcessResponse{} }
-func (*ExecProcessResponse) ProtoMessage() {}
-func (*ExecProcessResponse) Descriptor() ([]byte, []int) { return fileDescriptorShim, []int{5} }
+func (m *ExecProcessResponse) Reset() { *m = ExecProcessResponse{} }
+func (*ExecProcessResponse) ProtoMessage() {}
+func (*ExecProcessResponse) Descriptor() ([]byte, []int) {
+ return fileDescriptor_be1b2ef30ea3b8ef, []int{5}
+}
+func (m *ExecProcessResponse) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *ExecProcessResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_ExecProcessResponse.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *ExecProcessResponse) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_ExecProcessResponse.Merge(m, src)
+}
+func (m *ExecProcessResponse) XXX_Size() int {
+ return m.Size()
+}
+func (m *ExecProcessResponse) XXX_DiscardUnknown() {
+ xxx_messageInfo_ExecProcessResponse.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_ExecProcessResponse proto.InternalMessageInfo
type ResizePtyRequest struct {
- ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
- Width uint32 `protobuf:"varint,2,opt,name=width,proto3" json:"width,omitempty"`
- Height uint32 `protobuf:"varint,3,opt,name=height,proto3" json:"height,omitempty"`
+ ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ Width uint32 `protobuf:"varint,2,opt,name=width,proto3" json:"width,omitempty"`
+ Height uint32 `protobuf:"varint,3,opt,name=height,proto3" json:"height,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *ResizePtyRequest) Reset() { *m = ResizePtyRequest{} }
-func (*ResizePtyRequest) ProtoMessage() {}
-func (*ResizePtyRequest) Descriptor() ([]byte, []int) { return fileDescriptorShim, []int{6} }
+func (m *ResizePtyRequest) Reset() { *m = ResizePtyRequest{} }
+func (*ResizePtyRequest) ProtoMessage() {}
+func (*ResizePtyRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_be1b2ef30ea3b8ef, []int{6}
+}
+func (m *ResizePtyRequest) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *ResizePtyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_ResizePtyRequest.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *ResizePtyRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_ResizePtyRequest.Merge(m, src)
+}
+func (m *ResizePtyRequest) XXX_Size() int {
+ return m.Size()
+}
+func (m *ResizePtyRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_ResizePtyRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_ResizePtyRequest proto.InternalMessageInfo
type StateRequest struct {
- ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *StateRequest) Reset() { *m = StateRequest{} }
-func (*StateRequest) ProtoMessage() {}
-func (*StateRequest) Descriptor() ([]byte, []int) { return fileDescriptorShim, []int{7} }
+func (m *StateRequest) Reset() { *m = StateRequest{} }
+func (*StateRequest) ProtoMessage() {}
+func (*StateRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_be1b2ef30ea3b8ef, []int{7}
+}
+func (m *StateRequest) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *StateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_StateRequest.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *StateRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_StateRequest.Merge(m, src)
+}
+func (m *StateRequest) XXX_Size() int {
+ return m.Size()
+}
+func (m *StateRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_StateRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_StateRequest proto.InternalMessageInfo
type StateResponse struct {
- ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
- Bundle string `protobuf:"bytes,2,opt,name=bundle,proto3" json:"bundle,omitempty"`
- Pid uint32 `protobuf:"varint,3,opt,name=pid,proto3" json:"pid,omitempty"`
- Status containerd_v1_types.Status `protobuf:"varint,4,opt,name=status,proto3,enum=containerd.v1.types.Status" json:"status,omitempty"`
- Stdin string `protobuf:"bytes,5,opt,name=stdin,proto3" json:"stdin,omitempty"`
- Stdout string `protobuf:"bytes,6,opt,name=stdout,proto3" json:"stdout,omitempty"`
- Stderr string `protobuf:"bytes,7,opt,name=stderr,proto3" json:"stderr,omitempty"`
- Terminal bool `protobuf:"varint,8,opt,name=terminal,proto3" json:"terminal,omitempty"`
- ExitStatus uint32 `protobuf:"varint,9,opt,name=exit_status,json=exitStatus,proto3" json:"exit_status,omitempty"`
- ExitedAt time.Time `protobuf:"bytes,10,opt,name=exited_at,json=exitedAt,stdtime" json:"exited_at"`
+ ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ Bundle string `protobuf:"bytes,2,opt,name=bundle,proto3" json:"bundle,omitempty"`
+ Pid uint32 `protobuf:"varint,3,opt,name=pid,proto3" json:"pid,omitempty"`
+ Status task.Status `protobuf:"varint,4,opt,name=status,proto3,enum=containerd.v1.types.Status" json:"status,omitempty"`
+ Stdin string `protobuf:"bytes,5,opt,name=stdin,proto3" json:"stdin,omitempty"`
+ Stdout string `protobuf:"bytes,6,opt,name=stdout,proto3" json:"stdout,omitempty"`
+ Stderr string `protobuf:"bytes,7,opt,name=stderr,proto3" json:"stderr,omitempty"`
+ Terminal bool `protobuf:"varint,8,opt,name=terminal,proto3" json:"terminal,omitempty"`
+ ExitStatus uint32 `protobuf:"varint,9,opt,name=exit_status,json=exitStatus,proto3" json:"exit_status,omitempty"`
+ ExitedAt time.Time `protobuf:"bytes,10,opt,name=exited_at,json=exitedAt,proto3,stdtime" json:"exited_at"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *StateResponse) Reset() { *m = StateResponse{} }
-func (*StateResponse) ProtoMessage() {}
-func (*StateResponse) Descriptor() ([]byte, []int) { return fileDescriptorShim, []int{8} }
+func (m *StateResponse) Reset() { *m = StateResponse{} }
+func (*StateResponse) ProtoMessage() {}
+func (*StateResponse) Descriptor() ([]byte, []int) {
+ return fileDescriptor_be1b2ef30ea3b8ef, []int{8}
+}
+func (m *StateResponse) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *StateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_StateResponse.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *StateResponse) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_StateResponse.Merge(m, src)
+}
+func (m *StateResponse) XXX_Size() int {
+ return m.Size()
+}
+func (m *StateResponse) XXX_DiscardUnknown() {
+ xxx_messageInfo_StateResponse.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_StateResponse proto.InternalMessageInfo
type KillRequest struct {
- ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
- Signal uint32 `protobuf:"varint,2,opt,name=signal,proto3" json:"signal,omitempty"`
- All bool `protobuf:"varint,3,opt,name=all,proto3" json:"all,omitempty"`
+ ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ Signal uint32 `protobuf:"varint,2,opt,name=signal,proto3" json:"signal,omitempty"`
+ All bool `protobuf:"varint,3,opt,name=all,proto3" json:"all,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *KillRequest) Reset() { *m = KillRequest{} }
-func (*KillRequest) ProtoMessage() {}
-func (*KillRequest) Descriptor() ([]byte, []int) { return fileDescriptorShim, []int{9} }
+func (m *KillRequest) Reset() { *m = KillRequest{} }
+func (*KillRequest) ProtoMessage() {}
+func (*KillRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_be1b2ef30ea3b8ef, []int{9}
+}
+func (m *KillRequest) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *KillRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_KillRequest.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *KillRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_KillRequest.Merge(m, src)
+}
+func (m *KillRequest) XXX_Size() int {
+ return m.Size()
+}
+func (m *KillRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_KillRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_KillRequest proto.InternalMessageInfo
type CloseIORequest struct {
- ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
- Stdin bool `protobuf:"varint,2,opt,name=stdin,proto3" json:"stdin,omitempty"`
+ ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ Stdin bool `protobuf:"varint,2,opt,name=stdin,proto3" json:"stdin,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *CloseIORequest) Reset() { *m = CloseIORequest{} }
-func (*CloseIORequest) ProtoMessage() {}
-func (*CloseIORequest) Descriptor() ([]byte, []int) { return fileDescriptorShim, []int{10} }
+func (m *CloseIORequest) Reset() { *m = CloseIORequest{} }
+func (*CloseIORequest) ProtoMessage() {}
+func (*CloseIORequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_be1b2ef30ea3b8ef, []int{10}
+}
+func (m *CloseIORequest) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *CloseIORequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_CloseIORequest.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *CloseIORequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_CloseIORequest.Merge(m, src)
+}
+func (m *CloseIORequest) XXX_Size() int {
+ return m.Size()
+}
+func (m *CloseIORequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_CloseIORequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_CloseIORequest proto.InternalMessageInfo
type ListPidsRequest struct {
- ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *ListPidsRequest) Reset() { *m = ListPidsRequest{} }
-func (*ListPidsRequest) ProtoMessage() {}
-func (*ListPidsRequest) Descriptor() ([]byte, []int) { return fileDescriptorShim, []int{11} }
+func (m *ListPidsRequest) Reset() { *m = ListPidsRequest{} }
+func (*ListPidsRequest) ProtoMessage() {}
+func (*ListPidsRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_be1b2ef30ea3b8ef, []int{11}
+}
+func (m *ListPidsRequest) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *ListPidsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_ListPidsRequest.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *ListPidsRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_ListPidsRequest.Merge(m, src)
+}
+func (m *ListPidsRequest) XXX_Size() int {
+ return m.Size()
+}
+func (m *ListPidsRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_ListPidsRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_ListPidsRequest proto.InternalMessageInfo
type ListPidsResponse struct {
- Processes []*containerd_v1_types.ProcessInfo `protobuf:"bytes,1,rep,name=processes" json:"processes,omitempty"`
+ Processes []*task.ProcessInfo `protobuf:"bytes,1,rep,name=processes,proto3" json:"processes,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *ListPidsResponse) Reset() { *m = ListPidsResponse{} }
-func (*ListPidsResponse) ProtoMessage() {}
-func (*ListPidsResponse) Descriptor() ([]byte, []int) { return fileDescriptorShim, []int{12} }
+func (m *ListPidsResponse) Reset() { *m = ListPidsResponse{} }
+func (*ListPidsResponse) ProtoMessage() {}
+func (*ListPidsResponse) Descriptor() ([]byte, []int) {
+ return fileDescriptor_be1b2ef30ea3b8ef, []int{12}
+}
+func (m *ListPidsResponse) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *ListPidsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_ListPidsResponse.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *ListPidsResponse) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_ListPidsResponse.Merge(m, src)
+}
+func (m *ListPidsResponse) XXX_Size() int {
+ return m.Size()
+}
+func (m *ListPidsResponse) XXX_DiscardUnknown() {
+ xxx_messageInfo_ListPidsResponse.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_ListPidsResponse proto.InternalMessageInfo
type CheckpointTaskRequest struct {
- Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
- Options *google_protobuf.Any `protobuf:"bytes,2,opt,name=options" json:"options,omitempty"`
+ Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
+ Options *types1.Any `protobuf:"bytes,2,opt,name=options,proto3" json:"options,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *CheckpointTaskRequest) Reset() { *m = CheckpointTaskRequest{} }
-func (*CheckpointTaskRequest) ProtoMessage() {}
-func (*CheckpointTaskRequest) Descriptor() ([]byte, []int) { return fileDescriptorShim, []int{13} }
+func (m *CheckpointTaskRequest) Reset() { *m = CheckpointTaskRequest{} }
+func (*CheckpointTaskRequest) ProtoMessage() {}
+func (*CheckpointTaskRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_be1b2ef30ea3b8ef, []int{13}
+}
+func (m *CheckpointTaskRequest) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *CheckpointTaskRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_CheckpointTaskRequest.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *CheckpointTaskRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_CheckpointTaskRequest.Merge(m, src)
+}
+func (m *CheckpointTaskRequest) XXX_Size() int {
+ return m.Size()
+}
+func (m *CheckpointTaskRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_CheckpointTaskRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_CheckpointTaskRequest proto.InternalMessageInfo
type ShimInfoResponse struct {
- ShimPid uint32 `protobuf:"varint,1,opt,name=shim_pid,json=shimPid,proto3" json:"shim_pid,omitempty"`
+ ShimPid uint32 `protobuf:"varint,1,opt,name=shim_pid,json=shimPid,proto3" json:"shim_pid,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *ShimInfoResponse) Reset() { *m = ShimInfoResponse{} }
-func (*ShimInfoResponse) ProtoMessage() {}
-func (*ShimInfoResponse) Descriptor() ([]byte, []int) { return fileDescriptorShim, []int{14} }
+func (m *ShimInfoResponse) Reset() { *m = ShimInfoResponse{} }
+func (*ShimInfoResponse) ProtoMessage() {}
+func (*ShimInfoResponse) Descriptor() ([]byte, []int) {
+ return fileDescriptor_be1b2ef30ea3b8ef, []int{14}
+}
+func (m *ShimInfoResponse) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *ShimInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_ShimInfoResponse.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *ShimInfoResponse) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_ShimInfoResponse.Merge(m, src)
+}
+func (m *ShimInfoResponse) XXX_Size() int {
+ return m.Size()
+}
+func (m *ShimInfoResponse) XXX_DiscardUnknown() {
+ xxx_messageInfo_ShimInfoResponse.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_ShimInfoResponse proto.InternalMessageInfo
type UpdateTaskRequest struct {
- Resources *google_protobuf.Any `protobuf:"bytes,1,opt,name=resources" json:"resources,omitempty"`
+ Resources *types1.Any `protobuf:"bytes,1,opt,name=resources,proto3" json:"resources,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *UpdateTaskRequest) Reset() { *m = UpdateTaskRequest{} }
-func (*UpdateTaskRequest) ProtoMessage() {}
-func (*UpdateTaskRequest) Descriptor() ([]byte, []int) { return fileDescriptorShim, []int{15} }
+func (m *UpdateTaskRequest) Reset() { *m = UpdateTaskRequest{} }
+func (*UpdateTaskRequest) ProtoMessage() {}
+func (*UpdateTaskRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_be1b2ef30ea3b8ef, []int{15}
+}
+func (m *UpdateTaskRequest) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *UpdateTaskRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_UpdateTaskRequest.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *UpdateTaskRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_UpdateTaskRequest.Merge(m, src)
+}
+func (m *UpdateTaskRequest) XXX_Size() int {
+ return m.Size()
+}
+func (m *UpdateTaskRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_UpdateTaskRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_UpdateTaskRequest proto.InternalMessageInfo
type StartRequest struct {
- ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *StartRequest) Reset() { *m = StartRequest{} }
-func (*StartRequest) ProtoMessage() {}
-func (*StartRequest) Descriptor() ([]byte, []int) { return fileDescriptorShim, []int{16} }
+func (m *StartRequest) Reset() { *m = StartRequest{} }
+func (*StartRequest) ProtoMessage() {}
+func (*StartRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_be1b2ef30ea3b8ef, []int{16}
+}
+func (m *StartRequest) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *StartRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_StartRequest.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *StartRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_StartRequest.Merge(m, src)
+}
+func (m *StartRequest) XXX_Size() int {
+ return m.Size()
+}
+func (m *StartRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_StartRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_StartRequest proto.InternalMessageInfo
type StartResponse struct {
- ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
- Pid uint32 `protobuf:"varint,2,opt,name=pid,proto3" json:"pid,omitempty"`
+ ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ Pid uint32 `protobuf:"varint,2,opt,name=pid,proto3" json:"pid,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *StartResponse) Reset() { *m = StartResponse{} }
-func (*StartResponse) ProtoMessage() {}
-func (*StartResponse) Descriptor() ([]byte, []int) { return fileDescriptorShim, []int{17} }
+func (m *StartResponse) Reset() { *m = StartResponse{} }
+func (*StartResponse) ProtoMessage() {}
+func (*StartResponse) Descriptor() ([]byte, []int) {
+ return fileDescriptor_be1b2ef30ea3b8ef, []int{17}
+}
+func (m *StartResponse) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *StartResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_StartResponse.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *StartResponse) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_StartResponse.Merge(m, src)
+}
+func (m *StartResponse) XXX_Size() int {
+ return m.Size()
+}
+func (m *StartResponse) XXX_DiscardUnknown() {
+ xxx_messageInfo_StartResponse.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_StartResponse proto.InternalMessageInfo
type WaitRequest struct {
- ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *WaitRequest) Reset() { *m = WaitRequest{} }
-func (*WaitRequest) ProtoMessage() {}
-func (*WaitRequest) Descriptor() ([]byte, []int) { return fileDescriptorShim, []int{18} }
+func (m *WaitRequest) Reset() { *m = WaitRequest{} }
+func (*WaitRequest) ProtoMessage() {}
+func (*WaitRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_be1b2ef30ea3b8ef, []int{18}
+}
+func (m *WaitRequest) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *WaitRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_WaitRequest.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *WaitRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_WaitRequest.Merge(m, src)
+}
+func (m *WaitRequest) XXX_Size() int {
+ return m.Size()
+}
+func (m *WaitRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_WaitRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_WaitRequest proto.InternalMessageInfo
type WaitResponse struct {
- ExitStatus uint32 `protobuf:"varint,1,opt,name=exit_status,json=exitStatus,proto3" json:"exit_status,omitempty"`
- ExitedAt time.Time `protobuf:"bytes,2,opt,name=exited_at,json=exitedAt,stdtime" json:"exited_at"`
+ ExitStatus uint32 `protobuf:"varint,1,opt,name=exit_status,json=exitStatus,proto3" json:"exit_status,omitempty"`
+ ExitedAt time.Time `protobuf:"bytes,2,opt,name=exited_at,json=exitedAt,proto3,stdtime" json:"exited_at"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *WaitResponse) Reset() { *m = WaitResponse{} }
-func (*WaitResponse) ProtoMessage() {}
-func (*WaitResponse) Descriptor() ([]byte, []int) { return fileDescriptorShim, []int{19} }
+func (m *WaitResponse) Reset() { *m = WaitResponse{} }
+func (*WaitResponse) ProtoMessage() {}
+func (*WaitResponse) Descriptor() ([]byte, []int) {
+ return fileDescriptor_be1b2ef30ea3b8ef, []int{19}
+}
+func (m *WaitResponse) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *WaitResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_WaitResponse.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *WaitResponse) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_WaitResponse.Merge(m, src)
+}
+func (m *WaitResponse) XXX_Size() int {
+ return m.Size()
+}
+func (m *WaitResponse) XXX_DiscardUnknown() {
+ xxx_messageInfo_WaitResponse.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_WaitResponse proto.InternalMessageInfo
func init() {
proto.RegisterType((*CreateTaskRequest)(nil), "containerd.runtime.linux.shim.v1.CreateTaskRequest")
@@ -281,6 +866,86 @@ func init() {
proto.RegisterType((*WaitRequest)(nil), "containerd.runtime.linux.shim.v1.WaitRequest")
proto.RegisterType((*WaitResponse)(nil), "containerd.runtime.linux.shim.v1.WaitResponse")
}
+
+func init() {
+ proto.RegisterFile("github.com/containerd/containerd/runtime/v1/shim/v1/shim.proto", fileDescriptor_be1b2ef30ea3b8ef)
+}
+
+var fileDescriptor_be1b2ef30ea3b8ef = []byte{
+ // 1133 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x57, 0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de, 0x37, 0xe7, 0xfe, 0x7e, 0xdf, 0x9c,
+ 0xfb, 0xed, 0xb2, 0x69, 0x5c, 0x5c, 0x36, 0x8d, 0xbf, 0x2e, 0x9b, 0xc6, 0xbf, 0x97, 0x4d, 0xe3,
+ 0xc7, 0x27, 0xb7, 0xf8, 0x27, 0xf8, 0x1b, 0xf1, 0xfb, 0xda, 0x3c, 0x2a, 0xc9, 0xc3, 0x6c, 0xfc,
+ 0x1f, 0x00, 0x00, 0xff, 0xff, 0x64, 0x52, 0x86, 0xc0, 0x49, 0x0f, 0x00, 0x00,
+}
+
func (m *CreateTaskRequest) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
@@ -376,6 +1041,9 @@ func (m *CreateTaskRequest) MarshalTo(dAtA []byte) (int, error) {
}
i += n1
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -399,6 +1067,9 @@ func (m *CreateTaskResponse) MarshalTo(dAtA []byte) (int, error) {
i++
i = encodeVarintShim(dAtA, i, uint64(m.Pid))
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -429,12 +1100,15 @@ func (m *DeleteResponse) MarshalTo(dAtA []byte) (int, error) {
}
dAtA[i] = 0x1a
i++
- i = encodeVarintShim(dAtA, i, uint64(types.SizeOfStdTime(m.ExitedAt)))
- n2, err := types.StdTimeMarshalTo(m.ExitedAt, dAtA[i:])
+ i = encodeVarintShim(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.ExitedAt)))
+ n2, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.ExitedAt, dAtA[i:])
if err != nil {
return 0, err
}
i += n2
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -459,6 +1133,9 @@ func (m *DeleteProcessRequest) MarshalTo(dAtA []byte) (int, error) {
i = encodeVarintShim(dAtA, i, uint64(len(m.ID)))
i += copy(dAtA[i:], m.ID)
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -521,6 +1198,9 @@ func (m *ExecProcessRequest) MarshalTo(dAtA []byte) (int, error) {
}
i += n3
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -539,6 +1219,9 @@ func (m *ExecProcessResponse) MarshalTo(dAtA []byte) (int, error) {
_ = i
var l int
_ = l
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -573,6 +1256,9 @@ func (m *ResizePtyRequest) MarshalTo(dAtA []byte) (int, error) {
i++
i = encodeVarintShim(dAtA, i, uint64(m.Height))
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -597,6 +1283,9 @@ func (m *StateRequest) MarshalTo(dAtA []byte) (int, error) {
i = encodeVarintShim(dAtA, i, uint64(len(m.ID)))
i += copy(dAtA[i:], m.ID)
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -672,12 +1361,15 @@ func (m *StateResponse) MarshalTo(dAtA []byte) (int, error) {
}
dAtA[i] = 0x52
i++
- i = encodeVarintShim(dAtA, i, uint64(types.SizeOfStdTime(m.ExitedAt)))
- n4, err := types.StdTimeMarshalTo(m.ExitedAt, dAtA[i:])
+ i = encodeVarintShim(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.ExitedAt)))
+ n4, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.ExitedAt, dAtA[i:])
if err != nil {
return 0, err
}
i += n4
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -717,6 +1409,9 @@ func (m *KillRequest) MarshalTo(dAtA []byte) (int, error) {
}
i++
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -751,6 +1446,9 @@ func (m *CloseIORequest) MarshalTo(dAtA []byte) (int, error) {
}
i++
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -775,6 +1473,9 @@ func (m *ListPidsRequest) MarshalTo(dAtA []byte) (int, error) {
i = encodeVarintShim(dAtA, i, uint64(len(m.ID)))
i += copy(dAtA[i:], m.ID)
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -805,6 +1506,9 @@ func (m *ListPidsResponse) MarshalTo(dAtA []byte) (int, error) {
i += n
}
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -839,6 +1543,9 @@ func (m *CheckpointTaskRequest) MarshalTo(dAtA []byte) (int, error) {
}
i += n5
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -862,6 +1569,9 @@ func (m *ShimInfoResponse) MarshalTo(dAtA []byte) (int, error) {
i++
i = encodeVarintShim(dAtA, i, uint64(m.ShimPid))
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -890,6 +1600,9 @@ func (m *UpdateTaskRequest) MarshalTo(dAtA []byte) (int, error) {
}
i += n6
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -914,6 +1627,9 @@ func (m *StartRequest) MarshalTo(dAtA []byte) (int, error) {
i = encodeVarintShim(dAtA, i, uint64(len(m.ID)))
i += copy(dAtA[i:], m.ID)
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -943,6 +1659,9 @@ func (m *StartResponse) MarshalTo(dAtA []byte) (int, error) {
i++
i = encodeVarintShim(dAtA, i, uint64(m.Pid))
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -967,6 +1686,9 @@ func (m *WaitRequest) MarshalTo(dAtA []byte) (int, error) {
i = encodeVarintShim(dAtA, i, uint64(len(m.ID)))
i += copy(dAtA[i:], m.ID)
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -992,12 +1714,15 @@ func (m *WaitResponse) MarshalTo(dAtA []byte) (int, error) {
}
dAtA[i] = 0x12
i++
- i = encodeVarintShim(dAtA, i, uint64(types.SizeOfStdTime(m.ExitedAt)))
- n7, err := types.StdTimeMarshalTo(m.ExitedAt, dAtA[i:])
+ i = encodeVarintShim(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.ExitedAt)))
+ n7, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.ExitedAt, dAtA[i:])
if err != nil {
return 0, err
}
i += n7
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -1011,6 +1736,9 @@ func encodeVarintShim(dAtA []byte, offset int, v uint64) int {
return offset + 1
}
func (m *CreateTaskRequest) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.ID)
@@ -1058,19 +1786,31 @@ func (m *CreateTaskRequest) Size() (n int) {
l = m.Options.Size()
n += 1 + l + sovShim(uint64(l))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *CreateTaskResponse) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
if m.Pid != 0 {
n += 1 + sovShim(uint64(m.Pid))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *DeleteResponse) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
if m.Pid != 0 {
@@ -1079,22 +1819,34 @@ func (m *DeleteResponse) Size() (n int) {
if m.ExitStatus != 0 {
n += 1 + sovShim(uint64(m.ExitStatus))
}
- l = types.SizeOfStdTime(m.ExitedAt)
+ l = github_com_gogo_protobuf_types.SizeOfStdTime(m.ExitedAt)
n += 1 + l + sovShim(uint64(l))
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *DeleteProcessRequest) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.ID)
if l > 0 {
n += 1 + l + sovShim(uint64(l))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *ExecProcessRequest) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.ID)
@@ -1120,16 +1872,28 @@ func (m *ExecProcessRequest) Size() (n int) {
l = m.Spec.Size()
n += 1 + l + sovShim(uint64(l))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *ExecProcessResponse) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *ResizePtyRequest) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.ID)
@@ -1142,20 +1906,32 @@ func (m *ResizePtyRequest) Size() (n int) {
if m.Height != 0 {
n += 1 + sovShim(uint64(m.Height))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *StateRequest) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.ID)
if l > 0 {
n += 1 + l + sovShim(uint64(l))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *StateResponse) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.ID)
@@ -1190,12 +1966,18 @@ func (m *StateResponse) Size() (n int) {
if m.ExitStatus != 0 {
n += 1 + sovShim(uint64(m.ExitStatus))
}
- l = types.SizeOfStdTime(m.ExitedAt)
+ l = github_com_gogo_protobuf_types.SizeOfStdTime(m.ExitedAt)
n += 1 + l + sovShim(uint64(l))
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *KillRequest) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.ID)
@@ -1208,10 +1990,16 @@ func (m *KillRequest) Size() (n int) {
if m.All {
n += 2
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *CloseIORequest) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.ID)
@@ -1221,20 +2009,32 @@ func (m *CloseIORequest) Size() (n int) {
if m.Stdin {
n += 2
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *ListPidsRequest) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.ID)
if l > 0 {
n += 1 + l + sovShim(uint64(l))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *ListPidsResponse) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
if len(m.Processes) > 0 {
@@ -1243,10 +2043,16 @@ func (m *ListPidsResponse) Size() (n int) {
n += 1 + l + sovShim(uint64(l))
}
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *CheckpointTaskRequest) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.Path)
@@ -1257,39 +2063,63 @@ func (m *CheckpointTaskRequest) Size() (n int) {
l = m.Options.Size()
n += 1 + l + sovShim(uint64(l))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *ShimInfoResponse) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
if m.ShimPid != 0 {
n += 1 + sovShim(uint64(m.ShimPid))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *UpdateTaskRequest) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
if m.Resources != nil {
l = m.Resources.Size()
n += 1 + l + sovShim(uint64(l))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *StartRequest) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.ID)
if l > 0 {
n += 1 + l + sovShim(uint64(l))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *StartResponse) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.ID)
@@ -1299,27 +2129,42 @@ func (m *StartResponse) Size() (n int) {
if m.Pid != 0 {
n += 1 + sovShim(uint64(m.Pid))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *WaitRequest) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.ID)
if l > 0 {
n += 1 + l + sovShim(uint64(l))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *WaitResponse) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
if m.ExitStatus != 0 {
n += 1 + sovShim(uint64(m.ExitStatus))
}
- l = types.SizeOfStdTime(m.ExitedAt)
+ l = github_com_gogo_protobuf_types.SizeOfStdTime(m.ExitedAt)
n += 1 + l + sovShim(uint64(l))
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
@@ -1344,14 +2189,15 @@ func (this *CreateTaskRequest) String() string {
`ID:` + fmt.Sprintf("%v", this.ID) + `,`,
`Bundle:` + fmt.Sprintf("%v", this.Bundle) + `,`,
`Runtime:` + fmt.Sprintf("%v", this.Runtime) + `,`,
- `Rootfs:` + strings.Replace(fmt.Sprintf("%v", this.Rootfs), "Mount", "containerd_types.Mount", 1) + `,`,
+ `Rootfs:` + strings.Replace(fmt.Sprintf("%v", this.Rootfs), "Mount", "types.Mount", 1) + `,`,
`Terminal:` + fmt.Sprintf("%v", this.Terminal) + `,`,
`Stdin:` + fmt.Sprintf("%v", this.Stdin) + `,`,
`Stdout:` + fmt.Sprintf("%v", this.Stdout) + `,`,
`Stderr:` + fmt.Sprintf("%v", this.Stderr) + `,`,
`Checkpoint:` + fmt.Sprintf("%v", this.Checkpoint) + `,`,
`ParentCheckpoint:` + fmt.Sprintf("%v", this.ParentCheckpoint) + `,`,
- `Options:` + strings.Replace(fmt.Sprintf("%v", this.Options), "Any", "google_protobuf.Any", 1) + `,`,
+ `Options:` + strings.Replace(fmt.Sprintf("%v", this.Options), "Any", "types1.Any", 1) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -1362,6 +2208,7 @@ func (this *CreateTaskResponse) String() string {
}
s := strings.Join([]string{`&CreateTaskResponse{`,
`Pid:` + fmt.Sprintf("%v", this.Pid) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -1373,7 +2220,8 @@ func (this *DeleteResponse) String() string {
s := strings.Join([]string{`&DeleteResponse{`,
`Pid:` + fmt.Sprintf("%v", this.Pid) + `,`,
`ExitStatus:` + fmt.Sprintf("%v", this.ExitStatus) + `,`,
- `ExitedAt:` + strings.Replace(strings.Replace(this.ExitedAt.String(), "Timestamp", "google_protobuf3.Timestamp", 1), `&`, ``, 1) + `,`,
+ `ExitedAt:` + strings.Replace(strings.Replace(this.ExitedAt.String(), "Timestamp", "types1.Timestamp", 1), `&`, ``, 1) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -1384,6 +2232,7 @@ func (this *DeleteProcessRequest) String() string {
}
s := strings.Join([]string{`&DeleteProcessRequest{`,
`ID:` + fmt.Sprintf("%v", this.ID) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -1398,7 +2247,8 @@ func (this *ExecProcessRequest) String() string {
`Stdin:` + fmt.Sprintf("%v", this.Stdin) + `,`,
`Stdout:` + fmt.Sprintf("%v", this.Stdout) + `,`,
`Stderr:` + fmt.Sprintf("%v", this.Stderr) + `,`,
- `Spec:` + strings.Replace(fmt.Sprintf("%v", this.Spec), "Any", "google_protobuf.Any", 1) + `,`,
+ `Spec:` + strings.Replace(fmt.Sprintf("%v", this.Spec), "Any", "types1.Any", 1) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -1408,6 +2258,7 @@ func (this *ExecProcessResponse) String() string {
return "nil"
}
s := strings.Join([]string{`&ExecProcessResponse{`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -1420,6 +2271,7 @@ func (this *ResizePtyRequest) String() string {
`ID:` + fmt.Sprintf("%v", this.ID) + `,`,
`Width:` + fmt.Sprintf("%v", this.Width) + `,`,
`Height:` + fmt.Sprintf("%v", this.Height) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -1430,6 +2282,7 @@ func (this *StateRequest) String() string {
}
s := strings.Join([]string{`&StateRequest{`,
`ID:` + fmt.Sprintf("%v", this.ID) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -1448,7 +2301,8 @@ func (this *StateResponse) String() string {
`Stderr:` + fmt.Sprintf("%v", this.Stderr) + `,`,
`Terminal:` + fmt.Sprintf("%v", this.Terminal) + `,`,
`ExitStatus:` + fmt.Sprintf("%v", this.ExitStatus) + `,`,
- `ExitedAt:` + strings.Replace(strings.Replace(this.ExitedAt.String(), "Timestamp", "google_protobuf3.Timestamp", 1), `&`, ``, 1) + `,`,
+ `ExitedAt:` + strings.Replace(strings.Replace(this.ExitedAt.String(), "Timestamp", "types1.Timestamp", 1), `&`, ``, 1) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -1461,6 +2315,7 @@ func (this *KillRequest) String() string {
`ID:` + fmt.Sprintf("%v", this.ID) + `,`,
`Signal:` + fmt.Sprintf("%v", this.Signal) + `,`,
`All:` + fmt.Sprintf("%v", this.All) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -1472,6 +2327,7 @@ func (this *CloseIORequest) String() string {
s := strings.Join([]string{`&CloseIORequest{`,
`ID:` + fmt.Sprintf("%v", this.ID) + `,`,
`Stdin:` + fmt.Sprintf("%v", this.Stdin) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -1482,6 +2338,7 @@ func (this *ListPidsRequest) String() string {
}
s := strings.Join([]string{`&ListPidsRequest{`,
`ID:` + fmt.Sprintf("%v", this.ID) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -1491,7 +2348,8 @@ func (this *ListPidsResponse) String() string {
return "nil"
}
s := strings.Join([]string{`&ListPidsResponse{`,
- `Processes:` + strings.Replace(fmt.Sprintf("%v", this.Processes), "ProcessInfo", "containerd_v1_types.ProcessInfo", 1) + `,`,
+ `Processes:` + strings.Replace(fmt.Sprintf("%v", this.Processes), "ProcessInfo", "task.ProcessInfo", 1) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -1502,7 +2360,8 @@ func (this *CheckpointTaskRequest) String() string {
}
s := strings.Join([]string{`&CheckpointTaskRequest{`,
`Path:` + fmt.Sprintf("%v", this.Path) + `,`,
- `Options:` + strings.Replace(fmt.Sprintf("%v", this.Options), "Any", "google_protobuf.Any", 1) + `,`,
+ `Options:` + strings.Replace(fmt.Sprintf("%v", this.Options), "Any", "types1.Any", 1) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -1513,6 +2372,7 @@ func (this *ShimInfoResponse) String() string {
}
s := strings.Join([]string{`&ShimInfoResponse{`,
`ShimPid:` + fmt.Sprintf("%v", this.ShimPid) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -1522,7 +2382,8 @@ func (this *UpdateTaskRequest) String() string {
return "nil"
}
s := strings.Join([]string{`&UpdateTaskRequest{`,
- `Resources:` + strings.Replace(fmt.Sprintf("%v", this.Resources), "Any", "google_protobuf.Any", 1) + `,`,
+ `Resources:` + strings.Replace(fmt.Sprintf("%v", this.Resources), "Any", "types1.Any", 1) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -1533,6 +2394,7 @@ func (this *StartRequest) String() string {
}
s := strings.Join([]string{`&StartRequest{`,
`ID:` + fmt.Sprintf("%v", this.ID) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -1544,6 +2406,7 @@ func (this *StartResponse) String() string {
s := strings.Join([]string{`&StartResponse{`,
`ID:` + fmt.Sprintf("%v", this.ID) + `,`,
`Pid:` + fmt.Sprintf("%v", this.Pid) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -1554,6 +2417,7 @@ func (this *WaitRequest) String() string {
}
s := strings.Join([]string{`&WaitRequest{`,
`ID:` + fmt.Sprintf("%v", this.ID) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -1564,7 +2428,8 @@ func (this *WaitResponse) String() string {
}
s := strings.Join([]string{`&WaitResponse{`,
`ExitStatus:` + fmt.Sprintf("%v", this.ExitStatus) + `,`,
- `ExitedAt:` + strings.Replace(strings.Replace(this.ExitedAt.String(), "Timestamp", "google_protobuf3.Timestamp", 1), `&`, ``, 1) + `,`,
+ `ExitedAt:` + strings.Replace(strings.Replace(this.ExitedAt.String(), "Timestamp", "types1.Timestamp", 1), `&`, ``, 1) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -1582,23 +2447,23 @@ type ShimService interface {
State(ctx context.Context, req *StateRequest) (*StateResponse, error)
Create(ctx context.Context, req *CreateTaskRequest) (*CreateTaskResponse, error)
Start(ctx context.Context, req *StartRequest) (*StartResponse, error)
- Delete(ctx context.Context, req *google_protobuf1.Empty) (*DeleteResponse, error)
+ Delete(ctx context.Context, req *types1.Empty) (*DeleteResponse, error)
DeleteProcess(ctx context.Context, req *DeleteProcessRequest) (*DeleteResponse, error)
ListPids(ctx context.Context, req *ListPidsRequest) (*ListPidsResponse, error)
- Pause(ctx context.Context, req *google_protobuf1.Empty) (*google_protobuf1.Empty, error)
- Resume(ctx context.Context, req *google_protobuf1.Empty) (*google_protobuf1.Empty, error)
- Checkpoint(ctx context.Context, req *CheckpointTaskRequest) (*google_protobuf1.Empty, error)
- Kill(ctx context.Context, req *KillRequest) (*google_protobuf1.Empty, error)
- Exec(ctx context.Context, req *ExecProcessRequest) (*google_protobuf1.Empty, error)
- ResizePty(ctx context.Context, req *ResizePtyRequest) (*google_protobuf1.Empty, error)
- CloseIO(ctx context.Context, req *CloseIORequest) (*google_protobuf1.Empty, error)
- ShimInfo(ctx context.Context, req *google_protobuf1.Empty) (*ShimInfoResponse, error)
- Update(ctx context.Context, req *UpdateTaskRequest) (*google_protobuf1.Empty, error)
+ Pause(ctx context.Context, req *types1.Empty) (*types1.Empty, error)
+ Resume(ctx context.Context, req *types1.Empty) (*types1.Empty, error)
+ Checkpoint(ctx context.Context, req *CheckpointTaskRequest) (*types1.Empty, error)
+ Kill(ctx context.Context, req *KillRequest) (*types1.Empty, error)
+ Exec(ctx context.Context, req *ExecProcessRequest) (*types1.Empty, error)
+ ResizePty(ctx context.Context, req *ResizePtyRequest) (*types1.Empty, error)
+ CloseIO(ctx context.Context, req *CloseIORequest) (*types1.Empty, error)
+ ShimInfo(ctx context.Context, req *types1.Empty) (*ShimInfoResponse, error)
+ Update(ctx context.Context, req *UpdateTaskRequest) (*types1.Empty, error)
Wait(ctx context.Context, req *WaitRequest) (*WaitResponse, error)
}
-func RegisterShimService(srv *ttrpc.Server, svc ShimService) {
- srv.Register("containerd.runtime.linux.shim.v1.Shim", map[string]ttrpc.Method{
+func RegisterShimService(srv *github_com_containerd_ttrpc.Server, svc ShimService) {
+ srv.Register("containerd.runtime.linux.shim.v1.Shim", map[string]github_com_containerd_ttrpc.Method{
"State": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) {
var req StateRequest
if err := unmarshal(&req); err != nil {
@@ -1621,7 +2486,7 @@ func RegisterShimService(srv *ttrpc.Server, svc ShimService) {
return svc.Start(ctx, &req)
},
"Delete": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) {
- var req google_protobuf1.Empty
+ var req types1.Empty
if err := unmarshal(&req); err != nil {
return nil, err
}
@@ -1642,14 +2507,14 @@ func RegisterShimService(srv *ttrpc.Server, svc ShimService) {
return svc.ListPids(ctx, &req)
},
"Pause": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) {
- var req google_protobuf1.Empty
+ var req types1.Empty
if err := unmarshal(&req); err != nil {
return nil, err
}
return svc.Pause(ctx, &req)
},
"Resume": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) {
- var req google_protobuf1.Empty
+ var req types1.Empty
if err := unmarshal(&req); err != nil {
return nil, err
}
@@ -1691,7 +2556,7 @@ func RegisterShimService(srv *ttrpc.Server, svc ShimService) {
return svc.CloseIO(ctx, &req)
},
"ShimInfo": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) {
- var req google_protobuf1.Empty
+ var req types1.Empty
if err := unmarshal(&req); err != nil {
return nil, err
}
@@ -1715,10 +2580,10 @@ func RegisterShimService(srv *ttrpc.Server, svc ShimService) {
}
type shimClient struct {
- client *ttrpc.Client
+ client *github_com_containerd_ttrpc.Client
}
-func NewShimClient(client *ttrpc.Client) ShimService {
+func NewShimClient(client *github_com_containerd_ttrpc.Client) ShimService {
return &shimClient{
client: client,
}
@@ -1748,7 +2613,7 @@ func (c *shimClient) Start(ctx context.Context, req *StartRequest) (*StartRespon
return &resp, nil
}
-func (c *shimClient) Delete(ctx context.Context, req *google_protobuf1.Empty) (*DeleteResponse, error) {
+func (c *shimClient) Delete(ctx context.Context, req *types1.Empty) (*DeleteResponse, error) {
var resp DeleteResponse
if err := c.client.Call(ctx, "containerd.runtime.linux.shim.v1.Shim", "Delete", req, &resp); err != nil {
return nil, err
@@ -1772,63 +2637,63 @@ func (c *shimClient) ListPids(ctx context.Context, req *ListPidsRequest) (*ListP
return &resp, nil
}
-func (c *shimClient) Pause(ctx context.Context, req *google_protobuf1.Empty) (*google_protobuf1.Empty, error) {
- var resp google_protobuf1.Empty
+func (c *shimClient) Pause(ctx context.Context, req *types1.Empty) (*types1.Empty, error) {
+ var resp types1.Empty
if err := c.client.Call(ctx, "containerd.runtime.linux.shim.v1.Shim", "Pause", req, &resp); err != nil {
return nil, err
}
return &resp, nil
}
-func (c *shimClient) Resume(ctx context.Context, req *google_protobuf1.Empty) (*google_protobuf1.Empty, error) {
- var resp google_protobuf1.Empty
+func (c *shimClient) Resume(ctx context.Context, req *types1.Empty) (*types1.Empty, error) {
+ var resp types1.Empty
if err := c.client.Call(ctx, "containerd.runtime.linux.shim.v1.Shim", "Resume", req, &resp); err != nil {
return nil, err
}
return &resp, nil
}
-func (c *shimClient) Checkpoint(ctx context.Context, req *CheckpointTaskRequest) (*google_protobuf1.Empty, error) {
- var resp google_protobuf1.Empty
+func (c *shimClient) Checkpoint(ctx context.Context, req *CheckpointTaskRequest) (*types1.Empty, error) {
+ var resp types1.Empty
if err := c.client.Call(ctx, "containerd.runtime.linux.shim.v1.Shim", "Checkpoint", req, &resp); err != nil {
return nil, err
}
return &resp, nil
}
-func (c *shimClient) Kill(ctx context.Context, req *KillRequest) (*google_protobuf1.Empty, error) {
- var resp google_protobuf1.Empty
+func (c *shimClient) Kill(ctx context.Context, req *KillRequest) (*types1.Empty, error) {
+ var resp types1.Empty
if err := c.client.Call(ctx, "containerd.runtime.linux.shim.v1.Shim", "Kill", req, &resp); err != nil {
return nil, err
}
return &resp, nil
}
-func (c *shimClient) Exec(ctx context.Context, req *ExecProcessRequest) (*google_protobuf1.Empty, error) {
- var resp google_protobuf1.Empty
+func (c *shimClient) Exec(ctx context.Context, req *ExecProcessRequest) (*types1.Empty, error) {
+ var resp types1.Empty
if err := c.client.Call(ctx, "containerd.runtime.linux.shim.v1.Shim", "Exec", req, &resp); err != nil {
return nil, err
}
return &resp, nil
}
-func (c *shimClient) ResizePty(ctx context.Context, req *ResizePtyRequest) (*google_protobuf1.Empty, error) {
- var resp google_protobuf1.Empty
+func (c *shimClient) ResizePty(ctx context.Context, req *ResizePtyRequest) (*types1.Empty, error) {
+ var resp types1.Empty
if err := c.client.Call(ctx, "containerd.runtime.linux.shim.v1.Shim", "ResizePty", req, &resp); err != nil {
return nil, err
}
return &resp, nil
}
-func (c *shimClient) CloseIO(ctx context.Context, req *CloseIORequest) (*google_protobuf1.Empty, error) {
- var resp google_protobuf1.Empty
+func (c *shimClient) CloseIO(ctx context.Context, req *CloseIORequest) (*types1.Empty, error) {
+ var resp types1.Empty
if err := c.client.Call(ctx, "containerd.runtime.linux.shim.v1.Shim", "CloseIO", req, &resp); err != nil {
return nil, err
}
return &resp, nil
}
-func (c *shimClient) ShimInfo(ctx context.Context, req *google_protobuf1.Empty) (*ShimInfoResponse, error) {
+func (c *shimClient) ShimInfo(ctx context.Context, req *types1.Empty) (*ShimInfoResponse, error) {
var resp ShimInfoResponse
if err := c.client.Call(ctx, "containerd.runtime.linux.shim.v1.Shim", "ShimInfo", req, &resp); err != nil {
return nil, err
@@ -1836,8 +2701,8 @@ func (c *shimClient) ShimInfo(ctx context.Context, req *google_protobuf1.Empty)
return &resp, nil
}
-func (c *shimClient) Update(ctx context.Context, req *UpdateTaskRequest) (*google_protobuf1.Empty, error) {
- var resp google_protobuf1.Empty
+func (c *shimClient) Update(ctx context.Context, req *UpdateTaskRequest) (*types1.Empty, error) {
+ var resp types1.Empty
if err := c.client.Call(ctx, "containerd.runtime.linux.shim.v1.Shim", "Update", req, &resp); err != nil {
return nil, err
}
@@ -1866,7 +2731,7 @@ func (m *CreateTaskRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1894,7 +2759,7 @@ func (m *CreateTaskRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1904,6 +2769,9 @@ func (m *CreateTaskRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthShim
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthShim
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -1923,7 +2791,7 @@ func (m *CreateTaskRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1933,6 +2801,9 @@ func (m *CreateTaskRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthShim
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthShim
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -1952,7 +2823,7 @@ func (m *CreateTaskRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1962,6 +2833,9 @@ func (m *CreateTaskRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthShim
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthShim
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -1981,7 +2855,7 @@ func (m *CreateTaskRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1990,10 +2864,13 @@ func (m *CreateTaskRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthShim
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthShim
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
- m.Rootfs = append(m.Rootfs, &containerd_types.Mount{})
+ m.Rootfs = append(m.Rootfs, &types.Mount{})
if err := m.Rootfs[len(m.Rootfs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
@@ -2012,7 +2889,7 @@ func (m *CreateTaskRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- v |= (int(b) & 0x7F) << shift
+ v |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2032,7 +2909,7 @@ func (m *CreateTaskRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2042,6 +2919,9 @@ func (m *CreateTaskRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthShim
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthShim
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -2061,7 +2941,7 @@ func (m *CreateTaskRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2071,6 +2951,9 @@ func (m *CreateTaskRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthShim
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthShim
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -2090,7 +2973,7 @@ func (m *CreateTaskRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2100,6 +2983,9 @@ func (m *CreateTaskRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthShim
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthShim
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -2119,7 +3005,7 @@ func (m *CreateTaskRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2129,6 +3015,9 @@ func (m *CreateTaskRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthShim
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthShim
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -2148,7 +3037,7 @@ func (m *CreateTaskRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2158,6 +3047,9 @@ func (m *CreateTaskRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthShim
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthShim
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -2177,7 +3069,7 @@ func (m *CreateTaskRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2186,11 +3078,14 @@ func (m *CreateTaskRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthShim
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthShim
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Options == nil {
- m.Options = &google_protobuf.Any{}
+ m.Options = &types1.Any{}
}
if err := m.Options.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
@@ -2205,9 +3100,13 @@ func (m *CreateTaskRequest) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthShim
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthShim
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -2232,7 +3131,7 @@ func (m *CreateTaskResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2260,7 +3159,7 @@ func (m *CreateTaskResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- m.Pid |= (uint32(b) & 0x7F) << shift
+ m.Pid |= uint32(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2274,9 +3173,13 @@ func (m *CreateTaskResponse) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthShim
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthShim
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -2301,7 +3204,7 @@ func (m *DeleteResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2329,7 +3232,7 @@ func (m *DeleteResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- m.Pid |= (uint32(b) & 0x7F) << shift
+ m.Pid |= uint32(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2348,7 +3251,7 @@ func (m *DeleteResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- m.ExitStatus |= (uint32(b) & 0x7F) << shift
+ m.ExitStatus |= uint32(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2367,7 +3270,7 @@ func (m *DeleteResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2376,10 +3279,13 @@ func (m *DeleteResponse) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthShim
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthShim
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
- if err := types.StdTimeUnmarshal(&m.ExitedAt, dAtA[iNdEx:postIndex]); err != nil {
+ if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.ExitedAt, dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
@@ -2392,9 +3298,13 @@ func (m *DeleteResponse) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthShim
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthShim
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -2419,7 +3329,7 @@ func (m *DeleteProcessRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2447,7 +3357,7 @@ func (m *DeleteProcessRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2457,6 +3367,9 @@ func (m *DeleteProcessRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthShim
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthShim
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -2471,9 +3384,13 @@ func (m *DeleteProcessRequest) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthShim
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthShim
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -2498,7 +3415,7 @@ func (m *ExecProcessRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2526,7 +3443,7 @@ func (m *ExecProcessRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2536,6 +3453,9 @@ func (m *ExecProcessRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthShim
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthShim
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -2555,7 +3475,7 @@ func (m *ExecProcessRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- v |= (int(b) & 0x7F) << shift
+ v |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2575,7 +3495,7 @@ func (m *ExecProcessRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2585,6 +3505,9 @@ func (m *ExecProcessRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthShim
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthShim
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -2604,7 +3527,7 @@ func (m *ExecProcessRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2614,6 +3537,9 @@ func (m *ExecProcessRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthShim
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthShim
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -2633,7 +3559,7 @@ func (m *ExecProcessRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2643,6 +3569,9 @@ func (m *ExecProcessRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthShim
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthShim
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -2662,7 +3591,7 @@ func (m *ExecProcessRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2671,11 +3600,14 @@ func (m *ExecProcessRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthShim
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthShim
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Spec == nil {
- m.Spec = &google_protobuf.Any{}
+ m.Spec = &types1.Any{}
}
if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
@@ -2690,9 +3622,13 @@ func (m *ExecProcessRequest) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthShim
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthShim
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -2717,7 +3653,7 @@ func (m *ExecProcessResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2740,9 +3676,13 @@ func (m *ExecProcessResponse) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthShim
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthShim
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -2767,7 +3707,7 @@ func (m *ResizePtyRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2795,7 +3735,7 @@ func (m *ResizePtyRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2805,6 +3745,9 @@ func (m *ResizePtyRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthShim
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthShim
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -2824,7 +3767,7 @@ func (m *ResizePtyRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- m.Width |= (uint32(b) & 0x7F) << shift
+ m.Width |= uint32(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2843,7 +3786,7 @@ func (m *ResizePtyRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- m.Height |= (uint32(b) & 0x7F) << shift
+ m.Height |= uint32(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2857,9 +3800,13 @@ func (m *ResizePtyRequest) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthShim
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthShim
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -2884,7 +3831,7 @@ func (m *StateRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2912,7 +3859,7 @@ func (m *StateRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2922,6 +3869,9 @@ func (m *StateRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthShim
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthShim
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -2936,9 +3886,13 @@ func (m *StateRequest) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthShim
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthShim
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -2963,7 +3917,7 @@ func (m *StateResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2991,7 +3945,7 @@ func (m *StateResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3001,6 +3955,9 @@ func (m *StateResponse) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthShim
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthShim
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -3020,7 +3977,7 @@ func (m *StateResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3030,6 +3987,9 @@ func (m *StateResponse) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthShim
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthShim
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -3049,7 +4009,7 @@ func (m *StateResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- m.Pid |= (uint32(b) & 0x7F) << shift
+ m.Pid |= uint32(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3068,7 +4028,7 @@ func (m *StateResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- m.Status |= (containerd_v1_types.Status(b) & 0x7F) << shift
+ m.Status |= task.Status(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3087,7 +4047,7 @@ func (m *StateResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3097,6 +4057,9 @@ func (m *StateResponse) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthShim
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthShim
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -3116,7 +4079,7 @@ func (m *StateResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3126,6 +4089,9 @@ func (m *StateResponse) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthShim
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthShim
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -3145,7 +4111,7 @@ func (m *StateResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3155,6 +4121,9 @@ func (m *StateResponse) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthShim
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthShim
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -3174,7 +4143,7 @@ func (m *StateResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- v |= (int(b) & 0x7F) << shift
+ v |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3194,7 +4163,7 @@ func (m *StateResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- m.ExitStatus |= (uint32(b) & 0x7F) << shift
+ m.ExitStatus |= uint32(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3213,7 +4182,7 @@ func (m *StateResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3222,10 +4191,13 @@ func (m *StateResponse) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthShim
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthShim
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
- if err := types.StdTimeUnmarshal(&m.ExitedAt, dAtA[iNdEx:postIndex]); err != nil {
+ if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.ExitedAt, dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
@@ -3238,9 +4210,13 @@ func (m *StateResponse) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthShim
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthShim
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -3265,7 +4241,7 @@ func (m *KillRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3293,7 +4269,7 @@ func (m *KillRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3303,6 +4279,9 @@ func (m *KillRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthShim
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthShim
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -3322,7 +4301,7 @@ func (m *KillRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- m.Signal |= (uint32(b) & 0x7F) << shift
+ m.Signal |= uint32(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3341,7 +4320,7 @@ func (m *KillRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- v |= (int(b) & 0x7F) << shift
+ v |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3356,9 +4335,13 @@ func (m *KillRequest) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthShim
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthShim
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -3383,7 +4366,7 @@ func (m *CloseIORequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3411,7 +4394,7 @@ func (m *CloseIORequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3421,6 +4404,9 @@ func (m *CloseIORequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthShim
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthShim
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -3440,7 +4426,7 @@ func (m *CloseIORequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- v |= (int(b) & 0x7F) << shift
+ v |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3455,9 +4441,13 @@ func (m *CloseIORequest) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthShim
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthShim
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -3482,7 +4472,7 @@ func (m *ListPidsRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3510,7 +4500,7 @@ func (m *ListPidsRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3520,6 +4510,9 @@ func (m *ListPidsRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthShim
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthShim
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -3534,9 +4527,13 @@ func (m *ListPidsRequest) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthShim
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthShim
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -3561,7 +4558,7 @@ func (m *ListPidsResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3589,7 +4586,7 @@ func (m *ListPidsResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3598,10 +4595,13 @@ func (m *ListPidsResponse) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthShim
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthShim
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
- m.Processes = append(m.Processes, &containerd_v1_types.ProcessInfo{})
+ m.Processes = append(m.Processes, &task.ProcessInfo{})
if err := m.Processes[len(m.Processes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
@@ -3615,9 +4615,13 @@ func (m *ListPidsResponse) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthShim
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthShim
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -3642,7 +4646,7 @@ func (m *CheckpointTaskRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3670,7 +4674,7 @@ func (m *CheckpointTaskRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3680,6 +4684,9 @@ func (m *CheckpointTaskRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthShim
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthShim
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -3699,7 +4706,7 @@ func (m *CheckpointTaskRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3708,11 +4715,14 @@ func (m *CheckpointTaskRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthShim
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthShim
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Options == nil {
- m.Options = &google_protobuf.Any{}
+ m.Options = &types1.Any{}
}
if err := m.Options.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
@@ -3727,9 +4737,13 @@ func (m *CheckpointTaskRequest) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthShim
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthShim
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -3754,7 +4768,7 @@ func (m *ShimInfoResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3782,7 +4796,7 @@ func (m *ShimInfoResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- m.ShimPid |= (uint32(b) & 0x7F) << shift
+ m.ShimPid |= uint32(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3796,9 +4810,13 @@ func (m *ShimInfoResponse) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthShim
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthShim
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -3823,7 +4841,7 @@ func (m *UpdateTaskRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3851,7 +4869,7 @@ func (m *UpdateTaskRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3860,11 +4878,14 @@ func (m *UpdateTaskRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthShim
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthShim
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Resources == nil {
- m.Resources = &google_protobuf.Any{}
+ m.Resources = &types1.Any{}
}
if err := m.Resources.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
@@ -3879,9 +4900,13 @@ func (m *UpdateTaskRequest) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthShim
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthShim
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -3906,7 +4931,7 @@ func (m *StartRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3934,7 +4959,7 @@ func (m *StartRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3944,6 +4969,9 @@ func (m *StartRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthShim
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthShim
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -3958,9 +4986,13 @@ func (m *StartRequest) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthShim
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthShim
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -3985,7 +5017,7 @@ func (m *StartResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -4013,7 +5045,7 @@ func (m *StartResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -4023,6 +5055,9 @@ func (m *StartResponse) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthShim
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthShim
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -4042,7 +5077,7 @@ func (m *StartResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- m.Pid |= (uint32(b) & 0x7F) << shift
+ m.Pid |= uint32(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -4056,9 +5091,13 @@ func (m *StartResponse) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthShim
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthShim
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -4083,7 +5122,7 @@ func (m *WaitRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -4111,7 +5150,7 @@ func (m *WaitRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -4121,6 +5160,9 @@ func (m *WaitRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthShim
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthShim
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -4135,9 +5177,13 @@ func (m *WaitRequest) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthShim
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthShim
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -4162,7 +5208,7 @@ func (m *WaitResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -4190,7 +5236,7 @@ func (m *WaitResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- m.ExitStatus |= (uint32(b) & 0x7F) << shift
+ m.ExitStatus |= uint32(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -4209,7 +5255,7 @@ func (m *WaitResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -4218,10 +5264,13 @@ func (m *WaitResponse) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthShim
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthShim
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
- if err := types.StdTimeUnmarshal(&m.ExitedAt, dAtA[iNdEx:postIndex]); err != nil {
+ if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.ExitedAt, dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
@@ -4234,9 +5283,13 @@ func (m *WaitResponse) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthShim
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthShim
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -4300,10 +5353,13 @@ func skipShim(dAtA []byte) (n int, err error) {
break
}
}
- iNdEx += length
if length < 0 {
return 0, ErrInvalidLengthShim
}
+ iNdEx += length
+ if iNdEx < 0 {
+ return 0, ErrInvalidLengthShim
+ }
return iNdEx, nil
case 3:
for {
@@ -4332,6 +5388,9 @@ func skipShim(dAtA []byte) (n int, err error) {
return 0, err
}
iNdEx = start + next
+ if iNdEx < 0 {
+ return 0, ErrInvalidLengthShim
+ }
}
return iNdEx, nil
case 4:
@@ -4350,82 +5409,3 @@ var (
ErrInvalidLengthShim = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowShim = fmt.Errorf("proto: integer overflow")
)
-
-func init() {
- proto.RegisterFile("github.com/containerd/containerd/runtime/v1/shim/v1/shim.proto", fileDescriptorShim)
-}
-
-var fileDescriptorShim = []byte{
- // 1133 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x57, 0x4f, 0x4f, 0x1b, 0x47,
- 0x14, 0x67, 0x17, 0xff, 0x7d, 0x8e, 0x29, 0x4c, 0x09, 0xdd, 0x38, 0x92, 0xb1, 0x56, 0x6a, 0x44,
- 0x55, 0x65, 0x5d, 0x4c, 0x95, 0xa4, 0xad, 0x84, 0x04, 0x24, 0xaa, 0x50, 0x1b, 0x05, 0x2d, 0xa4,
- 0x89, 0x5a, 0x55, 0x68, 0xf1, 0x0e, 0xf6, 0x08, 0x7b, 0x67, 0xb3, 0x33, 0x4b, 0xa1, 0xa7, 0x9e,
- 0x7a, 0xee, 0xc7, 0xe9, 0x47, 0xe0, 0x90, 0x43, 0x8f, 0x3d, 0xa5, 0x0d, 0xf7, 0x7e, 0x87, 0x6a,
- 0xfe, 0x18, 0xaf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98, 0xba, 0xfc, 0x73, 0x28, 0x88, 0x46, 0x82, 0x1e,
- 0x66, 0x2f, 0x9c, 0x68, 0x38, 0xa9, 0xcb, 0x1d, 0x40, 0x41, 0xbc, 0x3f, 0x50, 0x8e, 0xab, 0x30,
- 0xfb, 0xc2, 0x4a, 0x5d, 0xf5, 0x15, 0x54, 0xaf, 0x9e, 0x2f, 0x28, 0x07, 0x6f, 0xd3, 0x6f, 0x9d,
- 0xd4, 0x85, 0xf7, 0xa1, 0xac, 0xbb, 0x1e, 0xca, 0xa1, 0xbf, 0xc9, 0x06, 0x99, 0xba, 0xe8, 0x0f,
- 0x50, 0x19, 0xb5, 0x8b, 0x54, 0xb6, 0x73, 0x1c, 0x62, 0xa6, 0xe5, 0xbc, 0x84, 0x92, 0xea, 0x2b,
- 0x79, 0xaa, 0xd3, 0x4c, 0x07, 0x4a, 0x0d, 0x17, 0x43, 0x41, 0xd4, 0xf6, 0x3c, 0x0a, 0x48, 0xb4,
- 0x8a, 0x86, 0x93, 0x17, 0xae, 0xa2, 0xdf, 0x76, 0x2f, 0xde, 0x37, 0xe7, 0xfe, 0x7e, 0xdf, 0x9c,
- 0xfb, 0xed, 0xb2, 0x69, 0x5c, 0x5c, 0x36, 0x8d, 0xbf, 0x2e, 0x9b, 0xc6, 0xbf, 0x97, 0x4d, 0xe3,
- 0xc7, 0x27, 0xb7, 0xf8, 0x27, 0xf8, 0x1b, 0xf1, 0xfb, 0xda, 0x3c, 0x2a, 0xc9, 0xc3, 0x6c, 0xfc,
- 0x1f, 0x00, 0x00, 0xff, 0xff, 0x64, 0x52, 0x86, 0xc0, 0x49, 0x0f, 0x00, 0x00,
-}
diff --git a/runtime/v2/runc/options/oci.pb.go b/runtime/v2/runc/options/oci.pb.go
index ebfc3b8ac..a24dbad71 100644
--- a/runtime/v2/runc/options/oci.pb.go
+++ b/runtime/v2/runc/options/oci.pb.go
@@ -1,29 +1,16 @@
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: github.com/containerd/containerd/runtime/v2/runc/options/oci.proto
-/*
- Package options is a generated protocol buffer package.
-
- It is generated from these files:
- github.com/containerd/containerd/runtime/v2/runc/options/oci.proto
-
- It has these top-level messages:
- Options
- CheckpointOptions
- ProcessDetails
-*/
package options
-import proto "github.com/gogo/protobuf/proto"
-import fmt "fmt"
-import math "math"
-
-// skipping weak import gogoproto "github.com/gogo/protobuf/gogoproto"
-
-import strings "strings"
-import reflect "reflect"
-
-import io "io"
+import (
+ fmt "fmt"
+ proto "github.com/gogo/protobuf/proto"
+ io "io"
+ math "math"
+ reflect "reflect"
+ strings "strings"
+)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
@@ -58,12 +45,43 @@ type Options struct {
// criu image path
CriuImagePath string `protobuf:"bytes,10,opt,name=criu_image_path,json=criuImagePath,proto3" json:"criu_image_path,omitempty"`
// criu work path
- CriuWorkPath string `protobuf:"bytes,11,opt,name=criu_work_path,json=criuWorkPath,proto3" json:"criu_work_path,omitempty"`
+ CriuWorkPath string `protobuf:"bytes,11,opt,name=criu_work_path,json=criuWorkPath,proto3" json:"criu_work_path,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *Options) Reset() { *m = Options{} }
-func (*Options) ProtoMessage() {}
-func (*Options) Descriptor() ([]byte, []int) { return fileDescriptorOci, []int{0} }
+func (m *Options) Reset() { *m = Options{} }
+func (*Options) ProtoMessage() {}
+func (*Options) Descriptor() ([]byte, []int) {
+ return fileDescriptor_4e5440d739e9a863, []int{0}
+}
+func (m *Options) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *Options) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_Options.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *Options) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_Options.Merge(m, src)
+}
+func (m *Options) XXX_Size() int {
+ return m.Size()
+}
+func (m *Options) XXX_DiscardUnknown() {
+ xxx_messageInfo_Options.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Options proto.InternalMessageInfo
type CheckpointOptions struct {
// exit the container after a checkpoint
@@ -77,33 +95,141 @@ type CheckpointOptions struct {
// allow checkpointing of file locks
FileLocks bool `protobuf:"varint,5,opt,name=file_locks,json=fileLocks,proto3" json:"file_locks,omitempty"`
// restore provided namespaces as empty namespaces
- EmptyNamespaces []string `protobuf:"bytes,6,rep,name=empty_namespaces,json=emptyNamespaces" json:"empty_namespaces,omitempty"`
+ EmptyNamespaces []string `protobuf:"bytes,6,rep,name=empty_namespaces,json=emptyNamespaces,proto3" json:"empty_namespaces,omitempty"`
// set the cgroups mode, soft, full, strict
CgroupsMode string `protobuf:"bytes,7,opt,name=cgroups_mode,json=cgroupsMode,proto3" json:"cgroups_mode,omitempty"`
// checkpoint image path
ImagePath string `protobuf:"bytes,8,opt,name=image_path,json=imagePath,proto3" json:"image_path,omitempty"`
// checkpoint work path
- WorkPath string `protobuf:"bytes,9,opt,name=work_path,json=workPath,proto3" json:"work_path,omitempty"`
+ WorkPath string `protobuf:"bytes,9,opt,name=work_path,json=workPath,proto3" json:"work_path,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *CheckpointOptions) Reset() { *m = CheckpointOptions{} }
-func (*CheckpointOptions) ProtoMessage() {}
-func (*CheckpointOptions) Descriptor() ([]byte, []int) { return fileDescriptorOci, []int{1} }
+func (m *CheckpointOptions) Reset() { *m = CheckpointOptions{} }
+func (*CheckpointOptions) ProtoMessage() {}
+func (*CheckpointOptions) Descriptor() ([]byte, []int) {
+ return fileDescriptor_4e5440d739e9a863, []int{1}
+}
+func (m *CheckpointOptions) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *CheckpointOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_CheckpointOptions.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *CheckpointOptions) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_CheckpointOptions.Merge(m, src)
+}
+func (m *CheckpointOptions) XXX_Size() int {
+ return m.Size()
+}
+func (m *CheckpointOptions) XXX_DiscardUnknown() {
+ xxx_messageInfo_CheckpointOptions.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_CheckpointOptions proto.InternalMessageInfo
type ProcessDetails struct {
// exec process id if the process is managed by a shim
- ExecID string `protobuf:"bytes,1,opt,name=exec_id,json=execId,proto3" json:"exec_id,omitempty"`
+ ExecID string `protobuf:"bytes,1,opt,name=exec_id,json=execId,proto3" json:"exec_id,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *ProcessDetails) Reset() { *m = ProcessDetails{} }
-func (*ProcessDetails) ProtoMessage() {}
-func (*ProcessDetails) Descriptor() ([]byte, []int) { return fileDescriptorOci, []int{2} }
+func (m *ProcessDetails) Reset() { *m = ProcessDetails{} }
+func (*ProcessDetails) ProtoMessage() {}
+func (*ProcessDetails) Descriptor() ([]byte, []int) {
+ return fileDescriptor_4e5440d739e9a863, []int{2}
+}
+func (m *ProcessDetails) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *ProcessDetails) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_ProcessDetails.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *ProcessDetails) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_ProcessDetails.Merge(m, src)
+}
+func (m *ProcessDetails) XXX_Size() int {
+ return m.Size()
+}
+func (m *ProcessDetails) XXX_DiscardUnknown() {
+ xxx_messageInfo_ProcessDetails.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_ProcessDetails proto.InternalMessageInfo
func init() {
proto.RegisterType((*Options)(nil), "containerd.runc.v1.Options")
proto.RegisterType((*CheckpointOptions)(nil), "containerd.runc.v1.CheckpointOptions")
proto.RegisterType((*ProcessDetails)(nil), "containerd.runc.v1.ProcessDetails")
}
+
+func init() {
+ proto.RegisterFile("github.com/containerd/containerd/runtime/v2/runc/options/oci.proto", fileDescriptor_4e5440d739e9a863)
+}
+
+var fileDescriptor_4e5440d739e9a863 = []byte{
+ // 587 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x93, 0xcf, 0x6e, 0xd3, 0x40,
+ 0x10, 0x87, 0xeb, 0xfe, 0x49, 0xec, 0x4d, 0x93, 0xc2, 0x42, 0x25, 0xd3, 0x8a, 0x34, 0x94, 0x82,
+ 0xc2, 0x25, 0x11, 0x45, 0x9c, 0xb8, 0xa0, 0xb6, 0x08, 0x55, 0x40, 0xa9, 0x0c, 0x15, 0xa8, 0x97,
+ 0x95, 0xbb, 0x1e, 0x9c, 0x51, 0xe2, 0x1d, 0xcb, 0xbb, 0x69, 0xd2, 0x1b, 0xef, 0xc5, 0x0b, 0xf4,
+ 0xc8, 0x91, 0x13, 0xa2, 0xb9, 0xf1, 0x16, 0x68, 0xd7, 0x4e, 0xdb, 0x33, 0x27, 0xcf, 0x7e, 0xf3,
+ 0xf3, 0x78, 0xfd, 0xad, 0x96, 0xed, 0xa5, 0x68, 0x06, 0xe3, 0xb3, 0x9e, 0xa4, 0xac, 0x2f, 0x49,
+ 0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20, 0x5a, 0x73, 0xfc, 0xe8, 0x1a, 0xf3, 0x47, 0x6c, 0xb5, 0x74,
+ 0xa9, 0x45, 0x46, 0x09, 0x54, 0x87, 0xd1, 0xa8, 0xd8, 0x07, 0x4a, 0xc0, 0x7e, 0xec, 0x96, 0xca,
+ 0xf2, 0x50, 0x02, 0xbc, 0xd6, 0xb8, 0xc9, 0x82, 0x1b, 0x83, 0x41, 0x79, 0x64, 0x93, 0xb9, 0xbd,
+ 0x97, 0xac, 0x75, 0x5c, 0x90, 0x04, 0xad, 0x0f, 0xc0, 0xc4, 0x38, 0xd2, 0xfc, 0x31, 0xab, 0xc3,
+ 0x14, 0xa4, 0xc0, 0xc4, 0xc9, 0x0b, 0xf6, 0xd8, 0xec, 0xf7, 0x56, 0xed, 0xcd, 0x14, 0xe4, 0xe1,
+ 0x41, 0x54, 0xb3, 0xad, 0xc3, 0x64, 0xef, 0xf4, 0xf2, 0xaa, 0xbd, 0xf0, 0xeb, 0xaa, 0xbd, 0xf0,
+ 0x7d, 0xd6, 0xf6, 0x2e, 0x67, 0x6d, 0xef, 0xe7, 0xac, 0xed, 0xfd, 0x99, 0xb5, 0xbd, 0xd3, 0xd7,
+ 0xff, 0x7b, 0xd1, 0x5e, 0x55, 0xcf, 0xaf, 0x0b, 0x67, 0x35, 0x77, 0x8b, 0x5e, 0xfc, 0x0b, 0x00,
+ 0x00, 0xff, 0xff, 0x90, 0x50, 0x79, 0xf2, 0xb5, 0x03, 0x00, 0x00,
+}
+
func (m *Options) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
@@ -195,6 +321,9 @@ func (m *Options) MarshalTo(dAtA []byte) (int, error) {
i = encodeVarintOci(dAtA, i, uint64(len(m.CriuWorkPath)))
i += copy(dAtA[i:], m.CriuWorkPath)
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -296,6 +425,9 @@ func (m *CheckpointOptions) MarshalTo(dAtA []byte) (int, error) {
i = encodeVarintOci(dAtA, i, uint64(len(m.WorkPath)))
i += copy(dAtA[i:], m.WorkPath)
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -320,6 +452,9 @@ func (m *ProcessDetails) MarshalTo(dAtA []byte) (int, error) {
i = encodeVarintOci(dAtA, i, uint64(len(m.ExecID)))
i += copy(dAtA[i:], m.ExecID)
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -333,6 +468,9 @@ func encodeVarintOci(dAtA []byte, offset int, v uint64) int {
return offset + 1
}
func (m *Options) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
if m.NoPivotRoot {
@@ -374,10 +512,16 @@ func (m *Options) Size() (n int) {
if l > 0 {
n += 1 + l + sovOci(uint64(l))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *CheckpointOptions) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
if m.Exit {
@@ -413,16 +557,25 @@ func (m *CheckpointOptions) Size() (n int) {
if l > 0 {
n += 1 + l + sovOci(uint64(l))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *ProcessDetails) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.ExecID)
if l > 0 {
n += 1 + l + sovOci(uint64(l))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
@@ -455,6 +608,7 @@ func (this *Options) String() string {
`SystemdCgroup:` + fmt.Sprintf("%v", this.SystemdCgroup) + `,`,
`CriuImagePath:` + fmt.Sprintf("%v", this.CriuImagePath) + `,`,
`CriuWorkPath:` + fmt.Sprintf("%v", this.CriuWorkPath) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -473,6 +627,7 @@ func (this *CheckpointOptions) String() string {
`CgroupsMode:` + fmt.Sprintf("%v", this.CgroupsMode) + `,`,
`ImagePath:` + fmt.Sprintf("%v", this.ImagePath) + `,`,
`WorkPath:` + fmt.Sprintf("%v", this.WorkPath) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -483,6 +638,7 @@ func (this *ProcessDetails) String() string {
}
s := strings.Join([]string{`&ProcessDetails{`,
`ExecID:` + fmt.Sprintf("%v", this.ExecID) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -510,7 +666,7 @@ func (m *Options) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -538,7 +694,7 @@ func (m *Options) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- v |= (int(b) & 0x7F) << shift
+ v |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -558,7 +714,7 @@ func (m *Options) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- v |= (int(b) & 0x7F) << shift
+ v |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -578,7 +734,7 @@ func (m *Options) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -588,6 +744,9 @@ func (m *Options) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthOci
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthOci
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -607,7 +766,7 @@ func (m *Options) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- m.IoUid |= (uint32(b) & 0x7F) << shift
+ m.IoUid |= uint32(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -626,7 +785,7 @@ func (m *Options) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- m.IoGid |= (uint32(b) & 0x7F) << shift
+ m.IoGid |= uint32(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -645,7 +804,7 @@ func (m *Options) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -655,6 +814,9 @@ func (m *Options) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthOci
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthOci
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -674,7 +836,7 @@ func (m *Options) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -684,6 +846,9 @@ func (m *Options) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthOci
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthOci
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -703,7 +868,7 @@ func (m *Options) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -713,6 +878,9 @@ func (m *Options) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthOci
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthOci
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -732,7 +900,7 @@ func (m *Options) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- v |= (int(b) & 0x7F) << shift
+ v |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -752,7 +920,7 @@ func (m *Options) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -762,6 +930,9 @@ func (m *Options) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthOci
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthOci
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -781,7 +952,7 @@ func (m *Options) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -791,6 +962,9 @@ func (m *Options) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthOci
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthOci
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -805,9 +979,13 @@ func (m *Options) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthOci
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthOci
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -832,7 +1010,7 @@ func (m *CheckpointOptions) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -860,7 +1038,7 @@ func (m *CheckpointOptions) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- v |= (int(b) & 0x7F) << shift
+ v |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -880,7 +1058,7 @@ func (m *CheckpointOptions) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- v |= (int(b) & 0x7F) << shift
+ v |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -900,7 +1078,7 @@ func (m *CheckpointOptions) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- v |= (int(b) & 0x7F) << shift
+ v |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -920,7 +1098,7 @@ func (m *CheckpointOptions) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- v |= (int(b) & 0x7F) << shift
+ v |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -940,7 +1118,7 @@ func (m *CheckpointOptions) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- v |= (int(b) & 0x7F) << shift
+ v |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -960,7 +1138,7 @@ func (m *CheckpointOptions) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -970,6 +1148,9 @@ func (m *CheckpointOptions) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthOci
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthOci
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -989,7 +1170,7 @@ func (m *CheckpointOptions) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -999,6 +1180,9 @@ func (m *CheckpointOptions) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthOci
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthOci
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -1018,7 +1202,7 @@ func (m *CheckpointOptions) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1028,6 +1212,9 @@ func (m *CheckpointOptions) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthOci
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthOci
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -1047,7 +1234,7 @@ func (m *CheckpointOptions) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1057,6 +1244,9 @@ func (m *CheckpointOptions) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthOci
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthOci
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -1071,9 +1261,13 @@ func (m *CheckpointOptions) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthOci
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthOci
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -1098,7 +1292,7 @@ func (m *ProcessDetails) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1126,7 +1320,7 @@ func (m *ProcessDetails) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1136,6 +1330,9 @@ func (m *ProcessDetails) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthOci
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthOci
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -1150,9 +1347,13 @@ func (m *ProcessDetails) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthOci
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthOci
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -1216,10 +1417,13 @@ func skipOci(dAtA []byte) (n int, err error) {
break
}
}
- iNdEx += length
if length < 0 {
return 0, ErrInvalidLengthOci
}
+ iNdEx += length
+ if iNdEx < 0 {
+ return 0, ErrInvalidLengthOci
+ }
return iNdEx, nil
case 3:
for {
@@ -1248,6 +1452,9 @@ func skipOci(dAtA []byte) (n int, err error) {
return 0, err
}
iNdEx = start + next
+ if iNdEx < 0 {
+ return 0, ErrInvalidLengthOci
+ }
}
return iNdEx, nil
case 4:
@@ -1266,48 +1473,3 @@ var (
ErrInvalidLengthOci = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowOci = fmt.Errorf("proto: integer overflow")
)
-
-func init() {
- proto.RegisterFile("github.com/containerd/containerd/runtime/v2/runc/options/oci.proto", fileDescriptorOci)
-}
-
-var fileDescriptorOci = []byte{
- // 587 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x93, 0xcf, 0x6e, 0xd3, 0x40,
- 0x10, 0x87, 0xeb, 0xfe, 0x49, 0xec, 0x4d, 0x93, 0xc2, 0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, 0xaf, 0x0b, 0x67, 0x35, 0x77, 0x8b, 0x5e, 0xfc, 0x0b, 0x00,
- 0x00, 0xff, 0xff, 0x90, 0x50, 0x79, 0xf2, 0xb5, 0x03, 0x00, 0x00,
-}
diff --git a/runtime/v2/runhcs/options/runhcs.pb.go b/runtime/v2/runhcs/options/runhcs.pb.go
index cba419cfb..9d31a00be 100644
--- a/runtime/v2/runhcs/options/runhcs.pb.go
+++ b/runtime/v2/runhcs/options/runhcs.pb.go
@@ -1,27 +1,16 @@
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: github.com/containerd/containerd/runtime/v2/runhcs/options/runhcs.proto
-/*
- Package options is a generated protocol buffer package.
-
- It is generated from these files:
- github.com/containerd/containerd/runtime/v2/runhcs/options/runhcs.proto
-
- It has these top-level messages:
- Options
-*/
package options
-import proto "github.com/gogo/protobuf/proto"
-import fmt "fmt"
-import math "math"
-
-// skipping weak import gogoproto "github.com/gogo/protobuf/gogoproto"
-
-import strings "strings"
-import reflect "reflect"
-
-import io "io"
+import (
+ fmt "fmt"
+ proto "github.com/gogo/protobuf/proto"
+ io "io"
+ math "math"
+ reflect "reflect"
+ strings "strings"
+)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
@@ -47,6 +36,7 @@ var Options_DebugType_name = map[int32]string{
1: "FILE",
2: "ETW",
}
+
var Options_DebugType_value = map[string]int32{
"NPIPE": 0,
"FILE": 1,
@@ -56,7 +46,10 @@ var Options_DebugType_value = map[string]int32{
func (x Options_DebugType) String() string {
return proto.EnumName(Options_DebugType_name, int32(x))
}
-func (Options_DebugType) EnumDescriptor() ([]byte, []int) { return fileDescriptorRunhcs, []int{0, 0} }
+
+func (Options_DebugType) EnumDescriptor() ([]byte, []int) {
+ return fileDescriptor_f30b88a94da34796, []int{0, 0}
+}
type Options_SandboxIsolation int32
@@ -69,6 +62,7 @@ var Options_SandboxIsolation_name = map[int32]string{
0: "PROCESS",
1: "HYPERVISOR",
}
+
var Options_SandboxIsolation_value = map[string]int32{
"PROCESS": 0,
"HYPERVISOR": 1,
@@ -77,8 +71,9 @@ var Options_SandboxIsolation_value = map[string]int32{
func (x Options_SandboxIsolation) String() string {
return proto.EnumName(Options_SandboxIsolation_name, int32(x))
}
+
func (Options_SandboxIsolation) EnumDescriptor() ([]byte, []int) {
- return fileDescriptorRunhcs, []int{0, 1}
+ return fileDescriptor_f30b88a94da34796, []int{0, 1}
}
type Options struct {
@@ -98,18 +93,82 @@ type Options struct {
// sandbox_isolation is a CRI setting that specifies the isolation level of
// the sandbox. For Windows runtime PROCESS and HYPERVISOR are valid. For
// LCOW only HYPERVISOR is valid and default if omitted.
- SandboxIsolation Options_SandboxIsolation `protobuf:"varint,6,opt,name=sandbox_isolation,json=sandboxIsolation,proto3,enum=containerd.runhcs.v1.Options_SandboxIsolation" json:"sandbox_isolation,omitempty"`
+ SandboxIsolation Options_SandboxIsolation `protobuf:"varint,6,opt,name=sandbox_isolation,json=sandboxIsolation,proto3,enum=containerd.runhcs.v1.Options_SandboxIsolation" json:"sandbox_isolation,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *Options) Reset() { *m = Options{} }
-func (*Options) ProtoMessage() {}
-func (*Options) Descriptor() ([]byte, []int) { return fileDescriptorRunhcs, []int{0} }
+func (m *Options) Reset() { *m = Options{} }
+func (*Options) ProtoMessage() {}
+func (*Options) Descriptor() ([]byte, []int) {
+ return fileDescriptor_f30b88a94da34796, []int{0}
+}
+func (m *Options) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *Options) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_Options.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *Options) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_Options.Merge(m, src)
+}
+func (m *Options) XXX_Size() int {
+ return m.Size()
+}
+func (m *Options) XXX_DiscardUnknown() {
+ xxx_messageInfo_Options.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Options proto.InternalMessageInfo
func init() {
- proto.RegisterType((*Options)(nil), "containerd.runhcs.v1.Options")
proto.RegisterEnum("containerd.runhcs.v1.Options_DebugType", Options_DebugType_name, Options_DebugType_value)
proto.RegisterEnum("containerd.runhcs.v1.Options_SandboxIsolation", Options_SandboxIsolation_name, Options_SandboxIsolation_value)
+ proto.RegisterType((*Options)(nil), "containerd.runhcs.v1.Options")
}
+
+func init() {
+ proto.RegisterFile("github.com/containerd/containerd/runtime/v2/runhcs/options/runhcs.proto", fileDescriptor_f30b88a94da34796)
+}
+
+var fileDescriptor_f30b88a94da34796 = []byte{
+ // 383 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x92, 0xcd, 0x6e, 0x9b, 0x40,
+ 0x14, 0x85, 0x19, 0xff, 0x73, 0xdb, 0xba, 0x74, 0xe4, 0x05, 0xea, 0x02, 0x59, 0xee, 0xa2, 0xf6,
+ 0x06, 0x54, 0x77, 0xd9, 0x9d, 0x5b, 0xdc, 0x22, 0x55, 0x35, 0x1a, 0xac, 0xb6, 0xf9, 0x91, 0x2c,
+ 0x30, 0x04, 0x23, 0x19, 0x06, 0xc1, 0xd8, 0x8a, 0x77, 0x79, 0x89, 0xbc, 0x93, 0x97, 0x59, 0x66,
+ 0x19, 0xf3, 0x24, 0x11, 0x30, 0x38, 0x51, 0x14, 0x65, 0x91, 0x15, 0xe7, 0x1e, 0xbe, 0x7b, 0xee,
+ 0x5c, 0xcd, 0xc0, 0x4f, 0x3f, 0x60, 0xab, 0x8d, 0xa3, 0x2e, 0x69, 0xa8, 0x2d, 0x69, 0xc4, 0xec,
+ 0x20, 0xf2, 0x12, 0xf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xce, 0x60, 0x04, 0xe2, 0x71, 0x53, 0x2c, 0x42, 0xf3, 0x8f, 0x69,
+ 0x98, 0xba, 0x24, 0xe0, 0x0e, 0x34, 0xa6, 0xc6, 0x6f, 0x5d, 0x42, 0xb8, 0x0d, 0x75, 0x7d, 0xfe,
+ 0x4f, 0xaa, 0x0d, 0x34, 0x90, 0x9e, 0x06, 0xe2, 0x37, 0xd0, 0x36, 0xc9, 0xec, 0xbb, 0x6e, 0x59,
+ 0x92, 0x80, 0xbb, 0x00, 0xbf, 0x4e, 0x4c, 0x9d, 0xfc, 0x35, 0xac, 0x19, 0x91, 0xd0, 0xe4, 0x7c,
+ 0x7f, 0x50, 0x84, 0xdb, 0x83, 0x22, 0x5c, 0x65, 0x0a, 0xda, 0x67, 0x0a, 0xba, 0xc9, 0x14, 0x74,
+ 0x97, 0x29, 0xe8, 0x74, 0xf2, 0xfa, 0x67, 0xf2, 0x8d, 0x7f, 0xff, 0x0b, 0x4e, 0xab, 0xb8, 0xfe,
+ 0xaf, 0xf7, 0x01, 0x00, 0x00, 0xff, 0xff, 0xe8, 0xe0, 0x0a, 0x7a, 0x75, 0x02, 0x00, 0x00,
+}
+
func (m *Options) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
@@ -163,6 +222,9 @@ func (m *Options) MarshalTo(dAtA []byte) (int, error) {
i++
i = encodeVarintRunhcs(dAtA, i, uint64(m.SandboxIsolation))
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -176,6 +238,9 @@ func encodeVarintRunhcs(dAtA []byte, offset int, v uint64) int {
return offset + 1
}
func (m *Options) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
if m.Debug {
@@ -199,6 +264,9 @@ func (m *Options) Size() (n int) {
if m.SandboxIsolation != 0 {
n += 1 + sovRunhcs(uint64(m.SandboxIsolation))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
@@ -226,6 +294,7 @@ func (this *Options) String() string {
`SandboxImage:` + fmt.Sprintf("%v", this.SandboxImage) + `,`,
`SandboxPlatform:` + fmt.Sprintf("%v", this.SandboxPlatform) + `,`,
`SandboxIsolation:` + fmt.Sprintf("%v", this.SandboxIsolation) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -253,7 +322,7 @@ func (m *Options) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -281,7 +350,7 @@ func (m *Options) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- v |= (int(b) & 0x7F) << shift
+ v |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -301,7 +370,7 @@ func (m *Options) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- m.DebugType |= (Options_DebugType(b) & 0x7F) << shift
+ m.DebugType |= Options_DebugType(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -320,7 +389,7 @@ func (m *Options) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -330,6 +399,9 @@ func (m *Options) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthRunhcs
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthRunhcs
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -349,7 +421,7 @@ func (m *Options) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -359,6 +431,9 @@ func (m *Options) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthRunhcs
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthRunhcs
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -378,7 +453,7 @@ func (m *Options) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -388,6 +463,9 @@ func (m *Options) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthRunhcs
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthRunhcs
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -407,7 +485,7 @@ func (m *Options) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- m.SandboxIsolation |= (Options_SandboxIsolation(b) & 0x7F) << shift
+ m.SandboxIsolation |= Options_SandboxIsolation(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -421,9 +499,13 @@ func (m *Options) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthRunhcs
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthRunhcs
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -487,10 +569,13 @@ func skipRunhcs(dAtA []byte) (n int, err error) {
break
}
}
- iNdEx += length
if length < 0 {
return 0, ErrInvalidLengthRunhcs
}
+ iNdEx += length
+ if iNdEx < 0 {
+ return 0, ErrInvalidLengthRunhcs
+ }
return iNdEx, nil
case 3:
for {
@@ -519,6 +604,9 @@ func skipRunhcs(dAtA []byte) (n int, err error) {
return 0, err
}
iNdEx = start + next
+ if iNdEx < 0 {
+ return 0, ErrInvalidLengthRunhcs
+ }
}
return iNdEx, nil
case 4:
@@ -537,35 +625,3 @@ var (
ErrInvalidLengthRunhcs = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowRunhcs = fmt.Errorf("proto: integer overflow")
)
-
-func init() {
- proto.RegisterFile("github.com/containerd/containerd/runtime/v2/runhcs/options/runhcs.proto", fileDescriptorRunhcs)
-}
-
-var fileDescriptorRunhcs = []byte{
- // 383 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x92, 0xcd, 0x6e, 0x9b, 0x40,
- 0x14, 0x85, 0x19, 0xff, 0x73, 0xdb, 0xba, 0x74, 0xe4, 0x05, 0xea, 0x02, 0x59, 0xee, 0xa2, 0xf6,
- 0x06, 0x54, 0x77, 0xd9, 0x9d, 0x5b, 0xdc, 0x22, 0x55, 0x35, 0x1a, 0xac, 0xb6, 0xf9, 0x91, 0x2c,
- 0x30, 0x04, 0x23, 0x19, 0x06, 0xc1, 0xd8, 0x8a, 0x77, 0x79, 0x89, 0xbc, 0x93, 0x97, 0x59, 0x66,
- 0x19, 0xf3, 0x24, 0x11, 0x30, 0x38, 0x51, 0x14, 0x65, 0x91, 0x15, 0xe7, 0x1e, 0xbe, 0x7b, 0xee,
- 0x5c, 0xcd, 0xc0, 0x4f, 0x3f, 0x60, 0xab, 0x8d, 0xa3, 0x2e, 0x69, 0xa8, 0x2d, 0x69, 0xc4, 0xec,
- 0x20, 0xf2, 0x12, 0xf7, 0xb1, 0x4c, 0x36, 0x11, 0x0b, 0x42, 0x4f, 0xdb, 0x8e, 0x73, 0xb9, 0x5a,
- 0xa6, 0x1a, 0x8d, 0x59, 0x40, 0xa3, 0x94, 0x97, 0x6a, 0x9c, 0x50, 0x46, 0x71, 0xef, 0xa1, 0x45,
- 0xe5, 0x3f, 0xb6, 0x5f, 0x3e, 0xf6, 0x7c, 0xea, 0xd3, 0x02, 0xd0, 0x72, 0x55, 0xb2, 0x83, 0xeb,
- 0x3a, 0xb4, 0x67, 0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9d, 0xfc, 0x35, 0xac, 0x19, 0x91, 0xd0, 0xe4, 0x7c,
- 0x7f, 0x50, 0x84, 0xdb, 0x83, 0x22, 0x5c, 0x65, 0x0a, 0xda, 0x67, 0x0a, 0xba, 0xc9, 0x14, 0x74,
- 0x97, 0x29, 0xe8, 0x74, 0xf2, 0xfa, 0x67, 0xf2, 0x8d, 0x7f, 0xff, 0x0b, 0x4e, 0xab, 0xb8, 0xfe,
- 0xaf, 0xf7, 0x01, 0x00, 0x00, 0xff, 0xff, 0xe8, 0xe0, 0x0a, 0x7a, 0x75, 0x02, 0x00, 0x00,
-}
diff --git a/runtime/v2/task/shim.pb.go b/runtime/v2/task/shim.pb.go
index e3c3fabce..7ba9e677a 100644
--- a/runtime/v2/task/shim.pb.go
+++ b/runtime/v2/task/shim.pb.go
@@ -1,64 +1,23 @@
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: github.com/containerd/containerd/runtime/v2/task/shim.proto
-/*
- Package task is a generated protocol buffer package.
-
- It is generated from these files:
- github.com/containerd/containerd/runtime/v2/task/shim.proto
-
- It has these top-level messages:
- CreateTaskRequest
- CreateTaskResponse
- DeleteRequest
- DeleteResponse
- ExecProcessRequest
- ExecProcessResponse
- ResizePtyRequest
- StateRequest
- StateResponse
- KillRequest
- CloseIORequest
- PidsRequest
- PidsResponse
- CheckpointTaskRequest
- UpdateTaskRequest
- StartRequest
- StartResponse
- WaitRequest
- WaitResponse
- StatsRequest
- StatsResponse
- ConnectRequest
- ConnectResponse
- ShutdownRequest
- PauseRequest
- ResumeRequest
-*/
package task
-import proto "github.com/gogo/protobuf/proto"
-import fmt "fmt"
-import math "math"
-import google_protobuf "github.com/gogo/protobuf/types"
-import google_protobuf1 "github.com/gogo/protobuf/types"
-
-// skipping weak import gogoproto "github.com/gogo/protobuf/gogoproto"
-import _ "github.com/gogo/protobuf/types"
-import containerd_types "github.com/containerd/containerd/api/types"
-import containerd_v1_types "github.com/containerd/containerd/api/types/task"
-
-import time "time"
-
-import types "github.com/gogo/protobuf/types"
-
-import strings "strings"
-import reflect "reflect"
-
-import context "context"
-import ttrpc "github.com/containerd/ttrpc"
-
-import io "io"
+import (
+ context "context"
+ fmt "fmt"
+ types "github.com/containerd/containerd/api/types"
+ task "github.com/containerd/containerd/api/types/task"
+ github_com_containerd_ttrpc "github.com/containerd/ttrpc"
+ proto "github.com/gogo/protobuf/proto"
+ github_com_gogo_protobuf_types "github.com/gogo/protobuf/types"
+ types1 "github.com/gogo/protobuf/types"
+ io "io"
+ math "math"
+ reflect "reflect"
+ strings "strings"
+ time "time"
+)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
@@ -73,257 +32,1063 @@ var _ = time.Kitchen
const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
type CreateTaskRequest struct {
- ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
- Bundle string `protobuf:"bytes,2,opt,name=bundle,proto3" json:"bundle,omitempty"`
- Rootfs []*containerd_types.Mount `protobuf:"bytes,3,rep,name=rootfs" json:"rootfs,omitempty"`
- Terminal bool `protobuf:"varint,4,opt,name=terminal,proto3" json:"terminal,omitempty"`
- Stdin string `protobuf:"bytes,5,opt,name=stdin,proto3" json:"stdin,omitempty"`
- Stdout string `protobuf:"bytes,6,opt,name=stdout,proto3" json:"stdout,omitempty"`
- Stderr string `protobuf:"bytes,7,opt,name=stderr,proto3" json:"stderr,omitempty"`
- Checkpoint string `protobuf:"bytes,8,opt,name=checkpoint,proto3" json:"checkpoint,omitempty"`
- ParentCheckpoint string `protobuf:"bytes,9,opt,name=parent_checkpoint,json=parentCheckpoint,proto3" json:"parent_checkpoint,omitempty"`
- Options *google_protobuf.Any `protobuf:"bytes,10,opt,name=options" json:"options,omitempty"`
+ ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ Bundle string `protobuf:"bytes,2,opt,name=bundle,proto3" json:"bundle,omitempty"`
+ Rootfs []*types.Mount `protobuf:"bytes,3,rep,name=rootfs,proto3" json:"rootfs,omitempty"`
+ Terminal bool `protobuf:"varint,4,opt,name=terminal,proto3" json:"terminal,omitempty"`
+ Stdin string `protobuf:"bytes,5,opt,name=stdin,proto3" json:"stdin,omitempty"`
+ Stdout string `protobuf:"bytes,6,opt,name=stdout,proto3" json:"stdout,omitempty"`
+ Stderr string `protobuf:"bytes,7,opt,name=stderr,proto3" json:"stderr,omitempty"`
+ Checkpoint string `protobuf:"bytes,8,opt,name=checkpoint,proto3" json:"checkpoint,omitempty"`
+ ParentCheckpoint string `protobuf:"bytes,9,opt,name=parent_checkpoint,json=parentCheckpoint,proto3" json:"parent_checkpoint,omitempty"`
+ Options *types1.Any `protobuf:"bytes,10,opt,name=options,proto3" json:"options,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *CreateTaskRequest) Reset() { *m = CreateTaskRequest{} }
-func (*CreateTaskRequest) ProtoMessage() {}
-func (*CreateTaskRequest) Descriptor() ([]byte, []int) { return fileDescriptorShim, []int{0} }
+func (m *CreateTaskRequest) Reset() { *m = CreateTaskRequest{} }
+func (*CreateTaskRequest) ProtoMessage() {}
+func (*CreateTaskRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_9202ee34bc3ad8ca, []int{0}
+}
+func (m *CreateTaskRequest) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *CreateTaskRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_CreateTaskRequest.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *CreateTaskRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_CreateTaskRequest.Merge(m, src)
+}
+func (m *CreateTaskRequest) XXX_Size() int {
+ return m.Size()
+}
+func (m *CreateTaskRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_CreateTaskRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_CreateTaskRequest proto.InternalMessageInfo
type CreateTaskResponse struct {
- Pid uint32 `protobuf:"varint,1,opt,name=pid,proto3" json:"pid,omitempty"`
+ Pid uint32 `protobuf:"varint,1,opt,name=pid,proto3" json:"pid,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *CreateTaskResponse) Reset() { *m = CreateTaskResponse{} }
-func (*CreateTaskResponse) ProtoMessage() {}
-func (*CreateTaskResponse) Descriptor() ([]byte, []int) { return fileDescriptorShim, []int{1} }
+func (m *CreateTaskResponse) Reset() { *m = CreateTaskResponse{} }
+func (*CreateTaskResponse) ProtoMessage() {}
+func (*CreateTaskResponse) Descriptor() ([]byte, []int) {
+ return fileDescriptor_9202ee34bc3ad8ca, []int{1}
+}
+func (m *CreateTaskResponse) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *CreateTaskResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_CreateTaskResponse.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *CreateTaskResponse) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_CreateTaskResponse.Merge(m, src)
+}
+func (m *CreateTaskResponse) XXX_Size() int {
+ return m.Size()
+}
+func (m *CreateTaskResponse) XXX_DiscardUnknown() {
+ xxx_messageInfo_CreateTaskResponse.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_CreateTaskResponse proto.InternalMessageInfo
type DeleteRequest struct {
- ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
- ExecID string `protobuf:"bytes,2,opt,name=exec_id,json=execId,proto3" json:"exec_id,omitempty"`
+ ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ ExecID string `protobuf:"bytes,2,opt,name=exec_id,json=execId,proto3" json:"exec_id,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *DeleteRequest) Reset() { *m = DeleteRequest{} }
-func (*DeleteRequest) ProtoMessage() {}
-func (*DeleteRequest) Descriptor() ([]byte, []int) { return fileDescriptorShim, []int{2} }
+func (m *DeleteRequest) Reset() { *m = DeleteRequest{} }
+func (*DeleteRequest) ProtoMessage() {}
+func (*DeleteRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_9202ee34bc3ad8ca, []int{2}
+}
+func (m *DeleteRequest) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *DeleteRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_DeleteRequest.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *DeleteRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_DeleteRequest.Merge(m, src)
+}
+func (m *DeleteRequest) XXX_Size() int {
+ return m.Size()
+}
+func (m *DeleteRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_DeleteRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_DeleteRequest proto.InternalMessageInfo
type DeleteResponse struct {
- Pid uint32 `protobuf:"varint,1,opt,name=pid,proto3" json:"pid,omitempty"`
- ExitStatus uint32 `protobuf:"varint,2,opt,name=exit_status,json=exitStatus,proto3" json:"exit_status,omitempty"`
- ExitedAt time.Time `protobuf:"bytes,3,opt,name=exited_at,json=exitedAt,stdtime" json:"exited_at"`
+ Pid uint32 `protobuf:"varint,1,opt,name=pid,proto3" json:"pid,omitempty"`
+ ExitStatus uint32 `protobuf:"varint,2,opt,name=exit_status,json=exitStatus,proto3" json:"exit_status,omitempty"`
+ ExitedAt time.Time `protobuf:"bytes,3,opt,name=exited_at,json=exitedAt,proto3,stdtime" json:"exited_at"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *DeleteResponse) Reset() { *m = DeleteResponse{} }
-func (*DeleteResponse) ProtoMessage() {}
-func (*DeleteResponse) Descriptor() ([]byte, []int) { return fileDescriptorShim, []int{3} }
+func (m *DeleteResponse) Reset() { *m = DeleteResponse{} }
+func (*DeleteResponse) ProtoMessage() {}
+func (*DeleteResponse) Descriptor() ([]byte, []int) {
+ return fileDescriptor_9202ee34bc3ad8ca, []int{3}
+}
+func (m *DeleteResponse) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *DeleteResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_DeleteResponse.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *DeleteResponse) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_DeleteResponse.Merge(m, src)
+}
+func (m *DeleteResponse) XXX_Size() int {
+ return m.Size()
+}
+func (m *DeleteResponse) XXX_DiscardUnknown() {
+ xxx_messageInfo_DeleteResponse.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_DeleteResponse proto.InternalMessageInfo
type ExecProcessRequest struct {
- ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
- ExecID string `protobuf:"bytes,2,opt,name=exec_id,json=execId,proto3" json:"exec_id,omitempty"`
- Terminal bool `protobuf:"varint,3,opt,name=terminal,proto3" json:"terminal,omitempty"`
- Stdin string `protobuf:"bytes,4,opt,name=stdin,proto3" json:"stdin,omitempty"`
- Stdout string `protobuf:"bytes,5,opt,name=stdout,proto3" json:"stdout,omitempty"`
- Stderr string `protobuf:"bytes,6,opt,name=stderr,proto3" json:"stderr,omitempty"`
- Spec *google_protobuf.Any `protobuf:"bytes,7,opt,name=spec" json:"spec,omitempty"`
+ ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ ExecID string `protobuf:"bytes,2,opt,name=exec_id,json=execId,proto3" json:"exec_id,omitempty"`
+ Terminal bool `protobuf:"varint,3,opt,name=terminal,proto3" json:"terminal,omitempty"`
+ Stdin string `protobuf:"bytes,4,opt,name=stdin,proto3" json:"stdin,omitempty"`
+ Stdout string `protobuf:"bytes,5,opt,name=stdout,proto3" json:"stdout,omitempty"`
+ Stderr string `protobuf:"bytes,6,opt,name=stderr,proto3" json:"stderr,omitempty"`
+ Spec *types1.Any `protobuf:"bytes,7,opt,name=spec,proto3" json:"spec,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *ExecProcessRequest) Reset() { *m = ExecProcessRequest{} }
-func (*ExecProcessRequest) ProtoMessage() {}
-func (*ExecProcessRequest) Descriptor() ([]byte, []int) { return fileDescriptorShim, []int{4} }
+func (m *ExecProcessRequest) Reset() { *m = ExecProcessRequest{} }
+func (*ExecProcessRequest) ProtoMessage() {}
+func (*ExecProcessRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_9202ee34bc3ad8ca, []int{4}
+}
+func (m *ExecProcessRequest) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *ExecProcessRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_ExecProcessRequest.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *ExecProcessRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_ExecProcessRequest.Merge(m, src)
+}
+func (m *ExecProcessRequest) XXX_Size() int {
+ return m.Size()
+}
+func (m *ExecProcessRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_ExecProcessRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_ExecProcessRequest proto.InternalMessageInfo
type ExecProcessResponse struct {
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *ExecProcessResponse) Reset() { *m = ExecProcessResponse{} }
-func (*ExecProcessResponse) ProtoMessage() {}
-func (*ExecProcessResponse) Descriptor() ([]byte, []int) { return fileDescriptorShim, []int{5} }
+func (m *ExecProcessResponse) Reset() { *m = ExecProcessResponse{} }
+func (*ExecProcessResponse) ProtoMessage() {}
+func (*ExecProcessResponse) Descriptor() ([]byte, []int) {
+ return fileDescriptor_9202ee34bc3ad8ca, []int{5}
+}
+func (m *ExecProcessResponse) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *ExecProcessResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_ExecProcessResponse.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *ExecProcessResponse) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_ExecProcessResponse.Merge(m, src)
+}
+func (m *ExecProcessResponse) XXX_Size() int {
+ return m.Size()
+}
+func (m *ExecProcessResponse) XXX_DiscardUnknown() {
+ xxx_messageInfo_ExecProcessResponse.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_ExecProcessResponse proto.InternalMessageInfo
type ResizePtyRequest struct {
- ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
- ExecID string `protobuf:"bytes,2,opt,name=exec_id,json=execId,proto3" json:"exec_id,omitempty"`
- Width uint32 `protobuf:"varint,3,opt,name=width,proto3" json:"width,omitempty"`
- Height uint32 `protobuf:"varint,4,opt,name=height,proto3" json:"height,omitempty"`
+ ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ ExecID string `protobuf:"bytes,2,opt,name=exec_id,json=execId,proto3" json:"exec_id,omitempty"`
+ Width uint32 `protobuf:"varint,3,opt,name=width,proto3" json:"width,omitempty"`
+ Height uint32 `protobuf:"varint,4,opt,name=height,proto3" json:"height,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *ResizePtyRequest) Reset() { *m = ResizePtyRequest{} }
-func (*ResizePtyRequest) ProtoMessage() {}
-func (*ResizePtyRequest) Descriptor() ([]byte, []int) { return fileDescriptorShim, []int{6} }
+func (m *ResizePtyRequest) Reset() { *m = ResizePtyRequest{} }
+func (*ResizePtyRequest) ProtoMessage() {}
+func (*ResizePtyRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_9202ee34bc3ad8ca, []int{6}
+}
+func (m *ResizePtyRequest) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *ResizePtyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_ResizePtyRequest.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *ResizePtyRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_ResizePtyRequest.Merge(m, src)
+}
+func (m *ResizePtyRequest) XXX_Size() int {
+ return m.Size()
+}
+func (m *ResizePtyRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_ResizePtyRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_ResizePtyRequest proto.InternalMessageInfo
type StateRequest struct {
- ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
- ExecID string `protobuf:"bytes,2,opt,name=exec_id,json=execId,proto3" json:"exec_id,omitempty"`
+ ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ ExecID string `protobuf:"bytes,2,opt,name=exec_id,json=execId,proto3" json:"exec_id,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *StateRequest) Reset() { *m = StateRequest{} }
-func (*StateRequest) ProtoMessage() {}
-func (*StateRequest) Descriptor() ([]byte, []int) { return fileDescriptorShim, []int{7} }
+func (m *StateRequest) Reset() { *m = StateRequest{} }
+func (*StateRequest) ProtoMessage() {}
+func (*StateRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_9202ee34bc3ad8ca, []int{7}
+}
+func (m *StateRequest) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *StateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_StateRequest.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *StateRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_StateRequest.Merge(m, src)
+}
+func (m *StateRequest) XXX_Size() int {
+ return m.Size()
+}
+func (m *StateRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_StateRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_StateRequest proto.InternalMessageInfo
type StateResponse struct {
- ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
- Bundle string `protobuf:"bytes,2,opt,name=bundle,proto3" json:"bundle,omitempty"`
- Pid uint32 `protobuf:"varint,3,opt,name=pid,proto3" json:"pid,omitempty"`
- Status containerd_v1_types.Status `protobuf:"varint,4,opt,name=status,proto3,enum=containerd.v1.types.Status" json:"status,omitempty"`
- Stdin string `protobuf:"bytes,5,opt,name=stdin,proto3" json:"stdin,omitempty"`
- Stdout string `protobuf:"bytes,6,opt,name=stdout,proto3" json:"stdout,omitempty"`
- Stderr string `protobuf:"bytes,7,opt,name=stderr,proto3" json:"stderr,omitempty"`
- Terminal bool `protobuf:"varint,8,opt,name=terminal,proto3" json:"terminal,omitempty"`
- ExitStatus uint32 `protobuf:"varint,9,opt,name=exit_status,json=exitStatus,proto3" json:"exit_status,omitempty"`
- ExitedAt time.Time `protobuf:"bytes,10,opt,name=exited_at,json=exitedAt,stdtime" json:"exited_at"`
- ExecID string `protobuf:"bytes,11,opt,name=exec_id,json=execId,proto3" json:"exec_id,omitempty"`
+ ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ Bundle string `protobuf:"bytes,2,opt,name=bundle,proto3" json:"bundle,omitempty"`
+ Pid uint32 `protobuf:"varint,3,opt,name=pid,proto3" json:"pid,omitempty"`
+ Status task.Status `protobuf:"varint,4,opt,name=status,proto3,enum=containerd.v1.types.Status" json:"status,omitempty"`
+ Stdin string `protobuf:"bytes,5,opt,name=stdin,proto3" json:"stdin,omitempty"`
+ Stdout string `protobuf:"bytes,6,opt,name=stdout,proto3" json:"stdout,omitempty"`
+ Stderr string `protobuf:"bytes,7,opt,name=stderr,proto3" json:"stderr,omitempty"`
+ Terminal bool `protobuf:"varint,8,opt,name=terminal,proto3" json:"terminal,omitempty"`
+ ExitStatus uint32 `protobuf:"varint,9,opt,name=exit_status,json=exitStatus,proto3" json:"exit_status,omitempty"`
+ ExitedAt time.Time `protobuf:"bytes,10,opt,name=exited_at,json=exitedAt,proto3,stdtime" json:"exited_at"`
+ ExecID string `protobuf:"bytes,11,opt,name=exec_id,json=execId,proto3" json:"exec_id,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *StateResponse) Reset() { *m = StateResponse{} }
-func (*StateResponse) ProtoMessage() {}
-func (*StateResponse) Descriptor() ([]byte, []int) { return fileDescriptorShim, []int{8} }
+func (m *StateResponse) Reset() { *m = StateResponse{} }
+func (*StateResponse) ProtoMessage() {}
+func (*StateResponse) Descriptor() ([]byte, []int) {
+ return fileDescriptor_9202ee34bc3ad8ca, []int{8}
+}
+func (m *StateResponse) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *StateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_StateResponse.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *StateResponse) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_StateResponse.Merge(m, src)
+}
+func (m *StateResponse) XXX_Size() int {
+ return m.Size()
+}
+func (m *StateResponse) XXX_DiscardUnknown() {
+ xxx_messageInfo_StateResponse.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_StateResponse proto.InternalMessageInfo
type KillRequest struct {
- ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
- ExecID string `protobuf:"bytes,2,opt,name=exec_id,json=execId,proto3" json:"exec_id,omitempty"`
- Signal uint32 `protobuf:"varint,3,opt,name=signal,proto3" json:"signal,omitempty"`
- All bool `protobuf:"varint,4,opt,name=all,proto3" json:"all,omitempty"`
+ ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ ExecID string `protobuf:"bytes,2,opt,name=exec_id,json=execId,proto3" json:"exec_id,omitempty"`
+ Signal uint32 `protobuf:"varint,3,opt,name=signal,proto3" json:"signal,omitempty"`
+ All bool `protobuf:"varint,4,opt,name=all,proto3" json:"all,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *KillRequest) Reset() { *m = KillRequest{} }
-func (*KillRequest) ProtoMessage() {}
-func (*KillRequest) Descriptor() ([]byte, []int) { return fileDescriptorShim, []int{9} }
+func (m *KillRequest) Reset() { *m = KillRequest{} }
+func (*KillRequest) ProtoMessage() {}
+func (*KillRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_9202ee34bc3ad8ca, []int{9}
+}
+func (m *KillRequest) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *KillRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_KillRequest.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *KillRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_KillRequest.Merge(m, src)
+}
+func (m *KillRequest) XXX_Size() int {
+ return m.Size()
+}
+func (m *KillRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_KillRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_KillRequest proto.InternalMessageInfo
type CloseIORequest struct {
- ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
- ExecID string `protobuf:"bytes,2,opt,name=exec_id,json=execId,proto3" json:"exec_id,omitempty"`
- Stdin bool `protobuf:"varint,3,opt,name=stdin,proto3" json:"stdin,omitempty"`
+ ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ ExecID string `protobuf:"bytes,2,opt,name=exec_id,json=execId,proto3" json:"exec_id,omitempty"`
+ Stdin bool `protobuf:"varint,3,opt,name=stdin,proto3" json:"stdin,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *CloseIORequest) Reset() { *m = CloseIORequest{} }
-func (*CloseIORequest) ProtoMessage() {}
-func (*CloseIORequest) Descriptor() ([]byte, []int) { return fileDescriptorShim, []int{10} }
+func (m *CloseIORequest) Reset() { *m = CloseIORequest{} }
+func (*CloseIORequest) ProtoMessage() {}
+func (*CloseIORequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_9202ee34bc3ad8ca, []int{10}
+}
+func (m *CloseIORequest) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *CloseIORequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_CloseIORequest.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *CloseIORequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_CloseIORequest.Merge(m, src)
+}
+func (m *CloseIORequest) XXX_Size() int {
+ return m.Size()
+}
+func (m *CloseIORequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_CloseIORequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_CloseIORequest proto.InternalMessageInfo
type PidsRequest struct {
- ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *PidsRequest) Reset() { *m = PidsRequest{} }
-func (*PidsRequest) ProtoMessage() {}
-func (*PidsRequest) Descriptor() ([]byte, []int) { return fileDescriptorShim, []int{11} }
+func (m *PidsRequest) Reset() { *m = PidsRequest{} }
+func (*PidsRequest) ProtoMessage() {}
+func (*PidsRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_9202ee34bc3ad8ca, []int{11}
+}
+func (m *PidsRequest) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *PidsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_PidsRequest.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *PidsRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_PidsRequest.Merge(m, src)
+}
+func (m *PidsRequest) XXX_Size() int {
+ return m.Size()
+}
+func (m *PidsRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_PidsRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_PidsRequest proto.InternalMessageInfo
type PidsResponse struct {
- Processes []*containerd_v1_types.ProcessInfo `protobuf:"bytes,1,rep,name=processes" json:"processes,omitempty"`
+ Processes []*task.ProcessInfo `protobuf:"bytes,1,rep,name=processes,proto3" json:"processes,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *PidsResponse) Reset() { *m = PidsResponse{} }
-func (*PidsResponse) ProtoMessage() {}
-func (*PidsResponse) Descriptor() ([]byte, []int) { return fileDescriptorShim, []int{12} }
+func (m *PidsResponse) Reset() { *m = PidsResponse{} }
+func (*PidsResponse) ProtoMessage() {}
+func (*PidsResponse) Descriptor() ([]byte, []int) {
+ return fileDescriptor_9202ee34bc3ad8ca, []int{12}
+}
+func (m *PidsResponse) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *PidsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_PidsResponse.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *PidsResponse) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_PidsResponse.Merge(m, src)
+}
+func (m *PidsResponse) XXX_Size() int {
+ return m.Size()
+}
+func (m *PidsResponse) XXX_DiscardUnknown() {
+ xxx_messageInfo_PidsResponse.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_PidsResponse proto.InternalMessageInfo
type CheckpointTaskRequest struct {
- ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
- Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"`
- Options *google_protobuf.Any `protobuf:"bytes,3,opt,name=options" json:"options,omitempty"`
+ ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"`
+ Options *types1.Any `protobuf:"bytes,3,opt,name=options,proto3" json:"options,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *CheckpointTaskRequest) Reset() { *m = CheckpointTaskRequest{} }
-func (*CheckpointTaskRequest) ProtoMessage() {}
-func (*CheckpointTaskRequest) Descriptor() ([]byte, []int) { return fileDescriptorShim, []int{13} }
+func (m *CheckpointTaskRequest) Reset() { *m = CheckpointTaskRequest{} }
+func (*CheckpointTaskRequest) ProtoMessage() {}
+func (*CheckpointTaskRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_9202ee34bc3ad8ca, []int{13}
+}
+func (m *CheckpointTaskRequest) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *CheckpointTaskRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_CheckpointTaskRequest.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *CheckpointTaskRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_CheckpointTaskRequest.Merge(m, src)
+}
+func (m *CheckpointTaskRequest) XXX_Size() int {
+ return m.Size()
+}
+func (m *CheckpointTaskRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_CheckpointTaskRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_CheckpointTaskRequest proto.InternalMessageInfo
type UpdateTaskRequest struct {
- ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
- Resources *google_protobuf.Any `protobuf:"bytes,2,opt,name=resources" json:"resources,omitempty"`
+ ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ Resources *types1.Any `protobuf:"bytes,2,opt,name=resources,proto3" json:"resources,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *UpdateTaskRequest) Reset() { *m = UpdateTaskRequest{} }
-func (*UpdateTaskRequest) ProtoMessage() {}
-func (*UpdateTaskRequest) Descriptor() ([]byte, []int) { return fileDescriptorShim, []int{14} }
+func (m *UpdateTaskRequest) Reset() { *m = UpdateTaskRequest{} }
+func (*UpdateTaskRequest) ProtoMessage() {}
+func (*UpdateTaskRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_9202ee34bc3ad8ca, []int{14}
+}
+func (m *UpdateTaskRequest) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *UpdateTaskRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_UpdateTaskRequest.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *UpdateTaskRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_UpdateTaskRequest.Merge(m, src)
+}
+func (m *UpdateTaskRequest) XXX_Size() int {
+ return m.Size()
+}
+func (m *UpdateTaskRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_UpdateTaskRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_UpdateTaskRequest proto.InternalMessageInfo
type StartRequest struct {
- ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
- ExecID string `protobuf:"bytes,2,opt,name=exec_id,json=execId,proto3" json:"exec_id,omitempty"`
+ ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ ExecID string `protobuf:"bytes,2,opt,name=exec_id,json=execId,proto3" json:"exec_id,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *StartRequest) Reset() { *m = StartRequest{} }
-func (*StartRequest) ProtoMessage() {}
-func (*StartRequest) Descriptor() ([]byte, []int) { return fileDescriptorShim, []int{15} }
+func (m *StartRequest) Reset() { *m = StartRequest{} }
+func (*StartRequest) ProtoMessage() {}
+func (*StartRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_9202ee34bc3ad8ca, []int{15}
+}
+func (m *StartRequest) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *StartRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_StartRequest.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *StartRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_StartRequest.Merge(m, src)
+}
+func (m *StartRequest) XXX_Size() int {
+ return m.Size()
+}
+func (m *StartRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_StartRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_StartRequest proto.InternalMessageInfo
type StartResponse struct {
- Pid uint32 `protobuf:"varint,1,opt,name=pid,proto3" json:"pid,omitempty"`
+ Pid uint32 `protobuf:"varint,1,opt,name=pid,proto3" json:"pid,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *StartResponse) Reset() { *m = StartResponse{} }
-func (*StartResponse) ProtoMessage() {}
-func (*StartResponse) Descriptor() ([]byte, []int) { return fileDescriptorShim, []int{16} }
+func (m *StartResponse) Reset() { *m = StartResponse{} }
+func (*StartResponse) ProtoMessage() {}
+func (*StartResponse) Descriptor() ([]byte, []int) {
+ return fileDescriptor_9202ee34bc3ad8ca, []int{16}
+}
+func (m *StartResponse) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *StartResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_StartResponse.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *StartResponse) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_StartResponse.Merge(m, src)
+}
+func (m *StartResponse) XXX_Size() int {
+ return m.Size()
+}
+func (m *StartResponse) XXX_DiscardUnknown() {
+ xxx_messageInfo_StartResponse.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_StartResponse proto.InternalMessageInfo
type WaitRequest struct {
- ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
- ExecID string `protobuf:"bytes,2,opt,name=exec_id,json=execId,proto3" json:"exec_id,omitempty"`
+ ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ ExecID string `protobuf:"bytes,2,opt,name=exec_id,json=execId,proto3" json:"exec_id,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *WaitRequest) Reset() { *m = WaitRequest{} }
-func (*WaitRequest) ProtoMessage() {}
-func (*WaitRequest) Descriptor() ([]byte, []int) { return fileDescriptorShim, []int{17} }
+func (m *WaitRequest) Reset() { *m = WaitRequest{} }
+func (*WaitRequest) ProtoMessage() {}
+func (*WaitRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_9202ee34bc3ad8ca, []int{17}
+}
+func (m *WaitRequest) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *WaitRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_WaitRequest.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *WaitRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_WaitRequest.Merge(m, src)
+}
+func (m *WaitRequest) XXX_Size() int {
+ return m.Size()
+}
+func (m *WaitRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_WaitRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_WaitRequest proto.InternalMessageInfo
type WaitResponse struct {
- ExitStatus uint32 `protobuf:"varint,1,opt,name=exit_status,json=exitStatus,proto3" json:"exit_status,omitempty"`
- ExitedAt time.Time `protobuf:"bytes,2,opt,name=exited_at,json=exitedAt,stdtime" json:"exited_at"`
+ ExitStatus uint32 `protobuf:"varint,1,opt,name=exit_status,json=exitStatus,proto3" json:"exit_status,omitempty"`
+ ExitedAt time.Time `protobuf:"bytes,2,opt,name=exited_at,json=exitedAt,proto3,stdtime" json:"exited_at"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *WaitResponse) Reset() { *m = WaitResponse{} }
-func (*WaitResponse) ProtoMessage() {}
-func (*WaitResponse) Descriptor() ([]byte, []int) { return fileDescriptorShim, []int{18} }
+func (m *WaitResponse) Reset() { *m = WaitResponse{} }
+func (*WaitResponse) ProtoMessage() {}
+func (*WaitResponse) Descriptor() ([]byte, []int) {
+ return fileDescriptor_9202ee34bc3ad8ca, []int{18}
+}
+func (m *WaitResponse) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *WaitResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_WaitResponse.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *WaitResponse) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_WaitResponse.Merge(m, src)
+}
+func (m *WaitResponse) XXX_Size() int {
+ return m.Size()
+}
+func (m *WaitResponse) XXX_DiscardUnknown() {
+ xxx_messageInfo_WaitResponse.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_WaitResponse proto.InternalMessageInfo
type StatsRequest struct {
- ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *StatsRequest) Reset() { *m = StatsRequest{} }
-func (*StatsRequest) ProtoMessage() {}
-func (*StatsRequest) Descriptor() ([]byte, []int) { return fileDescriptorShim, []int{19} }
+func (m *StatsRequest) Reset() { *m = StatsRequest{} }
+func (*StatsRequest) ProtoMessage() {}
+func (*StatsRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_9202ee34bc3ad8ca, []int{19}
+}
+func (m *StatsRequest) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *StatsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_StatsRequest.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *StatsRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_StatsRequest.Merge(m, src)
+}
+func (m *StatsRequest) XXX_Size() int {
+ return m.Size()
+}
+func (m *StatsRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_StatsRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_StatsRequest proto.InternalMessageInfo
type StatsResponse struct {
- Stats *google_protobuf.Any `protobuf:"bytes,1,opt,name=stats" json:"stats,omitempty"`
+ Stats *types1.Any `protobuf:"bytes,1,opt,name=stats,proto3" json:"stats,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *StatsResponse) Reset() { *m = StatsResponse{} }
-func (*StatsResponse) ProtoMessage() {}
-func (*StatsResponse) Descriptor() ([]byte, []int) { return fileDescriptorShim, []int{20} }
+func (m *StatsResponse) Reset() { *m = StatsResponse{} }
+func (*StatsResponse) ProtoMessage() {}
+func (*StatsResponse) Descriptor() ([]byte, []int) {
+ return fileDescriptor_9202ee34bc3ad8ca, []int{20}
+}
+func (m *StatsResponse) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *StatsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_StatsResponse.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *StatsResponse) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_StatsResponse.Merge(m, src)
+}
+func (m *StatsResponse) XXX_Size() int {
+ return m.Size()
+}
+func (m *StatsResponse) XXX_DiscardUnknown() {
+ xxx_messageInfo_StatsResponse.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_StatsResponse proto.InternalMessageInfo
type ConnectRequest struct {
- ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *ConnectRequest) Reset() { *m = ConnectRequest{} }
-func (*ConnectRequest) ProtoMessage() {}
-func (*ConnectRequest) Descriptor() ([]byte, []int) { return fileDescriptorShim, []int{21} }
+func (m *ConnectRequest) Reset() { *m = ConnectRequest{} }
+func (*ConnectRequest) ProtoMessage() {}
+func (*ConnectRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_9202ee34bc3ad8ca, []int{21}
+}
+func (m *ConnectRequest) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *ConnectRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_ConnectRequest.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *ConnectRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_ConnectRequest.Merge(m, src)
+}
+func (m *ConnectRequest) XXX_Size() int {
+ return m.Size()
+}
+func (m *ConnectRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_ConnectRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_ConnectRequest proto.InternalMessageInfo
type ConnectResponse struct {
- ShimPid uint32 `protobuf:"varint,1,opt,name=shim_pid,json=shimPid,proto3" json:"shim_pid,omitempty"`
- TaskPid uint32 `protobuf:"varint,2,opt,name=task_pid,json=taskPid,proto3" json:"task_pid,omitempty"`
- Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"`
+ ShimPid uint32 `protobuf:"varint,1,opt,name=shim_pid,json=shimPid,proto3" json:"shim_pid,omitempty"`
+ TaskPid uint32 `protobuf:"varint,2,opt,name=task_pid,json=taskPid,proto3" json:"task_pid,omitempty"`
+ Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *ConnectResponse) Reset() { *m = ConnectResponse{} }
-func (*ConnectResponse) ProtoMessage() {}
-func (*ConnectResponse) Descriptor() ([]byte, []int) { return fileDescriptorShim, []int{22} }
+func (m *ConnectResponse) Reset() { *m = ConnectResponse{} }
+func (*ConnectResponse) ProtoMessage() {}
+func (*ConnectResponse) Descriptor() ([]byte, []int) {
+ return fileDescriptor_9202ee34bc3ad8ca, []int{22}
+}
+func (m *ConnectResponse) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *ConnectResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_ConnectResponse.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *ConnectResponse) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_ConnectResponse.Merge(m, src)
+}
+func (m *ConnectResponse) XXX_Size() int {
+ return m.Size()
+}
+func (m *ConnectResponse) XXX_DiscardUnknown() {
+ xxx_messageInfo_ConnectResponse.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_ConnectResponse proto.InternalMessageInfo
type ShutdownRequest struct {
- ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
- Now bool `protobuf:"varint,2,opt,name=now,proto3" json:"now,omitempty"`
+ ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ Now bool `protobuf:"varint,2,opt,name=now,proto3" json:"now,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *ShutdownRequest) Reset() { *m = ShutdownRequest{} }
-func (*ShutdownRequest) ProtoMessage() {}
-func (*ShutdownRequest) Descriptor() ([]byte, []int) { return fileDescriptorShim, []int{23} }
+func (m *ShutdownRequest) Reset() { *m = ShutdownRequest{} }
+func (*ShutdownRequest) ProtoMessage() {}
+func (*ShutdownRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_9202ee34bc3ad8ca, []int{23}
+}
+func (m *ShutdownRequest) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *ShutdownRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_ShutdownRequest.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *ShutdownRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_ShutdownRequest.Merge(m, src)
+}
+func (m *ShutdownRequest) XXX_Size() int {
+ return m.Size()
+}
+func (m *ShutdownRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_ShutdownRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_ShutdownRequest proto.InternalMessageInfo
type PauseRequest struct {
- ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *PauseRequest) Reset() { *m = PauseRequest{} }
-func (*PauseRequest) ProtoMessage() {}
-func (*PauseRequest) Descriptor() ([]byte, []int) { return fileDescriptorShim, []int{24} }
+func (m *PauseRequest) Reset() { *m = PauseRequest{} }
+func (*PauseRequest) ProtoMessage() {}
+func (*PauseRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_9202ee34bc3ad8ca, []int{24}
+}
+func (m *PauseRequest) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *PauseRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_PauseRequest.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *PauseRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_PauseRequest.Merge(m, src)
+}
+func (m *PauseRequest) XXX_Size() int {
+ return m.Size()
+}
+func (m *PauseRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_PauseRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_PauseRequest proto.InternalMessageInfo
type ResumeRequest struct {
- ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *ResumeRequest) Reset() { *m = ResumeRequest{} }
-func (*ResumeRequest) ProtoMessage() {}
-func (*ResumeRequest) Descriptor() ([]byte, []int) { return fileDescriptorShim, []int{25} }
+func (m *ResumeRequest) Reset() { *m = ResumeRequest{} }
+func (*ResumeRequest) ProtoMessage() {}
+func (*ResumeRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_9202ee34bc3ad8ca, []int{25}
+}
+func (m *ResumeRequest) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *ResumeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_ResumeRequest.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *ResumeRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_ResumeRequest.Merge(m, src)
+}
+func (m *ResumeRequest) XXX_Size() int {
+ return m.Size()
+}
+func (m *ResumeRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_ResumeRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_ResumeRequest proto.InternalMessageInfo
func init() {
proto.RegisterType((*CreateTaskRequest)(nil), "containerd.task.v2.CreateTaskRequest")
@@ -353,6 +1118,93 @@ func init() {
proto.RegisterType((*PauseRequest)(nil), "containerd.task.v2.PauseRequest")
proto.RegisterType((*ResumeRequest)(nil), "containerd.task.v2.ResumeRequest")
}
+
+func init() {
+ proto.RegisterFile("github.com/containerd/containerd/runtime/v2/task/shim.proto", fileDescriptor_9202ee34bc3ad8ca)
+}
+
+var fileDescriptor_9202ee34bc3ad8ca = []byte{
+ // 1246 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x58, 0x5d, 0x6f, 0x1b, 0x45,
+ 0x17, 0xee, 0xfa, 0x63, 0x6d, 0x1f, 0xd7, 0x69, 0x3a, 0x6f, 0x9a, 0x77, 0xeb, 0x4a, 0xb6, 0xbb,
+ 0xa5, 0xc1, 0x80, 0x64, 0x0b, 0x57, 0x70, 0x41, 0x24, 0x50, 0xbe, 0xa8, 0x4c, 0x0b, 0x89, 0xb6,
+ 0x45, 0x45, 0xdc, 0x58, 0x1b, 0xef, 0xc4, 0x5e, 0xc5, 0xde, 0x59, 0x76, 0x66, 0xf3, 0x81, 0x84,
+ 0xc4, 0x15, 0x17, 0x5c, 0xf1, 0xb3, 0x72, 0x89, 0xc4, 0x0d, 0x37, 0x04, 0xea, 0x7f, 0xc0, 0x3f,
+ 0x40, 0xf3, 0xe1, 0x78, 0xed, 0xec, 0xda, 0x49, 0xe5, 0x9b, 0x68, 0xce,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0xc2, 0x40, 0x17, 0x0a, 0xc3, 0x84, 0xd5, 0x16, 0xe4, 0x94, 0xc0,
+ 0x26, 0x24, 0x6a, 0x4a, 0xa7, 0xcb, 0x4f, 0xe6, 0x62, 0x94, 0xcf, 0xe7, 0x90, 0x1f, 0x2b, 0x2a,
+ 0x8a, 0x5d, 0x30, 0xa3, 0xb7, 0x49, 0x59, 0xdb, 0xde, 0xbf, 0x78, 0x5b, 0xb9, 0xf3, 0xe7, 0xdb,
+ 0xca, 0x9d, 0x9f, 0x47, 0x15, 0xed, 0x62, 0x54, 0xd1, 0x7e, 0x1f, 0x55, 0xb4, 0x7f, 0x46, 0x15,
+ 0xed, 0xfb, 0x4f, 0x6e, 0xfb, 0xf3, 0xc5, 0x26, 0xff, 0xf3, 0x5d, 0xea, 0x50, 0x17, 0x5b, 0x3c,
+ 0xfb, 0x2f, 0x00, 0x00, 0xff, 0xff, 0x19, 0x17, 0x87, 0x57, 0x00, 0x11, 0x00, 0x00,
+}
+
func (m *CreateTaskRequest) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
@@ -442,6 +1294,9 @@ func (m *CreateTaskRequest) MarshalTo(dAtA []byte) (int, error) {
}
i += n1
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -465,6 +1320,9 @@ func (m *CreateTaskResponse) MarshalTo(dAtA []byte) (int, error) {
i++
i = encodeVarintShim(dAtA, i, uint64(m.Pid))
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -495,6 +1353,9 @@ func (m *DeleteRequest) MarshalTo(dAtA []byte) (int, error) {
i = encodeVarintShim(dAtA, i, uint64(len(m.ExecID)))
i += copy(dAtA[i:], m.ExecID)
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -525,12 +1386,15 @@ func (m *DeleteResponse) MarshalTo(dAtA []byte) (int, error) {
}
dAtA[i] = 0x1a
i++
- i = encodeVarintShim(dAtA, i, uint64(types.SizeOfStdTime(m.ExitedAt)))
- n2, err := types.StdTimeMarshalTo(m.ExitedAt, dAtA[i:])
+ i = encodeVarintShim(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.ExitedAt)))
+ n2, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.ExitedAt, dAtA[i:])
if err != nil {
return 0, err
}
i += n2
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -599,6 +1463,9 @@ func (m *ExecProcessRequest) MarshalTo(dAtA []byte) (int, error) {
}
i += n3
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -617,6 +1484,9 @@ func (m *ExecProcessResponse) MarshalTo(dAtA []byte) (int, error) {
_ = i
var l int
_ = l
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -657,6 +1527,9 @@ func (m *ResizePtyRequest) MarshalTo(dAtA []byte) (int, error) {
i++
i = encodeVarintShim(dAtA, i, uint64(m.Height))
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -687,6 +1560,9 @@ func (m *StateRequest) MarshalTo(dAtA []byte) (int, error) {
i = encodeVarintShim(dAtA, i, uint64(len(m.ExecID)))
i += copy(dAtA[i:], m.ExecID)
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -762,8 +1638,8 @@ func (m *StateResponse) MarshalTo(dAtA []byte) (int, error) {
}
dAtA[i] = 0x52
i++
- i = encodeVarintShim(dAtA, i, uint64(types.SizeOfStdTime(m.ExitedAt)))
- n4, err := types.StdTimeMarshalTo(m.ExitedAt, dAtA[i:])
+ i = encodeVarintShim(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.ExitedAt)))
+ n4, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.ExitedAt, dAtA[i:])
if err != nil {
return 0, err
}
@@ -774,6 +1650,9 @@ func (m *StateResponse) MarshalTo(dAtA []byte) (int, error) {
i = encodeVarintShim(dAtA, i, uint64(len(m.ExecID)))
i += copy(dAtA[i:], m.ExecID)
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -819,6 +1698,9 @@ func (m *KillRequest) MarshalTo(dAtA []byte) (int, error) {
}
i++
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -859,6 +1741,9 @@ func (m *CloseIORequest) MarshalTo(dAtA []byte) (int, error) {
}
i++
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -883,6 +1768,9 @@ func (m *PidsRequest) MarshalTo(dAtA []byte) (int, error) {
i = encodeVarintShim(dAtA, i, uint64(len(m.ID)))
i += copy(dAtA[i:], m.ID)
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -913,6 +1801,9 @@ func (m *PidsResponse) MarshalTo(dAtA []byte) (int, error) {
i += n
}
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -953,6 +1844,9 @@ func (m *CheckpointTaskRequest) MarshalTo(dAtA []byte) (int, error) {
}
i += n5
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -987,6 +1881,9 @@ func (m *UpdateTaskRequest) MarshalTo(dAtA []byte) (int, error) {
}
i += n6
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -1017,6 +1914,9 @@ func (m *StartRequest) MarshalTo(dAtA []byte) (int, error) {
i = encodeVarintShim(dAtA, i, uint64(len(m.ExecID)))
i += copy(dAtA[i:], m.ExecID)
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -1040,6 +1940,9 @@ func (m *StartResponse) MarshalTo(dAtA []byte) (int, error) {
i++
i = encodeVarintShim(dAtA, i, uint64(m.Pid))
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -1070,6 +1973,9 @@ func (m *WaitRequest) MarshalTo(dAtA []byte) (int, error) {
i = encodeVarintShim(dAtA, i, uint64(len(m.ExecID)))
i += copy(dAtA[i:], m.ExecID)
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -1095,12 +2001,15 @@ func (m *WaitResponse) MarshalTo(dAtA []byte) (int, error) {
}
dAtA[i] = 0x12
i++
- i = encodeVarintShim(dAtA, i, uint64(types.SizeOfStdTime(m.ExitedAt)))
- n7, err := types.StdTimeMarshalTo(m.ExitedAt, dAtA[i:])
+ i = encodeVarintShim(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.ExitedAt)))
+ n7, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.ExitedAt, dAtA[i:])
if err != nil {
return 0, err
}
i += n7
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -1125,6 +2034,9 @@ func (m *StatsRequest) MarshalTo(dAtA []byte) (int, error) {
i = encodeVarintShim(dAtA, i, uint64(len(m.ID)))
i += copy(dAtA[i:], m.ID)
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -1153,6 +2065,9 @@ func (m *StatsResponse) MarshalTo(dAtA []byte) (int, error) {
}
i += n8
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -1177,6 +2092,9 @@ func (m *ConnectRequest) MarshalTo(dAtA []byte) (int, error) {
i = encodeVarintShim(dAtA, i, uint64(len(m.ID)))
i += copy(dAtA[i:], m.ID)
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -1211,6 +2129,9 @@ func (m *ConnectResponse) MarshalTo(dAtA []byte) (int, error) {
i = encodeVarintShim(dAtA, i, uint64(len(m.Version)))
i += copy(dAtA[i:], m.Version)
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -1245,6 +2166,9 @@ func (m *ShutdownRequest) MarshalTo(dAtA []byte) (int, error) {
}
i++
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -1269,6 +2193,9 @@ func (m *PauseRequest) MarshalTo(dAtA []byte) (int, error) {
i = encodeVarintShim(dAtA, i, uint64(len(m.ID)))
i += copy(dAtA[i:], m.ID)
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -1293,6 +2220,9 @@ func (m *ResumeRequest) MarshalTo(dAtA []byte) (int, error) {
i = encodeVarintShim(dAtA, i, uint64(len(m.ID)))
i += copy(dAtA[i:], m.ID)
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -1306,6 +2236,9 @@ func encodeVarintShim(dAtA []byte, offset int, v uint64) int {
return offset + 1
}
func (m *CreateTaskRequest) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.ID)
@@ -1349,19 +2282,31 @@ func (m *CreateTaskRequest) Size() (n int) {
l = m.Options.Size()
n += 1 + l + sovShim(uint64(l))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *CreateTaskResponse) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
if m.Pid != 0 {
n += 1 + sovShim(uint64(m.Pid))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *DeleteRequest) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.ID)
@@ -1372,10 +2317,16 @@ func (m *DeleteRequest) Size() (n int) {
if l > 0 {
n += 1 + l + sovShim(uint64(l))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *DeleteResponse) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
if m.Pid != 0 {
@@ -1384,12 +2335,18 @@ func (m *DeleteResponse) Size() (n int) {
if m.ExitStatus != 0 {
n += 1 + sovShim(uint64(m.ExitStatus))
}
- l = types.SizeOfStdTime(m.ExitedAt)
+ l = github_com_gogo_protobuf_types.SizeOfStdTime(m.ExitedAt)
n += 1 + l + sovShim(uint64(l))
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *ExecProcessRequest) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.ID)
@@ -1419,16 +2376,28 @@ func (m *ExecProcessRequest) Size() (n int) {
l = m.Spec.Size()
n += 1 + l + sovShim(uint64(l))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *ExecProcessResponse) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *ResizePtyRequest) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.ID)
@@ -1445,10 +2414,16 @@ func (m *ResizePtyRequest) Size() (n int) {
if m.Height != 0 {
n += 1 + sovShim(uint64(m.Height))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *StateRequest) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.ID)
@@ -1459,10 +2434,16 @@ func (m *StateRequest) Size() (n int) {
if l > 0 {
n += 1 + l + sovShim(uint64(l))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *StateResponse) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.ID)
@@ -1497,16 +2478,22 @@ func (m *StateResponse) Size() (n int) {
if m.ExitStatus != 0 {
n += 1 + sovShim(uint64(m.ExitStatus))
}
- l = types.SizeOfStdTime(m.ExitedAt)
+ l = github_com_gogo_protobuf_types.SizeOfStdTime(m.ExitedAt)
n += 1 + l + sovShim(uint64(l))
l = len(m.ExecID)
if l > 0 {
n += 1 + l + sovShim(uint64(l))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *KillRequest) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.ID)
@@ -1523,10 +2510,16 @@ func (m *KillRequest) Size() (n int) {
if m.All {
n += 2
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *CloseIORequest) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.ID)
@@ -1540,20 +2533,32 @@ func (m *CloseIORequest) Size() (n int) {
if m.Stdin {
n += 2
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *PidsRequest) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.ID)
if l > 0 {
n += 1 + l + sovShim(uint64(l))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *PidsResponse) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
if len(m.Processes) > 0 {
@@ -1562,10 +2567,16 @@ func (m *PidsResponse) Size() (n int) {
n += 1 + l + sovShim(uint64(l))
}
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *CheckpointTaskRequest) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.ID)
@@ -1580,10 +2591,16 @@ func (m *CheckpointTaskRequest) Size() (n int) {
l = m.Options.Size()
n += 1 + l + sovShim(uint64(l))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *UpdateTaskRequest) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.ID)
@@ -1594,10 +2611,16 @@ func (m *UpdateTaskRequest) Size() (n int) {
l = m.Resources.Size()
n += 1 + l + sovShim(uint64(l))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *StartRequest) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.ID)
@@ -1608,19 +2631,31 @@ func (m *StartRequest) Size() (n int) {
if l > 0 {
n += 1 + l + sovShim(uint64(l))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *StartResponse) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
if m.Pid != 0 {
n += 1 + sovShim(uint64(m.Pid))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *WaitRequest) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.ID)
@@ -1631,51 +2666,81 @@ func (m *WaitRequest) Size() (n int) {
if l > 0 {
n += 1 + l + sovShim(uint64(l))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *WaitResponse) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
if m.ExitStatus != 0 {
n += 1 + sovShim(uint64(m.ExitStatus))
}
- l = types.SizeOfStdTime(m.ExitedAt)
+ l = github_com_gogo_protobuf_types.SizeOfStdTime(m.ExitedAt)
n += 1 + l + sovShim(uint64(l))
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *StatsRequest) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.ID)
if l > 0 {
n += 1 + l + sovShim(uint64(l))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *StatsResponse) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
if m.Stats != nil {
l = m.Stats.Size()
n += 1 + l + sovShim(uint64(l))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *ConnectRequest) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.ID)
if l > 0 {
n += 1 + l + sovShim(uint64(l))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *ConnectResponse) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
if m.ShimPid != 0 {
@@ -1688,10 +2753,16 @@ func (m *ConnectResponse) Size() (n int) {
if l > 0 {
n += 1 + l + sovShim(uint64(l))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *ShutdownRequest) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.ID)
@@ -1701,26 +2772,41 @@ func (m *ShutdownRequest) Size() (n int) {
if m.Now {
n += 2
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *PauseRequest) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.ID)
if l > 0 {
n += 1 + l + sovShim(uint64(l))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *ResumeRequest) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.ID)
if l > 0 {
n += 1 + l + sovShim(uint64(l))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
@@ -1744,14 +2830,15 @@ func (this *CreateTaskRequest) String() string {
s := strings.Join([]string{`&CreateTaskRequest{`,
`ID:` + fmt.Sprintf("%v", this.ID) + `,`,
`Bundle:` + fmt.Sprintf("%v", this.Bundle) + `,`,
- `Rootfs:` + strings.Replace(fmt.Sprintf("%v", this.Rootfs), "Mount", "containerd_types.Mount", 1) + `,`,
+ `Rootfs:` + strings.Replace(fmt.Sprintf("%v", this.Rootfs), "Mount", "types.Mount", 1) + `,`,
`Terminal:` + fmt.Sprintf("%v", this.Terminal) + `,`,
`Stdin:` + fmt.Sprintf("%v", this.Stdin) + `,`,
`Stdout:` + fmt.Sprintf("%v", this.Stdout) + `,`,
`Stderr:` + fmt.Sprintf("%v", this.Stderr) + `,`,
`Checkpoint:` + fmt.Sprintf("%v", this.Checkpoint) + `,`,
`ParentCheckpoint:` + fmt.Sprintf("%v", this.ParentCheckpoint) + `,`,
- `Options:` + strings.Replace(fmt.Sprintf("%v", this.Options), "Any", "google_protobuf.Any", 1) + `,`,
+ `Options:` + strings.Replace(fmt.Sprintf("%v", this.Options), "Any", "types1.Any", 1) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -1762,6 +2849,7 @@ func (this *CreateTaskResponse) String() string {
}
s := strings.Join([]string{`&CreateTaskResponse{`,
`Pid:` + fmt.Sprintf("%v", this.Pid) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -1773,6 +2861,7 @@ func (this *DeleteRequest) String() string {
s := strings.Join([]string{`&DeleteRequest{`,
`ID:` + fmt.Sprintf("%v", this.ID) + `,`,
`ExecID:` + fmt.Sprintf("%v", this.ExecID) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -1784,7 +2873,8 @@ func (this *DeleteResponse) String() string {
s := strings.Join([]string{`&DeleteResponse{`,
`Pid:` + fmt.Sprintf("%v", this.Pid) + `,`,
`ExitStatus:` + fmt.Sprintf("%v", this.ExitStatus) + `,`,
- `ExitedAt:` + strings.Replace(strings.Replace(this.ExitedAt.String(), "Timestamp", "google_protobuf3.Timestamp", 1), `&`, ``, 1) + `,`,
+ `ExitedAt:` + strings.Replace(strings.Replace(this.ExitedAt.String(), "Timestamp", "types1.Timestamp", 1), `&`, ``, 1) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -1800,7 +2890,8 @@ func (this *ExecProcessRequest) String() string {
`Stdin:` + fmt.Sprintf("%v", this.Stdin) + `,`,
`Stdout:` + fmt.Sprintf("%v", this.Stdout) + `,`,
`Stderr:` + fmt.Sprintf("%v", this.Stderr) + `,`,
- `Spec:` + strings.Replace(fmt.Sprintf("%v", this.Spec), "Any", "google_protobuf.Any", 1) + `,`,
+ `Spec:` + strings.Replace(fmt.Sprintf("%v", this.Spec), "Any", "types1.Any", 1) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -1810,6 +2901,7 @@ func (this *ExecProcessResponse) String() string {
return "nil"
}
s := strings.Join([]string{`&ExecProcessResponse{`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -1823,6 +2915,7 @@ func (this *ResizePtyRequest) String() string {
`ExecID:` + fmt.Sprintf("%v", this.ExecID) + `,`,
`Width:` + fmt.Sprintf("%v", this.Width) + `,`,
`Height:` + fmt.Sprintf("%v", this.Height) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -1834,6 +2927,7 @@ func (this *StateRequest) String() string {
s := strings.Join([]string{`&StateRequest{`,
`ID:` + fmt.Sprintf("%v", this.ID) + `,`,
`ExecID:` + fmt.Sprintf("%v", this.ExecID) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -1852,8 +2946,9 @@ func (this *StateResponse) String() string {
`Stderr:` + fmt.Sprintf("%v", this.Stderr) + `,`,
`Terminal:` + fmt.Sprintf("%v", this.Terminal) + `,`,
`ExitStatus:` + fmt.Sprintf("%v", this.ExitStatus) + `,`,
- `ExitedAt:` + strings.Replace(strings.Replace(this.ExitedAt.String(), "Timestamp", "google_protobuf3.Timestamp", 1), `&`, ``, 1) + `,`,
+ `ExitedAt:` + strings.Replace(strings.Replace(this.ExitedAt.String(), "Timestamp", "types1.Timestamp", 1), `&`, ``, 1) + `,`,
`ExecID:` + fmt.Sprintf("%v", this.ExecID) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -1867,6 +2962,7 @@ func (this *KillRequest) String() string {
`ExecID:` + fmt.Sprintf("%v", this.ExecID) + `,`,
`Signal:` + fmt.Sprintf("%v", this.Signal) + `,`,
`All:` + fmt.Sprintf("%v", this.All) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -1879,6 +2975,7 @@ func (this *CloseIORequest) String() string {
`ID:` + fmt.Sprintf("%v", this.ID) + `,`,
`ExecID:` + fmt.Sprintf("%v", this.ExecID) + `,`,
`Stdin:` + fmt.Sprintf("%v", this.Stdin) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -1889,6 +2986,7 @@ func (this *PidsRequest) String() string {
}
s := strings.Join([]string{`&PidsRequest{`,
`ID:` + fmt.Sprintf("%v", this.ID) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -1898,7 +2996,8 @@ func (this *PidsResponse) String() string {
return "nil"
}
s := strings.Join([]string{`&PidsResponse{`,
- `Processes:` + strings.Replace(fmt.Sprintf("%v", this.Processes), "ProcessInfo", "containerd_v1_types.ProcessInfo", 1) + `,`,
+ `Processes:` + strings.Replace(fmt.Sprintf("%v", this.Processes), "ProcessInfo", "task.ProcessInfo", 1) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -1910,7 +3009,8 @@ func (this *CheckpointTaskRequest) String() string {
s := strings.Join([]string{`&CheckpointTaskRequest{`,
`ID:` + fmt.Sprintf("%v", this.ID) + `,`,
`Path:` + fmt.Sprintf("%v", this.Path) + `,`,
- `Options:` + strings.Replace(fmt.Sprintf("%v", this.Options), "Any", "google_protobuf.Any", 1) + `,`,
+ `Options:` + strings.Replace(fmt.Sprintf("%v", this.Options), "Any", "types1.Any", 1) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -1921,7 +3021,8 @@ func (this *UpdateTaskRequest) String() string {
}
s := strings.Join([]string{`&UpdateTaskRequest{`,
`ID:` + fmt.Sprintf("%v", this.ID) + `,`,
- `Resources:` + strings.Replace(fmt.Sprintf("%v", this.Resources), "Any", "google_protobuf.Any", 1) + `,`,
+ `Resources:` + strings.Replace(fmt.Sprintf("%v", this.Resources), "Any", "types1.Any", 1) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -1933,6 +3034,7 @@ func (this *StartRequest) String() string {
s := strings.Join([]string{`&StartRequest{`,
`ID:` + fmt.Sprintf("%v", this.ID) + `,`,
`ExecID:` + fmt.Sprintf("%v", this.ExecID) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -1943,6 +3045,7 @@ func (this *StartResponse) String() string {
}
s := strings.Join([]string{`&StartResponse{`,
`Pid:` + fmt.Sprintf("%v", this.Pid) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -1954,6 +3057,7 @@ func (this *WaitRequest) String() string {
s := strings.Join([]string{`&WaitRequest{`,
`ID:` + fmt.Sprintf("%v", this.ID) + `,`,
`ExecID:` + fmt.Sprintf("%v", this.ExecID) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -1964,7 +3068,8 @@ func (this *WaitResponse) String() string {
}
s := strings.Join([]string{`&WaitResponse{`,
`ExitStatus:` + fmt.Sprintf("%v", this.ExitStatus) + `,`,
- `ExitedAt:` + strings.Replace(strings.Replace(this.ExitedAt.String(), "Timestamp", "google_protobuf3.Timestamp", 1), `&`, ``, 1) + `,`,
+ `ExitedAt:` + strings.Replace(strings.Replace(this.ExitedAt.String(), "Timestamp", "types1.Timestamp", 1), `&`, ``, 1) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -1975,6 +3080,7 @@ func (this *StatsRequest) String() string {
}
s := strings.Join([]string{`&StatsRequest{`,
`ID:` + fmt.Sprintf("%v", this.ID) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -1984,7 +3090,8 @@ func (this *StatsResponse) String() string {
return "nil"
}
s := strings.Join([]string{`&StatsResponse{`,
- `Stats:` + strings.Replace(fmt.Sprintf("%v", this.Stats), "Any", "google_protobuf.Any", 1) + `,`,
+ `Stats:` + strings.Replace(fmt.Sprintf("%v", this.Stats), "Any", "types1.Any", 1) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -1995,6 +3102,7 @@ func (this *ConnectRequest) String() string {
}
s := strings.Join([]string{`&ConnectRequest{`,
`ID:` + fmt.Sprintf("%v", this.ID) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -2007,6 +3115,7 @@ func (this *ConnectResponse) String() string {
`ShimPid:` + fmt.Sprintf("%v", this.ShimPid) + `,`,
`TaskPid:` + fmt.Sprintf("%v", this.TaskPid) + `,`,
`Version:` + fmt.Sprintf("%v", this.Version) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -2018,6 +3127,7 @@ func (this *ShutdownRequest) String() string {
s := strings.Join([]string{`&ShutdownRequest{`,
`ID:` + fmt.Sprintf("%v", this.ID) + `,`,
`Now:` + fmt.Sprintf("%v", this.Now) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -2028,6 +3138,7 @@ func (this *PauseRequest) String() string {
}
s := strings.Join([]string{`&PauseRequest{`,
`ID:` + fmt.Sprintf("%v", this.ID) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -2038,6 +3149,7 @@ func (this *ResumeRequest) String() string {
}
s := strings.Join([]string{`&ResumeRequest{`,
`ID:` + fmt.Sprintf("%v", this.ID) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -2057,22 +3169,22 @@ type TaskService interface {
Start(ctx context.Context, req *StartRequest) (*StartResponse, error)
Delete(ctx context.Context, req *DeleteRequest) (*DeleteResponse, error)
Pids(ctx context.Context, req *PidsRequest) (*PidsResponse, error)
- Pause(ctx context.Context, req *PauseRequest) (*google_protobuf1.Empty, error)
- Resume(ctx context.Context, req *ResumeRequest) (*google_protobuf1.Empty, error)
- Checkpoint(ctx context.Context, req *CheckpointTaskRequest) (*google_protobuf1.Empty, error)
- Kill(ctx context.Context, req *KillRequest) (*google_protobuf1.Empty, error)
- Exec(ctx context.Context, req *ExecProcessRequest) (*google_protobuf1.Empty, error)
- ResizePty(ctx context.Context, req *ResizePtyRequest) (*google_protobuf1.Empty, error)
- CloseIO(ctx context.Context, req *CloseIORequest) (*google_protobuf1.Empty, error)
- Update(ctx context.Context, req *UpdateTaskRequest) (*google_protobuf1.Empty, error)
+ Pause(ctx context.Context, req *PauseRequest) (*types1.Empty, error)
+ Resume(ctx context.Context, req *ResumeRequest) (*types1.Empty, error)
+ Checkpoint(ctx context.Context, req *CheckpointTaskRequest) (*types1.Empty, error)
+ Kill(ctx context.Context, req *KillRequest) (*types1.Empty, error)
+ Exec(ctx context.Context, req *ExecProcessRequest) (*types1.Empty, error)
+ ResizePty(ctx context.Context, req *ResizePtyRequest) (*types1.Empty, error)
+ CloseIO(ctx context.Context, req *CloseIORequest) (*types1.Empty, error)
+ Update(ctx context.Context, req *UpdateTaskRequest) (*types1.Empty, error)
Wait(ctx context.Context, req *WaitRequest) (*WaitResponse, error)
Stats(ctx context.Context, req *StatsRequest) (*StatsResponse, error)
Connect(ctx context.Context, req *ConnectRequest) (*ConnectResponse, error)
- Shutdown(ctx context.Context, req *ShutdownRequest) (*google_protobuf1.Empty, error)
+ Shutdown(ctx context.Context, req *ShutdownRequest) (*types1.Empty, error)
}
-func RegisterTaskService(srv *ttrpc.Server, svc TaskService) {
- srv.Register("containerd.task.v2.Task", map[string]ttrpc.Method{
+func RegisterTaskService(srv *github_com_containerd_ttrpc.Server, svc TaskService) {
+ srv.Register("containerd.task.v2.Task", map[string]github_com_containerd_ttrpc.Method{
"State": func(ctx context.Context, unmarshal func(interface{}) error) (interface{}, error) {
var req StateRequest
if err := unmarshal(&req); err != nil {
@@ -2196,10 +3308,10 @@ func RegisterTaskService(srv *ttrpc.Server, svc TaskService) {
}
type taskClient struct {
- client *ttrpc.Client
+ client *github_com_containerd_ttrpc.Client
}
-func NewTaskClient(client *ttrpc.Client) TaskService {
+func NewTaskClient(client *github_com_containerd_ttrpc.Client) TaskService {
return &taskClient{
client: client,
}
@@ -2245,64 +3357,64 @@ func (c *taskClient) Pids(ctx context.Context, req *PidsRequest) (*PidsResponse,
return &resp, nil
}
-func (c *taskClient) Pause(ctx context.Context, req *PauseRequest) (*google_protobuf1.Empty, error) {
- var resp google_protobuf1.Empty
+func (c *taskClient) Pause(ctx context.Context, req *PauseRequest) (*types1.Empty, error) {
+ var resp types1.Empty
if err := c.client.Call(ctx, "containerd.task.v2.Task", "Pause", req, &resp); err != nil {
return nil, err
}
return &resp, nil
}
-func (c *taskClient) Resume(ctx context.Context, req *ResumeRequest) (*google_protobuf1.Empty, error) {
- var resp google_protobuf1.Empty
+func (c *taskClient) Resume(ctx context.Context, req *ResumeRequest) (*types1.Empty, error) {
+ var resp types1.Empty
if err := c.client.Call(ctx, "containerd.task.v2.Task", "Resume", req, &resp); err != nil {
return nil, err
}
return &resp, nil
}
-func (c *taskClient) Checkpoint(ctx context.Context, req *CheckpointTaskRequest) (*google_protobuf1.Empty, error) {
- var resp google_protobuf1.Empty
+func (c *taskClient) Checkpoint(ctx context.Context, req *CheckpointTaskRequest) (*types1.Empty, error) {
+ var resp types1.Empty
if err := c.client.Call(ctx, "containerd.task.v2.Task", "Checkpoint", req, &resp); err != nil {
return nil, err
}
return &resp, nil
}
-func (c *taskClient) Kill(ctx context.Context, req *KillRequest) (*google_protobuf1.Empty, error) {
- var resp google_protobuf1.Empty
+func (c *taskClient) Kill(ctx context.Context, req *KillRequest) (*types1.Empty, error) {
+ var resp types1.Empty
if err := c.client.Call(ctx, "containerd.task.v2.Task", "Kill", req, &resp); err != nil {
return nil, err
}
return &resp, nil
}
-func (c *taskClient) Exec(ctx context.Context, req *ExecProcessRequest) (*google_protobuf1.Empty, error) {
- var resp google_protobuf1.Empty
+func (c *taskClient) Exec(ctx context.Context, req *ExecProcessRequest) (*types1.Empty, error) {
+ var resp types1.Empty
if err := c.client.Call(ctx, "containerd.task.v2.Task", "Exec", req, &resp); err != nil {
return nil, err
}
return &resp, nil
}
-func (c *taskClient) ResizePty(ctx context.Context, req *ResizePtyRequest) (*google_protobuf1.Empty, error) {
- var resp google_protobuf1.Empty
+func (c *taskClient) ResizePty(ctx context.Context, req *ResizePtyRequest) (*types1.Empty, error) {
+ var resp types1.Empty
if err := c.client.Call(ctx, "containerd.task.v2.Task", "ResizePty", req, &resp); err != nil {
return nil, err
}
return &resp, nil
}
-func (c *taskClient) CloseIO(ctx context.Context, req *CloseIORequest) (*google_protobuf1.Empty, error) {
- var resp google_protobuf1.Empty
+func (c *taskClient) CloseIO(ctx context.Context, req *CloseIORequest) (*types1.Empty, error) {
+ var resp types1.Empty
if err := c.client.Call(ctx, "containerd.task.v2.Task", "CloseIO", req, &resp); err != nil {
return nil, err
}
return &resp, nil
}
-func (c *taskClient) Update(ctx context.Context, req *UpdateTaskRequest) (*google_protobuf1.Empty, error) {
- var resp google_protobuf1.Empty
+func (c *taskClient) Update(ctx context.Context, req *UpdateTaskRequest) (*types1.Empty, error) {
+ var resp types1.Empty
if err := c.client.Call(ctx, "containerd.task.v2.Task", "Update", req, &resp); err != nil {
return nil, err
}
@@ -2333,8 +3445,8 @@ func (c *taskClient) Connect(ctx context.Context, req *ConnectRequest) (*Connect
return &resp, nil
}
-func (c *taskClient) Shutdown(ctx context.Context, req *ShutdownRequest) (*google_protobuf1.Empty, error) {
- var resp google_protobuf1.Empty
+func (c *taskClient) Shutdown(ctx context.Context, req *ShutdownRequest) (*types1.Empty, error) {
+ var resp types1.Empty
if err := c.client.Call(ctx, "containerd.task.v2.Task", "Shutdown", req, &resp); err != nil {
return nil, err
}
@@ -2355,7 +3467,7 @@ func (m *CreateTaskRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2383,7 +3495,7 @@ func (m *CreateTaskRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2393,6 +3505,9 @@ func (m *CreateTaskRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthShim
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthShim
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -2412,7 +3527,7 @@ func (m *CreateTaskRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2422,6 +3537,9 @@ func (m *CreateTaskRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthShim
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthShim
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -2441,7 +3559,7 @@ func (m *CreateTaskRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2450,10 +3568,13 @@ func (m *CreateTaskRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthShim
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthShim
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
- m.Rootfs = append(m.Rootfs, &containerd_types.Mount{})
+ m.Rootfs = append(m.Rootfs, &types.Mount{})
if err := m.Rootfs[len(m.Rootfs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
@@ -2472,7 +3593,7 @@ func (m *CreateTaskRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- v |= (int(b) & 0x7F) << shift
+ v |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2492,7 +3613,7 @@ func (m *CreateTaskRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2502,6 +3623,9 @@ func (m *CreateTaskRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthShim
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthShim
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -2521,7 +3645,7 @@ func (m *CreateTaskRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2531,6 +3655,9 @@ func (m *CreateTaskRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthShim
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthShim
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -2550,7 +3677,7 @@ func (m *CreateTaskRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2560,6 +3687,9 @@ func (m *CreateTaskRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthShim
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthShim
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -2579,7 +3709,7 @@ func (m *CreateTaskRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2589,6 +3719,9 @@ func (m *CreateTaskRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthShim
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthShim
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -2608,7 +3741,7 @@ func (m *CreateTaskRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2618,6 +3751,9 @@ func (m *CreateTaskRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthShim
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthShim
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -2637,7 +3773,7 @@ func (m *CreateTaskRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2646,11 +3782,14 @@ func (m *CreateTaskRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthShim
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthShim
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Options == nil {
- m.Options = &google_protobuf.Any{}
+ m.Options = &types1.Any{}
}
if err := m.Options.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
@@ -2665,9 +3804,13 @@ func (m *CreateTaskRequest) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthShim
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthShim
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -2692,7 +3835,7 @@ func (m *CreateTaskResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2720,7 +3863,7 @@ func (m *CreateTaskResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- m.Pid |= (uint32(b) & 0x7F) << shift
+ m.Pid |= uint32(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2734,9 +3877,13 @@ func (m *CreateTaskResponse) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthShim
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthShim
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -2761,7 +3908,7 @@ func (m *DeleteRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2789,7 +3936,7 @@ func (m *DeleteRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2799,6 +3946,9 @@ func (m *DeleteRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthShim
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthShim
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -2818,7 +3968,7 @@ func (m *DeleteRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2828,6 +3978,9 @@ func (m *DeleteRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthShim
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthShim
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -2842,9 +3995,13 @@ func (m *DeleteRequest) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthShim
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthShim
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -2869,7 +4026,7 @@ func (m *DeleteResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2897,7 +4054,7 @@ func (m *DeleteResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- m.Pid |= (uint32(b) & 0x7F) << shift
+ m.Pid |= uint32(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2916,7 +4073,7 @@ func (m *DeleteResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- m.ExitStatus |= (uint32(b) & 0x7F) << shift
+ m.ExitStatus |= uint32(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2935,7 +4092,7 @@ func (m *DeleteResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2944,10 +4101,13 @@ func (m *DeleteResponse) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthShim
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthShim
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
- if err := types.StdTimeUnmarshal(&m.ExitedAt, dAtA[iNdEx:postIndex]); err != nil {
+ if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.ExitedAt, dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
@@ -2960,9 +4120,13 @@ func (m *DeleteResponse) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthShim
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthShim
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -2987,7 +4151,7 @@ func (m *ExecProcessRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3015,7 +4179,7 @@ func (m *ExecProcessRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3025,6 +4189,9 @@ func (m *ExecProcessRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthShim
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthShim
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -3044,7 +4211,7 @@ func (m *ExecProcessRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3054,6 +4221,9 @@ func (m *ExecProcessRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthShim
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthShim
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -3073,7 +4243,7 @@ func (m *ExecProcessRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- v |= (int(b) & 0x7F) << shift
+ v |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3093,7 +4263,7 @@ func (m *ExecProcessRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3103,6 +4273,9 @@ func (m *ExecProcessRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthShim
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthShim
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -3122,7 +4295,7 @@ func (m *ExecProcessRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3132,6 +4305,9 @@ func (m *ExecProcessRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthShim
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthShim
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -3151,7 +4327,7 @@ func (m *ExecProcessRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3161,6 +4337,9 @@ func (m *ExecProcessRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthShim
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthShim
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -3180,7 +4359,7 @@ func (m *ExecProcessRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3189,11 +4368,14 @@ func (m *ExecProcessRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthShim
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthShim
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Spec == nil {
- m.Spec = &google_protobuf.Any{}
+ m.Spec = &types1.Any{}
}
if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
@@ -3208,9 +4390,13 @@ func (m *ExecProcessRequest) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthShim
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthShim
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -3235,7 +4421,7 @@ func (m *ExecProcessResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3258,9 +4444,13 @@ func (m *ExecProcessResponse) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthShim
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthShim
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -3285,7 +4475,7 @@ func (m *ResizePtyRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3313,7 +4503,7 @@ func (m *ResizePtyRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3323,6 +4513,9 @@ func (m *ResizePtyRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthShim
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthShim
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -3342,7 +4535,7 @@ func (m *ResizePtyRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3352,6 +4545,9 @@ func (m *ResizePtyRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthShim
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthShim
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -3371,7 +4567,7 @@ func (m *ResizePtyRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- m.Width |= (uint32(b) & 0x7F) << shift
+ m.Width |= uint32(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3390,7 +4586,7 @@ func (m *ResizePtyRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- m.Height |= (uint32(b) & 0x7F) << shift
+ m.Height |= uint32(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3404,9 +4600,13 @@ func (m *ResizePtyRequest) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthShim
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthShim
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -3431,7 +4631,7 @@ func (m *StateRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3459,7 +4659,7 @@ func (m *StateRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3469,6 +4669,9 @@ func (m *StateRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthShim
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthShim
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -3488,7 +4691,7 @@ func (m *StateRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3498,6 +4701,9 @@ func (m *StateRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthShim
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthShim
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -3512,9 +4718,13 @@ func (m *StateRequest) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthShim
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthShim
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -3539,7 +4749,7 @@ func (m *StateResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3567,7 +4777,7 @@ func (m *StateResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3577,6 +4787,9 @@ func (m *StateResponse) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthShim
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthShim
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -3596,7 +4809,7 @@ func (m *StateResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3606,6 +4819,9 @@ func (m *StateResponse) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthShim
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthShim
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -3625,7 +4841,7 @@ func (m *StateResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- m.Pid |= (uint32(b) & 0x7F) << shift
+ m.Pid |= uint32(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3644,7 +4860,7 @@ func (m *StateResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- m.Status |= (containerd_v1_types.Status(b) & 0x7F) << shift
+ m.Status |= task.Status(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3663,7 +4879,7 @@ func (m *StateResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3673,6 +4889,9 @@ func (m *StateResponse) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthShim
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthShim
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -3692,7 +4911,7 @@ func (m *StateResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3702,6 +4921,9 @@ func (m *StateResponse) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthShim
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthShim
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -3721,7 +4943,7 @@ func (m *StateResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3731,6 +4953,9 @@ func (m *StateResponse) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthShim
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthShim
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -3750,7 +4975,7 @@ func (m *StateResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- v |= (int(b) & 0x7F) << shift
+ v |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3770,7 +4995,7 @@ func (m *StateResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- m.ExitStatus |= (uint32(b) & 0x7F) << shift
+ m.ExitStatus |= uint32(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3789,7 +5014,7 @@ func (m *StateResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3798,10 +5023,13 @@ func (m *StateResponse) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthShim
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthShim
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
- if err := types.StdTimeUnmarshal(&m.ExitedAt, dAtA[iNdEx:postIndex]); err != nil {
+ if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.ExitedAt, dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
@@ -3819,7 +5047,7 @@ func (m *StateResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3829,6 +5057,9 @@ func (m *StateResponse) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthShim
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthShim
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -3843,9 +5074,13 @@ func (m *StateResponse) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthShim
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthShim
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -3870,7 +5105,7 @@ func (m *KillRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3898,7 +5133,7 @@ func (m *KillRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3908,6 +5143,9 @@ func (m *KillRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthShim
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthShim
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -3927,7 +5165,7 @@ func (m *KillRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3937,6 +5175,9 @@ func (m *KillRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthShim
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthShim
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -3956,7 +5197,7 @@ func (m *KillRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- m.Signal |= (uint32(b) & 0x7F) << shift
+ m.Signal |= uint32(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3975,7 +5216,7 @@ func (m *KillRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- v |= (int(b) & 0x7F) << shift
+ v |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -3990,9 +5231,13 @@ func (m *KillRequest) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthShim
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthShim
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -4017,7 +5262,7 @@ func (m *CloseIORequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -4045,7 +5290,7 @@ func (m *CloseIORequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -4055,6 +5300,9 @@ func (m *CloseIORequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthShim
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthShim
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -4074,7 +5322,7 @@ func (m *CloseIORequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -4084,6 +5332,9 @@ func (m *CloseIORequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthShim
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthShim
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -4103,7 +5354,7 @@ func (m *CloseIORequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- v |= (int(b) & 0x7F) << shift
+ v |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -4118,9 +5369,13 @@ func (m *CloseIORequest) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthShim
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthShim
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -4145,7 +5400,7 @@ func (m *PidsRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -4173,7 +5428,7 @@ func (m *PidsRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -4183,6 +5438,9 @@ func (m *PidsRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthShim
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthShim
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -4197,9 +5455,13 @@ func (m *PidsRequest) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthShim
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthShim
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -4224,7 +5486,7 @@ func (m *PidsResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -4252,7 +5514,7 @@ func (m *PidsResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -4261,10 +5523,13 @@ func (m *PidsResponse) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthShim
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthShim
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
- m.Processes = append(m.Processes, &containerd_v1_types.ProcessInfo{})
+ m.Processes = append(m.Processes, &task.ProcessInfo{})
if err := m.Processes[len(m.Processes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
@@ -4278,9 +5543,13 @@ func (m *PidsResponse) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthShim
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthShim
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -4305,7 +5574,7 @@ func (m *CheckpointTaskRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -4333,7 +5602,7 @@ func (m *CheckpointTaskRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -4343,6 +5612,9 @@ func (m *CheckpointTaskRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthShim
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthShim
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -4362,7 +5634,7 @@ func (m *CheckpointTaskRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -4372,6 +5644,9 @@ func (m *CheckpointTaskRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthShim
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthShim
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -4391,7 +5666,7 @@ func (m *CheckpointTaskRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -4400,11 +5675,14 @@ func (m *CheckpointTaskRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthShim
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthShim
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Options == nil {
- m.Options = &google_protobuf.Any{}
+ m.Options = &types1.Any{}
}
if err := m.Options.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
@@ -4419,9 +5697,13 @@ func (m *CheckpointTaskRequest) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthShim
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthShim
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -4446,7 +5728,7 @@ func (m *UpdateTaskRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -4474,7 +5756,7 @@ func (m *UpdateTaskRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -4484,6 +5766,9 @@ func (m *UpdateTaskRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthShim
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthShim
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -4503,7 +5788,7 @@ func (m *UpdateTaskRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -4512,11 +5797,14 @@ func (m *UpdateTaskRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthShim
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthShim
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Resources == nil {
- m.Resources = &google_protobuf.Any{}
+ m.Resources = &types1.Any{}
}
if err := m.Resources.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
@@ -4531,9 +5819,13 @@ func (m *UpdateTaskRequest) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthShim
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthShim
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -4558,7 +5850,7 @@ func (m *StartRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -4586,7 +5878,7 @@ func (m *StartRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -4596,6 +5888,9 @@ func (m *StartRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthShim
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthShim
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -4615,7 +5910,7 @@ func (m *StartRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -4625,6 +5920,9 @@ func (m *StartRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthShim
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthShim
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -4639,9 +5937,13 @@ func (m *StartRequest) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthShim
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthShim
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -4666,7 +5968,7 @@ func (m *StartResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -4694,7 +5996,7 @@ func (m *StartResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- m.Pid |= (uint32(b) & 0x7F) << shift
+ m.Pid |= uint32(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -4708,9 +6010,13 @@ func (m *StartResponse) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthShim
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthShim
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -4735,7 +6041,7 @@ func (m *WaitRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -4763,7 +6069,7 @@ func (m *WaitRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -4773,6 +6079,9 @@ func (m *WaitRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthShim
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthShim
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -4792,7 +6101,7 @@ func (m *WaitRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -4802,6 +6111,9 @@ func (m *WaitRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthShim
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthShim
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -4816,9 +6128,13 @@ func (m *WaitRequest) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthShim
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthShim
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -4843,7 +6159,7 @@ func (m *WaitResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -4871,7 +6187,7 @@ func (m *WaitResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- m.ExitStatus |= (uint32(b) & 0x7F) << shift
+ m.ExitStatus |= uint32(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -4890,7 +6206,7 @@ func (m *WaitResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -4899,10 +6215,13 @@ func (m *WaitResponse) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthShim
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthShim
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
- if err := types.StdTimeUnmarshal(&m.ExitedAt, dAtA[iNdEx:postIndex]); err != nil {
+ if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.ExitedAt, dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
@@ -4915,9 +6234,13 @@ func (m *WaitResponse) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthShim
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthShim
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -4942,7 +6265,7 @@ func (m *StatsRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -4970,7 +6293,7 @@ func (m *StatsRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -4980,6 +6303,9 @@ func (m *StatsRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthShim
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthShim
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -4994,9 +6320,13 @@ func (m *StatsRequest) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthShim
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthShim
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -5021,7 +6351,7 @@ func (m *StatsResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -5049,7 +6379,7 @@ func (m *StatsResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -5058,11 +6388,14 @@ func (m *StatsResponse) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthShim
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthShim
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Stats == nil {
- m.Stats = &google_protobuf.Any{}
+ m.Stats = &types1.Any{}
}
if err := m.Stats.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
@@ -5077,9 +6410,13 @@ func (m *StatsResponse) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthShim
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthShim
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -5104,7 +6441,7 @@ func (m *ConnectRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -5132,7 +6469,7 @@ func (m *ConnectRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -5142,6 +6479,9 @@ func (m *ConnectRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthShim
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthShim
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -5156,9 +6496,13 @@ func (m *ConnectRequest) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthShim
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthShim
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -5183,7 +6527,7 @@ func (m *ConnectResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -5211,7 +6555,7 @@ func (m *ConnectResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- m.ShimPid |= (uint32(b) & 0x7F) << shift
+ m.ShimPid |= uint32(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -5230,7 +6574,7 @@ func (m *ConnectResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- m.TaskPid |= (uint32(b) & 0x7F) << shift
+ m.TaskPid |= uint32(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -5249,7 +6593,7 @@ func (m *ConnectResponse) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -5259,6 +6603,9 @@ func (m *ConnectResponse) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthShim
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthShim
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -5273,9 +6620,13 @@ func (m *ConnectResponse) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthShim
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthShim
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -5300,7 +6651,7 @@ func (m *ShutdownRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -5328,7 +6679,7 @@ func (m *ShutdownRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -5338,6 +6689,9 @@ func (m *ShutdownRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthShim
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthShim
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -5357,7 +6711,7 @@ func (m *ShutdownRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- v |= (int(b) & 0x7F) << shift
+ v |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -5372,9 +6726,13 @@ func (m *ShutdownRequest) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthShim
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthShim
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -5399,7 +6757,7 @@ func (m *PauseRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -5427,7 +6785,7 @@ func (m *PauseRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -5437,6 +6795,9 @@ func (m *PauseRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthShim
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthShim
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -5451,9 +6812,13 @@ func (m *PauseRequest) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthShim
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthShim
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -5478,7 +6843,7 @@ func (m *ResumeRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -5506,7 +6871,7 @@ func (m *ResumeRequest) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -5516,6 +6881,9 @@ func (m *ResumeRequest) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthShim
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthShim
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -5530,9 +6898,13 @@ func (m *ResumeRequest) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthShim
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthShim
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -5596,10 +6968,13 @@ func skipShim(dAtA []byte) (n int, err error) {
break
}
}
- iNdEx += length
if length < 0 {
return 0, ErrInvalidLengthShim
}
+ iNdEx += length
+ if iNdEx < 0 {
+ return 0, ErrInvalidLengthShim
+ }
return iNdEx, nil
case 3:
for {
@@ -5628,6 +7003,9 @@ func skipShim(dAtA []byte) (n int, err error) {
return 0, err
}
iNdEx = start + next
+ if iNdEx < 0 {
+ return 0, ErrInvalidLengthShim
+ }
}
return iNdEx, nil
case 4:
@@ -5646,89 +7024,3 @@ var (
ErrInvalidLengthShim = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowShim = fmt.Errorf("proto: integer overflow")
)
-
-func init() {
- proto.RegisterFile("github.com/containerd/containerd/runtime/v2/task/shim.proto", fileDescriptorShim)
-}
-
-var fileDescriptorShim = []byte{
- // 1246 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x58, 0x5d, 0x6f, 0x1b, 0x45,
- 0x17, 0xee, 0xfa, 0x63, 0x6d, 0x1f, 0xd7, 0x69, 0x3a, 0x6f, 0x9a, 0x77, 0xeb, 0x4a, 0xb6, 0xbb,
- 0xa5, 0xc1, 0x80, 0x64, 0x0b, 0x57, 0x70, 0x41, 0x24, 0x50, 0xbe, 0xa8, 0x4c, 0x0b, 0x89, 0xb6,
- 0x45, 0x45, 0xdc, 0x58, 0x1b, 0xef, 0xc4, 0x5e, 0xc5, 0xde, 0x59, 0x76, 0x66, 0xf3, 0x81, 0x84,
- 0xc4, 0x15, 0x17, 0x5c, 0xf1, 0xb3, 0x72, 0x89, 0xc4, 0x0d, 0x37, 0x04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 0x28, 0x61, 0xa0, 0xc9, 0xc2, 0x40, 0x17, 0x0a, 0xc3, 0x84, 0xd5, 0x16, 0xe4, 0x94, 0xc0,
- 0x26, 0x24, 0x6a, 0x4a, 0xa7, 0xcb, 0x4f, 0xe6, 0x62, 0x94, 0xcf, 0xe7, 0x90, 0x1f, 0x2b, 0x2a,
- 0x8a, 0x5d, 0x30, 0xa3, 0xb7, 0x49, 0x59, 0xdb, 0xde, 0xbf, 0x78, 0x5b, 0xb9, 0xf3, 0xe7, 0xdb,
- 0xca, 0x9d, 0x9f, 0x47, 0x15, 0xed, 0x62, 0x54, 0xd1, 0x7e, 0x1f, 0x55, 0xb4, 0x7f, 0x46, 0x15,
- 0xed, 0xfb, 0x4f, 0x6e, 0xfb, 0xf3, 0xc5, 0x26, 0xff, 0xf3, 0x5d, 0xea, 0x50, 0x17, 0x5b, 0x3c,
- 0xfb, 0x2f, 0x00, 0x00, 0xff, 0xff, 0x19, 0x17, 0x87, 0x57, 0x00, 0x11, 0x00, 0x00,
-}
diff --git a/vendor.conf b/vendor.conf
index 3333d073b..938e4f7ef 100644
--- a/vendor.conf
+++ b/vendor.conf
@@ -15,10 +15,10 @@ github.com/prometheus/client_model 99fa1f4be8e564e8a6b613da7fa6f46c9edafc6c
github.com/prometheus/common 89604d197083d4781071d3c65855d24ecfb0a563
github.com/prometheus/procfs cb4147076ac75738c9a7d279075a253c0cc5acbd
github.com/beorn7/perks 4c0e84591b9aa9e6dcfdf3e020114cd81f89d5f9
-github.com/matttproud/golang_protobuf_extensions v1.0.0
-github.com/gogo/protobuf v1.0.0
+github.com/matttproud/golang_protobuf_extensions v1.0.1
+github.com/gogo/protobuf v1.2.1
github.com/gogo/googleapis 08a7655d27152912db7aaf4f983275eaf8d128ef
-github.com/golang/protobuf v1.1.0
+github.com/golang/protobuf v1.2.0
github.com/opencontainers/runtime-spec 29686dbc5559d93fb1ef402eeda3e35c38d75af4 # v1.0.1-59-g29686db
github.com/opencontainers/runc v1.0.0-rc7
github.com/konsorten/go-windows-terminal-sequences v1.0.1
diff --git a/vendor/github.com/gogo/protobuf/LICENSE b/vendor/github.com/gogo/protobuf/LICENSE
index 7be0cc7b6..f57de90da 100644
--- a/vendor/github.com/gogo/protobuf/LICENSE
+++ b/vendor/github.com/gogo/protobuf/LICENSE
@@ -1,7 +1,6 @@
-Protocol Buffers for Go with Gadgets
-
Copyright (c) 2013, The GoGo Authors. All rights reserved.
-http://github.com/gogo/protobuf
+
+Protocol Buffers for Go with Gadgets
Go support for Protocol Buffers - Google's data interchange format
diff --git a/vendor/github.com/gogo/protobuf/README b/vendor/github.com/gogo/protobuf/README
index 035426df5..6af26af75 100644
--- a/vendor/github.com/gogo/protobuf/README
+++ b/vendor/github.com/gogo/protobuf/README
@@ -1,13 +1,18 @@
-GoGoProtobuf http://github.com/gogo/protobuf extends
+Protocol Buffers for Go with Gadgets
+
+GoGoProtobuf http://github.com/gogo/protobuf extends
GoProtobuf http://github.com/golang/protobuf
+Copyright (c) 2013, The GoGo Authors. All rights reserved.
+
+
# Go support for Protocol Buffers
Google's data interchange format.
Copyright 2010 The Go Authors.
https://github.com/golang/protobuf
-This package and the code it generates requires at least Go 1.4.
+This package and the code it generates requires at least Go 1.6.
This software implements Go bindings for protocol buffers. For
information about protocol buffers themselves, see
@@ -24,11 +29,19 @@ To use this software, you must:
https://golang.org/doc/install
for details or, if you are using gccgo, follow the instructions at
https://golang.org/doc/install/gccgo
-- Grab the code from the repository and install the proto package.
+- Grab the code from the repository and install the `proto` package.
The simplest way is to run `go get -u github.com/golang/protobuf/protoc-gen-go`.
- The compiler plugin, protoc-gen-go, will be installed in $GOBIN,
- defaulting to $GOPATH/bin. It must be in your $PATH for the protocol
- compiler, protoc, to find it.
+ The compiler plugin, `protoc-gen-go`, will be installed in `$GOPATH/bin`
+ unless `$GOBIN` is set. It must be in your `$PATH` for the protocol
+ compiler, `protoc`, to find it.
+- If you need a particular version of `protoc-gen-go` (e.g., to match your
+ `proto` package version), one option is
+ ```shell
+ GIT_TAG="v1.2.0" # change as needed
+ go get -d -u github.com/golang/protobuf/protoc-gen-go
+ git -C "$(go env GOPATH)"/src/github.com/golang/protobuf checkout $GIT_TAG
+ go install github.com/golang/protobuf/protoc-gen-go
+ ```
This software has two parts: a 'protocol compiler plugin' that
generates Go source files that, once compiled, can access and manage
@@ -58,6 +71,45 @@ parameter set to the directory you want to output the Go code to.
The generated files will be suffixed .pb.go. See the Test code below
for an example using such a file.
+## Packages and input paths ##
+
+The protocol buffer language has a concept of "packages" which does not
+correspond well to the Go notion of packages. In generated Go code,
+each source `.proto` file is associated with a single Go package. The
+name and import path for this package is specified with the `go_package`
+proto option:
+
+ option go_package = "github.com/gogo/protobuf/types";
+
+The protocol buffer compiler will attempt to derive a package name and
+import path if a `go_package` option is not present, but it is
+best to always specify one explicitly.
+
+There is a one-to-one relationship between source `.proto` files and
+generated `.pb.go` files, but any number of `.pb.go` files may be
+contained in the same Go package.
+
+The output name of a generated file is produced by replacing the
+`.proto` suffix with `.pb.go` (e.g., `foo.proto` produces `foo.pb.go`).
+However, the output directory is selected in one of two ways. Let
+us say we have `inputs/x.proto` with a `go_package` option of
+`github.com/golang/protobuf/p`. The corresponding output file may
+be:
+
+- Relative to the import path:
+
+ protoc --gogo_out=. inputs/x.proto
+ # writes ./github.com/gogo/protobuf/p/x.pb.go
+
+ (This can work well with `--gogo_out=$GOPATH`.)
+
+- Relative to the input file:
+
+ protoc --gogo_out=paths=source_relative:. inputs/x.proto
+ # generate ./inputs/x.pb.go
+
+## Generated code ##
+
The package comment for the proto library contains text describing
the interface provided in Go for protocol buffers. Here is an edited
version.
@@ -125,16 +177,13 @@ Consider file test.proto, containing
```proto
syntax = "proto2";
package example;
-
+
enum FOO { X = 17; };
-
+
message Test {
required string label = 1;
optional int32 type = 2 [default=77];
repeated int64 reps = 3;
- optional group OptionalGroup = 4 {
- required string RequiredField = 5;
- }
}
```
@@ -151,13 +200,10 @@ To create and play with a Test object from the example package,
)
func main() {
- test := &example.Test {
+ test := &example.Test{
Label: proto.String("hello"),
Type: proto.Int32(17),
Reps: []int64{1, 2, 3},
- Optionalgroup: &example.Test_OptionalGroup {
- RequiredField: proto.String("good bye"),
- },
}
data, err := proto.Marshal(test)
if err != nil {
@@ -185,19 +231,23 @@ parameter list separated from the output directory by a colon:
protoc --gogo_out=plugins=grpc,import_path=mypackage:. *.proto
-
-- `import_prefix=xxx` - a prefix that is added onto the beginning of
- all imports. Useful for things like generating protos in a
- subdirectory, or regenerating vendored protobufs in-place.
-- `import_path=foo/bar` - used as the package if no input files
- declare `go_package`. If it contains slashes, everything up to the
- rightmost slash is ignored.
+- `paths=(import | source_relative)` - specifies how the paths of
+ generated files are structured. See the "Packages and imports paths"
+ section above. The default is `import`.
- `plugins=plugin1+plugin2` - specifies the list of sub-plugins to
load. The only plugin in this repo is `grpc`.
- `Mfoo/bar.proto=quux/shme` - declares that foo/bar.proto is
associated with Go package quux/shme. This is subject to the
import_prefix parameter.
+The following parameters are deprecated and should not be used:
+
+- `import_prefix=xxx` - a prefix that is added onto the beginning of
+ all imports.
+- `import_path=foo/bar` - used as the package if no input files
+ declare `go_package`. If it contains slashes, everything up to the
+ rightmost slash is ignored.
+
## gRPC Support ##
If a proto file specifies RPC services, protoc-gen-go can be instructed to
@@ -251,8 +301,6 @@ generated code and declare a new package-level constant whose name incorporates
the latest version number. Removing a compatibility constant is considered a
breaking change and would be subject to the announcement policy stated above.
-## Plugins ##
-
The `protoc-gen-go/generator` package exposes a plugin interface,
which is used by the gRPC code generation. This interface is not
supported and is subject to incompatible changes without notice.
diff --git a/vendor/github.com/gogo/protobuf/Readme.md b/vendor/github.com/gogo/protobuf/Readme.md
index a4ad3eecd..06685a28a 100644
--- a/vendor/github.com/gogo/protobuf/Readme.md
+++ b/vendor/github.com/gogo/protobuf/Readme.md
@@ -1,6 +1,7 @@
# Protocol Buffers for Go with Gadgets
[](https://travis-ci.org/gogo/protobuf)
+[](http://godoc.org/github.com/gogo/protobuf)
gogoprotobuf is a fork of golang/protobuf with extra code generation features.
@@ -45,6 +46,9 @@ These projects use gogoprotobuf:
- carbonzipper stack
- sendgrid
- zero-os/0-stor
+ - go-spacemesh
+ - cortex - sample proto file
+ - Apache SkyWalking APM - Istio telemetry receiver based on Mixer bypass protocol
Please let us know if you are using gogoprotobuf by posting on our GoogleGroup.
@@ -53,6 +57,12 @@ Please let us know if you are using gogoprotobuf by posting on our Cloudflare - go serialization talk - Albert Strasheim
- GopherCon 2014 Writing High Performance Databases in Go by Ben Johnson
- alecthomas' go serialization benchmarks
+ - Go faster with gogoproto - Agniva De Sarker
+ - Evolution of protobuf (Gource Visualization) - Landon Wilkins
+ - Creating GopherJS Apps with gRPC-Web - Johan Brandhorst
+ - So you want to use GoGo Protobuf - Johan Brandhorst
+ - Advanced gRPC Error Usage - Johan Brandhorst
+ - gRPC Golang Course on Udemy - Stephane Maarek
## Getting Started
@@ -65,10 +75,11 @@ After that you can choose:
### Installation
-To install it, you must first have Go (at least version 1.6.3) installed (see [http://golang.org/doc/install](http://golang.org/doc/install)). Latest patch versions of Go 1.8, 1.9 and 1.10 are continuously tested.
+To install it, you must first have Go (at least version 1.6.3 or 1.9 if you are using gRPC) installed (see [http://golang.org/doc/install](http://golang.org/doc/install)).
+Latest patch versions of 1.10 and 1.11 are continuously tested.
Next, install the standard protocol buffer implementation from [https://github.com/google/protobuf](https://github.com/google/protobuf).
-Most versions from 2.3.1 should not give any problems, but 2.6.1, 3.0.2 and 3.5.1 are continuously tested.
+Most versions from 2.3.1 should not give any problems, but 2.6.1, 3.0.2 and 3.6.1 are continuously tested.
### Speed
@@ -114,7 +125,7 @@ To use proto files from "google/protobuf" you need to add additional args to pro
Mgoogle/protobuf/timestamp.proto=github.com/gogo/protobuf/types,\
Mgoogle/protobuf/wrappers.proto=github.com/gogo/protobuf/types:. \
myproto.proto
-
+
Note that in the protoc command, {binary} does not contain the initial prefix of "protoc-gen".
### Most Speed and most customization
@@ -137,3 +148,12 @@ It works the same as golang/protobuf, simply specify the plugin.
Here is an example using gofast:
protoc --gofast_out=plugins=grpc:. my.proto
+
+See [https://github.com/gogo/grpc-example](https://github.com/gogo/grpc-example) for an example of using gRPC with gogoprotobuf and the wider grpc-ecosystem.
+
+
+## License
+This software is licensed under the 3-Clause BSD License
+("BSD License 2.0", "Revised BSD License", "New BSD License", or "Modified BSD License").
+
+
diff --git a/vendor/github.com/gogo/protobuf/gogoproto/doc.go b/vendor/github.com/gogo/protobuf/gogoproto/doc.go
index 147b5ecc6..081c86fa8 100644
--- a/vendor/github.com/gogo/protobuf/gogoproto/doc.go
+++ b/vendor/github.com/gogo/protobuf/gogoproto/doc.go
@@ -162,7 +162,7 @@ The most complete way to see examples is to look at
github.com/gogo/protobuf/test/thetest.proto
Gogoprototest is a seperate project,
-because we want to keep gogoprotobuf independant of goprotobuf,
+because we want to keep gogoprotobuf independent of goprotobuf,
but we still want to test it thoroughly.
*/
diff --git a/vendor/github.com/gogo/protobuf/gogoproto/gogo.pb.go b/vendor/github.com/gogo/protobuf/gogoproto/gogo.pb.go
index 5765acb15..e352808b9 100644
--- a/vendor/github.com/gogo/protobuf/gogoproto/gogo.pb.go
+++ b/vendor/github.com/gogo/protobuf/gogoproto/gogo.pb.go
@@ -1,20 +1,14 @@
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: gogo.proto
-/*
-Package gogoproto is a generated protocol buffer package.
-
-It is generated from these files:
- gogo.proto
-
-It has these top-level messages:
-*/
package gogoproto
-import proto "github.com/gogo/protobuf/proto"
-import fmt "fmt"
-import math "math"
-import google_protobuf "github.com/gogo/protobuf/protoc-gen-gogo/descriptor"
+import (
+ fmt "fmt"
+ proto "github.com/gogo/protobuf/proto"
+ descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor"
+ math "math"
+)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
@@ -28,43 +22,43 @@ var _ = math.Inf
const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
var E_GoprotoEnumPrefix = &proto.ExtensionDesc{
- ExtendedType: (*google_protobuf.EnumOptions)(nil),
+ ExtendedType: (*descriptor.EnumOptions)(nil),
ExtensionType: (*bool)(nil),
Field: 62001,
Name: "gogoproto.goproto_enum_prefix",
- Tag: "varint,62001,opt,name=goproto_enum_prefix,json=goprotoEnumPrefix",
+ Tag: "varint,62001,opt,name=goproto_enum_prefix",
Filename: "gogo.proto",
}
var E_GoprotoEnumStringer = &proto.ExtensionDesc{
- ExtendedType: (*google_protobuf.EnumOptions)(nil),
+ ExtendedType: (*descriptor.EnumOptions)(nil),
ExtensionType: (*bool)(nil),
Field: 62021,
Name: "gogoproto.goproto_enum_stringer",
- Tag: "varint,62021,opt,name=goproto_enum_stringer,json=goprotoEnumStringer",
+ Tag: "varint,62021,opt,name=goproto_enum_stringer",
Filename: "gogo.proto",
}
var E_EnumStringer = &proto.ExtensionDesc{
- ExtendedType: (*google_protobuf.EnumOptions)(nil),
+ ExtendedType: (*descriptor.EnumOptions)(nil),
ExtensionType: (*bool)(nil),
Field: 62022,
Name: "gogoproto.enum_stringer",
- Tag: "varint,62022,opt,name=enum_stringer,json=enumStringer",
+ Tag: "varint,62022,opt,name=enum_stringer",
Filename: "gogo.proto",
}
var E_EnumCustomname = &proto.ExtensionDesc{
- ExtendedType: (*google_protobuf.EnumOptions)(nil),
+ ExtendedType: (*descriptor.EnumOptions)(nil),
ExtensionType: (*string)(nil),
Field: 62023,
Name: "gogoproto.enum_customname",
- Tag: "bytes,62023,opt,name=enum_customname,json=enumCustomname",
+ Tag: "bytes,62023,opt,name=enum_customname",
Filename: "gogo.proto",
}
var E_Enumdecl = &proto.ExtensionDesc{
- ExtendedType: (*google_protobuf.EnumOptions)(nil),
+ ExtendedType: (*descriptor.EnumOptions)(nil),
ExtensionType: (*bool)(nil),
Field: 62024,
Name: "gogoproto.enumdecl",
@@ -73,304 +67,331 @@ var E_Enumdecl = &proto.ExtensionDesc{
}
var E_EnumvalueCustomname = &proto.ExtensionDesc{
- ExtendedType: (*google_protobuf.EnumValueOptions)(nil),
+ ExtendedType: (*descriptor.EnumValueOptions)(nil),
ExtensionType: (*string)(nil),
Field: 66001,
Name: "gogoproto.enumvalue_customname",
- Tag: "bytes,66001,opt,name=enumvalue_customname,json=enumvalueCustomname",
+ Tag: "bytes,66001,opt,name=enumvalue_customname",
Filename: "gogo.proto",
}
var E_GoprotoGettersAll = &proto.ExtensionDesc{
- ExtendedType: (*google_protobuf.FileOptions)(nil),
+ ExtendedType: (*descriptor.FileOptions)(nil),
ExtensionType: (*bool)(nil),
Field: 63001,
Name: "gogoproto.goproto_getters_all",
- Tag: "varint,63001,opt,name=goproto_getters_all,json=goprotoGettersAll",
+ Tag: "varint,63001,opt,name=goproto_getters_all",
Filename: "gogo.proto",
}
var E_GoprotoEnumPrefixAll = &proto.ExtensionDesc{
- ExtendedType: (*google_protobuf.FileOptions)(nil),
+ ExtendedType: (*descriptor.FileOptions)(nil),
ExtensionType: (*bool)(nil),
Field: 63002,
Name: "gogoproto.goproto_enum_prefix_all",
- Tag: "varint,63002,opt,name=goproto_enum_prefix_all,json=goprotoEnumPrefixAll",
+ Tag: "varint,63002,opt,name=goproto_enum_prefix_all",
Filename: "gogo.proto",
}
var E_GoprotoStringerAll = &proto.ExtensionDesc{
- ExtendedType: (*google_protobuf.FileOptions)(nil),
+ ExtendedType: (*descriptor.FileOptions)(nil),
ExtensionType: (*bool)(nil),
Field: 63003,
Name: "gogoproto.goproto_stringer_all",
- Tag: "varint,63003,opt,name=goproto_stringer_all,json=goprotoStringerAll",
+ Tag: "varint,63003,opt,name=goproto_stringer_all",
Filename: "gogo.proto",
}
var E_VerboseEqualAll = &proto.ExtensionDesc{
- ExtendedType: (*google_protobuf.FileOptions)(nil),
+ ExtendedType: (*descriptor.FileOptions)(nil),
ExtensionType: (*bool)(nil),
Field: 63004,
Name: "gogoproto.verbose_equal_all",
- Tag: "varint,63004,opt,name=verbose_equal_all,json=verboseEqualAll",
+ Tag: "varint,63004,opt,name=verbose_equal_all",
Filename: "gogo.proto",
}
var E_FaceAll = &proto.ExtensionDesc{
- ExtendedType: (*google_protobuf.FileOptions)(nil),
+ ExtendedType: (*descriptor.FileOptions)(nil),
ExtensionType: (*bool)(nil),
Field: 63005,
Name: "gogoproto.face_all",
- Tag: "varint,63005,opt,name=face_all,json=faceAll",
+ Tag: "varint,63005,opt,name=face_all",
Filename: "gogo.proto",
}
var E_GostringAll = &proto.ExtensionDesc{
- ExtendedType: (*google_protobuf.FileOptions)(nil),
+ ExtendedType: (*descriptor.FileOptions)(nil),
ExtensionType: (*bool)(nil),
Field: 63006,
Name: "gogoproto.gostring_all",
- Tag: "varint,63006,opt,name=gostring_all,json=gostringAll",
+ Tag: "varint,63006,opt,name=gostring_all",
Filename: "gogo.proto",
}
var E_PopulateAll = &proto.ExtensionDesc{
- ExtendedType: (*google_protobuf.FileOptions)(nil),
+ ExtendedType: (*descriptor.FileOptions)(nil),
ExtensionType: (*bool)(nil),
Field: 63007,
Name: "gogoproto.populate_all",
- Tag: "varint,63007,opt,name=populate_all,json=populateAll",
+ Tag: "varint,63007,opt,name=populate_all",
Filename: "gogo.proto",
}
var E_StringerAll = &proto.ExtensionDesc{
- ExtendedType: (*google_protobuf.FileOptions)(nil),
+ ExtendedType: (*descriptor.FileOptions)(nil),
ExtensionType: (*bool)(nil),
Field: 63008,
Name: "gogoproto.stringer_all",
- Tag: "varint,63008,opt,name=stringer_all,json=stringerAll",
+ Tag: "varint,63008,opt,name=stringer_all",
Filename: "gogo.proto",
}
var E_OnlyoneAll = &proto.ExtensionDesc{
- ExtendedType: (*google_protobuf.FileOptions)(nil),
+ ExtendedType: (*descriptor.FileOptions)(nil),
ExtensionType: (*bool)(nil),
Field: 63009,
Name: "gogoproto.onlyone_all",
- Tag: "varint,63009,opt,name=onlyone_all,json=onlyoneAll",
+ Tag: "varint,63009,opt,name=onlyone_all",
Filename: "gogo.proto",
}
var E_EqualAll = &proto.ExtensionDesc{
- ExtendedType: (*google_protobuf.FileOptions)(nil),
+ ExtendedType: (*descriptor.FileOptions)(nil),
ExtensionType: (*bool)(nil),
Field: 63013,
Name: "gogoproto.equal_all",
- Tag: "varint,63013,opt,name=equal_all,json=equalAll",
+ Tag: "varint,63013,opt,name=equal_all",
Filename: "gogo.proto",
}
var E_DescriptionAll = &proto.ExtensionDesc{
- ExtendedType: (*google_protobuf.FileOptions)(nil),
+ ExtendedType: (*descriptor.FileOptions)(nil),
ExtensionType: (*bool)(nil),
Field: 63014,
Name: "gogoproto.description_all",
- Tag: "varint,63014,opt,name=description_all,json=descriptionAll",
+ Tag: "varint,63014,opt,name=description_all",
Filename: "gogo.proto",
}
var E_TestgenAll = &proto.ExtensionDesc{
- ExtendedType: (*google_protobuf.FileOptions)(nil),
+ ExtendedType: (*descriptor.FileOptions)(nil),
ExtensionType: (*bool)(nil),
Field: 63015,
Name: "gogoproto.testgen_all",
- Tag: "varint,63015,opt,name=testgen_all,json=testgenAll",
+ Tag: "varint,63015,opt,name=testgen_all",
Filename: "gogo.proto",
}
var E_BenchgenAll = &proto.ExtensionDesc{
- ExtendedType: (*google_protobuf.FileOptions)(nil),
+ ExtendedType: (*descriptor.FileOptions)(nil),
ExtensionType: (*bool)(nil),
Field: 63016,
Name: "gogoproto.benchgen_all",
- Tag: "varint,63016,opt,name=benchgen_all,json=benchgenAll",
+ Tag: "varint,63016,opt,name=benchgen_all",
Filename: "gogo.proto",
}
var E_MarshalerAll = &proto.ExtensionDesc{
- ExtendedType: (*google_protobuf.FileOptions)(nil),
+ ExtendedType: (*descriptor.FileOptions)(nil),
ExtensionType: (*bool)(nil),
Field: 63017,
Name: "gogoproto.marshaler_all",
- Tag: "varint,63017,opt,name=marshaler_all,json=marshalerAll",
+ Tag: "varint,63017,opt,name=marshaler_all",
Filename: "gogo.proto",
}
var E_UnmarshalerAll = &proto.ExtensionDesc{
- ExtendedType: (*google_protobuf.FileOptions)(nil),
+ ExtendedType: (*descriptor.FileOptions)(nil),
ExtensionType: (*bool)(nil),
Field: 63018,
Name: "gogoproto.unmarshaler_all",
- Tag: "varint,63018,opt,name=unmarshaler_all,json=unmarshalerAll",
+ Tag: "varint,63018,opt,name=unmarshaler_all",
Filename: "gogo.proto",
}
var E_StableMarshalerAll = &proto.ExtensionDesc{
- ExtendedType: (*google_protobuf.FileOptions)(nil),
+ ExtendedType: (*descriptor.FileOptions)(nil),
ExtensionType: (*bool)(nil),
Field: 63019,
Name: "gogoproto.stable_marshaler_all",
- Tag: "varint,63019,opt,name=stable_marshaler_all,json=stableMarshalerAll",
+ Tag: "varint,63019,opt,name=stable_marshaler_all",
Filename: "gogo.proto",
}
var E_SizerAll = &proto.ExtensionDesc{
- ExtendedType: (*google_protobuf.FileOptions)(nil),
+ ExtendedType: (*descriptor.FileOptions)(nil),
ExtensionType: (*bool)(nil),
Field: 63020,
Name: "gogoproto.sizer_all",
- Tag: "varint,63020,opt,name=sizer_all,json=sizerAll",
+ Tag: "varint,63020,opt,name=sizer_all",
Filename: "gogo.proto",
}
var E_GoprotoEnumStringerAll = &proto.ExtensionDesc{
- ExtendedType: (*google_protobuf.FileOptions)(nil),
+ ExtendedType: (*descriptor.FileOptions)(nil),
ExtensionType: (*bool)(nil),
Field: 63021,
Name: "gogoproto.goproto_enum_stringer_all",
- Tag: "varint,63021,opt,name=goproto_enum_stringer_all,json=goprotoEnumStringerAll",
+ Tag: "varint,63021,opt,name=goproto_enum_stringer_all",
Filename: "gogo.proto",
}
var E_EnumStringerAll = &proto.ExtensionDesc{
- ExtendedType: (*google_protobuf.FileOptions)(nil),
+ ExtendedType: (*descriptor.FileOptions)(nil),
ExtensionType: (*bool)(nil),
Field: 63022,
Name: "gogoproto.enum_stringer_all",
- Tag: "varint,63022,opt,name=enum_stringer_all,json=enumStringerAll",
+ Tag: "varint,63022,opt,name=enum_stringer_all",
Filename: "gogo.proto",
}
var E_UnsafeMarshalerAll = &proto.ExtensionDesc{
- ExtendedType: (*google_protobuf.FileOptions)(nil),
+ ExtendedType: (*descriptor.FileOptions)(nil),
ExtensionType: (*bool)(nil),
Field: 63023,
Name: "gogoproto.unsafe_marshaler_all",
- Tag: "varint,63023,opt,name=unsafe_marshaler_all,json=unsafeMarshalerAll",
+ Tag: "varint,63023,opt,name=unsafe_marshaler_all",
Filename: "gogo.proto",
}
var E_UnsafeUnmarshalerAll = &proto.ExtensionDesc{
- ExtendedType: (*google_protobuf.FileOptions)(nil),
+ ExtendedType: (*descriptor.FileOptions)(nil),
ExtensionType: (*bool)(nil),
Field: 63024,
Name: "gogoproto.unsafe_unmarshaler_all",
- Tag: "varint,63024,opt,name=unsafe_unmarshaler_all,json=unsafeUnmarshalerAll",
+ Tag: "varint,63024,opt,name=unsafe_unmarshaler_all",
Filename: "gogo.proto",
}
var E_GoprotoExtensionsMapAll = &proto.ExtensionDesc{
- ExtendedType: (*google_protobuf.FileOptions)(nil),
+ ExtendedType: (*descriptor.FileOptions)(nil),
ExtensionType: (*bool)(nil),
Field: 63025,
Name: "gogoproto.goproto_extensions_map_all",
- Tag: "varint,63025,opt,name=goproto_extensions_map_all,json=goprotoExtensionsMapAll",
+ Tag: "varint,63025,opt,name=goproto_extensions_map_all",
Filename: "gogo.proto",
}
var E_GoprotoUnrecognizedAll = &proto.ExtensionDesc{
- ExtendedType: (*google_protobuf.FileOptions)(nil),
+ ExtendedType: (*descriptor.FileOptions)(nil),
ExtensionType: (*bool)(nil),
Field: 63026,
Name: "gogoproto.goproto_unrecognized_all",
- Tag: "varint,63026,opt,name=goproto_unrecognized_all,json=goprotoUnrecognizedAll",
+ Tag: "varint,63026,opt,name=goproto_unrecognized_all",
Filename: "gogo.proto",
}
var E_GogoprotoImport = &proto.ExtensionDesc{
- ExtendedType: (*google_protobuf.FileOptions)(nil),
+ ExtendedType: (*descriptor.FileOptions)(nil),
ExtensionType: (*bool)(nil),
Field: 63027,
Name: "gogoproto.gogoproto_import",
- Tag: "varint,63027,opt,name=gogoproto_import,json=gogoprotoImport",
+ Tag: "varint,63027,opt,name=gogoproto_import",
Filename: "gogo.proto",
}
var E_ProtosizerAll = &proto.ExtensionDesc{
- ExtendedType: (*google_protobuf.FileOptions)(nil),
+ ExtendedType: (*descriptor.FileOptions)(nil),
ExtensionType: (*bool)(nil),
Field: 63028,
Name: "gogoproto.protosizer_all",
- Tag: "varint,63028,opt,name=protosizer_all,json=protosizerAll",
+ Tag: "varint,63028,opt,name=protosizer_all",
Filename: "gogo.proto",
}
var E_CompareAll = &proto.ExtensionDesc{
- ExtendedType: (*google_protobuf.FileOptions)(nil),
+ ExtendedType: (*descriptor.FileOptions)(nil),
ExtensionType: (*bool)(nil),
Field: 63029,
Name: "gogoproto.compare_all",
- Tag: "varint,63029,opt,name=compare_all,json=compareAll",
+ Tag: "varint,63029,opt,name=compare_all",
Filename: "gogo.proto",
}
var E_TypedeclAll = &proto.ExtensionDesc{
- ExtendedType: (*google_protobuf.FileOptions)(nil),
+ ExtendedType: (*descriptor.FileOptions)(nil),
ExtensionType: (*bool)(nil),
Field: 63030,
Name: "gogoproto.typedecl_all",
- Tag: "varint,63030,opt,name=typedecl_all,json=typedeclAll",
+ Tag: "varint,63030,opt,name=typedecl_all",
Filename: "gogo.proto",
}
var E_EnumdeclAll = &proto.ExtensionDesc{
- ExtendedType: (*google_protobuf.FileOptions)(nil),
+ ExtendedType: (*descriptor.FileOptions)(nil),
ExtensionType: (*bool)(nil),
Field: 63031,
Name: "gogoproto.enumdecl_all",
- Tag: "varint,63031,opt,name=enumdecl_all,json=enumdeclAll",
+ Tag: "varint,63031,opt,name=enumdecl_all",
Filename: "gogo.proto",
}
var E_GoprotoRegistration = &proto.ExtensionDesc{
- ExtendedType: (*google_protobuf.FileOptions)(nil),
+ ExtendedType: (*descriptor.FileOptions)(nil),
ExtensionType: (*bool)(nil),
Field: 63032,
Name: "gogoproto.goproto_registration",
- Tag: "varint,63032,opt,name=goproto_registration,json=goprotoRegistration",
+ Tag: "varint,63032,opt,name=goproto_registration",
+ Filename: "gogo.proto",
+}
+
+var E_MessagenameAll = &proto.ExtensionDesc{
+ ExtendedType: (*descriptor.FileOptions)(nil),
+ ExtensionType: (*bool)(nil),
+ Field: 63033,
+ Name: "gogoproto.messagename_all",
+ Tag: "varint,63033,opt,name=messagename_all",
+ Filename: "gogo.proto",
+}
+
+var E_GoprotoSizecacheAll = &proto.ExtensionDesc{
+ ExtendedType: (*descriptor.FileOptions)(nil),
+ ExtensionType: (*bool)(nil),
+ Field: 63034,
+ Name: "gogoproto.goproto_sizecache_all",
+ Tag: "varint,63034,opt,name=goproto_sizecache_all",
+ Filename: "gogo.proto",
+}
+
+var E_GoprotoUnkeyedAll = &proto.ExtensionDesc{
+ ExtendedType: (*descriptor.FileOptions)(nil),
+ ExtensionType: (*bool)(nil),
+ Field: 63035,
+ Name: "gogoproto.goproto_unkeyed_all",
+ Tag: "varint,63035,opt,name=goproto_unkeyed_all",
Filename: "gogo.proto",
}
var E_GoprotoGetters = &proto.ExtensionDesc{
- ExtendedType: (*google_protobuf.MessageOptions)(nil),
+ ExtendedType: (*descriptor.MessageOptions)(nil),
ExtensionType: (*bool)(nil),
Field: 64001,
Name: "gogoproto.goproto_getters",
- Tag: "varint,64001,opt,name=goproto_getters,json=goprotoGetters",
+ Tag: "varint,64001,opt,name=goproto_getters",
Filename: "gogo.proto",
}
var E_GoprotoStringer = &proto.ExtensionDesc{
- ExtendedType: (*google_protobuf.MessageOptions)(nil),
+ ExtendedType: (*descriptor.MessageOptions)(nil),
ExtensionType: (*bool)(nil),
Field: 64003,
Name: "gogoproto.goproto_stringer",
- Tag: "varint,64003,opt,name=goproto_stringer,json=goprotoStringer",
+ Tag: "varint,64003,opt,name=goproto_stringer",
Filename: "gogo.proto",
}
var E_VerboseEqual = &proto.ExtensionDesc{
- ExtendedType: (*google_protobuf.MessageOptions)(nil),
+ ExtendedType: (*descriptor.MessageOptions)(nil),
ExtensionType: (*bool)(nil),
Field: 64004,
Name: "gogoproto.verbose_equal",
- Tag: "varint,64004,opt,name=verbose_equal,json=verboseEqual",
+ Tag: "varint,64004,opt,name=verbose_equal",
Filename: "gogo.proto",
}
var E_Face = &proto.ExtensionDesc{
- ExtendedType: (*google_protobuf.MessageOptions)(nil),
+ ExtendedType: (*descriptor.MessageOptions)(nil),
ExtensionType: (*bool)(nil),
Field: 64005,
Name: "gogoproto.face",
@@ -379,7 +400,7 @@ var E_Face = &proto.ExtensionDesc{
}
var E_Gostring = &proto.ExtensionDesc{
- ExtendedType: (*google_protobuf.MessageOptions)(nil),
+ ExtendedType: (*descriptor.MessageOptions)(nil),
ExtensionType: (*bool)(nil),
Field: 64006,
Name: "gogoproto.gostring",
@@ -388,7 +409,7 @@ var E_Gostring = &proto.ExtensionDesc{
}
var E_Populate = &proto.ExtensionDesc{
- ExtendedType: (*google_protobuf.MessageOptions)(nil),
+ ExtendedType: (*descriptor.MessageOptions)(nil),
ExtensionType: (*bool)(nil),
Field: 64007,
Name: "gogoproto.populate",
@@ -397,7 +418,7 @@ var E_Populate = &proto.ExtensionDesc{
}
var E_Stringer = &proto.ExtensionDesc{
- ExtendedType: (*google_protobuf.MessageOptions)(nil),
+ ExtendedType: (*descriptor.MessageOptions)(nil),
ExtensionType: (*bool)(nil),
Field: 67008,
Name: "gogoproto.stringer",
@@ -406,7 +427,7 @@ var E_Stringer = &proto.ExtensionDesc{
}
var E_Onlyone = &proto.ExtensionDesc{
- ExtendedType: (*google_protobuf.MessageOptions)(nil),
+ ExtendedType: (*descriptor.MessageOptions)(nil),
ExtensionType: (*bool)(nil),
Field: 64009,
Name: "gogoproto.onlyone",
@@ -415,7 +436,7 @@ var E_Onlyone = &proto.ExtensionDesc{
}
var E_Equal = &proto.ExtensionDesc{
- ExtendedType: (*google_protobuf.MessageOptions)(nil),
+ ExtendedType: (*descriptor.MessageOptions)(nil),
ExtensionType: (*bool)(nil),
Field: 64013,
Name: "gogoproto.equal",
@@ -424,7 +445,7 @@ var E_Equal = &proto.ExtensionDesc{
}
var E_Description = &proto.ExtensionDesc{
- ExtendedType: (*google_protobuf.MessageOptions)(nil),
+ ExtendedType: (*descriptor.MessageOptions)(nil),
ExtensionType: (*bool)(nil),
Field: 64014,
Name: "gogoproto.description",
@@ -433,7 +454,7 @@ var E_Description = &proto.ExtensionDesc{
}
var E_Testgen = &proto.ExtensionDesc{
- ExtendedType: (*google_protobuf.MessageOptions)(nil),
+ ExtendedType: (*descriptor.MessageOptions)(nil),
ExtensionType: (*bool)(nil),
Field: 64015,
Name: "gogoproto.testgen",
@@ -442,7 +463,7 @@ var E_Testgen = &proto.ExtensionDesc{
}
var E_Benchgen = &proto.ExtensionDesc{
- ExtendedType: (*google_protobuf.MessageOptions)(nil),
+ ExtendedType: (*descriptor.MessageOptions)(nil),
ExtensionType: (*bool)(nil),
Field: 64016,
Name: "gogoproto.benchgen",
@@ -451,7 +472,7 @@ var E_Benchgen = &proto.ExtensionDesc{
}
var E_Marshaler = &proto.ExtensionDesc{
- ExtendedType: (*google_protobuf.MessageOptions)(nil),
+ ExtendedType: (*descriptor.MessageOptions)(nil),
ExtensionType: (*bool)(nil),
Field: 64017,
Name: "gogoproto.marshaler",
@@ -460,7 +481,7 @@ var E_Marshaler = &proto.ExtensionDesc{
}
var E_Unmarshaler = &proto.ExtensionDesc{
- ExtendedType: (*google_protobuf.MessageOptions)(nil),
+ ExtendedType: (*descriptor.MessageOptions)(nil),
ExtensionType: (*bool)(nil),
Field: 64018,
Name: "gogoproto.unmarshaler",
@@ -469,16 +490,16 @@ var E_Unmarshaler = &proto.ExtensionDesc{
}
var E_StableMarshaler = &proto.ExtensionDesc{
- ExtendedType: (*google_protobuf.MessageOptions)(nil),
+ ExtendedType: (*descriptor.MessageOptions)(nil),
ExtensionType: (*bool)(nil),
Field: 64019,
Name: "gogoproto.stable_marshaler",
- Tag: "varint,64019,opt,name=stable_marshaler,json=stableMarshaler",
+ Tag: "varint,64019,opt,name=stable_marshaler",
Filename: "gogo.proto",
}
var E_Sizer = &proto.ExtensionDesc{
- ExtendedType: (*google_protobuf.MessageOptions)(nil),
+ ExtendedType: (*descriptor.MessageOptions)(nil),
ExtensionType: (*bool)(nil),
Field: 64020,
Name: "gogoproto.sizer",
@@ -487,43 +508,43 @@ var E_Sizer = &proto.ExtensionDesc{
}
var E_UnsafeMarshaler = &proto.ExtensionDesc{
- ExtendedType: (*google_protobuf.MessageOptions)(nil),
+ ExtendedType: (*descriptor.MessageOptions)(nil),
ExtensionType: (*bool)(nil),
Field: 64023,
Name: "gogoproto.unsafe_marshaler",
- Tag: "varint,64023,opt,name=unsafe_marshaler,json=unsafeMarshaler",
+ Tag: "varint,64023,opt,name=unsafe_marshaler",
Filename: "gogo.proto",
}
var E_UnsafeUnmarshaler = &proto.ExtensionDesc{
- ExtendedType: (*google_protobuf.MessageOptions)(nil),
+ ExtendedType: (*descriptor.MessageOptions)(nil),
ExtensionType: (*bool)(nil),
Field: 64024,
Name: "gogoproto.unsafe_unmarshaler",
- Tag: "varint,64024,opt,name=unsafe_unmarshaler,json=unsafeUnmarshaler",
+ Tag: "varint,64024,opt,name=unsafe_unmarshaler",
Filename: "gogo.proto",
}
var E_GoprotoExtensionsMap = &proto.ExtensionDesc{
- ExtendedType: (*google_protobuf.MessageOptions)(nil),
+ ExtendedType: (*descriptor.MessageOptions)(nil),
ExtensionType: (*bool)(nil),
Field: 64025,
Name: "gogoproto.goproto_extensions_map",
- Tag: "varint,64025,opt,name=goproto_extensions_map,json=goprotoExtensionsMap",
+ Tag: "varint,64025,opt,name=goproto_extensions_map",
Filename: "gogo.proto",
}
var E_GoprotoUnrecognized = &proto.ExtensionDesc{
- ExtendedType: (*google_protobuf.MessageOptions)(nil),
+ ExtendedType: (*descriptor.MessageOptions)(nil),
ExtensionType: (*bool)(nil),
Field: 64026,
Name: "gogoproto.goproto_unrecognized",
- Tag: "varint,64026,opt,name=goproto_unrecognized,json=goprotoUnrecognized",
+ Tag: "varint,64026,opt,name=goproto_unrecognized",
Filename: "gogo.proto",
}
var E_Protosizer = &proto.ExtensionDesc{
- ExtendedType: (*google_protobuf.MessageOptions)(nil),
+ ExtendedType: (*descriptor.MessageOptions)(nil),
ExtensionType: (*bool)(nil),
Field: 64028,
Name: "gogoproto.protosizer",
@@ -532,7 +553,7 @@ var E_Protosizer = &proto.ExtensionDesc{
}
var E_Compare = &proto.ExtensionDesc{
- ExtendedType: (*google_protobuf.MessageOptions)(nil),
+ ExtendedType: (*descriptor.MessageOptions)(nil),
ExtensionType: (*bool)(nil),
Field: 64029,
Name: "gogoproto.compare",
@@ -541,7 +562,7 @@ var E_Compare = &proto.ExtensionDesc{
}
var E_Typedecl = &proto.ExtensionDesc{
- ExtendedType: (*google_protobuf.MessageOptions)(nil),
+ ExtendedType: (*descriptor.MessageOptions)(nil),
ExtensionType: (*bool)(nil),
Field: 64030,
Name: "gogoproto.typedecl",
@@ -549,8 +570,35 @@ var E_Typedecl = &proto.ExtensionDesc{
Filename: "gogo.proto",
}
+var E_Messagename = &proto.ExtensionDesc{
+ ExtendedType: (*descriptor.MessageOptions)(nil),
+ ExtensionType: (*bool)(nil),
+ Field: 64033,
+ Name: "gogoproto.messagename",
+ Tag: "varint,64033,opt,name=messagename",
+ Filename: "gogo.proto",
+}
+
+var E_GoprotoSizecache = &proto.ExtensionDesc{
+ ExtendedType: (*descriptor.MessageOptions)(nil),
+ ExtensionType: (*bool)(nil),
+ Field: 64034,
+ Name: "gogoproto.goproto_sizecache",
+ Tag: "varint,64034,opt,name=goproto_sizecache",
+ Filename: "gogo.proto",
+}
+
+var E_GoprotoUnkeyed = &proto.ExtensionDesc{
+ ExtendedType: (*descriptor.MessageOptions)(nil),
+ ExtensionType: (*bool)(nil),
+ Field: 64035,
+ Name: "gogoproto.goproto_unkeyed",
+ Tag: "varint,64035,opt,name=goproto_unkeyed",
+ Filename: "gogo.proto",
+}
+
var E_Nullable = &proto.ExtensionDesc{
- ExtendedType: (*google_protobuf.FieldOptions)(nil),
+ ExtendedType: (*descriptor.FieldOptions)(nil),
ExtensionType: (*bool)(nil),
Field: 65001,
Name: "gogoproto.nullable",
@@ -559,7 +607,7 @@ var E_Nullable = &proto.ExtensionDesc{
}
var E_Embed = &proto.ExtensionDesc{
- ExtendedType: (*google_protobuf.FieldOptions)(nil),
+ ExtendedType: (*descriptor.FieldOptions)(nil),
ExtensionType: (*bool)(nil),
Field: 65002,
Name: "gogoproto.embed",
@@ -568,7 +616,7 @@ var E_Embed = &proto.ExtensionDesc{
}
var E_Customtype = &proto.ExtensionDesc{
- ExtendedType: (*google_protobuf.FieldOptions)(nil),
+ ExtendedType: (*descriptor.FieldOptions)(nil),
ExtensionType: (*string)(nil),
Field: 65003,
Name: "gogoproto.customtype",
@@ -577,7 +625,7 @@ var E_Customtype = &proto.ExtensionDesc{
}
var E_Customname = &proto.ExtensionDesc{
- ExtendedType: (*google_protobuf.FieldOptions)(nil),
+ ExtendedType: (*descriptor.FieldOptions)(nil),
ExtensionType: (*string)(nil),
Field: 65004,
Name: "gogoproto.customname",
@@ -586,7 +634,7 @@ var E_Customname = &proto.ExtensionDesc{
}
var E_Jsontag = &proto.ExtensionDesc{
- ExtendedType: (*google_protobuf.FieldOptions)(nil),
+ ExtendedType: (*descriptor.FieldOptions)(nil),
ExtensionType: (*string)(nil),
Field: 65005,
Name: "gogoproto.jsontag",
@@ -595,7 +643,7 @@ var E_Jsontag = &proto.ExtensionDesc{
}
var E_Moretags = &proto.ExtensionDesc{
- ExtendedType: (*google_protobuf.FieldOptions)(nil),
+ ExtendedType: (*descriptor.FieldOptions)(nil),
ExtensionType: (*string)(nil),
Field: 65006,
Name: "gogoproto.moretags",
@@ -604,7 +652,7 @@ var E_Moretags = &proto.ExtensionDesc{
}
var E_Casttype = &proto.ExtensionDesc{
- ExtendedType: (*google_protobuf.FieldOptions)(nil),
+ ExtendedType: (*descriptor.FieldOptions)(nil),
ExtensionType: (*string)(nil),
Field: 65007,
Name: "gogoproto.casttype",
@@ -613,7 +661,7 @@ var E_Casttype = &proto.ExtensionDesc{
}
var E_Castkey = &proto.ExtensionDesc{
- ExtendedType: (*google_protobuf.FieldOptions)(nil),
+ ExtendedType: (*descriptor.FieldOptions)(nil),
ExtensionType: (*string)(nil),
Field: 65008,
Name: "gogoproto.castkey",
@@ -622,7 +670,7 @@ var E_Castkey = &proto.ExtensionDesc{
}
var E_Castvalue = &proto.ExtensionDesc{
- ExtendedType: (*google_protobuf.FieldOptions)(nil),
+ ExtendedType: (*descriptor.FieldOptions)(nil),
ExtensionType: (*string)(nil),
Field: 65009,
Name: "gogoproto.castvalue",
@@ -631,7 +679,7 @@ var E_Castvalue = &proto.ExtensionDesc{
}
var E_Stdtime = &proto.ExtensionDesc{
- ExtendedType: (*google_protobuf.FieldOptions)(nil),
+ ExtendedType: (*descriptor.FieldOptions)(nil),
ExtensionType: (*bool)(nil),
Field: 65010,
Name: "gogoproto.stdtime",
@@ -640,7 +688,7 @@ var E_Stdtime = &proto.ExtensionDesc{
}
var E_Stdduration = &proto.ExtensionDesc{
- ExtendedType: (*google_protobuf.FieldOptions)(nil),
+ ExtendedType: (*descriptor.FieldOptions)(nil),
ExtensionType: (*bool)(nil),
Field: 65011,
Name: "gogoproto.stdduration",
@@ -648,6 +696,15 @@ var E_Stdduration = &proto.ExtensionDesc{
Filename: "gogo.proto",
}
+var E_Wktpointer = &proto.ExtensionDesc{
+ ExtendedType: (*descriptor.FieldOptions)(nil),
+ ExtensionType: (*bool)(nil),
+ Field: 65012,
+ Name: "gogoproto.wktpointer",
+ Tag: "varint,65012,opt,name=wktpointer",
+ Filename: "gogo.proto",
+}
+
func init() {
proto.RegisterExtension(E_GoprotoEnumPrefix)
proto.RegisterExtension(E_GoprotoEnumStringer)
@@ -684,6 +741,9 @@ func init() {
proto.RegisterExtension(E_TypedeclAll)
proto.RegisterExtension(E_EnumdeclAll)
proto.RegisterExtension(E_GoprotoRegistration)
+ proto.RegisterExtension(E_MessagenameAll)
+ proto.RegisterExtension(E_GoprotoSizecacheAll)
+ proto.RegisterExtension(E_GoprotoUnkeyedAll)
proto.RegisterExtension(E_GoprotoGetters)
proto.RegisterExtension(E_GoprotoStringer)
proto.RegisterExtension(E_VerboseEqual)
@@ -707,6 +767,9 @@ func init() {
proto.RegisterExtension(E_Protosizer)
proto.RegisterExtension(E_Compare)
proto.RegisterExtension(E_Typedecl)
+ proto.RegisterExtension(E_Messagename)
+ proto.RegisterExtension(E_GoprotoSizecache)
+ proto.RegisterExtension(E_GoprotoUnkeyed)
proto.RegisterExtension(E_Nullable)
proto.RegisterExtension(E_Embed)
proto.RegisterExtension(E_Customtype)
@@ -718,87 +781,94 @@ func init() {
proto.RegisterExtension(E_Castvalue)
proto.RegisterExtension(E_Stdtime)
proto.RegisterExtension(E_Stdduration)
+ proto.RegisterExtension(E_Wktpointer)
}
-func init() { proto.RegisterFile("gogo.proto", fileDescriptorGogo) }
+func init() { proto.RegisterFile("gogo.proto", fileDescriptor_592445b5231bc2b9) }
-var fileDescriptorGogo = []byte{
- // 1220 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x98, 0x4b, 0x6f, 0x1c, 0x45,
- 0x10, 0x80, 0x85, 0x48, 0x14, 0x6f, 0xd9, 0x8e, 0xf1, 0xda, 0x98, 0x10, 0x81, 0x08, 0x9c, 0x38,
- 0xd9, 0xa7, 0x08, 0xa5, 0xad, 0xc8, 0x72, 0x2c, 0xc7, 0x4a, 0x84, 0xc1, 0x98, 0x38, 0xbc, 0x0e,
- 0xab, 0xd9, 0xdd, 0xf6, 0x78, 0x60, 0x66, 0x7a, 0x98, 0xe9, 0x89, 0xe2, 0xdc, 0x50, 0x78, 0x08,
- 0x21, 0xde, 0x48, 0x90, 0x90, 0x04, 0x38, 0xf0, 0x7e, 0x86, 0xf7, 0x91, 0x0b, 0x8f, 0x2b, 0xff,
- 0x81, 0x0b, 0x60, 0xde, 0xbe, 0xf9, 0x82, 0x6a, 0xb6, 0x6a, 0xb6, 0x67, 0xbd, 0x52, 0xf7, 0xde,
- 0xc6, 0xeb, 0xfe, 0xbe, 0x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,
- 0x62, 0x17, 0x3d, 0x78, 0x9b, 0x1f, 0xe8, 0x8d, 0xbc, 0x39, 0xdd, 0x52, 0xd1, 0x0c, 0x1e, 0x35,
- 0xbb, 0xbf, 0xa0, 0x95, 0x07, 0xcf, 0xff, 0x03, 0x00, 0x00, 0xff, 0xff, 0xed, 0x5f, 0x6c, 0x20,
- 0x74, 0x13, 0x00, 0x00,
+var fileDescriptor_592445b5231bc2b9 = []byte{
+ // 1328 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x98, 0x49, 0x6f, 0x1c, 0x45,
+ 0x14, 0x80, 0x85, 0x48, 0x64, 0x4f, 0x79, 0x8b, 0xc7, 0xc6, 0x84, 0x08, 0x44, 0xe0, 0xc4, 0xc9,
+ 0x3e, 0x45, 0x28, 0x65, 0x45, 0x96, 0x63, 0x39, 0x56, 0x10, 0x0e, 0xc6, 0x89, 0xc3, 0x76, 0x18,
+ 0xf5, 0xf4, 0x94, 0xdb, 0x8d, 0xbb, 0xbb, 0x9a, 0xee, 0xea, 0x10, 0xe7, 0x86, 0xc2, 0x22, 0x84,
+ 0xd8, 0x91, 0x20, 0x21, 0x09, 0x04, 0xc4, 0xbe, 0x86, 0x7d, 0xb9, 0x70, 0x61, 0xb9, 0xf2, 0x1f,
+ 0xb8, 0x00, 0x66, 0xf7, 0xcd, 0x17, 0xf4, 0xba, 0xdf, 0xeb, 0xa9, 0x69, 0x8f, 0x54, 0x35, 0xb7,
+ 0xf6, 0xb8, 0xbe, 0x6f, 0xaa, 0xdf, 0xeb, 0x7a, 0xef, 0x4d, 0x33, 0xe6, 0x49, 0x4f, 0x4e, 0xc6,
+ 0x89, 0x54, 0xb2, 0x5e, 0x83, 0xeb, 0xfc, 0x72, 0xdf, 0x7e, 0x4f, 0x4a, 0x2f, 0x10, 0x53, 0xf9,
+ 0x5f, 0xcd, 0x6c, 0x75, 0xaa, 0x25, 0x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0xb0, 0x69, 0xb8, 0x5e, 0x17, 0x1b, 0x26, 0xf6, 0x6f,
+ 0xda, 0x34, 0xae, 0xe7, 0x87, 0x58, 0x0d, 0x2e, 0xf3, 0xb7, 0x4a, 0x26, 0xf8, 0x1f, 0x84, 0xdb,
+ 0x04, 0x7c, 0x73, 0xaa, 0x5a, 0xca, 0x37, 0x07, 0xfb, 0x5f, 0xcc, 0x34, 0xad, 0xe7, 0xb3, 0x6c,
+ 0x20, 0x55, 0xad, 0x56, 0x86, 0xf3, 0xa9, 0x01, 0xff, 0x6f, 0xbb, 0x7c, 0x65, 0x51, 0x32, 0x90,
+ 0xed, 0x07, 0xd7, 0x55, 0x2c, 0xfd, 0x48, 0x89, 0xc4, 0x64, 0xd8, 0x42, 0x83, 0x86, 0x1c, 0x9e,
+ 0x67, 0x63, 0xae, 0x0c, 0xab, 0xdc, 0x61, 0xb6, 0x20, 0x17, 0xe4, 0x52, 0x5e, 0x67, 0xee, 0xbd,
+ 0xd9, 0xf3, 0xd5, 0x5a, 0xd6, 0x9c, 0x74, 0x65, 0x38, 0x05, 0xbf, 0x3c, 0xda, 0x2f, 0x54, 0xcb,
+ 0xdf, 0x21, 0xff, 0x07, 0x00, 0x00, 0xff, 0xff, 0x9c, 0xaf, 0x70, 0x4e, 0x83, 0x15, 0x00, 0x00,
}
diff --git a/vendor/github.com/gogo/protobuf/gogoproto/gogo.proto b/vendor/github.com/gogo/protobuf/gogoproto/gogo.proto
index 7f0997935..b80c85653 100644
--- a/vendor/github.com/gogo/protobuf/gogoproto/gogo.proto
+++ b/vendor/github.com/gogo/protobuf/gogoproto/gogo.proto
@@ -83,6 +83,10 @@ extend google.protobuf.FileOptions {
optional bool enumdecl_all = 63031;
optional bool goproto_registration = 63032;
+ optional bool messagename_all = 63033;
+
+ optional bool goproto_sizecache_all = 63034;
+ optional bool goproto_unkeyed_all = 63035;
}
extend google.protobuf.MessageOptions {
@@ -115,6 +119,11 @@ extend google.protobuf.MessageOptions {
optional bool compare = 64029;
optional bool typedecl = 64030;
+
+ optional bool messagename = 64033;
+
+ optional bool goproto_sizecache = 64034;
+ optional bool goproto_unkeyed = 64035;
}
extend google.protobuf.FieldOptions {
@@ -130,4 +139,6 @@ extend google.protobuf.FieldOptions {
optional bool stdtime = 65010;
optional bool stdduration = 65011;
+ optional bool wktpointer = 65012;
+
}
diff --git a/vendor/github.com/gogo/protobuf/gogoproto/helper.go b/vendor/github.com/gogo/protobuf/gogoproto/helper.go
index 6b851c562..390d4e4be 100644
--- a/vendor/github.com/gogo/protobuf/gogoproto/helper.go
+++ b/vendor/github.com/gogo/protobuf/gogoproto/helper.go
@@ -47,6 +47,55 @@ func IsStdDuration(field *google_protobuf.FieldDescriptorProto) bool {
return proto.GetBoolExtension(field.Options, E_Stdduration, false)
}
+func IsStdDouble(field *google_protobuf.FieldDescriptorProto) bool {
+ return proto.GetBoolExtension(field.Options, E_Wktpointer, false) && *field.TypeName == ".google.protobuf.DoubleValue"
+}
+
+func IsStdFloat(field *google_protobuf.FieldDescriptorProto) bool {
+ return proto.GetBoolExtension(field.Options, E_Wktpointer, false) && *field.TypeName == ".google.protobuf.FloatValue"
+}
+
+func IsStdInt64(field *google_protobuf.FieldDescriptorProto) bool {
+ return proto.GetBoolExtension(field.Options, E_Wktpointer, false) && *field.TypeName == ".google.protobuf.Int64Value"
+}
+
+func IsStdUInt64(field *google_protobuf.FieldDescriptorProto) bool {
+ return proto.GetBoolExtension(field.Options, E_Wktpointer, false) && *field.TypeName == ".google.protobuf.UInt64Value"
+}
+
+func IsStdInt32(field *google_protobuf.FieldDescriptorProto) bool {
+ return proto.GetBoolExtension(field.Options, E_Wktpointer, false) && *field.TypeName == ".google.protobuf.Int32Value"
+}
+
+func IsStdUInt32(field *google_protobuf.FieldDescriptorProto) bool {
+ return proto.GetBoolExtension(field.Options, E_Wktpointer, false) && *field.TypeName == ".google.protobuf.UInt32Value"
+}
+
+func IsStdBool(field *google_protobuf.FieldDescriptorProto) bool {
+ return proto.GetBoolExtension(field.Options, E_Wktpointer, false) && *field.TypeName == ".google.protobuf.BoolValue"
+}
+
+func IsStdString(field *google_protobuf.FieldDescriptorProto) bool {
+ return proto.GetBoolExtension(field.Options, E_Wktpointer, false) && *field.TypeName == ".google.protobuf.StringValue"
+}
+
+func IsStdBytes(field *google_protobuf.FieldDescriptorProto) bool {
+ return proto.GetBoolExtension(field.Options, E_Wktpointer, false) && *field.TypeName == ".google.protobuf.BytesValue"
+}
+
+func IsStdType(field *google_protobuf.FieldDescriptorProto) bool {
+ return (IsStdTime(field) || IsStdDuration(field) ||
+ IsStdDouble(field) || IsStdFloat(field) ||
+ IsStdInt64(field) || IsStdUInt64(field) ||
+ IsStdInt32(field) || IsStdUInt32(field) ||
+ IsStdBool(field) ||
+ IsStdString(field) || IsStdBytes(field))
+}
+
+func IsWktPtr(field *google_protobuf.FieldDescriptorProto) bool {
+ return proto.GetBoolExtension(field.Options, E_Wktpointer, false)
+}
+
func NeedsNilCheck(proto3 bool, field *google_protobuf.FieldDescriptorProto) bool {
nullable := IsNullable(field)
if field.IsMessage() || IsCustomType(field) {
@@ -334,9 +383,6 @@ func HasExtensionsMap(file *google_protobuf.FileDescriptorProto, message *google
}
func HasUnrecognized(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool {
- if IsProto3(file) {
- return false
- }
return proto.GetBoolExtension(message.Options, E_GoprotoUnrecognized, proto.GetBoolExtension(file.Options, E_GoprotoUnrecognizedAll, true))
}
@@ -355,3 +401,15 @@ func HasCompare(file *google_protobuf.FileDescriptorProto, message *google_proto
func RegistersGolangProto(file *google_protobuf.FileDescriptorProto) bool {
return proto.GetBoolExtension(file.Options, E_GoprotoRegistration, false)
}
+
+func HasMessageName(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool {
+ return proto.GetBoolExtension(message.Options, E_Messagename, proto.GetBoolExtension(file.Options, E_MessagenameAll, false))
+}
+
+func HasSizecache(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool {
+ return proto.GetBoolExtension(message.Options, E_GoprotoSizecache, proto.GetBoolExtension(file.Options, E_GoprotoSizecacheAll, true))
+}
+
+func HasUnkeyed(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool {
+ return proto.GetBoolExtension(message.Options, E_GoprotoUnkeyed, proto.GetBoolExtension(file.Options, E_GoprotoUnkeyedAll, true))
+}
diff --git a/vendor/github.com/gogo/protobuf/plugin/embedcheck/embedcheck.go b/vendor/github.com/gogo/protobuf/plugin/embedcheck/embedcheck.go
index 1cb77cacb..bc68efe12 100644
--- a/vendor/github.com/gogo/protobuf/plugin/embedcheck/embedcheck.go
+++ b/vendor/github.com/gogo/protobuf/plugin/embedcheck/embedcheck.go
@@ -47,9 +47,10 @@ package embedcheck
import (
"fmt"
+ "os"
+
"github.com/gogo/protobuf/gogoproto"
"github.com/gogo/protobuf/protoc-gen-gogo/generator"
- "os"
)
type plugin struct {
@@ -163,7 +164,7 @@ func (p *plugin) checkOverwrite(message *generator.Descriptor, enablers map[stri
desc := p.ObjectNamed(field.GetTypeName())
msg := desc.(*generator.Descriptor)
for errStr, enabled := range enablers {
- if enabled(msg.File(), msg.DescriptorProto) {
+ if enabled(msg.File().FileDescriptorProto, msg.DescriptorProto) {
fmt.Fprintf(os.Stderr, "WARNING: found non-%v %v with embedded %v %v\n", names, ccTypeName, errStr, fieldname)
}
}
diff --git a/vendor/github.com/gogo/protobuf/plugin/equal/equal.go b/vendor/github.com/gogo/protobuf/plugin/equal/equal.go
index 41a2c9704..6358fc99a 100644
--- a/vendor/github.com/gogo/protobuf/plugin/equal/equal.go
+++ b/vendor/github.com/gogo/protobuf/plugin/equal/equal.go
@@ -292,7 +292,16 @@ func (p *plugin) generateField(file *generator.FileDescriptor, message *generato
repeated := field.IsRepeated()
ctype := gogoproto.IsCustomType(field)
nullable := gogoproto.IsNullable(field)
- isDuration := gogoproto.IsStdDuration(field)
+ isNormal := (gogoproto.IsStdDuration(field) ||
+ gogoproto.IsStdDouble(field) ||
+ gogoproto.IsStdFloat(field) ||
+ gogoproto.IsStdInt64(field) ||
+ gogoproto.IsStdUInt64(field) ||
+ gogoproto.IsStdInt32(field) ||
+ gogoproto.IsStdUInt32(field) ||
+ gogoproto.IsStdBool(field) ||
+ gogoproto.IsStdString(field))
+ isBytes := gogoproto.IsStdBytes(field)
isTimestamp := gogoproto.IsStdTime(field)
// oneof := field.OneofIndex != nil
if !repeated {
@@ -322,7 +331,7 @@ func (p *plugin) generateField(file *generator.FileDescriptor, message *generato
}
p.Out()
p.P(`}`)
- } else if isDuration {
+ } else if isNormal {
if nullable {
p.generateNullableField(fieldname, verbose)
} else {
@@ -336,6 +345,32 @@ func (p *plugin) generateField(file *generator.FileDescriptor, message *generato
}
p.Out()
p.P(`}`)
+ } else if isBytes {
+ if nullable {
+ p.P(`if that1.`, fieldname, ` == nil {`)
+ p.In()
+ p.P(`if this.`, fieldname, ` != nil {`)
+ p.In()
+ if verbose {
+ p.P(`return `, p.fmtPkg.Use(), `.Errorf("this.`, fieldname, ` != nil && that1.`, fieldname, ` == nil")`)
+ } else {
+ p.P(`return false`)
+ }
+ p.Out()
+ p.P(`}`)
+ p.Out()
+ p.P(`} else if !`, p.bytesPkg.Use(), `.Equal(*this.`, fieldname, `, *that1.`, fieldname, `) {`)
+ } else {
+ p.P(`if !`, p.bytesPkg.Use(), `.Equal(this.`, fieldname, `, that1.`, fieldname, `) {`)
+ }
+ p.In()
+ if verbose {
+ p.P(`return `, p.fmtPkg.Use(), `.Errorf("`, fieldname, ` this(%v) Not Equal that(%v)", this.`, fieldname, `, that1.`, fieldname, `)`)
+ } else {
+ p.P(`return false`)
+ }
+ p.Out()
+ p.P(`}`)
} else {
if field.IsMessage() || p.IsGroup(field) {
if nullable {
@@ -387,12 +422,18 @@ func (p *plugin) generateField(file *generator.FileDescriptor, message *generato
} else {
p.P(`if !this.`, fieldname, `[i].Equal(that1.`, fieldname, `[i]) {`)
}
- } else if isDuration {
+ } else if isNormal {
if nullable {
p.P(`if dthis, dthat := this.`, fieldname, `[i], that1.`, fieldname, `[i]; (dthis != nil && dthat != nil && *dthis != *dthat) || (dthis != nil && dthat == nil) || (dthis == nil && dthat != nil) {`)
} else {
p.P(`if this.`, fieldname, `[i] != that1.`, fieldname, `[i] {`)
}
+ } else if isBytes {
+ if nullable {
+ p.P(`if !`, p.bytesPkg.Use(), `.Equal(*this.`, fieldname, `[i], *that1.`, fieldname, `[i]) {`)
+ } else {
+ p.P(`if !`, p.bytesPkg.Use(), `.Equal(this.`, fieldname, `[i], that1.`, fieldname, `[i]) {`)
+ }
} else {
if p.IsMap(field) {
m := p.GoMapType(nil, field)
@@ -401,6 +442,16 @@ func (p *plugin) generateField(file *generator.FileDescriptor, message *generato
nullable, valuegoTyp, valuegoAliasTyp = generator.GoMapValueTypes(field, m.ValueField, valuegoTyp, valuegoAliasTyp)
mapValue := m.ValueAliasField
+ mapValueNormal := (gogoproto.IsStdDuration(mapValue) ||
+ gogoproto.IsStdDouble(mapValue) ||
+ gogoproto.IsStdFloat(mapValue) ||
+ gogoproto.IsStdInt64(mapValue) ||
+ gogoproto.IsStdUInt64(mapValue) ||
+ gogoproto.IsStdInt32(mapValue) ||
+ gogoproto.IsStdUInt32(mapValue) ||
+ gogoproto.IsStdBool(mapValue) ||
+ gogoproto.IsStdString(mapValue))
+ mapValueBytes := gogoproto.IsStdBytes(mapValue)
if mapValue.IsMessage() || p.IsGroup(mapValue) {
if nullable && valuegoTyp == valuegoAliasTyp {
p.P(`if !this.`, fieldname, `[i].Equal(that1.`, fieldname, `[i]) {`)
@@ -408,14 +459,26 @@ func (p *plugin) generateField(file *generator.FileDescriptor, message *generato
// Equal() has a pointer receiver, but map value is a value type
a := `this.` + fieldname + `[i]`
b := `that1.` + fieldname + `[i]`
- if valuegoTyp != valuegoAliasTyp {
+ if !mapValueNormal && !mapValueBytes && valuegoTyp != valuegoAliasTyp {
// cast back to the type that has the generated methods on it
a = `(` + valuegoTyp + `)(` + a + `)`
b = `(` + valuegoTyp + `)(` + b + `)`
}
p.P(`a := `, a)
p.P(`b := `, b)
- if nullable {
+ if mapValueNormal {
+ if nullable {
+ p.P(`if *a != *b {`)
+ } else {
+ p.P(`if a != b {`)
+ }
+ } else if mapValueBytes {
+ if nullable {
+ p.P(`if !`, p.bytesPkg.Use(), `.Equal(*a, *b) {`)
+ } else {
+ p.P(`if !`, p.bytesPkg.Use(), `.Equal(a, b) {`)
+ }
+ } else if nullable {
p.P(`if !a.Equal(b) {`)
} else {
p.P(`if !(&a).Equal(&b) {`)
diff --git a/vendor/github.com/gogo/protobuf/plugin/gostring/gostring.go b/vendor/github.com/gogo/protobuf/plugin/gostring/gostring.go
index 2b439469f..6003d65f2 100644
--- a/vendor/github.com/gogo/protobuf/plugin/gostring/gostring.go
+++ b/vendor/github.com/gogo/protobuf/plugin/gostring/gostring.go
@@ -157,7 +157,7 @@ func (p *gostring) Generate(file *generator.FileDescriptor) {
continue
}
p.atleastOne = true
- packageName := file.PackageName()
+ packageName := file.GoPackageName()
ccTypeName := generator.CamelCaseSlice(message.TypeName())
p.P(`func (this *`, ccTypeName, `) GoString() string {`)
@@ -225,7 +225,7 @@ func (p *gostring) Generate(file *generator.FileDescriptor) {
p.P(`s = append(s, "`, fieldname, `: " + `, mapName, `+ ",\n")`)
p.Out()
p.P(`}`)
- } else if (field.IsMessage() && !gogoproto.IsCustomType(field) && !gogoproto.IsStdTime(field) && !gogoproto.IsStdDuration(field)) || p.IsGroup(field) {
+ } else if (field.IsMessage() && !gogoproto.IsCustomType(field) && !gogoproto.IsStdType(field)) || p.IsGroup(field) {
if nullable || repeated {
p.P(`if this.`, fieldname, ` != nil {`)
p.In()
diff --git a/vendor/github.com/gogo/protobuf/plugin/marshalto/marshalto.go b/vendor/github.com/gogo/protobuf/plugin/marshalto/marshalto.go
index 24110cb44..3da7a77ad 100644
--- a/vendor/github.com/gogo/protobuf/plugin/marshalto/marshalto.go
+++ b/vendor/github.com/gogo/protobuf/plugin/marshalto/marshalto.go
@@ -313,12 +313,39 @@ func (p *marshalto) mapField(numGen NumGen, field *descriptor.FieldDescriptorPro
case descriptor.FieldDescriptorProto_TYPE_SINT64:
p.callVarint(`(uint64(`, varName, `) << 1) ^ uint64((`, varName, ` >> 63))`)
case descriptor.FieldDescriptorProto_TYPE_MESSAGE:
- if gogoproto.IsStdTime(field) {
+ if gogoproto.IsStdTime(kvField) {
p.callVarint(p.typesPkg.Use(), `.SizeOfStdTime(*`, varName, `)`)
p.P(`n`, numGen.Next(), `, err := `, p.typesPkg.Use(), `.StdTimeMarshalTo(*`, varName, `, dAtA[i:])`)
- } else if gogoproto.IsStdDuration(field) {
+ } else if gogoproto.IsStdDuration(kvField) {
p.callVarint(p.typesPkg.Use(), `.SizeOfStdDuration(*`, varName, `)`)
p.P(`n`, numGen.Next(), `, err := `, p.typesPkg.Use(), `.StdDurationMarshalTo(*`, varName, `, dAtA[i:])`)
+ } else if gogoproto.IsStdDouble(kvField) {
+ p.callVarint(p.typesPkg.Use(), `.SizeOfStdDouble(*`, varName, `)`)
+ p.P(`n`, numGen.Next(), `, err := `, p.typesPkg.Use(), `.StdDoubleMarshalTo(*`, varName, `, dAtA[i:])`)
+ } else if gogoproto.IsStdFloat(kvField) {
+ p.callVarint(p.typesPkg.Use(), `.SizeOfStdFloat(*`, varName, `)`)
+ p.P(`n`, numGen.Next(), `, err := `, p.typesPkg.Use(), `.StdFloatMarshalTo(*`, varName, `, dAtA[i:])`)
+ } else if gogoproto.IsStdInt64(kvField) {
+ p.callVarint(p.typesPkg.Use(), `.SizeOfStdInt64(*`, varName, `)`)
+ p.P(`n`, numGen.Next(), `, err := `, p.typesPkg.Use(), `.StdInt64MarshalTo(*`, varName, `, dAtA[i:])`)
+ } else if gogoproto.IsStdUInt64(kvField) {
+ p.callVarint(p.typesPkg.Use(), `.SizeOfStdUInt64(*`, varName, `)`)
+ p.P(`n`, numGen.Next(), `, err := `, p.typesPkg.Use(), `.StdUInt64MarshalTo(*`, varName, `, dAtA[i:])`)
+ } else if gogoproto.IsStdInt32(kvField) {
+ p.callVarint(p.typesPkg.Use(), `.SizeOfStdInt32(*`, varName, `)`)
+ p.P(`n`, numGen.Next(), `, err := `, p.typesPkg.Use(), `.StdInt32MarshalTo(*`, varName, `, dAtA[i:])`)
+ } else if gogoproto.IsStdUInt32(kvField) {
+ p.callVarint(p.typesPkg.Use(), `.SizeOfStdUInt32(*`, varName, `)`)
+ p.P(`n`, numGen.Next(), `, err := `, p.typesPkg.Use(), `.StdUInt32MarshalTo(*`, varName, `, dAtA[i:])`)
+ } else if gogoproto.IsStdBool(kvField) {
+ p.callVarint(p.typesPkg.Use(), `.SizeOfStdBool(*`, varName, `)`)
+ p.P(`n`, numGen.Next(), `, err := `, p.typesPkg.Use(), `.StdBoolMarshalTo(*`, varName, `, dAtA[i:])`)
+ } else if gogoproto.IsStdString(kvField) {
+ p.callVarint(p.typesPkg.Use(), `.SizeOfStdString(*`, varName, `)`)
+ p.P(`n`, numGen.Next(), `, err := `, p.typesPkg.Use(), `.StdStringMarshalTo(*`, varName, `, dAtA[i:])`)
+ } else if gogoproto.IsStdBytes(kvField) {
+ p.callVarint(p.typesPkg.Use(), `.SizeOfStdBytes(*`, varName, `)`)
+ p.P(`n`, numGen.Next(), `, err := `, p.typesPkg.Use(), `.StdBytesMarshalTo(*`, varName, `, dAtA[i:])`)
} else if protoSizer {
p.callVarint(varName, `.ProtoSize()`)
p.P(`n`, numGen.Next(), `, err := `, varName, `.MarshalTo(dAtA[i:])`)
@@ -781,8 +808,7 @@ func (p *marshalto) generateField(proto3 bool, numGen NumGen, file *generator.Fi
sum = append(sum, `soz`+p.localName+`(uint64(v))`)
case descriptor.FieldDescriptorProto_TYPE_MESSAGE:
if valuegoTyp != valuegoAliasTyp &&
- !gogoproto.IsStdTime(field) &&
- !gogoproto.IsStdDuration(field) {
+ !gogoproto.IsStdType(m.ValueAliasField) {
if nullable {
// cast back to the type that has the generated methods on it
accessor = `((` + valuegoTyp + `)(` + accessor + `))`
@@ -795,10 +821,28 @@ func (p *marshalto) generateField(proto3 bool, numGen NumGen, file *generator.Fi
p.P(`msgSize := 0`)
p.P(`if `, accessor, ` != nil {`)
p.In()
- if gogoproto.IsStdTime(field) {
+ if gogoproto.IsStdTime(m.ValueAliasField) {
p.P(`msgSize = `, p.typesPkg.Use(), `.SizeOfStdTime(*`, accessor, `)`)
- } else if gogoproto.IsStdDuration(field) {
+ } else if gogoproto.IsStdDuration(m.ValueAliasField) {
p.P(`msgSize = `, p.typesPkg.Use(), `.SizeOfStdDuration(*`, accessor, `)`)
+ } else if gogoproto.IsStdDouble(m.ValueAliasField) {
+ p.P(`msgSize = `, p.typesPkg.Use(), `.SizeOfStdDouble(*`, accessor, `)`)
+ } else if gogoproto.IsStdFloat(m.ValueAliasField) {
+ p.P(`msgSize = `, p.typesPkg.Use(), `.SizeOfStdFloat(*`, accessor, `)`)
+ } else if gogoproto.IsStdInt64(m.ValueAliasField) {
+ p.P(`msgSize = `, p.typesPkg.Use(), `.SizeOfStdInt64(*`, accessor, `)`)
+ } else if gogoproto.IsStdUInt64(m.ValueAliasField) {
+ p.P(`msgSize = `, p.typesPkg.Use(), `.SizeOfStdUInt64(*`, accessor, `)`)
+ } else if gogoproto.IsStdInt32(m.ValueAliasField) {
+ p.P(`msgSize = `, p.typesPkg.Use(), `.SizeOfStdInt32(*`, accessor, `)`)
+ } else if gogoproto.IsStdUInt32(m.ValueAliasField) {
+ p.P(`msgSize = `, p.typesPkg.Use(), `.SizeOfStdUInt32(*`, accessor, `)`)
+ } else if gogoproto.IsStdBool(m.ValueAliasField) {
+ p.P(`msgSize = `, p.typesPkg.Use(), `.SizeOfStdBool(*`, accessor, `)`)
+ } else if gogoproto.IsStdString(m.ValueAliasField) {
+ p.P(`msgSize = `, p.typesPkg.Use(), `.SizeOfStdString(*`, accessor, `)`)
+ } else if gogoproto.IsStdBytes(m.ValueAliasField) {
+ p.P(`msgSize = `, p.typesPkg.Use(), `.SizeOfStdBytes(*`, accessor, `)`)
} else if protoSizer {
p.P(`msgSize = `, accessor, `.ProtoSize()`)
} else {
@@ -828,7 +872,7 @@ func (p *marshalto) generateField(proto3 bool, numGen NumGen, file *generator.Fi
p.In()
}
p.encodeKey(2, wireToType(valuewire))
- p.mapField(numGen, field, m.ValueField, accessor, protoSizer)
+ p.mapField(numGen, field, m.ValueAliasField, accessor, protoSizer)
if nullableMsg || plainBytes {
p.Out()
p.P(`}`)
@@ -852,6 +896,60 @@ func (p *marshalto) generateField(proto3 bool, numGen NumGen, file *generator.Fi
}
p.callVarint(p.typesPkg.Use(), `.SizeOfStdDuration(`, varName, `)`)
p.P(`n, err := `, p.typesPkg.Use(), `.StdDurationMarshalTo(`, varName, `, dAtA[i:])`)
+ } else if gogoproto.IsStdDouble(field) {
+ if gogoproto.IsNullable(field) {
+ varName = "*" + varName
+ }
+ p.callVarint(p.typesPkg.Use(), `.SizeOfStdDouble(`, varName, `)`)
+ p.P(`n, err := `, p.typesPkg.Use(), `.StdDoubleMarshalTo(`, varName, `, dAtA[i:])`)
+ } else if gogoproto.IsStdFloat(field) {
+ if gogoproto.IsNullable(field) {
+ varName = "*" + varName
+ }
+ p.callVarint(p.typesPkg.Use(), `.SizeOfStdFloat(`, varName, `)`)
+ p.P(`n, err := `, p.typesPkg.Use(), `.StdFloatMarshalTo(`, varName, `, dAtA[i:])`)
+ } else if gogoproto.IsStdInt64(field) {
+ if gogoproto.IsNullable(field) {
+ varName = "*" + varName
+ }
+ p.callVarint(p.typesPkg.Use(), `.SizeOfStdInt64(`, varName, `)`)
+ p.P(`n, err := `, p.typesPkg.Use(), `.StdInt64MarshalTo(`, varName, `, dAtA[i:])`)
+ } else if gogoproto.IsStdUInt64(field) {
+ if gogoproto.IsNullable(field) {
+ varName = "*" + varName
+ }
+ p.callVarint(p.typesPkg.Use(), `.SizeOfStdUInt64(`, varName, `)`)
+ p.P(`n, err := `, p.typesPkg.Use(), `.StdUInt64MarshalTo(`, varName, `, dAtA[i:])`)
+ } else if gogoproto.IsStdInt32(field) {
+ if gogoproto.IsNullable(field) {
+ varName = "*" + varName
+ }
+ p.callVarint(p.typesPkg.Use(), `.SizeOfStdInt32(`, varName, `)`)
+ p.P(`n, err := `, p.typesPkg.Use(), `.StdInt32MarshalTo(`, varName, `, dAtA[i:])`)
+ } else if gogoproto.IsStdUInt32(field) {
+ if gogoproto.IsNullable(field) {
+ varName = "*" + varName
+ }
+ p.callVarint(p.typesPkg.Use(), `.SizeOfStdUInt32(`, varName, `)`)
+ p.P(`n, err := `, p.typesPkg.Use(), `.StdUInt32MarshalTo(`, varName, `, dAtA[i:])`)
+ } else if gogoproto.IsStdBool(field) {
+ if gogoproto.IsNullable(field) {
+ varName = "*" + varName
+ }
+ p.callVarint(p.typesPkg.Use(), `.SizeOfStdBool(`, varName, `)`)
+ p.P(`n, err := `, p.typesPkg.Use(), `.StdBoolMarshalTo(`, varName, `, dAtA[i:])`)
+ } else if gogoproto.IsStdString(field) {
+ if gogoproto.IsNullable(field) {
+ varName = "*" + varName
+ }
+ p.callVarint(p.typesPkg.Use(), `.SizeOfStdString(`, varName, `)`)
+ p.P(`n, err := `, p.typesPkg.Use(), `.StdStringMarshalTo(`, varName, `, dAtA[i:])`)
+ } else if gogoproto.IsStdBytes(field) {
+ if gogoproto.IsNullable(field) {
+ varName = "*" + varName
+ }
+ p.callVarint(p.typesPkg.Use(), `.SizeOfStdBytes(`, varName, `)`)
+ p.P(`n, err := `, p.typesPkg.Use(), `.StdBytesMarshalTo(`, varName, `, dAtA[i:])`)
} else if protoSizer {
p.callVarint(varName, ".ProtoSize()")
p.P(`n, err := `, varName, `.MarshalTo(dAtA[i:])`)
@@ -882,6 +980,60 @@ func (p *marshalto) generateField(proto3 bool, numGen NumGen, file *generator.Fi
}
p.callVarint(p.typesPkg.Use(), `.SizeOfStdDuration(`, varName, `)`)
p.P(`n`, numGen.Next(), `, err := `, p.typesPkg.Use(), `.StdDurationMarshalTo(`, varName, `, dAtA[i:])`)
+ } else if gogoproto.IsStdDouble(field) {
+ if gogoproto.IsNullable(field) {
+ varName = "*" + varName
+ }
+ p.callVarint(p.typesPkg.Use(), `.SizeOfStdDouble(`, varName, `)`)
+ p.P(`n`, numGen.Next(), `, err := `, p.typesPkg.Use(), `.StdDoubleMarshalTo(`, varName, `, dAtA[i:])`)
+ } else if gogoproto.IsStdFloat(field) {
+ if gogoproto.IsNullable(field) {
+ varName = "*" + varName
+ }
+ p.callVarint(p.typesPkg.Use(), `.SizeOfStdFloat(`, varName, `)`)
+ p.P(`n`, numGen.Next(), `, err := `, p.typesPkg.Use(), `.StdFloatMarshalTo(`, varName, `, dAtA[i:])`)
+ } else if gogoproto.IsStdInt64(field) {
+ if gogoproto.IsNullable(field) {
+ varName = "*" + varName
+ }
+ p.callVarint(p.typesPkg.Use(), `.SizeOfStdInt64(`, varName, `)`)
+ p.P(`n`, numGen.Next(), `, err := `, p.typesPkg.Use(), `.StdInt64MarshalTo(`, varName, `, dAtA[i:])`)
+ } else if gogoproto.IsStdUInt64(field) {
+ if gogoproto.IsNullable(field) {
+ varName = "*" + varName
+ }
+ p.callVarint(p.typesPkg.Use(), `.SizeOfStdUInt64(`, varName, `)`)
+ p.P(`n`, numGen.Next(), `, err := `, p.typesPkg.Use(), `.StdUInt64MarshalTo(`, varName, `, dAtA[i:])`)
+ } else if gogoproto.IsStdInt32(field) {
+ if gogoproto.IsNullable(field) {
+ varName = "*" + varName
+ }
+ p.callVarint(p.typesPkg.Use(), `.SizeOfStdInt32(`, varName, `)`)
+ p.P(`n`, numGen.Next(), `, err := `, p.typesPkg.Use(), `.StdInt32MarshalTo(`, varName, `, dAtA[i:])`)
+ } else if gogoproto.IsStdUInt32(field) {
+ if gogoproto.IsNullable(field) {
+ varName = "*" + varName
+ }
+ p.callVarint(p.typesPkg.Use(), `.SizeOfStdUInt32(`, varName, `)`)
+ p.P(`n`, numGen.Next(), `, err := `, p.typesPkg.Use(), `.StdUInt32MarshalTo(`, varName, `, dAtA[i:])`)
+ } else if gogoproto.IsStdBool(field) {
+ if gogoproto.IsNullable(field) {
+ varName = "*" + varName
+ }
+ p.callVarint(p.typesPkg.Use(), `.SizeOfStdBool(`, varName, `)`)
+ p.P(`n`, numGen.Next(), `, err := `, p.typesPkg.Use(), `.StdBoolMarshalTo(`, varName, `, dAtA[i:])`)
+ } else if gogoproto.IsStdString(field) {
+ if gogoproto.IsNullable(field) {
+ varName = "*" + varName
+ }
+ p.callVarint(p.typesPkg.Use(), `.SizeOfStdString(`, varName, `)`)
+ p.P(`n`, numGen.Next(), `, err := `, p.typesPkg.Use(), `.StdStringMarshalTo(`, varName, `, dAtA[i:])`)
+ } else if gogoproto.IsStdBytes(field) {
+ if gogoproto.IsNullable(field) {
+ varName = "*" + varName
+ }
+ p.callVarint(p.typesPkg.Use(), `.SizeOfStdBytes(`, varName, `)`)
+ p.P(`n`, numGen.Next(), `, err := `, p.typesPkg.Use(), `.StdBytesMarshalTo(`, varName, `, dAtA[i:])`)
} else if protoSizer {
p.callVarint(varName, `.ProtoSize()`)
p.P(`n`, numGen.Next(), `, err := `, varName, `.MarshalTo(dAtA[i:])`)
diff --git a/vendor/github.com/gogo/protobuf/plugin/populate/populate.go b/vendor/github.com/gogo/protobuf/plugin/populate/populate.go
index cf61fe9b0..19b9e3e90 100644
--- a/vendor/github.com/gogo/protobuf/plugin/populate/populate.go
+++ b/vendor/github.com/gogo/protobuf/plugin/populate/populate.go
@@ -182,7 +182,7 @@ func negative(fieldType descriptor.FieldDescriptorProto_Type) bool {
return true
}
-func (p *plugin) getFuncName(goTypName string) string {
+func (p *plugin) getFuncName(goTypName string, field *descriptor.FieldDescriptorProto) string {
funcName := "NewPopulated" + goTypName
goTypNames := strings.Split(goTypName, ".")
if len(goTypNames) == 2 {
@@ -190,23 +190,43 @@ func (p *plugin) getFuncName(goTypName string) string {
} else if len(goTypNames) != 1 {
panic(fmt.Errorf("unreachable: too many dots in %v", goTypName))
}
- switch funcName {
- case "time.NewPopulatedTime":
- funcName = p.typesPkg.Use() + ".NewPopulatedStdTime"
- case "time.NewPopulatedDuration":
- funcName = p.typesPkg.Use() + ".NewPopulatedStdDuration"
+ if field != nil {
+ switch {
+ case gogoproto.IsStdTime(field):
+ funcName = p.typesPkg.Use() + ".NewPopulatedStdTime"
+ case gogoproto.IsStdDuration(field):
+ funcName = p.typesPkg.Use() + ".NewPopulatedStdDuration"
+ case gogoproto.IsStdDouble(field):
+ funcName = p.typesPkg.Use() + ".NewPopulatedStdDouble"
+ case gogoproto.IsStdFloat(field):
+ funcName = p.typesPkg.Use() + ".NewPopulatedStdFloat"
+ case gogoproto.IsStdInt64(field):
+ funcName = p.typesPkg.Use() + ".NewPopulatedStdInt64"
+ case gogoproto.IsStdUInt64(field):
+ funcName = p.typesPkg.Use() + ".NewPopulatedStdUInt64"
+ case gogoproto.IsStdInt32(field):
+ funcName = p.typesPkg.Use() + ".NewPopulatedStdInt32"
+ case gogoproto.IsStdUInt32(field):
+ funcName = p.typesPkg.Use() + ".NewPopulatedStdUInt32"
+ case gogoproto.IsStdBool(field):
+ funcName = p.typesPkg.Use() + ".NewPopulatedStdBool"
+ case gogoproto.IsStdString(field):
+ funcName = p.typesPkg.Use() + ".NewPopulatedStdString"
+ case gogoproto.IsStdBytes(field):
+ funcName = p.typesPkg.Use() + ".NewPopulatedStdBytes"
+ }
}
return funcName
}
-func (p *plugin) getFuncCall(goTypName string) string {
- funcName := p.getFuncName(goTypName)
+func (p *plugin) getFuncCall(goTypName string, field *descriptor.FieldDescriptorProto) string {
+ funcName := p.getFuncName(goTypName, field)
funcCall := funcName + "(r, easy)"
return funcCall
}
func (p *plugin) getCustomFuncCall(goTypName string) string {
- funcName := p.getFuncName(goTypName)
+ funcName := p.getFuncName(goTypName, nil)
funcCall := funcName + "(r)"
return funcCall
}
@@ -259,13 +279,13 @@ func (p *plugin) GenerateField(file *generator.FileDescriptor, message *generato
if m.ValueField.IsMessage() || p.IsGroup(field) ||
(m.ValueField.IsBytes() && gogoproto.IsCustomType(field)) {
s := `this.` + fieldname + `[` + keyval + `] = `
- if gogoproto.IsStdTime(field) || gogoproto.IsStdDuration(field) {
+ if gogoproto.IsStdType(field) {
valuegoTyp = valuegoAliasTyp
}
funcCall := p.getCustomFuncCall(goTypName)
if !gogoproto.IsCustomType(field) {
goTypName = generator.GoTypeToName(valuegoTyp)
- funcCall = p.getFuncCall(goTypName)
+ funcCall = p.getFuncCall(goTypName, m.ValueAliasField)
}
if !nullable {
funcCall = `*` + funcCall
@@ -322,7 +342,7 @@ func (p *plugin) GenerateField(file *generator.FileDescriptor, message *generato
p.P(`this.`, fieldname, ` = *`, p.varGen.Current())
}
} else if field.IsMessage() || p.IsGroup(field) {
- funcCall := p.getFuncCall(goTypName)
+ funcCall := p.getFuncCall(goTypName, field)
if field.IsRepeated() {
p.P(p.varGen.Next(), ` := r.Intn(5)`)
p.P(`this.`, fieldname, ` = make(`, goTyp, `, `, p.varGen.Current(), `)`)
@@ -534,7 +554,7 @@ func (p *plugin) Generate(file *generator.FileDescriptor) {
p.P(`func NewPopulated`, ccTypeName, `(r randy`, p.localName, `, easy bool) *`, ccTypeName, ` {`)
p.In()
p.P(`this := &`, ccTypeName, `{}`)
- if gogoproto.IsUnion(message.File(), message.DescriptorProto) && len(message.Field) > 0 {
+ if gogoproto.IsUnion(message.File().FileDescriptorProto, message.DescriptorProto) && len(message.Field) > 0 {
p.P(`fieldNum := r.Intn(`, fmt.Sprintf("%d", ranTotal), `)`)
p.P(`switch fieldNum {`)
k := 0
diff --git a/vendor/github.com/gogo/protobuf/plugin/size/size.go b/vendor/github.com/gogo/protobuf/plugin/size/size.go
index 79cd403be..10aa2f449 100644
--- a/vendor/github.com/gogo/protobuf/plugin/size/size.go
+++ b/vendor/github.com/gogo/protobuf/plugin/size/size.go
@@ -69,6 +69,9 @@ The following message:
given to the size plugin, will generate the following code:
func (m *B) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = m.A.Size()
@@ -203,18 +206,32 @@ func (p *size) sizeZigZag() {
}
func (p *size) std(field *descriptor.FieldDescriptorProto, name string) (string, bool) {
+ ptr := ""
+ if gogoproto.IsNullable(field) {
+ ptr = "*"
+ }
if gogoproto.IsStdTime(field) {
- if gogoproto.IsNullable(field) {
- return p.typesPkg.Use() + `.SizeOfStdTime(*` + name + `)`, true
- } else {
- return p.typesPkg.Use() + `.SizeOfStdTime(` + name + `)`, true
- }
+ return p.typesPkg.Use() + `.SizeOfStdTime(` + ptr + name + `)`, true
} else if gogoproto.IsStdDuration(field) {
- if gogoproto.IsNullable(field) {
- return p.typesPkg.Use() + `.SizeOfStdDuration(*` + name + `)`, true
- } else {
- return p.typesPkg.Use() + `.SizeOfStdDuration(` + name + `)`, true
- }
+ return p.typesPkg.Use() + `.SizeOfStdDuration(` + ptr + name + `)`, true
+ } else if gogoproto.IsStdDouble(field) {
+ return p.typesPkg.Use() + `.SizeOfStdDouble(` + ptr + name + `)`, true
+ } else if gogoproto.IsStdFloat(field) {
+ return p.typesPkg.Use() + `.SizeOfStdFloat(` + ptr + name + `)`, true
+ } else if gogoproto.IsStdInt64(field) {
+ return p.typesPkg.Use() + `.SizeOfStdInt64(` + ptr + name + `)`, true
+ } else if gogoproto.IsStdUInt64(field) {
+ return p.typesPkg.Use() + `.SizeOfStdUInt64(` + ptr + name + `)`, true
+ } else if gogoproto.IsStdInt32(field) {
+ return p.typesPkg.Use() + `.SizeOfStdInt32(` + ptr + name + `)`, true
+ } else if gogoproto.IsStdUInt32(field) {
+ return p.typesPkg.Use() + `.SizeOfStdUInt32(` + ptr + name + `)`, true
+ } else if gogoproto.IsStdBool(field) {
+ return p.typesPkg.Use() + `.SizeOfStdBool(` + ptr + name + `)`, true
+ } else if gogoproto.IsStdString(field) {
+ return p.typesPkg.Use() + `.SizeOfStdString(` + ptr + name + `)`, true
+ } else if gogoproto.IsStdBytes(field) {
+ return p.typesPkg.Use() + `.SizeOfStdBytes(` + ptr + name + `)`, true
}
return "", false
}
@@ -444,7 +461,7 @@ func (p *size) generateField(proto3 bool, file *generator.FileDescriptor, messag
sum = append(sum, strconv.Itoa(valueKeySize))
sum = append(sum, `soz`+p.localName+`(uint64(v))`)
case descriptor.FieldDescriptorProto_TYPE_MESSAGE:
- stdSizeCall, stdOk := p.std(field, "v")
+ stdSizeCall, stdOk := p.std(m.ValueAliasField, "v")
if nullable {
p.P(`l = 0`)
p.P(`if v != nil {`)
@@ -595,6 +612,11 @@ func (p *size) Generate(file *generator.FileDescriptor) {
ccTypeName := generator.CamelCaseSlice(message.TypeName())
p.P(`func (m *`, ccTypeName, `) `, sizeName, `() (n int) {`)
p.In()
+ p.P(`if m == nil {`)
+ p.In()
+ p.P(`return 0`)
+ p.Out()
+ p.P(`}`)
p.P(`var l int`)
p.P(`_ = l`)
oneofs := make(map[string]struct{})
@@ -650,6 +672,11 @@ func (p *size) Generate(file *generator.FileDescriptor) {
ccTypeName := p.OneOfTypeName(message, f)
p.P(`func (m *`, ccTypeName, `) `, sizeName, `() (n int) {`)
p.In()
+ p.P(`if m == nil {`)
+ p.In()
+ p.P(`return 0`)
+ p.Out()
+ p.P(`}`)
p.P(`var l int`)
p.P(`_ = l`)
vanity.TurnOffNullableForNativeTypes(f)
diff --git a/vendor/github.com/gogo/protobuf/plugin/union/union.go b/vendor/github.com/gogo/protobuf/plugin/union/union.go
index 72edb2498..90def721c 100644
--- a/vendor/github.com/gogo/protobuf/plugin/union/union.go
+++ b/vendor/github.com/gogo/protobuf/plugin/union/union.go
@@ -184,7 +184,7 @@ func (p *union) Generate(file *generator.FileDescriptor) {
goTyp, _ := p.GoType(message, field)
obj := p.ObjectNamed(field.GetTypeName()).(*generator.Descriptor)
- if gogoproto.IsUnion(obj.File(), obj.DescriptorProto) {
+ if gogoproto.IsUnion(obj.File().FileDescriptorProto, obj.DescriptorProto) {
p.P(`this.`, fieldname, ` = new(`, generator.GoTypeToName(goTyp), `)`)
p.P(`if set := this.`, fieldname, `.SetValue(value); set {`)
p.In()
diff --git a/vendor/github.com/gogo/protobuf/plugin/unmarshal/unmarshal.go b/vendor/github.com/gogo/protobuf/plugin/unmarshal/unmarshal.go
index b5d9613df..e29565d86 100644
--- a/vendor/github.com/gogo/protobuf/plugin/unmarshal/unmarshal.go
+++ b/vendor/github.com/gogo/protobuf/plugin/unmarshal/unmarshal.go
@@ -223,7 +223,7 @@ func (p *unmarshal) decodeVarint(varName string, typName string) {
p.P(`}`)
p.P(`b := dAtA[iNdEx]`)
p.P(`iNdEx++`)
- p.P(varName, ` |= (`, typName, `(b) & 0x7F) << shift`)
+ p.P(varName, ` |= `, typName, `(b&0x7F) << shift`)
p.P(`if b < 0x80 {`)
p.In()
p.P(`break`)
@@ -280,6 +280,24 @@ func (p *unmarshal) declareMapField(varName string, nullable bool, customType bo
p.P(varName, ` := new(time.Time)`)
} else if gogoproto.IsStdDuration(field) {
p.P(varName, ` := new(time.Duration)`)
+ } else if gogoproto.IsStdDouble(field) {
+ p.P(varName, ` := new(float64)`)
+ } else if gogoproto.IsStdFloat(field) {
+ p.P(varName, ` := new(float32)`)
+ } else if gogoproto.IsStdInt64(field) {
+ p.P(varName, ` := new(int64)`)
+ } else if gogoproto.IsStdUInt64(field) {
+ p.P(varName, ` := new(uint64)`)
+ } else if gogoproto.IsStdInt32(field) {
+ p.P(varName, ` := new(int32)`)
+ } else if gogoproto.IsStdUInt32(field) {
+ p.P(varName, ` := new(uint32)`)
+ } else if gogoproto.IsStdBool(field) {
+ p.P(varName, ` := new(bool)`)
+ } else if gogoproto.IsStdString(field) {
+ p.P(varName, ` := new(string)`)
+ } else if gogoproto.IsStdBytes(field) {
+ p.P(varName, ` := new([]byte)`)
} else {
desc := p.ObjectNamed(field.GetTypeName())
msgname := p.TypeName(desc)
@@ -350,6 +368,11 @@ func (p *unmarshal) mapField(varName string, customType bool, field *descriptor.
p.Out()
p.P(`}`)
p.P(`postStringIndex`, varName, ` := iNdEx + intStringLen`, varName)
+ p.P(`if postStringIndex`, varName, ` < 0 {`)
+ p.In()
+ p.P(`return ErrInvalidLength` + p.localName)
+ p.Out()
+ p.P(`}`)
p.P(`if postStringIndex`, varName, ` > l {`)
p.In()
p.P(`return `, p.ioPkg.Use(), `.ErrUnexpectedEOF`)
@@ -368,7 +391,7 @@ func (p *unmarshal) mapField(varName string, customType bool, field *descriptor.
p.Out()
p.P(`}`)
p.P(`postmsgIndex := iNdEx + mapmsglen`)
- p.P(`if mapmsglen < 0 {`)
+ p.P(`if postmsgIndex < 0 {`)
p.In()
p.P(`return ErrInvalidLength` + p.localName)
p.Out()
@@ -383,6 +406,24 @@ func (p *unmarshal) mapField(varName string, customType bool, field *descriptor.
p.P(`if err := `, p.typesPkg.Use(), `.StdTimeUnmarshal(`, varName, `, `, buf, `); err != nil {`)
} else if gogoproto.IsStdDuration(field) {
p.P(`if err := `, p.typesPkg.Use(), `.StdDurationUnmarshal(`, varName, `, `, buf, `); err != nil {`)
+ } else if gogoproto.IsStdDouble(field) {
+ p.P(`if err := `, p.typesPkg.Use(), `.StdDoubleUnmarshal(`, varName, `, `, buf, `); err != nil {`)
+ } else if gogoproto.IsStdFloat(field) {
+ p.P(`if err := `, p.typesPkg.Use(), `.StdFloatUnmarshal(`, varName, `, `, buf, `); err != nil {`)
+ } else if gogoproto.IsStdInt64(field) {
+ p.P(`if err := `, p.typesPkg.Use(), `.StdInt64Unmarshal(`, varName, `, `, buf, `); err != nil {`)
+ } else if gogoproto.IsStdUInt64(field) {
+ p.P(`if err := `, p.typesPkg.Use(), `.StdUInt64Unmarshal(`, varName, `, `, buf, `); err != nil {`)
+ } else if gogoproto.IsStdInt32(field) {
+ p.P(`if err := `, p.typesPkg.Use(), `.StdInt32Unmarshal(`, varName, `, `, buf, `); err != nil {`)
+ } else if gogoproto.IsStdUInt32(field) {
+ p.P(`if err := `, p.typesPkg.Use(), `.StdUInt32Unmarshal(`, varName, `, `, buf, `); err != nil {`)
+ } else if gogoproto.IsStdBool(field) {
+ p.P(`if err := `, p.typesPkg.Use(), `.StdBoolUnmarshal(`, varName, `, `, buf, `); err != nil {`)
+ } else if gogoproto.IsStdString(field) {
+ p.P(`if err := `, p.typesPkg.Use(), `.StdStringUnmarshal(`, varName, `, `, buf, `); err != nil {`)
+ } else if gogoproto.IsStdBytes(field) {
+ p.P(`if err := `, p.typesPkg.Use(), `.StdBytesUnmarshal(`, varName, `, `, buf, `); err != nil {`)
} else {
desc := p.ObjectNamed(field.GetTypeName())
msgname := p.TypeName(desc)
@@ -404,6 +445,11 @@ func (p *unmarshal) mapField(varName string, customType bool, field *descriptor.
p.Out()
p.P(`}`)
p.P(`postbytesIndex := iNdEx + intMapbyteLen`)
+ p.P(`if postbytesIndex < 0 {`)
+ p.In()
+ p.P(`return ErrInvalidLength` + p.localName)
+ p.Out()
+ p.P(`}`)
p.P(`if postbytesIndex > l {`)
p.In()
p.P(`return `, p.ioPkg.Use(), `.ErrUnexpectedEOF`)
@@ -596,6 +642,11 @@ func (p *unmarshal) field(file *generator.FileDescriptor, msg *generator.Descrip
p.Out()
p.P(`}`)
p.P(`postIndex := iNdEx + intStringLen`)
+ p.P(`if postIndex < 0 {`)
+ p.In()
+ p.P(`return ErrInvalidLength` + p.localName)
+ p.Out()
+ p.P(`}`)
p.P(`if postIndex > l {`)
p.In()
p.P(`return `, p.ioPkg.Use(), `.ErrUnexpectedEOF`)
@@ -625,6 +676,11 @@ func (p *unmarshal) field(file *generator.FileDescriptor, msg *generator.Descrip
p.Out()
p.P(`}`)
p.P(`postIndex := iNdEx + msglen`)
+ p.P(`if postIndex < 0 {`)
+ p.In()
+ p.P(`return ErrInvalidLength` + p.localName)
+ p.Out()
+ p.P(`}`)
p.P(`if postIndex > l {`)
p.In()
p.P(`return `, p.ioPkg.Use(), `.ErrUnexpectedEOF`)
@@ -648,6 +704,78 @@ func (p *unmarshal) field(file *generator.FileDescriptor, msg *generator.Descrip
p.P(`v := time.Duration(0)`)
p.P(`if err := `, p.typesPkg.Use(), `.StdDurationUnmarshal(&v, `, buf, `); err != nil {`)
}
+ } else if gogoproto.IsStdDouble(field) {
+ if nullable {
+ p.P(`v := new(float64)`)
+ p.P(`if err := `, p.typesPkg.Use(), `.StdDoubleUnmarshal(v, `, buf, `); err != nil {`)
+ } else {
+ p.P(`v := 0`)
+ p.P(`if err := `, p.typesPkg.Use(), `.StdDoubleUnmarshal(&v, `, buf, `); err != nil {`)
+ }
+ } else if gogoproto.IsStdFloat(field) {
+ if nullable {
+ p.P(`v := new(float32)`)
+ p.P(`if err := `, p.typesPkg.Use(), `.StdFloatUnmarshal(v, `, buf, `); err != nil {`)
+ } else {
+ p.P(`v := 0`)
+ p.P(`if err := `, p.typesPkg.Use(), `.StdFloatUnmarshal(&v, `, buf, `); err != nil {`)
+ }
+ } else if gogoproto.IsStdInt64(field) {
+ if nullable {
+ p.P(`v := new(int64)`)
+ p.P(`if err := `, p.typesPkg.Use(), `.StdInt64Unmarshal(v, `, buf, `); err != nil {`)
+ } else {
+ p.P(`v := 0`)
+ p.P(`if err := `, p.typesPkg.Use(), `.StdInt64Unmarshal(&v, `, buf, `); err != nil {`)
+ }
+ } else if gogoproto.IsStdUInt64(field) {
+ if nullable {
+ p.P(`v := new(uint64)`)
+ p.P(`if err := `, p.typesPkg.Use(), `.StdUInt64Unmarshal(v, `, buf, `); err != nil {`)
+ } else {
+ p.P(`v := 0`)
+ p.P(`if err := `, p.typesPkg.Use(), `.StdUInt64Unmarshal(&v, `, buf, `); err != nil {`)
+ }
+ } else if gogoproto.IsStdInt32(field) {
+ if nullable {
+ p.P(`v := new(int32)`)
+ p.P(`if err := `, p.typesPkg.Use(), `.StdInt32Unmarshal(v, `, buf, `); err != nil {`)
+ } else {
+ p.P(`v := 0`)
+ p.P(`if err := `, p.typesPkg.Use(), `.StdInt32Unmarshal(&v, `, buf, `); err != nil {`)
+ }
+ } else if gogoproto.IsStdUInt32(field) {
+ if nullable {
+ p.P(`v := new(uint32)`)
+ p.P(`if err := `, p.typesPkg.Use(), `.StdUInt32Unmarshal(v, `, buf, `); err != nil {`)
+ } else {
+ p.P(`v := 0`)
+ p.P(`if err := `, p.typesPkg.Use(), `.StdUInt32Unmarshal(&v, `, buf, `); err != nil {`)
+ }
+ } else if gogoproto.IsStdBool(field) {
+ if nullable {
+ p.P(`v := new(bool)`)
+ p.P(`if err := `, p.typesPkg.Use(), `.StdBoolUnmarshal(v, `, buf, `); err != nil {`)
+ } else {
+ p.P(`v := false`)
+ p.P(`if err := `, p.typesPkg.Use(), `.StdBoolUnmarshal(&v, `, buf, `); err != nil {`)
+ }
+ } else if gogoproto.IsStdString(field) {
+ if nullable {
+ p.P(`v := new(string)`)
+ p.P(`if err := `, p.typesPkg.Use(), `.StdStringUnmarshal(v, `, buf, `); err != nil {`)
+ } else {
+ p.P(`v := ""`)
+ p.P(`if err := `, p.typesPkg.Use(), `.StdStringUnmarshal(&v, `, buf, `); err != nil {`)
+ }
+ } else if gogoproto.IsStdBytes(field) {
+ if nullable {
+ p.P(`v := new([]byte)`)
+ p.P(`if err := `, p.typesPkg.Use(), `.StdBytesUnmarshal(v, `, buf, `); err != nil {`)
+ } else {
+ p.P(`var v []byte`)
+ p.P(`if err := `, p.typesPkg.Use(), `.StdBytesUnmarshal(&v, `, buf, `); err != nil {`)
+ }
} else {
p.P(`v := &`, msgname, `{}`)
p.P(`if err := v.Unmarshal(`, buf, `); err != nil {`)
@@ -679,7 +807,7 @@ func (p *unmarshal) field(file *generator.FileDescriptor, msg *generator.Descrip
}
nullable, valuegoTyp, valuegoAliasTyp = generator.GoMapValueTypes(field, m.ValueField, valuegoTyp, valuegoAliasTyp)
- if gogoproto.IsStdTime(field) || gogoproto.IsStdDuration(field) {
+ if gogoproto.IsStdType(field) {
valuegoTyp = valuegoAliasTyp
}
@@ -762,6 +890,60 @@ func (p *unmarshal) field(file *generator.FileDescriptor, msg *generator.Descrip
} else {
p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, time.Duration(0))`)
}
+ } else if gogoproto.IsStdDouble(field) {
+ if nullable {
+ p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, new(float64))`)
+ } else {
+ p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, 0)`)
+ }
+ } else if gogoproto.IsStdFloat(field) {
+ if nullable {
+ p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, new(float32))`)
+ } else {
+ p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, 0)`)
+ }
+ } else if gogoproto.IsStdInt64(field) {
+ if nullable {
+ p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, new(int64))`)
+ } else {
+ p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, 0)`)
+ }
+ } else if gogoproto.IsStdUInt64(field) {
+ if nullable {
+ p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, new(uint64))`)
+ } else {
+ p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, 0)`)
+ }
+ } else if gogoproto.IsStdInt32(field) {
+ if nullable {
+ p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, new(int32))`)
+ } else {
+ p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, 0)`)
+ }
+ } else if gogoproto.IsStdUInt32(field) {
+ if nullable {
+ p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, new(uint32))`)
+ } else {
+ p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, 0)`)
+ }
+ } else if gogoproto.IsStdBool(field) {
+ if nullable {
+ p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, new(bool))`)
+ } else {
+ p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, false)`)
+ }
+ } else if gogoproto.IsStdString(field) {
+ if nullable {
+ p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, new(string))`)
+ } else {
+ p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, "")`)
+ }
+ } else if gogoproto.IsStdBytes(field) {
+ if nullable {
+ p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, new([]byte))`)
+ } else {
+ p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, []byte{})`)
+ }
} else if nullable && !gogoproto.IsCustomType(field) {
p.P(`m.`, fieldname, ` = append(m.`, fieldname, `, &`, msgname, `{})`)
} else {
@@ -784,6 +966,60 @@ func (p *unmarshal) field(file *generator.FileDescriptor, msg *generator.Descrip
} else {
p.P(`if err := `, p.typesPkg.Use(), `.StdDurationUnmarshal(&(`, varName, `),`, buf, `); err != nil {`)
}
+ } else if gogoproto.IsStdDouble(field) {
+ if nullable {
+ p.P(`if err := `, p.typesPkg.Use(), `.StdDoubleUnmarshal(`, varName, `,`, buf, `); err != nil {`)
+ } else {
+ p.P(`if err := `, p.typesPkg.Use(), `.StdDoubleUnmarshal(&(`, varName, `),`, buf, `); err != nil {`)
+ }
+ } else if gogoproto.IsStdFloat(field) {
+ if nullable {
+ p.P(`if err := `, p.typesPkg.Use(), `.StdFloatUnmarshal(`, varName, `,`, buf, `); err != nil {`)
+ } else {
+ p.P(`if err := `, p.typesPkg.Use(), `.StdFloatUnmarshal(&(`, varName, `),`, buf, `); err != nil {`)
+ }
+ } else if gogoproto.IsStdInt64(field) {
+ if nullable {
+ p.P(`if err := `, p.typesPkg.Use(), `.StdInt64Unmarshal(`, varName, `,`, buf, `); err != nil {`)
+ } else {
+ p.P(`if err := `, p.typesPkg.Use(), `.StdInt64Unmarshal(&(`, varName, `),`, buf, `); err != nil {`)
+ }
+ } else if gogoproto.IsStdUInt64(field) {
+ if nullable {
+ p.P(`if err := `, p.typesPkg.Use(), `.StdUInt64Unmarshal(`, varName, `,`, buf, `); err != nil {`)
+ } else {
+ p.P(`if err := `, p.typesPkg.Use(), `.StdUInt64Unmarshal(&(`, varName, `),`, buf, `); err != nil {`)
+ }
+ } else if gogoproto.IsStdInt32(field) {
+ if nullable {
+ p.P(`if err := `, p.typesPkg.Use(), `.StdInt32Unmarshal(`, varName, `,`, buf, `); err != nil {`)
+ } else {
+ p.P(`if err := `, p.typesPkg.Use(), `.StdInt32Unmarshal(&(`, varName, `),`, buf, `); err != nil {`)
+ }
+ } else if gogoproto.IsStdUInt32(field) {
+ if nullable {
+ p.P(`if err := `, p.typesPkg.Use(), `.StdUInt32Unmarshal(`, varName, `,`, buf, `); err != nil {`)
+ } else {
+ p.P(`if err := `, p.typesPkg.Use(), `.StdUInt32Unmarshal(&(`, varName, `),`, buf, `); err != nil {`)
+ }
+ } else if gogoproto.IsStdBool(field) {
+ if nullable {
+ p.P(`if err := `, p.typesPkg.Use(), `.StdBoolUnmarshal(`, varName, `,`, buf, `); err != nil {`)
+ } else {
+ p.P(`if err := `, p.typesPkg.Use(), `.StdBoolUnmarshal(&(`, varName, `),`, buf, `); err != nil {`)
+ }
+ } else if gogoproto.IsStdString(field) {
+ if nullable {
+ p.P(`if err := `, p.typesPkg.Use(), `.StdStringUnmarshal(`, varName, `,`, buf, `); err != nil {`)
+ } else {
+ p.P(`if err := `, p.typesPkg.Use(), `.StdStringUnmarshal(&(`, varName, `),`, buf, `); err != nil {`)
+ }
+ } else if gogoproto.IsStdBytes(field) {
+ if nullable {
+ p.P(`if err := `, p.typesPkg.Use(), `.StdBytesUnmarshal(`, varName, `,`, buf, `); err != nil {`)
+ } else {
+ p.P(`if err := `, p.typesPkg.Use(), `.StdBytesUnmarshal(&(`, varName, `),`, buf, `); err != nil {`)
+ }
} else {
p.P(`if err := `, varName, `.Unmarshal(`, buf, `); err != nil {`)
}
@@ -798,6 +1034,24 @@ func (p *unmarshal) field(file *generator.FileDescriptor, msg *generator.Descrip
p.P(`m.`, fieldname, ` = new(time.Time)`)
} else if gogoproto.IsStdDuration(field) {
p.P(`m.`, fieldname, ` = new(time.Duration)`)
+ } else if gogoproto.IsStdDouble(field) {
+ p.P(`m.`, fieldname, ` = new(float64)`)
+ } else if gogoproto.IsStdFloat(field) {
+ p.P(`m.`, fieldname, ` = new(float32)`)
+ } else if gogoproto.IsStdInt64(field) {
+ p.P(`m.`, fieldname, ` = new(int64)`)
+ } else if gogoproto.IsStdUInt64(field) {
+ p.P(`m.`, fieldname, ` = new(uint64)`)
+ } else if gogoproto.IsStdInt32(field) {
+ p.P(`m.`, fieldname, ` = new(int32)`)
+ } else if gogoproto.IsStdUInt32(field) {
+ p.P(`m.`, fieldname, ` = new(uint32)`)
+ } else if gogoproto.IsStdBool(field) {
+ p.P(`m.`, fieldname, ` = new(bool)`)
+ } else if gogoproto.IsStdString(field) {
+ p.P(`m.`, fieldname, ` = new(string)`)
+ } else if gogoproto.IsStdBytes(field) {
+ p.P(`m.`, fieldname, ` = new([]byte)`)
} else {
goType, _ := p.GoType(nil, field)
// remove the star from the type
@@ -809,6 +1063,24 @@ func (p *unmarshal) field(file *generator.FileDescriptor, msg *generator.Descrip
p.P(`if err := `, p.typesPkg.Use(), `.StdTimeUnmarshal(m.`, fieldname, `, dAtA[iNdEx:postIndex]); err != nil {`)
} else if gogoproto.IsStdDuration(field) {
p.P(`if err := `, p.typesPkg.Use(), `.StdDurationUnmarshal(m.`, fieldname, `, dAtA[iNdEx:postIndex]); err != nil {`)
+ } else if gogoproto.IsStdDouble(field) {
+ p.P(`if err := `, p.typesPkg.Use(), `.StdDoubleUnmarshal(m.`, fieldname, `, dAtA[iNdEx:postIndex]); err != nil {`)
+ } else if gogoproto.IsStdFloat(field) {
+ p.P(`if err := `, p.typesPkg.Use(), `.StdFloatUnmarshal(m.`, fieldname, `, dAtA[iNdEx:postIndex]); err != nil {`)
+ } else if gogoproto.IsStdInt64(field) {
+ p.P(`if err := `, p.typesPkg.Use(), `.StdInt64Unmarshal(m.`, fieldname, `, dAtA[iNdEx:postIndex]); err != nil {`)
+ } else if gogoproto.IsStdUInt64(field) {
+ p.P(`if err := `, p.typesPkg.Use(), `.StdUInt64Unmarshal(m.`, fieldname, `, dAtA[iNdEx:postIndex]); err != nil {`)
+ } else if gogoproto.IsStdInt32(field) {
+ p.P(`if err := `, p.typesPkg.Use(), `.StdInt32Unmarshal(m.`, fieldname, `, dAtA[iNdEx:postIndex]); err != nil {`)
+ } else if gogoproto.IsStdUInt32(field) {
+ p.P(`if err := `, p.typesPkg.Use(), `.StdUInt32Unmarshal(m.`, fieldname, `, dAtA[iNdEx:postIndex]); err != nil {`)
+ } else if gogoproto.IsStdBool(field) {
+ p.P(`if err := `, p.typesPkg.Use(), `.StdBoolUnmarshal(m.`, fieldname, `, dAtA[iNdEx:postIndex]); err != nil {`)
+ } else if gogoproto.IsStdString(field) {
+ p.P(`if err := `, p.typesPkg.Use(), `.StdStringUnmarshal(m.`, fieldname, `, dAtA[iNdEx:postIndex]); err != nil {`)
+ } else if gogoproto.IsStdBytes(field) {
+ p.P(`if err := `, p.typesPkg.Use(), `.StdBytesUnmarshal(m.`, fieldname, `, dAtA[iNdEx:postIndex]); err != nil {`)
} else {
p.P(`if err := m.`, fieldname, `.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {`)
}
@@ -821,6 +1093,24 @@ func (p *unmarshal) field(file *generator.FileDescriptor, msg *generator.Descrip
p.P(`if err := `, p.typesPkg.Use(), `.StdTimeUnmarshal(&m.`, fieldname, `, dAtA[iNdEx:postIndex]); err != nil {`)
} else if gogoproto.IsStdDuration(field) {
p.P(`if err := `, p.typesPkg.Use(), `.StdDurationUnmarshal(&m.`, fieldname, `, dAtA[iNdEx:postIndex]); err != nil {`)
+ } else if gogoproto.IsStdDouble(field) {
+ p.P(`if err := `, p.typesPkg.Use(), `.StdDoubleUnmarshal(&m.`, fieldname, `, dAtA[iNdEx:postIndex]); err != nil {`)
+ } else if gogoproto.IsStdFloat(field) {
+ p.P(`if err := `, p.typesPkg.Use(), `.StdFloatUnmarshal(&m.`, fieldname, `, dAtA[iNdEx:postIndex]); err != nil {`)
+ } else if gogoproto.IsStdInt64(field) {
+ p.P(`if err := `, p.typesPkg.Use(), `.StdInt64Unmarshal(&m.`, fieldname, `, dAtA[iNdEx:postIndex]); err != nil {`)
+ } else if gogoproto.IsStdUInt64(field) {
+ p.P(`if err := `, p.typesPkg.Use(), `.StdUInt64Unmarshal(&m.`, fieldname, `, dAtA[iNdEx:postIndex]); err != nil {`)
+ } else if gogoproto.IsStdInt32(field) {
+ p.P(`if err := `, p.typesPkg.Use(), `.StdInt32Unmarshal(&m.`, fieldname, `, dAtA[iNdEx:postIndex]); err != nil {`)
+ } else if gogoproto.IsStdUInt32(field) {
+ p.P(`if err := `, p.typesPkg.Use(), `.StdUInt32Unmarshal(&m.`, fieldname, `, dAtA[iNdEx:postIndex]); err != nil {`)
+ } else if gogoproto.IsStdBool(field) {
+ p.P(`if err := `, p.typesPkg.Use(), `.StdBoolUnmarshal(&m.`, fieldname, `, dAtA[iNdEx:postIndex]); err != nil {`)
+ } else if gogoproto.IsStdString(field) {
+ p.P(`if err := `, p.typesPkg.Use(), `.StdStringUnmarshal(&m.`, fieldname, `, dAtA[iNdEx:postIndex]); err != nil {`)
+ } else if gogoproto.IsStdBytes(field) {
+ p.P(`if err := `, p.typesPkg.Use(), `.StdBytesUnmarshal(&m.`, fieldname, `, dAtA[iNdEx:postIndex]); err != nil {`)
} else {
p.P(`if err := m.`, fieldname, `.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {`)
}
@@ -840,6 +1130,11 @@ func (p *unmarshal) field(file *generator.FileDescriptor, msg *generator.Descrip
p.Out()
p.P(`}`)
p.P(`postIndex := iNdEx + byteLen`)
+ p.P(`if postIndex < 0 {`)
+ p.In()
+ p.P(`return ErrInvalidLength` + p.localName)
+ p.Out()
+ p.P(`}`)
p.P(`if postIndex > l {`)
p.In()
p.P(`return `, p.ioPkg.Use(), `.ErrUnexpectedEOF`)
@@ -1094,11 +1389,44 @@ func (p *unmarshal) Generate(file *generator.FileDescriptor) {
p.Out()
p.P(`}`)
p.P(`postIndex := iNdEx + packedLen`)
+ p.P(`if postIndex < 0 {`)
+ p.In()
+ p.P(`return ErrInvalidLength` + p.localName)
+ p.Out()
+ p.P(`}`)
p.P(`if postIndex > l {`)
p.In()
p.P(`return `, p.ioPkg.Use(), `.ErrUnexpectedEOF`)
p.Out()
p.P(`}`)
+
+ p.P(`var elementCount int`)
+ switch *field.Type {
+ case descriptor.FieldDescriptorProto_TYPE_DOUBLE, descriptor.FieldDescriptorProto_TYPE_FIXED64, descriptor.FieldDescriptorProto_TYPE_SFIXED64:
+ p.P(`elementCount = packedLen/`, 8)
+ case descriptor.FieldDescriptorProto_TYPE_FLOAT, descriptor.FieldDescriptorProto_TYPE_FIXED32, descriptor.FieldDescriptorProto_TYPE_SFIXED32:
+ p.P(`elementCount = packedLen/`, 4)
+ case descriptor.FieldDescriptorProto_TYPE_INT64, descriptor.FieldDescriptorProto_TYPE_UINT64, descriptor.FieldDescriptorProto_TYPE_INT32, descriptor.FieldDescriptorProto_TYPE_UINT32, descriptor.FieldDescriptorProto_TYPE_SINT32, descriptor.FieldDescriptorProto_TYPE_SINT64:
+ p.P(`var count int`)
+ p.P(`for _, integer := range dAtA[iNdEx:postIndex] {`)
+ p.In()
+ p.P(`if integer < 128 {`)
+ p.In()
+ p.P(`count++`)
+ p.Out()
+ p.P(`}`)
+ p.Out()
+ p.P(`}`)
+ p.P(`elementCount = count`)
+ case descriptor.FieldDescriptorProto_TYPE_BOOL:
+ p.P(`elementCount = packedLen`)
+ }
+ p.P(`if elementCount != 0 && len(m.`, fieldname, `) == 0 {`)
+ p.In()
+ p.P(`m.`, fieldname, ` = make([]`, p.noStarOrSliceType(message, field), `, 0, elementCount)`)
+ p.Out()
+ p.P(`}`)
+
p.P(`for iNdEx < postIndex {`)
p.In()
p.field(file, message, field, fieldname, false)
@@ -1124,7 +1452,7 @@ func (p *unmarshal) Generate(file *generator.FileDescriptor) {
if !ok {
panic("field is required, but no bit registered")
}
- p.P(`hasFields[`, strconv.Itoa(int(fieldBit/64)), `] |= uint64(`, fmt.Sprintf("0x%08x", 1<<(fieldBit%64)), `)`)
+ p.P(`hasFields[`, strconv.Itoa(int(fieldBit/64)), `] |= uint64(`, fmt.Sprintf("0x%08x", uint64(1)<<(fieldBit%64)), `)`)
}
}
p.Out()
@@ -1161,6 +1489,11 @@ func (p *unmarshal) Generate(file *generator.FileDescriptor) {
p.P(`return ErrInvalidLength`, p.localName)
p.Out()
p.P(`}`)
+ p.P(`if (iNdEx + skippy) < 0 {`)
+ p.In()
+ p.P(`return ErrInvalidLength`, p.localName)
+ p.Out()
+ p.P(`}`)
p.P(`if (iNdEx + skippy) > l {`)
p.In()
p.P(`return `, p.ioPkg.Use(), `.ErrUnexpectedEOF`)
@@ -1184,6 +1517,11 @@ func (p *unmarshal) Generate(file *generator.FileDescriptor) {
p.P(`return ErrInvalidLength`, p.localName)
p.Out()
p.P(`}`)
+ p.P(`if (iNdEx + skippy) < 0 {`)
+ p.In()
+ p.P(`return ErrInvalidLength`, p.localName)
+ p.Out()
+ p.P(`}`)
p.P(`if (iNdEx + skippy) > l {`)
p.In()
p.P(`return `, p.ioPkg.Use(), `.ErrUnexpectedEOF`)
@@ -1213,7 +1551,7 @@ func (p *unmarshal) Generate(file *generator.FileDescriptor) {
panic("field is required, but no bit registered")
}
- p.P(`if hasFields[`, strconv.Itoa(int(fieldBit/64)), `] & uint64(`, fmt.Sprintf("0x%08x", 1<<(fieldBit%64)), `) == 0 {`)
+ p.P(`if hasFields[`, strconv.Itoa(int(fieldBit/64)), `] & uint64(`, fmt.Sprintf("0x%08x", uint64(1)<<(fieldBit%64)), `) == 0 {`)
p.In()
if !gogoproto.ImportsGoGoProto(file.FileDescriptorProto) {
p.P(`return new(`, protoPkg.Use(), `.RequiredNotSetError)`)
@@ -1291,10 +1629,13 @@ func (p *unmarshal) Generate(file *generator.FileDescriptor) {
break
}
}
- iNdEx += length
if length < 0 {
return 0, ErrInvalidLength` + p.localName + `
}
+ iNdEx += length
+ if iNdEx < 0 {
+ return 0, ErrInvalidLength` + p.localName + `
+ }
return iNdEx, nil
case 3:
for {
@@ -1323,6 +1664,9 @@ func (p *unmarshal) Generate(file *generator.FileDescriptor) {
return 0, err
}
iNdEx = start + next
+ if iNdEx < 0 {
+ return 0, ErrInvalidLength` + p.localName + `
+ }
}
return iNdEx, nil
case 4:
diff --git a/vendor/github.com/gogo/protobuf/proto/clone.go b/vendor/github.com/gogo/protobuf/proto/clone.go
index 5d4cba4b5..a26b046d9 100644
--- a/vendor/github.com/gogo/protobuf/proto/clone.go
+++ b/vendor/github.com/gogo/protobuf/proto/clone.go
@@ -35,22 +35,39 @@
package proto
import (
+ "fmt"
"log"
"reflect"
"strings"
)
// Clone returns a deep copy of a protocol buffer.
-func Clone(pb Message) Message {
- in := reflect.ValueOf(pb)
+func Clone(src Message) Message {
+ in := reflect.ValueOf(src)
if in.IsNil() {
- return pb
+ return src
}
-
out := reflect.New(in.Type().Elem())
- // out is empty so a merge is a deep copy.
- mergeStruct(out.Elem(), in.Elem())
- return out.Interface().(Message)
+ dst := out.Interface().(Message)
+ Merge(dst, src)
+ return dst
+}
+
+// Merger is the interface representing objects that can merge messages of the same type.
+type Merger interface {
+ // Merge merges src into this message.
+ // Required and optional fields that are set in src will be set to that value in dst.
+ // Elements of repeated fields will be appended.
+ //
+ // Merge may panic if called with a different argument type than the receiver.
+ Merge(src Message)
+}
+
+// generatedMerger is the custom merge method that generated protos will have.
+// We must add this method since a generate Merge method will conflict with
+// many existing protos that have a Merge data field already defined.
+type generatedMerger interface {
+ XXX_Merge(src Message)
}
// Merge merges src into dst.
@@ -58,17 +75,24 @@ func Clone(pb Message) Message {
// Elements of repeated fields will be appended.
// Merge panics if src and dst are not the same type, or if dst is nil.
func Merge(dst, src Message) {
+ if m, ok := dst.(Merger); ok {
+ m.Merge(src)
+ return
+ }
+
in := reflect.ValueOf(src)
out := reflect.ValueOf(dst)
if out.IsNil() {
panic("proto: nil destination")
}
if in.Type() != out.Type() {
- // Explicit test prior to mergeStruct so that mistyped nils will fail
- panic("proto: type mismatch")
+ panic(fmt.Sprintf("proto.Merge(%T, %T) type mismatch", dst, src))
}
if in.IsNil() {
- // Merging nil into non-nil is a quiet no-op
+ return // Merge from nil src is a noop
+ }
+ if m, ok := dst.(generatedMerger); ok {
+ m.XXX_Merge(src)
return
}
mergeStruct(out.Elem(), in.Elem())
@@ -89,7 +113,7 @@ func mergeStruct(out, in reflect.Value) {
bIn := emIn.GetExtensions()
bOut := emOut.GetExtensions()
*bOut = append(*bOut, *bIn...)
- } else if emIn, ok := extendable(in.Addr().Interface()); ok {
+ } else if emIn, err := extendable(in.Addr().Interface()); err == nil {
emOut, _ := extendable(out.Addr().Interface())
mIn, muIn := emIn.extensionsRead()
if mIn != nil {
diff --git a/vendor/github.com/gogo/protobuf/proto/custom_gogo.go b/vendor/github.com/gogo/protobuf/proto/custom_gogo.go
new file mode 100644
index 000000000..24552483c
--- /dev/null
+++ b/vendor/github.com/gogo/protobuf/proto/custom_gogo.go
@@ -0,0 +1,39 @@
+// Protocol Buffers for Go with Gadgets
+//
+// Copyright (c) 2018, The GoGo Authors. All rights reserved.
+// http://github.com/gogo/protobuf
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package proto
+
+import "reflect"
+
+type custom interface {
+ Marshal() ([]byte, error)
+ Unmarshal(data []byte) error
+ Size() int
+}
+
+var customType = reflect.TypeOf((*custom)(nil)).Elem()
diff --git a/vendor/github.com/gogo/protobuf/proto/decode.go b/vendor/github.com/gogo/protobuf/proto/decode.go
index 737f2731d..63b0f08be 100644
--- a/vendor/github.com/gogo/protobuf/proto/decode.go
+++ b/vendor/github.com/gogo/protobuf/proto/decode.go
@@ -39,8 +39,6 @@ import (
"errors"
"fmt"
"io"
- "os"
- "reflect"
)
// errOverflow is returned when an integer is too large to be represented.
@@ -50,10 +48,6 @@ var errOverflow = errors.New("proto: integer overflow")
// wire type is encountered. It does not get returned to user code.
var ErrInternalBadWireType = errors.New("proto: internal error: bad wiretype for oneof")
-// The fundamental decoders that interpret bytes on the wire.
-// Those that take integer types all return uint64 and are
-// therefore of type valueDecoder.
-
// DecodeVarint reads a varint-encoded integer from the slice.
// It returns the integer and the number of bytes consumed, or
// zero if there is not enough.
@@ -192,7 +186,6 @@ func (p *Buffer) DecodeVarint() (x uint64, err error) {
if b&0x80 == 0 {
goto done
}
- // x -= 0x80 << 63 // Always zero.
return 0, errOverflow
@@ -267,9 +260,6 @@ func (p *Buffer) DecodeZigzag32() (x uint64, err error) {
return
}
-// These are not ValueDecoders: they produce an array of bytes or a string.
-// bytes, embedded messages
-
// DecodeRawBytes reads a count-delimited byte buffer from the Buffer.
// This is the format used for the bytes protocol buffer
// type and for embedded messages.
@@ -311,81 +301,29 @@ func (p *Buffer) DecodeStringBytes() (s string, err error) {
return string(buf), nil
}
-// Skip the next item in the buffer. Its wire type is decoded and presented as an argument.
-// If the protocol buffer has extensions, and the field matches, add it as an extension.
-// Otherwise, if the XXX_unrecognized field exists, append the skipped data there.
-func (o *Buffer) skipAndSave(t reflect.Type, tag, wire int, base structPointer, unrecField field) error {
- oi := o.index
-
- err := o.skip(t, tag, wire)
- if err != nil {
- return err
- }
-
- if !unrecField.IsValid() {
- return nil
- }
-
- ptr := structPointer_Bytes(base, unrecField)
-
- // Add the skipped field to struct field
- obuf := o.buf
-
- o.buf = *ptr
- o.EncodeVarint(uint64(tag<<3 | wire))
- *ptr = append(o.buf, obuf[oi:o.index]...)
-
- o.buf = obuf
-
- return nil
-}
-
-// Skip the next item in the buffer. Its wire type is decoded and presented as an argument.
-func (o *Buffer) skip(t reflect.Type, tag, wire int) error {
-
- var u uint64
- var err error
-
- switch wire {
- case WireVarint:
- _, err = o.DecodeVarint()
- case WireFixed64:
- _, err = o.DecodeFixed64()
- case WireBytes:
- _, err = o.DecodeRawBytes(false)
- case WireFixed32:
- _, err = o.DecodeFixed32()
- case WireStartGroup:
- for {
- u, err = o.DecodeVarint()
- if err != nil {
- break
- }
- fwire := int(u & 0x7)
- if fwire == WireEndGroup {
- break
- }
- ftag := int(u >> 3)
- err = o.skip(t, ftag, fwire)
- if err != nil {
- break
- }
- }
- default:
- err = fmt.Errorf("proto: can't skip unknown wire type %d for %s", wire, t)
- }
- return err
-}
-
// Unmarshaler is the interface representing objects that can
-// unmarshal themselves. The method should reset the receiver before
-// decoding starts. The argument points to data that may be
+// unmarshal themselves. The argument points to data that may be
// overwritten, so implementations should not keep references to the
// buffer.
+// Unmarshal implementations should not clear the receiver.
+// Any unmarshaled data should be merged into the receiver.
+// Callers of Unmarshal that do not want to retain existing data
+// should Reset the receiver before calling Unmarshal.
type Unmarshaler interface {
Unmarshal([]byte) error
}
+// newUnmarshaler is the interface representing objects that can
+// unmarshal themselves. The semantics are identical to Unmarshaler.
+//
+// This exists to support protoc-gen-go generated messages.
+// The proto package will stop type-asserting to this interface in the future.
+//
+// DO NOT DEPEND ON THIS.
+type newUnmarshaler interface {
+ XXX_Unmarshal([]byte) error
+}
+
// Unmarshal parses the protocol buffer representation in buf and places the
// decoded result in pb. If the struct underlying pb does not match
// the data in buf, the results can be unpredictable.
@@ -395,7 +333,13 @@ type Unmarshaler interface {
// to preserve and append to existing data.
func Unmarshal(buf []byte, pb Message) error {
pb.Reset()
- return UnmarshalMerge(buf, pb)
+ if u, ok := pb.(newUnmarshaler); ok {
+ return u.XXX_Unmarshal(buf)
+ }
+ if u, ok := pb.(Unmarshaler); ok {
+ return u.Unmarshal(buf)
+ }
+ return NewBuffer(buf).Unmarshal(pb)
}
// UnmarshalMerge parses the protocol buffer representation in buf and
@@ -405,8 +349,16 @@ func Unmarshal(buf []byte, pb Message) error {
// UnmarshalMerge merges into existing data in pb.
// Most code should use Unmarshal instead.
func UnmarshalMerge(buf []byte, pb Message) error {
- // If the object can unmarshal itself, let it.
+ if u, ok := pb.(newUnmarshaler); ok {
+ return u.XXX_Unmarshal(buf)
+ }
if u, ok := pb.(Unmarshaler); ok {
+ // NOTE: The history of proto have unfortunately been inconsistent
+ // whether Unmarshaler should or should not implicitly clear itself.
+ // Some implementations do, most do not.
+ // Thus, calling this here may or may not do what people want.
+ //
+ // See https://github.com/golang/protobuf/issues/424
return u.Unmarshal(buf)
}
return NewBuffer(buf).Unmarshal(pb)
@@ -422,12 +374,17 @@ func (p *Buffer) DecodeMessage(pb Message) error {
}
// DecodeGroup reads a tag-delimited group from the Buffer.
+// StartGroup tag is already consumed. This function consumes
+// EndGroup tag.
func (p *Buffer) DecodeGroup(pb Message) error {
- typ, base, err := getbase(pb)
- if err != nil {
- return err
+ b := p.buf[p.index:]
+ x, y := findEndGroup(b)
+ if x < 0 {
+ return io.ErrUnexpectedEOF
}
- return p.unmarshalType(typ.Elem(), GetProperties(typ.Elem()), true, base)
+ err := Unmarshal(b[:x], pb)
+ p.index += y
+ return err
}
// Unmarshal parses the protocol buffer representation in the
@@ -438,541 +395,33 @@ func (p *Buffer) DecodeGroup(pb Message) error {
// Unlike proto.Unmarshal, this does not reset pb before starting to unmarshal.
func (p *Buffer) Unmarshal(pb Message) error {
// If the object can unmarshal itself, let it.
+ if u, ok := pb.(newUnmarshaler); ok {
+ err := u.XXX_Unmarshal(p.buf[p.index:])
+ p.index = len(p.buf)
+ return err
+ }
if u, ok := pb.(Unmarshaler); ok {
+ // NOTE: The history of proto have unfortunately been inconsistent
+ // whether Unmarshaler should or should not implicitly clear itself.
+ // Some implementations do, most do not.
+ // Thus, calling this here may or may not do what people want.
+ //
+ // See https://github.com/golang/protobuf/issues/424
err := u.Unmarshal(p.buf[p.index:])
p.index = len(p.buf)
return err
}
- typ, base, err := getbase(pb)
- if err != nil {
- return err
- }
-
- err = p.unmarshalType(typ.Elem(), GetProperties(typ.Elem()), false, base)
-
- if collectStats {
- stats.Decode++
- }
-
- return err
-}
-
-// unmarshalType does the work of unmarshaling a structure.
-func (o *Buffer) unmarshalType(st reflect.Type, prop *StructProperties, is_group bool, base structPointer) error {
- var state errorState
- required, reqFields := prop.reqCount, uint64(0)
-
- var err error
- for err == nil && o.index < len(o.buf) {
- oi := o.index
- var u uint64
- u, err = o.DecodeVarint()
- if err != nil {
- break
- }
- wire := int(u & 0x7)
- if wire == WireEndGroup {
- if is_group {
- if required > 0 {
- // Not enough information to determine the exact field.
- // (See below.)
- return &RequiredNotSetError{"{Unknown}"}
- }
- return nil // input is satisfied
- }
- return fmt.Errorf("proto: %s: wiretype end group for non-group", st)
- }
- tag := int(u >> 3)
- if tag <= 0 {
- return fmt.Errorf("proto: %s: illegal tag %d (wire type %d)", st, tag, wire)
- }
- fieldnum, ok := prop.decoderTags.get(tag)
- if !ok {
- // Maybe it's an extension?
- if prop.extendable {
- if e, eok := structPointer_Interface(base, st).(extensionsBytes); eok {
- if isExtensionField(e, int32(tag)) {
- if err = o.skip(st, tag, wire); err == nil {
- ext := e.GetExtensions()
- *ext = append(*ext, o.buf[oi:o.index]...)
- }
- continue
- }
- } else if e, _ := extendable(structPointer_Interface(base, st)); isExtensionField(e, int32(tag)) {
- if err = o.skip(st, tag, wire); err == nil {
- extmap := e.extensionsWrite()
- ext := extmap[int32(tag)] // may be missing
- ext.enc = append(ext.enc, o.buf[oi:o.index]...)
- extmap[int32(tag)] = ext
- }
- continue
- }
- }
- // Maybe it's a oneof?
- if prop.oneofUnmarshaler != nil {
- m := structPointer_Interface(base, st).(Message)
- // First return value indicates whether tag is a oneof field.
- ok, err = prop.oneofUnmarshaler(m, tag, wire, o)
- if err == ErrInternalBadWireType {
- // Map the error to something more descriptive.
- // Do the formatting here to save generated code space.
- err = fmt.Errorf("bad wiretype for oneof field in %T", m)
- }
- if ok {
- continue
- }
- }
- err = o.skipAndSave(st, tag, wire, base, prop.unrecField)
- continue
- }
- p := prop.Prop[fieldnum]
-
- if p.dec == nil {
- fmt.Fprintf(os.Stderr, "proto: no protobuf decoder for %s.%s\n", st, st.Field(fieldnum).Name)
- continue
- }
- dec := p.dec
- if wire != WireStartGroup && wire != p.WireType {
- if wire == WireBytes && p.packedDec != nil {
- // a packable field
- dec = p.packedDec
- } else {
- err = fmt.Errorf("proto: bad wiretype for field %s.%s: got wiretype %d, want %d", st, st.Field(fieldnum).Name, wire, p.WireType)
- continue
- }
- }
- decErr := dec(o, p, base)
- if decErr != nil && !state.shouldContinue(decErr, p) {
- err = decErr
- }
- if err == nil && p.Required {
- // Successfully decoded a required field.
- if tag <= 64 {
- // use bitmap for fields 1-64 to catch field reuse.
- var mask uint64 = 1 << uint64(tag-1)
- if reqFields&mask == 0 {
- // new required field
- reqFields |= mask
- required--
- }
- } else {
- // This is imprecise. It can be fooled by a required field
- // with a tag > 64 that is encoded twice; that's very rare.
- // A fully correct implementation would require allocating
- // a data structure, which we would like to avoid.
- required--
- }
- }
- }
- if err == nil {
- if is_group {
- return io.ErrUnexpectedEOF
- }
- if state.err != nil {
- return state.err
- }
- if required > 0 {
- // Not enough information to determine the exact field. If we use extra
- // CPU, we could determine the field only if the missing required field
- // has a tag <= 64 and we check reqFields.
- return &RequiredNotSetError{"{Unknown}"}
- }
- }
- return err
-}
-
-// Individual type decoders
-// For each,
-// u is the decoded value,
-// v is a pointer to the field (pointer) in the struct
-
-// Sizes of the pools to allocate inside the Buffer.
-// The goal is modest amortization and allocation
-// on at least 16-byte boundaries.
-const (
- boolPoolSize = 16
- uint32PoolSize = 8
- uint64PoolSize = 4
-)
-
-// Decode a bool.
-func (o *Buffer) dec_bool(p *Properties, base structPointer) error {
- u, err := p.valDec(o)
- if err != nil {
- return err
- }
- if len(o.bools) == 0 {
- o.bools = make([]bool, boolPoolSize)
- }
- o.bools[0] = u != 0
- *structPointer_Bool(base, p.field) = &o.bools[0]
- o.bools = o.bools[1:]
- return nil
-}
-
-func (o *Buffer) dec_proto3_bool(p *Properties, base structPointer) error {
- u, err := p.valDec(o)
- if err != nil {
- return err
- }
- *structPointer_BoolVal(base, p.field) = u != 0
- return nil
-}
-
-// Decode an int32.
-func (o *Buffer) dec_int32(p *Properties, base structPointer) error {
- u, err := p.valDec(o)
- if err != nil {
- return err
- }
- word32_Set(structPointer_Word32(base, p.field), o, uint32(u))
- return nil
-}
-
-func (o *Buffer) dec_proto3_int32(p *Properties, base structPointer) error {
- u, err := p.valDec(o)
- if err != nil {
- return err
- }
- word32Val_Set(structPointer_Word32Val(base, p.field), uint32(u))
- return nil
-}
-
-// Decode an int64.
-func (o *Buffer) dec_int64(p *Properties, base structPointer) error {
- u, err := p.valDec(o)
- if err != nil {
- return err
- }
- word64_Set(structPointer_Word64(base, p.field), o, u)
- return nil
-}
-
-func (o *Buffer) dec_proto3_int64(p *Properties, base structPointer) error {
- u, err := p.valDec(o)
- if err != nil {
- return err
- }
- word64Val_Set(structPointer_Word64Val(base, p.field), o, u)
- return nil
-}
-
-// Decode a string.
-func (o *Buffer) dec_string(p *Properties, base structPointer) error {
- s, err := o.DecodeStringBytes()
- if err != nil {
- return err
- }
- *structPointer_String(base, p.field) = &s
- return nil
-}
-
-func (o *Buffer) dec_proto3_string(p *Properties, base structPointer) error {
- s, err := o.DecodeStringBytes()
- if err != nil {
- return err
- }
- *structPointer_StringVal(base, p.field) = s
- return nil
-}
-
-// Decode a slice of bytes ([]byte).
-func (o *Buffer) dec_slice_byte(p *Properties, base structPointer) error {
- b, err := o.DecodeRawBytes(true)
- if err != nil {
- return err
- }
- *structPointer_Bytes(base, p.field) = b
- return nil
-}
-
-// Decode a slice of bools ([]bool).
-func (o *Buffer) dec_slice_bool(p *Properties, base structPointer) error {
- u, err := p.valDec(o)
- if err != nil {
- return err
- }
- v := structPointer_BoolSlice(base, p.field)
- *v = append(*v, u != 0)
- return nil
-}
-
-// Decode a slice of bools ([]bool) in packed format.
-func (o *Buffer) dec_slice_packed_bool(p *Properties, base structPointer) error {
- v := structPointer_BoolSlice(base, p.field)
-
- nn, err := o.DecodeVarint()
- if err != nil {
- return err
- }
- nb := int(nn) // number of bytes of encoded bools
- fin := o.index + nb
- if fin < o.index {
- return errOverflow
- }
-
- y := *v
- for o.index < fin {
- u, err := p.valDec(o)
- if err != nil {
- return err
- }
- y = append(y, u != 0)
- }
-
- *v = y
- return nil
-}
-
-// Decode a slice of int32s ([]int32).
-func (o *Buffer) dec_slice_int32(p *Properties, base structPointer) error {
- u, err := p.valDec(o)
- if err != nil {
- return err
- }
- structPointer_Word32Slice(base, p.field).Append(uint32(u))
- return nil
-}
-
-// Decode a slice of int32s ([]int32) in packed format.
-func (o *Buffer) dec_slice_packed_int32(p *Properties, base structPointer) error {
- v := structPointer_Word32Slice(base, p.field)
-
- nn, err := o.DecodeVarint()
- if err != nil {
- return err
- }
- nb := int(nn) // number of bytes of encoded int32s
-
- fin := o.index + nb
- if fin < o.index {
- return errOverflow
- }
- for o.index < fin {
- u, err := p.valDec(o)
- if err != nil {
- return err
- }
- v.Append(uint32(u))
- }
- return nil
-}
-
-// Decode a slice of int64s ([]int64).
-func (o *Buffer) dec_slice_int64(p *Properties, base structPointer) error {
- u, err := p.valDec(o)
- if err != nil {
- return err
- }
-
- structPointer_Word64Slice(base, p.field).Append(u)
- return nil
-}
-
-// Decode a slice of int64s ([]int64) in packed format.
-func (o *Buffer) dec_slice_packed_int64(p *Properties, base structPointer) error {
- v := structPointer_Word64Slice(base, p.field)
-
- nn, err := o.DecodeVarint()
- if err != nil {
- return err
- }
- nb := int(nn) // number of bytes of encoded int64s
-
- fin := o.index + nb
- if fin < o.index {
- return errOverflow
- }
- for o.index < fin {
- u, err := p.valDec(o)
- if err != nil {
- return err
- }
- v.Append(u)
- }
- return nil
-}
-
-// Decode a slice of strings ([]string).
-func (o *Buffer) dec_slice_string(p *Properties, base structPointer) error {
- s, err := o.DecodeStringBytes()
- if err != nil {
- return err
- }
- v := structPointer_StringSlice(base, p.field)
- *v = append(*v, s)
- return nil
-}
-
-// Decode a slice of slice of bytes ([][]byte).
-func (o *Buffer) dec_slice_slice_byte(p *Properties, base structPointer) error {
- b, err := o.DecodeRawBytes(true)
- if err != nil {
- return err
- }
- v := structPointer_BytesSlice(base, p.field)
- *v = append(*v, b)
- return nil
-}
-
-// Decode a map field.
-func (o *Buffer) dec_new_map(p *Properties, base structPointer) error {
- raw, err := o.DecodeRawBytes(false)
- if err != nil {
- return err
- }
- oi := o.index // index at the end of this map entry
- o.index -= len(raw) // move buffer back to start of map entry
-
- mptr := structPointer_NewAt(base, p.field, p.mtype) // *map[K]V
- if mptr.Elem().IsNil() {
- mptr.Elem().Set(reflect.MakeMap(mptr.Type().Elem()))
- }
- v := mptr.Elem() // map[K]V
-
- // Prepare addressable doubly-indirect placeholders for the key and value types.
- // See enc_new_map for why.
- keyptr := reflect.New(reflect.PtrTo(p.mtype.Key())).Elem() // addressable *K
- keybase := toStructPointer(keyptr.Addr()) // **K
-
- var valbase structPointer
- var valptr reflect.Value
- switch p.mtype.Elem().Kind() {
- case reflect.Slice:
- // []byte
- var dummy []byte
- valptr = reflect.ValueOf(&dummy) // *[]byte
- valbase = toStructPointer(valptr) // *[]byte
- case reflect.Ptr:
- // message; valptr is **Msg; need to allocate the intermediate pointer
- valptr = reflect.New(reflect.PtrTo(p.mtype.Elem())).Elem() // addressable *V
- valptr.Set(reflect.New(valptr.Type().Elem()))
- valbase = toStructPointer(valptr)
- default:
- // everything else
- valptr = reflect.New(reflect.PtrTo(p.mtype.Elem())).Elem() // addressable *V
- valbase = toStructPointer(valptr.Addr()) // **V
- }
-
- // Decode.
- // This parses a restricted wire format, namely the encoding of a message
- // with two fields. See enc_new_map for the format.
- for o.index < oi {
- // tagcode for key and value properties are always a single byte
- // because they have tags 1 and 2.
- tagcode := o.buf[o.index]
- o.index++
- switch tagcode {
- case p.mkeyprop.tagcode[0]:
- if err := p.mkeyprop.dec(o, p.mkeyprop, keybase); err != nil {
- return err
- }
- case p.mvalprop.tagcode[0]:
- if err := p.mvalprop.dec(o, p.mvalprop, valbase); err != nil {
- return err
- }
- default:
- // TODO: Should we silently skip this instead?
- return fmt.Errorf("proto: bad map data tag %d", raw[0])
- }
- }
- keyelem, valelem := keyptr.Elem(), valptr.Elem()
- if !keyelem.IsValid() {
- keyelem = reflect.Zero(p.mtype.Key())
- }
- if !valelem.IsValid() {
- valelem = reflect.Zero(p.mtype.Elem())
- }
-
- v.SetMapIndex(keyelem, valelem)
- return nil
-}
-
-// Decode a group.
-func (o *Buffer) dec_struct_group(p *Properties, base structPointer) error {
- bas := structPointer_GetStructPointer(base, p.field)
- if structPointer_IsNil(bas) {
- // allocate new nested message
- bas = toStructPointer(reflect.New(p.stype))
- structPointer_SetStructPointer(base, p.field, bas)
- }
- return o.unmarshalType(p.stype, p.sprop, true, bas)
-}
-
-// Decode an embedded message.
-func (o *Buffer) dec_struct_message(p *Properties, base structPointer) (err error) {
- raw, e := o.DecodeRawBytes(false)
- if e != nil {
- return e
- }
-
- bas := structPointer_GetStructPointer(base, p.field)
- if structPointer_IsNil(bas) {
- // allocate new nested message
- bas = toStructPointer(reflect.New(p.stype))
- structPointer_SetStructPointer(base, p.field, bas)
- }
-
- // If the object can unmarshal itself, let it.
- if p.isUnmarshaler {
- iv := structPointer_Interface(bas, p.stype)
- return iv.(Unmarshaler).Unmarshal(raw)
- }
-
- obuf := o.buf
- oi := o.index
- o.buf = raw
- o.index = 0
-
- err = o.unmarshalType(p.stype, p.sprop, false, bas)
- o.buf = obuf
- o.index = oi
-
- return err
-}
-
-// Decode a slice of embedded messages.
-func (o *Buffer) dec_slice_struct_message(p *Properties, base structPointer) error {
- return o.dec_slice_struct(p, false, base)
-}
-
-// Decode a slice of embedded groups.
-func (o *Buffer) dec_slice_struct_group(p *Properties, base structPointer) error {
- return o.dec_slice_struct(p, true, base)
-}
-
-// Decode a slice of structs ([]*struct).
-func (o *Buffer) dec_slice_struct(p *Properties, is_group bool, base structPointer) error {
- v := reflect.New(p.stype)
- bas := toStructPointer(v)
- structPointer_StructPointerSlice(base, p.field).Append(bas)
-
- if is_group {
- err := o.unmarshalType(p.stype, p.sprop, is_group, bas)
- return err
- }
-
- raw, err := o.DecodeRawBytes(false)
- if err != nil {
- return err
- }
-
- // If the object can unmarshal itself, let it.
- if p.isUnmarshaler {
- iv := v.Interface()
- return iv.(Unmarshaler).Unmarshal(raw)
- }
-
- obuf := o.buf
- oi := o.index
- o.buf = raw
- o.index = 0
-
- err = o.unmarshalType(p.stype, p.sprop, is_group, bas)
-
- o.buf = obuf
- o.index = oi
-
+ // Slow workaround for messages that aren't Unmarshalers.
+ // This includes some hand-coded .pb.go files and
+ // bootstrap protos.
+ // TODO: fix all of those and then add Unmarshal to
+ // the Message interface. Then:
+ // The cast above and code below can be deleted.
+ // The old unmarshaler can be deleted.
+ // Clients can call Unmarshal directly (can already do that, actually).
+ var info InternalMessageInfo
+ err := info.Unmarshal(pb, p.buf[p.index:])
+ p.index = len(p.buf)
return err
}
diff --git a/vendor/github.com/gogo/protobuf/proto/decode_gogo.go b/vendor/github.com/gogo/protobuf/proto/decode_gogo.go
deleted file mode 100644
index 6fb74de4c..000000000
--- a/vendor/github.com/gogo/protobuf/proto/decode_gogo.go
+++ /dev/null
@@ -1,172 +0,0 @@
-// Protocol Buffers for Go with Gadgets
-//
-// Copyright (c) 2013, The GoGo Authors. All rights reserved.
-// http://github.com/gogo/protobuf
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-package proto
-
-import (
- "reflect"
-)
-
-// Decode a reference to a struct pointer.
-func (o *Buffer) dec_ref_struct_message(p *Properties, base structPointer) (err error) {
- raw, e := o.DecodeRawBytes(false)
- if e != nil {
- return e
- }
-
- // If the object can unmarshal itself, let it.
- if p.isUnmarshaler {
- panic("not supported, since this is a pointer receiver")
- }
-
- obuf := o.buf
- oi := o.index
- o.buf = raw
- o.index = 0
-
- bas := structPointer_FieldPointer(base, p.field)
-
- err = o.unmarshalType(p.stype, p.sprop, false, bas)
- o.buf = obuf
- o.index = oi
-
- return err
-}
-
-// Decode a slice of references to struct pointers ([]struct).
-func (o *Buffer) dec_slice_ref_struct(p *Properties, is_group bool, base structPointer) error {
- newBas := appendStructPointer(base, p.field, p.sstype)
-
- if is_group {
- panic("not supported, maybe in future, if requested.")
- }
-
- raw, err := o.DecodeRawBytes(false)
- if err != nil {
- return err
- }
-
- // If the object can unmarshal itself, let it.
- if p.isUnmarshaler {
- panic("not supported, since this is not a pointer receiver.")
- }
-
- obuf := o.buf
- oi := o.index
- o.buf = raw
- o.index = 0
-
- err = o.unmarshalType(p.stype, p.sprop, is_group, newBas)
-
- o.buf = obuf
- o.index = oi
-
- return err
-}
-
-// Decode a slice of references to struct pointers.
-func (o *Buffer) dec_slice_ref_struct_message(p *Properties, base structPointer) error {
- return o.dec_slice_ref_struct(p, false, base)
-}
-
-func setPtrCustomType(base structPointer, f field, v interface{}) {
- if v == nil {
- return
- }
- structPointer_SetStructPointer(base, f, toStructPointer(reflect.ValueOf(v)))
-}
-
-func setCustomType(base structPointer, f field, value interface{}) {
- if value == nil {
- return
- }
- v := reflect.ValueOf(value).Elem()
- t := reflect.TypeOf(value).Elem()
- kind := t.Kind()
- switch kind {
- case reflect.Slice:
- slice := reflect.MakeSlice(t, v.Len(), v.Cap())
- reflect.Copy(slice, v)
- oldHeader := structPointer_GetSliceHeader(base, f)
- oldHeader.Data = slice.Pointer()
- oldHeader.Len = v.Len()
- oldHeader.Cap = v.Cap()
- default:
- size := reflect.TypeOf(value).Elem().Size()
- structPointer_Copy(toStructPointer(reflect.ValueOf(value)), structPointer_Add(base, f), int(size))
- }
-}
-
-func (o *Buffer) dec_custom_bytes(p *Properties, base structPointer) error {
- b, err := o.DecodeRawBytes(true)
- if err != nil {
- return err
- }
- i := reflect.New(p.ctype.Elem()).Interface()
- custom := (i).(Unmarshaler)
- if err := custom.Unmarshal(b); err != nil {
- return err
- }
- setPtrCustomType(base, p.field, custom)
- return nil
-}
-
-func (o *Buffer) dec_custom_ref_bytes(p *Properties, base structPointer) error {
- b, err := o.DecodeRawBytes(true)
- if err != nil {
- return err
- }
- i := reflect.New(p.ctype).Interface()
- custom := (i).(Unmarshaler)
- if err := custom.Unmarshal(b); err != nil {
- return err
- }
- if custom != nil {
- setCustomType(base, p.field, custom)
- }
- return nil
-}
-
-// Decode a slice of bytes ([]byte) into a slice of custom types.
-func (o *Buffer) dec_custom_slice_bytes(p *Properties, base structPointer) error {
- b, err := o.DecodeRawBytes(true)
- if err != nil {
- return err
- }
- i := reflect.New(p.ctype.Elem()).Interface()
- custom := (i).(Unmarshaler)
- if err := custom.Unmarshal(b); err != nil {
- return err
- }
- newBas := appendStructPointer(base, p.field, p.ctype)
-
- var zero field
- setCustomType(newBas, zero, custom)
-
- return nil
-}
diff --git a/vendor/github.com/gogo/protobuf/proto/deprecated.go b/vendor/github.com/gogo/protobuf/proto/deprecated.go
new file mode 100644
index 000000000..35b882c09
--- /dev/null
+++ b/vendor/github.com/gogo/protobuf/proto/deprecated.go
@@ -0,0 +1,63 @@
+// Go support for Protocol Buffers - Google's data interchange format
+//
+// Copyright 2018 The Go Authors. All rights reserved.
+// https://github.com/golang/protobuf
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package proto
+
+import "errors"
+
+// Deprecated: do not use.
+type Stats struct{ Emalloc, Dmalloc, Encode, Decode, Chit, Cmiss, Size uint64 }
+
+// Deprecated: do not use.
+func GetStats() Stats { return Stats{} }
+
+// Deprecated: do not use.
+func MarshalMessageSet(interface{}) ([]byte, error) {
+ return nil, errors.New("proto: not implemented")
+}
+
+// Deprecated: do not use.
+func UnmarshalMessageSet([]byte, interface{}) error {
+ return errors.New("proto: not implemented")
+}
+
+// Deprecated: do not use.
+func MarshalMessageSetJSON(interface{}) ([]byte, error) {
+ return nil, errors.New("proto: not implemented")
+}
+
+// Deprecated: do not use.
+func UnmarshalMessageSetJSON([]byte, interface{}) error {
+ return errors.New("proto: not implemented")
+}
+
+// Deprecated: do not use.
+func RegisterMessageSetType(Message, int32, string) {}
diff --git a/vendor/github.com/gogo/protobuf/proto/discard.go b/vendor/github.com/gogo/protobuf/proto/discard.go
index bd0e3bb4c..fe1bd7d90 100644
--- a/vendor/github.com/gogo/protobuf/proto/discard.go
+++ b/vendor/github.com/gogo/protobuf/proto/discard.go
@@ -35,8 +35,14 @@ import (
"fmt"
"reflect"
"strings"
+ "sync"
+ "sync/atomic"
)
+type generatedDiscarder interface {
+ XXX_DiscardUnknown()
+}
+
// DiscardUnknown recursively discards all unknown fields from this message
// and all embedded messages.
//
@@ -49,9 +55,202 @@ import (
// For proto2 messages, the unknown fields of message extensions are only
// discarded from messages that have been accessed via GetExtension.
func DiscardUnknown(m Message) {
+ if m, ok := m.(generatedDiscarder); ok {
+ m.XXX_DiscardUnknown()
+ return
+ }
+ // TODO: Dynamically populate a InternalMessageInfo for legacy messages,
+ // but the master branch has no implementation for InternalMessageInfo,
+ // so it would be more work to replicate that approach.
discardLegacy(m)
}
+// DiscardUnknown recursively discards all unknown fields.
+func (a *InternalMessageInfo) DiscardUnknown(m Message) {
+ di := atomicLoadDiscardInfo(&a.discard)
+ if di == nil {
+ di = getDiscardInfo(reflect.TypeOf(m).Elem())
+ atomicStoreDiscardInfo(&a.discard, di)
+ }
+ di.discard(toPointer(&m))
+}
+
+type discardInfo struct {
+ typ reflect.Type
+
+ initialized int32 // 0: only typ is valid, 1: everything is valid
+ lock sync.Mutex
+
+ fields []discardFieldInfo
+ unrecognized field
+}
+
+type discardFieldInfo struct {
+ field field // Offset of field, guaranteed to be valid
+ discard func(src pointer)
+}
+
+var (
+ discardInfoMap = map[reflect.Type]*discardInfo{}
+ discardInfoLock sync.Mutex
+)
+
+func getDiscardInfo(t reflect.Type) *discardInfo {
+ discardInfoLock.Lock()
+ defer discardInfoLock.Unlock()
+ di := discardInfoMap[t]
+ if di == nil {
+ di = &discardInfo{typ: t}
+ discardInfoMap[t] = di
+ }
+ return di
+}
+
+func (di *discardInfo) discard(src pointer) {
+ if src.isNil() {
+ return // Nothing to do.
+ }
+
+ if atomic.LoadInt32(&di.initialized) == 0 {
+ di.computeDiscardInfo()
+ }
+
+ for _, fi := range di.fields {
+ sfp := src.offset(fi.field)
+ fi.discard(sfp)
+ }
+
+ // For proto2 messages, only discard unknown fields in message extensions
+ // that have been accessed via GetExtension.
+ if em, err := extendable(src.asPointerTo(di.typ).Interface()); err == nil {
+ // Ignore lock since DiscardUnknown is not concurrency safe.
+ emm, _ := em.extensionsRead()
+ for _, mx := range emm {
+ if m, ok := mx.value.(Message); ok {
+ DiscardUnknown(m)
+ }
+ }
+ }
+
+ if di.unrecognized.IsValid() {
+ *src.offset(di.unrecognized).toBytes() = nil
+ }
+}
+
+func (di *discardInfo) computeDiscardInfo() {
+ di.lock.Lock()
+ defer di.lock.Unlock()
+ if di.initialized != 0 {
+ return
+ }
+ t := di.typ
+ n := t.NumField()
+
+ for i := 0; i < n; i++ {
+ f := t.Field(i)
+ if strings.HasPrefix(f.Name, "XXX_") {
+ continue
+ }
+
+ dfi := discardFieldInfo{field: toField(&f)}
+ tf := f.Type
+
+ // Unwrap tf to get its most basic type.
+ var isPointer, isSlice bool
+ if tf.Kind() == reflect.Slice && tf.Elem().Kind() != reflect.Uint8 {
+ isSlice = true
+ tf = tf.Elem()
+ }
+ if tf.Kind() == reflect.Ptr {
+ isPointer = true
+ tf = tf.Elem()
+ }
+ if isPointer && isSlice && tf.Kind() != reflect.Struct {
+ panic(fmt.Sprintf("%v.%s cannot be a slice of pointers to primitive types", t, f.Name))
+ }
+
+ switch tf.Kind() {
+ case reflect.Struct:
+ switch {
+ case !isPointer:
+ panic(fmt.Sprintf("%v.%s cannot be a direct struct value", t, f.Name))
+ case isSlice: // E.g., []*pb.T
+ discardInfo := getDiscardInfo(tf)
+ dfi.discard = func(src pointer) {
+ sps := src.getPointerSlice()
+ for _, sp := range sps {
+ if !sp.isNil() {
+ discardInfo.discard(sp)
+ }
+ }
+ }
+ default: // E.g., *pb.T
+ discardInfo := getDiscardInfo(tf)
+ dfi.discard = func(src pointer) {
+ sp := src.getPointer()
+ if !sp.isNil() {
+ discardInfo.discard(sp)
+ }
+ }
+ }
+ case reflect.Map:
+ switch {
+ case isPointer || isSlice:
+ panic(fmt.Sprintf("%v.%s cannot be a pointer to a map or a slice of map values", t, f.Name))
+ default: // E.g., map[K]V
+ if tf.Elem().Kind() == reflect.Ptr { // Proto struct (e.g., *T)
+ dfi.discard = func(src pointer) {
+ sm := src.asPointerTo(tf).Elem()
+ if sm.Len() == 0 {
+ return
+ }
+ for _, key := range sm.MapKeys() {
+ val := sm.MapIndex(key)
+ DiscardUnknown(val.Interface().(Message))
+ }
+ }
+ } else {
+ dfi.discard = func(pointer) {} // Noop
+ }
+ }
+ case reflect.Interface:
+ // Must be oneof field.
+ switch {
+ case isPointer || isSlice:
+ panic(fmt.Sprintf("%v.%s cannot be a pointer to a interface or a slice of interface values", t, f.Name))
+ default: // E.g., interface{}
+ // TODO: Make this faster?
+ dfi.discard = func(src pointer) {
+ su := src.asPointerTo(tf).Elem()
+ if !su.IsNil() {
+ sv := su.Elem().Elem().Field(0)
+ if sv.Kind() == reflect.Ptr && sv.IsNil() {
+ return
+ }
+ switch sv.Type().Kind() {
+ case reflect.Ptr: // Proto struct (e.g., *T)
+ DiscardUnknown(sv.Interface().(Message))
+ }
+ }
+ }
+ }
+ default:
+ continue
+ }
+ di.fields = append(di.fields, dfi)
+ }
+
+ di.unrecognized = invalidField
+ if f, ok := t.FieldByName("XXX_unrecognized"); ok {
+ if f.Type != reflect.TypeOf([]byte{}) {
+ panic("expected XXX_unrecognized to be of type []byte")
+ }
+ di.unrecognized = toField(&f)
+ }
+
+ atomic.StoreInt32(&di.initialized, 1)
+}
+
func discardLegacy(m Message) {
v := reflect.ValueOf(m)
if v.Kind() != reflect.Ptr || v.IsNil() {
@@ -139,7 +338,7 @@ func discardLegacy(m Message) {
// For proto2 messages, only discard unknown fields in message extensions
// that have been accessed via GetExtension.
- if em, ok := extendable(m); ok {
+ if em, err := extendable(m); err == nil {
// Ignore lock since discardLegacy is not concurrency safe.
emm, _ := em.extensionsRead()
for _, mx := range emm {
diff --git a/vendor/github.com/gogo/protobuf/proto/duration_gogo.go b/vendor/github.com/gogo/protobuf/proto/duration_gogo.go
index 18e2a5f77..e748e1730 100644
--- a/vendor/github.com/gogo/protobuf/proto/duration_gogo.go
+++ b/vendor/github.com/gogo/protobuf/proto/duration_gogo.go
@@ -47,157 +47,3 @@ func (*duration) String() string { return "duration" }
func init() {
RegisterType((*duration)(nil), "gogo.protobuf.proto.duration")
}
-
-func (o *Buffer) decDuration() (time.Duration, error) {
- b, err := o.DecodeRawBytes(true)
- if err != nil {
- return 0, err
- }
- dproto := &duration{}
- if err := Unmarshal(b, dproto); err != nil {
- return 0, err
- }
- return durationFromProto(dproto)
-}
-
-func (o *Buffer) dec_duration(p *Properties, base structPointer) error {
- d, err := o.decDuration()
- if err != nil {
- return err
- }
- word64_Set(structPointer_Word64(base, p.field), o, uint64(d))
- return nil
-}
-
-func (o *Buffer) dec_ref_duration(p *Properties, base structPointer) error {
- d, err := o.decDuration()
- if err != nil {
- return err
- }
- word64Val_Set(structPointer_Word64Val(base, p.field), o, uint64(d))
- return nil
-}
-
-func (o *Buffer) dec_slice_duration(p *Properties, base structPointer) error {
- d, err := o.decDuration()
- if err != nil {
- return err
- }
- newBas := appendStructPointer(base, p.field, reflect.SliceOf(reflect.PtrTo(durationType)))
- var zero field
- setPtrCustomType(newBas, zero, &d)
- return nil
-}
-
-func (o *Buffer) dec_slice_ref_duration(p *Properties, base structPointer) error {
- d, err := o.decDuration()
- if err != nil {
- return err
- }
- structPointer_Word64Slice(base, p.field).Append(uint64(d))
- return nil
-}
-
-func size_duration(p *Properties, base structPointer) (n int) {
- structp := structPointer_GetStructPointer(base, p.field)
- if structPointer_IsNil(structp) {
- return 0
- }
- dur := structPointer_Interface(structp, durationType).(*time.Duration)
- d := durationProto(*dur)
- size := Size(d)
- return size + sizeVarint(uint64(size)) + len(p.tagcode)
-}
-
-func (o *Buffer) enc_duration(p *Properties, base structPointer) error {
- structp := structPointer_GetStructPointer(base, p.field)
- if structPointer_IsNil(structp) {
- return ErrNil
- }
- dur := structPointer_Interface(structp, durationType).(*time.Duration)
- d := durationProto(*dur)
- data, err := Marshal(d)
- if err != nil {
- return err
- }
- o.buf = append(o.buf, p.tagcode...)
- o.EncodeRawBytes(data)
- return nil
-}
-
-func size_ref_duration(p *Properties, base structPointer) (n int) {
- dur := structPointer_InterfaceAt(base, p.field, durationType).(*time.Duration)
- d := durationProto(*dur)
- size := Size(d)
- return size + sizeVarint(uint64(size)) + len(p.tagcode)
-}
-
-func (o *Buffer) enc_ref_duration(p *Properties, base structPointer) error {
- dur := structPointer_InterfaceAt(base, p.field, durationType).(*time.Duration)
- d := durationProto(*dur)
- data, err := Marshal(d)
- if err != nil {
- return err
- }
- o.buf = append(o.buf, p.tagcode...)
- o.EncodeRawBytes(data)
- return nil
-}
-
-func size_slice_duration(p *Properties, base structPointer) (n int) {
- pdurs := structPointer_InterfaceAt(base, p.field, reflect.SliceOf(reflect.PtrTo(durationType))).(*[]*time.Duration)
- durs := *pdurs
- for i := 0; i < len(durs); i++ {
- if durs[i] == nil {
- return 0
- }
- dproto := durationProto(*durs[i])
- size := Size(dproto)
- n += len(p.tagcode) + size + sizeVarint(uint64(size))
- }
- return n
-}
-
-func (o *Buffer) enc_slice_duration(p *Properties, base structPointer) error {
- pdurs := structPointer_InterfaceAt(base, p.field, reflect.SliceOf(reflect.PtrTo(durationType))).(*[]*time.Duration)
- durs := *pdurs
- for i := 0; i < len(durs); i++ {
- if durs[i] == nil {
- return errRepeatedHasNil
- }
- dproto := durationProto(*durs[i])
- data, err := Marshal(dproto)
- if err != nil {
- return err
- }
- o.buf = append(o.buf, p.tagcode...)
- o.EncodeRawBytes(data)
- }
- return nil
-}
-
-func size_slice_ref_duration(p *Properties, base structPointer) (n int) {
- pdurs := structPointer_InterfaceAt(base, p.field, reflect.SliceOf(durationType)).(*[]time.Duration)
- durs := *pdurs
- for i := 0; i < len(durs); i++ {
- dproto := durationProto(durs[i])
- size := Size(dproto)
- n += len(p.tagcode) + size + sizeVarint(uint64(size))
- }
- return n
-}
-
-func (o *Buffer) enc_slice_ref_duration(p *Properties, base structPointer) error {
- pdurs := structPointer_InterfaceAt(base, p.field, reflect.SliceOf(durationType)).(*[]time.Duration)
- durs := *pdurs
- for i := 0; i < len(durs); i++ {
- dproto := durationProto(durs[i])
- data, err := Marshal(dproto)
- if err != nil {
- return err
- }
- o.buf = append(o.buf, p.tagcode...)
- o.EncodeRawBytes(data)
- }
- return nil
-}
diff --git a/vendor/github.com/gogo/protobuf/proto/encode.go b/vendor/github.com/gogo/protobuf/proto/encode.go
index 8b84d1b22..3abfed2cf 100644
--- a/vendor/github.com/gogo/protobuf/proto/encode.go
+++ b/vendor/github.com/gogo/protobuf/proto/encode.go
@@ -37,28 +37,9 @@ package proto
import (
"errors"
- "fmt"
"reflect"
- "sort"
)
-// RequiredNotSetError is the error returned if Marshal is called with
-// a protocol buffer struct whose required fields have not
-// all been initialized. It is also the error returned if Unmarshal is
-// called with an encoded protocol buffer that does not include all the
-// required fields.
-//
-// When printed, RequiredNotSetError reports the first unset required field in a
-// message. If the field cannot be precisely determined, it is reported as
-// "{Unknown}".
-type RequiredNotSetError struct {
- field string
-}
-
-func (e *RequiredNotSetError) Error() string {
- return fmt.Sprintf("proto: required field %q not set", e.field)
-}
-
var (
// errRepeatedHasNil is the error returned if Marshal is called with
// a struct with a repeated field containing a nil element.
@@ -82,10 +63,6 @@ var (
const maxVarintBytes = 10 // maximum length of a varint
-// maxMarshalSize is the largest allowed size of an encoded protobuf,
-// since C++ and Java use signed int32s for the size.
-const maxMarshalSize = 1<<31 - 1
-
// EncodeVarint returns the varint encoding of x.
// This is the format for the
// int32, int64, uint32, uint64, bool, and enum
@@ -119,18 +96,27 @@ func (p *Buffer) EncodeVarint(x uint64) error {
// SizeVarint returns the varint encoding size of an integer.
func SizeVarint(x uint64) int {
- return sizeVarint(x)
-}
-
-func sizeVarint(x uint64) (n int) {
- for {
- n++
- x >>= 7
- if x == 0 {
- break
- }
+ switch {
+ case x < 1<<7:
+ return 1
+ case x < 1<<14:
+ return 2
+ case x < 1<<21:
+ return 3
+ case x < 1<<28:
+ return 4
+ case x < 1<<35:
+ return 5
+ case x < 1<<42:
+ return 6
+ case x < 1<<49:
+ return 7
+ case x < 1<<56:
+ return 8
+ case x < 1<<63:
+ return 9
}
- return n
+ return 10
}
// EncodeFixed64 writes a 64-bit integer to the Buffer.
@@ -149,10 +135,6 @@ func (p *Buffer) EncodeFixed64(x uint64) error {
return nil
}
-func sizeFixed64(x uint64) int {
- return 8
-}
-
// EncodeFixed32 writes a 32-bit integer to the Buffer.
// This is the format for the
// fixed32, sfixed32, and float protocol buffer types.
@@ -165,20 +147,12 @@ func (p *Buffer) EncodeFixed32(x uint64) error {
return nil
}
-func sizeFixed32(x uint64) int {
- return 4
-}
-
// EncodeZigzag64 writes a zigzag-encoded 64-bit integer
// to the Buffer.
// 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((x << 1) ^ uint64((int64(x) >> 63)))
-}
-
-func sizeZigzag64(x uint64) int {
- return sizeVarint((x << 1) ^ uint64((int64(x) >> 63)))
+ return p.EncodeVarint(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
// EncodeZigzag32 writes a zigzag-encoded 32-bit integer
@@ -189,10 +163,6 @@ func (p *Buffer) EncodeZigzag32(x uint64) error {
return p.EncodeVarint(uint64((uint32(x) << 1) ^ uint32((int32(x) >> 31))))
}
-func sizeZigzag32(x uint64) int {
- return sizeVarint(uint64((uint32(x) << 1) ^ uint32((int32(x) >> 31))))
-}
-
// EncodeRawBytes writes a count-delimited byte buffer to the Buffer.
// This is the format used for the bytes protocol buffer
// type and for embedded messages.
@@ -202,11 +172,6 @@ func (p *Buffer) EncodeRawBytes(b []byte) error {
return nil
}
-func sizeRawBytes(b []byte) int {
- return sizeVarint(uint64(len(b))) +
- len(b)
-}
-
// EncodeStringBytes writes an encoded string to the Buffer.
// This is the format used for the proto2 string type.
func (p *Buffer) EncodeStringBytes(s string) error {
@@ -215,319 +180,17 @@ func (p *Buffer) EncodeStringBytes(s string) error {
return nil
}
-func sizeStringBytes(s string) int {
- return sizeVarint(uint64(len(s))) +
- len(s)
-}
-
// Marshaler is the interface representing objects that can marshal themselves.
type Marshaler interface {
Marshal() ([]byte, error)
}
-// Marshal takes the protocol buffer
-// and encodes it into the wire format, returning the data.
-func Marshal(pb Message) ([]byte, error) {
- // Can the object marshal itself?
- if m, ok := pb.(Marshaler); ok {
- return m.Marshal()
- }
- p := NewBuffer(nil)
- err := p.Marshal(pb)
- if p.buf == nil && err == nil {
- // Return a non-nil slice on success.
- return []byte{}, nil
- }
- return p.buf, err
-}
-
// EncodeMessage writes the protocol buffer to the Buffer,
// prefixed by a varint-encoded length.
func (p *Buffer) EncodeMessage(pb Message) error {
- t, base, err := getbase(pb)
- if structPointer_IsNil(base) {
- return ErrNil
- }
- if err == nil {
- var state errorState
- err = p.enc_len_struct(GetProperties(t.Elem()), base, &state)
- }
- return err
-}
-
-// Marshal takes the protocol buffer
-// and encodes it into the wire format, writing the result to the
-// Buffer.
-func (p *Buffer) Marshal(pb Message) error {
- // Can the object marshal itself?
- if m, ok := pb.(Marshaler); ok {
- data, err := m.Marshal()
- p.buf = append(p.buf, data...)
- return err
- }
-
- t, base, err := getbase(pb)
- if structPointer_IsNil(base) {
- return ErrNil
- }
- if err == nil {
- err = p.enc_struct(GetProperties(t.Elem()), base)
- }
-
- if collectStats {
- (stats).Encode++ // Parens are to work around a goimports bug.
- }
-
- if len(p.buf) > maxMarshalSize {
- return ErrTooLarge
- }
- return err
-}
-
-// Size returns the encoded size of a protocol buffer.
-func Size(pb Message) (n int) {
- // Can the object marshal itself? If so, Size is slow.
- // TODO: add Size to Marshaler, or add a Sizer interface.
- if m, ok := pb.(Marshaler); ok {
- b, _ := m.Marshal()
- return len(b)
- }
-
- t, base, err := getbase(pb)
- if structPointer_IsNil(base) {
- return 0
- }
- if err == nil {
- n = size_struct(GetProperties(t.Elem()), base)
- }
-
- if collectStats {
- (stats).Size++ // Parens are to work around a goimports bug.
- }
-
- return
-}
-
-// Individual type encoders.
-
-// Encode a bool.
-func (o *Buffer) enc_bool(p *Properties, base structPointer) error {
- v := *structPointer_Bool(base, p.field)
- if v == nil {
- return ErrNil
- }
- x := 0
- if *v {
- x = 1
- }
- o.buf = append(o.buf, p.tagcode...)
- p.valEnc(o, uint64(x))
- return nil
-}
-
-func (o *Buffer) enc_proto3_bool(p *Properties, base structPointer) error {
- v := *structPointer_BoolVal(base, p.field)
- if !v {
- return ErrNil
- }
- o.buf = append(o.buf, p.tagcode...)
- p.valEnc(o, 1)
- return nil
-}
-
-func size_bool(p *Properties, base structPointer) int {
- v := *structPointer_Bool(base, p.field)
- if v == nil {
- return 0
- }
- return len(p.tagcode) + 1 // each bool takes exactly one byte
-}
-
-func size_proto3_bool(p *Properties, base structPointer) int {
- v := *structPointer_BoolVal(base, p.field)
- if !v && !p.oneof {
- return 0
- }
- return len(p.tagcode) + 1 // each bool takes exactly one byte
-}
-
-// Encode an int32.
-func (o *Buffer) enc_int32(p *Properties, base structPointer) error {
- v := structPointer_Word32(base, p.field)
- if word32_IsNil(v) {
- return ErrNil
- }
- x := int32(word32_Get(v)) // permit sign extension to use full 64-bit range
- o.buf = append(o.buf, p.tagcode...)
- p.valEnc(o, uint64(x))
- return nil
-}
-
-func (o *Buffer) enc_proto3_int32(p *Properties, base structPointer) error {
- v := structPointer_Word32Val(base, p.field)
- x := int32(word32Val_Get(v)) // permit sign extension to use full 64-bit range
- if x == 0 {
- return ErrNil
- }
- o.buf = append(o.buf, p.tagcode...)
- p.valEnc(o, uint64(x))
- return nil
-}
-
-func size_int32(p *Properties, base structPointer) (n int) {
- v := structPointer_Word32(base, p.field)
- if word32_IsNil(v) {
- return 0
- }
- x := int32(word32_Get(v)) // permit sign extension to use full 64-bit range
- n += len(p.tagcode)
- n += p.valSize(uint64(x))
- return
-}
-
-func size_proto3_int32(p *Properties, base structPointer) (n int) {
- v := structPointer_Word32Val(base, p.field)
- x := int32(word32Val_Get(v)) // permit sign extension to use full 64-bit range
- if x == 0 && !p.oneof {
- return 0
- }
- n += len(p.tagcode)
- n += p.valSize(uint64(x))
- return
-}
-
-// Encode a uint32.
-// Exactly the same as int32, except for no sign extension.
-func (o *Buffer) enc_uint32(p *Properties, base structPointer) error {
- v := structPointer_Word32(base, p.field)
- if word32_IsNil(v) {
- return ErrNil
- }
- x := word32_Get(v)
- o.buf = append(o.buf, p.tagcode...)
- p.valEnc(o, uint64(x))
- return nil
-}
-
-func (o *Buffer) enc_proto3_uint32(p *Properties, base structPointer) error {
- v := structPointer_Word32Val(base, p.field)
- x := word32Val_Get(v)
- if x == 0 {
- return ErrNil
- }
- o.buf = append(o.buf, p.tagcode...)
- p.valEnc(o, uint64(x))
- return nil
-}
-
-func size_uint32(p *Properties, base structPointer) (n int) {
- v := structPointer_Word32(base, p.field)
- if word32_IsNil(v) {
- return 0
- }
- x := word32_Get(v)
- n += len(p.tagcode)
- n += p.valSize(uint64(x))
- return
-}
-
-func size_proto3_uint32(p *Properties, base structPointer) (n int) {
- v := structPointer_Word32Val(base, p.field)
- x := word32Val_Get(v)
- if x == 0 && !p.oneof {
- return 0
- }
- n += len(p.tagcode)
- n += p.valSize(uint64(x))
- return
-}
-
-// Encode an int64.
-func (o *Buffer) enc_int64(p *Properties, base structPointer) error {
- v := structPointer_Word64(base, p.field)
- if word64_IsNil(v) {
- return ErrNil
- }
- x := word64_Get(v)
- o.buf = append(o.buf, p.tagcode...)
- p.valEnc(o, x)
- return nil
-}
-
-func (o *Buffer) enc_proto3_int64(p *Properties, base structPointer) error {
- v := structPointer_Word64Val(base, p.field)
- x := word64Val_Get(v)
- if x == 0 {
- return ErrNil
- }
- o.buf = append(o.buf, p.tagcode...)
- p.valEnc(o, x)
- return nil
-}
-
-func size_int64(p *Properties, base structPointer) (n int) {
- v := structPointer_Word64(base, p.field)
- if word64_IsNil(v) {
- return 0
- }
- x := word64_Get(v)
- n += len(p.tagcode)
- n += p.valSize(x)
- return
-}
-
-func size_proto3_int64(p *Properties, base structPointer) (n int) {
- v := structPointer_Word64Val(base, p.field)
- x := word64Val_Get(v)
- if x == 0 && !p.oneof {
- return 0
- }
- n += len(p.tagcode)
- n += p.valSize(x)
- return
-}
-
-// Encode a string.
-func (o *Buffer) enc_string(p *Properties, base structPointer) error {
- v := *structPointer_String(base, p.field)
- if v == nil {
- return ErrNil
- }
- x := *v
- o.buf = append(o.buf, p.tagcode...)
- o.EncodeStringBytes(x)
- return nil
-}
-
-func (o *Buffer) enc_proto3_string(p *Properties, base structPointer) error {
- v := *structPointer_StringVal(base, p.field)
- if v == "" {
- return ErrNil
- }
- o.buf = append(o.buf, p.tagcode...)
- o.EncodeStringBytes(v)
- return nil
-}
-
-func size_string(p *Properties, base structPointer) (n int) {
- v := *structPointer_String(base, p.field)
- if v == nil {
- return 0
- }
- x := *v
- n += len(p.tagcode)
- n += sizeStringBytes(x)
- return
-}
-
-func size_proto3_string(p *Properties, base structPointer) (n int) {
- v := *structPointer_StringVal(base, p.field)
- if v == "" && !p.oneof {
- return 0
- }
- n += len(p.tagcode)
- n += sizeStringBytes(v)
- return
+ siz := Size(pb)
+ p.EncodeVarint(uint64(siz))
+ return p.Marshal(pb)
}
// All protocol buffer fields are nillable, but be careful.
@@ -538,825 +201,3 @@ func isNil(v reflect.Value) bool {
}
return false
}
-
-// Encode a message struct.
-func (o *Buffer) enc_struct_message(p *Properties, base structPointer) error {
- var state errorState
- structp := structPointer_GetStructPointer(base, p.field)
- if structPointer_IsNil(structp) {
- return ErrNil
- }
-
- // Can the object marshal itself?
- if p.isMarshaler {
- m := structPointer_Interface(structp, p.stype).(Marshaler)
- data, err := m.Marshal()
- if err != nil && !state.shouldContinue(err, nil) {
- return err
- }
- o.buf = append(o.buf, p.tagcode...)
- o.EncodeRawBytes(data)
- return state.err
- }
-
- o.buf = append(o.buf, p.tagcode...)
- return o.enc_len_struct(p.sprop, structp, &state)
-}
-
-func size_struct_message(p *Properties, base structPointer) int {
- structp := structPointer_GetStructPointer(base, p.field)
- if structPointer_IsNil(structp) {
- return 0
- }
-
- // Can the object marshal itself?
- if p.isMarshaler {
- m := structPointer_Interface(structp, p.stype).(Marshaler)
- data, _ := m.Marshal()
- n0 := len(p.tagcode)
- n1 := sizeRawBytes(data)
- return n0 + n1
- }
-
- n0 := len(p.tagcode)
- n1 := size_struct(p.sprop, structp)
- n2 := sizeVarint(uint64(n1)) // size of encoded length
- return n0 + n1 + n2
-}
-
-// Encode a group struct.
-func (o *Buffer) enc_struct_group(p *Properties, base structPointer) error {
- var state errorState
- b := structPointer_GetStructPointer(base, p.field)
- if structPointer_IsNil(b) {
- return ErrNil
- }
-
- o.EncodeVarint(uint64((p.Tag << 3) | WireStartGroup))
- err := o.enc_struct(p.sprop, b)
- if err != nil && !state.shouldContinue(err, nil) {
- return err
- }
- o.EncodeVarint(uint64((p.Tag << 3) | WireEndGroup))
- return state.err
-}
-
-func size_struct_group(p *Properties, base structPointer) (n int) {
- b := structPointer_GetStructPointer(base, p.field)
- if structPointer_IsNil(b) {
- return 0
- }
-
- n += sizeVarint(uint64((p.Tag << 3) | WireStartGroup))
- n += size_struct(p.sprop, b)
- n += sizeVarint(uint64((p.Tag << 3) | WireEndGroup))
- return
-}
-
-// Encode a slice of bools ([]bool).
-func (o *Buffer) enc_slice_bool(p *Properties, base structPointer) error {
- s := *structPointer_BoolSlice(base, p.field)
- l := len(s)
- if l == 0 {
- return ErrNil
- }
- for _, x := range s {
- o.buf = append(o.buf, p.tagcode...)
- v := uint64(0)
- if x {
- v = 1
- }
- p.valEnc(o, v)
- }
- return nil
-}
-
-func size_slice_bool(p *Properties, base structPointer) int {
- s := *structPointer_BoolSlice(base, p.field)
- l := len(s)
- if l == 0 {
- return 0
- }
- return l * (len(p.tagcode) + 1) // each bool takes exactly one byte
-}
-
-// Encode a slice of bools ([]bool) in packed format.
-func (o *Buffer) enc_slice_packed_bool(p *Properties, base structPointer) error {
- s := *structPointer_BoolSlice(base, p.field)
- l := len(s)
- if l == 0 {
- return ErrNil
- }
- o.buf = append(o.buf, p.tagcode...)
- o.EncodeVarint(uint64(l)) // each bool takes exactly one byte
- for _, x := range s {
- v := uint64(0)
- if x {
- v = 1
- }
- p.valEnc(o, v)
- }
- return nil
-}
-
-func size_slice_packed_bool(p *Properties, base structPointer) (n int) {
- s := *structPointer_BoolSlice(base, p.field)
- l := len(s)
- if l == 0 {
- return 0
- }
- n += len(p.tagcode)
- n += sizeVarint(uint64(l))
- n += l // each bool takes exactly one byte
- return
-}
-
-// Encode a slice of bytes ([]byte).
-func (o *Buffer) enc_slice_byte(p *Properties, base structPointer) error {
- s := *structPointer_Bytes(base, p.field)
- if s == nil {
- return ErrNil
- }
- o.buf = append(o.buf, p.tagcode...)
- o.EncodeRawBytes(s)
- return nil
-}
-
-func (o *Buffer) enc_proto3_slice_byte(p *Properties, base structPointer) error {
- s := *structPointer_Bytes(base, p.field)
- if len(s) == 0 {
- return ErrNil
- }
- o.buf = append(o.buf, p.tagcode...)
- o.EncodeRawBytes(s)
- return nil
-}
-
-func size_slice_byte(p *Properties, base structPointer) (n int) {
- s := *structPointer_Bytes(base, p.field)
- if s == nil && !p.oneof {
- return 0
- }
- n += len(p.tagcode)
- n += sizeRawBytes(s)
- return
-}
-
-func size_proto3_slice_byte(p *Properties, base structPointer) (n int) {
- s := *structPointer_Bytes(base, p.field)
- if len(s) == 0 && !p.oneof {
- return 0
- }
- n += len(p.tagcode)
- n += sizeRawBytes(s)
- return
-}
-
-// Encode a slice of int32s ([]int32).
-func (o *Buffer) enc_slice_int32(p *Properties, base structPointer) error {
- s := structPointer_Word32Slice(base, p.field)
- l := s.Len()
- if l == 0 {
- return ErrNil
- }
- for i := 0; i < l; i++ {
- o.buf = append(o.buf, p.tagcode...)
- x := int32(s.Index(i)) // permit sign extension to use full 64-bit range
- p.valEnc(o, uint64(x))
- }
- return nil
-}
-
-func size_slice_int32(p *Properties, base structPointer) (n int) {
- s := structPointer_Word32Slice(base, p.field)
- l := s.Len()
- if l == 0 {
- return 0
- }
- for i := 0; i < l; i++ {
- n += len(p.tagcode)
- x := int32(s.Index(i)) // permit sign extension to use full 64-bit range
- n += p.valSize(uint64(x))
- }
- return
-}
-
-// Encode a slice of int32s ([]int32) in packed format.
-func (o *Buffer) enc_slice_packed_int32(p *Properties, base structPointer) error {
- s := structPointer_Word32Slice(base, p.field)
- l := s.Len()
- if l == 0 {
- return ErrNil
- }
- // TODO: Reuse a Buffer.
- buf := NewBuffer(nil)
- for i := 0; i < l; i++ {
- x := int32(s.Index(i)) // permit sign extension to use full 64-bit range
- p.valEnc(buf, uint64(x))
- }
-
- o.buf = append(o.buf, p.tagcode...)
- o.EncodeVarint(uint64(len(buf.buf)))
- o.buf = append(o.buf, buf.buf...)
- return nil
-}
-
-func size_slice_packed_int32(p *Properties, base structPointer) (n int) {
- s := structPointer_Word32Slice(base, p.field)
- l := s.Len()
- if l == 0 {
- return 0
- }
- var bufSize int
- for i := 0; i < l; i++ {
- x := int32(s.Index(i)) // permit sign extension to use full 64-bit range
- bufSize += p.valSize(uint64(x))
- }
-
- n += len(p.tagcode)
- n += sizeVarint(uint64(bufSize))
- n += bufSize
- return
-}
-
-// Encode a slice of uint32s ([]uint32).
-// Exactly the same as int32, except for no sign extension.
-func (o *Buffer) enc_slice_uint32(p *Properties, base structPointer) error {
- s := structPointer_Word32Slice(base, p.field)
- l := s.Len()
- if l == 0 {
- return ErrNil
- }
- for i := 0; i < l; i++ {
- o.buf = append(o.buf, p.tagcode...)
- x := s.Index(i)
- p.valEnc(o, uint64(x))
- }
- return nil
-}
-
-func size_slice_uint32(p *Properties, base structPointer) (n int) {
- s := structPointer_Word32Slice(base, p.field)
- l := s.Len()
- if l == 0 {
- return 0
- }
- for i := 0; i < l; i++ {
- n += len(p.tagcode)
- x := s.Index(i)
- n += p.valSize(uint64(x))
- }
- return
-}
-
-// Encode a slice of uint32s ([]uint32) in packed format.
-// Exactly the same as int32, except for no sign extension.
-func (o *Buffer) enc_slice_packed_uint32(p *Properties, base structPointer) error {
- s := structPointer_Word32Slice(base, p.field)
- l := s.Len()
- if l == 0 {
- return ErrNil
- }
- // TODO: Reuse a Buffer.
- buf := NewBuffer(nil)
- for i := 0; i < l; i++ {
- p.valEnc(buf, uint64(s.Index(i)))
- }
-
- o.buf = append(o.buf, p.tagcode...)
- o.EncodeVarint(uint64(len(buf.buf)))
- o.buf = append(o.buf, buf.buf...)
- return nil
-}
-
-func size_slice_packed_uint32(p *Properties, base structPointer) (n int) {
- s := structPointer_Word32Slice(base, p.field)
- l := s.Len()
- if l == 0 {
- return 0
- }
- var bufSize int
- for i := 0; i < l; i++ {
- bufSize += p.valSize(uint64(s.Index(i)))
- }
-
- n += len(p.tagcode)
- n += sizeVarint(uint64(bufSize))
- n += bufSize
- return
-}
-
-// Encode a slice of int64s ([]int64).
-func (o *Buffer) enc_slice_int64(p *Properties, base structPointer) error {
- s := structPointer_Word64Slice(base, p.field)
- l := s.Len()
- if l == 0 {
- return ErrNil
- }
- for i := 0; i < l; i++ {
- o.buf = append(o.buf, p.tagcode...)
- p.valEnc(o, s.Index(i))
- }
- return nil
-}
-
-func size_slice_int64(p *Properties, base structPointer) (n int) {
- s := structPointer_Word64Slice(base, p.field)
- l := s.Len()
- if l == 0 {
- return 0
- }
- for i := 0; i < l; i++ {
- n += len(p.tagcode)
- n += p.valSize(s.Index(i))
- }
- return
-}
-
-// Encode a slice of int64s ([]int64) in packed format.
-func (o *Buffer) enc_slice_packed_int64(p *Properties, base structPointer) error {
- s := structPointer_Word64Slice(base, p.field)
- l := s.Len()
- if l == 0 {
- return ErrNil
- }
- // TODO: Reuse a Buffer.
- buf := NewBuffer(nil)
- for i := 0; i < l; i++ {
- p.valEnc(buf, s.Index(i))
- }
-
- o.buf = append(o.buf, p.tagcode...)
- o.EncodeVarint(uint64(len(buf.buf)))
- o.buf = append(o.buf, buf.buf...)
- return nil
-}
-
-func size_slice_packed_int64(p *Properties, base structPointer) (n int) {
- s := structPointer_Word64Slice(base, p.field)
- l := s.Len()
- if l == 0 {
- return 0
- }
- var bufSize int
- for i := 0; i < l; i++ {
- bufSize += p.valSize(s.Index(i))
- }
-
- n += len(p.tagcode)
- n += sizeVarint(uint64(bufSize))
- n += bufSize
- return
-}
-
-// Encode a slice of slice of bytes ([][]byte).
-func (o *Buffer) enc_slice_slice_byte(p *Properties, base structPointer) error {
- ss := *structPointer_BytesSlice(base, p.field)
- l := len(ss)
- if l == 0 {
- return ErrNil
- }
- for i := 0; i < l; i++ {
- o.buf = append(o.buf, p.tagcode...)
- o.EncodeRawBytes(ss[i])
- }
- return nil
-}
-
-func size_slice_slice_byte(p *Properties, base structPointer) (n int) {
- ss := *structPointer_BytesSlice(base, p.field)
- l := len(ss)
- if l == 0 {
- return 0
- }
- n += l * len(p.tagcode)
- for i := 0; i < l; i++ {
- n += sizeRawBytes(ss[i])
- }
- return
-}
-
-// Encode a slice of strings ([]string).
-func (o *Buffer) enc_slice_string(p *Properties, base structPointer) error {
- ss := *structPointer_StringSlice(base, p.field)
- l := len(ss)
- for i := 0; i < l; i++ {
- o.buf = append(o.buf, p.tagcode...)
- o.EncodeStringBytes(ss[i])
- }
- return nil
-}
-
-func size_slice_string(p *Properties, base structPointer) (n int) {
- ss := *structPointer_StringSlice(base, p.field)
- l := len(ss)
- n += l * len(p.tagcode)
- for i := 0; i < l; i++ {
- n += sizeStringBytes(ss[i])
- }
- return
-}
-
-// Encode a slice of message structs ([]*struct).
-func (o *Buffer) enc_slice_struct_message(p *Properties, base structPointer) error {
- var state errorState
- s := structPointer_StructPointerSlice(base, p.field)
- l := s.Len()
-
- for i := 0; i < l; i++ {
- structp := s.Index(i)
- if structPointer_IsNil(structp) {
- return errRepeatedHasNil
- }
-
- // Can the object marshal itself?
- if p.isMarshaler {
- m := structPointer_Interface(structp, p.stype).(Marshaler)
- data, err := m.Marshal()
- if err != nil && !state.shouldContinue(err, nil) {
- return err
- }
- o.buf = append(o.buf, p.tagcode...)
- o.EncodeRawBytes(data)
- continue
- }
-
- o.buf = append(o.buf, p.tagcode...)
- err := o.enc_len_struct(p.sprop, structp, &state)
- if err != nil && !state.shouldContinue(err, nil) {
- if err == ErrNil {
- return errRepeatedHasNil
- }
- return err
- }
- }
- return state.err
-}
-
-func size_slice_struct_message(p *Properties, base structPointer) (n int) {
- s := structPointer_StructPointerSlice(base, p.field)
- l := s.Len()
- n += l * len(p.tagcode)
- for i := 0; i < l; i++ {
- structp := s.Index(i)
- if structPointer_IsNil(structp) {
- return // return the size up to this point
- }
-
- // Can the object marshal itself?
- if p.isMarshaler {
- m := structPointer_Interface(structp, p.stype).(Marshaler)
- data, _ := m.Marshal()
- n += sizeRawBytes(data)
- continue
- }
-
- n0 := size_struct(p.sprop, structp)
- n1 := sizeVarint(uint64(n0)) // size of encoded length
- n += n0 + n1
- }
- return
-}
-
-// Encode a slice of group structs ([]*struct).
-func (o *Buffer) enc_slice_struct_group(p *Properties, base structPointer) error {
- var state errorState
- s := structPointer_StructPointerSlice(base, p.field)
- l := s.Len()
-
- for i := 0; i < l; i++ {
- b := s.Index(i)
- if structPointer_IsNil(b) {
- return errRepeatedHasNil
- }
-
- o.EncodeVarint(uint64((p.Tag << 3) | WireStartGroup))
-
- err := o.enc_struct(p.sprop, b)
-
- if err != nil && !state.shouldContinue(err, nil) {
- if err == ErrNil {
- return errRepeatedHasNil
- }
- return err
- }
-
- o.EncodeVarint(uint64((p.Tag << 3) | WireEndGroup))
- }
- return state.err
-}
-
-func size_slice_struct_group(p *Properties, base structPointer) (n int) {
- s := structPointer_StructPointerSlice(base, p.field)
- l := s.Len()
-
- n += l * sizeVarint(uint64((p.Tag<<3)|WireStartGroup))
- n += l * sizeVarint(uint64((p.Tag<<3)|WireEndGroup))
- for i := 0; i < l; i++ {
- b := s.Index(i)
- if structPointer_IsNil(b) {
- return // return size up to this point
- }
-
- n += size_struct(p.sprop, b)
- }
- return
-}
-
-// Encode an extension map.
-func (o *Buffer) enc_map(p *Properties, base structPointer) error {
- exts := structPointer_ExtMap(base, p.field)
- if err := encodeExtensionsMap(*exts); err != nil {
- return err
- }
-
- return o.enc_map_body(*exts)
-}
-
-func (o *Buffer) enc_exts(p *Properties, base structPointer) error {
- exts := structPointer_Extensions(base, p.field)
-
- v, mu := exts.extensionsRead()
- if v == nil {
- return nil
- }
-
- mu.Lock()
- defer mu.Unlock()
- if err := encodeExtensionsMap(v); err != nil {
- return err
- }
-
- return o.enc_map_body(v)
-}
-
-func (o *Buffer) enc_map_body(v map[int32]Extension) error {
- // Fast-path for common cases: zero or one extensions.
- if len(v) <= 1 {
- for _, e := range v {
- o.buf = append(o.buf, e.enc...)
- }
- return nil
- }
-
- // Sort keys to provide a deterministic encoding.
- keys := make([]int, 0, len(v))
- for k := range v {
- keys = append(keys, int(k))
- }
- sort.Ints(keys)
-
- for _, k := range keys {
- o.buf = append(o.buf, v[int32(k)].enc...)
- }
- return nil
-}
-
-func size_map(p *Properties, base structPointer) int {
- v := structPointer_ExtMap(base, p.field)
- return extensionsMapSize(*v)
-}
-
-func size_exts(p *Properties, base structPointer) int {
- v := structPointer_Extensions(base, p.field)
- return extensionsSize(v)
-}
-
-// Encode a map field.
-func (o *Buffer) enc_new_map(p *Properties, base structPointer) error {
- var state errorState // XXX: or do we need to plumb this through?
-
- /*
- A map defined as
- map map_field = N;
- is encoded in the same way as
- message MapFieldEntry {
- key_type key = 1;
- value_type value = 2;
- }
- repeated MapFieldEntry map_field = N;
- */
-
- v := structPointer_NewAt(base, p.field, p.mtype).Elem() // map[K]V
- if v.Len() == 0 {
- return nil
- }
-
- keycopy, valcopy, keybase, valbase := mapEncodeScratch(p.mtype)
-
- enc := func() error {
- if err := p.mkeyprop.enc(o, p.mkeyprop, keybase); err != nil {
- return err
- }
- if err := p.mvalprop.enc(o, p.mvalprop, valbase); err != nil && err != ErrNil {
- return err
- }
- return nil
- }
-
- // Don't sort map keys. It is not required by the spec, and C++ doesn't do it.
- for _, key := range v.MapKeys() {
- val := v.MapIndex(key)
-
- keycopy.Set(key)
- valcopy.Set(val)
-
- o.buf = append(o.buf, p.tagcode...)
- if err := o.enc_len_thing(enc, &state); err != nil {
- return err
- }
- }
- return nil
-}
-
-func size_new_map(p *Properties, base structPointer) int {
- v := structPointer_NewAt(base, p.field, p.mtype).Elem() // map[K]V
-
- keycopy, valcopy, keybase, valbase := mapEncodeScratch(p.mtype)
-
- n := 0
- for _, key := range v.MapKeys() {
- val := v.MapIndex(key)
- keycopy.Set(key)
- valcopy.Set(val)
-
- // Tag codes for key and val are the responsibility of the sub-sizer.
- keysize := p.mkeyprop.size(p.mkeyprop, keybase)
- valsize := p.mvalprop.size(p.mvalprop, valbase)
- entry := keysize + valsize
- // Add on tag code and length of map entry itself.
- n += len(p.tagcode) + sizeVarint(uint64(entry)) + entry
- }
- return n
-}
-
-// mapEncodeScratch returns a new reflect.Value matching the map's value type,
-// and a structPointer suitable for passing to an encoder or sizer.
-func mapEncodeScratch(mapType reflect.Type) (keycopy, valcopy reflect.Value, keybase, valbase structPointer) {
- // Prepare addressable doubly-indirect placeholders for the key and value types.
- // This is needed because the element-type encoders expect **T, but the map iteration produces T.
-
- keycopy = reflect.New(mapType.Key()).Elem() // addressable K
- keyptr := reflect.New(reflect.PtrTo(keycopy.Type())).Elem() // addressable *K
- keyptr.Set(keycopy.Addr()) //
- keybase = toStructPointer(keyptr.Addr()) // **K
-
- // Value types are more varied and require special handling.
- switch mapType.Elem().Kind() {
- case reflect.Slice:
- // []byte
- var dummy []byte
- valcopy = reflect.ValueOf(&dummy).Elem() // addressable []byte
- valbase = toStructPointer(valcopy.Addr())
- case reflect.Ptr:
- // message; the generated field type is map[K]*Msg (so V is *Msg),
- // so we only need one level of indirection.
- valcopy = reflect.New(mapType.Elem()).Elem() // addressable V
- valbase = toStructPointer(valcopy.Addr())
- default:
- // everything else
- valcopy = reflect.New(mapType.Elem()).Elem() // addressable V
- valptr := reflect.New(reflect.PtrTo(valcopy.Type())).Elem() // addressable *V
- valptr.Set(valcopy.Addr()) //
- valbase = toStructPointer(valptr.Addr()) // **V
- }
- return
-}
-
-// Encode a struct.
-func (o *Buffer) enc_struct(prop *StructProperties, base structPointer) error {
- var state errorState
- // Encode fields in tag order so that decoders may use optimizations
- // that depend on the ordering.
- // https://developers.google.com/protocol-buffers/docs/encoding#order
- for _, i := range prop.order {
- p := prop.Prop[i]
- if p.enc != nil {
- err := p.enc(o, p, base)
- if err != nil {
- if err == ErrNil {
- if p.Required && state.err == nil {
- state.err = &RequiredNotSetError{p.Name}
- }
- } else if err == errRepeatedHasNil {
- // Give more context to nil values in repeated fields.
- return errors.New("repeated field " + p.OrigName + " has nil element")
- } else if !state.shouldContinue(err, p) {
- return err
- }
- }
- if len(o.buf) > maxMarshalSize {
- return ErrTooLarge
- }
- }
- }
-
- // Do oneof fields.
- if prop.oneofMarshaler != nil {
- m := structPointer_Interface(base, prop.stype).(Message)
- if err := prop.oneofMarshaler(m, o); err == ErrNil {
- return errOneofHasNil
- } else if err != nil {
- return err
- }
- }
-
- // Add unrecognized fields at the end.
- if prop.unrecField.IsValid() {
- v := *structPointer_Bytes(base, prop.unrecField)
- if len(o.buf)+len(v) > maxMarshalSize {
- return ErrTooLarge
- }
- if len(v) > 0 {
- o.buf = append(o.buf, v...)
- }
- }
-
- return state.err
-}
-
-func size_struct(prop *StructProperties, base structPointer) (n int) {
- for _, i := range prop.order {
- p := prop.Prop[i]
- if p.size != nil {
- n += p.size(p, base)
- }
- }
-
- // Add unrecognized fields at the end.
- if prop.unrecField.IsValid() {
- v := *structPointer_Bytes(base, prop.unrecField)
- n += len(v)
- }
-
- // Factor in any oneof fields.
- if prop.oneofSizer != nil {
- m := structPointer_Interface(base, prop.stype).(Message)
- n += prop.oneofSizer(m)
- }
-
- return
-}
-
-var zeroes [20]byte // longer than any conceivable sizeVarint
-
-// Encode a struct, preceded by its encoded length (as a varint).
-func (o *Buffer) enc_len_struct(prop *StructProperties, base structPointer, state *errorState) error {
- return o.enc_len_thing(func() error { return o.enc_struct(prop, base) }, state)
-}
-
-// Encode something, preceded by its encoded length (as a varint).
-func (o *Buffer) enc_len_thing(enc func() error, state *errorState) error {
- iLen := len(o.buf)
- o.buf = append(o.buf, 0, 0, 0, 0) // reserve four bytes for length
- iMsg := len(o.buf)
- err := enc()
- if err != nil && !state.shouldContinue(err, nil) {
- return err
- }
- lMsg := len(o.buf) - iMsg
- lLen := sizeVarint(uint64(lMsg))
- switch x := lLen - (iMsg - iLen); {
- case x > 0: // actual length is x bytes larger than the space we reserved
- // Move msg x bytes right.
- o.buf = append(o.buf, zeroes[:x]...)
- copy(o.buf[iMsg+x:], o.buf[iMsg:iMsg+lMsg])
- case x < 0: // actual length is x bytes smaller than the space we reserved
- // Move msg x bytes left.
- copy(o.buf[iMsg+x:], o.buf[iMsg:iMsg+lMsg])
- o.buf = o.buf[:len(o.buf)+x] // x is negative
- }
- // Encode the length in the reserved space.
- o.buf = o.buf[:iLen]
- o.EncodeVarint(uint64(lMsg))
- o.buf = o.buf[:len(o.buf)+lMsg]
- return state.err
-}
-
-// errorState maintains the first error that occurs and updates that error
-// with additional context.
-type errorState struct {
- err error
-}
-
-// shouldContinue reports whether encoding should continue upon encountering the
-// given error. If the error is RequiredNotSetError, shouldContinue returns true
-// and, if this is the first appearance of that error, remembers it for future
-// reporting.
-//
-// If prop is not nil, it may update any error with additional context about the
-// field with the error.
-func (s *errorState) shouldContinue(err error, prop *Properties) bool {
- // Ignore unset required fields.
- reqNotSet, ok := err.(*RequiredNotSetError)
- if !ok {
- return false
- }
- if s.err == nil {
- if prop != nil {
- err = &RequiredNotSetError{prop.Name + "." + reqNotSet.field}
- }
- s.err = err
- }
- return true
-}
diff --git a/vendor/github.com/gogo/protobuf/proto/encode_gogo.go b/vendor/github.com/gogo/protobuf/proto/encode_gogo.go
index 32111b7f4..0f5fb173e 100644
--- a/vendor/github.com/gogo/protobuf/proto/encode_gogo.go
+++ b/vendor/github.com/gogo/protobuf/proto/encode_gogo.go
@@ -3,11 +3,6 @@
// Copyright (c) 2013, The GoGo Authors. All rights reserved.
// http://github.com/gogo/protobuf
//
-// Go support for Protocol Buffers - Google's data interchange format
-//
-// Copyright 2010 The Go Authors. All rights reserved.
-// http://github.com/golang/protobuf/
-//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
@@ -18,9 +13,6 @@
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
@@ -36,315 +28,6 @@
package proto
-import (
- "reflect"
-)
-
func NewRequiredNotSetError(field string) *RequiredNotSetError {
return &RequiredNotSetError{field}
}
-
-type Sizer interface {
- Size() int
-}
-
-func (o *Buffer) enc_ext_slice_byte(p *Properties, base structPointer) error {
- s := *structPointer_Bytes(base, p.field)
- if s == nil {
- return ErrNil
- }
- o.buf = append(o.buf, s...)
- return nil
-}
-
-func size_ext_slice_byte(p *Properties, base structPointer) (n int) {
- s := *structPointer_Bytes(base, p.field)
- if s == nil {
- return 0
- }
- n += len(s)
- return
-}
-
-// Encode a reference to bool pointer.
-func (o *Buffer) enc_ref_bool(p *Properties, base structPointer) error {
- v := *structPointer_BoolVal(base, p.field)
- x := 0
- if v {
- x = 1
- }
- o.buf = append(o.buf, p.tagcode...)
- p.valEnc(o, uint64(x))
- return nil
-}
-
-func size_ref_bool(p *Properties, base structPointer) int {
- return len(p.tagcode) + 1 // each bool takes exactly one byte
-}
-
-// Encode a reference to int32 pointer.
-func (o *Buffer) enc_ref_int32(p *Properties, base structPointer) error {
- v := structPointer_Word32Val(base, p.field)
- x := int32(word32Val_Get(v))
- o.buf = append(o.buf, p.tagcode...)
- p.valEnc(o, uint64(x))
- return nil
-}
-
-func size_ref_int32(p *Properties, base structPointer) (n int) {
- v := structPointer_Word32Val(base, p.field)
- x := int32(word32Val_Get(v))
- n += len(p.tagcode)
- n += p.valSize(uint64(x))
- return
-}
-
-func (o *Buffer) enc_ref_uint32(p *Properties, base structPointer) error {
- v := structPointer_Word32Val(base, p.field)
- x := word32Val_Get(v)
- o.buf = append(o.buf, p.tagcode...)
- p.valEnc(o, uint64(x))
- return nil
-}
-
-func size_ref_uint32(p *Properties, base structPointer) (n int) {
- v := structPointer_Word32Val(base, p.field)
- x := word32Val_Get(v)
- n += len(p.tagcode)
- n += p.valSize(uint64(x))
- return
-}
-
-// Encode a reference to an int64 pointer.
-func (o *Buffer) enc_ref_int64(p *Properties, base structPointer) error {
- v := structPointer_Word64Val(base, p.field)
- x := word64Val_Get(v)
- o.buf = append(o.buf, p.tagcode...)
- p.valEnc(o, x)
- return nil
-}
-
-func size_ref_int64(p *Properties, base structPointer) (n int) {
- v := structPointer_Word64Val(base, p.field)
- x := word64Val_Get(v)
- n += len(p.tagcode)
- n += p.valSize(x)
- return
-}
-
-// Encode a reference to a string pointer.
-func (o *Buffer) enc_ref_string(p *Properties, base structPointer) error {
- v := *structPointer_StringVal(base, p.field)
- o.buf = append(o.buf, p.tagcode...)
- o.EncodeStringBytes(v)
- return nil
-}
-
-func size_ref_string(p *Properties, base structPointer) (n int) {
- v := *structPointer_StringVal(base, p.field)
- n += len(p.tagcode)
- n += sizeStringBytes(v)
- return
-}
-
-// Encode a reference to a message struct.
-func (o *Buffer) enc_ref_struct_message(p *Properties, base structPointer) error {
- var state errorState
- structp := structPointer_GetRefStructPointer(base, p.field)
- if structPointer_IsNil(structp) {
- return ErrNil
- }
-
- // Can the object marshal itself?
- if p.isMarshaler {
- m := structPointer_Interface(structp, p.stype).(Marshaler)
- data, err := m.Marshal()
- if err != nil && !state.shouldContinue(err, nil) {
- return err
- }
- o.buf = append(o.buf, p.tagcode...)
- o.EncodeRawBytes(data)
- return nil
- }
-
- o.buf = append(o.buf, p.tagcode...)
- return o.enc_len_struct(p.sprop, structp, &state)
-}
-
-//TODO this is only copied, please fix this
-func size_ref_struct_message(p *Properties, base structPointer) int {
- structp := structPointer_GetRefStructPointer(base, p.field)
- if structPointer_IsNil(structp) {
- return 0
- }
-
- // Can the object marshal itself?
- if p.isMarshaler {
- m := structPointer_Interface(structp, p.stype).(Marshaler)
- data, _ := m.Marshal()
- n0 := len(p.tagcode)
- n1 := sizeRawBytes(data)
- return n0 + n1
- }
-
- n0 := len(p.tagcode)
- n1 := size_struct(p.sprop, structp)
- n2 := sizeVarint(uint64(n1)) // size of encoded length
- return n0 + n1 + n2
-}
-
-// Encode a slice of references to message struct pointers ([]struct).
-func (o *Buffer) enc_slice_ref_struct_message(p *Properties, base structPointer) error {
- var state errorState
- ss := structPointer_StructRefSlice(base, p.field, p.stype.Size())
- l := ss.Len()
- for i := 0; i < l; i++ {
- structp := ss.Index(i)
- if structPointer_IsNil(structp) {
- return errRepeatedHasNil
- }
-
- // Can the object marshal itself?
- if p.isMarshaler {
- m := structPointer_Interface(structp, p.stype).(Marshaler)
- data, err := m.Marshal()
- if err != nil && !state.shouldContinue(err, nil) {
- return err
- }
- o.buf = append(o.buf, p.tagcode...)
- o.EncodeRawBytes(data)
- continue
- }
-
- o.buf = append(o.buf, p.tagcode...)
- err := o.enc_len_struct(p.sprop, structp, &state)
- if err != nil && !state.shouldContinue(err, nil) {
- if err == ErrNil {
- return errRepeatedHasNil
- }
- return err
- }
-
- }
- return state.err
-}
-
-//TODO this is only copied, please fix this
-func size_slice_ref_struct_message(p *Properties, base structPointer) (n int) {
- ss := structPointer_StructRefSlice(base, p.field, p.stype.Size())
- l := ss.Len()
- n += l * len(p.tagcode)
- for i := 0; i < l; i++ {
- structp := ss.Index(i)
- if structPointer_IsNil(structp) {
- return // return the size up to this point
- }
-
- // Can the object marshal itself?
- if p.isMarshaler {
- m := structPointer_Interface(structp, p.stype).(Marshaler)
- data, _ := m.Marshal()
- n += len(p.tagcode)
- n += sizeRawBytes(data)
- continue
- }
-
- n0 := size_struct(p.sprop, structp)
- n1 := sizeVarint(uint64(n0)) // size of encoded length
- n += n0 + n1
- }
- return
-}
-
-func (o *Buffer) enc_custom_bytes(p *Properties, base structPointer) error {
- i := structPointer_InterfaceRef(base, p.field, p.ctype)
- if i == nil {
- return ErrNil
- }
- custom := i.(Marshaler)
- data, err := custom.Marshal()
- if err != nil {
- return err
- }
- if data == nil {
- return ErrNil
- }
- o.buf = append(o.buf, p.tagcode...)
- o.EncodeRawBytes(data)
- return nil
-}
-
-func size_custom_bytes(p *Properties, base structPointer) (n int) {
- n += len(p.tagcode)
- i := structPointer_InterfaceRef(base, p.field, p.ctype)
- if i == nil {
- return 0
- }
- custom := i.(Marshaler)
- data, _ := custom.Marshal()
- n += sizeRawBytes(data)
- return
-}
-
-func (o *Buffer) enc_custom_ref_bytes(p *Properties, base structPointer) error {
- custom := structPointer_InterfaceAt(base, p.field, p.ctype).(Marshaler)
- data, err := custom.Marshal()
- if err != nil {
- return err
- }
- if data == nil {
- return ErrNil
- }
- o.buf = append(o.buf, p.tagcode...)
- o.EncodeRawBytes(data)
- return nil
-}
-
-func size_custom_ref_bytes(p *Properties, base structPointer) (n int) {
- n += len(p.tagcode)
- i := structPointer_InterfaceAt(base, p.field, p.ctype)
- if i == nil {
- return 0
- }
- custom := i.(Marshaler)
- data, _ := custom.Marshal()
- n += sizeRawBytes(data)
- return
-}
-
-func (o *Buffer) enc_custom_slice_bytes(p *Properties, base structPointer) error {
- inter := structPointer_InterfaceRef(base, p.field, p.ctype)
- if inter == nil {
- return ErrNil
- }
- slice := reflect.ValueOf(inter)
- l := slice.Len()
- for i := 0; i < l; i++ {
- v := slice.Index(i)
- custom := v.Interface().(Marshaler)
- data, err := custom.Marshal()
- if err != nil {
- return err
- }
- o.buf = append(o.buf, p.tagcode...)
- o.EncodeRawBytes(data)
- }
- return nil
-}
-
-func size_custom_slice_bytes(p *Properties, base structPointer) (n int) {
- inter := structPointer_InterfaceRef(base, p.field, p.ctype)
- if inter == nil {
- return 0
- }
- slice := reflect.ValueOf(inter)
- l := slice.Len()
- n += l * len(p.tagcode)
- for i := 0; i < l; i++ {
- v := slice.Index(i)
- custom := v.Interface().(Marshaler)
- data, _ := custom.Marshal()
- n += sizeRawBytes(data)
- }
- return
-}
diff --git a/vendor/github.com/gogo/protobuf/proto/equal.go b/vendor/github.com/gogo/protobuf/proto/equal.go
index 2ed1cf596..d4db5a1c1 100644
--- a/vendor/github.com/gogo/protobuf/proto/equal.go
+++ b/vendor/github.com/gogo/protobuf/proto/equal.go
@@ -109,15 +109,6 @@ func equalStruct(v1, v2 reflect.Value) bool {
// set/unset mismatch
return false
}
- b1, ok := f1.Interface().(raw)
- if ok {
- b2 := f2.Interface().(raw)
- // RawMessage
- if !bytes.Equal(b1.Bytes(), b2.Bytes()) {
- return false
- }
- continue
- }
f1, f2 = f1.Elem(), f2.Elem()
}
if !equalAny(f1, f2, sprop.Prop[i]) {
@@ -146,11 +137,7 @@ func equalStruct(v1, v2 reflect.Value) bool {
u1 := uf.Bytes()
u2 := v2.FieldByName("XXX_unrecognized").Bytes()
- if !bytes.Equal(u1, u2) {
- return false
- }
-
- return true
+ return bytes.Equal(u1, u2)
}
// v1 and v2 are known to have the same type.
@@ -261,6 +248,15 @@ func equalExtMap(base reflect.Type, em1, em2 map[int32]Extension) bool {
m1, m2 := e1.value, e2.value
+ if m1 == nil && m2 == nil {
+ // Both have only encoded form.
+ if bytes.Equal(e1.enc, e2.enc) {
+ continue
+ }
+ // The bytes are different, but the extensions might still be
+ // equal. We need to decode them to compare.
+ }
+
if m1 != nil && m2 != nil {
// Both are unencoded.
if !equalAny(reflect.ValueOf(m1), reflect.ValueOf(m2), nil) {
@@ -276,8 +272,12 @@ func equalExtMap(base reflect.Type, em1, em2 map[int32]Extension) bool {
desc = m[extNum]
}
if desc == nil {
+ // If both have only encoded form and the bytes are the same,
+ // it is handled above. We get here when the bytes are different.
+ // We don't know how to decode it, so just compare them as byte
+ // slices.
log.Printf("proto: don't know how to compare extension %d of %v", extNum, base)
- continue
+ return false
}
var err error
if m1 == nil {
diff --git a/vendor/github.com/gogo/protobuf/proto/extensions.go b/vendor/github.com/gogo/protobuf/proto/extensions.go
index 0dfcb538e..686bd2a09 100644
--- a/vendor/github.com/gogo/protobuf/proto/extensions.go
+++ b/vendor/github.com/gogo/protobuf/proto/extensions.go
@@ -38,6 +38,7 @@ package proto
import (
"errors"
"fmt"
+ "io"
"reflect"
"strconv"
"sync"
@@ -69,12 +70,6 @@ type extendableProtoV1 interface {
ExtensionMap() map[int32]Extension
}
-type extensionsBytes interface {
- Message
- ExtensionRangeArray() []ExtensionRange
- GetExtensions() *[]byte
-}
-
// extensionAdapter is a wrapper around extendableProtoV1 that implements extendableProto.
type extensionAdapter struct {
extendableProtoV1
@@ -97,14 +92,31 @@ func (n notLocker) Unlock() {}
// extendable returns the extendableProto interface for the given generated proto message.
// If the proto message has the old extension format, it returns a wrapper that implements
// the extendableProto interface.
-func extendable(p interface{}) (extendableProto, bool) {
- if ep, ok := p.(extendableProto); ok {
- return ep, ok
+func extendable(p interface{}) (extendableProto, error) {
+ switch p := p.(type) {
+ case extendableProto:
+ if isNilPtr(p) {
+ return nil, fmt.Errorf("proto: nil %T is not extendable", p)
+ }
+ return p, nil
+ case extendableProtoV1:
+ if isNilPtr(p) {
+ return nil, fmt.Errorf("proto: nil %T is not extendable", p)
+ }
+ return extensionAdapter{p}, nil
+ case extensionsBytes:
+ return slowExtensionAdapter{p}, nil
}
- if ep, ok := p.(extendableProtoV1); ok {
- return extensionAdapter{ep}, ok
- }
- return nil, false
+ // Don't allocate a specific error containing %T:
+ // this is the hot path for Clone and MarshalText.
+ return nil, errNotExtendable
+}
+
+var errNotExtendable = errors.New("proto: not an extendable proto.Message")
+
+func isNilPtr(x interface{}) bool {
+ v := reflect.ValueOf(x)
+ return v.Kind() == reflect.Ptr && v.IsNil()
}
// XXX_InternalExtensions is an internal representation of proto extensions.
@@ -149,16 +161,6 @@ func (e *XXX_InternalExtensions) extensionsRead() (map[int32]Extension, sync.Loc
return e.p.extensionMap, &e.p.mu
}
-type extensionRange interface {
- Message
- ExtensionRangeArray() []ExtensionRange
-}
-
-var extendableProtoType = reflect.TypeOf((*extendableProto)(nil)).Elem()
-var extendableProtoV1Type = reflect.TypeOf((*extendableProtoV1)(nil)).Elem()
-var extendableBytesType = reflect.TypeOf((*extensionsBytes)(nil)).Elem()
-var extensionRangeType = reflect.TypeOf((*extensionRange)(nil)).Elem()
-
// ExtensionDesc represents an extension specification.
// Used in generated code from the protocol compiler.
type ExtensionDesc struct {
@@ -198,8 +200,8 @@ func SetRawExtension(base Message, id int32, b []byte) {
*ext = append(*ext, b...)
return
}
- epb, ok := extendable(base)
- if !ok {
+ epb, err := extendable(base)
+ if err != nil {
return
}
extmap := epb.extensionsWrite()
@@ -207,7 +209,7 @@ func SetRawExtension(base Message, id int32, b []byte) {
}
// isExtensionField returns true iff the given field number is in an extension range.
-func isExtensionField(pb extensionRange, field int32) bool {
+func isExtensionField(pb extendableProto, field int32) bool {
for _, er := range pb.ExtensionRangeArray() {
if er.Start <= field && field <= er.End {
return true
@@ -223,8 +225,11 @@ func checkExtensionTypes(pb extendableProto, extension *ExtensionDesc) error {
if ea, ok := pbi.(extensionAdapter); ok {
pbi = ea.extendableProtoV1
}
+ if ea, ok := pbi.(slowExtensionAdapter); ok {
+ pbi = ea.extensionsBytes
+ }
if a, b := reflect.TypeOf(pbi), reflect.TypeOf(extension.ExtendedType); a != b {
- return errors.New("proto: bad extended type; " + b.String() + " does not extend " + a.String())
+ return fmt.Errorf("proto: bad extended type; %v does not extend %v", b, a)
}
// Check the range.
if !isExtensionField(pb, extension.Field) {
@@ -269,80 +274,6 @@ func extensionProperties(ed *ExtensionDesc) *Properties {
return prop
}
-// encode encodes any unmarshaled (unencoded) extensions in e.
-func encodeExtensions(e *XXX_InternalExtensions) error {
- m, mu := e.extensionsRead()
- if m == nil {
- return nil // fast path
- }
- mu.Lock()
- defer mu.Unlock()
- return encodeExtensionsMap(m)
-}
-
-// encode encodes any unmarshaled (unencoded) extensions in e.
-func encodeExtensionsMap(m map[int32]Extension) error {
- for k, e := range m {
- if e.value == nil || e.desc == nil {
- // Extension is only in its encoded form.
- continue
- }
-
- // We don't skip extensions that have an encoded form set,
- // because the extension value may have been mutated after
- // the last time this function was called.
-
- et := reflect.TypeOf(e.desc.ExtensionType)
- props := extensionProperties(e.desc)
-
- p := NewBuffer(nil)
- // If e.value has type T, the encoder expects a *struct{ X T }.
- // Pass a *T with a zero field and hope it all works out.
- x := reflect.New(et)
- x.Elem().Set(reflect.ValueOf(e.value))
- if err := props.enc(p, props, toStructPointer(x)); err != nil {
- return err
- }
- e.enc = p.buf
- m[k] = e
- }
- return nil
-}
-
-func extensionsSize(e *XXX_InternalExtensions) (n int) {
- m, mu := e.extensionsRead()
- if m == nil {
- return 0
- }
- mu.Lock()
- defer mu.Unlock()
- return extensionsMapSize(m)
-}
-
-func extensionsMapSize(m map[int32]Extension) (n int) {
- for _, e := range m {
- if e.value == nil || e.desc == nil {
- // Extension is only in its encoded form.
- n += len(e.enc)
- continue
- }
-
- // We don't skip extensions that have an encoded form set,
- // because the extension value may have been mutated after
- // the last time this function was called.
-
- et := reflect.TypeOf(e.desc.ExtensionType)
- props := extensionProperties(e.desc)
-
- // If e.value has type T, the encoder expects a *struct{ X T }.
- // Pass a *T with a zero field and hope it all works out.
- x := reflect.New(et)
- x.Elem().Set(reflect.ValueOf(e.value))
- n += props.size(props, toStructPointer(x))
- }
- return
-}
-
// HasExtension returns whether the given extension is present in pb.
func HasExtension(pb Message, extension *ExtensionDesc) bool {
if epb, doki := pb.(extensionsBytes); doki {
@@ -366,8 +297,8 @@ func HasExtension(pb Message, extension *ExtensionDesc) bool {
return false
}
// TODO: Check types, field numbers, etc.?
- epb, ok := extendable(pb)
- if !ok {
+ epb, err := extendable(pb)
+ if err != nil {
return false
}
extmap, mu := epb.extensionsRead()
@@ -375,46 +306,26 @@ func HasExtension(pb Message, extension *ExtensionDesc) bool {
return false
}
mu.Lock()
- _, ok = extmap[extension.Field]
+ _, ok := extmap[extension.Field]
mu.Unlock()
return ok
}
-func deleteExtension(pb extensionsBytes, theFieldNum int32, offset int) int {
- ext := pb.GetExtensions()
- for offset < len(*ext) {
- tag, n1 := DecodeVarint((*ext)[offset:])
- fieldNum := int32(tag >> 3)
- wireType := int(tag & 0x7)
- n2, err := size((*ext)[offset+n1:], wireType)
- if err != nil {
- panic(err)
- }
- newOffset := offset + n1 + n2
- if fieldNum == theFieldNum {
- *ext = append((*ext)[:offset], (*ext)[newOffset:]...)
- return offset
- }
- offset = newOffset
- }
- return -1
-}
-
// ClearExtension removes the given extension from pb.
func ClearExtension(pb Message, extension *ExtensionDesc) {
clearExtension(pb, extension.Field)
}
func clearExtension(pb Message, fieldNum int32) {
- if epb, doki := pb.(extensionsBytes); doki {
+ if epb, ok := pb.(extensionsBytes); ok {
offset := 0
for offset != -1 {
offset = deleteExtension(epb, fieldNum, offset)
}
return
}
- epb, ok := extendable(pb)
- if !ok {
+ epb, err := extendable(pb)
+ if err != nil {
return
}
// TODO: Check types, field numbers, etc.?
@@ -422,39 +333,33 @@ func clearExtension(pb Message, fieldNum int32) {
delete(extmap, fieldNum)
}
-// GetExtension parses and returns the given extension of pb.
-// If the extension is not present and has no default value it returns ErrMissingExtension.
+// GetExtension retrieves a proto2 extended field from pb.
+//
+// If the descriptor is type complete (i.e., ExtensionDesc.ExtensionType is non-nil),
+// then GetExtension parses the encoded field and returns a Go value of the specified type.
+// If the field is not present, then the default value is returned (if one is specified),
+// otherwise ErrMissingExtension is reported.
+//
+// If the descriptor is not type complete (i.e., ExtensionDesc.ExtensionType is nil),
+// then GetExtension returns the raw encoded bytes of the field extension.
func GetExtension(pb Message, extension *ExtensionDesc) (interface{}, error) {
if epb, doki := pb.(extensionsBytes); doki {
ext := epb.GetExtensions()
- o := 0
- for o < len(*ext) {
- tag, n := DecodeVarint((*ext)[o:])
- fieldNum := int32(tag >> 3)
- wireType := int(tag & 0x7)
- l, err := size((*ext)[o+n:], wireType)
- if err != nil {
- return nil, err
- }
- if int32(fieldNum) == extension.Field {
- v, err := decodeExtension((*ext)[o:o+n+l], extension)
- if err != nil {
- return nil, err
- }
- return v, nil
- }
- o += n + l
- }
- return defaultExtensionValue(extension)
+ return decodeExtensionFromBytes(extension, *ext)
}
- epb, ok := extendable(pb)
- if !ok {
- return nil, errors.New("proto: not an extendable proto")
- }
- if err := checkExtensionTypes(epb, extension); err != nil {
+
+ epb, err := extendable(pb)
+ if err != nil {
return nil, err
}
+ if extension.ExtendedType != nil {
+ // can only check type if this is a complete descriptor
+ if cerr := checkExtensionTypes(epb, extension); cerr != nil {
+ return nil, cerr
+ }
+ }
+
emap, mu := epb.extensionsRead()
if emap == nil {
return defaultExtensionValue(extension)
@@ -479,6 +384,11 @@ func GetExtension(pb Message, extension *ExtensionDesc) (interface{}, error) {
return e.value, nil
}
+ if extension.ExtensionType == nil {
+ // incomplete descriptor
+ return e.enc, nil
+ }
+
v, err := decodeExtension(e.enc, extension)
if err != nil {
return nil, err
@@ -496,6 +406,11 @@ func GetExtension(pb Message, extension *ExtensionDesc) (interface{}, error) {
// defaultExtensionValue returns the default value for extension.
// If no default for an extension is defined ErrMissingExtension is returned.
func defaultExtensionValue(extension *ExtensionDesc) (interface{}, error) {
+ if extension.ExtensionType == nil {
+ // incomplete descriptor, so no default
+ return nil, ErrMissingExtension
+ }
+
t := reflect.TypeOf(extension.ExtensionType)
props := extensionProperties(extension)
@@ -530,31 +445,28 @@ func defaultExtensionValue(extension *ExtensionDesc) (interface{}, error) {
// decodeExtension decodes an extension encoded in b.
func decodeExtension(b []byte, extension *ExtensionDesc) (interface{}, error) {
- o := NewBuffer(b)
-
t := reflect.TypeOf(extension.ExtensionType)
-
- props := extensionProperties(extension)
+ unmarshal := typeUnmarshaler(t, extension.Tag)
// t is a pointer to a struct, pointer to basic type or a slice.
- // Allocate a "field" to store the pointer/slice itself; the
- // pointer/slice will be stored here. We pass
- // the address of this field to props.dec.
- // This passes a zero field and a *t and lets props.dec
- // interpret it as a *struct{ x t }.
+ // Allocate space to store the pointer/slice.
value := reflect.New(t).Elem()
+ var err error
for {
- // Discard wire type and field number varint. It isn't needed.
- if _, err := o.DecodeVarint(); err != nil {
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ wire := int(x) & 7
+
+ b, err = unmarshal(b, valToPointer(value.Addr()), wire)
+ if err != nil {
return nil, err
}
- if err := props.dec(o, props, toStructPointer(value.Addr())); err != nil {
- return nil, err
- }
-
- if o.index >= len(o.buf) {
+ if len(b) == 0 {
break
}
}
@@ -564,9 +476,13 @@ func decodeExtension(b []byte, extension *ExtensionDesc) (interface{}, error) {
// GetExtensions returns a slice of the extensions present in pb that are also listed in es.
// The returned slice has the same length as es; missing extensions will appear as nil elements.
func GetExtensions(pb Message, es []*ExtensionDesc) (extensions []interface{}, err error) {
+ epb, err := extendable(pb)
+ if err != nil {
+ return nil, err
+ }
extensions = make([]interface{}, len(es))
for i, e := range es {
- extensions[i], err = GetExtension(pb, e)
+ extensions[i], err = GetExtension(epb, e)
if err == ErrMissingExtension {
err = nil
}
@@ -581,9 +497,9 @@ func GetExtensions(pb Message, es []*ExtensionDesc) (extensions []interface{}, e
// For non-registered extensions, ExtensionDescs returns an incomplete descriptor containing
// just the Field field, which defines the extension's field number.
func ExtensionDescs(pb Message) ([]*ExtensionDesc, error) {
- epb, ok := extendable(pb)
- if !ok {
- return nil, fmt.Errorf("proto: %T is not an extendable proto.Message", pb)
+ epb, err := extendable(pb)
+ if err != nil {
+ return nil, err
}
registeredExtensions := RegisteredExtensions(pb)
@@ -610,30 +526,25 @@ func ExtensionDescs(pb Message) ([]*ExtensionDesc, error) {
// SetExtension sets the specified extension of pb to the specified value.
func SetExtension(pb Message, extension *ExtensionDesc, value interface{}) error {
- if epb, doki := pb.(extensionsBytes); doki {
- ClearExtension(pb, extension)
- ext := epb.GetExtensions()
- et := reflect.TypeOf(extension.ExtensionType)
- props := extensionProperties(extension)
- p := NewBuffer(nil)
- x := reflect.New(et)
- x.Elem().Set(reflect.ValueOf(value))
- if err := props.enc(p, props, toStructPointer(x)); err != nil {
+ if epb, ok := pb.(extensionsBytes); ok {
+ newb, err := encodeExtension(extension, value)
+ if err != nil {
return err
}
- *ext = append(*ext, p.buf...)
+ bb := epb.GetExtensions()
+ *bb = append(*bb, newb...)
return nil
}
- epb, ok := extendable(pb)
- if !ok {
- return errors.New("proto: not an extendable proto")
+ epb, err := extendable(pb)
+ if err != nil {
+ return err
}
if err := checkExtensionTypes(epb, extension); err != nil {
return err
}
typ := reflect.TypeOf(extension.ExtensionType)
if typ != reflect.TypeOf(value) {
- return errors.New("proto: bad extension value type")
+ return fmt.Errorf("proto: bad extension value type. got: %T, want: %T", value, extension.ExtensionType)
}
// nil extension values need to be caught early, because the
// encoder can't distinguish an ErrNil due to a nil extension
@@ -656,8 +567,8 @@ func ClearAllExtensions(pb Message) {
*ext = []byte{}
return
}
- epb, ok := extendable(pb)
- if !ok {
+ epb, err := extendable(pb)
+ if err != nil {
return
}
m := epb.extensionsWrite()
diff --git a/vendor/github.com/gogo/protobuf/proto/extensions_gogo.go b/vendor/github.com/gogo/protobuf/proto/extensions_gogo.go
index ea6478f00..53ebd8cca 100644
--- a/vendor/github.com/gogo/protobuf/proto/extensions_gogo.go
+++ b/vendor/github.com/gogo/protobuf/proto/extensions_gogo.go
@@ -32,12 +32,36 @@ import (
"bytes"
"errors"
"fmt"
+ "io"
"reflect"
"sort"
"strings"
"sync"
)
+type extensionsBytes interface {
+ Message
+ ExtensionRangeArray() []ExtensionRange
+ GetExtensions() *[]byte
+}
+
+type slowExtensionAdapter struct {
+ extensionsBytes
+}
+
+func (s slowExtensionAdapter) extensionsWrite() map[int32]Extension {
+ panic("Please report a bug to github.com/gogo/protobuf if you see this message: Writing extensions is not supported for extensions stored in a byte slice field.")
+}
+
+func (s slowExtensionAdapter) extensionsRead() (map[int32]Extension, sync.Locker) {
+ b := s.GetExtensions()
+ m, err := BytesToExtensionsMap(*b)
+ if err != nil {
+ panic(err)
+ }
+ return m, notLocker{}
+}
+
func GetBoolExtension(pb Message, extension *ExtensionDesc, ifnotset bool) bool {
if reflect.ValueOf(pb).IsNil() {
return ifnotset
@@ -56,19 +80,28 @@ func GetBoolExtension(pb Message, extension *ExtensionDesc, ifnotset bool) bool
}
func (this *Extension) Equal(that *Extension) bool {
+ if err := this.Encode(); err != nil {
+ return false
+ }
+ if err := that.Encode(); err != nil {
+ return false
+ }
return bytes.Equal(this.enc, that.enc)
}
func (this *Extension) Compare(that *Extension) int {
+ if err := this.Encode(); err != nil {
+ return 1
+ }
+ if err := that.Encode(); err != nil {
+ return -1
+ }
return bytes.Compare(this.enc, that.enc)
}
func SizeOfInternalExtension(m extendableProto) (n int) {
- return SizeOfExtensionMap(m.extensionsWrite())
-}
-
-func SizeOfExtensionMap(m map[int32]Extension) (n int) {
- return extensionsMapSize(m)
+ info := getMarshalInfo(reflect.TypeOf(m))
+ return info.sizeV1Extensions(m.extensionsWrite())
}
type sortableMapElem struct {
@@ -122,28 +155,26 @@ func EncodeInternalExtension(m extendableProto, data []byte) (n int, err error)
}
func EncodeExtensionMap(m map[int32]Extension, data []byte) (n int, err error) {
- if err := encodeExtensionsMap(m); err != nil {
- return 0, err
+ o := 0
+ for _, e := range m {
+ if err := e.Encode(); err != nil {
+ return 0, err
+ }
+ n := copy(data[o:], e.enc)
+ if n != len(e.enc) {
+ return 0, io.ErrShortBuffer
+ }
+ o += n
}
- keys := make([]int, 0, len(m))
- for k := range m {
- keys = append(keys, int(k))
- }
- sort.Ints(keys)
- for _, k := range keys {
- n += copy(data[n:], m[int32(k)].enc)
- }
- return n, nil
+ return o, nil
}
func GetRawExtension(m map[int32]Extension, id int32) ([]byte, error) {
- if m[id].value == nil || m[id].desc == nil {
- return m[id].enc, nil
- }
- if err := encodeExtensionsMap(m); err != nil {
+ e := m[id]
+ if err := e.Encode(); err != nil {
return nil, err
}
- return m[id].enc, nil
+ return e.enc, nil
}
func size(buf []byte, wire int) (int, error) {
@@ -218,35 +249,58 @@ func AppendExtension(e Message, tag int32, buf []byte) {
}
}
-func encodeExtension(e *Extension) error {
- if e.value == nil || e.desc == nil {
- // Extension is only in its encoded form.
- return nil
- }
- // We don't skip extensions that have an encoded form set,
- // because the extension value may have been mutated after
- // the last time this function was called.
+func encodeExtension(extension *ExtensionDesc, value interface{}) ([]byte, error) {
+ u := getMarshalInfo(reflect.TypeOf(extension.ExtendedType))
+ ei := u.getExtElemInfo(extension)
+ v := value
+ p := toAddrPointer(&v, ei.isptr)
+ siz := ei.sizer(p, SizeVarint(ei.wiretag))
+ buf := make([]byte, 0, siz)
+ return ei.marshaler(buf, p, ei.wiretag, false)
+}
- et := reflect.TypeOf(e.desc.ExtensionType)
- props := extensionProperties(e.desc)
-
- p := NewBuffer(nil)
- // If e.value has type T, the encoder expects a *struct{ X T }.
- // Pass a *T with a zero field and hope it all works out.
- x := reflect.New(et)
- x.Elem().Set(reflect.ValueOf(e.value))
- if err := props.enc(p, props, toStructPointer(x)); err != nil {
- return err
+func decodeExtensionFromBytes(extension *ExtensionDesc, buf []byte) (interface{}, error) {
+ o := 0
+ for o < len(buf) {
+ tag, n := DecodeVarint((buf)[o:])
+ fieldNum := int32(tag >> 3)
+ wireType := int(tag & 0x7)
+ if o+n > len(buf) {
+ return nil, fmt.Errorf("unable to decode extension")
+ }
+ l, err := size((buf)[o+n:], wireType)
+ if err != nil {
+ return nil, err
+ }
+ if int32(fieldNum) == extension.Field {
+ if o+n+l > len(buf) {
+ return nil, fmt.Errorf("unable to decode extension")
+ }
+ v, err := decodeExtension((buf)[o:o+n+l], extension)
+ if err != nil {
+ return nil, err
+ }
+ return v, nil
+ }
+ o += n + l
+ }
+ return defaultExtensionValue(extension)
+}
+
+func (this *Extension) Encode() error {
+ if this.enc == nil {
+ var err error
+ this.enc, err = encodeExtension(this.desc, this.value)
+ if err != nil {
+ return err
+ }
}
- e.enc = p.buf
return nil
}
func (this Extension) GoString() string {
- if this.enc == nil {
- if err := encodeExtension(&this); err != nil {
- panic(err)
- }
+ if err := this.Encode(); err != nil {
+ return fmt.Sprintf("error encoding extension: %v", err)
}
return fmt.Sprintf("proto.NewExtension(%#v)", this.enc)
}
@@ -292,3 +346,23 @@ func GetUnsafeExtensionsMap(extendable Message) map[int32]Extension {
pb := extendable.(extendableProto)
return pb.extensionsWrite()
}
+
+func deleteExtension(pb extensionsBytes, theFieldNum int32, offset int) int {
+ ext := pb.GetExtensions()
+ for offset < len(*ext) {
+ tag, n1 := DecodeVarint((*ext)[offset:])
+ fieldNum := int32(tag >> 3)
+ wireType := int(tag & 0x7)
+ n2, err := size((*ext)[offset+n1:], wireType)
+ if err != nil {
+ panic(err)
+ }
+ newOffset := offset + n1 + n2
+ if fieldNum == theFieldNum {
+ *ext = append((*ext)[:offset], (*ext)[newOffset:]...)
+ return offset
+ }
+ offset = newOffset
+ }
+ return -1
+}
diff --git a/vendor/github.com/gogo/protobuf/proto/lib.go b/vendor/github.com/gogo/protobuf/proto/lib.go
index c98d73da4..d17f80209 100644
--- a/vendor/github.com/gogo/protobuf/proto/lib.go
+++ b/vendor/github.com/gogo/protobuf/proto/lib.go
@@ -273,6 +273,67 @@ import (
"sync"
)
+// RequiredNotSetError is an error type returned by either Marshal or Unmarshal.
+// Marshal reports this when a required field is not initialized.
+// Unmarshal reports this when a required field is missing from the wire data.
+type RequiredNotSetError struct{ field string }
+
+func (e *RequiredNotSetError) Error() string {
+ if e.field == "" {
+ return fmt.Sprintf("proto: required field not set")
+ }
+ return fmt.Sprintf("proto: required field %q not set", e.field)
+}
+func (e *RequiredNotSetError) RequiredNotSet() bool {
+ return true
+}
+
+type invalidUTF8Error struct{ field string }
+
+func (e *invalidUTF8Error) Error() string {
+ if e.field == "" {
+ return "proto: invalid UTF-8 detected"
+ }
+ return fmt.Sprintf("proto: field %q contains invalid UTF-8", e.field)
+}
+func (e *invalidUTF8Error) InvalidUTF8() bool {
+ return true
+}
+
+// errInvalidUTF8 is a sentinel error to identify fields with invalid UTF-8.
+// This error should not be exposed to the external API as such errors should
+// be recreated with the field information.
+var errInvalidUTF8 = &invalidUTF8Error{}
+
+// isNonFatal reports whether the error is either a RequiredNotSet error
+// or a InvalidUTF8 error.
+func isNonFatal(err error) bool {
+ if re, ok := err.(interface{ RequiredNotSet() bool }); ok && re.RequiredNotSet() {
+ return true
+ }
+ if re, ok := err.(interface{ InvalidUTF8() bool }); ok && re.InvalidUTF8() {
+ return true
+ }
+ return false
+}
+
+type nonFatal struct{ E error }
+
+// Merge merges err into nf and reports whether it was successful.
+// Otherwise it returns false for any fatal non-nil errors.
+func (nf *nonFatal) Merge(err error) (ok bool) {
+ if err == nil {
+ return true // not an error
+ }
+ if !isNonFatal(err) {
+ return false // fatal error
+ }
+ if nf.E == nil {
+ nf.E = err // store first instance of non-fatal error
+ }
+ return true
+}
+
// Message is implemented by generated protocol buffer messages.
type Message interface {
Reset()
@@ -280,26 +341,6 @@ type Message interface {
ProtoMessage()
}
-// Stats records allocation details about the protocol buffer encoders
-// and decoders. Useful for tuning the library itself.
-type Stats struct {
- Emalloc uint64 // mallocs in encode
- Dmalloc uint64 // mallocs in decode
- Encode uint64 // number of encodes
- Decode uint64 // number of decodes
- Chit uint64 // number of cache hits
- Cmiss uint64 // number of cache misses
- Size uint64 // number of sizes
-}
-
-// Set to true to enable stats collection.
-const collectStats = false
-
-var stats Stats
-
-// GetStats returns a copy of the global Stats structure.
-func GetStats() Stats { return stats }
-
// A Buffer is a buffer manager for marshaling and unmarshaling
// protocol buffers. It may be reused between invocations to
// reduce memory usage. It is not necessary to use a Buffer;
@@ -309,16 +350,7 @@ type Buffer struct {
buf []byte // encode/decode byte stream
index int // read point
- // pools of basic types to amortize allocation.
- bools []bool
- uint32s []uint32
- uint64s []uint64
-
- // extra pools, only used with pointer_reflect.go
- int32s []int32
- int64s []int64
- float32s []float32
- float64s []float64
+ deterministic bool
}
// NewBuffer allocates a new Buffer and initializes its internal data to
@@ -343,6 +375,30 @@ func (p *Buffer) SetBuf(s []byte) {
// Bytes returns the contents of the Buffer.
func (p *Buffer) Bytes() []byte { return p.buf }
+// SetDeterministic sets whether to use deterministic serialization.
+//
+// Deterministic serialization guarantees that for a given binary, equal
+// messages will always be serialized to the same bytes. This implies:
+//
+// - Repeated serialization of a message will return the same bytes.
+// - Different processes of the same binary (which may be executing on
+// different machines) will serialize equal messages to the same bytes.
+//
+// Note that the deterministic serialization is NOT canonical across
+// languages. It is not guaranteed to remain stable over time. It is unstable
+// across different builds with schema changes due to unknown fields.
+// Users who need canonical serialization (e.g., persistent storage in a
+// canonical form, fingerprinting, etc.) should define their own
+// canonicalization specification and implement their own serializer rather
+// than relying on this API.
+//
+// If deterministic serialization is requested, map entries will be sorted
+// by keys in lexographical order. This is an implementation detail and
+// subject to change.
+func (p *Buffer) SetDeterministic(deterministic bool) {
+ p.deterministic = deterministic
+}
+
/*
* Helper routines for simplifying the creation of optional fields of basic type.
*/
@@ -552,9 +608,11 @@ func SetDefaults(pb Message) {
setDefaults(reflect.ValueOf(pb), true, false)
}
-// v is a pointer to a struct.
+// v is a struct.
func setDefaults(v reflect.Value, recur, zeros bool) {
- v = v.Elem()
+ if v.Kind() == reflect.Ptr {
+ v = v.Elem()
+ }
defaultMu.RLock()
dm, ok := defaults[v.Type()]
@@ -656,8 +714,11 @@ func setDefaults(v reflect.Value, recur, zeros bool) {
for _, ni := range dm.nested {
f := v.Field(ni)
- // f is *T or []*T or map[T]*T
+ // f is *T or T or []*T or []T
switch f.Kind() {
+ case reflect.Struct:
+ setDefaults(f, recur, zeros)
+
case reflect.Ptr:
if f.IsNil() {
continue
@@ -667,7 +728,7 @@ func setDefaults(v reflect.Value, recur, zeros bool) {
case reflect.Slice:
for i := 0; i < f.Len(); i++ {
e := f.Index(i)
- if e.IsNil() {
+ if e.Kind() == reflect.Ptr && e.IsNil() {
continue
}
setDefaults(e, recur, zeros)
@@ -739,6 +800,9 @@ func buildDefaultMessage(t reflect.Type) (dm defaultMessage) {
func fieldDefault(ft reflect.Type, prop *Properties) (sf *scalarField, nestedMessage bool, err error) {
var canHaveDefault bool
switch ft.Kind() {
+ case reflect.Struct:
+ nestedMessage = true // non-nullable
+
case reflect.Ptr:
if ft.Elem().Kind() == reflect.Struct {
nestedMessage = true
@@ -748,7 +812,7 @@ func fieldDefault(ft reflect.Type, prop *Properties) (sf *scalarField, nestedMes
case reflect.Slice:
switch ft.Elem().Kind() {
- case reflect.Ptr:
+ case reflect.Ptr, reflect.Struct:
nestedMessage = true // repeated message
case reflect.Uint8:
canHaveDefault = true // bytes field
@@ -831,22 +895,12 @@ func fieldDefault(ft reflect.Type, prop *Properties) (sf *scalarField, nestedMes
return sf, false, nil
}
+// mapKeys returns a sort.Interface to be used for sorting the map keys.
// Map fields may have key types of non-float scalars, strings and enums.
-// The easiest way to sort them in some deterministic order is to use fmt.
-// If this turns out to be inefficient we can always consider other options,
-// such as doing a Schwartzian transform.
-
func mapKeys(vs []reflect.Value) sort.Interface {
- s := mapKeySorter{
- vs: vs,
- // default Less function: textual comparison
- less: func(a, b reflect.Value) bool {
- return fmt.Sprint(a.Interface()) < fmt.Sprint(b.Interface())
- },
- }
+ s := mapKeySorter{vs: vs}
- // Type specialization per https://developers.google.com/protocol-buffers/docs/proto#maps;
- // numeric keys are sorted numerically.
+ // Type specialization per https://developers.google.com/protocol-buffers/docs/proto#maps.
if len(vs) == 0 {
return s
}
@@ -855,6 +909,12 @@ func mapKeys(vs []reflect.Value) sort.Interface {
s.less = func(a, b reflect.Value) bool { return a.Int() < b.Int() }
case reflect.Uint32, reflect.Uint64:
s.less = func(a, b reflect.Value) bool { return a.Uint() < b.Uint() }
+ case reflect.Bool:
+ s.less = func(a, b reflect.Value) bool { return !a.Bool() && b.Bool() } // false < true
+ case reflect.String:
+ s.less = func(a, b reflect.Value) bool { return a.String() < b.String() }
+ default:
+ panic(fmt.Sprintf("unsupported map key type: %v", vs[0].Kind()))
}
return s
@@ -895,3 +955,13 @@ const GoGoProtoPackageIsVersion2 = true
// ProtoPackageIsVersion1 is referenced from generated protocol buffer files
// to assert that that code is compatible with this version of the proto package.
const GoGoProtoPackageIsVersion1 = true
+
+// InternalMessageInfo is a type used internally by generated .pb.go files.
+// This type is not intended to be used by non-generated code.
+// This type is not subject to any compatibility guarantee.
+type InternalMessageInfo struct {
+ marshal *marshalInfo
+ unmarshal *unmarshalInfo
+ merge *mergeInfo
+ discard *discardInfo
+}
diff --git a/vendor/github.com/gogo/protobuf/proto/lib_gogo.go b/vendor/github.com/gogo/protobuf/proto/lib_gogo.go
index 4b4f7c909..b3aa39190 100644
--- a/vendor/github.com/gogo/protobuf/proto/lib_gogo.go
+++ b/vendor/github.com/gogo/protobuf/proto/lib_gogo.go
@@ -33,6 +33,14 @@ import (
"strconv"
)
+type Sizer interface {
+ Size() int
+}
+
+type ProtoSizer interface {
+ ProtoSize() int
+}
+
func MarshalJSONEnum(m map[int32]string, value int32) ([]byte, error) {
s, ok := m[value]
if !ok {
diff --git a/vendor/github.com/gogo/protobuf/proto/message_set.go b/vendor/github.com/gogo/protobuf/proto/message_set.go
index fd982decd..f48a75676 100644
--- a/vendor/github.com/gogo/protobuf/proto/message_set.go
+++ b/vendor/github.com/gogo/protobuf/proto/message_set.go
@@ -36,12 +36,7 @@ package proto
*/
import (
- "bytes"
- "encoding/json"
"errors"
- "fmt"
- "reflect"
- "sort"
)
// errNoMessageTypeID occurs when a protocol buffer does not have a message type ID.
@@ -94,10 +89,7 @@ func (ms *messageSet) find(pb Message) *_MessageSet_Item {
}
func (ms *messageSet) Has(pb Message) bool {
- if ms.find(pb) != nil {
- return true
- }
- return false
+ return ms.find(pb) != nil
}
func (ms *messageSet) Unmarshal(pb Message) error {
@@ -147,50 +139,9 @@ func skipVarint(buf []byte) []byte {
return buf[i+1:]
}
-// MarshalMessageSet encodes the extension map represented by m in the message set wire format.
-// It is called by generated Marshal methods on protocol buffer messages with the message_set_wire_format option.
-func MarshalMessageSet(exts interface{}) ([]byte, error) {
- var m map[int32]Extension
- switch exts := exts.(type) {
- case *XXX_InternalExtensions:
- if err := encodeExtensions(exts); err != nil {
- return nil, err
- }
- m, _ = exts.extensionsRead()
- case map[int32]Extension:
- if err := encodeExtensionsMap(exts); err != nil {
- return nil, err
- }
- m = exts
- default:
- return nil, errors.New("proto: not an extension map")
- }
-
- // Sort extension IDs to provide a deterministic encoding.
- // See also enc_map in encode.go.
- ids := make([]int, 0, len(m))
- for id := range m {
- ids = append(ids, int(id))
- }
- sort.Ints(ids)
-
- ms := &messageSet{Item: make([]*_MessageSet_Item, 0, len(m))}
- for _, id := range ids {
- e := m[int32(id)]
- // Remove the wire type and field number varint, as well as the length varint.
- msg := skipVarint(skipVarint(e.enc))
-
- ms.Item = append(ms.Item, &_MessageSet_Item{
- TypeId: Int32(int32(id)),
- Message: msg,
- })
- }
- return Marshal(ms)
-}
-
-// UnmarshalMessageSet decodes the extension map encoded in buf in the message set wire format.
-// It is called by generated Unmarshal methods on protocol buffer messages with the message_set_wire_format option.
-func UnmarshalMessageSet(buf []byte, exts interface{}) error {
+// unmarshalMessageSet decodes the extension map encoded in buf in the message set wire format.
+// It is called by Unmarshal methods on protocol buffer messages with the message_set_wire_format option.
+func unmarshalMessageSet(buf []byte, exts interface{}) error {
var m map[int32]Extension
switch exts := exts.(type) {
case *XXX_InternalExtensions:
@@ -228,84 +179,3 @@ func UnmarshalMessageSet(buf []byte, exts interface{}) error {
}
return nil
}
-
-// MarshalMessageSetJSON encodes the extension map represented by m in JSON format.
-// It is called by generated MarshalJSON methods on protocol buffer messages with the message_set_wire_format option.
-func MarshalMessageSetJSON(exts interface{}) ([]byte, error) {
- var m map[int32]Extension
- switch exts := exts.(type) {
- case *XXX_InternalExtensions:
- m, _ = exts.extensionsRead()
- case map[int32]Extension:
- m = exts
- default:
- return nil, errors.New("proto: not an extension map")
- }
- var b bytes.Buffer
- b.WriteByte('{')
-
- // Process the map in key order for deterministic output.
- ids := make([]int32, 0, len(m))
- for id := range m {
- ids = append(ids, id)
- }
- sort.Sort(int32Slice(ids)) // int32Slice defined in text.go
-
- for i, id := range ids {
- ext := m[id]
- if i > 0 {
- b.WriteByte(',')
- }
-
- msd, ok := messageSetMap[id]
- if !ok {
- // Unknown type; we can't render it, so skip it.
- continue
- }
- fmt.Fprintf(&b, `"[%s]":`, msd.name)
-
- x := ext.value
- if x == nil {
- x = reflect.New(msd.t.Elem()).Interface()
- if err := Unmarshal(ext.enc, x.(Message)); err != nil {
- return nil, err
- }
- }
- d, err := json.Marshal(x)
- if err != nil {
- return nil, err
- }
- b.Write(d)
- }
- b.WriteByte('}')
- return b.Bytes(), nil
-}
-
-// UnmarshalMessageSetJSON decodes the extension map encoded in buf in JSON format.
-// It is called by generated UnmarshalJSON methods on protocol buffer messages with the message_set_wire_format option.
-func UnmarshalMessageSetJSON(buf []byte, exts interface{}) error {
- // Common-case fast path.
- if len(buf) == 0 || bytes.Equal(buf, []byte("{}")) {
- return nil
- }
-
- // This is fairly tricky, and it's not clear that it is needed.
- return errors.New("TODO: UnmarshalMessageSetJSON not yet implemented")
-}
-
-// A global registry of types that can be used in a MessageSet.
-
-var messageSetMap = make(map[int32]messageSetDesc)
-
-type messageSetDesc struct {
- t reflect.Type // pointer to struct
- name string
-}
-
-// RegisterMessageSetType is called from the generated code.
-func RegisterMessageSetType(m Message, fieldNum int32, name string) {
- messageSetMap[fieldNum] = messageSetDesc{
- t: reflect.TypeOf(m),
- name: name,
- }
-}
diff --git a/vendor/github.com/gogo/protobuf/proto/pointer_reflect.go b/vendor/github.com/gogo/protobuf/proto/pointer_reflect.go
index fb512e2e1..b6cad9083 100644
--- a/vendor/github.com/gogo/protobuf/proto/pointer_reflect.go
+++ b/vendor/github.com/gogo/protobuf/proto/pointer_reflect.go
@@ -29,7 +29,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// +build appengine js
+// +build purego appengine js
// This file contains an implementation of proto field accesses using package reflect.
// It is slower than the code in pointer_unsafe.go but it avoids package unsafe and can
@@ -38,32 +38,13 @@
package proto
import (
- "math"
"reflect"
+ "sync"
)
-// A structPointer is a pointer to a struct.
-type structPointer struct {
- v reflect.Value
-}
+const unsafeAllowed = false
-// toStructPointer returns a structPointer equivalent to the given reflect value.
-// The reflect value must itself be a pointer to a struct.
-func toStructPointer(v reflect.Value) structPointer {
- return structPointer{v}
-}
-
-// IsNil reports whether p is nil.
-func structPointer_IsNil(p structPointer) bool {
- return p.v.IsNil()
-}
-
-// Interface returns the struct pointer as an interface value.
-func structPointer_Interface(p structPointer, _ reflect.Type) interface{} {
- return p.v.Interface()
-}
-
-// A field identifies a field in a struct, accessible from a structPointer.
+// A field identifies a field in a struct, accessible from a pointer.
// In this implementation, a field is identified by the sequence of field indices
// passed to reflect's FieldByIndex.
type field []int
@@ -76,409 +57,301 @@ func toField(f *reflect.StructField) field {
// invalidField is an invalid field identifier.
var invalidField = field(nil)
+// zeroField is a noop when calling pointer.offset.
+var zeroField = field([]int{})
+
// IsValid reports whether the field identifier is valid.
func (f field) IsValid() bool { return f != nil }
-// field returns the given field in the struct as a reflect value.
-func structPointer_field(p structPointer, f field) reflect.Value {
- // Special case: an extension map entry with a value of type T
- // passes a *T to the struct-handling code with a zero field,
- // expecting that it will be treated as equivalent to *struct{ X T },
- // which has the same memory layout. We have to handle that case
- // specially, because reflect will panic if we call FieldByIndex on a
- // non-struct.
- if f == nil {
- return p.v.Elem()
- }
-
- return p.v.Elem().FieldByIndex(f)
-}
-
-// ifield returns the given field in the struct as an interface value.
-func structPointer_ifield(p structPointer, f field) interface{} {
- return structPointer_field(p, f).Addr().Interface()
-}
-
-// Bytes returns the address of a []byte field in the struct.
-func structPointer_Bytes(p structPointer, f field) *[]byte {
- return structPointer_ifield(p, f).(*[]byte)
-}
-
-// BytesSlice returns the address of a [][]byte field in the struct.
-func structPointer_BytesSlice(p structPointer, f field) *[][]byte {
- return structPointer_ifield(p, f).(*[][]byte)
-}
-
-// Bool returns the address of a *bool field in the struct.
-func structPointer_Bool(p structPointer, f field) **bool {
- return structPointer_ifield(p, f).(**bool)
-}
-
-// BoolVal returns the address of a bool field in the struct.
-func structPointer_BoolVal(p structPointer, f field) *bool {
- return structPointer_ifield(p, f).(*bool)
-}
-
-// BoolSlice returns the address of a []bool field in the struct.
-func structPointer_BoolSlice(p structPointer, f field) *[]bool {
- return structPointer_ifield(p, f).(*[]bool)
-}
-
-// String returns the address of a *string field in the struct.
-func structPointer_String(p structPointer, f field) **string {
- return structPointer_ifield(p, f).(**string)
-}
-
-// StringVal returns the address of a string field in the struct.
-func structPointer_StringVal(p structPointer, f field) *string {
- return structPointer_ifield(p, f).(*string)
-}
-
-// StringSlice returns the address of a []string field in the struct.
-func structPointer_StringSlice(p structPointer, f field) *[]string {
- return structPointer_ifield(p, f).(*[]string)
-}
-
-// Extensions returns the address of an extension map field in the struct.
-func structPointer_Extensions(p structPointer, f field) *XXX_InternalExtensions {
- return structPointer_ifield(p, f).(*XXX_InternalExtensions)
-}
-
-// ExtMap returns the address of an extension map field in the struct.
-func structPointer_ExtMap(p structPointer, f field) *map[int32]Extension {
- return structPointer_ifield(p, f).(*map[int32]Extension)
-}
-
-// NewAt returns the reflect.Value for a pointer to a field in the struct.
-func structPointer_NewAt(p structPointer, f field, typ reflect.Type) reflect.Value {
- return structPointer_field(p, f).Addr()
-}
-
-// SetStructPointer writes a *struct field in the struct.
-func structPointer_SetStructPointer(p structPointer, f field, q structPointer) {
- structPointer_field(p, f).Set(q.v)
-}
-
-// GetStructPointer reads a *struct field in the struct.
-func structPointer_GetStructPointer(p structPointer, f field) structPointer {
- return structPointer{structPointer_field(p, f)}
-}
-
-// StructPointerSlice the address of a []*struct field in the struct.
-func structPointer_StructPointerSlice(p structPointer, f field) structPointerSlice {
- return structPointerSlice{structPointer_field(p, f)}
-}
-
-// A structPointerSlice represents the address of a slice of pointers to structs
-// (themselves messages or groups). That is, v.Type() is *[]*struct{...}.
-type structPointerSlice struct {
+// The pointer type is for the table-driven decoder.
+// The implementation here uses a reflect.Value of pointer type to
+// create a generic pointer. In pointer_unsafe.go we use unsafe
+// instead of reflect to implement the same (but faster) interface.
+type pointer struct {
v reflect.Value
}
-func (p structPointerSlice) Len() int { return p.v.Len() }
-func (p structPointerSlice) Index(i int) structPointer { return structPointer{p.v.Index(i)} }
-func (p structPointerSlice) Append(q structPointer) {
- p.v.Set(reflect.Append(p.v, q.v))
+// toPointer converts an interface of pointer type to a pointer
+// that points to the same target.
+func toPointer(i *Message) pointer {
+ return pointer{v: reflect.ValueOf(*i)}
}
-var (
- int32Type = reflect.TypeOf(int32(0))
- uint32Type = reflect.TypeOf(uint32(0))
- float32Type = reflect.TypeOf(float32(0))
- int64Type = reflect.TypeOf(int64(0))
- uint64Type = reflect.TypeOf(uint64(0))
- float64Type = reflect.TypeOf(float64(0))
-)
-
-// A word32 represents a field of type *int32, *uint32, *float32, or *enum.
-// That is, v.Type() is *int32, *uint32, *float32, or *enum and v is assignable.
-type word32 struct {
- v reflect.Value
+// toAddrPointer converts an interface to a pointer that points to
+// the interface data.
+func toAddrPointer(i *interface{}, isptr bool) pointer {
+ v := reflect.ValueOf(*i)
+ u := reflect.New(v.Type())
+ u.Elem().Set(v)
+ return pointer{v: u}
}
-// IsNil reports whether p is nil.
-func word32_IsNil(p word32) bool {
+// valToPointer converts v to a pointer. v must be of pointer type.
+func valToPointer(v reflect.Value) pointer {
+ return pointer{v: v}
+}
+
+// offset converts from a pointer to a structure to a pointer to
+// one of its fields.
+func (p pointer) offset(f field) pointer {
+ return pointer{v: p.v.Elem().FieldByIndex(f).Addr()}
+}
+
+func (p pointer) isNil() bool {
return p.v.IsNil()
}
-// Set sets p to point at a newly allocated word with bits set to x.
-func word32_Set(p word32, o *Buffer, x uint32) {
- t := p.v.Type().Elem()
- switch t {
- case int32Type:
- if len(o.int32s) == 0 {
- o.int32s = make([]int32, uint32PoolSize)
- }
- o.int32s[0] = int32(x)
- p.v.Set(reflect.ValueOf(&o.int32s[0]))
- o.int32s = o.int32s[1:]
- return
- case uint32Type:
- if len(o.uint32s) == 0 {
- o.uint32s = make([]uint32, uint32PoolSize)
- }
- o.uint32s[0] = x
- p.v.Set(reflect.ValueOf(&o.uint32s[0]))
- o.uint32s = o.uint32s[1:]
- return
- case float32Type:
- if len(o.float32s) == 0 {
- o.float32s = make([]float32, uint32PoolSize)
- }
- o.float32s[0] = math.Float32frombits(x)
- p.v.Set(reflect.ValueOf(&o.float32s[0]))
- o.float32s = o.float32s[1:]
- return
- }
-
- // must be enum
- p.v.Set(reflect.New(t))
- p.v.Elem().SetInt(int64(int32(x)))
-}
-
-// Get gets the bits pointed at by p, as a uint32.
-func word32_Get(p word32) uint32 {
- elem := p.v.Elem()
- switch elem.Kind() {
- case reflect.Int32:
- return uint32(elem.Int())
- case reflect.Uint32:
- return uint32(elem.Uint())
- case reflect.Float32:
- return math.Float32bits(float32(elem.Float()))
- }
- panic("unreachable")
-}
-
-// Word32 returns a reference to a *int32, *uint32, *float32, or *enum field in the struct.
-func structPointer_Word32(p structPointer, f field) word32 {
- return word32{structPointer_field(p, f)}
-}
-
-// A word32Val represents a field of type int32, uint32, float32, or enum.
-// That is, v.Type() is int32, uint32, float32, or enum and v is assignable.
-type word32Val struct {
- v reflect.Value
-}
-
-// Set sets *p to x.
-func word32Val_Set(p word32Val, x uint32) {
- switch p.v.Type() {
- case int32Type:
- p.v.SetInt(int64(x))
- return
- case uint32Type:
- p.v.SetUint(uint64(x))
- return
- case float32Type:
- p.v.SetFloat(float64(math.Float32frombits(x)))
- return
- }
-
- // must be enum
- p.v.SetInt(int64(int32(x)))
-}
-
-// Get gets the bits pointed at by p, as a uint32.
-func word32Val_Get(p word32Val) uint32 {
- elem := p.v
- switch elem.Kind() {
- case reflect.Int32:
- return uint32(elem.Int())
- case reflect.Uint32:
- return uint32(elem.Uint())
- case reflect.Float32:
- return math.Float32bits(float32(elem.Float()))
- }
- panic("unreachable")
-}
-
-// Word32Val returns a reference to a int32, uint32, float32, or enum field in the struct.
-func structPointer_Word32Val(p structPointer, f field) word32Val {
- return word32Val{structPointer_field(p, f)}
-}
-
-// A word32Slice is a slice of 32-bit values.
-// That is, v.Type() is []int32, []uint32, []float32, or []enum.
-type word32Slice struct {
- v reflect.Value
-}
-
-func (p word32Slice) Append(x uint32) {
- n, m := p.v.Len(), p.v.Cap()
+// grow updates the slice s in place to make it one element longer.
+// s must be addressable.
+// Returns the (addressable) new element.
+func grow(s reflect.Value) reflect.Value {
+ n, m := s.Len(), s.Cap()
if n < m {
- p.v.SetLen(n + 1)
+ s.SetLen(n + 1)
} else {
- t := p.v.Type().Elem()
- p.v.Set(reflect.Append(p.v, reflect.Zero(t)))
+ s.Set(reflect.Append(s, reflect.Zero(s.Type().Elem())))
}
- elem := p.v.Index(n)
- switch elem.Kind() {
- case reflect.Int32:
- elem.SetInt(int64(int32(x)))
- case reflect.Uint32:
- elem.SetUint(uint64(x))
- case reflect.Float32:
- elem.SetFloat(float64(math.Float32frombits(x)))
+ return s.Index(n)
+}
+
+func (p pointer) toInt64() *int64 {
+ return p.v.Interface().(*int64)
+}
+func (p pointer) toInt64Ptr() **int64 {
+ return p.v.Interface().(**int64)
+}
+func (p pointer) toInt64Slice() *[]int64 {
+ return p.v.Interface().(*[]int64)
+}
+
+var int32ptr = reflect.TypeOf((*int32)(nil))
+
+func (p pointer) toInt32() *int32 {
+ return p.v.Convert(int32ptr).Interface().(*int32)
+}
+
+// The toInt32Ptr/Slice methods don't work because of enums.
+// Instead, we must use set/get methods for the int32ptr/slice case.
+/*
+ func (p pointer) toInt32Ptr() **int32 {
+ return p.v.Interface().(**int32)
+}
+ func (p pointer) toInt32Slice() *[]int32 {
+ return p.v.Interface().(*[]int32)
+}
+*/
+func (p pointer) getInt32Ptr() *int32 {
+ if p.v.Type().Elem().Elem() == reflect.TypeOf(int32(0)) {
+ // raw int32 type
+ return p.v.Elem().Interface().(*int32)
}
+ // an enum
+ return p.v.Elem().Convert(int32PtrType).Interface().(*int32)
+}
+func (p pointer) setInt32Ptr(v int32) {
+ // Allocate value in a *int32. Possibly convert that to a *enum.
+ // Then assign it to a **int32 or **enum.
+ // Note: we can convert *int32 to *enum, but we can't convert
+ // **int32 to **enum!
+ p.v.Elem().Set(reflect.ValueOf(&v).Convert(p.v.Type().Elem()))
}
-func (p word32Slice) Len() int {
- return p.v.Len()
-}
-
-func (p word32Slice) Index(i int) uint32 {
- elem := p.v.Index(i)
- switch elem.Kind() {
- case reflect.Int32:
- return uint32(elem.Int())
- case reflect.Uint32:
- return uint32(elem.Uint())
- case reflect.Float32:
- return math.Float32bits(float32(elem.Float()))
+// getInt32Slice copies []int32 from p as a new slice.
+// This behavior differs from the implementation in pointer_unsafe.go.
+func (p pointer) getInt32Slice() []int32 {
+ if p.v.Type().Elem().Elem() == reflect.TypeOf(int32(0)) {
+ // raw int32 type
+ return p.v.Elem().Interface().([]int32)
}
- panic("unreachable")
+ // an enum
+ // Allocate a []int32, then assign []enum's values into it.
+ // Note: we can't convert []enum to []int32.
+ slice := p.v.Elem()
+ s := make([]int32, slice.Len())
+ for i := 0; i < slice.Len(); i++ {
+ s[i] = int32(slice.Index(i).Int())
+ }
+ return s
}
-// Word32Slice returns a reference to a []int32, []uint32, []float32, or []enum field in the struct.
-func structPointer_Word32Slice(p structPointer, f field) word32Slice {
- return word32Slice{structPointer_field(p, f)}
-}
-
-// word64 is like word32 but for 64-bit values.
-type word64 struct {
- v reflect.Value
-}
-
-func word64_Set(p word64, o *Buffer, x uint64) {
- t := p.v.Type().Elem()
- switch t {
- case int64Type:
- if len(o.int64s) == 0 {
- o.int64s = make([]int64, uint64PoolSize)
- }
- o.int64s[0] = int64(x)
- p.v.Set(reflect.ValueOf(&o.int64s[0]))
- o.int64s = o.int64s[1:]
- return
- case uint64Type:
- if len(o.uint64s) == 0 {
- o.uint64s = make([]uint64, uint64PoolSize)
- }
- o.uint64s[0] = x
- p.v.Set(reflect.ValueOf(&o.uint64s[0]))
- o.uint64s = o.uint64s[1:]
- return
- case float64Type:
- if len(o.float64s) == 0 {
- o.float64s = make([]float64, uint64PoolSize)
- }
- o.float64s[0] = math.Float64frombits(x)
- p.v.Set(reflect.ValueOf(&o.float64s[0]))
- o.float64s = o.float64s[1:]
+// setInt32Slice copies []int32 into p as a new slice.
+// This behavior differs from the implementation in pointer_unsafe.go.
+func (p pointer) setInt32Slice(v []int32) {
+ if p.v.Type().Elem().Elem() == reflect.TypeOf(int32(0)) {
+ // raw int32 type
+ p.v.Elem().Set(reflect.ValueOf(v))
return
}
- panic("unreachable")
-}
-
-func word64_IsNil(p word64) bool {
- return p.v.IsNil()
-}
-
-func word64_Get(p word64) uint64 {
- elem := p.v.Elem()
- switch elem.Kind() {
- case reflect.Int64:
- return uint64(elem.Int())
- case reflect.Uint64:
- return elem.Uint()
- case reflect.Float64:
- return math.Float64bits(elem.Float())
+ // an enum
+ // Allocate a []enum, then assign []int32's values into it.
+ // Note: we can't convert []enum to []int32.
+ slice := reflect.MakeSlice(p.v.Type().Elem(), len(v), cap(v))
+ for i, x := range v {
+ slice.Index(i).SetInt(int64(x))
}
- panic("unreachable")
+ p.v.Elem().Set(slice)
+}
+func (p pointer) appendInt32Slice(v int32) {
+ grow(p.v.Elem()).SetInt(int64(v))
}
-func structPointer_Word64(p structPointer, f field) word64 {
- return word64{structPointer_field(p, f)}
+func (p pointer) toUint64() *uint64 {
+ return p.v.Interface().(*uint64)
+}
+func (p pointer) toUint64Ptr() **uint64 {
+ return p.v.Interface().(**uint64)
+}
+func (p pointer) toUint64Slice() *[]uint64 {
+ return p.v.Interface().(*[]uint64)
+}
+func (p pointer) toUint32() *uint32 {
+ return p.v.Interface().(*uint32)
+}
+func (p pointer) toUint32Ptr() **uint32 {
+ return p.v.Interface().(**uint32)
+}
+func (p pointer) toUint32Slice() *[]uint32 {
+ return p.v.Interface().(*[]uint32)
+}
+func (p pointer) toBool() *bool {
+ return p.v.Interface().(*bool)
+}
+func (p pointer) toBoolPtr() **bool {
+ return p.v.Interface().(**bool)
+}
+func (p pointer) toBoolSlice() *[]bool {
+ return p.v.Interface().(*[]bool)
+}
+func (p pointer) toFloat64() *float64 {
+ return p.v.Interface().(*float64)
+}
+func (p pointer) toFloat64Ptr() **float64 {
+ return p.v.Interface().(**float64)
+}
+func (p pointer) toFloat64Slice() *[]float64 {
+ return p.v.Interface().(*[]float64)
+}
+func (p pointer) toFloat32() *float32 {
+ return p.v.Interface().(*float32)
+}
+func (p pointer) toFloat32Ptr() **float32 {
+ return p.v.Interface().(**float32)
+}
+func (p pointer) toFloat32Slice() *[]float32 {
+ return p.v.Interface().(*[]float32)
+}
+func (p pointer) toString() *string {
+ return p.v.Interface().(*string)
+}
+func (p pointer) toStringPtr() **string {
+ return p.v.Interface().(**string)
+}
+func (p pointer) toStringSlice() *[]string {
+ return p.v.Interface().(*[]string)
+}
+func (p pointer) toBytes() *[]byte {
+ return p.v.Interface().(*[]byte)
+}
+func (p pointer) toBytesSlice() *[][]byte {
+ return p.v.Interface().(*[][]byte)
+}
+func (p pointer) toExtensions() *XXX_InternalExtensions {
+ return p.v.Interface().(*XXX_InternalExtensions)
+}
+func (p pointer) toOldExtensions() *map[int32]Extension {
+ return p.v.Interface().(*map[int32]Extension)
+}
+func (p pointer) getPointer() pointer {
+ return pointer{v: p.v.Elem()}
+}
+func (p pointer) setPointer(q pointer) {
+ p.v.Elem().Set(q.v)
+}
+func (p pointer) appendPointer(q pointer) {
+ grow(p.v.Elem()).Set(q.v)
}
-// word64Val is like word32Val but for 64-bit values.
-type word64Val struct {
- v reflect.Value
+// getPointerSlice copies []*T from p as a new []pointer.
+// This behavior differs from the implementation in pointer_unsafe.go.
+func (p pointer) getPointerSlice() []pointer {
+ if p.v.IsNil() {
+ return nil
+ }
+ n := p.v.Elem().Len()
+ s := make([]pointer, n)
+ for i := 0; i < n; i++ {
+ s[i] = pointer{v: p.v.Elem().Index(i)}
+ }
+ return s
}
-func word64Val_Set(p word64Val, o *Buffer, x uint64) {
- switch p.v.Type() {
- case int64Type:
- p.v.SetInt(int64(x))
- return
- case uint64Type:
- p.v.SetUint(x)
- return
- case float64Type:
- p.v.SetFloat(math.Float64frombits(x))
+// setPointerSlice copies []pointer into p as a new []*T.
+// This behavior differs from the implementation in pointer_unsafe.go.
+func (p pointer) setPointerSlice(v []pointer) {
+ if v == nil {
+ p.v.Elem().Set(reflect.New(p.v.Elem().Type()).Elem())
return
}
- panic("unreachable")
-}
-
-func word64Val_Get(p word64Val) uint64 {
- elem := p.v
- switch elem.Kind() {
- case reflect.Int64:
- return uint64(elem.Int())
- case reflect.Uint64:
- return elem.Uint()
- case reflect.Float64:
- return math.Float64bits(elem.Float())
+ s := reflect.MakeSlice(p.v.Elem().Type(), 0, len(v))
+ for _, p := range v {
+ s = reflect.Append(s, p.v)
}
- panic("unreachable")
+ p.v.Elem().Set(s)
}
-func structPointer_Word64Val(p structPointer, f field) word64Val {
- return word64Val{structPointer_field(p, f)}
-}
-
-type word64Slice struct {
- v reflect.Value
-}
-
-func (p word64Slice) Append(x uint64) {
- n, m := p.v.Len(), p.v.Cap()
- if n < m {
- p.v.SetLen(n + 1)
- } else {
- t := p.v.Type().Elem()
- p.v.Set(reflect.Append(p.v, reflect.Zero(t)))
- }
- elem := p.v.Index(n)
- switch elem.Kind() {
- case reflect.Int64:
- elem.SetInt(int64(int64(x)))
- case reflect.Uint64:
- elem.SetUint(uint64(x))
- case reflect.Float64:
- elem.SetFloat(float64(math.Float64frombits(x)))
+// getInterfacePointer returns a pointer that points to the
+// interface data of the interface pointed by p.
+func (p pointer) getInterfacePointer() pointer {
+ if p.v.Elem().IsNil() {
+ return pointer{v: p.v.Elem()}
}
+ return pointer{v: p.v.Elem().Elem().Elem().Field(0).Addr()} // *interface -> interface -> *struct -> struct
}
-func (p word64Slice) Len() int {
- return p.v.Len()
+func (p pointer) asPointerTo(t reflect.Type) reflect.Value {
+ // TODO: check that p.v.Type().Elem() == t?
+ return p.v
}
-func (p word64Slice) Index(i int) uint64 {
- elem := p.v.Index(i)
- switch elem.Kind() {
- case reflect.Int64:
- return uint64(elem.Int())
- case reflect.Uint64:
- return uint64(elem.Uint())
- case reflect.Float64:
- return math.Float64bits(float64(elem.Float()))
- }
- panic("unreachable")
+func atomicLoadUnmarshalInfo(p **unmarshalInfo) *unmarshalInfo {
+ atomicLock.Lock()
+ defer atomicLock.Unlock()
+ return *p
+}
+func atomicStoreUnmarshalInfo(p **unmarshalInfo, v *unmarshalInfo) {
+ atomicLock.Lock()
+ defer atomicLock.Unlock()
+ *p = v
+}
+func atomicLoadMarshalInfo(p **marshalInfo) *marshalInfo {
+ atomicLock.Lock()
+ defer atomicLock.Unlock()
+ return *p
+}
+func atomicStoreMarshalInfo(p **marshalInfo, v *marshalInfo) {
+ atomicLock.Lock()
+ defer atomicLock.Unlock()
+ *p = v
+}
+func atomicLoadMergeInfo(p **mergeInfo) *mergeInfo {
+ atomicLock.Lock()
+ defer atomicLock.Unlock()
+ return *p
+}
+func atomicStoreMergeInfo(p **mergeInfo, v *mergeInfo) {
+ atomicLock.Lock()
+ defer atomicLock.Unlock()
+ *p = v
+}
+func atomicLoadDiscardInfo(p **discardInfo) *discardInfo {
+ atomicLock.Lock()
+ defer atomicLock.Unlock()
+ return *p
+}
+func atomicStoreDiscardInfo(p **discardInfo, v *discardInfo) {
+ atomicLock.Lock()
+ defer atomicLock.Unlock()
+ *p = v
}
-func structPointer_Word64Slice(p structPointer, f field) word64Slice {
- return word64Slice{structPointer_field(p, f)}
-}
+var atomicLock sync.Mutex
diff --git a/vendor/github.com/gogo/protobuf/proto/pointer_reflect_gogo.go b/vendor/github.com/gogo/protobuf/proto/pointer_reflect_gogo.go
index 1763a5f22..7ffd3c29d 100644
--- a/vendor/github.com/gogo/protobuf/proto/pointer_reflect_gogo.go
+++ b/vendor/github.com/gogo/protobuf/proto/pointer_reflect_gogo.go
@@ -1,6 +1,6 @@
// Protocol Buffers for Go with Gadgets
//
-// Copyright (c) 2016, The GoGo Authors. All rights reserved.
+// Copyright (c) 2018, The GoGo Authors. All rights reserved.
// http://github.com/gogo/protobuf
//
// Redistribution and use in source and binary forms, with or without
@@ -26,7 +26,11 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// +build appengine js
+// +build purego appengine js
+
+// This file contains an implementation of proto field accesses using package reflect.
+// It is slower than the code in pointer_unsafe.go but it avoids package unsafe and can
+// be used on App Engine.
package proto
@@ -34,52 +38,22 @@ import (
"reflect"
)
-func structPointer_FieldPointer(p structPointer, f field) structPointer {
- panic("not implemented")
+// TODO: untested, so probably incorrect.
+
+func (p pointer) getRef() pointer {
+ return pointer{v: p.v.Addr()}
}
-func appendStructPointer(base structPointer, f field, typ reflect.Type) structPointer {
- panic("not implemented")
+func (p pointer) appendRef(v pointer, typ reflect.Type) {
+ slice := p.getSlice(typ)
+ elem := v.asPointerTo(typ).Elem()
+ newSlice := reflect.Append(slice, elem)
+ slice.Set(newSlice)
}
-func structPointer_InterfaceAt(p structPointer, f field, t reflect.Type) interface{} {
- panic("not implemented")
-}
-
-func structPointer_InterfaceRef(p structPointer, f field, t reflect.Type) interface{} {
- panic("not implemented")
-}
-
-func structPointer_GetRefStructPointer(p structPointer, f field) structPointer {
- panic("not implemented")
-}
-
-func structPointer_Add(p structPointer, size field) structPointer {
- panic("not implemented")
-}
-
-func structPointer_Len(p structPointer, f field) int {
- panic("not implemented")
-}
-
-func structPointer_GetSliceHeader(p structPointer, f field) *reflect.SliceHeader {
- panic("not implemented")
-}
-
-func structPointer_Copy(oldptr structPointer, newptr structPointer, size int) {
- panic("not implemented")
-}
-
-func structPointer_StructRefSlice(p structPointer, f field, size uintptr) *structRefSlice {
- panic("not implemented")
-}
-
-type structRefSlice struct{}
-
-func (v *structRefSlice) Len() int {
- panic("not implemented")
-}
-
-func (v *structRefSlice) Index(i int) structPointer {
- panic("not implemented")
+func (p pointer) getSlice(typ reflect.Type) reflect.Value {
+ sliceTyp := reflect.SliceOf(typ)
+ slice := p.asPointerTo(sliceTyp)
+ slice = slice.Elem()
+ return slice
}
diff --git a/vendor/github.com/gogo/protobuf/proto/pointer_unsafe.go b/vendor/github.com/gogo/protobuf/proto/pointer_unsafe.go
index 6b5567d47..d55a335d9 100644
--- a/vendor/github.com/gogo/protobuf/proto/pointer_unsafe.go
+++ b/vendor/github.com/gogo/protobuf/proto/pointer_unsafe.go
@@ -29,7 +29,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// +build !appengine,!js
+// +build !purego,!appengine,!js
// This file contains the implementation of the proto field accesses using package unsafe.
@@ -37,38 +37,13 @@ package proto
import (
"reflect"
+ "sync/atomic"
"unsafe"
)
-// NOTE: These type_Foo functions would more idiomatically be methods,
-// but Go does not allow methods on pointer types, and we must preserve
-// some pointer type for the garbage collector. We use these
-// funcs with clunky names as our poor approximation to methods.
-//
-// An alternative would be
-// type structPointer struct { p unsafe.Pointer }
-// but that does not registerize as well.
+const unsafeAllowed = true
-// A structPointer is a pointer to a struct.
-type structPointer unsafe.Pointer
-
-// toStructPointer returns a structPointer equivalent to the given reflect value.
-func toStructPointer(v reflect.Value) structPointer {
- return structPointer(unsafe.Pointer(v.Pointer()))
-}
-
-// IsNil reports whether p is nil.
-func structPointer_IsNil(p structPointer) bool {
- return p == nil
-}
-
-// Interface returns the struct pointer, assumed to have element type t,
-// as an interface value.
-func structPointer_Interface(p structPointer, t reflect.Type) interface{} {
- return reflect.NewAt(t, unsafe.Pointer(p)).Interface()
-}
-
-// A field identifies a field in a struct, accessible from a structPointer.
+// A field identifies a field in a struct, accessible from a pointer.
// In this implementation, a field is identified by its byte offset from the start of the struct.
type field uintptr
@@ -80,191 +55,254 @@ func toField(f *reflect.StructField) field {
// invalidField is an invalid field identifier.
const invalidField = ^field(0)
+// zeroField is a noop when calling pointer.offset.
+const zeroField = field(0)
+
// IsValid reports whether the field identifier is valid.
func (f field) IsValid() bool {
- return f != ^field(0)
+ return f != invalidField
}
-// Bytes returns the address of a []byte field in the struct.
-func structPointer_Bytes(p structPointer, f field) *[]byte {
- return (*[]byte)(unsafe.Pointer(uintptr(p) + uintptr(f)))
+// The pointer type below is for the new table-driven encoder/decoder.
+// The implementation here uses unsafe.Pointer to create a generic pointer.
+// In pointer_reflect.go we use reflect instead of unsafe to implement
+// the same (but slower) interface.
+type pointer struct {
+ p unsafe.Pointer
}
-// BytesSlice returns the address of a [][]byte field in the struct.
-func structPointer_BytesSlice(p structPointer, f field) *[][]byte {
- return (*[][]byte)(unsafe.Pointer(uintptr(p) + uintptr(f)))
+// size of pointer
+var ptrSize = unsafe.Sizeof(uintptr(0))
+
+// toPointer converts an interface of pointer type to a pointer
+// that points to the same target.
+func toPointer(i *Message) pointer {
+ // Super-tricky - read pointer out of data word of interface value.
+ // Saves ~25ns over the equivalent:
+ // return valToPointer(reflect.ValueOf(*i))
+ return pointer{p: (*[2]unsafe.Pointer)(unsafe.Pointer(i))[1]}
}
-// Bool returns the address of a *bool field in the struct.
-func structPointer_Bool(p structPointer, f field) **bool {
- return (**bool)(unsafe.Pointer(uintptr(p) + uintptr(f)))
-}
-
-// BoolVal returns the address of a bool field in the struct.
-func structPointer_BoolVal(p structPointer, f field) *bool {
- return (*bool)(unsafe.Pointer(uintptr(p) + uintptr(f)))
-}
-
-// BoolSlice returns the address of a []bool field in the struct.
-func structPointer_BoolSlice(p structPointer, f field) *[]bool {
- return (*[]bool)(unsafe.Pointer(uintptr(p) + uintptr(f)))
-}
-
-// String returns the address of a *string field in the struct.
-func structPointer_String(p structPointer, f field) **string {
- return (**string)(unsafe.Pointer(uintptr(p) + uintptr(f)))
-}
-
-// StringVal returns the address of a string field in the struct.
-func structPointer_StringVal(p structPointer, f field) *string {
- return (*string)(unsafe.Pointer(uintptr(p) + uintptr(f)))
-}
-
-// StringSlice returns the address of a []string field in the struct.
-func structPointer_StringSlice(p structPointer, f field) *[]string {
- return (*[]string)(unsafe.Pointer(uintptr(p) + uintptr(f)))
-}
-
-// ExtMap returns the address of an extension map field in the struct.
-func structPointer_Extensions(p structPointer, f field) *XXX_InternalExtensions {
- return (*XXX_InternalExtensions)(unsafe.Pointer(uintptr(p) + uintptr(f)))
-}
-
-func structPointer_ExtMap(p structPointer, f field) *map[int32]Extension {
- return (*map[int32]Extension)(unsafe.Pointer(uintptr(p) + uintptr(f)))
-}
-
-// NewAt returns the reflect.Value for a pointer to a field in the struct.
-func structPointer_NewAt(p structPointer, f field, typ reflect.Type) reflect.Value {
- return reflect.NewAt(typ, unsafe.Pointer(uintptr(p)+uintptr(f)))
-}
-
-// SetStructPointer writes a *struct field in the struct.
-func structPointer_SetStructPointer(p structPointer, f field, q structPointer) {
- *(*structPointer)(unsafe.Pointer(uintptr(p) + uintptr(f))) = q
-}
-
-// GetStructPointer reads a *struct field in the struct.
-func structPointer_GetStructPointer(p structPointer, f field) structPointer {
- return *(*structPointer)(unsafe.Pointer(uintptr(p) + uintptr(f)))
-}
-
-// StructPointerSlice the address of a []*struct field in the struct.
-func structPointer_StructPointerSlice(p structPointer, f field) *structPointerSlice {
- return (*structPointerSlice)(unsafe.Pointer(uintptr(p) + uintptr(f)))
-}
-
-// A structPointerSlice represents a slice of pointers to structs (themselves submessages or groups).
-type structPointerSlice []structPointer
-
-func (v *structPointerSlice) Len() int { return len(*v) }
-func (v *structPointerSlice) Index(i int) structPointer { return (*v)[i] }
-func (v *structPointerSlice) Append(p structPointer) { *v = append(*v, p) }
-
-// A word32 is the address of a "pointer to 32-bit value" field.
-type word32 **uint32
-
-// IsNil reports whether *v is nil.
-func word32_IsNil(p word32) bool {
- return *p == nil
-}
-
-// Set sets *v to point at a newly allocated word set to x.
-func word32_Set(p word32, o *Buffer, x uint32) {
- if len(o.uint32s) == 0 {
- o.uint32s = make([]uint32, uint32PoolSize)
+// toAddrPointer converts an interface to a pointer that points to
+// the interface data.
+func toAddrPointer(i *interface{}, isptr bool) pointer {
+ // Super-tricky - read or get the address of data word of interface value.
+ if isptr {
+ // The interface is of pointer type, thus it is a direct interface.
+ // The data word is the pointer data itself. We take its address.
+ return pointer{p: unsafe.Pointer(uintptr(unsafe.Pointer(i)) + ptrSize)}
}
- o.uint32s[0] = x
- *p = &o.uint32s[0]
- o.uint32s = o.uint32s[1:]
+ // The interface is not of pointer type. The data word is the pointer
+ // to the data.
+ return pointer{p: (*[2]unsafe.Pointer)(unsafe.Pointer(i))[1]}
}
-// Get gets the value pointed at by *v.
-func word32_Get(p word32) uint32 {
- return **p
+// valToPointer converts v to a pointer. v must be of pointer type.
+func valToPointer(v reflect.Value) pointer {
+ return pointer{p: unsafe.Pointer(v.Pointer())}
}
-// Word32 returns the address of a *int32, *uint32, *float32, or *enum field in the struct.
-func structPointer_Word32(p structPointer, f field) word32 {
- return word32((**uint32)(unsafe.Pointer(uintptr(p) + uintptr(f))))
+// offset converts from a pointer to a structure to a pointer to
+// one of its fields.
+func (p pointer) offset(f field) pointer {
+ // For safety, we should panic if !f.IsValid, however calling panic causes
+ // this to no longer be inlineable, which is a serious performance cost.
+ /*
+ if !f.IsValid() {
+ panic("invalid field")
+ }
+ */
+ return pointer{p: unsafe.Pointer(uintptr(p.p) + uintptr(f))}
}
-// A word32Val is the address of a 32-bit value field.
-type word32Val *uint32
-
-// Set sets *p to x.
-func word32Val_Set(p word32Val, x uint32) {
- *p = x
+func (p pointer) isNil() bool {
+ return p.p == nil
}
-// Get gets the value pointed at by p.
-func word32Val_Get(p word32Val) uint32 {
- return *p
+func (p pointer) toInt64() *int64 {
+ return (*int64)(p.p)
+}
+func (p pointer) toInt64Ptr() **int64 {
+ return (**int64)(p.p)
+}
+func (p pointer) toInt64Slice() *[]int64 {
+ return (*[]int64)(p.p)
+}
+func (p pointer) toInt32() *int32 {
+ return (*int32)(p.p)
}
-// Word32Val returns the address of a *int32, *uint32, *float32, or *enum field in the struct.
-func structPointer_Word32Val(p structPointer, f field) word32Val {
- return word32Val((*uint32)(unsafe.Pointer(uintptr(p) + uintptr(f))))
-}
-
-// A word32Slice is a slice of 32-bit values.
-type word32Slice []uint32
-
-func (v *word32Slice) Append(x uint32) { *v = append(*v, x) }
-func (v *word32Slice) Len() int { return len(*v) }
-func (v *word32Slice) Index(i int) uint32 { return (*v)[i] }
-
-// Word32Slice returns the address of a []int32, []uint32, []float32, or []enum field in the struct.
-func structPointer_Word32Slice(p structPointer, f field) *word32Slice {
- return (*word32Slice)(unsafe.Pointer(uintptr(p) + uintptr(f)))
-}
-
-// word64 is like word32 but for 64-bit values.
-type word64 **uint64
-
-func word64_Set(p word64, o *Buffer, x uint64) {
- if len(o.uint64s) == 0 {
- o.uint64s = make([]uint64, uint64PoolSize)
+// See pointer_reflect.go for why toInt32Ptr/Slice doesn't exist.
+/*
+ func (p pointer) toInt32Ptr() **int32 {
+ return (**int32)(p.p)
}
- o.uint64s[0] = x
- *p = &o.uint64s[0]
- o.uint64s = o.uint64s[1:]
+ func (p pointer) toInt32Slice() *[]int32 {
+ return (*[]int32)(p.p)
+ }
+*/
+func (p pointer) getInt32Ptr() *int32 {
+ return *(**int32)(p.p)
+}
+func (p pointer) setInt32Ptr(v int32) {
+ *(**int32)(p.p) = &v
}
-func word64_IsNil(p word64) bool {
- return *p == nil
+// getInt32Slice loads a []int32 from p.
+// The value returned is aliased with the original slice.
+// This behavior differs from the implementation in pointer_reflect.go.
+func (p pointer) getInt32Slice() []int32 {
+ return *(*[]int32)(p.p)
}
-func word64_Get(p word64) uint64 {
- return **p
+// setInt32Slice stores a []int32 to p.
+// The value set is aliased with the input slice.
+// This behavior differs from the implementation in pointer_reflect.go.
+func (p pointer) setInt32Slice(v []int32) {
+ *(*[]int32)(p.p) = v
}
-func structPointer_Word64(p structPointer, f field) word64 {
- return word64((**uint64)(unsafe.Pointer(uintptr(p) + uintptr(f))))
+// TODO: Can we get rid of appendInt32Slice and use setInt32Slice instead?
+func (p pointer) appendInt32Slice(v int32) {
+ s := (*[]int32)(p.p)
+ *s = append(*s, v)
}
-// word64Val is like word32Val but for 64-bit values.
-type word64Val *uint64
-
-func word64Val_Set(p word64Val, o *Buffer, x uint64) {
- *p = x
+func (p pointer) toUint64() *uint64 {
+ return (*uint64)(p.p)
+}
+func (p pointer) toUint64Ptr() **uint64 {
+ return (**uint64)(p.p)
+}
+func (p pointer) toUint64Slice() *[]uint64 {
+ return (*[]uint64)(p.p)
+}
+func (p pointer) toUint32() *uint32 {
+ return (*uint32)(p.p)
+}
+func (p pointer) toUint32Ptr() **uint32 {
+ return (**uint32)(p.p)
+}
+func (p pointer) toUint32Slice() *[]uint32 {
+ return (*[]uint32)(p.p)
+}
+func (p pointer) toBool() *bool {
+ return (*bool)(p.p)
+}
+func (p pointer) toBoolPtr() **bool {
+ return (**bool)(p.p)
+}
+func (p pointer) toBoolSlice() *[]bool {
+ return (*[]bool)(p.p)
+}
+func (p pointer) toFloat64() *float64 {
+ return (*float64)(p.p)
+}
+func (p pointer) toFloat64Ptr() **float64 {
+ return (**float64)(p.p)
+}
+func (p pointer) toFloat64Slice() *[]float64 {
+ return (*[]float64)(p.p)
+}
+func (p pointer) toFloat32() *float32 {
+ return (*float32)(p.p)
+}
+func (p pointer) toFloat32Ptr() **float32 {
+ return (**float32)(p.p)
+}
+func (p pointer) toFloat32Slice() *[]float32 {
+ return (*[]float32)(p.p)
+}
+func (p pointer) toString() *string {
+ return (*string)(p.p)
+}
+func (p pointer) toStringPtr() **string {
+ return (**string)(p.p)
+}
+func (p pointer) toStringSlice() *[]string {
+ return (*[]string)(p.p)
+}
+func (p pointer) toBytes() *[]byte {
+ return (*[]byte)(p.p)
+}
+func (p pointer) toBytesSlice() *[][]byte {
+ return (*[][]byte)(p.p)
+}
+func (p pointer) toExtensions() *XXX_InternalExtensions {
+ return (*XXX_InternalExtensions)(p.p)
+}
+func (p pointer) toOldExtensions() *map[int32]Extension {
+ return (*map[int32]Extension)(p.p)
}
-func word64Val_Get(p word64Val) uint64 {
- return *p
+// getPointerSlice loads []*T from p as a []pointer.
+// The value returned is aliased with the original slice.
+// This behavior differs from the implementation in pointer_reflect.go.
+func (p pointer) getPointerSlice() []pointer {
+ // Super-tricky - p should point to a []*T where T is a
+ // message type. We load it as []pointer.
+ return *(*[]pointer)(p.p)
}
-func structPointer_Word64Val(p structPointer, f field) word64Val {
- return word64Val((*uint64)(unsafe.Pointer(uintptr(p) + uintptr(f))))
+// setPointerSlice stores []pointer into p as a []*T.
+// The value set is aliased with the input slice.
+// This behavior differs from the implementation in pointer_reflect.go.
+func (p pointer) setPointerSlice(v []pointer) {
+ // Super-tricky - p should point to a []*T where T is a
+ // message type. We store it as []pointer.
+ *(*[]pointer)(p.p) = v
}
-// word64Slice is like word32Slice but for 64-bit values.
-type word64Slice []uint64
-
-func (v *word64Slice) Append(x uint64) { *v = append(*v, x) }
-func (v *word64Slice) Len() int { return len(*v) }
-func (v *word64Slice) Index(i int) uint64 { return (*v)[i] }
-
-func structPointer_Word64Slice(p structPointer, f field) *word64Slice {
- return (*word64Slice)(unsafe.Pointer(uintptr(p) + uintptr(f)))
+// getPointer loads the pointer at p and returns it.
+func (p pointer) getPointer() pointer {
+ return pointer{p: *(*unsafe.Pointer)(p.p)}
+}
+
+// setPointer stores the pointer q at p.
+func (p pointer) setPointer(q pointer) {
+ *(*unsafe.Pointer)(p.p) = q.p
+}
+
+// append q to the slice pointed to by p.
+func (p pointer) appendPointer(q pointer) {
+ s := (*[]unsafe.Pointer)(p.p)
+ *s = append(*s, q.p)
+}
+
+// getInterfacePointer returns a pointer that points to the
+// interface data of the interface pointed by p.
+func (p pointer) getInterfacePointer() pointer {
+ // Super-tricky - read pointer out of data word of interface value.
+ return pointer{p: (*(*[2]unsafe.Pointer)(p.p))[1]}
+}
+
+// asPointerTo returns a reflect.Value that is a pointer to an
+// object of type t stored at p.
+func (p pointer) asPointerTo(t reflect.Type) reflect.Value {
+ return reflect.NewAt(t, p.p)
+}
+
+func atomicLoadUnmarshalInfo(p **unmarshalInfo) *unmarshalInfo {
+ return (*unmarshalInfo)(atomic.LoadPointer((*unsafe.Pointer)(unsafe.Pointer(p))))
+}
+func atomicStoreUnmarshalInfo(p **unmarshalInfo, v *unmarshalInfo) {
+ atomic.StorePointer((*unsafe.Pointer)(unsafe.Pointer(p)), unsafe.Pointer(v))
+}
+func atomicLoadMarshalInfo(p **marshalInfo) *marshalInfo {
+ return (*marshalInfo)(atomic.LoadPointer((*unsafe.Pointer)(unsafe.Pointer(p))))
+}
+func atomicStoreMarshalInfo(p **marshalInfo, v *marshalInfo) {
+ atomic.StorePointer((*unsafe.Pointer)(unsafe.Pointer(p)), unsafe.Pointer(v))
+}
+func atomicLoadMergeInfo(p **mergeInfo) *mergeInfo {
+ return (*mergeInfo)(atomic.LoadPointer((*unsafe.Pointer)(unsafe.Pointer(p))))
+}
+func atomicStoreMergeInfo(p **mergeInfo, v *mergeInfo) {
+ atomic.StorePointer((*unsafe.Pointer)(unsafe.Pointer(p)), unsafe.Pointer(v))
+}
+func atomicLoadDiscardInfo(p **discardInfo) *discardInfo {
+ return (*discardInfo)(atomic.LoadPointer((*unsafe.Pointer)(unsafe.Pointer(p))))
+}
+func atomicStoreDiscardInfo(p **discardInfo, v *discardInfo) {
+ atomic.StorePointer((*unsafe.Pointer)(unsafe.Pointer(p)), unsafe.Pointer(v))
}
diff --git a/vendor/github.com/gogo/protobuf/proto/pointer_unsafe_gogo.go b/vendor/github.com/gogo/protobuf/proto/pointer_unsafe_gogo.go
index f156a29f0..aca8eed02 100644
--- a/vendor/github.com/gogo/protobuf/proto/pointer_unsafe_gogo.go
+++ b/vendor/github.com/gogo/protobuf/proto/pointer_unsafe_gogo.go
@@ -1,6 +1,6 @@
// Protocol Buffers for Go with Gadgets
//
-// Copyright (c) 2013, The GoGo Authors. All rights reserved.
+// Copyright (c) 2018, The GoGo Authors. All rights reserved.
// http://github.com/gogo/protobuf
//
// Redistribution and use in source and binary forms, with or without
@@ -26,7 +26,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// +build !appengine,!js
+// +build !purego,!appengine,!js
// This file contains the implementation of the proto field accesses using package unsafe.
@@ -37,92 +37,20 @@ import (
"unsafe"
)
-func structPointer_InterfaceAt(p structPointer, f field, t reflect.Type) interface{} {
- point := unsafe.Pointer(uintptr(p) + uintptr(f))
- r := reflect.NewAt(t, point)
- return r.Interface()
+func (p pointer) getRef() pointer {
+ return pointer{p: (unsafe.Pointer)(&p.p)}
}
-func structPointer_InterfaceRef(p structPointer, f field, t reflect.Type) interface{} {
- point := unsafe.Pointer(uintptr(p) + uintptr(f))
- r := reflect.NewAt(t, point)
- if r.Elem().IsNil() {
- return nil
- }
- return r.Elem().Interface()
+func (p pointer) appendRef(v pointer, typ reflect.Type) {
+ slice := p.getSlice(typ)
+ elem := v.asPointerTo(typ).Elem()
+ newSlice := reflect.Append(slice, elem)
+ slice.Set(newSlice)
}
-func copyUintPtr(oldptr, newptr uintptr, size int) {
- oldbytes := make([]byte, 0)
- oldslice := (*reflect.SliceHeader)(unsafe.Pointer(&oldbytes))
- oldslice.Data = oldptr
- oldslice.Len = size
- oldslice.Cap = size
- newbytes := make([]byte, 0)
- newslice := (*reflect.SliceHeader)(unsafe.Pointer(&newbytes))
- newslice.Data = newptr
- newslice.Len = size
- newslice.Cap = size
- copy(newbytes, oldbytes)
-}
-
-func structPointer_Copy(oldptr structPointer, newptr structPointer, size int) {
- copyUintPtr(uintptr(oldptr), uintptr(newptr), size)
-}
-
-func appendStructPointer(base structPointer, f field, typ reflect.Type) structPointer {
- size := typ.Elem().Size()
-
- oldHeader := structPointer_GetSliceHeader(base, f)
- oldSlice := reflect.NewAt(typ, unsafe.Pointer(oldHeader)).Elem()
- newLen := oldHeader.Len + 1
- newSlice := reflect.MakeSlice(typ, newLen, newLen)
- reflect.Copy(newSlice, oldSlice)
- bas := toStructPointer(newSlice)
- oldHeader.Data = uintptr(bas)
- oldHeader.Len = newLen
- oldHeader.Cap = newLen
-
- return structPointer(unsafe.Pointer(uintptr(unsafe.Pointer(bas)) + uintptr(uintptr(newLen-1)*size)))
-}
-
-func structPointer_FieldPointer(p structPointer, f field) structPointer {
- return structPointer(unsafe.Pointer(uintptr(p) + uintptr(f)))
-}
-
-func structPointer_GetRefStructPointer(p structPointer, f field) structPointer {
- return structPointer((*structPointer)(unsafe.Pointer(uintptr(p) + uintptr(f))))
-}
-
-func structPointer_GetSliceHeader(p structPointer, f field) *reflect.SliceHeader {
- return (*reflect.SliceHeader)(unsafe.Pointer(uintptr(p) + uintptr(f)))
-}
-
-func structPointer_Add(p structPointer, size field) structPointer {
- return structPointer(unsafe.Pointer(uintptr(p) + uintptr(size)))
-}
-
-func structPointer_Len(p structPointer, f field) int {
- return len(*(*[]interface{})(unsafe.Pointer(structPointer_GetRefStructPointer(p, f))))
-}
-
-func structPointer_StructRefSlice(p structPointer, f field, size uintptr) *structRefSlice {
- return &structRefSlice{p: p, f: f, size: size}
-}
-
-// A structRefSlice represents a slice of structs (themselves submessages or groups).
-type structRefSlice struct {
- p structPointer
- f field
- size uintptr
-}
-
-func (v *structRefSlice) Len() int {
- return structPointer_Len(v.p, v.f)
-}
-
-func (v *structRefSlice) Index(i int) structPointer {
- ss := structPointer_GetStructPointer(v.p, v.f)
- ss1 := structPointer_GetRefStructPointer(ss, 0)
- return structPointer_Add(ss1, field(uintptr(i)*v.size))
+func (p pointer) getSlice(typ reflect.Type) reflect.Value {
+ sliceTyp := reflect.SliceOf(typ)
+ slice := p.asPointerTo(sliceTyp)
+ slice = slice.Elem()
+ return slice
}
diff --git a/vendor/github.com/gogo/protobuf/proto/properties.go b/vendor/github.com/gogo/protobuf/proto/properties.go
index 2a69e8862..c9e5fa020 100644
--- a/vendor/github.com/gogo/protobuf/proto/properties.go
+++ b/vendor/github.com/gogo/protobuf/proto/properties.go
@@ -63,42 +63,6 @@ const (
WireFixed32 = 5
)
-const startSize = 10 // initial slice/string sizes
-
-// Encoders are defined in encode.go
-// An encoder outputs the full representation of a field, including its
-// tag and encoder type.
-type encoder func(p *Buffer, prop *Properties, base structPointer) error
-
-// A valueEncoder encodes a single integer in a particular encoding.
-type valueEncoder func(o *Buffer, x uint64) error
-
-// Sizers are defined in encode.go
-// A sizer returns the encoded size of a field, including its tag and encoder
-// type.
-type sizer func(prop *Properties, base structPointer) int
-
-// A valueSizer returns the encoded size of a single integer in a particular
-// encoding.
-type valueSizer func(x uint64) int
-
-// Decoders are defined in decode.go
-// A decoder creates a value from its wire representation.
-// Unrecognized subelements are saved in unrec.
-type decoder func(p *Buffer, prop *Properties, base structPointer) error
-
-// A valueDecoder decodes a single integer in a particular encoding.
-type valueDecoder func(o *Buffer) (x uint64, err error)
-
-// A oneofMarshaler does the marshaling for all oneof fields in a message.
-type oneofMarshaler func(Message, *Buffer) error
-
-// A oneofUnmarshaler does the unmarshaling for a oneof field in a message.
-type oneofUnmarshaler func(Message, int, int, *Buffer) (bool, error)
-
-// A oneofSizer does the sizing for all oneof fields in a message.
-type oneofSizer func(Message) int
-
// tagMap is an optimization over map[int]int for typical protocol buffer
// use-cases. Encoded protocol buffers are often in tag order with small tag
// numbers.
@@ -145,13 +109,6 @@ type StructProperties struct {
decoderTags tagMap // map from proto tag to struct field number
decoderOrigNames map[string]int // map from original name to struct field number
order []int // list of struct field numbers in tag order
- unrecField field // field id of the XXX_unrecognized []byte field
- extendable bool // is this an extendable proto
-
- oneofMarshaler oneofMarshaler
- oneofUnmarshaler oneofUnmarshaler
- oneofSizer oneofSizer
- stype reflect.Type
// OneofTypes contains information about the oneof fields in this message.
// It is keyed by the original name of a field.
@@ -187,7 +144,7 @@ type Properties struct {
Repeated bool
Packed bool // relevant for repeated primitives only
Enum string // set for enum types only
- proto3 bool // whether this is known to be a proto3 field; set for []byte only
+ proto3 bool // whether this is known to be a proto3 field
oneof bool // whether this is a oneof field
Default string // default value
@@ -196,37 +153,21 @@ type Properties struct {
CastType string
StdTime bool
StdDuration bool
+ WktPointer bool
- enc encoder
- valEnc valueEncoder // set for bool and numeric types only
- field field
- tagcode []byte // encoding of EncodeVarint((Tag<<3)|WireType)
- tagbuf [8]byte
- stype reflect.Type // set for struct types only
- sstype reflect.Type // set for slices of structs types only
- ctype reflect.Type // set for custom types only
- sprop *StructProperties // set for struct types only
- isMarshaler bool
- isUnmarshaler bool
+ stype reflect.Type // set for struct types only
+ ctype reflect.Type // set for custom types only
+ sprop *StructProperties // set for struct types only
- mtype reflect.Type // set for map types only
- mkeyprop *Properties // set for map types only
- mvalprop *Properties // set for map types only
-
- size sizer
- valSize valueSizer // set for bool and numeric types only
-
- dec decoder
- valDec valueDecoder // set for bool and numeric types only
-
- // If this is a packable field, this will be the decoder for the packed version of the field.
- packedDec decoder
+ mtype reflect.Type // set for map types only
+ MapKeyProp *Properties // set for map types only
+ MapValProp *Properties // set for map types only
}
// String formats the properties in the protobuf struct field tag style.
func (p *Properties) String() string {
s := p.Wire
- s = ","
+ s += ","
s += strconv.Itoa(p.Tag)
if p.Required {
s += ",req"
@@ -272,29 +213,14 @@ func (p *Properties) Parse(s string) {
switch p.Wire {
case "varint":
p.WireType = WireVarint
- p.valEnc = (*Buffer).EncodeVarint
- p.valDec = (*Buffer).DecodeVarint
- p.valSize = sizeVarint
case "fixed32":
p.WireType = WireFixed32
- p.valEnc = (*Buffer).EncodeFixed32
- p.valDec = (*Buffer).DecodeFixed32
- p.valSize = sizeFixed32
case "fixed64":
p.WireType = WireFixed64
- p.valEnc = (*Buffer).EncodeFixed64
- p.valDec = (*Buffer).DecodeFixed64
- p.valSize = sizeFixed64
case "zigzag32":
p.WireType = WireVarint
- p.valEnc = (*Buffer).EncodeZigzag32
- p.valDec = (*Buffer).DecodeZigzag32
- p.valSize = sizeZigzag32
case "zigzag64":
p.WireType = WireVarint
- p.valEnc = (*Buffer).EncodeZigzag64
- p.valDec = (*Buffer).DecodeZigzag64
- p.valSize = sizeZigzag64
case "bytes", "group":
p.WireType = WireBytes
// no numeric converter for non-numeric types
@@ -309,6 +235,7 @@ func (p *Properties) Parse(s string) {
return
}
+outer:
for i := 2; i < len(fields); i++ {
f := fields[i]
switch {
@@ -336,7 +263,7 @@ func (p *Properties) Parse(s string) {
if i+1 < len(fields) {
// Commas aren't escaped, and def is always last.
p.Default += "," + strings.Join(fields[i+1:], ",")
- break
+ break outer
}
case strings.HasPrefix(f, "embedded="):
p.OrigName = strings.Split(f, "=")[1]
@@ -348,301 +275,58 @@ func (p *Properties) Parse(s string) {
p.StdTime = true
case f == "stdduration":
p.StdDuration = true
+ case f == "wktptr":
+ p.WktPointer = true
}
}
}
-func logNoSliceEnc(t1, t2 reflect.Type) {
- fmt.Fprintf(os.Stderr, "proto: no slice oenc for %T = []%T\n", t1, t2)
-}
-
var protoMessageType = reflect.TypeOf((*Message)(nil)).Elem()
-// Initialize the fields for encoding and decoding.
-func (p *Properties) setEncAndDec(typ reflect.Type, f *reflect.StructField, lockGetProp bool) {
- p.enc = nil
- p.dec = nil
- p.size = nil
+// setFieldProps initializes the field properties for submessages and maps.
+func (p *Properties) setFieldProps(typ reflect.Type, f *reflect.StructField, lockGetProp bool) {
isMap := typ.Kind() == reflect.Map
if len(p.CustomType) > 0 && !isMap {
- p.setCustomEncAndDec(typ)
+ p.ctype = typ
p.setTag(lockGetProp)
return
}
if p.StdTime && !isMap {
- p.setTimeEncAndDec(typ)
p.setTag(lockGetProp)
return
}
if p.StdDuration && !isMap {
- p.setDurationEncAndDec(typ)
+ p.setTag(lockGetProp)
+ return
+ }
+ if p.WktPointer && !isMap {
p.setTag(lockGetProp)
return
}
switch t1 := typ; t1.Kind() {
- default:
- fmt.Fprintf(os.Stderr, "proto: no coders for %v\n", t1)
-
- // proto3 scalar types
-
- case reflect.Bool:
- if p.proto3 {
- p.enc = (*Buffer).enc_proto3_bool
- p.dec = (*Buffer).dec_proto3_bool
- p.size = size_proto3_bool
- } else {
- p.enc = (*Buffer).enc_ref_bool
- p.dec = (*Buffer).dec_proto3_bool
- p.size = size_ref_bool
- }
- case reflect.Int32:
- if p.proto3 {
- p.enc = (*Buffer).enc_proto3_int32
- p.dec = (*Buffer).dec_proto3_int32
- p.size = size_proto3_int32
- } else {
- p.enc = (*Buffer).enc_ref_int32
- p.dec = (*Buffer).dec_proto3_int32
- p.size = size_ref_int32
- }
- case reflect.Uint32:
- if p.proto3 {
- p.enc = (*Buffer).enc_proto3_uint32
- p.dec = (*Buffer).dec_proto3_int32 // can reuse
- p.size = size_proto3_uint32
- } else {
- p.enc = (*Buffer).enc_ref_uint32
- p.dec = (*Buffer).dec_proto3_int32 // can reuse
- p.size = size_ref_uint32
- }
- case reflect.Int64, reflect.Uint64:
- if p.proto3 {
- p.enc = (*Buffer).enc_proto3_int64
- p.dec = (*Buffer).dec_proto3_int64
- p.size = size_proto3_int64
- } else {
- p.enc = (*Buffer).enc_ref_int64
- p.dec = (*Buffer).dec_proto3_int64
- p.size = size_ref_int64
- }
- case reflect.Float32:
- if p.proto3 {
- p.enc = (*Buffer).enc_proto3_uint32 // can just treat them as bits
- p.dec = (*Buffer).dec_proto3_int32
- p.size = size_proto3_uint32
- } else {
- p.enc = (*Buffer).enc_ref_uint32 // can just treat them as bits
- p.dec = (*Buffer).dec_proto3_int32
- p.size = size_ref_uint32
- }
- case reflect.Float64:
- if p.proto3 {
- p.enc = (*Buffer).enc_proto3_int64 // can just treat them as bits
- p.dec = (*Buffer).dec_proto3_int64
- p.size = size_proto3_int64
- } else {
- p.enc = (*Buffer).enc_ref_int64 // can just treat them as bits
- p.dec = (*Buffer).dec_proto3_int64
- p.size = size_ref_int64
- }
- case reflect.String:
- if p.proto3 {
- p.enc = (*Buffer).enc_proto3_string
- p.dec = (*Buffer).dec_proto3_string
- p.size = size_proto3_string
- } else {
- p.enc = (*Buffer).enc_ref_string
- p.dec = (*Buffer).dec_proto3_string
- p.size = size_ref_string
- }
case reflect.Struct:
p.stype = typ
- p.isMarshaler = isMarshaler(typ)
- p.isUnmarshaler = isUnmarshaler(typ)
- if p.Wire == "bytes" {
- p.enc = (*Buffer).enc_ref_struct_message
- p.dec = (*Buffer).dec_ref_struct_message
- p.size = size_ref_struct_message
- } else {
- fmt.Fprintf(os.Stderr, "proto: no coders for struct %T\n", typ)
- }
-
case reflect.Ptr:
- switch t2 := t1.Elem(); t2.Kind() {
- default:
- fmt.Fprintf(os.Stderr, "proto: no encoder function for %v -> %v\n", t1, t2)
- break
- case reflect.Bool:
- p.enc = (*Buffer).enc_bool
- p.dec = (*Buffer).dec_bool
- p.size = size_bool
- case reflect.Int32:
- p.enc = (*Buffer).enc_int32
- p.dec = (*Buffer).dec_int32
- p.size = size_int32
- case reflect.Uint32:
- p.enc = (*Buffer).enc_uint32
- p.dec = (*Buffer).dec_int32 // can reuse
- p.size = size_uint32
- case reflect.Int64, reflect.Uint64:
- p.enc = (*Buffer).enc_int64
- p.dec = (*Buffer).dec_int64
- p.size = size_int64
- case reflect.Float32:
- p.enc = (*Buffer).enc_uint32 // can just treat them as bits
- p.dec = (*Buffer).dec_int32
- p.size = size_uint32
- case reflect.Float64:
- p.enc = (*Buffer).enc_int64 // can just treat them as bits
- p.dec = (*Buffer).dec_int64
- p.size = size_int64
- case reflect.String:
- p.enc = (*Buffer).enc_string
- p.dec = (*Buffer).dec_string
- p.size = size_string
- case reflect.Struct:
+ if t1.Elem().Kind() == reflect.Struct {
p.stype = t1.Elem()
- p.isMarshaler = isMarshaler(t1)
- p.isUnmarshaler = isUnmarshaler(t1)
- if p.Wire == "bytes" {
- p.enc = (*Buffer).enc_struct_message
- p.dec = (*Buffer).dec_struct_message
- p.size = size_struct_message
- } else {
- p.enc = (*Buffer).enc_struct_group
- p.dec = (*Buffer).dec_struct_group
- p.size = size_struct_group
- }
}
-
case reflect.Slice:
switch t2 := t1.Elem(); t2.Kind() {
- default:
- logNoSliceEnc(t1, t2)
- break
- case reflect.Bool:
- if p.Packed {
- p.enc = (*Buffer).enc_slice_packed_bool
- p.size = size_slice_packed_bool
- } else {
- p.enc = (*Buffer).enc_slice_bool
- p.size = size_slice_bool
- }
- p.dec = (*Buffer).dec_slice_bool
- p.packedDec = (*Buffer).dec_slice_packed_bool
- case reflect.Int32:
- if p.Packed {
- p.enc = (*Buffer).enc_slice_packed_int32
- p.size = size_slice_packed_int32
- } else {
- p.enc = (*Buffer).enc_slice_int32
- p.size = size_slice_int32
- }
- p.dec = (*Buffer).dec_slice_int32
- p.packedDec = (*Buffer).dec_slice_packed_int32
- case reflect.Uint32:
- if p.Packed {
- p.enc = (*Buffer).enc_slice_packed_uint32
- p.size = size_slice_packed_uint32
- } else {
- p.enc = (*Buffer).enc_slice_uint32
- p.size = size_slice_uint32
- }
- p.dec = (*Buffer).dec_slice_int32
- p.packedDec = (*Buffer).dec_slice_packed_int32
- case reflect.Int64, reflect.Uint64:
- if p.Packed {
- p.enc = (*Buffer).enc_slice_packed_int64
- p.size = size_slice_packed_int64
- } else {
- p.enc = (*Buffer).enc_slice_int64
- p.size = size_slice_int64
- }
- p.dec = (*Buffer).dec_slice_int64
- p.packedDec = (*Buffer).dec_slice_packed_int64
- case reflect.Uint8:
- p.dec = (*Buffer).dec_slice_byte
- if p.proto3 {
- p.enc = (*Buffer).enc_proto3_slice_byte
- p.size = size_proto3_slice_byte
- } else {
- p.enc = (*Buffer).enc_slice_byte
- p.size = size_slice_byte
- }
- case reflect.Float32, reflect.Float64:
- switch t2.Bits() {
- case 32:
- // can just treat them as bits
- if p.Packed {
- p.enc = (*Buffer).enc_slice_packed_uint32
- p.size = size_slice_packed_uint32
- } else {
- p.enc = (*Buffer).enc_slice_uint32
- p.size = size_slice_uint32
- }
- p.dec = (*Buffer).dec_slice_int32
- p.packedDec = (*Buffer).dec_slice_packed_int32
- case 64:
- // can just treat them as bits
- if p.Packed {
- p.enc = (*Buffer).enc_slice_packed_int64
- p.size = size_slice_packed_int64
- } else {
- p.enc = (*Buffer).enc_slice_int64
- p.size = size_slice_int64
- }
- p.dec = (*Buffer).dec_slice_int64
- p.packedDec = (*Buffer).dec_slice_packed_int64
- default:
- logNoSliceEnc(t1, t2)
- break
- }
- case reflect.String:
- p.enc = (*Buffer).enc_slice_string
- p.dec = (*Buffer).dec_slice_string
- p.size = size_slice_string
case reflect.Ptr:
switch t3 := t2.Elem(); t3.Kind() {
- default:
- fmt.Fprintf(os.Stderr, "proto: no ptr oenc for %T -> %T -> %T\n", t1, t2, t3)
- break
case reflect.Struct:
- p.stype = t2.Elem()
- p.isMarshaler = isMarshaler(t2)
- p.isUnmarshaler = isUnmarshaler(t2)
- if p.Wire == "bytes" {
- p.enc = (*Buffer).enc_slice_struct_message
- p.dec = (*Buffer).dec_slice_struct_message
- p.size = size_slice_struct_message
- } else {
- p.enc = (*Buffer).enc_slice_struct_group
- p.dec = (*Buffer).dec_slice_struct_group
- p.size = size_slice_struct_group
- }
- }
- case reflect.Slice:
- switch t2.Elem().Kind() {
- default:
- fmt.Fprintf(os.Stderr, "proto: no slice elem oenc for %T -> %T -> %T\n", t1, t2, t2.Elem())
- break
- case reflect.Uint8:
- p.enc = (*Buffer).enc_slice_slice_byte
- p.dec = (*Buffer).dec_slice_slice_byte
- p.size = size_slice_slice_byte
+ p.stype = t3
}
case reflect.Struct:
- p.setSliceOfNonPointerStructs(t1)
+ p.stype = t2
}
case reflect.Map:
- p.enc = (*Buffer).enc_new_map
- p.dec = (*Buffer).dec_new_map
- p.size = size_new_map
p.mtype = t1
- p.mkeyprop = &Properties{}
- p.mkeyprop.init(reflect.PtrTo(p.mtype.Key()), "Key", f.Tag.Get("protobuf_key"), nil, lockGetProp)
- p.mvalprop = &Properties{}
+ p.MapKeyProp = &Properties{}
+ p.MapKeyProp.init(reflect.PtrTo(p.mtype.Key()), "Key", f.Tag.Get("protobuf_key"), nil, lockGetProp)
+ p.MapValProp = &Properties{}
vtype := p.mtype.Elem()
if vtype.Kind() != reflect.Ptr && vtype.Kind() != reflect.Slice {
// The value type is not a message (*T) or bytes ([]byte),
@@ -650,29 +334,16 @@ func (p *Properties) setEncAndDec(typ reflect.Type, f *reflect.StructField, lock
vtype = reflect.PtrTo(vtype)
}
- p.mvalprop.CustomType = p.CustomType
- p.mvalprop.StdDuration = p.StdDuration
- p.mvalprop.StdTime = p.StdTime
- p.mvalprop.init(vtype, "Value", f.Tag.Get("protobuf_val"), nil, lockGetProp)
+ p.MapValProp.CustomType = p.CustomType
+ p.MapValProp.StdDuration = p.StdDuration
+ p.MapValProp.StdTime = p.StdTime
+ p.MapValProp.WktPointer = p.WktPointer
+ p.MapValProp.init(vtype, "Value", f.Tag.Get("protobuf_val"), nil, lockGetProp)
}
p.setTag(lockGetProp)
}
func (p *Properties) setTag(lockGetProp bool) {
- // precalculate tag code
- wire := p.WireType
- if p.Packed {
- wire = WireBytes
- }
- x := uint32(p.Tag)<<3 | uint32(wire)
- i := 0
- for i = 0; x > 127; i++ {
- p.tagbuf[i] = 0x80 | uint8(x&0x7F)
- x >>= 7
- }
- p.tagbuf[i] = uint8(x)
- p.tagcode = p.tagbuf[0 : i+1]
-
if p.stype != nil {
if lockGetProp {
p.sprop = GetProperties(p.stype)
@@ -683,20 +354,9 @@ func (p *Properties) setTag(lockGetProp bool) {
}
var (
- marshalerType = reflect.TypeOf((*Marshaler)(nil)).Elem()
- unmarshalerType = reflect.TypeOf((*Unmarshaler)(nil)).Elem()
+ marshalerType = reflect.TypeOf((*Marshaler)(nil)).Elem()
)
-// isMarshaler reports whether type t implements Marshaler.
-func isMarshaler(t reflect.Type) bool {
- return t.Implements(marshalerType)
-}
-
-// isUnmarshaler reports whether type t implements Unmarshaler.
-func isUnmarshaler(t reflect.Type) bool {
- return t.Implements(unmarshalerType)
-}
-
// Init populates the properties from a protocol buffer struct tag.
func (p *Properties) Init(typ reflect.Type, name, tag string, f *reflect.StructField) {
p.init(typ, name, tag, f, true)
@@ -706,14 +366,11 @@ func (p *Properties) init(typ reflect.Type, name, tag string, f *reflect.StructF
// "bytes,49,opt,def=hello!"
p.Name = name
p.OrigName = name
- if f != nil {
- p.field = toField(f)
- }
if tag == "" {
return
}
p.Parse(tag)
- p.setEncAndDec(typ, f, lockGetProp)
+ p.setFieldProps(typ, f, lockGetProp)
}
var (
@@ -734,9 +391,6 @@ func GetProperties(t reflect.Type) *StructProperties {
sprop, ok := propertiesMap[t]
propertiesMu.RUnlock()
if ok {
- if collectStats {
- stats.Chit++
- }
return sprop
}
@@ -749,24 +403,14 @@ func GetProperties(t reflect.Type) *StructProperties {
// getPropertiesLocked requires that propertiesMu is held.
func getPropertiesLocked(t reflect.Type) *StructProperties {
if prop, ok := propertiesMap[t]; ok {
- if collectStats {
- stats.Chit++
- }
return prop
}
- if collectStats {
- stats.Cmiss++
- }
prop := new(StructProperties)
// in case of recursive protos, fill this in now.
propertiesMap[t] = prop
// build properties
- prop.extendable = reflect.PtrTo(t).Implements(extendableProtoType) ||
- reflect.PtrTo(t).Implements(extendableProtoV1Type) ||
- reflect.PtrTo(t).Implements(extendableBytesType)
- prop.unrecField = invalidField
prop.Prop = make([]*Properties, t.NumField())
prop.order = make([]int, t.NumField())
@@ -777,23 +421,6 @@ func getPropertiesLocked(t reflect.Type) *StructProperties {
name := f.Name
p.init(f.Type, name, f.Tag.Get("protobuf"), &f, false)
- if f.Name == "XXX_InternalExtensions" { // special case
- p.enc = (*Buffer).enc_exts
- p.dec = nil // not needed
- p.size = size_exts
- } else if f.Name == "XXX_extensions" { // special case
- if len(f.Tag.Get("protobuf")) > 0 {
- p.enc = (*Buffer).enc_ext_slice_byte
- p.dec = nil // not needed
- p.size = size_ext_slice_byte
- } else {
- p.enc = (*Buffer).enc_map
- p.dec = nil // not needed
- p.size = size_map
- }
- } else if f.Name == "XXX_unrecognized" { // special case
- prop.unrecField = toField(&f)
- }
oneof := f.Tag.Get("protobuf_oneof") // special case
if oneof != "" {
isOneofMessage = true
@@ -809,9 +436,6 @@ func getPropertiesLocked(t reflect.Type) *StructProperties {
}
print("\n")
}
- if p.enc == nil && !strings.HasPrefix(f.Name, "XXX_") && oneof == "" {
- fmt.Fprintln(os.Stderr, "proto: no encoder for", f.Name, f.Type.String(), "[GetProperties]")
- }
}
// Re-order prop.order.
@@ -822,8 +446,7 @@ func getPropertiesLocked(t reflect.Type) *StructProperties {
}
if om, ok := reflect.Zero(reflect.PtrTo(t)).Interface().(oneofMessage); isOneofMessage && ok {
var oots []interface{}
- prop.oneofMarshaler, prop.oneofUnmarshaler, prop.oneofSizer, oots = om.XXX_OneofFuncs()
- prop.stype = t
+ _, _, _, oots = om.XXX_OneofFuncs()
// Interpret oneof metadata.
prop.OneofTypes = make(map[string]*OneofProperties)
@@ -873,30 +496,6 @@ func getPropertiesLocked(t reflect.Type) *StructProperties {
return prop
}
-// Return the Properties object for the x[0]'th field of the structure.
-func propByIndex(t reflect.Type, x []int) *Properties {
- if len(x) != 1 {
- fmt.Fprintf(os.Stderr, "proto: field index dimension %d (not 1) for type %s\n", len(x), t)
- return nil
- }
- prop := GetProperties(t)
- return prop.Prop[x[0]]
-}
-
-// Get the address and type of a pointer to a struct from an interface.
-func getbase(pb Message) (t reflect.Type, b structPointer, err error) {
- if pb == nil {
- err = ErrNil
- return
- }
- // get the reflect type of the pointer to the struct.
- t = reflect.TypeOf(pb)
- // get the address of the struct.
- value := reflect.ValueOf(pb)
- b = toStructPointer(value)
- return
-}
-
// A global registry of enum types.
// The generated code will register the generated maps by calling RegisterEnum.
@@ -925,20 +524,42 @@ func EnumValueMap(enumType string) map[string]int32 {
// A registry of all linked message types.
// The string is a fully-qualified proto name ("pkg.Message").
var (
- protoTypes = make(map[string]reflect.Type)
- revProtoTypes = make(map[reflect.Type]string)
+ protoTypedNils = make(map[string]Message) // a map from proto names to typed nil pointers
+ protoMapTypes = make(map[string]reflect.Type) // a map from proto names to map types
+ revProtoTypes = make(map[reflect.Type]string)
)
// RegisterType is called from generated code and maps from the fully qualified
// proto name to the type (pointer to struct) of the protocol buffer.
func RegisterType(x Message, name string) {
- if _, ok := protoTypes[name]; ok {
+ if _, ok := protoTypedNils[name]; ok {
// TODO: Some day, make this a panic.
log.Printf("proto: duplicate proto type registered: %s", name)
return
}
t := reflect.TypeOf(x)
- protoTypes[name] = t
+ if v := reflect.ValueOf(x); v.Kind() == reflect.Ptr && v.Pointer() == 0 {
+ // Generated code always calls RegisterType with nil x.
+ // This check is just for extra safety.
+ protoTypedNils[name] = x
+ } else {
+ protoTypedNils[name] = reflect.Zero(t).Interface().(Message)
+ }
+ revProtoTypes[t] = name
+}
+
+// RegisterMapType is called from generated code and maps from the fully qualified
+// proto name to the native map type of the proto map definition.
+func RegisterMapType(x interface{}, name string) {
+ if reflect.TypeOf(x).Kind() != reflect.Map {
+ panic(fmt.Sprintf("RegisterMapType(%T, %q); want map", x, name))
+ }
+ if _, ok := protoMapTypes[name]; ok {
+ log.Printf("proto: duplicate proto type registered: %s", name)
+ return
+ }
+ t := reflect.TypeOf(x)
+ protoMapTypes[name] = t
revProtoTypes[t] = name
}
@@ -954,7 +575,14 @@ func MessageName(x Message) string {
}
// MessageType returns the message type (pointer to struct) for a named message.
-func MessageType(name string) reflect.Type { return protoTypes[name] }
+// The type is not guaranteed to implement proto.Message if the name refers to a
+// map entry.
+func MessageType(name string) reflect.Type {
+ if t, ok := protoTypedNils[name]; ok {
+ return reflect.TypeOf(t)
+ }
+ return protoMapTypes[name]
+}
// A registry of all linked proto files.
var (
diff --git a/vendor/github.com/gogo/protobuf/proto/properties_gogo.go b/vendor/github.com/gogo/protobuf/proto/properties_gogo.go
index b6b7176c5..40ea3dd93 100644
--- a/vendor/github.com/gogo/protobuf/proto/properties_gogo.go
+++ b/vendor/github.com/gogo/protobuf/proto/properties_gogo.go
@@ -1,6 +1,6 @@
// Protocol Buffers for Go with Gadgets
//
-// Copyright (c) 2013, The GoGo Authors. All rights reserved.
+// Copyright (c) 2018, The GoGo Authors. All rights reserved.
// http://github.com/gogo/protobuf
//
// Redistribution and use in source and binary forms, with or without
@@ -29,83 +29,8 @@
package proto
import (
- "fmt"
- "os"
"reflect"
)
-func (p *Properties) setCustomEncAndDec(typ reflect.Type) {
- p.ctype = typ
- if p.Repeated {
- p.enc = (*Buffer).enc_custom_slice_bytes
- p.dec = (*Buffer).dec_custom_slice_bytes
- p.size = size_custom_slice_bytes
- } else if typ.Kind() == reflect.Ptr {
- p.enc = (*Buffer).enc_custom_bytes
- p.dec = (*Buffer).dec_custom_bytes
- p.size = size_custom_bytes
- } else {
- p.enc = (*Buffer).enc_custom_ref_bytes
- p.dec = (*Buffer).dec_custom_ref_bytes
- p.size = size_custom_ref_bytes
- }
-}
-
-func (p *Properties) setDurationEncAndDec(typ reflect.Type) {
- if p.Repeated {
- if typ.Elem().Kind() == reflect.Ptr {
- p.enc = (*Buffer).enc_slice_duration
- p.dec = (*Buffer).dec_slice_duration
- p.size = size_slice_duration
- } else {
- p.enc = (*Buffer).enc_slice_ref_duration
- p.dec = (*Buffer).dec_slice_ref_duration
- p.size = size_slice_ref_duration
- }
- } else if typ.Kind() == reflect.Ptr {
- p.enc = (*Buffer).enc_duration
- p.dec = (*Buffer).dec_duration
- p.size = size_duration
- } else {
- p.enc = (*Buffer).enc_ref_duration
- p.dec = (*Buffer).dec_ref_duration
- p.size = size_ref_duration
- }
-}
-
-func (p *Properties) setTimeEncAndDec(typ reflect.Type) {
- if p.Repeated {
- if typ.Elem().Kind() == reflect.Ptr {
- p.enc = (*Buffer).enc_slice_time
- p.dec = (*Buffer).dec_slice_time
- p.size = size_slice_time
- } else {
- p.enc = (*Buffer).enc_slice_ref_time
- p.dec = (*Buffer).dec_slice_ref_time
- p.size = size_slice_ref_time
- }
- } else if typ.Kind() == reflect.Ptr {
- p.enc = (*Buffer).enc_time
- p.dec = (*Buffer).dec_time
- p.size = size_time
- } else {
- p.enc = (*Buffer).enc_ref_time
- p.dec = (*Buffer).dec_ref_time
- p.size = size_ref_time
- }
-
-}
-
-func (p *Properties) setSliceOfNonPointerStructs(typ reflect.Type) {
- t2 := typ.Elem()
- p.sstype = typ
- p.stype = t2
- p.isMarshaler = isMarshaler(t2)
- p.isUnmarshaler = isUnmarshaler(t2)
- p.enc = (*Buffer).enc_slice_ref_struct_message
- p.dec = (*Buffer).dec_slice_ref_struct_message
- p.size = size_slice_ref_struct_message
- if p.Wire != "bytes" {
- fmt.Fprintf(os.Stderr, "proto: no ptr oenc for %T -> %T \n", typ, t2)
- }
-}
+var sizerType = reflect.TypeOf((*Sizer)(nil)).Elem()
+var protosizerType = reflect.TypeOf((*ProtoSizer)(nil)).Elem()
diff --git a/vendor/github.com/gogo/protobuf/proto/table_marshal.go b/vendor/github.com/gogo/protobuf/proto/table_marshal.go
new file mode 100644
index 000000000..9b1538d05
--- /dev/null
+++ b/vendor/github.com/gogo/protobuf/proto/table_marshal.go
@@ -0,0 +1,3006 @@
+// Go support for Protocol Buffers - Google's data interchange format
+//
+// Copyright 2016 The Go Authors. All rights reserved.
+// https://github.com/golang/protobuf
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package proto
+
+import (
+ "errors"
+ "fmt"
+ "math"
+ "reflect"
+ "sort"
+ "strconv"
+ "strings"
+ "sync"
+ "sync/atomic"
+ "unicode/utf8"
+)
+
+// a sizer takes a pointer to a field and the size of its tag, computes the size of
+// the encoded data.
+type sizer func(pointer, int) int
+
+// a marshaler takes a byte slice, a pointer to a field, and its tag (in wire format),
+// marshals the field to the end of the slice, returns the slice and error (if any).
+type marshaler func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error)
+
+// marshalInfo is the information used for marshaling a message.
+type marshalInfo struct {
+ typ reflect.Type
+ fields []*marshalFieldInfo
+ unrecognized field // offset of XXX_unrecognized
+ extensions field // offset of XXX_InternalExtensions
+ v1extensions field // offset of XXX_extensions
+ sizecache field // offset of XXX_sizecache
+ initialized int32 // 0 -- only typ is set, 1 -- fully initialized
+ messageset bool // uses message set wire format
+ hasmarshaler bool // has custom marshaler
+ sync.RWMutex // protect extElems map, also for initialization
+ extElems map[int32]*marshalElemInfo // info of extension elements
+
+ hassizer bool // has custom sizer
+ hasprotosizer bool // has custom protosizer
+
+ bytesExtensions field // offset of XXX_extensions where the field type is []byte
+}
+
+// marshalFieldInfo is the information used for marshaling a field of a message.
+type marshalFieldInfo struct {
+ field field
+ wiretag uint64 // tag in wire format
+ tagsize int // size of tag in wire format
+ sizer sizer
+ marshaler marshaler
+ isPointer bool
+ required bool // field is required
+ name string // name of the field, for error reporting
+ oneofElems map[reflect.Type]*marshalElemInfo // info of oneof elements
+}
+
+// marshalElemInfo is the information used for marshaling an extension or oneof element.
+type marshalElemInfo struct {
+ wiretag uint64 // tag in wire format
+ tagsize int // size of tag in wire format
+ sizer sizer
+ marshaler marshaler
+ isptr bool // elem is pointer typed, thus interface of this type is a direct interface (extension only)
+}
+
+var (
+ marshalInfoMap = map[reflect.Type]*marshalInfo{}
+ marshalInfoLock sync.Mutex
+
+ uint8SliceType = reflect.TypeOf(([]uint8)(nil)).Kind()
+)
+
+// getMarshalInfo returns the information to marshal a given type of message.
+// The info it returns may not necessarily initialized.
+// t is the type of the message (NOT the pointer to it).
+func getMarshalInfo(t reflect.Type) *marshalInfo {
+ marshalInfoLock.Lock()
+ u, ok := marshalInfoMap[t]
+ if !ok {
+ u = &marshalInfo{typ: t}
+ marshalInfoMap[t] = u
+ }
+ marshalInfoLock.Unlock()
+ return u
+}
+
+// Size is the entry point from generated code,
+// and should be ONLY called by generated code.
+// It computes the size of encoded data of msg.
+// a is a pointer to a place to store cached marshal info.
+func (a *InternalMessageInfo) Size(msg Message) int {
+ u := getMessageMarshalInfo(msg, a)
+ ptr := toPointer(&msg)
+ if ptr.isNil() {
+ // We get here if msg is a typed nil ((*SomeMessage)(nil)),
+ // so it satisfies the interface, and msg == nil wouldn't
+ // catch it. We don't want crash in this case.
+ return 0
+ }
+ return u.size(ptr)
+}
+
+// Marshal is the entry point from generated code,
+// and should be ONLY called by generated code.
+// It marshals msg to the end of b.
+// a is a pointer to a place to store cached marshal info.
+func (a *InternalMessageInfo) Marshal(b []byte, msg Message, deterministic bool) ([]byte, error) {
+ u := getMessageMarshalInfo(msg, a)
+ ptr := toPointer(&msg)
+ if ptr.isNil() {
+ // We get here if msg is a typed nil ((*SomeMessage)(nil)),
+ // so it satisfies the interface, and msg == nil wouldn't
+ // catch it. We don't want crash in this case.
+ return b, ErrNil
+ }
+ return u.marshal(b, ptr, deterministic)
+}
+
+func getMessageMarshalInfo(msg interface{}, a *InternalMessageInfo) *marshalInfo {
+ // u := a.marshal, but atomically.
+ // We use an atomic here to ensure memory consistency.
+ u := atomicLoadMarshalInfo(&a.marshal)
+ if u == nil {
+ // Get marshal information from type of message.
+ t := reflect.ValueOf(msg).Type()
+ if t.Kind() != reflect.Ptr {
+ panic(fmt.Sprintf("cannot handle non-pointer message type %v", t))
+ }
+ u = getMarshalInfo(t.Elem())
+ // Store it in the cache for later users.
+ // a.marshal = u, but atomically.
+ atomicStoreMarshalInfo(&a.marshal, u)
+ }
+ return u
+}
+
+// size is the main function to compute the size of the encoded data of a message.
+// ptr is the pointer to the message.
+func (u *marshalInfo) size(ptr pointer) int {
+ if atomic.LoadInt32(&u.initialized) == 0 {
+ u.computeMarshalInfo()
+ }
+
+ // If the message can marshal itself, let it do it, for compatibility.
+ // NOTE: This is not efficient.
+ if u.hasmarshaler {
+ // Uses the message's Size method if available
+ if u.hassizer {
+ s := ptr.asPointerTo(u.typ).Interface().(Sizer)
+ return s.Size()
+ }
+ // Uses the message's ProtoSize method if available
+ if u.hasprotosizer {
+ s := ptr.asPointerTo(u.typ).Interface().(ProtoSizer)
+ return s.ProtoSize()
+ }
+
+ m := ptr.asPointerTo(u.typ).Interface().(Marshaler)
+ b, _ := m.Marshal()
+ return len(b)
+ }
+
+ n := 0
+ for _, f := range u.fields {
+ if f.isPointer && ptr.offset(f.field).getPointer().isNil() {
+ // nil pointer always marshals to nothing
+ continue
+ }
+ n += f.sizer(ptr.offset(f.field), f.tagsize)
+ }
+ if u.extensions.IsValid() {
+ e := ptr.offset(u.extensions).toExtensions()
+ if u.messageset {
+ n += u.sizeMessageSet(e)
+ } else {
+ n += u.sizeExtensions(e)
+ }
+ }
+ if u.v1extensions.IsValid() {
+ m := *ptr.offset(u.v1extensions).toOldExtensions()
+ n += u.sizeV1Extensions(m)
+ }
+ if u.bytesExtensions.IsValid() {
+ s := *ptr.offset(u.bytesExtensions).toBytes()
+ n += len(s)
+ }
+ if u.unrecognized.IsValid() {
+ s := *ptr.offset(u.unrecognized).toBytes()
+ n += len(s)
+ }
+
+ // cache the result for use in marshal
+ if u.sizecache.IsValid() {
+ atomic.StoreInt32(ptr.offset(u.sizecache).toInt32(), int32(n))
+ }
+ return n
+}
+
+// cachedsize gets the size from cache. If there is no cache (i.e. message is not generated),
+// fall back to compute the size.
+func (u *marshalInfo) cachedsize(ptr pointer) int {
+ if u.sizecache.IsValid() {
+ return int(atomic.LoadInt32(ptr.offset(u.sizecache).toInt32()))
+ }
+ return u.size(ptr)
+}
+
+// marshal is the main function to marshal a message. It takes a byte slice and appends
+// the encoded data to the end of the slice, returns the slice and error (if any).
+// ptr is the pointer to the message.
+// If deterministic is true, map is marshaled in deterministic order.
+func (u *marshalInfo) marshal(b []byte, ptr pointer, deterministic bool) ([]byte, error) {
+ if atomic.LoadInt32(&u.initialized) == 0 {
+ u.computeMarshalInfo()
+ }
+
+ // If the message can marshal itself, let it do it, for compatibility.
+ // NOTE: This is not efficient.
+ if u.hasmarshaler {
+ m := ptr.asPointerTo(u.typ).Interface().(Marshaler)
+ b1, err := m.Marshal()
+ b = append(b, b1...)
+ return b, err
+ }
+
+ var err, errLater error
+ // The old marshaler encodes extensions at beginning.
+ if u.extensions.IsValid() {
+ e := ptr.offset(u.extensions).toExtensions()
+ if u.messageset {
+ b, err = u.appendMessageSet(b, e, deterministic)
+ } else {
+ b, err = u.appendExtensions(b, e, deterministic)
+ }
+ if err != nil {
+ return b, err
+ }
+ }
+ if u.v1extensions.IsValid() {
+ m := *ptr.offset(u.v1extensions).toOldExtensions()
+ b, err = u.appendV1Extensions(b, m, deterministic)
+ if err != nil {
+ return b, err
+ }
+ }
+ if u.bytesExtensions.IsValid() {
+ s := *ptr.offset(u.bytesExtensions).toBytes()
+ b = append(b, s...)
+ }
+ for _, f := range u.fields {
+ if f.required {
+ if f.isPointer && ptr.offset(f.field).getPointer().isNil() {
+ // Required field is not set.
+ // We record the error but keep going, to give a complete marshaling.
+ if errLater == nil {
+ errLater = &RequiredNotSetError{f.name}
+ }
+ continue
+ }
+ }
+ if f.isPointer && ptr.offset(f.field).getPointer().isNil() {
+ // nil pointer always marshals to nothing
+ continue
+ }
+ b, err = f.marshaler(b, ptr.offset(f.field), f.wiretag, deterministic)
+ if err != nil {
+ if err1, ok := err.(*RequiredNotSetError); ok {
+ // Required field in submessage is not set.
+ // We record the error but keep going, to give a complete marshaling.
+ if errLater == nil {
+ errLater = &RequiredNotSetError{f.name + "." + err1.field}
+ }
+ continue
+ }
+ if err == errRepeatedHasNil {
+ err = errors.New("proto: repeated field " + f.name + " has nil element")
+ }
+ if err == errInvalidUTF8 {
+ if errLater == nil {
+ fullName := revProtoTypes[reflect.PtrTo(u.typ)] + "." + f.name
+ errLater = &invalidUTF8Error{fullName}
+ }
+ continue
+ }
+ return b, err
+ }
+ }
+ if u.unrecognized.IsValid() {
+ s := *ptr.offset(u.unrecognized).toBytes()
+ b = append(b, s...)
+ }
+ return b, errLater
+}
+
+// computeMarshalInfo initializes the marshal info.
+func (u *marshalInfo) computeMarshalInfo() {
+ u.Lock()
+ defer u.Unlock()
+ if u.initialized != 0 { // non-atomic read is ok as it is protected by the lock
+ return
+ }
+
+ t := u.typ
+ u.unrecognized = invalidField
+ u.extensions = invalidField
+ u.v1extensions = invalidField
+ u.bytesExtensions = invalidField
+ u.sizecache = invalidField
+ isOneofMessage := false
+
+ if reflect.PtrTo(t).Implements(sizerType) {
+ u.hassizer = true
+ }
+ if reflect.PtrTo(t).Implements(protosizerType) {
+ u.hasprotosizer = true
+ }
+ // If the message can marshal itself, let it do it, for compatibility.
+ // NOTE: This is not efficient.
+ if reflect.PtrTo(t).Implements(marshalerType) {
+ u.hasmarshaler = true
+ atomic.StoreInt32(&u.initialized, 1)
+ return
+ }
+
+ n := t.NumField()
+
+ // deal with XXX fields first
+ for i := 0; i < t.NumField(); i++ {
+ f := t.Field(i)
+ if f.Tag.Get("protobuf_oneof") != "" {
+ isOneofMessage = true
+ }
+ if !strings.HasPrefix(f.Name, "XXX_") {
+ continue
+ }
+ switch f.Name {
+ case "XXX_sizecache":
+ u.sizecache = toField(&f)
+ case "XXX_unrecognized":
+ u.unrecognized = toField(&f)
+ case "XXX_InternalExtensions":
+ u.extensions = toField(&f)
+ u.messageset = f.Tag.Get("protobuf_messageset") == "1"
+ case "XXX_extensions":
+ if f.Type.Kind() == reflect.Map {
+ u.v1extensions = toField(&f)
+ } else {
+ u.bytesExtensions = toField(&f)
+ }
+ case "XXX_NoUnkeyedLiteral":
+ // nothing to do
+ default:
+ panic("unknown XXX field: " + f.Name)
+ }
+ n--
+ }
+
+ // get oneof implementers
+ var oneofImplementers []interface{}
+ // gogo: isOneofMessage is needed for embedded oneof messages, without a marshaler and unmarshaler
+ if m, ok := reflect.Zero(reflect.PtrTo(t)).Interface().(oneofMessage); ok && isOneofMessage {
+ _, _, _, oneofImplementers = m.XXX_OneofFuncs()
+ }
+
+ // normal fields
+ fields := make([]marshalFieldInfo, n) // batch allocation
+ u.fields = make([]*marshalFieldInfo, 0, n)
+ for i, j := 0, 0; i < t.NumField(); i++ {
+ f := t.Field(i)
+
+ if strings.HasPrefix(f.Name, "XXX_") {
+ continue
+ }
+ field := &fields[j]
+ j++
+ field.name = f.Name
+ u.fields = append(u.fields, field)
+ if f.Tag.Get("protobuf_oneof") != "" {
+ field.computeOneofFieldInfo(&f, oneofImplementers)
+ continue
+ }
+ if f.Tag.Get("protobuf") == "" {
+ // field has no tag (not in generated message), ignore it
+ u.fields = u.fields[:len(u.fields)-1]
+ j--
+ continue
+ }
+ field.computeMarshalFieldInfo(&f)
+ }
+
+ // fields are marshaled in tag order on the wire.
+ sort.Sort(byTag(u.fields))
+
+ atomic.StoreInt32(&u.initialized, 1)
+}
+
+// helper for sorting fields by tag
+type byTag []*marshalFieldInfo
+
+func (a byTag) Len() int { return len(a) }
+func (a byTag) Swap(i, j int) { a[i], a[j] = a[j], a[i] }
+func (a byTag) Less(i, j int) bool { return a[i].wiretag < a[j].wiretag }
+
+// getExtElemInfo returns the information to marshal an extension element.
+// The info it returns is initialized.
+func (u *marshalInfo) getExtElemInfo(desc *ExtensionDesc) *marshalElemInfo {
+ // get from cache first
+ u.RLock()
+ e, ok := u.extElems[desc.Field]
+ u.RUnlock()
+ if ok {
+ return e
+ }
+
+ t := reflect.TypeOf(desc.ExtensionType) // pointer or slice to basic type or struct
+ tags := strings.Split(desc.Tag, ",")
+ tag, err := strconv.Atoi(tags[1])
+ if err != nil {
+ panic("tag is not an integer")
+ }
+ wt := wiretype(tags[0])
+ sizr, marshalr := typeMarshaler(t, tags, false, false)
+ e = &marshalElemInfo{
+ wiretag: uint64(tag)<<3 | wt,
+ tagsize: SizeVarint(uint64(tag) << 3),
+ sizer: sizr,
+ marshaler: marshalr,
+ isptr: t.Kind() == reflect.Ptr,
+ }
+
+ // update cache
+ u.Lock()
+ if u.extElems == nil {
+ u.extElems = make(map[int32]*marshalElemInfo)
+ }
+ u.extElems[desc.Field] = e
+ u.Unlock()
+ return e
+}
+
+// computeMarshalFieldInfo fills up the information to marshal a field.
+func (fi *marshalFieldInfo) computeMarshalFieldInfo(f *reflect.StructField) {
+ // parse protobuf tag of the field.
+ // tag has format of "bytes,49,opt,name=foo,def=hello!"
+ tags := strings.Split(f.Tag.Get("protobuf"), ",")
+ if tags[0] == "" {
+ return
+ }
+ tag, err := strconv.Atoi(tags[1])
+ if err != nil {
+ panic("tag is not an integer")
+ }
+ wt := wiretype(tags[0])
+ if tags[2] == "req" {
+ fi.required = true
+ }
+ fi.setTag(f, tag, wt)
+ fi.setMarshaler(f, tags)
+}
+
+func (fi *marshalFieldInfo) computeOneofFieldInfo(f *reflect.StructField, oneofImplementers []interface{}) {
+ fi.field = toField(f)
+ fi.wiretag = math.MaxInt32 // Use a large tag number, make oneofs sorted at the end. This tag will not appear on the wire.
+ fi.isPointer = true
+ fi.sizer, fi.marshaler = makeOneOfMarshaler(fi, f)
+ fi.oneofElems = make(map[reflect.Type]*marshalElemInfo)
+
+ ityp := f.Type // interface type
+ for _, o := range oneofImplementers {
+ t := reflect.TypeOf(o)
+ if !t.Implements(ityp) {
+ continue
+ }
+ sf := t.Elem().Field(0) // oneof implementer is a struct with a single field
+ tags := strings.Split(sf.Tag.Get("protobuf"), ",")
+ tag, err := strconv.Atoi(tags[1])
+ if err != nil {
+ panic("tag is not an integer")
+ }
+ wt := wiretype(tags[0])
+ sizr, marshalr := typeMarshaler(sf.Type, tags, false, true) // oneof should not omit any zero value
+ fi.oneofElems[t.Elem()] = &marshalElemInfo{
+ wiretag: uint64(tag)<<3 | wt,
+ tagsize: SizeVarint(uint64(tag) << 3),
+ sizer: sizr,
+ marshaler: marshalr,
+ }
+ }
+}
+
+type oneofMessage interface {
+ XXX_OneofFuncs() (func(Message, *Buffer) error, func(Message, int, int, *Buffer) (bool, error), func(Message) int, []interface{})
+}
+
+// wiretype returns the wire encoding of the type.
+func wiretype(encoding string) uint64 {
+ switch encoding {
+ case "fixed32":
+ return WireFixed32
+ case "fixed64":
+ return WireFixed64
+ case "varint", "zigzag32", "zigzag64":
+ return WireVarint
+ case "bytes":
+ return WireBytes
+ case "group":
+ return WireStartGroup
+ }
+ panic("unknown wire type " + encoding)
+}
+
+// setTag fills up the tag (in wire format) and its size in the info of a field.
+func (fi *marshalFieldInfo) setTag(f *reflect.StructField, tag int, wt uint64) {
+ fi.field = toField(f)
+ fi.wiretag = uint64(tag)<<3 | wt
+ fi.tagsize = SizeVarint(uint64(tag) << 3)
+}
+
+// setMarshaler fills up the sizer and marshaler in the info of a field.
+func (fi *marshalFieldInfo) setMarshaler(f *reflect.StructField, tags []string) {
+ switch f.Type.Kind() {
+ case reflect.Map:
+ // map field
+ fi.isPointer = true
+ fi.sizer, fi.marshaler = makeMapMarshaler(f)
+ return
+ case reflect.Ptr, reflect.Slice:
+ fi.isPointer = true
+ }
+ fi.sizer, fi.marshaler = typeMarshaler(f.Type, tags, true, false)
+}
+
+// typeMarshaler returns the sizer and marshaler of a given field.
+// t is the type of the field.
+// tags is the generated "protobuf" tag of the field.
+// If nozero is true, zero value is not marshaled to the wire.
+// If oneof is true, it is a oneof field.
+func typeMarshaler(t reflect.Type, tags []string, nozero, oneof bool) (sizer, marshaler) {
+ encoding := tags[0]
+
+ pointer := false
+ slice := false
+ if t.Kind() == reflect.Slice && t.Elem().Kind() != reflect.Uint8 {
+ slice = true
+ t = t.Elem()
+ }
+ if t.Kind() == reflect.Ptr {
+ pointer = true
+ t = t.Elem()
+ }
+
+ packed := false
+ proto3 := false
+ ctype := false
+ isTime := false
+ isDuration := false
+ isWktPointer := false
+ validateUTF8 := true
+ for i := 2; i < len(tags); i++ {
+ if tags[i] == "packed" {
+ packed = true
+ }
+ if tags[i] == "proto3" {
+ proto3 = true
+ }
+ if strings.HasPrefix(tags[i], "customtype=") {
+ ctype = true
+ }
+ if tags[i] == "stdtime" {
+ isTime = true
+ }
+ if tags[i] == "stdduration" {
+ isDuration = true
+ }
+ if tags[i] == "wktptr" {
+ isWktPointer = true
+ }
+ }
+ validateUTF8 = validateUTF8 && proto3
+ if !proto3 && !pointer && !slice {
+ nozero = false
+ }
+
+ if ctype {
+ if reflect.PtrTo(t).Implements(customType) {
+ if slice {
+ return makeMessageRefSliceMarshaler(getMarshalInfo(t))
+ }
+ if pointer {
+ return makeCustomPtrMarshaler(getMarshalInfo(t))
+ }
+ return makeCustomMarshaler(getMarshalInfo(t))
+ } else {
+ panic(fmt.Sprintf("custom type: type: %v, does not implement the proto.custom interface", t))
+ }
+ }
+
+ if isTime {
+ if pointer {
+ if slice {
+ return makeTimePtrSliceMarshaler(getMarshalInfo(t))
+ }
+ return makeTimePtrMarshaler(getMarshalInfo(t))
+ }
+ if slice {
+ return makeTimeSliceMarshaler(getMarshalInfo(t))
+ }
+ return makeTimeMarshaler(getMarshalInfo(t))
+ }
+
+ if isDuration {
+ if pointer {
+ if slice {
+ return makeDurationPtrSliceMarshaler(getMarshalInfo(t))
+ }
+ return makeDurationPtrMarshaler(getMarshalInfo(t))
+ }
+ if slice {
+ return makeDurationSliceMarshaler(getMarshalInfo(t))
+ }
+ return makeDurationMarshaler(getMarshalInfo(t))
+ }
+
+ if isWktPointer {
+ switch t.Kind() {
+ case reflect.Float64:
+ if pointer {
+ if slice {
+ return makeStdDoubleValuePtrSliceMarshaler(getMarshalInfo(t))
+ }
+ return makeStdDoubleValuePtrMarshaler(getMarshalInfo(t))
+ }
+ if slice {
+ return makeStdDoubleValueSliceMarshaler(getMarshalInfo(t))
+ }
+ return makeStdDoubleValueMarshaler(getMarshalInfo(t))
+ case reflect.Float32:
+ if pointer {
+ if slice {
+ return makeStdFloatValuePtrSliceMarshaler(getMarshalInfo(t))
+ }
+ return makeStdFloatValuePtrMarshaler(getMarshalInfo(t))
+ }
+ if slice {
+ return makeStdFloatValueSliceMarshaler(getMarshalInfo(t))
+ }
+ return makeStdFloatValueMarshaler(getMarshalInfo(t))
+ case reflect.Int64:
+ if pointer {
+ if slice {
+ return makeStdInt64ValuePtrSliceMarshaler(getMarshalInfo(t))
+ }
+ return makeStdInt64ValuePtrMarshaler(getMarshalInfo(t))
+ }
+ if slice {
+ return makeStdInt64ValueSliceMarshaler(getMarshalInfo(t))
+ }
+ return makeStdInt64ValueMarshaler(getMarshalInfo(t))
+ case reflect.Uint64:
+ if pointer {
+ if slice {
+ return makeStdUInt64ValuePtrSliceMarshaler(getMarshalInfo(t))
+ }
+ return makeStdUInt64ValuePtrMarshaler(getMarshalInfo(t))
+ }
+ if slice {
+ return makeStdUInt64ValueSliceMarshaler(getMarshalInfo(t))
+ }
+ return makeStdUInt64ValueMarshaler(getMarshalInfo(t))
+ case reflect.Int32:
+ if pointer {
+ if slice {
+ return makeStdInt32ValuePtrSliceMarshaler(getMarshalInfo(t))
+ }
+ return makeStdInt32ValuePtrMarshaler(getMarshalInfo(t))
+ }
+ if slice {
+ return makeStdInt32ValueSliceMarshaler(getMarshalInfo(t))
+ }
+ return makeStdInt32ValueMarshaler(getMarshalInfo(t))
+ case reflect.Uint32:
+ if pointer {
+ if slice {
+ return makeStdUInt32ValuePtrSliceMarshaler(getMarshalInfo(t))
+ }
+ return makeStdUInt32ValuePtrMarshaler(getMarshalInfo(t))
+ }
+ if slice {
+ return makeStdUInt32ValueSliceMarshaler(getMarshalInfo(t))
+ }
+ return makeStdUInt32ValueMarshaler(getMarshalInfo(t))
+ case reflect.Bool:
+ if pointer {
+ if slice {
+ return makeStdBoolValuePtrSliceMarshaler(getMarshalInfo(t))
+ }
+ return makeStdBoolValuePtrMarshaler(getMarshalInfo(t))
+ }
+ if slice {
+ return makeStdBoolValueSliceMarshaler(getMarshalInfo(t))
+ }
+ return makeStdBoolValueMarshaler(getMarshalInfo(t))
+ case reflect.String:
+ if pointer {
+ if slice {
+ return makeStdStringValuePtrSliceMarshaler(getMarshalInfo(t))
+ }
+ return makeStdStringValuePtrMarshaler(getMarshalInfo(t))
+ }
+ if slice {
+ return makeStdStringValueSliceMarshaler(getMarshalInfo(t))
+ }
+ return makeStdStringValueMarshaler(getMarshalInfo(t))
+ case uint8SliceType:
+ if pointer {
+ if slice {
+ return makeStdBytesValuePtrSliceMarshaler(getMarshalInfo(t))
+ }
+ return makeStdBytesValuePtrMarshaler(getMarshalInfo(t))
+ }
+ if slice {
+ return makeStdBytesValueSliceMarshaler(getMarshalInfo(t))
+ }
+ return makeStdBytesValueMarshaler(getMarshalInfo(t))
+ default:
+ panic(fmt.Sprintf("unknown wktpointer type %#v", t))
+ }
+ }
+
+ switch t.Kind() {
+ case reflect.Bool:
+ if pointer {
+ return sizeBoolPtr, appendBoolPtr
+ }
+ if slice {
+ if packed {
+ return sizeBoolPackedSlice, appendBoolPackedSlice
+ }
+ return sizeBoolSlice, appendBoolSlice
+ }
+ if nozero {
+ return sizeBoolValueNoZero, appendBoolValueNoZero
+ }
+ return sizeBoolValue, appendBoolValue
+ case reflect.Uint32:
+ switch encoding {
+ case "fixed32":
+ if pointer {
+ return sizeFixed32Ptr, appendFixed32Ptr
+ }
+ if slice {
+ if packed {
+ return sizeFixed32PackedSlice, appendFixed32PackedSlice
+ }
+ return sizeFixed32Slice, appendFixed32Slice
+ }
+ if nozero {
+ return sizeFixed32ValueNoZero, appendFixed32ValueNoZero
+ }
+ return sizeFixed32Value, appendFixed32Value
+ case "varint":
+ if pointer {
+ return sizeVarint32Ptr, appendVarint32Ptr
+ }
+ if slice {
+ if packed {
+ return sizeVarint32PackedSlice, appendVarint32PackedSlice
+ }
+ return sizeVarint32Slice, appendVarint32Slice
+ }
+ if nozero {
+ return sizeVarint32ValueNoZero, appendVarint32ValueNoZero
+ }
+ return sizeVarint32Value, appendVarint32Value
+ }
+ case reflect.Int32:
+ switch encoding {
+ case "fixed32":
+ if pointer {
+ return sizeFixedS32Ptr, appendFixedS32Ptr
+ }
+ if slice {
+ if packed {
+ return sizeFixedS32PackedSlice, appendFixedS32PackedSlice
+ }
+ return sizeFixedS32Slice, appendFixedS32Slice
+ }
+ if nozero {
+ return sizeFixedS32ValueNoZero, appendFixedS32ValueNoZero
+ }
+ return sizeFixedS32Value, appendFixedS32Value
+ case "varint":
+ if pointer {
+ return sizeVarintS32Ptr, appendVarintS32Ptr
+ }
+ if slice {
+ if packed {
+ return sizeVarintS32PackedSlice, appendVarintS32PackedSlice
+ }
+ return sizeVarintS32Slice, appendVarintS32Slice
+ }
+ if nozero {
+ return sizeVarintS32ValueNoZero, appendVarintS32ValueNoZero
+ }
+ return sizeVarintS32Value, appendVarintS32Value
+ case "zigzag32":
+ if pointer {
+ return sizeZigzag32Ptr, appendZigzag32Ptr
+ }
+ if slice {
+ if packed {
+ return sizeZigzag32PackedSlice, appendZigzag32PackedSlice
+ }
+ return sizeZigzag32Slice, appendZigzag32Slice
+ }
+ if nozero {
+ return sizeZigzag32ValueNoZero, appendZigzag32ValueNoZero
+ }
+ return sizeZigzag32Value, appendZigzag32Value
+ }
+ case reflect.Uint64:
+ switch encoding {
+ case "fixed64":
+ if pointer {
+ return sizeFixed64Ptr, appendFixed64Ptr
+ }
+ if slice {
+ if packed {
+ return sizeFixed64PackedSlice, appendFixed64PackedSlice
+ }
+ return sizeFixed64Slice, appendFixed64Slice
+ }
+ if nozero {
+ return sizeFixed64ValueNoZero, appendFixed64ValueNoZero
+ }
+ return sizeFixed64Value, appendFixed64Value
+ case "varint":
+ if pointer {
+ return sizeVarint64Ptr, appendVarint64Ptr
+ }
+ if slice {
+ if packed {
+ return sizeVarint64PackedSlice, appendVarint64PackedSlice
+ }
+ return sizeVarint64Slice, appendVarint64Slice
+ }
+ if nozero {
+ return sizeVarint64ValueNoZero, appendVarint64ValueNoZero
+ }
+ return sizeVarint64Value, appendVarint64Value
+ }
+ case reflect.Int64:
+ switch encoding {
+ case "fixed64":
+ if pointer {
+ return sizeFixedS64Ptr, appendFixedS64Ptr
+ }
+ if slice {
+ if packed {
+ return sizeFixedS64PackedSlice, appendFixedS64PackedSlice
+ }
+ return sizeFixedS64Slice, appendFixedS64Slice
+ }
+ if nozero {
+ return sizeFixedS64ValueNoZero, appendFixedS64ValueNoZero
+ }
+ return sizeFixedS64Value, appendFixedS64Value
+ case "varint":
+ if pointer {
+ return sizeVarintS64Ptr, appendVarintS64Ptr
+ }
+ if slice {
+ if packed {
+ return sizeVarintS64PackedSlice, appendVarintS64PackedSlice
+ }
+ return sizeVarintS64Slice, appendVarintS64Slice
+ }
+ if nozero {
+ return sizeVarintS64ValueNoZero, appendVarintS64ValueNoZero
+ }
+ return sizeVarintS64Value, appendVarintS64Value
+ case "zigzag64":
+ if pointer {
+ return sizeZigzag64Ptr, appendZigzag64Ptr
+ }
+ if slice {
+ if packed {
+ return sizeZigzag64PackedSlice, appendZigzag64PackedSlice
+ }
+ return sizeZigzag64Slice, appendZigzag64Slice
+ }
+ if nozero {
+ return sizeZigzag64ValueNoZero, appendZigzag64ValueNoZero
+ }
+ return sizeZigzag64Value, appendZigzag64Value
+ }
+ case reflect.Float32:
+ if pointer {
+ return sizeFloat32Ptr, appendFloat32Ptr
+ }
+ if slice {
+ if packed {
+ return sizeFloat32PackedSlice, appendFloat32PackedSlice
+ }
+ return sizeFloat32Slice, appendFloat32Slice
+ }
+ if nozero {
+ return sizeFloat32ValueNoZero, appendFloat32ValueNoZero
+ }
+ return sizeFloat32Value, appendFloat32Value
+ case reflect.Float64:
+ if pointer {
+ return sizeFloat64Ptr, appendFloat64Ptr
+ }
+ if slice {
+ if packed {
+ return sizeFloat64PackedSlice, appendFloat64PackedSlice
+ }
+ return sizeFloat64Slice, appendFloat64Slice
+ }
+ if nozero {
+ return sizeFloat64ValueNoZero, appendFloat64ValueNoZero
+ }
+ return sizeFloat64Value, appendFloat64Value
+ case reflect.String:
+ if validateUTF8 {
+ if pointer {
+ return sizeStringPtr, appendUTF8StringPtr
+ }
+ if slice {
+ return sizeStringSlice, appendUTF8StringSlice
+ }
+ if nozero {
+ return sizeStringValueNoZero, appendUTF8StringValueNoZero
+ }
+ return sizeStringValue, appendUTF8StringValue
+ }
+ if pointer {
+ return sizeStringPtr, appendStringPtr
+ }
+ if slice {
+ return sizeStringSlice, appendStringSlice
+ }
+ if nozero {
+ return sizeStringValueNoZero, appendStringValueNoZero
+ }
+ return sizeStringValue, appendStringValue
+ case reflect.Slice:
+ if slice {
+ return sizeBytesSlice, appendBytesSlice
+ }
+ if oneof {
+ // Oneof bytes field may also have "proto3" tag.
+ // We want to marshal it as a oneof field. Do this
+ // check before the proto3 check.
+ return sizeBytesOneof, appendBytesOneof
+ }
+ if proto3 {
+ return sizeBytes3, appendBytes3
+ }
+ return sizeBytes, appendBytes
+ case reflect.Struct:
+ switch encoding {
+ case "group":
+ if slice {
+ return makeGroupSliceMarshaler(getMarshalInfo(t))
+ }
+ return makeGroupMarshaler(getMarshalInfo(t))
+ case "bytes":
+ if pointer {
+ if slice {
+ return makeMessageSliceMarshaler(getMarshalInfo(t))
+ }
+ return makeMessageMarshaler(getMarshalInfo(t))
+ } else {
+ if slice {
+ return makeMessageRefSliceMarshaler(getMarshalInfo(t))
+ }
+ return makeMessageRefMarshaler(getMarshalInfo(t))
+ }
+ }
+ }
+ panic(fmt.Sprintf("unknown or mismatched type: type: %v, wire type: %v", t, encoding))
+}
+
+// Below are functions to size/marshal a specific type of a field.
+// They are stored in the field's info, and called by function pointers.
+// They have type sizer or marshaler.
+
+func sizeFixed32Value(_ pointer, tagsize int) int {
+ return 4 + tagsize
+}
+func sizeFixed32ValueNoZero(ptr pointer, tagsize int) int {
+ v := *ptr.toUint32()
+ if v == 0 {
+ return 0
+ }
+ return 4 + tagsize
+}
+func sizeFixed32Ptr(ptr pointer, tagsize int) int {
+ p := *ptr.toUint32Ptr()
+ if p == nil {
+ return 0
+ }
+ return 4 + tagsize
+}
+func sizeFixed32Slice(ptr pointer, tagsize int) int {
+ s := *ptr.toUint32Slice()
+ return (4 + tagsize) * len(s)
+}
+func sizeFixed32PackedSlice(ptr pointer, tagsize int) int {
+ s := *ptr.toUint32Slice()
+ if len(s) == 0 {
+ return 0
+ }
+ return 4*len(s) + SizeVarint(uint64(4*len(s))) + tagsize
+}
+func sizeFixedS32Value(_ pointer, tagsize int) int {
+ return 4 + tagsize
+}
+func sizeFixedS32ValueNoZero(ptr pointer, tagsize int) int {
+ v := *ptr.toInt32()
+ if v == 0 {
+ return 0
+ }
+ return 4 + tagsize
+}
+func sizeFixedS32Ptr(ptr pointer, tagsize int) int {
+ p := ptr.getInt32Ptr()
+ if p == nil {
+ return 0
+ }
+ return 4 + tagsize
+}
+func sizeFixedS32Slice(ptr pointer, tagsize int) int {
+ s := ptr.getInt32Slice()
+ return (4 + tagsize) * len(s)
+}
+func sizeFixedS32PackedSlice(ptr pointer, tagsize int) int {
+ s := ptr.getInt32Slice()
+ if len(s) == 0 {
+ return 0
+ }
+ return 4*len(s) + SizeVarint(uint64(4*len(s))) + tagsize
+}
+func sizeFloat32Value(_ pointer, tagsize int) int {
+ return 4 + tagsize
+}
+func sizeFloat32ValueNoZero(ptr pointer, tagsize int) int {
+ v := math.Float32bits(*ptr.toFloat32())
+ if v == 0 {
+ return 0
+ }
+ return 4 + tagsize
+}
+func sizeFloat32Ptr(ptr pointer, tagsize int) int {
+ p := *ptr.toFloat32Ptr()
+ if p == nil {
+ return 0
+ }
+ return 4 + tagsize
+}
+func sizeFloat32Slice(ptr pointer, tagsize int) int {
+ s := *ptr.toFloat32Slice()
+ return (4 + tagsize) * len(s)
+}
+func sizeFloat32PackedSlice(ptr pointer, tagsize int) int {
+ s := *ptr.toFloat32Slice()
+ if len(s) == 0 {
+ return 0
+ }
+ return 4*len(s) + SizeVarint(uint64(4*len(s))) + tagsize
+}
+func sizeFixed64Value(_ pointer, tagsize int) int {
+ return 8 + tagsize
+}
+func sizeFixed64ValueNoZero(ptr pointer, tagsize int) int {
+ v := *ptr.toUint64()
+ if v == 0 {
+ return 0
+ }
+ return 8 + tagsize
+}
+func sizeFixed64Ptr(ptr pointer, tagsize int) int {
+ p := *ptr.toUint64Ptr()
+ if p == nil {
+ return 0
+ }
+ return 8 + tagsize
+}
+func sizeFixed64Slice(ptr pointer, tagsize int) int {
+ s := *ptr.toUint64Slice()
+ return (8 + tagsize) * len(s)
+}
+func sizeFixed64PackedSlice(ptr pointer, tagsize int) int {
+ s := *ptr.toUint64Slice()
+ if len(s) == 0 {
+ return 0
+ }
+ return 8*len(s) + SizeVarint(uint64(8*len(s))) + tagsize
+}
+func sizeFixedS64Value(_ pointer, tagsize int) int {
+ return 8 + tagsize
+}
+func sizeFixedS64ValueNoZero(ptr pointer, tagsize int) int {
+ v := *ptr.toInt64()
+ if v == 0 {
+ return 0
+ }
+ return 8 + tagsize
+}
+func sizeFixedS64Ptr(ptr pointer, tagsize int) int {
+ p := *ptr.toInt64Ptr()
+ if p == nil {
+ return 0
+ }
+ return 8 + tagsize
+}
+func sizeFixedS64Slice(ptr pointer, tagsize int) int {
+ s := *ptr.toInt64Slice()
+ return (8 + tagsize) * len(s)
+}
+func sizeFixedS64PackedSlice(ptr pointer, tagsize int) int {
+ s := *ptr.toInt64Slice()
+ if len(s) == 0 {
+ return 0
+ }
+ return 8*len(s) + SizeVarint(uint64(8*len(s))) + tagsize
+}
+func sizeFloat64Value(_ pointer, tagsize int) int {
+ return 8 + tagsize
+}
+func sizeFloat64ValueNoZero(ptr pointer, tagsize int) int {
+ v := math.Float64bits(*ptr.toFloat64())
+ if v == 0 {
+ return 0
+ }
+ return 8 + tagsize
+}
+func sizeFloat64Ptr(ptr pointer, tagsize int) int {
+ p := *ptr.toFloat64Ptr()
+ if p == nil {
+ return 0
+ }
+ return 8 + tagsize
+}
+func sizeFloat64Slice(ptr pointer, tagsize int) int {
+ s := *ptr.toFloat64Slice()
+ return (8 + tagsize) * len(s)
+}
+func sizeFloat64PackedSlice(ptr pointer, tagsize int) int {
+ s := *ptr.toFloat64Slice()
+ if len(s) == 0 {
+ return 0
+ }
+ return 8*len(s) + SizeVarint(uint64(8*len(s))) + tagsize
+}
+func sizeVarint32Value(ptr pointer, tagsize int) int {
+ v := *ptr.toUint32()
+ return SizeVarint(uint64(v)) + tagsize
+}
+func sizeVarint32ValueNoZero(ptr pointer, tagsize int) int {
+ v := *ptr.toUint32()
+ if v == 0 {
+ return 0
+ }
+ return SizeVarint(uint64(v)) + tagsize
+}
+func sizeVarint32Ptr(ptr pointer, tagsize int) int {
+ p := *ptr.toUint32Ptr()
+ if p == nil {
+ return 0
+ }
+ return SizeVarint(uint64(*p)) + tagsize
+}
+func sizeVarint32Slice(ptr pointer, tagsize int) int {
+ s := *ptr.toUint32Slice()
+ n := 0
+ for _, v := range s {
+ n += SizeVarint(uint64(v)) + tagsize
+ }
+ return n
+}
+func sizeVarint32PackedSlice(ptr pointer, tagsize int) int {
+ s := *ptr.toUint32Slice()
+ if len(s) == 0 {
+ return 0
+ }
+ n := 0
+ for _, v := range s {
+ n += SizeVarint(uint64(v))
+ }
+ return n + SizeVarint(uint64(n)) + tagsize
+}
+func sizeVarintS32Value(ptr pointer, tagsize int) int {
+ v := *ptr.toInt32()
+ return SizeVarint(uint64(v)) + tagsize
+}
+func sizeVarintS32ValueNoZero(ptr pointer, tagsize int) int {
+ v := *ptr.toInt32()
+ if v == 0 {
+ return 0
+ }
+ return SizeVarint(uint64(v)) + tagsize
+}
+func sizeVarintS32Ptr(ptr pointer, tagsize int) int {
+ p := ptr.getInt32Ptr()
+ if p == nil {
+ return 0
+ }
+ return SizeVarint(uint64(*p)) + tagsize
+}
+func sizeVarintS32Slice(ptr pointer, tagsize int) int {
+ s := ptr.getInt32Slice()
+ n := 0
+ for _, v := range s {
+ n += SizeVarint(uint64(v)) + tagsize
+ }
+ return n
+}
+func sizeVarintS32PackedSlice(ptr pointer, tagsize int) int {
+ s := ptr.getInt32Slice()
+ if len(s) == 0 {
+ return 0
+ }
+ n := 0
+ for _, v := range s {
+ n += SizeVarint(uint64(v))
+ }
+ return n + SizeVarint(uint64(n)) + tagsize
+}
+func sizeVarint64Value(ptr pointer, tagsize int) int {
+ v := *ptr.toUint64()
+ return SizeVarint(v) + tagsize
+}
+func sizeVarint64ValueNoZero(ptr pointer, tagsize int) int {
+ v := *ptr.toUint64()
+ if v == 0 {
+ return 0
+ }
+ return SizeVarint(v) + tagsize
+}
+func sizeVarint64Ptr(ptr pointer, tagsize int) int {
+ p := *ptr.toUint64Ptr()
+ if p == nil {
+ return 0
+ }
+ return SizeVarint(*p) + tagsize
+}
+func sizeVarint64Slice(ptr pointer, tagsize int) int {
+ s := *ptr.toUint64Slice()
+ n := 0
+ for _, v := range s {
+ n += SizeVarint(v) + tagsize
+ }
+ return n
+}
+func sizeVarint64PackedSlice(ptr pointer, tagsize int) int {
+ s := *ptr.toUint64Slice()
+ if len(s) == 0 {
+ return 0
+ }
+ n := 0
+ for _, v := range s {
+ n += SizeVarint(v)
+ }
+ return n + SizeVarint(uint64(n)) + tagsize
+}
+func sizeVarintS64Value(ptr pointer, tagsize int) int {
+ v := *ptr.toInt64()
+ return SizeVarint(uint64(v)) + tagsize
+}
+func sizeVarintS64ValueNoZero(ptr pointer, tagsize int) int {
+ v := *ptr.toInt64()
+ if v == 0 {
+ return 0
+ }
+ return SizeVarint(uint64(v)) + tagsize
+}
+func sizeVarintS64Ptr(ptr pointer, tagsize int) int {
+ p := *ptr.toInt64Ptr()
+ if p == nil {
+ return 0
+ }
+ return SizeVarint(uint64(*p)) + tagsize
+}
+func sizeVarintS64Slice(ptr pointer, tagsize int) int {
+ s := *ptr.toInt64Slice()
+ n := 0
+ for _, v := range s {
+ n += SizeVarint(uint64(v)) + tagsize
+ }
+ return n
+}
+func sizeVarintS64PackedSlice(ptr pointer, tagsize int) int {
+ s := *ptr.toInt64Slice()
+ if len(s) == 0 {
+ return 0
+ }
+ n := 0
+ for _, v := range s {
+ n += SizeVarint(uint64(v))
+ }
+ return n + SizeVarint(uint64(n)) + tagsize
+}
+func sizeZigzag32Value(ptr pointer, tagsize int) int {
+ v := *ptr.toInt32()
+ return SizeVarint(uint64((uint32(v)<<1)^uint32((int32(v)>>31)))) + tagsize
+}
+func sizeZigzag32ValueNoZero(ptr pointer, tagsize int) int {
+ v := *ptr.toInt32()
+ if v == 0 {
+ return 0
+ }
+ return SizeVarint(uint64((uint32(v)<<1)^uint32((int32(v)>>31)))) + tagsize
+}
+func sizeZigzag32Ptr(ptr pointer, tagsize int) int {
+ p := ptr.getInt32Ptr()
+ if p == nil {
+ return 0
+ }
+ v := *p
+ return SizeVarint(uint64((uint32(v)<<1)^uint32((int32(v)>>31)))) + tagsize
+}
+func sizeZigzag32Slice(ptr pointer, tagsize int) int {
+ s := ptr.getInt32Slice()
+ n := 0
+ for _, v := range s {
+ n += SizeVarint(uint64((uint32(v)<<1)^uint32((int32(v)>>31)))) + tagsize
+ }
+ return n
+}
+func sizeZigzag32PackedSlice(ptr pointer, tagsize int) int {
+ s := ptr.getInt32Slice()
+ if len(s) == 0 {
+ return 0
+ }
+ n := 0
+ for _, v := range s {
+ n += SizeVarint(uint64((uint32(v) << 1) ^ uint32((int32(v) >> 31))))
+ }
+ return n + SizeVarint(uint64(n)) + tagsize
+}
+func sizeZigzag64Value(ptr pointer, tagsize int) int {
+ v := *ptr.toInt64()
+ return SizeVarint(uint64(v<<1)^uint64((int64(v)>>63))) + tagsize
+}
+func sizeZigzag64ValueNoZero(ptr pointer, tagsize int) int {
+ v := *ptr.toInt64()
+ if v == 0 {
+ return 0
+ }
+ return SizeVarint(uint64(v<<1)^uint64((int64(v)>>63))) + tagsize
+}
+func sizeZigzag64Ptr(ptr pointer, tagsize int) int {
+ p := *ptr.toInt64Ptr()
+ if p == nil {
+ return 0
+ }
+ v := *p
+ return SizeVarint(uint64(v<<1)^uint64((int64(v)>>63))) + tagsize
+}
+func sizeZigzag64Slice(ptr pointer, tagsize int) int {
+ s := *ptr.toInt64Slice()
+ n := 0
+ for _, v := range s {
+ n += SizeVarint(uint64(v<<1)^uint64((int64(v)>>63))) + tagsize
+ }
+ return n
+}
+func sizeZigzag64PackedSlice(ptr pointer, tagsize int) int {
+ s := *ptr.toInt64Slice()
+ if len(s) == 0 {
+ return 0
+ }
+ n := 0
+ for _, v := range s {
+ n += SizeVarint(uint64(v<<1) ^ uint64((int64(v) >> 63)))
+ }
+ return n + SizeVarint(uint64(n)) + tagsize
+}
+func sizeBoolValue(_ pointer, tagsize int) int {
+ return 1 + tagsize
+}
+func sizeBoolValueNoZero(ptr pointer, tagsize int) int {
+ v := *ptr.toBool()
+ if !v {
+ return 0
+ }
+ return 1 + tagsize
+}
+func sizeBoolPtr(ptr pointer, tagsize int) int {
+ p := *ptr.toBoolPtr()
+ if p == nil {
+ return 0
+ }
+ return 1 + tagsize
+}
+func sizeBoolSlice(ptr pointer, tagsize int) int {
+ s := *ptr.toBoolSlice()
+ return (1 + tagsize) * len(s)
+}
+func sizeBoolPackedSlice(ptr pointer, tagsize int) int {
+ s := *ptr.toBoolSlice()
+ if len(s) == 0 {
+ return 0
+ }
+ return len(s) + SizeVarint(uint64(len(s))) + tagsize
+}
+func sizeStringValue(ptr pointer, tagsize int) int {
+ v := *ptr.toString()
+ return len(v) + SizeVarint(uint64(len(v))) + tagsize
+}
+func sizeStringValueNoZero(ptr pointer, tagsize int) int {
+ v := *ptr.toString()
+ if v == "" {
+ return 0
+ }
+ return len(v) + SizeVarint(uint64(len(v))) + tagsize
+}
+func sizeStringPtr(ptr pointer, tagsize int) int {
+ p := *ptr.toStringPtr()
+ if p == nil {
+ return 0
+ }
+ v := *p
+ return len(v) + SizeVarint(uint64(len(v))) + tagsize
+}
+func sizeStringSlice(ptr pointer, tagsize int) int {
+ s := *ptr.toStringSlice()
+ n := 0
+ for _, v := range s {
+ n += len(v) + SizeVarint(uint64(len(v))) + tagsize
+ }
+ return n
+}
+func sizeBytes(ptr pointer, tagsize int) int {
+ v := *ptr.toBytes()
+ if v == nil {
+ return 0
+ }
+ return len(v) + SizeVarint(uint64(len(v))) + tagsize
+}
+func sizeBytes3(ptr pointer, tagsize int) int {
+ v := *ptr.toBytes()
+ if len(v) == 0 {
+ return 0
+ }
+ return len(v) + SizeVarint(uint64(len(v))) + tagsize
+}
+func sizeBytesOneof(ptr pointer, tagsize int) int {
+ v := *ptr.toBytes()
+ return len(v) + SizeVarint(uint64(len(v))) + tagsize
+}
+func sizeBytesSlice(ptr pointer, tagsize int) int {
+ s := *ptr.toBytesSlice()
+ n := 0
+ for _, v := range s {
+ n += len(v) + SizeVarint(uint64(len(v))) + tagsize
+ }
+ return n
+}
+
+// appendFixed32 appends an encoded fixed32 to b.
+func appendFixed32(b []byte, v uint32) []byte {
+ b = append(b,
+ byte(v),
+ byte(v>>8),
+ byte(v>>16),
+ byte(v>>24))
+ return b
+}
+
+// appendFixed64 appends an encoded fixed64 to b.
+func appendFixed64(b []byte, v uint64) []byte {
+ b = append(b,
+ byte(v),
+ byte(v>>8),
+ byte(v>>16),
+ byte(v>>24),
+ byte(v>>32),
+ byte(v>>40),
+ byte(v>>48),
+ byte(v>>56))
+ return b
+}
+
+// appendVarint appends an encoded varint to b.
+func appendVarint(b []byte, v uint64) []byte {
+ // TODO: make 1-byte (maybe 2-byte) case inline-able, once we
+ // have non-leaf inliner.
+ switch {
+ case v < 1<<7:
+ b = append(b, byte(v))
+ case v < 1<<14:
+ b = append(b,
+ byte(v&0x7f|0x80),
+ byte(v>>7))
+ case v < 1<<21:
+ b = append(b,
+ byte(v&0x7f|0x80),
+ byte((v>>7)&0x7f|0x80),
+ byte(v>>14))
+ case v < 1<<28:
+ b = append(b,
+ byte(v&0x7f|0x80),
+ byte((v>>7)&0x7f|0x80),
+ byte((v>>14)&0x7f|0x80),
+ byte(v>>21))
+ case v < 1<<35:
+ b = append(b,
+ byte(v&0x7f|0x80),
+ byte((v>>7)&0x7f|0x80),
+ byte((v>>14)&0x7f|0x80),
+ byte((v>>21)&0x7f|0x80),
+ byte(v>>28))
+ case v < 1<<42:
+ b = append(b,
+ byte(v&0x7f|0x80),
+ byte((v>>7)&0x7f|0x80),
+ byte((v>>14)&0x7f|0x80),
+ byte((v>>21)&0x7f|0x80),
+ byte((v>>28)&0x7f|0x80),
+ byte(v>>35))
+ case v < 1<<49:
+ b = append(b,
+ byte(v&0x7f|0x80),
+ byte((v>>7)&0x7f|0x80),
+ byte((v>>14)&0x7f|0x80),
+ byte((v>>21)&0x7f|0x80),
+ byte((v>>28)&0x7f|0x80),
+ byte((v>>35)&0x7f|0x80),
+ byte(v>>42))
+ case v < 1<<56:
+ b = append(b,
+ byte(v&0x7f|0x80),
+ byte((v>>7)&0x7f|0x80),
+ byte((v>>14)&0x7f|0x80),
+ byte((v>>21)&0x7f|0x80),
+ byte((v>>28)&0x7f|0x80),
+ byte((v>>35)&0x7f|0x80),
+ byte((v>>42)&0x7f|0x80),
+ byte(v>>49))
+ case v < 1<<63:
+ b = append(b,
+ byte(v&0x7f|0x80),
+ byte((v>>7)&0x7f|0x80),
+ byte((v>>14)&0x7f|0x80),
+ byte((v>>21)&0x7f|0x80),
+ byte((v>>28)&0x7f|0x80),
+ byte((v>>35)&0x7f|0x80),
+ byte((v>>42)&0x7f|0x80),
+ byte((v>>49)&0x7f|0x80),
+ byte(v>>56))
+ default:
+ b = append(b,
+ byte(v&0x7f|0x80),
+ byte((v>>7)&0x7f|0x80),
+ byte((v>>14)&0x7f|0x80),
+ byte((v>>21)&0x7f|0x80),
+ byte((v>>28)&0x7f|0x80),
+ byte((v>>35)&0x7f|0x80),
+ byte((v>>42)&0x7f|0x80),
+ byte((v>>49)&0x7f|0x80),
+ byte((v>>56)&0x7f|0x80),
+ 1)
+ }
+ return b
+}
+
+func appendFixed32Value(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ v := *ptr.toUint32()
+ b = appendVarint(b, wiretag)
+ b = appendFixed32(b, v)
+ return b, nil
+}
+func appendFixed32ValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ v := *ptr.toUint32()
+ if v == 0 {
+ return b, nil
+ }
+ b = appendVarint(b, wiretag)
+ b = appendFixed32(b, v)
+ return b, nil
+}
+func appendFixed32Ptr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ p := *ptr.toUint32Ptr()
+ if p == nil {
+ return b, nil
+ }
+ b = appendVarint(b, wiretag)
+ b = appendFixed32(b, *p)
+ return b, nil
+}
+func appendFixed32Slice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ s := *ptr.toUint32Slice()
+ for _, v := range s {
+ b = appendVarint(b, wiretag)
+ b = appendFixed32(b, v)
+ }
+ return b, nil
+}
+func appendFixed32PackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ s := *ptr.toUint32Slice()
+ if len(s) == 0 {
+ return b, nil
+ }
+ b = appendVarint(b, wiretag&^7|WireBytes)
+ b = appendVarint(b, uint64(4*len(s)))
+ for _, v := range s {
+ b = appendFixed32(b, v)
+ }
+ return b, nil
+}
+func appendFixedS32Value(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ v := *ptr.toInt32()
+ b = appendVarint(b, wiretag)
+ b = appendFixed32(b, uint32(v))
+ return b, nil
+}
+func appendFixedS32ValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ v := *ptr.toInt32()
+ if v == 0 {
+ return b, nil
+ }
+ b = appendVarint(b, wiretag)
+ b = appendFixed32(b, uint32(v))
+ return b, nil
+}
+func appendFixedS32Ptr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ p := ptr.getInt32Ptr()
+ if p == nil {
+ return b, nil
+ }
+ b = appendVarint(b, wiretag)
+ b = appendFixed32(b, uint32(*p))
+ return b, nil
+}
+func appendFixedS32Slice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ s := ptr.getInt32Slice()
+ for _, v := range s {
+ b = appendVarint(b, wiretag)
+ b = appendFixed32(b, uint32(v))
+ }
+ return b, nil
+}
+func appendFixedS32PackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ s := ptr.getInt32Slice()
+ if len(s) == 0 {
+ return b, nil
+ }
+ b = appendVarint(b, wiretag&^7|WireBytes)
+ b = appendVarint(b, uint64(4*len(s)))
+ for _, v := range s {
+ b = appendFixed32(b, uint32(v))
+ }
+ return b, nil
+}
+func appendFloat32Value(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ v := math.Float32bits(*ptr.toFloat32())
+ b = appendVarint(b, wiretag)
+ b = appendFixed32(b, v)
+ return b, nil
+}
+func appendFloat32ValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ v := math.Float32bits(*ptr.toFloat32())
+ if v == 0 {
+ return b, nil
+ }
+ b = appendVarint(b, wiretag)
+ b = appendFixed32(b, v)
+ return b, nil
+}
+func appendFloat32Ptr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ p := *ptr.toFloat32Ptr()
+ if p == nil {
+ return b, nil
+ }
+ b = appendVarint(b, wiretag)
+ b = appendFixed32(b, math.Float32bits(*p))
+ return b, nil
+}
+func appendFloat32Slice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ s := *ptr.toFloat32Slice()
+ for _, v := range s {
+ b = appendVarint(b, wiretag)
+ b = appendFixed32(b, math.Float32bits(v))
+ }
+ return b, nil
+}
+func appendFloat32PackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ s := *ptr.toFloat32Slice()
+ if len(s) == 0 {
+ return b, nil
+ }
+ b = appendVarint(b, wiretag&^7|WireBytes)
+ b = appendVarint(b, uint64(4*len(s)))
+ for _, v := range s {
+ b = appendFixed32(b, math.Float32bits(v))
+ }
+ return b, nil
+}
+func appendFixed64Value(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ v := *ptr.toUint64()
+ b = appendVarint(b, wiretag)
+ b = appendFixed64(b, v)
+ return b, nil
+}
+func appendFixed64ValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ v := *ptr.toUint64()
+ if v == 0 {
+ return b, nil
+ }
+ b = appendVarint(b, wiretag)
+ b = appendFixed64(b, v)
+ return b, nil
+}
+func appendFixed64Ptr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ p := *ptr.toUint64Ptr()
+ if p == nil {
+ return b, nil
+ }
+ b = appendVarint(b, wiretag)
+ b = appendFixed64(b, *p)
+ return b, nil
+}
+func appendFixed64Slice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ s := *ptr.toUint64Slice()
+ for _, v := range s {
+ b = appendVarint(b, wiretag)
+ b = appendFixed64(b, v)
+ }
+ return b, nil
+}
+func appendFixed64PackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ s := *ptr.toUint64Slice()
+ if len(s) == 0 {
+ return b, nil
+ }
+ b = appendVarint(b, wiretag&^7|WireBytes)
+ b = appendVarint(b, uint64(8*len(s)))
+ for _, v := range s {
+ b = appendFixed64(b, v)
+ }
+ return b, nil
+}
+func appendFixedS64Value(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ v := *ptr.toInt64()
+ b = appendVarint(b, wiretag)
+ b = appendFixed64(b, uint64(v))
+ return b, nil
+}
+func appendFixedS64ValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ v := *ptr.toInt64()
+ if v == 0 {
+ return b, nil
+ }
+ b = appendVarint(b, wiretag)
+ b = appendFixed64(b, uint64(v))
+ return b, nil
+}
+func appendFixedS64Ptr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ p := *ptr.toInt64Ptr()
+ if p == nil {
+ return b, nil
+ }
+ b = appendVarint(b, wiretag)
+ b = appendFixed64(b, uint64(*p))
+ return b, nil
+}
+func appendFixedS64Slice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ s := *ptr.toInt64Slice()
+ for _, v := range s {
+ b = appendVarint(b, wiretag)
+ b = appendFixed64(b, uint64(v))
+ }
+ return b, nil
+}
+func appendFixedS64PackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ s := *ptr.toInt64Slice()
+ if len(s) == 0 {
+ return b, nil
+ }
+ b = appendVarint(b, wiretag&^7|WireBytes)
+ b = appendVarint(b, uint64(8*len(s)))
+ for _, v := range s {
+ b = appendFixed64(b, uint64(v))
+ }
+ return b, nil
+}
+func appendFloat64Value(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ v := math.Float64bits(*ptr.toFloat64())
+ b = appendVarint(b, wiretag)
+ b = appendFixed64(b, v)
+ return b, nil
+}
+func appendFloat64ValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ v := math.Float64bits(*ptr.toFloat64())
+ if v == 0 {
+ return b, nil
+ }
+ b = appendVarint(b, wiretag)
+ b = appendFixed64(b, v)
+ return b, nil
+}
+func appendFloat64Ptr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ p := *ptr.toFloat64Ptr()
+ if p == nil {
+ return b, nil
+ }
+ b = appendVarint(b, wiretag)
+ b = appendFixed64(b, math.Float64bits(*p))
+ return b, nil
+}
+func appendFloat64Slice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ s := *ptr.toFloat64Slice()
+ for _, v := range s {
+ b = appendVarint(b, wiretag)
+ b = appendFixed64(b, math.Float64bits(v))
+ }
+ return b, nil
+}
+func appendFloat64PackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ s := *ptr.toFloat64Slice()
+ if len(s) == 0 {
+ return b, nil
+ }
+ b = appendVarint(b, wiretag&^7|WireBytes)
+ b = appendVarint(b, uint64(8*len(s)))
+ for _, v := range s {
+ b = appendFixed64(b, math.Float64bits(v))
+ }
+ return b, nil
+}
+func appendVarint32Value(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ v := *ptr.toUint32()
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, uint64(v))
+ return b, nil
+}
+func appendVarint32ValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ v := *ptr.toUint32()
+ if v == 0 {
+ return b, nil
+ }
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, uint64(v))
+ return b, nil
+}
+func appendVarint32Ptr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ p := *ptr.toUint32Ptr()
+ if p == nil {
+ return b, nil
+ }
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, uint64(*p))
+ return b, nil
+}
+func appendVarint32Slice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ s := *ptr.toUint32Slice()
+ for _, v := range s {
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, uint64(v))
+ }
+ return b, nil
+}
+func appendVarint32PackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ s := *ptr.toUint32Slice()
+ if len(s) == 0 {
+ return b, nil
+ }
+ b = appendVarint(b, wiretag&^7|WireBytes)
+ // compute size
+ n := 0
+ for _, v := range s {
+ n += SizeVarint(uint64(v))
+ }
+ b = appendVarint(b, uint64(n))
+ for _, v := range s {
+ b = appendVarint(b, uint64(v))
+ }
+ return b, nil
+}
+func appendVarintS32Value(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ v := *ptr.toInt32()
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, uint64(v))
+ return b, nil
+}
+func appendVarintS32ValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ v := *ptr.toInt32()
+ if v == 0 {
+ return b, nil
+ }
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, uint64(v))
+ return b, nil
+}
+func appendVarintS32Ptr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ p := ptr.getInt32Ptr()
+ if p == nil {
+ return b, nil
+ }
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, uint64(*p))
+ return b, nil
+}
+func appendVarintS32Slice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ s := ptr.getInt32Slice()
+ for _, v := range s {
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, uint64(v))
+ }
+ return b, nil
+}
+func appendVarintS32PackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ s := ptr.getInt32Slice()
+ if len(s) == 0 {
+ return b, nil
+ }
+ b = appendVarint(b, wiretag&^7|WireBytes)
+ // compute size
+ n := 0
+ for _, v := range s {
+ n += SizeVarint(uint64(v))
+ }
+ b = appendVarint(b, uint64(n))
+ for _, v := range s {
+ b = appendVarint(b, uint64(v))
+ }
+ return b, nil
+}
+func appendVarint64Value(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ v := *ptr.toUint64()
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, v)
+ return b, nil
+}
+func appendVarint64ValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ v := *ptr.toUint64()
+ if v == 0 {
+ return b, nil
+ }
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, v)
+ return b, nil
+}
+func appendVarint64Ptr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ p := *ptr.toUint64Ptr()
+ if p == nil {
+ return b, nil
+ }
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, *p)
+ return b, nil
+}
+func appendVarint64Slice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ s := *ptr.toUint64Slice()
+ for _, v := range s {
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, v)
+ }
+ return b, nil
+}
+func appendVarint64PackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ s := *ptr.toUint64Slice()
+ if len(s) == 0 {
+ return b, nil
+ }
+ b = appendVarint(b, wiretag&^7|WireBytes)
+ // compute size
+ n := 0
+ for _, v := range s {
+ n += SizeVarint(v)
+ }
+ b = appendVarint(b, uint64(n))
+ for _, v := range s {
+ b = appendVarint(b, v)
+ }
+ return b, nil
+}
+func appendVarintS64Value(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ v := *ptr.toInt64()
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, uint64(v))
+ return b, nil
+}
+func appendVarintS64ValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ v := *ptr.toInt64()
+ if v == 0 {
+ return b, nil
+ }
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, uint64(v))
+ return b, nil
+}
+func appendVarintS64Ptr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ p := *ptr.toInt64Ptr()
+ if p == nil {
+ return b, nil
+ }
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, uint64(*p))
+ return b, nil
+}
+func appendVarintS64Slice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ s := *ptr.toInt64Slice()
+ for _, v := range s {
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, uint64(v))
+ }
+ return b, nil
+}
+func appendVarintS64PackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ s := *ptr.toInt64Slice()
+ if len(s) == 0 {
+ return b, nil
+ }
+ b = appendVarint(b, wiretag&^7|WireBytes)
+ // compute size
+ n := 0
+ for _, v := range s {
+ n += SizeVarint(uint64(v))
+ }
+ b = appendVarint(b, uint64(n))
+ for _, v := range s {
+ b = appendVarint(b, uint64(v))
+ }
+ return b, nil
+}
+func appendZigzag32Value(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ v := *ptr.toInt32()
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, uint64((uint32(v)<<1)^uint32((int32(v)>>31))))
+ return b, nil
+}
+func appendZigzag32ValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ v := *ptr.toInt32()
+ if v == 0 {
+ return b, nil
+ }
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, uint64((uint32(v)<<1)^uint32((int32(v)>>31))))
+ return b, nil
+}
+func appendZigzag32Ptr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ p := ptr.getInt32Ptr()
+ if p == nil {
+ return b, nil
+ }
+ b = appendVarint(b, wiretag)
+ v := *p
+ b = appendVarint(b, uint64((uint32(v)<<1)^uint32((int32(v)>>31))))
+ return b, nil
+}
+func appendZigzag32Slice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ s := ptr.getInt32Slice()
+ for _, v := range s {
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, uint64((uint32(v)<<1)^uint32((int32(v)>>31))))
+ }
+ return b, nil
+}
+func appendZigzag32PackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ s := ptr.getInt32Slice()
+ if len(s) == 0 {
+ return b, nil
+ }
+ b = appendVarint(b, wiretag&^7|WireBytes)
+ // compute size
+ n := 0
+ for _, v := range s {
+ n += SizeVarint(uint64((uint32(v) << 1) ^ uint32((int32(v) >> 31))))
+ }
+ b = appendVarint(b, uint64(n))
+ for _, v := range s {
+ b = appendVarint(b, uint64((uint32(v)<<1)^uint32((int32(v)>>31))))
+ }
+ return b, nil
+}
+func appendZigzag64Value(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ v := *ptr.toInt64()
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, uint64(v<<1)^uint64((int64(v)>>63)))
+ return b, nil
+}
+func appendZigzag64ValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ v := *ptr.toInt64()
+ if v == 0 {
+ return b, nil
+ }
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, uint64(v<<1)^uint64((int64(v)>>63)))
+ return b, nil
+}
+func appendZigzag64Ptr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ p := *ptr.toInt64Ptr()
+ if p == nil {
+ return b, nil
+ }
+ b = appendVarint(b, wiretag)
+ v := *p
+ b = appendVarint(b, uint64(v<<1)^uint64((int64(v)>>63)))
+ return b, nil
+}
+func appendZigzag64Slice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ s := *ptr.toInt64Slice()
+ for _, v := range s {
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, uint64(v<<1)^uint64((int64(v)>>63)))
+ }
+ return b, nil
+}
+func appendZigzag64PackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ s := *ptr.toInt64Slice()
+ if len(s) == 0 {
+ return b, nil
+ }
+ b = appendVarint(b, wiretag&^7|WireBytes)
+ // compute size
+ n := 0
+ for _, v := range s {
+ n += SizeVarint(uint64(v<<1) ^ uint64((int64(v) >> 63)))
+ }
+ b = appendVarint(b, uint64(n))
+ for _, v := range s {
+ b = appendVarint(b, uint64(v<<1)^uint64((int64(v)>>63)))
+ }
+ return b, nil
+}
+func appendBoolValue(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ v := *ptr.toBool()
+ b = appendVarint(b, wiretag)
+ if v {
+ b = append(b, 1)
+ } else {
+ b = append(b, 0)
+ }
+ return b, nil
+}
+func appendBoolValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ v := *ptr.toBool()
+ if !v {
+ return b, nil
+ }
+ b = appendVarint(b, wiretag)
+ b = append(b, 1)
+ return b, nil
+}
+
+func appendBoolPtr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ p := *ptr.toBoolPtr()
+ if p == nil {
+ return b, nil
+ }
+ b = appendVarint(b, wiretag)
+ if *p {
+ b = append(b, 1)
+ } else {
+ b = append(b, 0)
+ }
+ return b, nil
+}
+func appendBoolSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ s := *ptr.toBoolSlice()
+ for _, v := range s {
+ b = appendVarint(b, wiretag)
+ if v {
+ b = append(b, 1)
+ } else {
+ b = append(b, 0)
+ }
+ }
+ return b, nil
+}
+func appendBoolPackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ s := *ptr.toBoolSlice()
+ if len(s) == 0 {
+ return b, nil
+ }
+ b = appendVarint(b, wiretag&^7|WireBytes)
+ b = appendVarint(b, uint64(len(s)))
+ for _, v := range s {
+ if v {
+ b = append(b, 1)
+ } else {
+ b = append(b, 0)
+ }
+ }
+ return b, nil
+}
+func appendStringValue(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ v := *ptr.toString()
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, uint64(len(v)))
+ b = append(b, v...)
+ return b, nil
+}
+func appendStringValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ v := *ptr.toString()
+ if v == "" {
+ return b, nil
+ }
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, uint64(len(v)))
+ b = append(b, v...)
+ return b, nil
+}
+func appendStringPtr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ p := *ptr.toStringPtr()
+ if p == nil {
+ return b, nil
+ }
+ v := *p
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, uint64(len(v)))
+ b = append(b, v...)
+ return b, nil
+}
+func appendStringSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ s := *ptr.toStringSlice()
+ for _, v := range s {
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, uint64(len(v)))
+ b = append(b, v...)
+ }
+ return b, nil
+}
+func appendUTF8StringValue(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ var invalidUTF8 bool
+ v := *ptr.toString()
+ if !utf8.ValidString(v) {
+ invalidUTF8 = true
+ }
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, uint64(len(v)))
+ b = append(b, v...)
+ if invalidUTF8 {
+ return b, errInvalidUTF8
+ }
+ return b, nil
+}
+func appendUTF8StringValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ var invalidUTF8 bool
+ v := *ptr.toString()
+ if v == "" {
+ return b, nil
+ }
+ if !utf8.ValidString(v) {
+ invalidUTF8 = true
+ }
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, uint64(len(v)))
+ b = append(b, v...)
+ if invalidUTF8 {
+ return b, errInvalidUTF8
+ }
+ return b, nil
+}
+func appendUTF8StringPtr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ var invalidUTF8 bool
+ p := *ptr.toStringPtr()
+ if p == nil {
+ return b, nil
+ }
+ v := *p
+ if !utf8.ValidString(v) {
+ invalidUTF8 = true
+ }
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, uint64(len(v)))
+ b = append(b, v...)
+ if invalidUTF8 {
+ return b, errInvalidUTF8
+ }
+ return b, nil
+}
+func appendUTF8StringSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ var invalidUTF8 bool
+ s := *ptr.toStringSlice()
+ for _, v := range s {
+ if !utf8.ValidString(v) {
+ invalidUTF8 = true
+ }
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, uint64(len(v)))
+ b = append(b, v...)
+ }
+ if invalidUTF8 {
+ return b, errInvalidUTF8
+ }
+ return b, nil
+}
+func appendBytes(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ v := *ptr.toBytes()
+ if v == nil {
+ return b, nil
+ }
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, uint64(len(v)))
+ b = append(b, v...)
+ return b, nil
+}
+func appendBytes3(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ v := *ptr.toBytes()
+ if len(v) == 0 {
+ return b, nil
+ }
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, uint64(len(v)))
+ b = append(b, v...)
+ return b, nil
+}
+func appendBytesOneof(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ v := *ptr.toBytes()
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, uint64(len(v)))
+ b = append(b, v...)
+ return b, nil
+}
+func appendBytesSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ s := *ptr.toBytesSlice()
+ for _, v := range s {
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, uint64(len(v)))
+ b = append(b, v...)
+ }
+ return b, nil
+}
+
+// makeGroupMarshaler returns the sizer and marshaler for a group.
+// u is the marshal info of the underlying message.
+func makeGroupMarshaler(u *marshalInfo) (sizer, marshaler) {
+ return func(ptr pointer, tagsize int) int {
+ p := ptr.getPointer()
+ if p.isNil() {
+ return 0
+ }
+ return u.size(p) + 2*tagsize
+ },
+ func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) {
+ p := ptr.getPointer()
+ if p.isNil() {
+ return b, nil
+ }
+ var err error
+ b = appendVarint(b, wiretag) // start group
+ b, err = u.marshal(b, p, deterministic)
+ b = appendVarint(b, wiretag+(WireEndGroup-WireStartGroup)) // end group
+ return b, err
+ }
+}
+
+// makeGroupSliceMarshaler returns the sizer and marshaler for a group slice.
+// u is the marshal info of the underlying message.
+func makeGroupSliceMarshaler(u *marshalInfo) (sizer, marshaler) {
+ return func(ptr pointer, tagsize int) int {
+ s := ptr.getPointerSlice()
+ n := 0
+ for _, v := range s {
+ if v.isNil() {
+ continue
+ }
+ n += u.size(v) + 2*tagsize
+ }
+ return n
+ },
+ func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) {
+ s := ptr.getPointerSlice()
+ var err error
+ var nerr nonFatal
+ for _, v := range s {
+ if v.isNil() {
+ return b, errRepeatedHasNil
+ }
+ b = appendVarint(b, wiretag) // start group
+ b, err = u.marshal(b, v, deterministic)
+ b = appendVarint(b, wiretag+(WireEndGroup-WireStartGroup)) // end group
+ if !nerr.Merge(err) {
+ if err == ErrNil {
+ err = errRepeatedHasNil
+ }
+ return b, err
+ }
+ }
+ return b, nerr.E
+ }
+}
+
+// makeMessageMarshaler returns the sizer and marshaler for a message field.
+// u is the marshal info of the message.
+func makeMessageMarshaler(u *marshalInfo) (sizer, marshaler) {
+ return func(ptr pointer, tagsize int) int {
+ p := ptr.getPointer()
+ if p.isNil() {
+ return 0
+ }
+ siz := u.size(p)
+ return siz + SizeVarint(uint64(siz)) + tagsize
+ },
+ func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) {
+ p := ptr.getPointer()
+ if p.isNil() {
+ return b, nil
+ }
+ b = appendVarint(b, wiretag)
+ siz := u.cachedsize(p)
+ b = appendVarint(b, uint64(siz))
+ return u.marshal(b, p, deterministic)
+ }
+}
+
+// makeMessageSliceMarshaler returns the sizer and marshaler for a message slice.
+// u is the marshal info of the message.
+func makeMessageSliceMarshaler(u *marshalInfo) (sizer, marshaler) {
+ return func(ptr pointer, tagsize int) int {
+ s := ptr.getPointerSlice()
+ n := 0
+ for _, v := range s {
+ if v.isNil() {
+ continue
+ }
+ siz := u.size(v)
+ n += siz + SizeVarint(uint64(siz)) + tagsize
+ }
+ return n
+ },
+ func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) {
+ s := ptr.getPointerSlice()
+ var err error
+ var nerr nonFatal
+ for _, v := range s {
+ if v.isNil() {
+ return b, errRepeatedHasNil
+ }
+ b = appendVarint(b, wiretag)
+ siz := u.cachedsize(v)
+ b = appendVarint(b, uint64(siz))
+ b, err = u.marshal(b, v, deterministic)
+
+ if !nerr.Merge(err) {
+ if err == ErrNil {
+ err = errRepeatedHasNil
+ }
+ return b, err
+ }
+ }
+ return b, nerr.E
+ }
+}
+
+// makeMapMarshaler returns the sizer and marshaler for a map field.
+// f is the pointer to the reflect data structure of the field.
+func makeMapMarshaler(f *reflect.StructField) (sizer, marshaler) {
+ // figure out key and value type
+ t := f.Type
+ keyType := t.Key()
+ valType := t.Elem()
+ tags := strings.Split(f.Tag.Get("protobuf"), ",")
+ keyTags := strings.Split(f.Tag.Get("protobuf_key"), ",")
+ valTags := strings.Split(f.Tag.Get("protobuf_val"), ",")
+ stdOptions := false
+ for _, t := range tags {
+ if strings.HasPrefix(t, "customtype=") {
+ valTags = append(valTags, t)
+ }
+ if t == "stdtime" {
+ valTags = append(valTags, t)
+ stdOptions = true
+ }
+ if t == "stdduration" {
+ valTags = append(valTags, t)
+ stdOptions = true
+ }
+ if t == "wktptr" {
+ valTags = append(valTags, t)
+ }
+ }
+ keySizer, keyMarshaler := typeMarshaler(keyType, keyTags, false, false) // don't omit zero value in map
+ valSizer, valMarshaler := typeMarshaler(valType, valTags, false, false) // don't omit zero value in map
+ keyWireTag := 1<<3 | wiretype(keyTags[0])
+ valWireTag := 2<<3 | wiretype(valTags[0])
+
+ // We create an interface to get the addresses of the map key and value.
+ // If value is pointer-typed, the interface is a direct interface, the
+ // idata itself is the value. Otherwise, the idata is the pointer to the
+ // value.
+ // Key cannot be pointer-typed.
+ valIsPtr := valType.Kind() == reflect.Ptr
+
+ // If value is a message with nested maps, calling
+ // valSizer in marshal may be quadratic. We should use
+ // cached version in marshal (but not in size).
+ // If value is not message type, we don't have size cache,
+ // but it cannot be nested either. Just use valSizer.
+ valCachedSizer := valSizer
+ if valIsPtr && !stdOptions && valType.Elem().Kind() == reflect.Struct {
+ u := getMarshalInfo(valType.Elem())
+ valCachedSizer = func(ptr pointer, tagsize int) int {
+ // Same as message sizer, but use cache.
+ p := ptr.getPointer()
+ if p.isNil() {
+ return 0
+ }
+ siz := u.cachedsize(p)
+ return siz + SizeVarint(uint64(siz)) + tagsize
+ }
+ }
+ return func(ptr pointer, tagsize int) int {
+ m := ptr.asPointerTo(t).Elem() // the map
+ n := 0
+ for _, k := range m.MapKeys() {
+ ki := k.Interface()
+ vi := m.MapIndex(k).Interface()
+ kaddr := toAddrPointer(&ki, false) // pointer to key
+ vaddr := toAddrPointer(&vi, valIsPtr) // pointer to value
+ siz := keySizer(kaddr, 1) + valSizer(vaddr, 1) // tag of key = 1 (size=1), tag of val = 2 (size=1)
+ n += siz + SizeVarint(uint64(siz)) + tagsize
+ }
+ return n
+ },
+ func(b []byte, ptr pointer, tag uint64, deterministic bool) ([]byte, error) {
+ m := ptr.asPointerTo(t).Elem() // the map
+ var err error
+ keys := m.MapKeys()
+ if len(keys) > 1 && deterministic {
+ sort.Sort(mapKeys(keys))
+ }
+
+ var nerr nonFatal
+ for _, k := range keys {
+ ki := k.Interface()
+ vi := m.MapIndex(k).Interface()
+ kaddr := toAddrPointer(&ki, false) // pointer to key
+ vaddr := toAddrPointer(&vi, valIsPtr) // pointer to value
+ b = appendVarint(b, tag)
+ siz := keySizer(kaddr, 1) + valCachedSizer(vaddr, 1) // tag of key = 1 (size=1), tag of val = 2 (size=1)
+ b = appendVarint(b, uint64(siz))
+ b, err = keyMarshaler(b, kaddr, keyWireTag, deterministic)
+ if !nerr.Merge(err) {
+ return b, err
+ }
+ b, err = valMarshaler(b, vaddr, valWireTag, deterministic)
+ if err != ErrNil && !nerr.Merge(err) { // allow nil value in map
+ return b, err
+ }
+ }
+ return b, nerr.E
+ }
+}
+
+// makeOneOfMarshaler returns the sizer and marshaler for a oneof field.
+// fi is the marshal info of the field.
+// f is the pointer to the reflect data structure of the field.
+func makeOneOfMarshaler(fi *marshalFieldInfo, f *reflect.StructField) (sizer, marshaler) {
+ // Oneof field is an interface. We need to get the actual data type on the fly.
+ t := f.Type
+ return func(ptr pointer, _ int) int {
+ p := ptr.getInterfacePointer()
+ if p.isNil() {
+ return 0
+ }
+ v := ptr.asPointerTo(t).Elem().Elem().Elem() // *interface -> interface -> *struct -> struct
+ telem := v.Type()
+ e := fi.oneofElems[telem]
+ return e.sizer(p, e.tagsize)
+ },
+ func(b []byte, ptr pointer, _ uint64, deterministic bool) ([]byte, error) {
+ p := ptr.getInterfacePointer()
+ if p.isNil() {
+ return b, nil
+ }
+ v := ptr.asPointerTo(t).Elem().Elem().Elem() // *interface -> interface -> *struct -> struct
+ telem := v.Type()
+ if telem.Field(0).Type.Kind() == reflect.Ptr && p.getPointer().isNil() {
+ return b, errOneofHasNil
+ }
+ e := fi.oneofElems[telem]
+ return e.marshaler(b, p, e.wiretag, deterministic)
+ }
+}
+
+// sizeExtensions computes the size of encoded data for a XXX_InternalExtensions field.
+func (u *marshalInfo) sizeExtensions(ext *XXX_InternalExtensions) int {
+ m, mu := ext.extensionsRead()
+ if m == nil {
+ return 0
+ }
+ mu.Lock()
+
+ n := 0
+ for _, e := range m {
+ if e.value == nil || e.desc == nil {
+ // Extension is only in its encoded form.
+ n += len(e.enc)
+ continue
+ }
+
+ // We don't skip extensions that have an encoded form set,
+ // because the extension value may have been mutated after
+ // the last time this function was called.
+ ei := u.getExtElemInfo(e.desc)
+ v := e.value
+ p := toAddrPointer(&v, ei.isptr)
+ n += ei.sizer(p, ei.tagsize)
+ }
+ mu.Unlock()
+ return n
+}
+
+// appendExtensions marshals a XXX_InternalExtensions field to the end of byte slice b.
+func (u *marshalInfo) appendExtensions(b []byte, ext *XXX_InternalExtensions, deterministic bool) ([]byte, error) {
+ m, mu := ext.extensionsRead()
+ if m == nil {
+ return b, nil
+ }
+ mu.Lock()
+ defer mu.Unlock()
+
+ var err error
+ var nerr nonFatal
+
+ // Fast-path for common cases: zero or one extensions.
+ // Don't bother sorting the keys.
+ if len(m) <= 1 {
+ for _, e := range m {
+ if e.value == nil || e.desc == nil {
+ // Extension is only in its encoded form.
+ b = append(b, e.enc...)
+ continue
+ }
+
+ // We don't skip extensions that have an encoded form set,
+ // because the extension value may have been mutated after
+ // the last time this function was called.
+
+ ei := u.getExtElemInfo(e.desc)
+ v := e.value
+ p := toAddrPointer(&v, ei.isptr)
+ b, err = ei.marshaler(b, p, ei.wiretag, deterministic)
+ if !nerr.Merge(err) {
+ return b, err
+ }
+ }
+ return b, nerr.E
+ }
+
+ // Sort the keys to provide a deterministic encoding.
+ // Not sure this is required, but the old code does it.
+ keys := make([]int, 0, len(m))
+ for k := range m {
+ keys = append(keys, int(k))
+ }
+ sort.Ints(keys)
+
+ for _, k := range keys {
+ e := m[int32(k)]
+ if e.value == nil || e.desc == nil {
+ // Extension is only in its encoded form.
+ b = append(b, e.enc...)
+ continue
+ }
+
+ // We don't skip extensions that have an encoded form set,
+ // because the extension value may have been mutated after
+ // the last time this function was called.
+
+ ei := u.getExtElemInfo(e.desc)
+ v := e.value
+ p := toAddrPointer(&v, ei.isptr)
+ b, err = ei.marshaler(b, p, ei.wiretag, deterministic)
+ if !nerr.Merge(err) {
+ return b, err
+ }
+ }
+ return b, nerr.E
+}
+
+// message set format is:
+// message MessageSet {
+// repeated group Item = 1 {
+// required int32 type_id = 2;
+// required string message = 3;
+// };
+// }
+
+// sizeMessageSet computes the size of encoded data for a XXX_InternalExtensions field
+// in message set format (above).
+func (u *marshalInfo) sizeMessageSet(ext *XXX_InternalExtensions) int {
+ m, mu := ext.extensionsRead()
+ if m == nil {
+ return 0
+ }
+ mu.Lock()
+
+ n := 0
+ for id, e := range m {
+ n += 2 // start group, end group. tag = 1 (size=1)
+ n += SizeVarint(uint64(id)) + 1 // type_id, tag = 2 (size=1)
+
+ if e.value == nil || e.desc == nil {
+ // Extension is only in its encoded form.
+ msgWithLen := skipVarint(e.enc) // skip old tag, but leave the length varint
+ siz := len(msgWithLen)
+ n += siz + 1 // message, tag = 3 (size=1)
+ continue
+ }
+
+ // We don't skip extensions that have an encoded form set,
+ // because the extension value may have been mutated after
+ // the last time this function was called.
+
+ ei := u.getExtElemInfo(e.desc)
+ v := e.value
+ p := toAddrPointer(&v, ei.isptr)
+ n += ei.sizer(p, 1) // message, tag = 3 (size=1)
+ }
+ mu.Unlock()
+ return n
+}
+
+// appendMessageSet marshals a XXX_InternalExtensions field in message set format (above)
+// to the end of byte slice b.
+func (u *marshalInfo) appendMessageSet(b []byte, ext *XXX_InternalExtensions, deterministic bool) ([]byte, error) {
+ m, mu := ext.extensionsRead()
+ if m == nil {
+ return b, nil
+ }
+ mu.Lock()
+ defer mu.Unlock()
+
+ var err error
+ var nerr nonFatal
+
+ // Fast-path for common cases: zero or one extensions.
+ // Don't bother sorting the keys.
+ if len(m) <= 1 {
+ for id, e := range m {
+ b = append(b, 1<<3|WireStartGroup)
+ b = append(b, 2<<3|WireVarint)
+ b = appendVarint(b, uint64(id))
+
+ if e.value == nil || e.desc == nil {
+ // Extension is only in its encoded form.
+ msgWithLen := skipVarint(e.enc) // skip old tag, but leave the length varint
+ b = append(b, 3<<3|WireBytes)
+ b = append(b, msgWithLen...)
+ b = append(b, 1<<3|WireEndGroup)
+ continue
+ }
+
+ // We don't skip extensions that have an encoded form set,
+ // because the extension value may have been mutated after
+ // the last time this function was called.
+
+ ei := u.getExtElemInfo(e.desc)
+ v := e.value
+ p := toAddrPointer(&v, ei.isptr)
+ b, err = ei.marshaler(b, p, 3<<3|WireBytes, deterministic)
+ if !nerr.Merge(err) {
+ return b, err
+ }
+ b = append(b, 1<<3|WireEndGroup)
+ }
+ return b, nerr.E
+ }
+
+ // Sort the keys to provide a deterministic encoding.
+ keys := make([]int, 0, len(m))
+ for k := range m {
+ keys = append(keys, int(k))
+ }
+ sort.Ints(keys)
+
+ for _, id := range keys {
+ e := m[int32(id)]
+ b = append(b, 1<<3|WireStartGroup)
+ b = append(b, 2<<3|WireVarint)
+ b = appendVarint(b, uint64(id))
+
+ if e.value == nil || e.desc == nil {
+ // Extension is only in its encoded form.
+ msgWithLen := skipVarint(e.enc) // skip old tag, but leave the length varint
+ b = append(b, 3<<3|WireBytes)
+ b = append(b, msgWithLen...)
+ b = append(b, 1<<3|WireEndGroup)
+ continue
+ }
+
+ // We don't skip extensions that have an encoded form set,
+ // because the extension value may have been mutated after
+ // the last time this function was called.
+
+ ei := u.getExtElemInfo(e.desc)
+ v := e.value
+ p := toAddrPointer(&v, ei.isptr)
+ b, err = ei.marshaler(b, p, 3<<3|WireBytes, deterministic)
+ b = append(b, 1<<3|WireEndGroup)
+ if !nerr.Merge(err) {
+ return b, err
+ }
+ }
+ return b, nerr.E
+}
+
+// sizeV1Extensions computes the size of encoded data for a V1-API extension field.
+func (u *marshalInfo) sizeV1Extensions(m map[int32]Extension) int {
+ if m == nil {
+ return 0
+ }
+
+ n := 0
+ for _, e := range m {
+ if e.value == nil || e.desc == nil {
+ // Extension is only in its encoded form.
+ n += len(e.enc)
+ continue
+ }
+
+ // We don't skip extensions that have an encoded form set,
+ // because the extension value may have been mutated after
+ // the last time this function was called.
+
+ ei := u.getExtElemInfo(e.desc)
+ v := e.value
+ p := toAddrPointer(&v, ei.isptr)
+ n += ei.sizer(p, ei.tagsize)
+ }
+ return n
+}
+
+// appendV1Extensions marshals a V1-API extension field to the end of byte slice b.
+func (u *marshalInfo) appendV1Extensions(b []byte, m map[int32]Extension, deterministic bool) ([]byte, error) {
+ if m == nil {
+ return b, nil
+ }
+
+ // Sort the keys to provide a deterministic encoding.
+ keys := make([]int, 0, len(m))
+ for k := range m {
+ keys = append(keys, int(k))
+ }
+ sort.Ints(keys)
+
+ var err error
+ var nerr nonFatal
+ for _, k := range keys {
+ e := m[int32(k)]
+ if e.value == nil || e.desc == nil {
+ // Extension is only in its encoded form.
+ b = append(b, e.enc...)
+ continue
+ }
+
+ // We don't skip extensions that have an encoded form set,
+ // because the extension value may have been mutated after
+ // the last time this function was called.
+
+ ei := u.getExtElemInfo(e.desc)
+ v := e.value
+ p := toAddrPointer(&v, ei.isptr)
+ b, err = ei.marshaler(b, p, ei.wiretag, deterministic)
+ if !nerr.Merge(err) {
+ return b, err
+ }
+ }
+ return b, nerr.E
+}
+
+// newMarshaler is the interface representing objects that can marshal themselves.
+//
+// This exists to support protoc-gen-go generated messages.
+// The proto package will stop type-asserting to this interface in the future.
+//
+// DO NOT DEPEND ON THIS.
+type newMarshaler interface {
+ XXX_Size() int
+ XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
+}
+
+// Size returns the encoded size of a protocol buffer message.
+// This is the main entry point.
+func Size(pb Message) int {
+ if m, ok := pb.(newMarshaler); ok {
+ return m.XXX_Size()
+ }
+ if m, ok := pb.(Marshaler); ok {
+ // If the message can marshal itself, let it do it, for compatibility.
+ // NOTE: This is not efficient.
+ b, _ := m.Marshal()
+ return len(b)
+ }
+ // in case somehow we didn't generate the wrapper
+ if pb == nil {
+ return 0
+ }
+ var info InternalMessageInfo
+ return info.Size(pb)
+}
+
+// Marshal takes a protocol buffer message
+// and encodes it into the wire format, returning the data.
+// This is the main entry point.
+func Marshal(pb Message) ([]byte, error) {
+ if m, ok := pb.(newMarshaler); ok {
+ siz := m.XXX_Size()
+ b := make([]byte, 0, siz)
+ return m.XXX_Marshal(b, false)
+ }
+ if m, ok := pb.(Marshaler); ok {
+ // If the message can marshal itself, let it do it, for compatibility.
+ // NOTE: This is not efficient.
+ return m.Marshal()
+ }
+ // in case somehow we didn't generate the wrapper
+ if pb == nil {
+ return nil, ErrNil
+ }
+ var info InternalMessageInfo
+ siz := info.Size(pb)
+ b := make([]byte, 0, siz)
+ return info.Marshal(b, pb, false)
+}
+
+// Marshal takes a protocol buffer message
+// and encodes it into the wire format, writing the result to the
+// Buffer.
+// This is an alternative entry point. It is not necessary to use
+// a Buffer for most applications.
+func (p *Buffer) Marshal(pb Message) error {
+ var err error
+ if p.deterministic {
+ if _, ok := pb.(Marshaler); ok {
+ return fmt.Errorf("proto: deterministic not supported by the Marshal method of %T", pb)
+ }
+ }
+ if m, ok := pb.(newMarshaler); ok {
+ siz := m.XXX_Size()
+ p.grow(siz) // make sure buf has enough capacity
+ p.buf, err = m.XXX_Marshal(p.buf, p.deterministic)
+ return err
+ }
+ if m, ok := pb.(Marshaler); ok {
+ // If the message can marshal itself, let it do it, for compatibility.
+ // NOTE: This is not efficient.
+ var b []byte
+ b, err = m.Marshal()
+ p.buf = append(p.buf, b...)
+ return err
+ }
+ // in case somehow we didn't generate the wrapper
+ if pb == nil {
+ return ErrNil
+ }
+ var info InternalMessageInfo
+ siz := info.Size(pb)
+ p.grow(siz) // make sure buf has enough capacity
+ p.buf, err = info.Marshal(p.buf, pb, p.deterministic)
+ return err
+}
+
+// grow grows the buffer's capacity, if necessary, to guarantee space for
+// another n bytes. After grow(n), at least n bytes can be written to the
+// buffer without another allocation.
+func (p *Buffer) grow(n int) {
+ need := len(p.buf) + n
+ if need <= cap(p.buf) {
+ return
+ }
+ newCap := len(p.buf) * 2
+ if newCap < need {
+ newCap = need
+ }
+ p.buf = append(make([]byte, 0, newCap), p.buf...)
+}
diff --git a/vendor/github.com/gogo/protobuf/proto/table_marshal_gogo.go b/vendor/github.com/gogo/protobuf/proto/table_marshal_gogo.go
new file mode 100644
index 000000000..997f57c1e
--- /dev/null
+++ b/vendor/github.com/gogo/protobuf/proto/table_marshal_gogo.go
@@ -0,0 +1,388 @@
+// Protocol Buffers for Go with Gadgets
+//
+// Copyright (c) 2018, The GoGo Authors. All rights reserved.
+// http://github.com/gogo/protobuf
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package proto
+
+import (
+ "reflect"
+ "time"
+)
+
+// makeMessageRefMarshaler differs a bit from makeMessageMarshaler
+// It marshal a message T instead of a *T
+func makeMessageRefMarshaler(u *marshalInfo) (sizer, marshaler) {
+ return func(ptr pointer, tagsize int) int {
+ siz := u.size(ptr)
+ return siz + SizeVarint(uint64(siz)) + tagsize
+ },
+ func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) {
+ b = appendVarint(b, wiretag)
+ siz := u.cachedsize(ptr)
+ b = appendVarint(b, uint64(siz))
+ return u.marshal(b, ptr, deterministic)
+ }
+}
+
+// makeMessageRefSliceMarshaler differs quite a lot from makeMessageSliceMarshaler
+// It marshals a slice of messages []T instead of []*T
+func makeMessageRefSliceMarshaler(u *marshalInfo) (sizer, marshaler) {
+ return func(ptr pointer, tagsize int) int {
+ s := ptr.getSlice(u.typ)
+ n := 0
+ for i := 0; i < s.Len(); i++ {
+ elem := s.Index(i)
+ e := elem.Interface()
+ v := toAddrPointer(&e, false)
+ siz := u.size(v)
+ n += siz + SizeVarint(uint64(siz)) + tagsize
+ }
+ return n
+ },
+ func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) {
+ s := ptr.getSlice(u.typ)
+ var err, errreq error
+ for i := 0; i < s.Len(); i++ {
+ elem := s.Index(i)
+ e := elem.Interface()
+ v := toAddrPointer(&e, false)
+ b = appendVarint(b, wiretag)
+ siz := u.size(v)
+ b = appendVarint(b, uint64(siz))
+ b, err = u.marshal(b, v, deterministic)
+
+ if err != nil {
+ if _, ok := err.(*RequiredNotSetError); ok {
+ // Required field in submessage is not set.
+ // We record the error but keep going, to give a complete marshaling.
+ if errreq == nil {
+ errreq = err
+ }
+ continue
+ }
+ if err == ErrNil {
+ err = errRepeatedHasNil
+ }
+ return b, err
+ }
+ }
+
+ return b, errreq
+ }
+}
+
+func makeCustomPtrMarshaler(u *marshalInfo) (sizer, marshaler) {
+ return func(ptr pointer, tagsize int) int {
+ if ptr.isNil() {
+ return 0
+ }
+ m := ptr.asPointerTo(reflect.PtrTo(u.typ)).Elem().Interface().(custom)
+ siz := m.Size()
+ return tagsize + SizeVarint(uint64(siz)) + siz
+ }, func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) {
+ if ptr.isNil() {
+ return b, nil
+ }
+ m := ptr.asPointerTo(reflect.PtrTo(u.typ)).Elem().Interface().(custom)
+ siz := m.Size()
+ buf, err := m.Marshal()
+ if err != nil {
+ return nil, err
+ }
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, uint64(siz))
+ b = append(b, buf...)
+ return b, nil
+ }
+}
+
+func makeCustomMarshaler(u *marshalInfo) (sizer, marshaler) {
+ return func(ptr pointer, tagsize int) int {
+ m := ptr.asPointerTo(u.typ).Interface().(custom)
+ siz := m.Size()
+ return tagsize + SizeVarint(uint64(siz)) + siz
+ }, func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) {
+ m := ptr.asPointerTo(u.typ).Interface().(custom)
+ siz := m.Size()
+ buf, err := m.Marshal()
+ if err != nil {
+ return nil, err
+ }
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, uint64(siz))
+ b = append(b, buf...)
+ return b, nil
+ }
+}
+
+func makeTimeMarshaler(u *marshalInfo) (sizer, marshaler) {
+ return func(ptr pointer, tagsize int) int {
+ t := ptr.asPointerTo(u.typ).Interface().(*time.Time)
+ ts, err := timestampProto(*t)
+ if err != nil {
+ return 0
+ }
+ siz := Size(ts)
+ return tagsize + SizeVarint(uint64(siz)) + siz
+ }, func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) {
+ t := ptr.asPointerTo(u.typ).Interface().(*time.Time)
+ ts, err := timestampProto(*t)
+ if err != nil {
+ return nil, err
+ }
+ buf, err := Marshal(ts)
+ if err != nil {
+ return nil, err
+ }
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, uint64(len(buf)))
+ b = append(b, buf...)
+ return b, nil
+ }
+}
+
+func makeTimePtrMarshaler(u *marshalInfo) (sizer, marshaler) {
+ return func(ptr pointer, tagsize int) int {
+ if ptr.isNil() {
+ return 0
+ }
+ t := ptr.asPointerTo(reflect.PtrTo(u.typ)).Elem().Interface().(*time.Time)
+ ts, err := timestampProto(*t)
+ if err != nil {
+ return 0
+ }
+ siz := Size(ts)
+ return tagsize + SizeVarint(uint64(siz)) + siz
+ }, func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) {
+ if ptr.isNil() {
+ return b, nil
+ }
+ t := ptr.asPointerTo(reflect.PtrTo(u.typ)).Elem().Interface().(*time.Time)
+ ts, err := timestampProto(*t)
+ if err != nil {
+ return nil, err
+ }
+ buf, err := Marshal(ts)
+ if err != nil {
+ return nil, err
+ }
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, uint64(len(buf)))
+ b = append(b, buf...)
+ return b, nil
+ }
+}
+
+func makeTimeSliceMarshaler(u *marshalInfo) (sizer, marshaler) {
+ return func(ptr pointer, tagsize int) int {
+ s := ptr.getSlice(u.typ)
+ n := 0
+ for i := 0; i < s.Len(); i++ {
+ elem := s.Index(i)
+ t := elem.Interface().(time.Time)
+ ts, err := timestampProto(t)
+ if err != nil {
+ return 0
+ }
+ siz := Size(ts)
+ n += siz + SizeVarint(uint64(siz)) + tagsize
+ }
+ return n
+ },
+ func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) {
+ s := ptr.getSlice(u.typ)
+ for i := 0; i < s.Len(); i++ {
+ elem := s.Index(i)
+ t := elem.Interface().(time.Time)
+ ts, err := timestampProto(t)
+ if err != nil {
+ return nil, err
+ }
+ siz := Size(ts)
+ buf, err := Marshal(ts)
+ if err != nil {
+ return nil, err
+ }
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, uint64(siz))
+ b = append(b, buf...)
+ }
+
+ return b, nil
+ }
+}
+
+func makeTimePtrSliceMarshaler(u *marshalInfo) (sizer, marshaler) {
+ return func(ptr pointer, tagsize int) int {
+ s := ptr.getSlice(reflect.PtrTo(u.typ))
+ n := 0
+ for i := 0; i < s.Len(); i++ {
+ elem := s.Index(i)
+ t := elem.Interface().(*time.Time)
+ ts, err := timestampProto(*t)
+ if err != nil {
+ return 0
+ }
+ siz := Size(ts)
+ n += siz + SizeVarint(uint64(siz)) + tagsize
+ }
+ return n
+ },
+ func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) {
+ s := ptr.getSlice(reflect.PtrTo(u.typ))
+ for i := 0; i < s.Len(); i++ {
+ elem := s.Index(i)
+ t := elem.Interface().(*time.Time)
+ ts, err := timestampProto(*t)
+ if err != nil {
+ return nil, err
+ }
+ siz := Size(ts)
+ buf, err := Marshal(ts)
+ if err != nil {
+ return nil, err
+ }
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, uint64(siz))
+ b = append(b, buf...)
+ }
+
+ return b, nil
+ }
+}
+
+func makeDurationMarshaler(u *marshalInfo) (sizer, marshaler) {
+ return func(ptr pointer, tagsize int) int {
+ d := ptr.asPointerTo(u.typ).Interface().(*time.Duration)
+ dur := durationProto(*d)
+ siz := Size(dur)
+ return tagsize + SizeVarint(uint64(siz)) + siz
+ }, func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) {
+ d := ptr.asPointerTo(u.typ).Interface().(*time.Duration)
+ dur := durationProto(*d)
+ buf, err := Marshal(dur)
+ if err != nil {
+ return nil, err
+ }
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, uint64(len(buf)))
+ b = append(b, buf...)
+ return b, nil
+ }
+}
+
+func makeDurationPtrMarshaler(u *marshalInfo) (sizer, marshaler) {
+ return func(ptr pointer, tagsize int) int {
+ if ptr.isNil() {
+ return 0
+ }
+ d := ptr.asPointerTo(reflect.PtrTo(u.typ)).Elem().Interface().(*time.Duration)
+ dur := durationProto(*d)
+ siz := Size(dur)
+ return tagsize + SizeVarint(uint64(siz)) + siz
+ }, func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) {
+ if ptr.isNil() {
+ return b, nil
+ }
+ d := ptr.asPointerTo(reflect.PtrTo(u.typ)).Elem().Interface().(*time.Duration)
+ dur := durationProto(*d)
+ buf, err := Marshal(dur)
+ if err != nil {
+ return nil, err
+ }
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, uint64(len(buf)))
+ b = append(b, buf...)
+ return b, nil
+ }
+}
+
+func makeDurationSliceMarshaler(u *marshalInfo) (sizer, marshaler) {
+ return func(ptr pointer, tagsize int) int {
+ s := ptr.getSlice(u.typ)
+ n := 0
+ for i := 0; i < s.Len(); i++ {
+ elem := s.Index(i)
+ d := elem.Interface().(time.Duration)
+ dur := durationProto(d)
+ siz := Size(dur)
+ n += siz + SizeVarint(uint64(siz)) + tagsize
+ }
+ return n
+ },
+ func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) {
+ s := ptr.getSlice(u.typ)
+ for i := 0; i < s.Len(); i++ {
+ elem := s.Index(i)
+ d := elem.Interface().(time.Duration)
+ dur := durationProto(d)
+ siz := Size(dur)
+ buf, err := Marshal(dur)
+ if err != nil {
+ return nil, err
+ }
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, uint64(siz))
+ b = append(b, buf...)
+ }
+
+ return b, nil
+ }
+}
+
+func makeDurationPtrSliceMarshaler(u *marshalInfo) (sizer, marshaler) {
+ return func(ptr pointer, tagsize int) int {
+ s := ptr.getSlice(reflect.PtrTo(u.typ))
+ n := 0
+ for i := 0; i < s.Len(); i++ {
+ elem := s.Index(i)
+ d := elem.Interface().(*time.Duration)
+ dur := durationProto(*d)
+ siz := Size(dur)
+ n += siz + SizeVarint(uint64(siz)) + tagsize
+ }
+ return n
+ },
+ func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) {
+ s := ptr.getSlice(reflect.PtrTo(u.typ))
+ for i := 0; i < s.Len(); i++ {
+ elem := s.Index(i)
+ d := elem.Interface().(*time.Duration)
+ dur := durationProto(*d)
+ siz := Size(dur)
+ buf, err := Marshal(dur)
+ if err != nil {
+ return nil, err
+ }
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, uint64(siz))
+ b = append(b, buf...)
+ }
+
+ return b, nil
+ }
+}
diff --git a/vendor/github.com/gogo/protobuf/proto/table_merge.go b/vendor/github.com/gogo/protobuf/proto/table_merge.go
new file mode 100644
index 000000000..f520106e0
--- /dev/null
+++ b/vendor/github.com/gogo/protobuf/proto/table_merge.go
@@ -0,0 +1,657 @@
+// Go support for Protocol Buffers - Google's data interchange format
+//
+// Copyright 2016 The Go Authors. All rights reserved.
+// https://github.com/golang/protobuf
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package proto
+
+import (
+ "fmt"
+ "reflect"
+ "strings"
+ "sync"
+ "sync/atomic"
+)
+
+// Merge merges the src message into dst.
+// This assumes that dst and src of the same type and are non-nil.
+func (a *InternalMessageInfo) Merge(dst, src Message) {
+ mi := atomicLoadMergeInfo(&a.merge)
+ if mi == nil {
+ mi = getMergeInfo(reflect.TypeOf(dst).Elem())
+ atomicStoreMergeInfo(&a.merge, mi)
+ }
+ mi.merge(toPointer(&dst), toPointer(&src))
+}
+
+type mergeInfo struct {
+ typ reflect.Type
+
+ initialized int32 // 0: only typ is valid, 1: everything is valid
+ lock sync.Mutex
+
+ fields []mergeFieldInfo
+ unrecognized field // Offset of XXX_unrecognized
+}
+
+type mergeFieldInfo struct {
+ field field // Offset of field, guaranteed to be valid
+
+ // isPointer reports whether the value in the field is a pointer.
+ // This is true for the following situations:
+ // * Pointer to struct
+ // * Pointer to basic type (proto2 only)
+ // * Slice (first value in slice header is a pointer)
+ // * String (first value in string header is a pointer)
+ isPointer bool
+
+ // basicWidth reports the width of the field assuming that it is directly
+ // embedded in the struct (as is the case for basic types in proto3).
+ // The possible values are:
+ // 0: invalid
+ // 1: bool
+ // 4: int32, uint32, float32
+ // 8: int64, uint64, float64
+ basicWidth int
+
+ // Where dst and src are pointers to the types being merged.
+ merge func(dst, src pointer)
+}
+
+var (
+ mergeInfoMap = map[reflect.Type]*mergeInfo{}
+ mergeInfoLock sync.Mutex
+)
+
+func getMergeInfo(t reflect.Type) *mergeInfo {
+ mergeInfoLock.Lock()
+ defer mergeInfoLock.Unlock()
+ mi := mergeInfoMap[t]
+ if mi == nil {
+ mi = &mergeInfo{typ: t}
+ mergeInfoMap[t] = mi
+ }
+ return mi
+}
+
+// merge merges src into dst assuming they are both of type *mi.typ.
+func (mi *mergeInfo) merge(dst, src pointer) {
+ if dst.isNil() {
+ panic("proto: nil destination")
+ }
+ if src.isNil() {
+ return // Nothing to do.
+ }
+
+ if atomic.LoadInt32(&mi.initialized) == 0 {
+ mi.computeMergeInfo()
+ }
+
+ for _, fi := range mi.fields {
+ sfp := src.offset(fi.field)
+
+ // As an optimization, we can avoid the merge function call cost
+ // if we know for sure that the source will have no effect
+ // by checking if it is the zero value.
+ if unsafeAllowed {
+ if fi.isPointer && sfp.getPointer().isNil() { // Could be slice or string
+ continue
+ }
+ if fi.basicWidth > 0 {
+ switch {
+ case fi.basicWidth == 1 && !*sfp.toBool():
+ continue
+ case fi.basicWidth == 4 && *sfp.toUint32() == 0:
+ continue
+ case fi.basicWidth == 8 && *sfp.toUint64() == 0:
+ continue
+ }
+ }
+ }
+
+ dfp := dst.offset(fi.field)
+ fi.merge(dfp, sfp)
+ }
+
+ // TODO: Make this faster?
+ out := dst.asPointerTo(mi.typ).Elem()
+ in := src.asPointerTo(mi.typ).Elem()
+ if emIn, err := extendable(in.Addr().Interface()); err == nil {
+ emOut, _ := extendable(out.Addr().Interface())
+ mIn, muIn := emIn.extensionsRead()
+ if mIn != nil {
+ mOut := emOut.extensionsWrite()
+ muIn.Lock()
+ mergeExtension(mOut, mIn)
+ muIn.Unlock()
+ }
+ }
+
+ if mi.unrecognized.IsValid() {
+ if b := *src.offset(mi.unrecognized).toBytes(); len(b) > 0 {
+ *dst.offset(mi.unrecognized).toBytes() = append([]byte(nil), b...)
+ }
+ }
+}
+
+func (mi *mergeInfo) computeMergeInfo() {
+ mi.lock.Lock()
+ defer mi.lock.Unlock()
+ if mi.initialized != 0 {
+ return
+ }
+ t := mi.typ
+ n := t.NumField()
+
+ props := GetProperties(t)
+ for i := 0; i < n; i++ {
+ f := t.Field(i)
+ if strings.HasPrefix(f.Name, "XXX_") {
+ continue
+ }
+
+ mfi := mergeFieldInfo{field: toField(&f)}
+ tf := f.Type
+
+ // As an optimization, we can avoid the merge function call cost
+ // if we know for sure that the source will have no effect
+ // by checking if it is the zero value.
+ if unsafeAllowed {
+ switch tf.Kind() {
+ case reflect.Ptr, reflect.Slice, reflect.String:
+ // As a special case, we assume slices and strings are pointers
+ // since we know that the first field in the SliceSlice or
+ // StringHeader is a data pointer.
+ mfi.isPointer = true
+ case reflect.Bool:
+ mfi.basicWidth = 1
+ case reflect.Int32, reflect.Uint32, reflect.Float32:
+ mfi.basicWidth = 4
+ case reflect.Int64, reflect.Uint64, reflect.Float64:
+ mfi.basicWidth = 8
+ }
+ }
+
+ // Unwrap tf to get at its most basic type.
+ var isPointer, isSlice bool
+ if tf.Kind() == reflect.Slice && tf.Elem().Kind() != reflect.Uint8 {
+ isSlice = true
+ tf = tf.Elem()
+ }
+ if tf.Kind() == reflect.Ptr {
+ isPointer = true
+ tf = tf.Elem()
+ }
+ if isPointer && isSlice && tf.Kind() != reflect.Struct {
+ panic("both pointer and slice for basic type in " + tf.Name())
+ }
+
+ switch tf.Kind() {
+ case reflect.Int32:
+ switch {
+ case isSlice: // E.g., []int32
+ mfi.merge = func(dst, src pointer) {
+ // NOTE: toInt32Slice is not defined (see pointer_reflect.go).
+ /*
+ sfsp := src.toInt32Slice()
+ if *sfsp != nil {
+ dfsp := dst.toInt32Slice()
+ *dfsp = append(*dfsp, *sfsp...)
+ if *dfsp == nil {
+ *dfsp = []int64{}
+ }
+ }
+ */
+ sfs := src.getInt32Slice()
+ if sfs != nil {
+ dfs := dst.getInt32Slice()
+ dfs = append(dfs, sfs...)
+ if dfs == nil {
+ dfs = []int32{}
+ }
+ dst.setInt32Slice(dfs)
+ }
+ }
+ case isPointer: // E.g., *int32
+ mfi.merge = func(dst, src pointer) {
+ // NOTE: toInt32Ptr is not defined (see pointer_reflect.go).
+ /*
+ sfpp := src.toInt32Ptr()
+ if *sfpp != nil {
+ dfpp := dst.toInt32Ptr()
+ if *dfpp == nil {
+ *dfpp = Int32(**sfpp)
+ } else {
+ **dfpp = **sfpp
+ }
+ }
+ */
+ sfp := src.getInt32Ptr()
+ if sfp != nil {
+ dfp := dst.getInt32Ptr()
+ if dfp == nil {
+ dst.setInt32Ptr(*sfp)
+ } else {
+ *dfp = *sfp
+ }
+ }
+ }
+ default: // E.g., int32
+ mfi.merge = func(dst, src pointer) {
+ if v := *src.toInt32(); v != 0 {
+ *dst.toInt32() = v
+ }
+ }
+ }
+ case reflect.Int64:
+ switch {
+ case isSlice: // E.g., []int64
+ mfi.merge = func(dst, src pointer) {
+ sfsp := src.toInt64Slice()
+ if *sfsp != nil {
+ dfsp := dst.toInt64Slice()
+ *dfsp = append(*dfsp, *sfsp...)
+ if *dfsp == nil {
+ *dfsp = []int64{}
+ }
+ }
+ }
+ case isPointer: // E.g., *int64
+ mfi.merge = func(dst, src pointer) {
+ sfpp := src.toInt64Ptr()
+ if *sfpp != nil {
+ dfpp := dst.toInt64Ptr()
+ if *dfpp == nil {
+ *dfpp = Int64(**sfpp)
+ } else {
+ **dfpp = **sfpp
+ }
+ }
+ }
+ default: // E.g., int64
+ mfi.merge = func(dst, src pointer) {
+ if v := *src.toInt64(); v != 0 {
+ *dst.toInt64() = v
+ }
+ }
+ }
+ case reflect.Uint32:
+ switch {
+ case isSlice: // E.g., []uint32
+ mfi.merge = func(dst, src pointer) {
+ sfsp := src.toUint32Slice()
+ if *sfsp != nil {
+ dfsp := dst.toUint32Slice()
+ *dfsp = append(*dfsp, *sfsp...)
+ if *dfsp == nil {
+ *dfsp = []uint32{}
+ }
+ }
+ }
+ case isPointer: // E.g., *uint32
+ mfi.merge = func(dst, src pointer) {
+ sfpp := src.toUint32Ptr()
+ if *sfpp != nil {
+ dfpp := dst.toUint32Ptr()
+ if *dfpp == nil {
+ *dfpp = Uint32(**sfpp)
+ } else {
+ **dfpp = **sfpp
+ }
+ }
+ }
+ default: // E.g., uint32
+ mfi.merge = func(dst, src pointer) {
+ if v := *src.toUint32(); v != 0 {
+ *dst.toUint32() = v
+ }
+ }
+ }
+ case reflect.Uint64:
+ switch {
+ case isSlice: // E.g., []uint64
+ mfi.merge = func(dst, src pointer) {
+ sfsp := src.toUint64Slice()
+ if *sfsp != nil {
+ dfsp := dst.toUint64Slice()
+ *dfsp = append(*dfsp, *sfsp...)
+ if *dfsp == nil {
+ *dfsp = []uint64{}
+ }
+ }
+ }
+ case isPointer: // E.g., *uint64
+ mfi.merge = func(dst, src pointer) {
+ sfpp := src.toUint64Ptr()
+ if *sfpp != nil {
+ dfpp := dst.toUint64Ptr()
+ if *dfpp == nil {
+ *dfpp = Uint64(**sfpp)
+ } else {
+ **dfpp = **sfpp
+ }
+ }
+ }
+ default: // E.g., uint64
+ mfi.merge = func(dst, src pointer) {
+ if v := *src.toUint64(); v != 0 {
+ *dst.toUint64() = v
+ }
+ }
+ }
+ case reflect.Float32:
+ switch {
+ case isSlice: // E.g., []float32
+ mfi.merge = func(dst, src pointer) {
+ sfsp := src.toFloat32Slice()
+ if *sfsp != nil {
+ dfsp := dst.toFloat32Slice()
+ *dfsp = append(*dfsp, *sfsp...)
+ if *dfsp == nil {
+ *dfsp = []float32{}
+ }
+ }
+ }
+ case isPointer: // E.g., *float32
+ mfi.merge = func(dst, src pointer) {
+ sfpp := src.toFloat32Ptr()
+ if *sfpp != nil {
+ dfpp := dst.toFloat32Ptr()
+ if *dfpp == nil {
+ *dfpp = Float32(**sfpp)
+ } else {
+ **dfpp = **sfpp
+ }
+ }
+ }
+ default: // E.g., float32
+ mfi.merge = func(dst, src pointer) {
+ if v := *src.toFloat32(); v != 0 {
+ *dst.toFloat32() = v
+ }
+ }
+ }
+ case reflect.Float64:
+ switch {
+ case isSlice: // E.g., []float64
+ mfi.merge = func(dst, src pointer) {
+ sfsp := src.toFloat64Slice()
+ if *sfsp != nil {
+ dfsp := dst.toFloat64Slice()
+ *dfsp = append(*dfsp, *sfsp...)
+ if *dfsp == nil {
+ *dfsp = []float64{}
+ }
+ }
+ }
+ case isPointer: // E.g., *float64
+ mfi.merge = func(dst, src pointer) {
+ sfpp := src.toFloat64Ptr()
+ if *sfpp != nil {
+ dfpp := dst.toFloat64Ptr()
+ if *dfpp == nil {
+ *dfpp = Float64(**sfpp)
+ } else {
+ **dfpp = **sfpp
+ }
+ }
+ }
+ default: // E.g., float64
+ mfi.merge = func(dst, src pointer) {
+ if v := *src.toFloat64(); v != 0 {
+ *dst.toFloat64() = v
+ }
+ }
+ }
+ case reflect.Bool:
+ switch {
+ case isSlice: // E.g., []bool
+ mfi.merge = func(dst, src pointer) {
+ sfsp := src.toBoolSlice()
+ if *sfsp != nil {
+ dfsp := dst.toBoolSlice()
+ *dfsp = append(*dfsp, *sfsp...)
+ if *dfsp == nil {
+ *dfsp = []bool{}
+ }
+ }
+ }
+ case isPointer: // E.g., *bool
+ mfi.merge = func(dst, src pointer) {
+ sfpp := src.toBoolPtr()
+ if *sfpp != nil {
+ dfpp := dst.toBoolPtr()
+ if *dfpp == nil {
+ *dfpp = Bool(**sfpp)
+ } else {
+ **dfpp = **sfpp
+ }
+ }
+ }
+ default: // E.g., bool
+ mfi.merge = func(dst, src pointer) {
+ if v := *src.toBool(); v {
+ *dst.toBool() = v
+ }
+ }
+ }
+ case reflect.String:
+ switch {
+ case isSlice: // E.g., []string
+ mfi.merge = func(dst, src pointer) {
+ sfsp := src.toStringSlice()
+ if *sfsp != nil {
+ dfsp := dst.toStringSlice()
+ *dfsp = append(*dfsp, *sfsp...)
+ if *dfsp == nil {
+ *dfsp = []string{}
+ }
+ }
+ }
+ case isPointer: // E.g., *string
+ mfi.merge = func(dst, src pointer) {
+ sfpp := src.toStringPtr()
+ if *sfpp != nil {
+ dfpp := dst.toStringPtr()
+ if *dfpp == nil {
+ *dfpp = String(**sfpp)
+ } else {
+ **dfpp = **sfpp
+ }
+ }
+ }
+ default: // E.g., string
+ mfi.merge = func(dst, src pointer) {
+ if v := *src.toString(); v != "" {
+ *dst.toString() = v
+ }
+ }
+ }
+ case reflect.Slice:
+ isProto3 := props.Prop[i].proto3
+ switch {
+ case isPointer:
+ panic("bad pointer in byte slice case in " + tf.Name())
+ case tf.Elem().Kind() != reflect.Uint8:
+ panic("bad element kind in byte slice case in " + tf.Name())
+ case isSlice: // E.g., [][]byte
+ mfi.merge = func(dst, src pointer) {
+ sbsp := src.toBytesSlice()
+ if *sbsp != nil {
+ dbsp := dst.toBytesSlice()
+ for _, sb := range *sbsp {
+ if sb == nil {
+ *dbsp = append(*dbsp, nil)
+ } else {
+ *dbsp = append(*dbsp, append([]byte{}, sb...))
+ }
+ }
+ if *dbsp == nil {
+ *dbsp = [][]byte{}
+ }
+ }
+ }
+ default: // E.g., []byte
+ mfi.merge = func(dst, src pointer) {
+ sbp := src.toBytes()
+ if *sbp != nil {
+ dbp := dst.toBytes()
+ if !isProto3 || len(*sbp) > 0 {
+ *dbp = append([]byte{}, *sbp...)
+ }
+ }
+ }
+ }
+ case reflect.Struct:
+ switch {
+ case !isPointer:
+ mergeInfo := getMergeInfo(tf)
+ mfi.merge = func(dst, src pointer) {
+ mergeInfo.merge(dst, src)
+ }
+ case isSlice: // E.g., []*pb.T
+ mergeInfo := getMergeInfo(tf)
+ mfi.merge = func(dst, src pointer) {
+ sps := src.getPointerSlice()
+ if sps != nil {
+ dps := dst.getPointerSlice()
+ for _, sp := range sps {
+ var dp pointer
+ if !sp.isNil() {
+ dp = valToPointer(reflect.New(tf))
+ mergeInfo.merge(dp, sp)
+ }
+ dps = append(dps, dp)
+ }
+ if dps == nil {
+ dps = []pointer{}
+ }
+ dst.setPointerSlice(dps)
+ }
+ }
+ default: // E.g., *pb.T
+ mergeInfo := getMergeInfo(tf)
+ mfi.merge = func(dst, src pointer) {
+ sp := src.getPointer()
+ if !sp.isNil() {
+ dp := dst.getPointer()
+ if dp.isNil() {
+ dp = valToPointer(reflect.New(tf))
+ dst.setPointer(dp)
+ }
+ mergeInfo.merge(dp, sp)
+ }
+ }
+ }
+ case reflect.Map:
+ switch {
+ case isPointer || isSlice:
+ panic("bad pointer or slice in map case in " + tf.Name())
+ default: // E.g., map[K]V
+ mfi.merge = func(dst, src pointer) {
+ sm := src.asPointerTo(tf).Elem()
+ if sm.Len() == 0 {
+ return
+ }
+ dm := dst.asPointerTo(tf).Elem()
+ if dm.IsNil() {
+ dm.Set(reflect.MakeMap(tf))
+ }
+
+ switch tf.Elem().Kind() {
+ case reflect.Ptr: // Proto struct (e.g., *T)
+ for _, key := range sm.MapKeys() {
+ val := sm.MapIndex(key)
+ val = reflect.ValueOf(Clone(val.Interface().(Message)))
+ dm.SetMapIndex(key, val)
+ }
+ case reflect.Slice: // E.g. Bytes type (e.g., []byte)
+ for _, key := range sm.MapKeys() {
+ val := sm.MapIndex(key)
+ val = reflect.ValueOf(append([]byte{}, val.Bytes()...))
+ dm.SetMapIndex(key, val)
+ }
+ default: // Basic type (e.g., string)
+ for _, key := range sm.MapKeys() {
+ val := sm.MapIndex(key)
+ dm.SetMapIndex(key, val)
+ }
+ }
+ }
+ }
+ case reflect.Interface:
+ // Must be oneof field.
+ switch {
+ case isPointer || isSlice:
+ panic("bad pointer or slice in interface case in " + tf.Name())
+ default: // E.g., interface{}
+ // TODO: Make this faster?
+ mfi.merge = func(dst, src pointer) {
+ su := src.asPointerTo(tf).Elem()
+ if !su.IsNil() {
+ du := dst.asPointerTo(tf).Elem()
+ typ := su.Elem().Type()
+ if du.IsNil() || du.Elem().Type() != typ {
+ du.Set(reflect.New(typ.Elem())) // Initialize interface if empty
+ }
+ sv := su.Elem().Elem().Field(0)
+ if sv.Kind() == reflect.Ptr && sv.IsNil() {
+ return
+ }
+ dv := du.Elem().Elem().Field(0)
+ if dv.Kind() == reflect.Ptr && dv.IsNil() {
+ dv.Set(reflect.New(sv.Type().Elem())) // Initialize proto message if empty
+ }
+ switch sv.Type().Kind() {
+ case reflect.Ptr: // Proto struct (e.g., *T)
+ Merge(dv.Interface().(Message), sv.Interface().(Message))
+ case reflect.Slice: // E.g. Bytes type (e.g., []byte)
+ dv.Set(reflect.ValueOf(append([]byte{}, sv.Bytes()...)))
+ default: // Basic type (e.g., string)
+ dv.Set(sv)
+ }
+ }
+ }
+ }
+ default:
+ panic(fmt.Sprintf("merger not found for type:%s", tf))
+ }
+ mi.fields = append(mi.fields, mfi)
+ }
+
+ mi.unrecognized = invalidField
+ if f, ok := t.FieldByName("XXX_unrecognized"); ok {
+ if f.Type != reflect.TypeOf([]byte{}) {
+ panic("expected XXX_unrecognized to be of type []byte")
+ }
+ mi.unrecognized = toField(&f)
+ }
+
+ atomic.StoreInt32(&mi.initialized, 1)
+}
diff --git a/vendor/github.com/gogo/protobuf/proto/table_unmarshal.go b/vendor/github.com/gogo/protobuf/proto/table_unmarshal.go
new file mode 100644
index 000000000..bb2622f28
--- /dev/null
+++ b/vendor/github.com/gogo/protobuf/proto/table_unmarshal.go
@@ -0,0 +1,2245 @@
+// Go support for Protocol Buffers - Google's data interchange format
+//
+// Copyright 2016 The Go Authors. All rights reserved.
+// https://github.com/golang/protobuf
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package proto
+
+import (
+ "errors"
+ "fmt"
+ "io"
+ "math"
+ "reflect"
+ "strconv"
+ "strings"
+ "sync"
+ "sync/atomic"
+ "unicode/utf8"
+)
+
+// Unmarshal is the entry point from the generated .pb.go files.
+// This function is not intended to be used by non-generated code.
+// This function is not subject to any compatibility guarantee.
+// msg contains a pointer to a protocol buffer struct.
+// b is the data to be unmarshaled into the protocol buffer.
+// a is a pointer to a place to store cached unmarshal information.
+func (a *InternalMessageInfo) Unmarshal(msg Message, b []byte) error {
+ // Load the unmarshal information for this message type.
+ // The atomic load ensures memory consistency.
+ u := atomicLoadUnmarshalInfo(&a.unmarshal)
+ if u == nil {
+ // Slow path: find unmarshal info for msg, update a with it.
+ u = getUnmarshalInfo(reflect.TypeOf(msg).Elem())
+ atomicStoreUnmarshalInfo(&a.unmarshal, u)
+ }
+ // Then do the unmarshaling.
+ err := u.unmarshal(toPointer(&msg), b)
+ return err
+}
+
+type unmarshalInfo struct {
+ typ reflect.Type // type of the protobuf struct
+
+ // 0 = only typ field is initialized
+ // 1 = completely initialized
+ initialized int32
+ lock sync.Mutex // prevents double initialization
+ dense []unmarshalFieldInfo // fields indexed by tag #
+ sparse map[uint64]unmarshalFieldInfo // fields indexed by tag #
+ reqFields []string // names of required fields
+ reqMask uint64 // 1< 0 {
+ // Read tag and wire type.
+ // Special case 1 and 2 byte varints.
+ var x uint64
+ if b[0] < 128 {
+ x = uint64(b[0])
+ b = b[1:]
+ } else if len(b) >= 2 && b[1] < 128 {
+ x = uint64(b[0]&0x7f) + uint64(b[1])<<7
+ b = b[2:]
+ } else {
+ var n int
+ x, n = decodeVarint(b)
+ if n == 0 {
+ return io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ }
+ tag := x >> 3
+ wire := int(x) & 7
+
+ // Dispatch on the tag to one of the unmarshal* functions below.
+ var f unmarshalFieldInfo
+ if tag < uint64(len(u.dense)) {
+ f = u.dense[tag]
+ } else {
+ f = u.sparse[tag]
+ }
+ if fn := f.unmarshal; fn != nil {
+ var err error
+ b, err = fn(b, m.offset(f.field), wire)
+ if err == nil {
+ reqMask |= f.reqMask
+ continue
+ }
+ if r, ok := err.(*RequiredNotSetError); ok {
+ // Remember this error, but keep parsing. We need to produce
+ // a full parse even if a required field is missing.
+ if errLater == nil {
+ errLater = r
+ }
+ reqMask |= f.reqMask
+ continue
+ }
+ if err != errInternalBadWireType {
+ if err == errInvalidUTF8 {
+ if errLater == nil {
+ fullName := revProtoTypes[reflect.PtrTo(u.typ)] + "." + f.name
+ errLater = &invalidUTF8Error{fullName}
+ }
+ continue
+ }
+ return err
+ }
+ // Fragments with bad wire type are treated as unknown fields.
+ }
+
+ // Unknown tag.
+ if !u.unrecognized.IsValid() {
+ // Don't keep unrecognized data; just skip it.
+ var err error
+ b, err = skipField(b, wire)
+ if err != nil {
+ return err
+ }
+ continue
+ }
+ // Keep unrecognized data around.
+ // maybe in extensions, maybe in the unrecognized field.
+ z := m.offset(u.unrecognized).toBytes()
+ var emap map[int32]Extension
+ var e Extension
+ for _, r := range u.extensionRanges {
+ if uint64(r.Start) <= tag && tag <= uint64(r.End) {
+ if u.extensions.IsValid() {
+ mp := m.offset(u.extensions).toExtensions()
+ emap = mp.extensionsWrite()
+ e = emap[int32(tag)]
+ z = &e.enc
+ break
+ }
+ if u.oldExtensions.IsValid() {
+ p := m.offset(u.oldExtensions).toOldExtensions()
+ emap = *p
+ if emap == nil {
+ emap = map[int32]Extension{}
+ *p = emap
+ }
+ e = emap[int32(tag)]
+ z = &e.enc
+ break
+ }
+ if u.bytesExtensions.IsValid() {
+ z = m.offset(u.bytesExtensions).toBytes()
+ break
+ }
+ panic("no extensions field available")
+ }
+ }
+ // Use wire type to skip data.
+ var err error
+ b0 := b
+ b, err = skipField(b, wire)
+ if err != nil {
+ return err
+ }
+ *z = encodeVarint(*z, tag<<3|uint64(wire))
+ *z = append(*z, b0[:len(b0)-len(b)]...)
+
+ if emap != nil {
+ emap[int32(tag)] = e
+ }
+ }
+ if reqMask != u.reqMask && errLater == nil {
+ // A required field of this message is missing.
+ for _, n := range u.reqFields {
+ if reqMask&1 == 0 {
+ errLater = &RequiredNotSetError{n}
+ }
+ reqMask >>= 1
+ }
+ }
+ return errLater
+}
+
+// computeUnmarshalInfo fills in u with information for use
+// in unmarshaling protocol buffers of type u.typ.
+func (u *unmarshalInfo) computeUnmarshalInfo() {
+ u.lock.Lock()
+ defer u.lock.Unlock()
+ if u.initialized != 0 {
+ return
+ }
+ t := u.typ
+ n := t.NumField()
+
+ // Set up the "not found" value for the unrecognized byte buffer.
+ // This is the default for proto3.
+ u.unrecognized = invalidField
+ u.extensions = invalidField
+ u.oldExtensions = invalidField
+ u.bytesExtensions = invalidField
+
+ // List of the generated type and offset for each oneof field.
+ type oneofField struct {
+ ityp reflect.Type // interface type of oneof field
+ field field // offset in containing message
+ }
+ var oneofFields []oneofField
+
+ for i := 0; i < n; i++ {
+ f := t.Field(i)
+ if f.Name == "XXX_unrecognized" {
+ // The byte slice used to hold unrecognized input is special.
+ if f.Type != reflect.TypeOf(([]byte)(nil)) {
+ panic("bad type for XXX_unrecognized field: " + f.Type.Name())
+ }
+ u.unrecognized = toField(&f)
+ continue
+ }
+ if f.Name == "XXX_InternalExtensions" {
+ // Ditto here.
+ if f.Type != reflect.TypeOf(XXX_InternalExtensions{}) {
+ panic("bad type for XXX_InternalExtensions field: " + f.Type.Name())
+ }
+ u.extensions = toField(&f)
+ if f.Tag.Get("protobuf_messageset") == "1" {
+ u.isMessageSet = true
+ }
+ continue
+ }
+ if f.Name == "XXX_extensions" {
+ // An older form of the extensions field.
+ if f.Type == reflect.TypeOf((map[int32]Extension)(nil)) {
+ u.oldExtensions = toField(&f)
+ continue
+ } else if f.Type == reflect.TypeOf(([]byte)(nil)) {
+ u.bytesExtensions = toField(&f)
+ continue
+ }
+ panic("bad type for XXX_extensions field: " + f.Type.Name())
+ }
+ if f.Name == "XXX_NoUnkeyedLiteral" || f.Name == "XXX_sizecache" {
+ continue
+ }
+
+ oneof := f.Tag.Get("protobuf_oneof")
+ if oneof != "" {
+ oneofFields = append(oneofFields, oneofField{f.Type, toField(&f)})
+ // The rest of oneof processing happens below.
+ continue
+ }
+
+ tags := f.Tag.Get("protobuf")
+ tagArray := strings.Split(tags, ",")
+ if len(tagArray) < 2 {
+ panic("protobuf tag not enough fields in " + t.Name() + "." + f.Name + ": " + tags)
+ }
+ tag, err := strconv.Atoi(tagArray[1])
+ if err != nil {
+ panic("protobuf tag field not an integer: " + tagArray[1])
+ }
+
+ name := ""
+ for _, tag := range tagArray[3:] {
+ if strings.HasPrefix(tag, "name=") {
+ name = tag[5:]
+ }
+ }
+
+ // Extract unmarshaling function from the field (its type and tags).
+ unmarshal := fieldUnmarshaler(&f)
+
+ // Required field?
+ var reqMask uint64
+ if tagArray[2] == "req" {
+ bit := len(u.reqFields)
+ u.reqFields = append(u.reqFields, name)
+ reqMask = uint64(1) << uint(bit)
+ // TODO: if we have more than 64 required fields, we end up
+ // not verifying that all required fields are present.
+ // Fix this, perhaps using a count of required fields?
+ }
+
+ // Store the info in the correct slot in the message.
+ u.setTag(tag, toField(&f), unmarshal, reqMask, name)
+ }
+
+ // Find any types associated with oneof fields.
+ // TODO: XXX_OneofFuncs returns more info than we need. Get rid of some of it?
+ fn := reflect.Zero(reflect.PtrTo(t)).MethodByName("XXX_OneofFuncs")
+ // gogo: len(oneofFields) > 0 is needed for embedded oneof messages, without a marshaler and unmarshaler
+ if fn.IsValid() && len(oneofFields) > 0 {
+ res := fn.Call(nil)[3] // last return value from XXX_OneofFuncs: []interface{}
+ for i := res.Len() - 1; i >= 0; i-- {
+ v := res.Index(i) // interface{}
+ tptr := reflect.ValueOf(v.Interface()).Type() // *Msg_X
+ typ := tptr.Elem() // Msg_X
+
+ f := typ.Field(0) // oneof implementers have one field
+ baseUnmarshal := fieldUnmarshaler(&f)
+ tags := strings.Split(f.Tag.Get("protobuf"), ",")
+ fieldNum, err := strconv.Atoi(tags[1])
+ if err != nil {
+ panic("protobuf tag field not an integer: " + tags[1])
+ }
+ var name string
+ for _, tag := range tags {
+ if strings.HasPrefix(tag, "name=") {
+ name = strings.TrimPrefix(tag, "name=")
+ break
+ }
+ }
+
+ // Find the oneof field that this struct implements.
+ // Might take O(n^2) to process all of the oneofs, but who cares.
+ for _, of := range oneofFields {
+ if tptr.Implements(of.ityp) {
+ // We have found the corresponding interface for this struct.
+ // That lets us know where this struct should be stored
+ // when we encounter it during unmarshaling.
+ unmarshal := makeUnmarshalOneof(typ, of.ityp, baseUnmarshal)
+ u.setTag(fieldNum, of.field, unmarshal, 0, name)
+ }
+ }
+ }
+ }
+
+ // Get extension ranges, if any.
+ fn = reflect.Zero(reflect.PtrTo(t)).MethodByName("ExtensionRangeArray")
+ if fn.IsValid() {
+ if !u.extensions.IsValid() && !u.oldExtensions.IsValid() && !u.bytesExtensions.IsValid() {
+ panic("a message with extensions, but no extensions field in " + t.Name())
+ }
+ u.extensionRanges = fn.Call(nil)[0].Interface().([]ExtensionRange)
+ }
+
+ // Explicitly disallow tag 0. This will ensure we flag an error
+ // when decoding a buffer of all zeros. Without this code, we
+ // would decode and skip an all-zero buffer of even length.
+ // [0 0] is [tag=0/wiretype=varint varint-encoded-0].
+ u.setTag(0, zeroField, func(b []byte, f pointer, w int) ([]byte, error) {
+ return nil, fmt.Errorf("proto: %s: illegal tag 0 (wire type %d)", t, w)
+ }, 0, "")
+
+ // Set mask for required field check.
+ u.reqMask = uint64(1)<= 0 && (tag < 16 || tag < 2*n) { // TODO: what are the right numbers here?
+ for len(u.dense) <= tag {
+ u.dense = append(u.dense, unmarshalFieldInfo{})
+ }
+ u.dense[tag] = i
+ return
+ }
+ if u.sparse == nil {
+ u.sparse = map[uint64]unmarshalFieldInfo{}
+ }
+ u.sparse[uint64(tag)] = i
+}
+
+// fieldUnmarshaler returns an unmarshaler for the given field.
+func fieldUnmarshaler(f *reflect.StructField) unmarshaler {
+ if f.Type.Kind() == reflect.Map {
+ return makeUnmarshalMap(f)
+ }
+ return typeUnmarshaler(f.Type, f.Tag.Get("protobuf"))
+}
+
+// typeUnmarshaler returns an unmarshaler for the given field type / field tag pair.
+func typeUnmarshaler(t reflect.Type, tags string) unmarshaler {
+ tagArray := strings.Split(tags, ",")
+ encoding := tagArray[0]
+ name := "unknown"
+ ctype := false
+ isTime := false
+ isDuration := false
+ isWktPointer := false
+ proto3 := false
+ validateUTF8 := true
+ for _, tag := range tagArray[3:] {
+ if strings.HasPrefix(tag, "name=") {
+ name = tag[5:]
+ }
+ if tag == "proto3" {
+ proto3 = true
+ }
+ if strings.HasPrefix(tag, "customtype=") {
+ ctype = true
+ }
+ if tag == "stdtime" {
+ isTime = true
+ }
+ if tag == "stdduration" {
+ isDuration = true
+ }
+ if tag == "wktptr" {
+ isWktPointer = true
+ }
+ }
+ validateUTF8 = validateUTF8 && proto3
+
+ // Figure out packaging (pointer, slice, or both)
+ slice := false
+ pointer := false
+ if t.Kind() == reflect.Slice && t.Elem().Kind() != reflect.Uint8 {
+ slice = true
+ t = t.Elem()
+ }
+ if t.Kind() == reflect.Ptr {
+ pointer = true
+ t = t.Elem()
+ }
+
+ if ctype {
+ if reflect.PtrTo(t).Implements(customType) {
+ if slice {
+ return makeUnmarshalCustomSlice(getUnmarshalInfo(t), name)
+ }
+ if pointer {
+ return makeUnmarshalCustomPtr(getUnmarshalInfo(t), name)
+ }
+ return makeUnmarshalCustom(getUnmarshalInfo(t), name)
+ } else {
+ panic(fmt.Sprintf("custom type: type: %v, does not implement the proto.custom interface", t))
+ }
+ }
+
+ if isTime {
+ if pointer {
+ if slice {
+ return makeUnmarshalTimePtrSlice(getUnmarshalInfo(t), name)
+ }
+ return makeUnmarshalTimePtr(getUnmarshalInfo(t), name)
+ }
+ if slice {
+ return makeUnmarshalTimeSlice(getUnmarshalInfo(t), name)
+ }
+ return makeUnmarshalTime(getUnmarshalInfo(t), name)
+ }
+
+ if isDuration {
+ if pointer {
+ if slice {
+ return makeUnmarshalDurationPtrSlice(getUnmarshalInfo(t), name)
+ }
+ return makeUnmarshalDurationPtr(getUnmarshalInfo(t), name)
+ }
+ if slice {
+ return makeUnmarshalDurationSlice(getUnmarshalInfo(t), name)
+ }
+ return makeUnmarshalDuration(getUnmarshalInfo(t), name)
+ }
+
+ if isWktPointer {
+ switch t.Kind() {
+ case reflect.Float64:
+ if pointer {
+ if slice {
+ return makeStdDoubleValuePtrSliceUnmarshaler(getUnmarshalInfo(t), name)
+ }
+ return makeStdDoubleValuePtrUnmarshaler(getUnmarshalInfo(t), name)
+ }
+ if slice {
+ return makeStdDoubleValueSliceUnmarshaler(getUnmarshalInfo(t), name)
+ }
+ return makeStdDoubleValueUnmarshaler(getUnmarshalInfo(t), name)
+ case reflect.Float32:
+ if pointer {
+ if slice {
+ return makeStdFloatValuePtrSliceUnmarshaler(getUnmarshalInfo(t), name)
+ }
+ return makeStdFloatValuePtrUnmarshaler(getUnmarshalInfo(t), name)
+ }
+ if slice {
+ return makeStdFloatValueSliceUnmarshaler(getUnmarshalInfo(t), name)
+ }
+ return makeStdFloatValueUnmarshaler(getUnmarshalInfo(t), name)
+ case reflect.Int64:
+ if pointer {
+ if slice {
+ return makeStdInt64ValuePtrSliceUnmarshaler(getUnmarshalInfo(t), name)
+ }
+ return makeStdInt64ValuePtrUnmarshaler(getUnmarshalInfo(t), name)
+ }
+ if slice {
+ return makeStdInt64ValueSliceUnmarshaler(getUnmarshalInfo(t), name)
+ }
+ return makeStdInt64ValueUnmarshaler(getUnmarshalInfo(t), name)
+ case reflect.Uint64:
+ if pointer {
+ if slice {
+ return makeStdUInt64ValuePtrSliceUnmarshaler(getUnmarshalInfo(t), name)
+ }
+ return makeStdUInt64ValuePtrUnmarshaler(getUnmarshalInfo(t), name)
+ }
+ if slice {
+ return makeStdUInt64ValueSliceUnmarshaler(getUnmarshalInfo(t), name)
+ }
+ return makeStdUInt64ValueUnmarshaler(getUnmarshalInfo(t), name)
+ case reflect.Int32:
+ if pointer {
+ if slice {
+ return makeStdInt32ValuePtrSliceUnmarshaler(getUnmarshalInfo(t), name)
+ }
+ return makeStdInt32ValuePtrUnmarshaler(getUnmarshalInfo(t), name)
+ }
+ if slice {
+ return makeStdInt32ValueSliceUnmarshaler(getUnmarshalInfo(t), name)
+ }
+ return makeStdInt32ValueUnmarshaler(getUnmarshalInfo(t), name)
+ case reflect.Uint32:
+ if pointer {
+ if slice {
+ return makeStdUInt32ValuePtrSliceUnmarshaler(getUnmarshalInfo(t), name)
+ }
+ return makeStdUInt32ValuePtrUnmarshaler(getUnmarshalInfo(t), name)
+ }
+ if slice {
+ return makeStdUInt32ValueSliceUnmarshaler(getUnmarshalInfo(t), name)
+ }
+ return makeStdUInt32ValueUnmarshaler(getUnmarshalInfo(t), name)
+ case reflect.Bool:
+ if pointer {
+ if slice {
+ return makeStdBoolValuePtrSliceUnmarshaler(getUnmarshalInfo(t), name)
+ }
+ return makeStdBoolValuePtrUnmarshaler(getUnmarshalInfo(t), name)
+ }
+ if slice {
+ return makeStdBoolValueSliceUnmarshaler(getUnmarshalInfo(t), name)
+ }
+ return makeStdBoolValueUnmarshaler(getUnmarshalInfo(t), name)
+ case reflect.String:
+ if pointer {
+ if slice {
+ return makeStdStringValuePtrSliceUnmarshaler(getUnmarshalInfo(t), name)
+ }
+ return makeStdStringValuePtrUnmarshaler(getUnmarshalInfo(t), name)
+ }
+ if slice {
+ return makeStdStringValueSliceUnmarshaler(getUnmarshalInfo(t), name)
+ }
+ return makeStdStringValueUnmarshaler(getUnmarshalInfo(t), name)
+ case uint8SliceType:
+ if pointer {
+ if slice {
+ return makeStdBytesValuePtrSliceUnmarshaler(getUnmarshalInfo(t), name)
+ }
+ return makeStdBytesValuePtrUnmarshaler(getUnmarshalInfo(t), name)
+ }
+ if slice {
+ return makeStdBytesValueSliceUnmarshaler(getUnmarshalInfo(t), name)
+ }
+ return makeStdBytesValueUnmarshaler(getUnmarshalInfo(t), name)
+ default:
+ panic(fmt.Sprintf("unknown wktpointer type %#v", t))
+ }
+ }
+
+ // We'll never have both pointer and slice for basic types.
+ if pointer && slice && t.Kind() != reflect.Struct {
+ panic("both pointer and slice for basic type in " + t.Name())
+ }
+
+ switch t.Kind() {
+ case reflect.Bool:
+ if pointer {
+ return unmarshalBoolPtr
+ }
+ if slice {
+ return unmarshalBoolSlice
+ }
+ return unmarshalBoolValue
+ case reflect.Int32:
+ switch encoding {
+ case "fixed32":
+ if pointer {
+ return unmarshalFixedS32Ptr
+ }
+ if slice {
+ return unmarshalFixedS32Slice
+ }
+ return unmarshalFixedS32Value
+ case "varint":
+ // this could be int32 or enum
+ if pointer {
+ return unmarshalInt32Ptr
+ }
+ if slice {
+ return unmarshalInt32Slice
+ }
+ return unmarshalInt32Value
+ case "zigzag32":
+ if pointer {
+ return unmarshalSint32Ptr
+ }
+ if slice {
+ return unmarshalSint32Slice
+ }
+ return unmarshalSint32Value
+ }
+ case reflect.Int64:
+ switch encoding {
+ case "fixed64":
+ if pointer {
+ return unmarshalFixedS64Ptr
+ }
+ if slice {
+ return unmarshalFixedS64Slice
+ }
+ return unmarshalFixedS64Value
+ case "varint":
+ if pointer {
+ return unmarshalInt64Ptr
+ }
+ if slice {
+ return unmarshalInt64Slice
+ }
+ return unmarshalInt64Value
+ case "zigzag64":
+ if pointer {
+ return unmarshalSint64Ptr
+ }
+ if slice {
+ return unmarshalSint64Slice
+ }
+ return unmarshalSint64Value
+ }
+ case reflect.Uint32:
+ switch encoding {
+ case "fixed32":
+ if pointer {
+ return unmarshalFixed32Ptr
+ }
+ if slice {
+ return unmarshalFixed32Slice
+ }
+ return unmarshalFixed32Value
+ case "varint":
+ if pointer {
+ return unmarshalUint32Ptr
+ }
+ if slice {
+ return unmarshalUint32Slice
+ }
+ return unmarshalUint32Value
+ }
+ case reflect.Uint64:
+ switch encoding {
+ case "fixed64":
+ if pointer {
+ return unmarshalFixed64Ptr
+ }
+ if slice {
+ return unmarshalFixed64Slice
+ }
+ return unmarshalFixed64Value
+ case "varint":
+ if pointer {
+ return unmarshalUint64Ptr
+ }
+ if slice {
+ return unmarshalUint64Slice
+ }
+ return unmarshalUint64Value
+ }
+ case reflect.Float32:
+ if pointer {
+ return unmarshalFloat32Ptr
+ }
+ if slice {
+ return unmarshalFloat32Slice
+ }
+ return unmarshalFloat32Value
+ case reflect.Float64:
+ if pointer {
+ return unmarshalFloat64Ptr
+ }
+ if slice {
+ return unmarshalFloat64Slice
+ }
+ return unmarshalFloat64Value
+ case reflect.Map:
+ panic("map type in typeUnmarshaler in " + t.Name())
+ case reflect.Slice:
+ if pointer {
+ panic("bad pointer in slice case in " + t.Name())
+ }
+ if slice {
+ return unmarshalBytesSlice
+ }
+ return unmarshalBytesValue
+ case reflect.String:
+ if validateUTF8 {
+ if pointer {
+ return unmarshalUTF8StringPtr
+ }
+ if slice {
+ return unmarshalUTF8StringSlice
+ }
+ return unmarshalUTF8StringValue
+ }
+ if pointer {
+ return unmarshalStringPtr
+ }
+ if slice {
+ return unmarshalStringSlice
+ }
+ return unmarshalStringValue
+ case reflect.Struct:
+ // message or group field
+ if !pointer {
+ switch encoding {
+ case "bytes":
+ if slice {
+ return makeUnmarshalMessageSlice(getUnmarshalInfo(t), name)
+ }
+ return makeUnmarshalMessage(getUnmarshalInfo(t), name)
+ }
+ }
+ switch encoding {
+ case "bytes":
+ if slice {
+ return makeUnmarshalMessageSlicePtr(getUnmarshalInfo(t), name)
+ }
+ return makeUnmarshalMessagePtr(getUnmarshalInfo(t), name)
+ case "group":
+ if slice {
+ return makeUnmarshalGroupSlicePtr(getUnmarshalInfo(t), name)
+ }
+ return makeUnmarshalGroupPtr(getUnmarshalInfo(t), name)
+ }
+ }
+ panic(fmt.Sprintf("unmarshaler not found type:%s encoding:%s", t, encoding))
+}
+
+// Below are all the unmarshalers for individual fields of various types.
+
+func unmarshalInt64Value(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireVarint {
+ return b, errInternalBadWireType
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ v := int64(x)
+ *f.toInt64() = v
+ return b, nil
+}
+
+func unmarshalInt64Ptr(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireVarint {
+ return b, errInternalBadWireType
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ v := int64(x)
+ *f.toInt64Ptr() = &v
+ return b, nil
+}
+
+func unmarshalInt64Slice(b []byte, f pointer, w int) ([]byte, error) {
+ if w == WireBytes { // packed
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ if x > uint64(len(b)) {
+ return nil, io.ErrUnexpectedEOF
+ }
+ res := b[x:]
+ b = b[:x]
+ for len(b) > 0 {
+ x, n = decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ v := int64(x)
+ s := f.toInt64Slice()
+ *s = append(*s, v)
+ }
+ return res, nil
+ }
+ if w != WireVarint {
+ return b, errInternalBadWireType
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ v := int64(x)
+ s := f.toInt64Slice()
+ *s = append(*s, v)
+ return b, nil
+}
+
+func unmarshalSint64Value(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireVarint {
+ return b, errInternalBadWireType
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ v := int64(x>>1) ^ int64(x)<<63>>63
+ *f.toInt64() = v
+ return b, nil
+}
+
+func unmarshalSint64Ptr(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireVarint {
+ return b, errInternalBadWireType
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ v := int64(x>>1) ^ int64(x)<<63>>63
+ *f.toInt64Ptr() = &v
+ return b, nil
+}
+
+func unmarshalSint64Slice(b []byte, f pointer, w int) ([]byte, error) {
+ if w == WireBytes { // packed
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ if x > uint64(len(b)) {
+ return nil, io.ErrUnexpectedEOF
+ }
+ res := b[x:]
+ b = b[:x]
+ for len(b) > 0 {
+ x, n = decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ v := int64(x>>1) ^ int64(x)<<63>>63
+ s := f.toInt64Slice()
+ *s = append(*s, v)
+ }
+ return res, nil
+ }
+ if w != WireVarint {
+ return b, errInternalBadWireType
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ v := int64(x>>1) ^ int64(x)<<63>>63
+ s := f.toInt64Slice()
+ *s = append(*s, v)
+ return b, nil
+}
+
+func unmarshalUint64Value(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireVarint {
+ return b, errInternalBadWireType
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ v := uint64(x)
+ *f.toUint64() = v
+ return b, nil
+}
+
+func unmarshalUint64Ptr(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireVarint {
+ return b, errInternalBadWireType
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ v := uint64(x)
+ *f.toUint64Ptr() = &v
+ return b, nil
+}
+
+func unmarshalUint64Slice(b []byte, f pointer, w int) ([]byte, error) {
+ if w == WireBytes { // packed
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ if x > uint64(len(b)) {
+ return nil, io.ErrUnexpectedEOF
+ }
+ res := b[x:]
+ b = b[:x]
+ for len(b) > 0 {
+ x, n = decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ v := uint64(x)
+ s := f.toUint64Slice()
+ *s = append(*s, v)
+ }
+ return res, nil
+ }
+ if w != WireVarint {
+ return b, errInternalBadWireType
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ v := uint64(x)
+ s := f.toUint64Slice()
+ *s = append(*s, v)
+ return b, nil
+}
+
+func unmarshalInt32Value(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireVarint {
+ return b, errInternalBadWireType
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ v := int32(x)
+ *f.toInt32() = v
+ return b, nil
+}
+
+func unmarshalInt32Ptr(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireVarint {
+ return b, errInternalBadWireType
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ v := int32(x)
+ f.setInt32Ptr(v)
+ return b, nil
+}
+
+func unmarshalInt32Slice(b []byte, f pointer, w int) ([]byte, error) {
+ if w == WireBytes { // packed
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ if x > uint64(len(b)) {
+ return nil, io.ErrUnexpectedEOF
+ }
+ res := b[x:]
+ b = b[:x]
+ for len(b) > 0 {
+ x, n = decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ v := int32(x)
+ f.appendInt32Slice(v)
+ }
+ return res, nil
+ }
+ if w != WireVarint {
+ return b, errInternalBadWireType
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ v := int32(x)
+ f.appendInt32Slice(v)
+ return b, nil
+}
+
+func unmarshalSint32Value(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireVarint {
+ return b, errInternalBadWireType
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ v := int32(x>>1) ^ int32(x)<<31>>31
+ *f.toInt32() = v
+ return b, nil
+}
+
+func unmarshalSint32Ptr(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireVarint {
+ return b, errInternalBadWireType
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ v := int32(x>>1) ^ int32(x)<<31>>31
+ f.setInt32Ptr(v)
+ return b, nil
+}
+
+func unmarshalSint32Slice(b []byte, f pointer, w int) ([]byte, error) {
+ if w == WireBytes { // packed
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ if x > uint64(len(b)) {
+ return nil, io.ErrUnexpectedEOF
+ }
+ res := b[x:]
+ b = b[:x]
+ for len(b) > 0 {
+ x, n = decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ v := int32(x>>1) ^ int32(x)<<31>>31
+ f.appendInt32Slice(v)
+ }
+ return res, nil
+ }
+ if w != WireVarint {
+ return b, errInternalBadWireType
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ v := int32(x>>1) ^ int32(x)<<31>>31
+ f.appendInt32Slice(v)
+ return b, nil
+}
+
+func unmarshalUint32Value(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireVarint {
+ return b, errInternalBadWireType
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ v := uint32(x)
+ *f.toUint32() = v
+ return b, nil
+}
+
+func unmarshalUint32Ptr(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireVarint {
+ return b, errInternalBadWireType
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ v := uint32(x)
+ *f.toUint32Ptr() = &v
+ return b, nil
+}
+
+func unmarshalUint32Slice(b []byte, f pointer, w int) ([]byte, error) {
+ if w == WireBytes { // packed
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ if x > uint64(len(b)) {
+ return nil, io.ErrUnexpectedEOF
+ }
+ res := b[x:]
+ b = b[:x]
+ for len(b) > 0 {
+ x, n = decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ v := uint32(x)
+ s := f.toUint32Slice()
+ *s = append(*s, v)
+ }
+ return res, nil
+ }
+ if w != WireVarint {
+ return b, errInternalBadWireType
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ v := uint32(x)
+ s := f.toUint32Slice()
+ *s = append(*s, v)
+ return b, nil
+}
+
+func unmarshalFixed64Value(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireFixed64 {
+ return b, errInternalBadWireType
+ }
+ if len(b) < 8 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ v := uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24 | uint64(b[4])<<32 | uint64(b[5])<<40 | uint64(b[6])<<48 | uint64(b[7])<<56
+ *f.toUint64() = v
+ return b[8:], nil
+}
+
+func unmarshalFixed64Ptr(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireFixed64 {
+ return b, errInternalBadWireType
+ }
+ if len(b) < 8 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ v := uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24 | uint64(b[4])<<32 | uint64(b[5])<<40 | uint64(b[6])<<48 | uint64(b[7])<<56
+ *f.toUint64Ptr() = &v
+ return b[8:], nil
+}
+
+func unmarshalFixed64Slice(b []byte, f pointer, w int) ([]byte, error) {
+ if w == WireBytes { // packed
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ if x > uint64(len(b)) {
+ return nil, io.ErrUnexpectedEOF
+ }
+ res := b[x:]
+ b = b[:x]
+ for len(b) > 0 {
+ if len(b) < 8 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ v := uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24 | uint64(b[4])<<32 | uint64(b[5])<<40 | uint64(b[6])<<48 | uint64(b[7])<<56
+ s := f.toUint64Slice()
+ *s = append(*s, v)
+ b = b[8:]
+ }
+ return res, nil
+ }
+ if w != WireFixed64 {
+ return b, errInternalBadWireType
+ }
+ if len(b) < 8 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ v := uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24 | uint64(b[4])<<32 | uint64(b[5])<<40 | uint64(b[6])<<48 | uint64(b[7])<<56
+ s := f.toUint64Slice()
+ *s = append(*s, v)
+ return b[8:], nil
+}
+
+func unmarshalFixedS64Value(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireFixed64 {
+ return b, errInternalBadWireType
+ }
+ if len(b) < 8 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ v := int64(b[0]) | int64(b[1])<<8 | int64(b[2])<<16 | int64(b[3])<<24 | int64(b[4])<<32 | int64(b[5])<<40 | int64(b[6])<<48 | int64(b[7])<<56
+ *f.toInt64() = v
+ return b[8:], nil
+}
+
+func unmarshalFixedS64Ptr(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireFixed64 {
+ return b, errInternalBadWireType
+ }
+ if len(b) < 8 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ v := int64(b[0]) | int64(b[1])<<8 | int64(b[2])<<16 | int64(b[3])<<24 | int64(b[4])<<32 | int64(b[5])<<40 | int64(b[6])<<48 | int64(b[7])<<56
+ *f.toInt64Ptr() = &v
+ return b[8:], nil
+}
+
+func unmarshalFixedS64Slice(b []byte, f pointer, w int) ([]byte, error) {
+ if w == WireBytes { // packed
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ if x > uint64(len(b)) {
+ return nil, io.ErrUnexpectedEOF
+ }
+ res := b[x:]
+ b = b[:x]
+ for len(b) > 0 {
+ if len(b) < 8 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ v := int64(b[0]) | int64(b[1])<<8 | int64(b[2])<<16 | int64(b[3])<<24 | int64(b[4])<<32 | int64(b[5])<<40 | int64(b[6])<<48 | int64(b[7])<<56
+ s := f.toInt64Slice()
+ *s = append(*s, v)
+ b = b[8:]
+ }
+ return res, nil
+ }
+ if w != WireFixed64 {
+ return b, errInternalBadWireType
+ }
+ if len(b) < 8 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ v := int64(b[0]) | int64(b[1])<<8 | int64(b[2])<<16 | int64(b[3])<<24 | int64(b[4])<<32 | int64(b[5])<<40 | int64(b[6])<<48 | int64(b[7])<<56
+ s := f.toInt64Slice()
+ *s = append(*s, v)
+ return b[8:], nil
+}
+
+func unmarshalFixed32Value(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireFixed32 {
+ return b, errInternalBadWireType
+ }
+ if len(b) < 4 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ v := uint32(b[0]) | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24
+ *f.toUint32() = v
+ return b[4:], nil
+}
+
+func unmarshalFixed32Ptr(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireFixed32 {
+ return b, errInternalBadWireType
+ }
+ if len(b) < 4 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ v := uint32(b[0]) | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24
+ *f.toUint32Ptr() = &v
+ return b[4:], nil
+}
+
+func unmarshalFixed32Slice(b []byte, f pointer, w int) ([]byte, error) {
+ if w == WireBytes { // packed
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ if x > uint64(len(b)) {
+ return nil, io.ErrUnexpectedEOF
+ }
+ res := b[x:]
+ b = b[:x]
+ for len(b) > 0 {
+ if len(b) < 4 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ v := uint32(b[0]) | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24
+ s := f.toUint32Slice()
+ *s = append(*s, v)
+ b = b[4:]
+ }
+ return res, nil
+ }
+ if w != WireFixed32 {
+ return b, errInternalBadWireType
+ }
+ if len(b) < 4 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ v := uint32(b[0]) | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24
+ s := f.toUint32Slice()
+ *s = append(*s, v)
+ return b[4:], nil
+}
+
+func unmarshalFixedS32Value(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireFixed32 {
+ return b, errInternalBadWireType
+ }
+ if len(b) < 4 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ v := int32(b[0]) | int32(b[1])<<8 | int32(b[2])<<16 | int32(b[3])<<24
+ *f.toInt32() = v
+ return b[4:], nil
+}
+
+func unmarshalFixedS32Ptr(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireFixed32 {
+ return b, errInternalBadWireType
+ }
+ if len(b) < 4 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ v := int32(b[0]) | int32(b[1])<<8 | int32(b[2])<<16 | int32(b[3])<<24
+ f.setInt32Ptr(v)
+ return b[4:], nil
+}
+
+func unmarshalFixedS32Slice(b []byte, f pointer, w int) ([]byte, error) {
+ if w == WireBytes { // packed
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ if x > uint64(len(b)) {
+ return nil, io.ErrUnexpectedEOF
+ }
+ res := b[x:]
+ b = b[:x]
+ for len(b) > 0 {
+ if len(b) < 4 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ v := int32(b[0]) | int32(b[1])<<8 | int32(b[2])<<16 | int32(b[3])<<24
+ f.appendInt32Slice(v)
+ b = b[4:]
+ }
+ return res, nil
+ }
+ if w != WireFixed32 {
+ return b, errInternalBadWireType
+ }
+ if len(b) < 4 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ v := int32(b[0]) | int32(b[1])<<8 | int32(b[2])<<16 | int32(b[3])<<24
+ f.appendInt32Slice(v)
+ return b[4:], nil
+}
+
+func unmarshalBoolValue(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireVarint {
+ return b, errInternalBadWireType
+ }
+ // Note: any length varint is allowed, even though any sane
+ // encoder will use one byte.
+ // See https://github.com/golang/protobuf/issues/76
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ // TODO: check if x>1? Tests seem to indicate no.
+ v := x != 0
+ *f.toBool() = v
+ return b[n:], nil
+}
+
+func unmarshalBoolPtr(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireVarint {
+ return b, errInternalBadWireType
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ v := x != 0
+ *f.toBoolPtr() = &v
+ return b[n:], nil
+}
+
+func unmarshalBoolSlice(b []byte, f pointer, w int) ([]byte, error) {
+ if w == WireBytes { // packed
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ if x > uint64(len(b)) {
+ return nil, io.ErrUnexpectedEOF
+ }
+ res := b[x:]
+ b = b[:x]
+ for len(b) > 0 {
+ x, n = decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ v := x != 0
+ s := f.toBoolSlice()
+ *s = append(*s, v)
+ b = b[n:]
+ }
+ return res, nil
+ }
+ if w != WireVarint {
+ return b, errInternalBadWireType
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ v := x != 0
+ s := f.toBoolSlice()
+ *s = append(*s, v)
+ return b[n:], nil
+}
+
+func unmarshalFloat64Value(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireFixed64 {
+ return b, errInternalBadWireType
+ }
+ if len(b) < 8 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ v := math.Float64frombits(uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24 | uint64(b[4])<<32 | uint64(b[5])<<40 | uint64(b[6])<<48 | uint64(b[7])<<56)
+ *f.toFloat64() = v
+ return b[8:], nil
+}
+
+func unmarshalFloat64Ptr(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireFixed64 {
+ return b, errInternalBadWireType
+ }
+ if len(b) < 8 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ v := math.Float64frombits(uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24 | uint64(b[4])<<32 | uint64(b[5])<<40 | uint64(b[6])<<48 | uint64(b[7])<<56)
+ *f.toFloat64Ptr() = &v
+ return b[8:], nil
+}
+
+func unmarshalFloat64Slice(b []byte, f pointer, w int) ([]byte, error) {
+ if w == WireBytes { // packed
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ if x > uint64(len(b)) {
+ return nil, io.ErrUnexpectedEOF
+ }
+ res := b[x:]
+ b = b[:x]
+ for len(b) > 0 {
+ if len(b) < 8 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ v := math.Float64frombits(uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24 | uint64(b[4])<<32 | uint64(b[5])<<40 | uint64(b[6])<<48 | uint64(b[7])<<56)
+ s := f.toFloat64Slice()
+ *s = append(*s, v)
+ b = b[8:]
+ }
+ return res, nil
+ }
+ if w != WireFixed64 {
+ return b, errInternalBadWireType
+ }
+ if len(b) < 8 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ v := math.Float64frombits(uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24 | uint64(b[4])<<32 | uint64(b[5])<<40 | uint64(b[6])<<48 | uint64(b[7])<<56)
+ s := f.toFloat64Slice()
+ *s = append(*s, v)
+ return b[8:], nil
+}
+
+func unmarshalFloat32Value(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireFixed32 {
+ return b, errInternalBadWireType
+ }
+ if len(b) < 4 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ v := math.Float32frombits(uint32(b[0]) | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24)
+ *f.toFloat32() = v
+ return b[4:], nil
+}
+
+func unmarshalFloat32Ptr(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireFixed32 {
+ return b, errInternalBadWireType
+ }
+ if len(b) < 4 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ v := math.Float32frombits(uint32(b[0]) | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24)
+ *f.toFloat32Ptr() = &v
+ return b[4:], nil
+}
+
+func unmarshalFloat32Slice(b []byte, f pointer, w int) ([]byte, error) {
+ if w == WireBytes { // packed
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ if x > uint64(len(b)) {
+ return nil, io.ErrUnexpectedEOF
+ }
+ res := b[x:]
+ b = b[:x]
+ for len(b) > 0 {
+ if len(b) < 4 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ v := math.Float32frombits(uint32(b[0]) | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24)
+ s := f.toFloat32Slice()
+ *s = append(*s, v)
+ b = b[4:]
+ }
+ return res, nil
+ }
+ if w != WireFixed32 {
+ return b, errInternalBadWireType
+ }
+ if len(b) < 4 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ v := math.Float32frombits(uint32(b[0]) | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24)
+ s := f.toFloat32Slice()
+ *s = append(*s, v)
+ return b[4:], nil
+}
+
+func unmarshalStringValue(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireBytes {
+ return b, errInternalBadWireType
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ if x > uint64(len(b)) {
+ return nil, io.ErrUnexpectedEOF
+ }
+ v := string(b[:x])
+ *f.toString() = v
+ return b[x:], nil
+}
+
+func unmarshalStringPtr(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireBytes {
+ return b, errInternalBadWireType
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ if x > uint64(len(b)) {
+ return nil, io.ErrUnexpectedEOF
+ }
+ v := string(b[:x])
+ *f.toStringPtr() = &v
+ return b[x:], nil
+}
+
+func unmarshalStringSlice(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireBytes {
+ return b, errInternalBadWireType
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ if x > uint64(len(b)) {
+ return nil, io.ErrUnexpectedEOF
+ }
+ v := string(b[:x])
+ s := f.toStringSlice()
+ *s = append(*s, v)
+ return b[x:], nil
+}
+
+func unmarshalUTF8StringValue(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireBytes {
+ return b, errInternalBadWireType
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ if x > uint64(len(b)) {
+ return nil, io.ErrUnexpectedEOF
+ }
+ v := string(b[:x])
+ *f.toString() = v
+ if !utf8.ValidString(v) {
+ return b[x:], errInvalidUTF8
+ }
+ return b[x:], nil
+}
+
+func unmarshalUTF8StringPtr(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireBytes {
+ return b, errInternalBadWireType
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ if x > uint64(len(b)) {
+ return nil, io.ErrUnexpectedEOF
+ }
+ v := string(b[:x])
+ *f.toStringPtr() = &v
+ if !utf8.ValidString(v) {
+ return b[x:], errInvalidUTF8
+ }
+ return b[x:], nil
+}
+
+func unmarshalUTF8StringSlice(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireBytes {
+ return b, errInternalBadWireType
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ if x > uint64(len(b)) {
+ return nil, io.ErrUnexpectedEOF
+ }
+ v := string(b[:x])
+ s := f.toStringSlice()
+ *s = append(*s, v)
+ if !utf8.ValidString(v) {
+ return b[x:], errInvalidUTF8
+ }
+ return b[x:], nil
+}
+
+var emptyBuf [0]byte
+
+func unmarshalBytesValue(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireBytes {
+ return b, errInternalBadWireType
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ if x > uint64(len(b)) {
+ return nil, io.ErrUnexpectedEOF
+ }
+ // The use of append here is a trick which avoids the zeroing
+ // that would be required if we used a make/copy pair.
+ // We append to emptyBuf instead of nil because we want
+ // a non-nil result even when the length is 0.
+ v := append(emptyBuf[:], b[:x]...)
+ *f.toBytes() = v
+ return b[x:], nil
+}
+
+func unmarshalBytesSlice(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireBytes {
+ return b, errInternalBadWireType
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ if x > uint64(len(b)) {
+ return nil, io.ErrUnexpectedEOF
+ }
+ v := append(emptyBuf[:], b[:x]...)
+ s := f.toBytesSlice()
+ *s = append(*s, v)
+ return b[x:], nil
+}
+
+func makeUnmarshalMessagePtr(sub *unmarshalInfo, name string) unmarshaler {
+ return func(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireBytes {
+ return b, errInternalBadWireType
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ if x > uint64(len(b)) {
+ return nil, io.ErrUnexpectedEOF
+ }
+ // First read the message field to see if something is there.
+ // The semantics of multiple submessages are weird. Instead of
+ // the last one winning (as it is for all other fields), multiple
+ // submessages are merged.
+ v := f.getPointer()
+ if v.isNil() {
+ v = valToPointer(reflect.New(sub.typ))
+ f.setPointer(v)
+ }
+ err := sub.unmarshal(v, b[:x])
+ if err != nil {
+ if r, ok := err.(*RequiredNotSetError); ok {
+ r.field = name + "." + r.field
+ } else {
+ return nil, err
+ }
+ }
+ return b[x:], err
+ }
+}
+
+func makeUnmarshalMessageSlicePtr(sub *unmarshalInfo, name string) unmarshaler {
+ return func(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireBytes {
+ return b, errInternalBadWireType
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ if x > uint64(len(b)) {
+ return nil, io.ErrUnexpectedEOF
+ }
+ v := valToPointer(reflect.New(sub.typ))
+ err := sub.unmarshal(v, b[:x])
+ if err != nil {
+ if r, ok := err.(*RequiredNotSetError); ok {
+ r.field = name + "." + r.field
+ } else {
+ return nil, err
+ }
+ }
+ f.appendPointer(v)
+ return b[x:], err
+ }
+}
+
+func makeUnmarshalGroupPtr(sub *unmarshalInfo, name string) unmarshaler {
+ return func(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireStartGroup {
+ return b, errInternalBadWireType
+ }
+ x, y := findEndGroup(b)
+ if x < 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ v := f.getPointer()
+ if v.isNil() {
+ v = valToPointer(reflect.New(sub.typ))
+ f.setPointer(v)
+ }
+ err := sub.unmarshal(v, b[:x])
+ if err != nil {
+ if r, ok := err.(*RequiredNotSetError); ok {
+ r.field = name + "." + r.field
+ } else {
+ return nil, err
+ }
+ }
+ return b[y:], err
+ }
+}
+
+func makeUnmarshalGroupSlicePtr(sub *unmarshalInfo, name string) unmarshaler {
+ return func(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireStartGroup {
+ return b, errInternalBadWireType
+ }
+ x, y := findEndGroup(b)
+ if x < 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ v := valToPointer(reflect.New(sub.typ))
+ err := sub.unmarshal(v, b[:x])
+ if err != nil {
+ if r, ok := err.(*RequiredNotSetError); ok {
+ r.field = name + "." + r.field
+ } else {
+ return nil, err
+ }
+ }
+ f.appendPointer(v)
+ return b[y:], err
+ }
+}
+
+func makeUnmarshalMap(f *reflect.StructField) unmarshaler {
+ t := f.Type
+ kt := t.Key()
+ vt := t.Elem()
+ tagArray := strings.Split(f.Tag.Get("protobuf"), ",")
+ valTags := strings.Split(f.Tag.Get("protobuf_val"), ",")
+ for _, t := range tagArray {
+ if strings.HasPrefix(t, "customtype=") {
+ valTags = append(valTags, t)
+ }
+ if t == "stdtime" {
+ valTags = append(valTags, t)
+ }
+ if t == "stdduration" {
+ valTags = append(valTags, t)
+ }
+ if t == "wktptr" {
+ valTags = append(valTags, t)
+ }
+ }
+ unmarshalKey := typeUnmarshaler(kt, f.Tag.Get("protobuf_key"))
+ unmarshalVal := typeUnmarshaler(vt, strings.Join(valTags, ","))
+ return func(b []byte, f pointer, w int) ([]byte, error) {
+ // The map entry is a submessage. Figure out how big it is.
+ if w != WireBytes {
+ return nil, fmt.Errorf("proto: bad wiretype for map field: got %d want %d", w, WireBytes)
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ if x > uint64(len(b)) {
+ return nil, io.ErrUnexpectedEOF
+ }
+ r := b[x:] // unused data to return
+ b = b[:x] // data for map entry
+
+ // Note: we could use #keys * #values ~= 200 functions
+ // to do map decoding without reflection. Probably not worth it.
+ // Maps will be somewhat slow. Oh well.
+
+ // Read key and value from data.
+ var nerr nonFatal
+ k := reflect.New(kt)
+ v := reflect.New(vt)
+ for len(b) > 0 {
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ wire := int(x) & 7
+ b = b[n:]
+
+ var err error
+ switch x >> 3 {
+ case 1:
+ b, err = unmarshalKey(b, valToPointer(k), wire)
+ case 2:
+ b, err = unmarshalVal(b, valToPointer(v), wire)
+ default:
+ err = errInternalBadWireType // skip unknown tag
+ }
+
+ if nerr.Merge(err) {
+ continue
+ }
+ if err != errInternalBadWireType {
+ return nil, err
+ }
+
+ // Skip past unknown fields.
+ b, err = skipField(b, wire)
+ if err != nil {
+ return nil, err
+ }
+ }
+
+ // Get map, allocate if needed.
+ m := f.asPointerTo(t).Elem() // an addressable map[K]T
+ if m.IsNil() {
+ m.Set(reflect.MakeMap(t))
+ }
+
+ // Insert into map.
+ m.SetMapIndex(k.Elem(), v.Elem())
+
+ return r, nerr.E
+ }
+}
+
+// makeUnmarshalOneof makes an unmarshaler for oneof fields.
+// for:
+// message Msg {
+// oneof F {
+// int64 X = 1;
+// float64 Y = 2;
+// }
+// }
+// typ is the type of the concrete entry for a oneof case (e.g. Msg_X).
+// ityp is the interface type of the oneof field (e.g. isMsg_F).
+// unmarshal is the unmarshaler for the base type of the oneof case (e.g. int64).
+// Note that this function will be called once for each case in the oneof.
+func makeUnmarshalOneof(typ, ityp reflect.Type, unmarshal unmarshaler) unmarshaler {
+ sf := typ.Field(0)
+ field0 := toField(&sf)
+ return func(b []byte, f pointer, w int) ([]byte, error) {
+ // Allocate holder for value.
+ v := reflect.New(typ)
+
+ // Unmarshal data into holder.
+ // We unmarshal into the first field of the holder object.
+ var err error
+ var nerr nonFatal
+ b, err = unmarshal(b, valToPointer(v).offset(field0), w)
+ if !nerr.Merge(err) {
+ return nil, err
+ }
+
+ // Write pointer to holder into target field.
+ f.asPointerTo(ityp).Elem().Set(v)
+
+ return b, nerr.E
+ }
+}
+
+// Error used by decode internally.
+var errInternalBadWireType = errors.New("proto: internal error: bad wiretype")
+
+// skipField skips past a field of type wire and returns the remaining bytes.
+func skipField(b []byte, wire int) ([]byte, error) {
+ switch wire {
+ case WireVarint:
+ _, k := decodeVarint(b)
+ if k == 0 {
+ return b, io.ErrUnexpectedEOF
+ }
+ b = b[k:]
+ case WireFixed32:
+ if len(b) < 4 {
+ return b, io.ErrUnexpectedEOF
+ }
+ b = b[4:]
+ case WireFixed64:
+ if len(b) < 8 {
+ return b, io.ErrUnexpectedEOF
+ }
+ b = b[8:]
+ case WireBytes:
+ m, k := decodeVarint(b)
+ if k == 0 || uint64(len(b)-k) < m {
+ return b, io.ErrUnexpectedEOF
+ }
+ b = b[uint64(k)+m:]
+ case WireStartGroup:
+ _, i := findEndGroup(b)
+ if i == -1 {
+ return b, io.ErrUnexpectedEOF
+ }
+ b = b[i:]
+ default:
+ return b, fmt.Errorf("proto: can't skip unknown wire type %d", wire)
+ }
+ return b, nil
+}
+
+// findEndGroup finds the index of the next EndGroup tag.
+// Groups may be nested, so the "next" EndGroup tag is the first
+// unpaired EndGroup.
+// findEndGroup returns the indexes of the start and end of the EndGroup tag.
+// Returns (-1,-1) if it can't find one.
+func findEndGroup(b []byte) (int, int) {
+ depth := 1
+ i := 0
+ for {
+ x, n := decodeVarint(b[i:])
+ if n == 0 {
+ return -1, -1
+ }
+ j := i
+ i += n
+ switch x & 7 {
+ case WireVarint:
+ _, k := decodeVarint(b[i:])
+ if k == 0 {
+ return -1, -1
+ }
+ i += k
+ case WireFixed32:
+ if len(b)-4 < i {
+ return -1, -1
+ }
+ i += 4
+ case WireFixed64:
+ if len(b)-8 < i {
+ return -1, -1
+ }
+ i += 8
+ case WireBytes:
+ m, k := decodeVarint(b[i:])
+ if k == 0 {
+ return -1, -1
+ }
+ i += k
+ if uint64(len(b)-i) < m {
+ return -1, -1
+ }
+ i += int(m)
+ case WireStartGroup:
+ depth++
+ case WireEndGroup:
+ depth--
+ if depth == 0 {
+ return j, i
+ }
+ default:
+ return -1, -1
+ }
+ }
+}
+
+// encodeVarint appends a varint-encoded integer to b and returns the result.
+func encodeVarint(b []byte, x uint64) []byte {
+ for x >= 1<<7 {
+ b = append(b, byte(x&0x7f|0x80))
+ x >>= 7
+ }
+ return append(b, byte(x))
+}
+
+// decodeVarint reads a varint-encoded integer from b.
+// Returns the decoded integer and the number of bytes read.
+// If there is an error, it returns 0,0.
+func decodeVarint(b []byte) (uint64, int) {
+ var x, y uint64
+ if len(b) == 0 {
+ goto bad
+ }
+ x = uint64(b[0])
+ if x < 0x80 {
+ return x, 1
+ }
+ x -= 0x80
+
+ if len(b) <= 1 {
+ goto bad
+ }
+ y = uint64(b[1])
+ x += y << 7
+ if y < 0x80 {
+ return x, 2
+ }
+ x -= 0x80 << 7
+
+ if len(b) <= 2 {
+ goto bad
+ }
+ y = uint64(b[2])
+ x += y << 14
+ if y < 0x80 {
+ return x, 3
+ }
+ x -= 0x80 << 14
+
+ if len(b) <= 3 {
+ goto bad
+ }
+ y = uint64(b[3])
+ x += y << 21
+ if y < 0x80 {
+ return x, 4
+ }
+ x -= 0x80 << 21
+
+ if len(b) <= 4 {
+ goto bad
+ }
+ y = uint64(b[4])
+ x += y << 28
+ if y < 0x80 {
+ return x, 5
+ }
+ x -= 0x80 << 28
+
+ if len(b) <= 5 {
+ goto bad
+ }
+ y = uint64(b[5])
+ x += y << 35
+ if y < 0x80 {
+ return x, 6
+ }
+ x -= 0x80 << 35
+
+ if len(b) <= 6 {
+ goto bad
+ }
+ y = uint64(b[6])
+ x += y << 42
+ if y < 0x80 {
+ return x, 7
+ }
+ x -= 0x80 << 42
+
+ if len(b) <= 7 {
+ goto bad
+ }
+ y = uint64(b[7])
+ x += y << 49
+ if y < 0x80 {
+ return x, 8
+ }
+ x -= 0x80 << 49
+
+ if len(b) <= 8 {
+ goto bad
+ }
+ y = uint64(b[8])
+ x += y << 56
+ if y < 0x80 {
+ return x, 9
+ }
+ x -= 0x80 << 56
+
+ if len(b) <= 9 {
+ goto bad
+ }
+ y = uint64(b[9])
+ x += y << 63
+ if y < 2 {
+ return x, 10
+ }
+
+bad:
+ return 0, 0
+}
diff --git a/vendor/github.com/gogo/protobuf/proto/table_unmarshal_gogo.go b/vendor/github.com/gogo/protobuf/proto/table_unmarshal_gogo.go
new file mode 100644
index 000000000..00d6c7ad9
--- /dev/null
+++ b/vendor/github.com/gogo/protobuf/proto/table_unmarshal_gogo.go
@@ -0,0 +1,385 @@
+// Protocol Buffers for Go with Gadgets
+//
+// Copyright (c) 2018, The GoGo Authors. All rights reserved.
+// http://github.com/gogo/protobuf
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package proto
+
+import (
+ "io"
+ "reflect"
+)
+
+func makeUnmarshalMessage(sub *unmarshalInfo, name string) unmarshaler {
+ return func(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireBytes {
+ return nil, errInternalBadWireType
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ if x > uint64(len(b)) {
+ return nil, io.ErrUnexpectedEOF
+ }
+ // First read the message field to see if something is there.
+ // The semantics of multiple submessages are weird. Instead of
+ // the last one winning (as it is for all other fields), multiple
+ // submessages are merged.
+ v := f // gogo: changed from v := f.getPointer()
+ if v.isNil() {
+ v = valToPointer(reflect.New(sub.typ))
+ f.setPointer(v)
+ }
+ err := sub.unmarshal(v, b[:x])
+ if err != nil {
+ if r, ok := err.(*RequiredNotSetError); ok {
+ r.field = name + "." + r.field
+ } else {
+ return nil, err
+ }
+ }
+ return b[x:], err
+ }
+}
+
+func makeUnmarshalMessageSlice(sub *unmarshalInfo, name string) unmarshaler {
+ return func(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireBytes {
+ return nil, errInternalBadWireType
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ if x > uint64(len(b)) {
+ return nil, io.ErrUnexpectedEOF
+ }
+ v := valToPointer(reflect.New(sub.typ))
+ err := sub.unmarshal(v, b[:x])
+ if err != nil {
+ if r, ok := err.(*RequiredNotSetError); ok {
+ r.field = name + "." + r.field
+ } else {
+ return nil, err
+ }
+ }
+ f.appendRef(v, sub.typ) // gogo: changed from f.appendPointer(v)
+ return b[x:], err
+ }
+}
+
+func makeUnmarshalCustomPtr(sub *unmarshalInfo, name string) unmarshaler {
+ return func(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireBytes {
+ return nil, errInternalBadWireType
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ if x > uint64(len(b)) {
+ return nil, io.ErrUnexpectedEOF
+ }
+
+ s := f.asPointerTo(reflect.PtrTo(sub.typ)).Elem()
+ s.Set(reflect.New(sub.typ))
+ m := s.Interface().(custom)
+ if err := m.Unmarshal(b[:x]); err != nil {
+ return nil, err
+ }
+ return b[x:], nil
+ }
+}
+
+func makeUnmarshalCustomSlice(sub *unmarshalInfo, name string) unmarshaler {
+ return func(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireBytes {
+ return nil, errInternalBadWireType
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ if x > uint64(len(b)) {
+ return nil, io.ErrUnexpectedEOF
+ }
+ m := reflect.New(sub.typ)
+ c := m.Interface().(custom)
+ if err := c.Unmarshal(b[:x]); err != nil {
+ return nil, err
+ }
+ v := valToPointer(m)
+ f.appendRef(v, sub.typ)
+ return b[x:], nil
+ }
+}
+
+func makeUnmarshalCustom(sub *unmarshalInfo, name string) unmarshaler {
+ return func(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireBytes {
+ return nil, errInternalBadWireType
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ if x > uint64(len(b)) {
+ return nil, io.ErrUnexpectedEOF
+ }
+
+ m := f.asPointerTo(sub.typ).Interface().(custom)
+ if err := m.Unmarshal(b[:x]); err != nil {
+ return nil, err
+ }
+ return b[x:], nil
+ }
+}
+
+func makeUnmarshalTime(sub *unmarshalInfo, name string) unmarshaler {
+ return func(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireBytes {
+ return nil, errInternalBadWireType
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ if x > uint64(len(b)) {
+ return nil, io.ErrUnexpectedEOF
+ }
+ m := ×tamp{}
+ if err := Unmarshal(b[:x], m); err != nil {
+ return nil, err
+ }
+ t, err := timestampFromProto(m)
+ if err != nil {
+ return nil, err
+ }
+ s := f.asPointerTo(sub.typ).Elem()
+ s.Set(reflect.ValueOf(t))
+ return b[x:], nil
+ }
+}
+
+func makeUnmarshalTimePtr(sub *unmarshalInfo, name string) unmarshaler {
+ return func(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireBytes {
+ return nil, errInternalBadWireType
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ if x > uint64(len(b)) {
+ return nil, io.ErrUnexpectedEOF
+ }
+ m := ×tamp{}
+ if err := Unmarshal(b[:x], m); err != nil {
+ return nil, err
+ }
+ t, err := timestampFromProto(m)
+ if err != nil {
+ return nil, err
+ }
+ s := f.asPointerTo(reflect.PtrTo(sub.typ)).Elem()
+ s.Set(reflect.ValueOf(&t))
+ return b[x:], nil
+ }
+}
+
+func makeUnmarshalTimePtrSlice(sub *unmarshalInfo, name string) unmarshaler {
+ return func(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireBytes {
+ return nil, errInternalBadWireType
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ if x > uint64(len(b)) {
+ return nil, io.ErrUnexpectedEOF
+ }
+ m := ×tamp{}
+ if err := Unmarshal(b[:x], m); err != nil {
+ return nil, err
+ }
+ t, err := timestampFromProto(m)
+ if err != nil {
+ return nil, err
+ }
+ slice := f.getSlice(reflect.PtrTo(sub.typ))
+ newSlice := reflect.Append(slice, reflect.ValueOf(&t))
+ slice.Set(newSlice)
+ return b[x:], nil
+ }
+}
+
+func makeUnmarshalTimeSlice(sub *unmarshalInfo, name string) unmarshaler {
+ return func(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireBytes {
+ return nil, errInternalBadWireType
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ if x > uint64(len(b)) {
+ return nil, io.ErrUnexpectedEOF
+ }
+ m := ×tamp{}
+ if err := Unmarshal(b[:x], m); err != nil {
+ return nil, err
+ }
+ t, err := timestampFromProto(m)
+ if err != nil {
+ return nil, err
+ }
+ slice := f.getSlice(sub.typ)
+ newSlice := reflect.Append(slice, reflect.ValueOf(t))
+ slice.Set(newSlice)
+ return b[x:], nil
+ }
+}
+
+func makeUnmarshalDurationPtr(sub *unmarshalInfo, name string) unmarshaler {
+ return func(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireBytes {
+ return nil, errInternalBadWireType
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ if x > uint64(len(b)) {
+ return nil, io.ErrUnexpectedEOF
+ }
+ m := &duration{}
+ if err := Unmarshal(b[:x], m); err != nil {
+ return nil, err
+ }
+ d, err := durationFromProto(m)
+ if err != nil {
+ return nil, err
+ }
+ s := f.asPointerTo(reflect.PtrTo(sub.typ)).Elem()
+ s.Set(reflect.ValueOf(&d))
+ return b[x:], nil
+ }
+}
+
+func makeUnmarshalDuration(sub *unmarshalInfo, name string) unmarshaler {
+ return func(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireBytes {
+ return nil, errInternalBadWireType
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ if x > uint64(len(b)) {
+ return nil, io.ErrUnexpectedEOF
+ }
+ m := &duration{}
+ if err := Unmarshal(b[:x], m); err != nil {
+ return nil, err
+ }
+ d, err := durationFromProto(m)
+ if err != nil {
+ return nil, err
+ }
+ s := f.asPointerTo(sub.typ).Elem()
+ s.Set(reflect.ValueOf(d))
+ return b[x:], nil
+ }
+}
+
+func makeUnmarshalDurationPtrSlice(sub *unmarshalInfo, name string) unmarshaler {
+ return func(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireBytes {
+ return nil, errInternalBadWireType
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ if x > uint64(len(b)) {
+ return nil, io.ErrUnexpectedEOF
+ }
+ m := &duration{}
+ if err := Unmarshal(b[:x], m); err != nil {
+ return nil, err
+ }
+ d, err := durationFromProto(m)
+ if err != nil {
+ return nil, err
+ }
+ slice := f.getSlice(reflect.PtrTo(sub.typ))
+ newSlice := reflect.Append(slice, reflect.ValueOf(&d))
+ slice.Set(newSlice)
+ return b[x:], nil
+ }
+}
+
+func makeUnmarshalDurationSlice(sub *unmarshalInfo, name string) unmarshaler {
+ return func(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireBytes {
+ return nil, errInternalBadWireType
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ if x > uint64(len(b)) {
+ return nil, io.ErrUnexpectedEOF
+ }
+ m := &duration{}
+ if err := Unmarshal(b[:x], m); err != nil {
+ return nil, err
+ }
+ d, err := durationFromProto(m)
+ if err != nil {
+ return nil, err
+ }
+ slice := f.getSlice(sub.typ)
+ newSlice := reflect.Append(slice, reflect.ValueOf(d))
+ slice.Set(newSlice)
+ return b[x:], nil
+ }
+}
diff --git a/vendor/github.com/gogo/protobuf/proto/text.go b/vendor/github.com/gogo/protobuf/proto/text.go
index f609d1d45..0407ba85d 100644
--- a/vendor/github.com/gogo/protobuf/proto/text.go
+++ b/vendor/github.com/gogo/protobuf/proto/text.go
@@ -57,7 +57,6 @@ import (
var (
newline = []byte("\n")
spaces = []byte(" ")
- gtNewline = []byte(">\n")
endBraceNewline = []byte("}\n")
backslashN = []byte{'\\', 'n'}
backslashR = []byte{'\\', 'r'}
@@ -177,11 +176,6 @@ func writeName(w *textWriter, props *Properties) error {
return nil
}
-// raw is the interface satisfied by RawMessage.
-type raw interface {
- Bytes() []byte
-}
-
func requiresQuotes(u string) bool {
// When type URL contains any characters except [0-9A-Za-z./\-]*, it must be quoted.
for _, ch := range u {
@@ -276,6 +270,10 @@ func (tm *TextMarshaler) writeStruct(w *textWriter, sv reflect.Value) error {
props := sprops.Prop[i]
name := st.Field(i).Name
+ if name == "XXX_NoUnkeyedLiteral" {
+ continue
+ }
+
if strings.HasPrefix(name, "XXX_") {
// There are two XXX_ fields:
// XXX_unrecognized []byte
@@ -366,7 +364,7 @@ func (tm *TextMarshaler) writeStruct(w *textWriter, sv reflect.Value) error {
return err
}
}
- if err := tm.writeAny(w, key, props.mkeyprop); err != nil {
+ if err := tm.writeAny(w, key, props.MapKeyProp); err != nil {
return err
}
if err := w.WriteByte('\n'); err != nil {
@@ -383,7 +381,7 @@ func (tm *TextMarshaler) writeStruct(w *textWriter, sv reflect.Value) error {
return err
}
}
- if err := tm.writeAny(w, val, props.mvalprop); err != nil {
+ if err := tm.writeAny(w, val, props.MapValProp); err != nil {
return err
}
if err := w.WriteByte('\n'); err != nil {
@@ -447,12 +445,6 @@ func (tm *TextMarshaler) writeStruct(w *textWriter, sv reflect.Value) error {
return err
}
}
- if b, ok := fv.Interface().(raw); ok {
- if err := writeRaw(w, b.Bytes()); err != nil {
- return err
- }
- continue
- }
if len(props.Enum) > 0 {
if err := tm.writeEnum(w, fv, props); err != nil {
@@ -475,7 +467,7 @@ func (tm *TextMarshaler) writeStruct(w *textWriter, sv reflect.Value) error {
pv = reflect.New(sv.Type())
pv.Elem().Set(sv)
}
- if pv.Type().Implements(extensionRangeType) {
+ if _, err := extendable(pv.Interface()); err == nil {
if err := tm.writeExtensions(w, pv); err != nil {
return err
}
@@ -484,27 +476,6 @@ func (tm *TextMarshaler) writeStruct(w *textWriter, sv reflect.Value) error {
return nil
}
-// writeRaw writes an uninterpreted raw message.
-func writeRaw(w *textWriter, b []byte) error {
- if err := w.WriteByte('<'); err != nil {
- return err
- }
- if !w.compact {
- if err := w.WriteByte('\n'); err != nil {
- return err
- }
- }
- w.indent()
- if err := writeUnknownStruct(w, b); err != nil {
- return err
- }
- w.unindent()
- if err := w.WriteByte('>'); err != nil {
- return err
- }
- return nil
-}
-
// writeAny writes an arbitrary field.
func (tm *TextMarshaler) writeAny(w *textWriter, v reflect.Value, props *Properties) error {
v = reflect.Indirect(v)
@@ -605,6 +576,19 @@ func (tm *TextMarshaler) writeAny(w *textWriter, v reflect.Value, props *Propert
}
}
w.indent()
+ if v.CanAddr() {
+ // Calling v.Interface on a struct causes the reflect package to
+ // copy the entire struct. This is racy with the new Marshaler
+ // since we atomically update the XXX_sizecache.
+ //
+ // Thus, we retrieve a pointer to the struct if possible to avoid
+ // a race since v.Interface on the pointer doesn't copy the struct.
+ //
+ // If v is not addressable, then we are not worried about a race
+ // since it implies that the binary Marshaler cannot possibly be
+ // mutating this value.
+ v = v.Addr()
+ }
if etm, ok := v.Interface().(encoding.TextMarshaler); ok {
text, err := etm.MarshalText()
if err != nil {
@@ -613,8 +597,13 @@ func (tm *TextMarshaler) writeAny(w *textWriter, v reflect.Value, props *Propert
if _, err = w.Write(text); err != nil {
return err
}
- } else if err := tm.writeStruct(w, v); err != nil {
- return err
+ } else {
+ if v.Kind() == reflect.Ptr {
+ v = v.Elem()
+ }
+ if err := tm.writeStruct(w, v); err != nil {
+ return err
+ }
}
w.unindent()
if err := w.WriteByte(ket); err != nil {
diff --git a/vendor/github.com/gogo/protobuf/proto/text_parser.go b/vendor/github.com/gogo/protobuf/proto/text_parser.go
index f1276729a..1ce0be2fa 100644
--- a/vendor/github.com/gogo/protobuf/proto/text_parser.go
+++ b/vendor/github.com/gogo/protobuf/proto/text_parser.go
@@ -212,7 +212,6 @@ func (p *textParser) advance() {
var (
errBadUTF8 = errors.New("proto: bad UTF-8")
- errBadHex = errors.New("proto: bad hexadecimal")
)
func unquoteC(s string, quote rune) (string, error) {
@@ -283,60 +282,47 @@ func unescape(s string) (ch string, tail string, err error) {
return "?", s, nil // trigraph workaround
case '\'', '"', '\\':
return string(r), s, nil
- case '0', '1', '2', '3', '4', '5', '6', '7', 'x', 'X':
+ case '0', '1', '2', '3', '4', '5', '6', '7':
if len(s) < 2 {
return "", "", fmt.Errorf(`\%c requires 2 following digits`, r)
}
- base := 8
- ss := s[:2]
+ ss := string(r) + s[:2]
s = s[2:]
- if r == 'x' || r == 'X' {
- base = 16
- } else {
- ss = string(r) + ss
- }
- i, err := strconv.ParseUint(ss, base, 8)
+ i, err := strconv.ParseUint(ss, 8, 8)
if err != nil {
- return "", "", err
+ return "", "", fmt.Errorf(`\%s contains non-octal digits`, ss)
}
return string([]byte{byte(i)}), s, nil
- case 'u', 'U':
- n := 4
- if r == 'U' {
+ case 'x', 'X', 'u', 'U':
+ var n int
+ switch r {
+ case 'x', 'X':
+ n = 2
+ case 'u':
+ n = 4
+ case 'U':
n = 8
}
if len(s) < n {
- return "", "", fmt.Errorf(`\%c requires %d digits`, r, n)
- }
-
- bs := make([]byte, n/2)
- for i := 0; i < n; i += 2 {
- a, ok1 := unhex(s[i])
- b, ok2 := unhex(s[i+1])
- if !ok1 || !ok2 {
- return "", "", errBadHex
- }
- bs[i/2] = a<<4 | b
+ return "", "", fmt.Errorf(`\%c requires %d following digits`, r, n)
}
+ ss := s[:n]
s = s[n:]
- return string(bs), s, nil
+ i, err := strconv.ParseUint(ss, 16, 64)
+ if err != nil {
+ return "", "", fmt.Errorf(`\%c%s contains non-hexadecimal digits`, r, ss)
+ }
+ if r == 'x' || r == 'X' {
+ return string([]byte{byte(i)}), s, nil
+ }
+ if i > utf8.MaxRune {
+ return "", "", fmt.Errorf(`\%c%s is not a valid Unicode code point`, r, ss)
+ }
+ return string(i), s, nil
}
return "", "", fmt.Errorf(`unknown escape \%c`, r)
}
-// Adapted from src/pkg/strconv/quote.go.
-func unhex(b byte) (v byte, ok bool) {
- switch {
- case '0' <= b && b <= '9':
- return b - '0', true
- case 'a' <= b && b <= 'f':
- return b - 'a' + 10, true
- case 'A' <= b && b <= 'F':
- return b - 'A' + 10, true
- }
- return 0, false
-}
-
// Back off the parser by one token. Can only be done between calls to next().
// It makes the next advance() a no-op.
func (p *textParser) back() { p.backed = true }
@@ -650,17 +636,17 @@ func (p *textParser) readStruct(sv reflect.Value, terminator string) error {
if err := p.consumeToken(":"); err != nil {
return err
}
- if err := p.readAny(key, props.mkeyprop); err != nil {
+ if err := p.readAny(key, props.MapKeyProp); err != nil {
return err
}
if err := p.consumeOptionalSeparator(); err != nil {
return err
}
case "value":
- if err := p.checkForColon(props.mvalprop, dst.Type().Elem()); err != nil {
+ if err := p.checkForColon(props.MapValProp, dst.Type().Elem()); err != nil {
return err
}
- if err := p.readAny(val, props.mvalprop); err != nil {
+ if err := p.readAny(val, props.MapValProp); err != nil {
return err
}
if err := p.consumeOptionalSeparator(); err != nil {
@@ -734,6 +720,9 @@ func (p *textParser) consumeExtName() (string, error) {
if tok.err != nil {
return "", p.errorf("unrecognized type_url or extension name: %s", tok.err)
}
+ if p.done && tok.value != "]" {
+ return "", p.errorf("unclosed type_url or extension name")
+ }
}
return strings.Join(parts, ""), nil
}
@@ -934,6 +923,16 @@ func (p *textParser) readAny(v reflect.Value, props *Properties) error {
fv.SetFloat(f)
return nil
}
+ case reflect.Int8:
+ if x, err := strconv.ParseInt(tok.value, 0, 8); err == nil {
+ fv.SetInt(x)
+ return nil
+ }
+ case reflect.Int16:
+ if x, err := strconv.ParseInt(tok.value, 0, 16); err == nil {
+ fv.SetInt(x)
+ return nil
+ }
case reflect.Int32:
if x, err := strconv.ParseInt(tok.value, 0, 32); err == nil {
fv.SetInt(x)
@@ -981,9 +980,19 @@ func (p *textParser) readAny(v reflect.Value, props *Properties) error {
}
// TODO: Handle nested messages which implement encoding.TextUnmarshaler.
return p.readStruct(fv, terminator)
+ case reflect.Uint8:
+ if x, err := strconv.ParseUint(tok.value, 0, 8); err == nil {
+ fv.SetUint(x)
+ return nil
+ }
+ case reflect.Uint16:
+ if x, err := strconv.ParseUint(tok.value, 0, 16); err == nil {
+ fv.SetUint(x)
+ return nil
+ }
case reflect.Uint32:
if x, err := strconv.ParseUint(tok.value, 0, 32); err == nil {
- fv.SetUint(x)
+ fv.SetUint(uint64(x))
return nil
}
case reflect.Uint64:
@@ -1001,13 +1010,9 @@ func (p *textParser) readAny(v reflect.Value, props *Properties) error {
// UnmarshalText returns *RequiredNotSetError.
func UnmarshalText(s string, pb Message) error {
if um, ok := pb.(encoding.TextUnmarshaler); ok {
- err := um.UnmarshalText([]byte(s))
- return err
+ return um.UnmarshalText([]byte(s))
}
pb.Reset()
v := reflect.ValueOf(pb)
- if pe := newTextParser(s).readStruct(v.Elem(), ""); pe != nil {
- return pe
- }
- return nil
+ return newTextParser(s).readStruct(v.Elem(), "")
}
diff --git a/vendor/github.com/gogo/protobuf/proto/timestamp_gogo.go b/vendor/github.com/gogo/protobuf/proto/timestamp_gogo.go
index d42764743..38439fa99 100644
--- a/vendor/github.com/gogo/protobuf/proto/timestamp_gogo.go
+++ b/vendor/github.com/gogo/protobuf/proto/timestamp_gogo.go
@@ -47,183 +47,3 @@ func (*timestamp) String() string { return "timestamp" }
func init() {
RegisterType((*timestamp)(nil), "gogo.protobuf.proto.timestamp")
}
-
-func (o *Buffer) decTimestamp() (time.Time, error) {
- b, err := o.DecodeRawBytes(true)
- if err != nil {
- return time.Time{}, err
- }
- tproto := ×tamp{}
- if err := Unmarshal(b, tproto); err != nil {
- return time.Time{}, err
- }
- return timestampFromProto(tproto)
-}
-
-func (o *Buffer) dec_time(p *Properties, base structPointer) error {
- t, err := o.decTimestamp()
- if err != nil {
- return err
- }
- setPtrCustomType(base, p.field, &t)
- return nil
-}
-
-func (o *Buffer) dec_ref_time(p *Properties, base structPointer) error {
- t, err := o.decTimestamp()
- if err != nil {
- return err
- }
- setCustomType(base, p.field, &t)
- return nil
-}
-
-func (o *Buffer) dec_slice_time(p *Properties, base structPointer) error {
- t, err := o.decTimestamp()
- if err != nil {
- return err
- }
- newBas := appendStructPointer(base, p.field, reflect.SliceOf(reflect.PtrTo(timeType)))
- var zero field
- setPtrCustomType(newBas, zero, &t)
- return nil
-}
-
-func (o *Buffer) dec_slice_ref_time(p *Properties, base structPointer) error {
- t, err := o.decTimestamp()
- if err != nil {
- return err
- }
- newBas := appendStructPointer(base, p.field, reflect.SliceOf(timeType))
- var zero field
- setCustomType(newBas, zero, &t)
- return nil
-}
-
-func size_time(p *Properties, base structPointer) (n int) {
- structp := structPointer_GetStructPointer(base, p.field)
- if structPointer_IsNil(structp) {
- return 0
- }
- tim := structPointer_Interface(structp, timeType).(*time.Time)
- t, err := timestampProto(*tim)
- if err != nil {
- return 0
- }
- size := Size(t)
- return size + sizeVarint(uint64(size)) + len(p.tagcode)
-}
-
-func (o *Buffer) enc_time(p *Properties, base structPointer) error {
- structp := structPointer_GetStructPointer(base, p.field)
- if structPointer_IsNil(structp) {
- return ErrNil
- }
- tim := structPointer_Interface(structp, timeType).(*time.Time)
- t, err := timestampProto(*tim)
- if err != nil {
- return err
- }
- data, err := Marshal(t)
- if err != nil {
- return err
- }
- o.buf = append(o.buf, p.tagcode...)
- o.EncodeRawBytes(data)
- return nil
-}
-
-func size_ref_time(p *Properties, base structPointer) (n int) {
- tim := structPointer_InterfaceAt(base, p.field, timeType).(*time.Time)
- t, err := timestampProto(*tim)
- if err != nil {
- return 0
- }
- size := Size(t)
- return size + sizeVarint(uint64(size)) + len(p.tagcode)
-}
-
-func (o *Buffer) enc_ref_time(p *Properties, base structPointer) error {
- tim := structPointer_InterfaceAt(base, p.field, timeType).(*time.Time)
- t, err := timestampProto(*tim)
- if err != nil {
- return err
- }
- data, err := Marshal(t)
- if err != nil {
- return err
- }
- o.buf = append(o.buf, p.tagcode...)
- o.EncodeRawBytes(data)
- return nil
-}
-
-func size_slice_time(p *Properties, base structPointer) (n int) {
- ptims := structPointer_InterfaceAt(base, p.field, reflect.SliceOf(reflect.PtrTo(timeType))).(*[]*time.Time)
- tims := *ptims
- for i := 0; i < len(tims); i++ {
- if tims[i] == nil {
- return 0
- }
- tproto, err := timestampProto(*tims[i])
- if err != nil {
- return 0
- }
- size := Size(tproto)
- n += len(p.tagcode) + size + sizeVarint(uint64(size))
- }
- return n
-}
-
-func (o *Buffer) enc_slice_time(p *Properties, base structPointer) error {
- ptims := structPointer_InterfaceAt(base, p.field, reflect.SliceOf(reflect.PtrTo(timeType))).(*[]*time.Time)
- tims := *ptims
- for i := 0; i < len(tims); i++ {
- if tims[i] == nil {
- return errRepeatedHasNil
- }
- tproto, err := timestampProto(*tims[i])
- if err != nil {
- return err
- }
- data, err := Marshal(tproto)
- if err != nil {
- return err
- }
- o.buf = append(o.buf, p.tagcode...)
- o.EncodeRawBytes(data)
- }
- return nil
-}
-
-func size_slice_ref_time(p *Properties, base structPointer) (n int) {
- ptims := structPointer_InterfaceAt(base, p.field, reflect.SliceOf(timeType)).(*[]time.Time)
- tims := *ptims
- for i := 0; i < len(tims); i++ {
- tproto, err := timestampProto(tims[i])
- if err != nil {
- return 0
- }
- size := Size(tproto)
- n += len(p.tagcode) + size + sizeVarint(uint64(size))
- }
- return n
-}
-
-func (o *Buffer) enc_slice_ref_time(p *Properties, base structPointer) error {
- ptims := structPointer_InterfaceAt(base, p.field, reflect.SliceOf(timeType)).(*[]time.Time)
- tims := *ptims
- for i := 0; i < len(tims); i++ {
- tproto, err := timestampProto(tims[i])
- if err != nil {
- return err
- }
- data, err := Marshal(tproto)
- if err != nil {
- return err
- }
- o.buf = append(o.buf, p.tagcode...)
- o.EncodeRawBytes(data)
- }
- return nil
-}
diff --git a/vendor/github.com/gogo/protobuf/proto/wrappers.go b/vendor/github.com/gogo/protobuf/proto/wrappers.go
new file mode 100644
index 000000000..b175d1b64
--- /dev/null
+++ b/vendor/github.com/gogo/protobuf/proto/wrappers.go
@@ -0,0 +1,1888 @@
+// Protocol Buffers for Go with Gadgets
+//
+// Copyright (c) 2018, The GoGo Authors. All rights reserved.
+// http://github.com/gogo/protobuf
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package proto
+
+import (
+ "io"
+ "reflect"
+)
+
+func makeStdDoubleValueMarshaler(u *marshalInfo) (sizer, marshaler) {
+ return func(ptr pointer, tagsize int) int {
+ t := ptr.asPointerTo(u.typ).Interface().(*float64)
+ v := &float64Value{*t}
+ siz := Size(v)
+ return tagsize + SizeVarint(uint64(siz)) + siz
+ }, func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) {
+ t := ptr.asPointerTo(u.typ).Interface().(*float64)
+ v := &float64Value{*t}
+ buf, err := Marshal(v)
+ if err != nil {
+ return nil, err
+ }
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, uint64(len(buf)))
+ b = append(b, buf...)
+ return b, nil
+ }
+}
+
+func makeStdDoubleValuePtrMarshaler(u *marshalInfo) (sizer, marshaler) {
+ return func(ptr pointer, tagsize int) int {
+ if ptr.isNil() {
+ return 0
+ }
+ t := ptr.asPointerTo(reflect.PtrTo(u.typ)).Elem().Interface().(*float64)
+ v := &float64Value{*t}
+ siz := Size(v)
+ return tagsize + SizeVarint(uint64(siz)) + siz
+ }, func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) {
+ if ptr.isNil() {
+ return b, nil
+ }
+ t := ptr.asPointerTo(reflect.PtrTo(u.typ)).Elem().Interface().(*float64)
+ v := &float64Value{*t}
+ buf, err := Marshal(v)
+ if err != nil {
+ return nil, err
+ }
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, uint64(len(buf)))
+ b = append(b, buf...)
+ return b, nil
+ }
+}
+
+func makeStdDoubleValueSliceMarshaler(u *marshalInfo) (sizer, marshaler) {
+ return func(ptr pointer, tagsize int) int {
+ s := ptr.getSlice(u.typ)
+ n := 0
+ for i := 0; i < s.Len(); i++ {
+ elem := s.Index(i)
+ t := elem.Interface().(float64)
+ v := &float64Value{t}
+ siz := Size(v)
+ n += siz + SizeVarint(uint64(siz)) + tagsize
+ }
+ return n
+ },
+ func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) {
+ s := ptr.getSlice(u.typ)
+ for i := 0; i < s.Len(); i++ {
+ elem := s.Index(i)
+ t := elem.Interface().(float64)
+ v := &float64Value{t}
+ siz := Size(v)
+ buf, err := Marshal(v)
+ if err != nil {
+ return nil, err
+ }
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, uint64(siz))
+ b = append(b, buf...)
+ }
+
+ return b, nil
+ }
+}
+
+func makeStdDoubleValuePtrSliceMarshaler(u *marshalInfo) (sizer, marshaler) {
+ return func(ptr pointer, tagsize int) int {
+ s := ptr.getSlice(reflect.PtrTo(u.typ))
+ n := 0
+ for i := 0; i < s.Len(); i++ {
+ elem := s.Index(i)
+ t := elem.Interface().(*float64)
+ v := &float64Value{*t}
+ siz := Size(v)
+ n += siz + SizeVarint(uint64(siz)) + tagsize
+ }
+ return n
+ },
+ func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) {
+ s := ptr.getSlice(reflect.PtrTo(u.typ))
+ for i := 0; i < s.Len(); i++ {
+ elem := s.Index(i)
+ t := elem.Interface().(*float64)
+ v := &float64Value{*t}
+ siz := Size(v)
+ buf, err := Marshal(v)
+ if err != nil {
+ return nil, err
+ }
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, uint64(siz))
+ b = append(b, buf...)
+ }
+
+ return b, nil
+ }
+}
+
+func makeStdDoubleValueUnmarshaler(sub *unmarshalInfo, name string) unmarshaler {
+ return func(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireBytes {
+ return nil, errInternalBadWireType
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ if x > uint64(len(b)) {
+ return nil, io.ErrUnexpectedEOF
+ }
+ m := &float64Value{}
+ if err := Unmarshal(b[:x], m); err != nil {
+ return nil, err
+ }
+ s := f.asPointerTo(sub.typ).Elem()
+ s.Set(reflect.ValueOf(m.Value))
+ return b[x:], nil
+ }
+}
+
+func makeStdDoubleValuePtrUnmarshaler(sub *unmarshalInfo, name string) unmarshaler {
+ return func(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireBytes {
+ return nil, errInternalBadWireType
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ if x > uint64(len(b)) {
+ return nil, io.ErrUnexpectedEOF
+ }
+ m := &float64Value{}
+ if err := Unmarshal(b[:x], m); err != nil {
+ return nil, err
+ }
+ s := f.asPointerTo(reflect.PtrTo(sub.typ)).Elem()
+ s.Set(reflect.ValueOf(&m.Value))
+ return b[x:], nil
+ }
+}
+
+func makeStdDoubleValuePtrSliceUnmarshaler(sub *unmarshalInfo, name string) unmarshaler {
+ return func(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireBytes {
+ return nil, errInternalBadWireType
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ if x > uint64(len(b)) {
+ return nil, io.ErrUnexpectedEOF
+ }
+ m := &float64Value{}
+ if err := Unmarshal(b[:x], m); err != nil {
+ return nil, err
+ }
+ slice := f.getSlice(reflect.PtrTo(sub.typ))
+ newSlice := reflect.Append(slice, reflect.ValueOf(&m.Value))
+ slice.Set(newSlice)
+ return b[x:], nil
+ }
+}
+
+func makeStdDoubleValueSliceUnmarshaler(sub *unmarshalInfo, name string) unmarshaler {
+ return func(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireBytes {
+ return nil, errInternalBadWireType
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ if x > uint64(len(b)) {
+ return nil, io.ErrUnexpectedEOF
+ }
+ m := &float64Value{}
+ if err := Unmarshal(b[:x], m); err != nil {
+ return nil, err
+ }
+ slice := f.getSlice(sub.typ)
+ newSlice := reflect.Append(slice, reflect.ValueOf(m.Value))
+ slice.Set(newSlice)
+ return b[x:], nil
+ }
+}
+
+func makeStdFloatValueMarshaler(u *marshalInfo) (sizer, marshaler) {
+ return func(ptr pointer, tagsize int) int {
+ t := ptr.asPointerTo(u.typ).Interface().(*float32)
+ v := &float32Value{*t}
+ siz := Size(v)
+ return tagsize + SizeVarint(uint64(siz)) + siz
+ }, func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) {
+ t := ptr.asPointerTo(u.typ).Interface().(*float32)
+ v := &float32Value{*t}
+ buf, err := Marshal(v)
+ if err != nil {
+ return nil, err
+ }
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, uint64(len(buf)))
+ b = append(b, buf...)
+ return b, nil
+ }
+}
+
+func makeStdFloatValuePtrMarshaler(u *marshalInfo) (sizer, marshaler) {
+ return func(ptr pointer, tagsize int) int {
+ if ptr.isNil() {
+ return 0
+ }
+ t := ptr.asPointerTo(reflect.PtrTo(u.typ)).Elem().Interface().(*float32)
+ v := &float32Value{*t}
+ siz := Size(v)
+ return tagsize + SizeVarint(uint64(siz)) + siz
+ }, func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) {
+ if ptr.isNil() {
+ return b, nil
+ }
+ t := ptr.asPointerTo(reflect.PtrTo(u.typ)).Elem().Interface().(*float32)
+ v := &float32Value{*t}
+ buf, err := Marshal(v)
+ if err != nil {
+ return nil, err
+ }
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, uint64(len(buf)))
+ b = append(b, buf...)
+ return b, nil
+ }
+}
+
+func makeStdFloatValueSliceMarshaler(u *marshalInfo) (sizer, marshaler) {
+ return func(ptr pointer, tagsize int) int {
+ s := ptr.getSlice(u.typ)
+ n := 0
+ for i := 0; i < s.Len(); i++ {
+ elem := s.Index(i)
+ t := elem.Interface().(float32)
+ v := &float32Value{t}
+ siz := Size(v)
+ n += siz + SizeVarint(uint64(siz)) + tagsize
+ }
+ return n
+ },
+ func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) {
+ s := ptr.getSlice(u.typ)
+ for i := 0; i < s.Len(); i++ {
+ elem := s.Index(i)
+ t := elem.Interface().(float32)
+ v := &float32Value{t}
+ siz := Size(v)
+ buf, err := Marshal(v)
+ if err != nil {
+ return nil, err
+ }
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, uint64(siz))
+ b = append(b, buf...)
+ }
+
+ return b, nil
+ }
+}
+
+func makeStdFloatValuePtrSliceMarshaler(u *marshalInfo) (sizer, marshaler) {
+ return func(ptr pointer, tagsize int) int {
+ s := ptr.getSlice(reflect.PtrTo(u.typ))
+ n := 0
+ for i := 0; i < s.Len(); i++ {
+ elem := s.Index(i)
+ t := elem.Interface().(*float32)
+ v := &float32Value{*t}
+ siz := Size(v)
+ n += siz + SizeVarint(uint64(siz)) + tagsize
+ }
+ return n
+ },
+ func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) {
+ s := ptr.getSlice(reflect.PtrTo(u.typ))
+ for i := 0; i < s.Len(); i++ {
+ elem := s.Index(i)
+ t := elem.Interface().(*float32)
+ v := &float32Value{*t}
+ siz := Size(v)
+ buf, err := Marshal(v)
+ if err != nil {
+ return nil, err
+ }
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, uint64(siz))
+ b = append(b, buf...)
+ }
+
+ return b, nil
+ }
+}
+
+func makeStdFloatValueUnmarshaler(sub *unmarshalInfo, name string) unmarshaler {
+ return func(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireBytes {
+ return nil, errInternalBadWireType
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ if x > uint64(len(b)) {
+ return nil, io.ErrUnexpectedEOF
+ }
+ m := &float32Value{}
+ if err := Unmarshal(b[:x], m); err != nil {
+ return nil, err
+ }
+ s := f.asPointerTo(sub.typ).Elem()
+ s.Set(reflect.ValueOf(m.Value))
+ return b[x:], nil
+ }
+}
+
+func makeStdFloatValuePtrUnmarshaler(sub *unmarshalInfo, name string) unmarshaler {
+ return func(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireBytes {
+ return nil, errInternalBadWireType
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ if x > uint64(len(b)) {
+ return nil, io.ErrUnexpectedEOF
+ }
+ m := &float32Value{}
+ if err := Unmarshal(b[:x], m); err != nil {
+ return nil, err
+ }
+ s := f.asPointerTo(reflect.PtrTo(sub.typ)).Elem()
+ s.Set(reflect.ValueOf(&m.Value))
+ return b[x:], nil
+ }
+}
+
+func makeStdFloatValuePtrSliceUnmarshaler(sub *unmarshalInfo, name string) unmarshaler {
+ return func(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireBytes {
+ return nil, errInternalBadWireType
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ if x > uint64(len(b)) {
+ return nil, io.ErrUnexpectedEOF
+ }
+ m := &float32Value{}
+ if err := Unmarshal(b[:x], m); err != nil {
+ return nil, err
+ }
+ slice := f.getSlice(reflect.PtrTo(sub.typ))
+ newSlice := reflect.Append(slice, reflect.ValueOf(&m.Value))
+ slice.Set(newSlice)
+ return b[x:], nil
+ }
+}
+
+func makeStdFloatValueSliceUnmarshaler(sub *unmarshalInfo, name string) unmarshaler {
+ return func(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireBytes {
+ return nil, errInternalBadWireType
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ if x > uint64(len(b)) {
+ return nil, io.ErrUnexpectedEOF
+ }
+ m := &float32Value{}
+ if err := Unmarshal(b[:x], m); err != nil {
+ return nil, err
+ }
+ slice := f.getSlice(sub.typ)
+ newSlice := reflect.Append(slice, reflect.ValueOf(m.Value))
+ slice.Set(newSlice)
+ return b[x:], nil
+ }
+}
+
+func makeStdInt64ValueMarshaler(u *marshalInfo) (sizer, marshaler) {
+ return func(ptr pointer, tagsize int) int {
+ t := ptr.asPointerTo(u.typ).Interface().(*int64)
+ v := &int64Value{*t}
+ siz := Size(v)
+ return tagsize + SizeVarint(uint64(siz)) + siz
+ }, func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) {
+ t := ptr.asPointerTo(u.typ).Interface().(*int64)
+ v := &int64Value{*t}
+ buf, err := Marshal(v)
+ if err != nil {
+ return nil, err
+ }
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, uint64(len(buf)))
+ b = append(b, buf...)
+ return b, nil
+ }
+}
+
+func makeStdInt64ValuePtrMarshaler(u *marshalInfo) (sizer, marshaler) {
+ return func(ptr pointer, tagsize int) int {
+ if ptr.isNil() {
+ return 0
+ }
+ t := ptr.asPointerTo(reflect.PtrTo(u.typ)).Elem().Interface().(*int64)
+ v := &int64Value{*t}
+ siz := Size(v)
+ return tagsize + SizeVarint(uint64(siz)) + siz
+ }, func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) {
+ if ptr.isNil() {
+ return b, nil
+ }
+ t := ptr.asPointerTo(reflect.PtrTo(u.typ)).Elem().Interface().(*int64)
+ v := &int64Value{*t}
+ buf, err := Marshal(v)
+ if err != nil {
+ return nil, err
+ }
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, uint64(len(buf)))
+ b = append(b, buf...)
+ return b, nil
+ }
+}
+
+func makeStdInt64ValueSliceMarshaler(u *marshalInfo) (sizer, marshaler) {
+ return func(ptr pointer, tagsize int) int {
+ s := ptr.getSlice(u.typ)
+ n := 0
+ for i := 0; i < s.Len(); i++ {
+ elem := s.Index(i)
+ t := elem.Interface().(int64)
+ v := &int64Value{t}
+ siz := Size(v)
+ n += siz + SizeVarint(uint64(siz)) + tagsize
+ }
+ return n
+ },
+ func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) {
+ s := ptr.getSlice(u.typ)
+ for i := 0; i < s.Len(); i++ {
+ elem := s.Index(i)
+ t := elem.Interface().(int64)
+ v := &int64Value{t}
+ siz := Size(v)
+ buf, err := Marshal(v)
+ if err != nil {
+ return nil, err
+ }
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, uint64(siz))
+ b = append(b, buf...)
+ }
+
+ return b, nil
+ }
+}
+
+func makeStdInt64ValuePtrSliceMarshaler(u *marshalInfo) (sizer, marshaler) {
+ return func(ptr pointer, tagsize int) int {
+ s := ptr.getSlice(reflect.PtrTo(u.typ))
+ n := 0
+ for i := 0; i < s.Len(); i++ {
+ elem := s.Index(i)
+ t := elem.Interface().(*int64)
+ v := &int64Value{*t}
+ siz := Size(v)
+ n += siz + SizeVarint(uint64(siz)) + tagsize
+ }
+ return n
+ },
+ func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) {
+ s := ptr.getSlice(reflect.PtrTo(u.typ))
+ for i := 0; i < s.Len(); i++ {
+ elem := s.Index(i)
+ t := elem.Interface().(*int64)
+ v := &int64Value{*t}
+ siz := Size(v)
+ buf, err := Marshal(v)
+ if err != nil {
+ return nil, err
+ }
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, uint64(siz))
+ b = append(b, buf...)
+ }
+
+ return b, nil
+ }
+}
+
+func makeStdInt64ValueUnmarshaler(sub *unmarshalInfo, name string) unmarshaler {
+ return func(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireBytes {
+ return nil, errInternalBadWireType
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ if x > uint64(len(b)) {
+ return nil, io.ErrUnexpectedEOF
+ }
+ m := &int64Value{}
+ if err := Unmarshal(b[:x], m); err != nil {
+ return nil, err
+ }
+ s := f.asPointerTo(sub.typ).Elem()
+ s.Set(reflect.ValueOf(m.Value))
+ return b[x:], nil
+ }
+}
+
+func makeStdInt64ValuePtrUnmarshaler(sub *unmarshalInfo, name string) unmarshaler {
+ return func(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireBytes {
+ return nil, errInternalBadWireType
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ if x > uint64(len(b)) {
+ return nil, io.ErrUnexpectedEOF
+ }
+ m := &int64Value{}
+ if err := Unmarshal(b[:x], m); err != nil {
+ return nil, err
+ }
+ s := f.asPointerTo(reflect.PtrTo(sub.typ)).Elem()
+ s.Set(reflect.ValueOf(&m.Value))
+ return b[x:], nil
+ }
+}
+
+func makeStdInt64ValuePtrSliceUnmarshaler(sub *unmarshalInfo, name string) unmarshaler {
+ return func(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireBytes {
+ return nil, errInternalBadWireType
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ if x > uint64(len(b)) {
+ return nil, io.ErrUnexpectedEOF
+ }
+ m := &int64Value{}
+ if err := Unmarshal(b[:x], m); err != nil {
+ return nil, err
+ }
+ slice := f.getSlice(reflect.PtrTo(sub.typ))
+ newSlice := reflect.Append(slice, reflect.ValueOf(&m.Value))
+ slice.Set(newSlice)
+ return b[x:], nil
+ }
+}
+
+func makeStdInt64ValueSliceUnmarshaler(sub *unmarshalInfo, name string) unmarshaler {
+ return func(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireBytes {
+ return nil, errInternalBadWireType
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ if x > uint64(len(b)) {
+ return nil, io.ErrUnexpectedEOF
+ }
+ m := &int64Value{}
+ if err := Unmarshal(b[:x], m); err != nil {
+ return nil, err
+ }
+ slice := f.getSlice(sub.typ)
+ newSlice := reflect.Append(slice, reflect.ValueOf(m.Value))
+ slice.Set(newSlice)
+ return b[x:], nil
+ }
+}
+
+func makeStdUInt64ValueMarshaler(u *marshalInfo) (sizer, marshaler) {
+ return func(ptr pointer, tagsize int) int {
+ t := ptr.asPointerTo(u.typ).Interface().(*uint64)
+ v := &uint64Value{*t}
+ siz := Size(v)
+ return tagsize + SizeVarint(uint64(siz)) + siz
+ }, func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) {
+ t := ptr.asPointerTo(u.typ).Interface().(*uint64)
+ v := &uint64Value{*t}
+ buf, err := Marshal(v)
+ if err != nil {
+ return nil, err
+ }
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, uint64(len(buf)))
+ b = append(b, buf...)
+ return b, nil
+ }
+}
+
+func makeStdUInt64ValuePtrMarshaler(u *marshalInfo) (sizer, marshaler) {
+ return func(ptr pointer, tagsize int) int {
+ if ptr.isNil() {
+ return 0
+ }
+ t := ptr.asPointerTo(reflect.PtrTo(u.typ)).Elem().Interface().(*uint64)
+ v := &uint64Value{*t}
+ siz := Size(v)
+ return tagsize + SizeVarint(uint64(siz)) + siz
+ }, func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) {
+ if ptr.isNil() {
+ return b, nil
+ }
+ t := ptr.asPointerTo(reflect.PtrTo(u.typ)).Elem().Interface().(*uint64)
+ v := &uint64Value{*t}
+ buf, err := Marshal(v)
+ if err != nil {
+ return nil, err
+ }
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, uint64(len(buf)))
+ b = append(b, buf...)
+ return b, nil
+ }
+}
+
+func makeStdUInt64ValueSliceMarshaler(u *marshalInfo) (sizer, marshaler) {
+ return func(ptr pointer, tagsize int) int {
+ s := ptr.getSlice(u.typ)
+ n := 0
+ for i := 0; i < s.Len(); i++ {
+ elem := s.Index(i)
+ t := elem.Interface().(uint64)
+ v := &uint64Value{t}
+ siz := Size(v)
+ n += siz + SizeVarint(uint64(siz)) + tagsize
+ }
+ return n
+ },
+ func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) {
+ s := ptr.getSlice(u.typ)
+ for i := 0; i < s.Len(); i++ {
+ elem := s.Index(i)
+ t := elem.Interface().(uint64)
+ v := &uint64Value{t}
+ siz := Size(v)
+ buf, err := Marshal(v)
+ if err != nil {
+ return nil, err
+ }
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, uint64(siz))
+ b = append(b, buf...)
+ }
+
+ return b, nil
+ }
+}
+
+func makeStdUInt64ValuePtrSliceMarshaler(u *marshalInfo) (sizer, marshaler) {
+ return func(ptr pointer, tagsize int) int {
+ s := ptr.getSlice(reflect.PtrTo(u.typ))
+ n := 0
+ for i := 0; i < s.Len(); i++ {
+ elem := s.Index(i)
+ t := elem.Interface().(*uint64)
+ v := &uint64Value{*t}
+ siz := Size(v)
+ n += siz + SizeVarint(uint64(siz)) + tagsize
+ }
+ return n
+ },
+ func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) {
+ s := ptr.getSlice(reflect.PtrTo(u.typ))
+ for i := 0; i < s.Len(); i++ {
+ elem := s.Index(i)
+ t := elem.Interface().(*uint64)
+ v := &uint64Value{*t}
+ siz := Size(v)
+ buf, err := Marshal(v)
+ if err != nil {
+ return nil, err
+ }
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, uint64(siz))
+ b = append(b, buf...)
+ }
+
+ return b, nil
+ }
+}
+
+func makeStdUInt64ValueUnmarshaler(sub *unmarshalInfo, name string) unmarshaler {
+ return func(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireBytes {
+ return nil, errInternalBadWireType
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ if x > uint64(len(b)) {
+ return nil, io.ErrUnexpectedEOF
+ }
+ m := &uint64Value{}
+ if err := Unmarshal(b[:x], m); err != nil {
+ return nil, err
+ }
+ s := f.asPointerTo(sub.typ).Elem()
+ s.Set(reflect.ValueOf(m.Value))
+ return b[x:], nil
+ }
+}
+
+func makeStdUInt64ValuePtrUnmarshaler(sub *unmarshalInfo, name string) unmarshaler {
+ return func(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireBytes {
+ return nil, errInternalBadWireType
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ if x > uint64(len(b)) {
+ return nil, io.ErrUnexpectedEOF
+ }
+ m := &uint64Value{}
+ if err := Unmarshal(b[:x], m); err != nil {
+ return nil, err
+ }
+ s := f.asPointerTo(reflect.PtrTo(sub.typ)).Elem()
+ s.Set(reflect.ValueOf(&m.Value))
+ return b[x:], nil
+ }
+}
+
+func makeStdUInt64ValuePtrSliceUnmarshaler(sub *unmarshalInfo, name string) unmarshaler {
+ return func(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireBytes {
+ return nil, errInternalBadWireType
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ if x > uint64(len(b)) {
+ return nil, io.ErrUnexpectedEOF
+ }
+ m := &uint64Value{}
+ if err := Unmarshal(b[:x], m); err != nil {
+ return nil, err
+ }
+ slice := f.getSlice(reflect.PtrTo(sub.typ))
+ newSlice := reflect.Append(slice, reflect.ValueOf(&m.Value))
+ slice.Set(newSlice)
+ return b[x:], nil
+ }
+}
+
+func makeStdUInt64ValueSliceUnmarshaler(sub *unmarshalInfo, name string) unmarshaler {
+ return func(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireBytes {
+ return nil, errInternalBadWireType
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ if x > uint64(len(b)) {
+ return nil, io.ErrUnexpectedEOF
+ }
+ m := &uint64Value{}
+ if err := Unmarshal(b[:x], m); err != nil {
+ return nil, err
+ }
+ slice := f.getSlice(sub.typ)
+ newSlice := reflect.Append(slice, reflect.ValueOf(m.Value))
+ slice.Set(newSlice)
+ return b[x:], nil
+ }
+}
+
+func makeStdInt32ValueMarshaler(u *marshalInfo) (sizer, marshaler) {
+ return func(ptr pointer, tagsize int) int {
+ t := ptr.asPointerTo(u.typ).Interface().(*int32)
+ v := &int32Value{*t}
+ siz := Size(v)
+ return tagsize + SizeVarint(uint64(siz)) + siz
+ }, func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) {
+ t := ptr.asPointerTo(u.typ).Interface().(*int32)
+ v := &int32Value{*t}
+ buf, err := Marshal(v)
+ if err != nil {
+ return nil, err
+ }
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, uint64(len(buf)))
+ b = append(b, buf...)
+ return b, nil
+ }
+}
+
+func makeStdInt32ValuePtrMarshaler(u *marshalInfo) (sizer, marshaler) {
+ return func(ptr pointer, tagsize int) int {
+ if ptr.isNil() {
+ return 0
+ }
+ t := ptr.asPointerTo(reflect.PtrTo(u.typ)).Elem().Interface().(*int32)
+ v := &int32Value{*t}
+ siz := Size(v)
+ return tagsize + SizeVarint(uint64(siz)) + siz
+ }, func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) {
+ if ptr.isNil() {
+ return b, nil
+ }
+ t := ptr.asPointerTo(reflect.PtrTo(u.typ)).Elem().Interface().(*int32)
+ v := &int32Value{*t}
+ buf, err := Marshal(v)
+ if err != nil {
+ return nil, err
+ }
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, uint64(len(buf)))
+ b = append(b, buf...)
+ return b, nil
+ }
+}
+
+func makeStdInt32ValueSliceMarshaler(u *marshalInfo) (sizer, marshaler) {
+ return func(ptr pointer, tagsize int) int {
+ s := ptr.getSlice(u.typ)
+ n := 0
+ for i := 0; i < s.Len(); i++ {
+ elem := s.Index(i)
+ t := elem.Interface().(int32)
+ v := &int32Value{t}
+ siz := Size(v)
+ n += siz + SizeVarint(uint64(siz)) + tagsize
+ }
+ return n
+ },
+ func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) {
+ s := ptr.getSlice(u.typ)
+ for i := 0; i < s.Len(); i++ {
+ elem := s.Index(i)
+ t := elem.Interface().(int32)
+ v := &int32Value{t}
+ siz := Size(v)
+ buf, err := Marshal(v)
+ if err != nil {
+ return nil, err
+ }
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, uint64(siz))
+ b = append(b, buf...)
+ }
+
+ return b, nil
+ }
+}
+
+func makeStdInt32ValuePtrSliceMarshaler(u *marshalInfo) (sizer, marshaler) {
+ return func(ptr pointer, tagsize int) int {
+ s := ptr.getSlice(reflect.PtrTo(u.typ))
+ n := 0
+ for i := 0; i < s.Len(); i++ {
+ elem := s.Index(i)
+ t := elem.Interface().(*int32)
+ v := &int32Value{*t}
+ siz := Size(v)
+ n += siz + SizeVarint(uint64(siz)) + tagsize
+ }
+ return n
+ },
+ func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) {
+ s := ptr.getSlice(reflect.PtrTo(u.typ))
+ for i := 0; i < s.Len(); i++ {
+ elem := s.Index(i)
+ t := elem.Interface().(*int32)
+ v := &int32Value{*t}
+ siz := Size(v)
+ buf, err := Marshal(v)
+ if err != nil {
+ return nil, err
+ }
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, uint64(siz))
+ b = append(b, buf...)
+ }
+
+ return b, nil
+ }
+}
+
+func makeStdInt32ValueUnmarshaler(sub *unmarshalInfo, name string) unmarshaler {
+ return func(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireBytes {
+ return nil, errInternalBadWireType
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ if x > uint64(len(b)) {
+ return nil, io.ErrUnexpectedEOF
+ }
+ m := &int32Value{}
+ if err := Unmarshal(b[:x], m); err != nil {
+ return nil, err
+ }
+ s := f.asPointerTo(sub.typ).Elem()
+ s.Set(reflect.ValueOf(m.Value))
+ return b[x:], nil
+ }
+}
+
+func makeStdInt32ValuePtrUnmarshaler(sub *unmarshalInfo, name string) unmarshaler {
+ return func(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireBytes {
+ return nil, errInternalBadWireType
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ if x > uint64(len(b)) {
+ return nil, io.ErrUnexpectedEOF
+ }
+ m := &int32Value{}
+ if err := Unmarshal(b[:x], m); err != nil {
+ return nil, err
+ }
+ s := f.asPointerTo(reflect.PtrTo(sub.typ)).Elem()
+ s.Set(reflect.ValueOf(&m.Value))
+ return b[x:], nil
+ }
+}
+
+func makeStdInt32ValuePtrSliceUnmarshaler(sub *unmarshalInfo, name string) unmarshaler {
+ return func(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireBytes {
+ return nil, errInternalBadWireType
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ if x > uint64(len(b)) {
+ return nil, io.ErrUnexpectedEOF
+ }
+ m := &int32Value{}
+ if err := Unmarshal(b[:x], m); err != nil {
+ return nil, err
+ }
+ slice := f.getSlice(reflect.PtrTo(sub.typ))
+ newSlice := reflect.Append(slice, reflect.ValueOf(&m.Value))
+ slice.Set(newSlice)
+ return b[x:], nil
+ }
+}
+
+func makeStdInt32ValueSliceUnmarshaler(sub *unmarshalInfo, name string) unmarshaler {
+ return func(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireBytes {
+ return nil, errInternalBadWireType
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ if x > uint64(len(b)) {
+ return nil, io.ErrUnexpectedEOF
+ }
+ m := &int32Value{}
+ if err := Unmarshal(b[:x], m); err != nil {
+ return nil, err
+ }
+ slice := f.getSlice(sub.typ)
+ newSlice := reflect.Append(slice, reflect.ValueOf(m.Value))
+ slice.Set(newSlice)
+ return b[x:], nil
+ }
+}
+
+func makeStdUInt32ValueMarshaler(u *marshalInfo) (sizer, marshaler) {
+ return func(ptr pointer, tagsize int) int {
+ t := ptr.asPointerTo(u.typ).Interface().(*uint32)
+ v := &uint32Value{*t}
+ siz := Size(v)
+ return tagsize + SizeVarint(uint64(siz)) + siz
+ }, func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) {
+ t := ptr.asPointerTo(u.typ).Interface().(*uint32)
+ v := &uint32Value{*t}
+ buf, err := Marshal(v)
+ if err != nil {
+ return nil, err
+ }
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, uint64(len(buf)))
+ b = append(b, buf...)
+ return b, nil
+ }
+}
+
+func makeStdUInt32ValuePtrMarshaler(u *marshalInfo) (sizer, marshaler) {
+ return func(ptr pointer, tagsize int) int {
+ if ptr.isNil() {
+ return 0
+ }
+ t := ptr.asPointerTo(reflect.PtrTo(u.typ)).Elem().Interface().(*uint32)
+ v := &uint32Value{*t}
+ siz := Size(v)
+ return tagsize + SizeVarint(uint64(siz)) + siz
+ }, func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) {
+ if ptr.isNil() {
+ return b, nil
+ }
+ t := ptr.asPointerTo(reflect.PtrTo(u.typ)).Elem().Interface().(*uint32)
+ v := &uint32Value{*t}
+ buf, err := Marshal(v)
+ if err != nil {
+ return nil, err
+ }
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, uint64(len(buf)))
+ b = append(b, buf...)
+ return b, nil
+ }
+}
+
+func makeStdUInt32ValueSliceMarshaler(u *marshalInfo) (sizer, marshaler) {
+ return func(ptr pointer, tagsize int) int {
+ s := ptr.getSlice(u.typ)
+ n := 0
+ for i := 0; i < s.Len(); i++ {
+ elem := s.Index(i)
+ t := elem.Interface().(uint32)
+ v := &uint32Value{t}
+ siz := Size(v)
+ n += siz + SizeVarint(uint64(siz)) + tagsize
+ }
+ return n
+ },
+ func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) {
+ s := ptr.getSlice(u.typ)
+ for i := 0; i < s.Len(); i++ {
+ elem := s.Index(i)
+ t := elem.Interface().(uint32)
+ v := &uint32Value{t}
+ siz := Size(v)
+ buf, err := Marshal(v)
+ if err != nil {
+ return nil, err
+ }
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, uint64(siz))
+ b = append(b, buf...)
+ }
+
+ return b, nil
+ }
+}
+
+func makeStdUInt32ValuePtrSliceMarshaler(u *marshalInfo) (sizer, marshaler) {
+ return func(ptr pointer, tagsize int) int {
+ s := ptr.getSlice(reflect.PtrTo(u.typ))
+ n := 0
+ for i := 0; i < s.Len(); i++ {
+ elem := s.Index(i)
+ t := elem.Interface().(*uint32)
+ v := &uint32Value{*t}
+ siz := Size(v)
+ n += siz + SizeVarint(uint64(siz)) + tagsize
+ }
+ return n
+ },
+ func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) {
+ s := ptr.getSlice(reflect.PtrTo(u.typ))
+ for i := 0; i < s.Len(); i++ {
+ elem := s.Index(i)
+ t := elem.Interface().(*uint32)
+ v := &uint32Value{*t}
+ siz := Size(v)
+ buf, err := Marshal(v)
+ if err != nil {
+ return nil, err
+ }
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, uint64(siz))
+ b = append(b, buf...)
+ }
+
+ return b, nil
+ }
+}
+
+func makeStdUInt32ValueUnmarshaler(sub *unmarshalInfo, name string) unmarshaler {
+ return func(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireBytes {
+ return nil, errInternalBadWireType
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ if x > uint64(len(b)) {
+ return nil, io.ErrUnexpectedEOF
+ }
+ m := &uint32Value{}
+ if err := Unmarshal(b[:x], m); err != nil {
+ return nil, err
+ }
+ s := f.asPointerTo(sub.typ).Elem()
+ s.Set(reflect.ValueOf(m.Value))
+ return b[x:], nil
+ }
+}
+
+func makeStdUInt32ValuePtrUnmarshaler(sub *unmarshalInfo, name string) unmarshaler {
+ return func(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireBytes {
+ return nil, errInternalBadWireType
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ if x > uint64(len(b)) {
+ return nil, io.ErrUnexpectedEOF
+ }
+ m := &uint32Value{}
+ if err := Unmarshal(b[:x], m); err != nil {
+ return nil, err
+ }
+ s := f.asPointerTo(reflect.PtrTo(sub.typ)).Elem()
+ s.Set(reflect.ValueOf(&m.Value))
+ return b[x:], nil
+ }
+}
+
+func makeStdUInt32ValuePtrSliceUnmarshaler(sub *unmarshalInfo, name string) unmarshaler {
+ return func(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireBytes {
+ return nil, errInternalBadWireType
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ if x > uint64(len(b)) {
+ return nil, io.ErrUnexpectedEOF
+ }
+ m := &uint32Value{}
+ if err := Unmarshal(b[:x], m); err != nil {
+ return nil, err
+ }
+ slice := f.getSlice(reflect.PtrTo(sub.typ))
+ newSlice := reflect.Append(slice, reflect.ValueOf(&m.Value))
+ slice.Set(newSlice)
+ return b[x:], nil
+ }
+}
+
+func makeStdUInt32ValueSliceUnmarshaler(sub *unmarshalInfo, name string) unmarshaler {
+ return func(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireBytes {
+ return nil, errInternalBadWireType
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ if x > uint64(len(b)) {
+ return nil, io.ErrUnexpectedEOF
+ }
+ m := &uint32Value{}
+ if err := Unmarshal(b[:x], m); err != nil {
+ return nil, err
+ }
+ slice := f.getSlice(sub.typ)
+ newSlice := reflect.Append(slice, reflect.ValueOf(m.Value))
+ slice.Set(newSlice)
+ return b[x:], nil
+ }
+}
+
+func makeStdBoolValueMarshaler(u *marshalInfo) (sizer, marshaler) {
+ return func(ptr pointer, tagsize int) int {
+ t := ptr.asPointerTo(u.typ).Interface().(*bool)
+ v := &boolValue{*t}
+ siz := Size(v)
+ return tagsize + SizeVarint(uint64(siz)) + siz
+ }, func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) {
+ t := ptr.asPointerTo(u.typ).Interface().(*bool)
+ v := &boolValue{*t}
+ buf, err := Marshal(v)
+ if err != nil {
+ return nil, err
+ }
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, uint64(len(buf)))
+ b = append(b, buf...)
+ return b, nil
+ }
+}
+
+func makeStdBoolValuePtrMarshaler(u *marshalInfo) (sizer, marshaler) {
+ return func(ptr pointer, tagsize int) int {
+ if ptr.isNil() {
+ return 0
+ }
+ t := ptr.asPointerTo(reflect.PtrTo(u.typ)).Elem().Interface().(*bool)
+ v := &boolValue{*t}
+ siz := Size(v)
+ return tagsize + SizeVarint(uint64(siz)) + siz
+ }, func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) {
+ if ptr.isNil() {
+ return b, nil
+ }
+ t := ptr.asPointerTo(reflect.PtrTo(u.typ)).Elem().Interface().(*bool)
+ v := &boolValue{*t}
+ buf, err := Marshal(v)
+ if err != nil {
+ return nil, err
+ }
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, uint64(len(buf)))
+ b = append(b, buf...)
+ return b, nil
+ }
+}
+
+func makeStdBoolValueSliceMarshaler(u *marshalInfo) (sizer, marshaler) {
+ return func(ptr pointer, tagsize int) int {
+ s := ptr.getSlice(u.typ)
+ n := 0
+ for i := 0; i < s.Len(); i++ {
+ elem := s.Index(i)
+ t := elem.Interface().(bool)
+ v := &boolValue{t}
+ siz := Size(v)
+ n += siz + SizeVarint(uint64(siz)) + tagsize
+ }
+ return n
+ },
+ func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) {
+ s := ptr.getSlice(u.typ)
+ for i := 0; i < s.Len(); i++ {
+ elem := s.Index(i)
+ t := elem.Interface().(bool)
+ v := &boolValue{t}
+ siz := Size(v)
+ buf, err := Marshal(v)
+ if err != nil {
+ return nil, err
+ }
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, uint64(siz))
+ b = append(b, buf...)
+ }
+
+ return b, nil
+ }
+}
+
+func makeStdBoolValuePtrSliceMarshaler(u *marshalInfo) (sizer, marshaler) {
+ return func(ptr pointer, tagsize int) int {
+ s := ptr.getSlice(reflect.PtrTo(u.typ))
+ n := 0
+ for i := 0; i < s.Len(); i++ {
+ elem := s.Index(i)
+ t := elem.Interface().(*bool)
+ v := &boolValue{*t}
+ siz := Size(v)
+ n += siz + SizeVarint(uint64(siz)) + tagsize
+ }
+ return n
+ },
+ func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) {
+ s := ptr.getSlice(reflect.PtrTo(u.typ))
+ for i := 0; i < s.Len(); i++ {
+ elem := s.Index(i)
+ t := elem.Interface().(*bool)
+ v := &boolValue{*t}
+ siz := Size(v)
+ buf, err := Marshal(v)
+ if err != nil {
+ return nil, err
+ }
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, uint64(siz))
+ b = append(b, buf...)
+ }
+
+ return b, nil
+ }
+}
+
+func makeStdBoolValueUnmarshaler(sub *unmarshalInfo, name string) unmarshaler {
+ return func(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireBytes {
+ return nil, errInternalBadWireType
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ if x > uint64(len(b)) {
+ return nil, io.ErrUnexpectedEOF
+ }
+ m := &boolValue{}
+ if err := Unmarshal(b[:x], m); err != nil {
+ return nil, err
+ }
+ s := f.asPointerTo(sub.typ).Elem()
+ s.Set(reflect.ValueOf(m.Value))
+ return b[x:], nil
+ }
+}
+
+func makeStdBoolValuePtrUnmarshaler(sub *unmarshalInfo, name string) unmarshaler {
+ return func(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireBytes {
+ return nil, errInternalBadWireType
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ if x > uint64(len(b)) {
+ return nil, io.ErrUnexpectedEOF
+ }
+ m := &boolValue{}
+ if err := Unmarshal(b[:x], m); err != nil {
+ return nil, err
+ }
+ s := f.asPointerTo(reflect.PtrTo(sub.typ)).Elem()
+ s.Set(reflect.ValueOf(&m.Value))
+ return b[x:], nil
+ }
+}
+
+func makeStdBoolValuePtrSliceUnmarshaler(sub *unmarshalInfo, name string) unmarshaler {
+ return func(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireBytes {
+ return nil, errInternalBadWireType
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ if x > uint64(len(b)) {
+ return nil, io.ErrUnexpectedEOF
+ }
+ m := &boolValue{}
+ if err := Unmarshal(b[:x], m); err != nil {
+ return nil, err
+ }
+ slice := f.getSlice(reflect.PtrTo(sub.typ))
+ newSlice := reflect.Append(slice, reflect.ValueOf(&m.Value))
+ slice.Set(newSlice)
+ return b[x:], nil
+ }
+}
+
+func makeStdBoolValueSliceUnmarshaler(sub *unmarshalInfo, name string) unmarshaler {
+ return func(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireBytes {
+ return nil, errInternalBadWireType
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ if x > uint64(len(b)) {
+ return nil, io.ErrUnexpectedEOF
+ }
+ m := &boolValue{}
+ if err := Unmarshal(b[:x], m); err != nil {
+ return nil, err
+ }
+ slice := f.getSlice(sub.typ)
+ newSlice := reflect.Append(slice, reflect.ValueOf(m.Value))
+ slice.Set(newSlice)
+ return b[x:], nil
+ }
+}
+
+func makeStdStringValueMarshaler(u *marshalInfo) (sizer, marshaler) {
+ return func(ptr pointer, tagsize int) int {
+ t := ptr.asPointerTo(u.typ).Interface().(*string)
+ v := &stringValue{*t}
+ siz := Size(v)
+ return tagsize + SizeVarint(uint64(siz)) + siz
+ }, func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) {
+ t := ptr.asPointerTo(u.typ).Interface().(*string)
+ v := &stringValue{*t}
+ buf, err := Marshal(v)
+ if err != nil {
+ return nil, err
+ }
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, uint64(len(buf)))
+ b = append(b, buf...)
+ return b, nil
+ }
+}
+
+func makeStdStringValuePtrMarshaler(u *marshalInfo) (sizer, marshaler) {
+ return func(ptr pointer, tagsize int) int {
+ if ptr.isNil() {
+ return 0
+ }
+ t := ptr.asPointerTo(reflect.PtrTo(u.typ)).Elem().Interface().(*string)
+ v := &stringValue{*t}
+ siz := Size(v)
+ return tagsize + SizeVarint(uint64(siz)) + siz
+ }, func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) {
+ if ptr.isNil() {
+ return b, nil
+ }
+ t := ptr.asPointerTo(reflect.PtrTo(u.typ)).Elem().Interface().(*string)
+ v := &stringValue{*t}
+ buf, err := Marshal(v)
+ if err != nil {
+ return nil, err
+ }
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, uint64(len(buf)))
+ b = append(b, buf...)
+ return b, nil
+ }
+}
+
+func makeStdStringValueSliceMarshaler(u *marshalInfo) (sizer, marshaler) {
+ return func(ptr pointer, tagsize int) int {
+ s := ptr.getSlice(u.typ)
+ n := 0
+ for i := 0; i < s.Len(); i++ {
+ elem := s.Index(i)
+ t := elem.Interface().(string)
+ v := &stringValue{t}
+ siz := Size(v)
+ n += siz + SizeVarint(uint64(siz)) + tagsize
+ }
+ return n
+ },
+ func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) {
+ s := ptr.getSlice(u.typ)
+ for i := 0; i < s.Len(); i++ {
+ elem := s.Index(i)
+ t := elem.Interface().(string)
+ v := &stringValue{t}
+ siz := Size(v)
+ buf, err := Marshal(v)
+ if err != nil {
+ return nil, err
+ }
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, uint64(siz))
+ b = append(b, buf...)
+ }
+
+ return b, nil
+ }
+}
+
+func makeStdStringValuePtrSliceMarshaler(u *marshalInfo) (sizer, marshaler) {
+ return func(ptr pointer, tagsize int) int {
+ s := ptr.getSlice(reflect.PtrTo(u.typ))
+ n := 0
+ for i := 0; i < s.Len(); i++ {
+ elem := s.Index(i)
+ t := elem.Interface().(*string)
+ v := &stringValue{*t}
+ siz := Size(v)
+ n += siz + SizeVarint(uint64(siz)) + tagsize
+ }
+ return n
+ },
+ func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) {
+ s := ptr.getSlice(reflect.PtrTo(u.typ))
+ for i := 0; i < s.Len(); i++ {
+ elem := s.Index(i)
+ t := elem.Interface().(*string)
+ v := &stringValue{*t}
+ siz := Size(v)
+ buf, err := Marshal(v)
+ if err != nil {
+ return nil, err
+ }
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, uint64(siz))
+ b = append(b, buf...)
+ }
+
+ return b, nil
+ }
+}
+
+func makeStdStringValueUnmarshaler(sub *unmarshalInfo, name string) unmarshaler {
+ return func(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireBytes {
+ return nil, errInternalBadWireType
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ if x > uint64(len(b)) {
+ return nil, io.ErrUnexpectedEOF
+ }
+ m := &stringValue{}
+ if err := Unmarshal(b[:x], m); err != nil {
+ return nil, err
+ }
+ s := f.asPointerTo(sub.typ).Elem()
+ s.Set(reflect.ValueOf(m.Value))
+ return b[x:], nil
+ }
+}
+
+func makeStdStringValuePtrUnmarshaler(sub *unmarshalInfo, name string) unmarshaler {
+ return func(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireBytes {
+ return nil, errInternalBadWireType
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ if x > uint64(len(b)) {
+ return nil, io.ErrUnexpectedEOF
+ }
+ m := &stringValue{}
+ if err := Unmarshal(b[:x], m); err != nil {
+ return nil, err
+ }
+ s := f.asPointerTo(reflect.PtrTo(sub.typ)).Elem()
+ s.Set(reflect.ValueOf(&m.Value))
+ return b[x:], nil
+ }
+}
+
+func makeStdStringValuePtrSliceUnmarshaler(sub *unmarshalInfo, name string) unmarshaler {
+ return func(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireBytes {
+ return nil, errInternalBadWireType
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ if x > uint64(len(b)) {
+ return nil, io.ErrUnexpectedEOF
+ }
+ m := &stringValue{}
+ if err := Unmarshal(b[:x], m); err != nil {
+ return nil, err
+ }
+ slice := f.getSlice(reflect.PtrTo(sub.typ))
+ newSlice := reflect.Append(slice, reflect.ValueOf(&m.Value))
+ slice.Set(newSlice)
+ return b[x:], nil
+ }
+}
+
+func makeStdStringValueSliceUnmarshaler(sub *unmarshalInfo, name string) unmarshaler {
+ return func(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireBytes {
+ return nil, errInternalBadWireType
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ if x > uint64(len(b)) {
+ return nil, io.ErrUnexpectedEOF
+ }
+ m := &stringValue{}
+ if err := Unmarshal(b[:x], m); err != nil {
+ return nil, err
+ }
+ slice := f.getSlice(sub.typ)
+ newSlice := reflect.Append(slice, reflect.ValueOf(m.Value))
+ slice.Set(newSlice)
+ return b[x:], nil
+ }
+}
+
+func makeStdBytesValueMarshaler(u *marshalInfo) (sizer, marshaler) {
+ return func(ptr pointer, tagsize int) int {
+ t := ptr.asPointerTo(u.typ).Interface().(*[]byte)
+ v := &bytesValue{*t}
+ siz := Size(v)
+ return tagsize + SizeVarint(uint64(siz)) + siz
+ }, func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) {
+ t := ptr.asPointerTo(u.typ).Interface().(*[]byte)
+ v := &bytesValue{*t}
+ buf, err := Marshal(v)
+ if err != nil {
+ return nil, err
+ }
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, uint64(len(buf)))
+ b = append(b, buf...)
+ return b, nil
+ }
+}
+
+func makeStdBytesValuePtrMarshaler(u *marshalInfo) (sizer, marshaler) {
+ return func(ptr pointer, tagsize int) int {
+ if ptr.isNil() {
+ return 0
+ }
+ t := ptr.asPointerTo(reflect.PtrTo(u.typ)).Elem().Interface().(*[]byte)
+ v := &bytesValue{*t}
+ siz := Size(v)
+ return tagsize + SizeVarint(uint64(siz)) + siz
+ }, func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) {
+ if ptr.isNil() {
+ return b, nil
+ }
+ t := ptr.asPointerTo(reflect.PtrTo(u.typ)).Elem().Interface().(*[]byte)
+ v := &bytesValue{*t}
+ buf, err := Marshal(v)
+ if err != nil {
+ return nil, err
+ }
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, uint64(len(buf)))
+ b = append(b, buf...)
+ return b, nil
+ }
+}
+
+func makeStdBytesValueSliceMarshaler(u *marshalInfo) (sizer, marshaler) {
+ return func(ptr pointer, tagsize int) int {
+ s := ptr.getSlice(u.typ)
+ n := 0
+ for i := 0; i < s.Len(); i++ {
+ elem := s.Index(i)
+ t := elem.Interface().([]byte)
+ v := &bytesValue{t}
+ siz := Size(v)
+ n += siz + SizeVarint(uint64(siz)) + tagsize
+ }
+ return n
+ },
+ func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) {
+ s := ptr.getSlice(u.typ)
+ for i := 0; i < s.Len(); i++ {
+ elem := s.Index(i)
+ t := elem.Interface().([]byte)
+ v := &bytesValue{t}
+ siz := Size(v)
+ buf, err := Marshal(v)
+ if err != nil {
+ return nil, err
+ }
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, uint64(siz))
+ b = append(b, buf...)
+ }
+
+ return b, nil
+ }
+}
+
+func makeStdBytesValuePtrSliceMarshaler(u *marshalInfo) (sizer, marshaler) {
+ return func(ptr pointer, tagsize int) int {
+ s := ptr.getSlice(reflect.PtrTo(u.typ))
+ n := 0
+ for i := 0; i < s.Len(); i++ {
+ elem := s.Index(i)
+ t := elem.Interface().(*[]byte)
+ v := &bytesValue{*t}
+ siz := Size(v)
+ n += siz + SizeVarint(uint64(siz)) + tagsize
+ }
+ return n
+ },
+ func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) {
+ s := ptr.getSlice(reflect.PtrTo(u.typ))
+ for i := 0; i < s.Len(); i++ {
+ elem := s.Index(i)
+ t := elem.Interface().(*[]byte)
+ v := &bytesValue{*t}
+ siz := Size(v)
+ buf, err := Marshal(v)
+ if err != nil {
+ return nil, err
+ }
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, uint64(siz))
+ b = append(b, buf...)
+ }
+
+ return b, nil
+ }
+}
+
+func makeStdBytesValueUnmarshaler(sub *unmarshalInfo, name string) unmarshaler {
+ return func(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireBytes {
+ return nil, errInternalBadWireType
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ if x > uint64(len(b)) {
+ return nil, io.ErrUnexpectedEOF
+ }
+ m := &bytesValue{}
+ if err := Unmarshal(b[:x], m); err != nil {
+ return nil, err
+ }
+ s := f.asPointerTo(sub.typ).Elem()
+ s.Set(reflect.ValueOf(m.Value))
+ return b[x:], nil
+ }
+}
+
+func makeStdBytesValuePtrUnmarshaler(sub *unmarshalInfo, name string) unmarshaler {
+ return func(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireBytes {
+ return nil, errInternalBadWireType
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ if x > uint64(len(b)) {
+ return nil, io.ErrUnexpectedEOF
+ }
+ m := &bytesValue{}
+ if err := Unmarshal(b[:x], m); err != nil {
+ return nil, err
+ }
+ s := f.asPointerTo(reflect.PtrTo(sub.typ)).Elem()
+ s.Set(reflect.ValueOf(&m.Value))
+ return b[x:], nil
+ }
+}
+
+func makeStdBytesValuePtrSliceUnmarshaler(sub *unmarshalInfo, name string) unmarshaler {
+ return func(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireBytes {
+ return nil, errInternalBadWireType
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ if x > uint64(len(b)) {
+ return nil, io.ErrUnexpectedEOF
+ }
+ m := &bytesValue{}
+ if err := Unmarshal(b[:x], m); err != nil {
+ return nil, err
+ }
+ slice := f.getSlice(reflect.PtrTo(sub.typ))
+ newSlice := reflect.Append(slice, reflect.ValueOf(&m.Value))
+ slice.Set(newSlice)
+ return b[x:], nil
+ }
+}
+
+func makeStdBytesValueSliceUnmarshaler(sub *unmarshalInfo, name string) unmarshaler {
+ return func(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireBytes {
+ return nil, errInternalBadWireType
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ if x > uint64(len(b)) {
+ return nil, io.ErrUnexpectedEOF
+ }
+ m := &bytesValue{}
+ if err := Unmarshal(b[:x], m); err != nil {
+ return nil, err
+ }
+ slice := f.getSlice(sub.typ)
+ newSlice := reflect.Append(slice, reflect.ValueOf(m.Value))
+ slice.Set(newSlice)
+ return b[x:], nil
+ }
+}
diff --git a/vendor/github.com/gogo/protobuf/proto/wrappers_gogo.go b/vendor/github.com/gogo/protobuf/proto/wrappers_gogo.go
new file mode 100644
index 000000000..c1cf7bf85
--- /dev/null
+++ b/vendor/github.com/gogo/protobuf/proto/wrappers_gogo.go
@@ -0,0 +1,113 @@
+// Protocol Buffers for Go with Gadgets
+//
+// Copyright (c) 2018, The GoGo Authors. All rights reserved.
+// http://github.com/gogo/protobuf
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package proto
+
+type float64Value struct {
+ Value float64 `protobuf:"fixed64,1,opt,name=value,proto3" json:"value,omitempty"`
+}
+
+func (m *float64Value) Reset() { *m = float64Value{} }
+func (*float64Value) ProtoMessage() {}
+func (*float64Value) String() string { return "float64" }
+
+type float32Value struct {
+ Value float32 `protobuf:"fixed32,1,opt,name=value,proto3" json:"value,omitempty"`
+}
+
+func (m *float32Value) Reset() { *m = float32Value{} }
+func (*float32Value) ProtoMessage() {}
+func (*float32Value) String() string { return "float32" }
+
+type int64Value struct {
+ Value int64 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"`
+}
+
+func (m *int64Value) Reset() { *m = int64Value{} }
+func (*int64Value) ProtoMessage() {}
+func (*int64Value) String() string { return "int64" }
+
+type uint64Value struct {
+ Value uint64 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"`
+}
+
+func (m *uint64Value) Reset() { *m = uint64Value{} }
+func (*uint64Value) ProtoMessage() {}
+func (*uint64Value) String() string { return "uint64" }
+
+type int32Value struct {
+ Value int32 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"`
+}
+
+func (m *int32Value) Reset() { *m = int32Value{} }
+func (*int32Value) ProtoMessage() {}
+func (*int32Value) String() string { return "int32" }
+
+type uint32Value struct {
+ Value uint32 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"`
+}
+
+func (m *uint32Value) Reset() { *m = uint32Value{} }
+func (*uint32Value) ProtoMessage() {}
+func (*uint32Value) String() string { return "uint32" }
+
+type boolValue struct {
+ Value bool `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"`
+}
+
+func (m *boolValue) Reset() { *m = boolValue{} }
+func (*boolValue) ProtoMessage() {}
+func (*boolValue) String() string { return "bool" }
+
+type stringValue struct {
+ Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
+}
+
+func (m *stringValue) Reset() { *m = stringValue{} }
+func (*stringValue) ProtoMessage() {}
+func (*stringValue) String() string { return "string" }
+
+type bytesValue struct {
+ Value []byte `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
+}
+
+func (m *bytesValue) Reset() { *m = bytesValue{} }
+func (*bytesValue) ProtoMessage() {}
+func (*bytesValue) String() string { return "[]byte" }
+
+func init() {
+ RegisterType((*float64Value)(nil), "gogo.protobuf.proto.DoubleValue")
+ RegisterType((*float32Value)(nil), "gogo.protobuf.proto.FloatValue")
+ RegisterType((*int64Value)(nil), "gogo.protobuf.proto.Int64Value")
+ RegisterType((*uint64Value)(nil), "gogo.protobuf.proto.UInt64Value")
+ RegisterType((*int32Value)(nil), "gogo.protobuf.proto.Int32Value")
+ RegisterType((*uint32Value)(nil), "gogo.protobuf.proto.UInt32Value")
+ RegisterType((*boolValue)(nil), "gogo.protobuf.proto.BoolValue")
+ RegisterType((*stringValue)(nil), "gogo.protobuf.proto.StringValue")
+ RegisterType((*bytesValue)(nil), "gogo.protobuf.proto.BytesValue")
+}
diff --git a/vendor/github.com/gogo/protobuf/protobuf/google/protobuf/any.proto b/vendor/github.com/gogo/protobuf/protobuf/google/protobuf/any.proto
index d9519f5cf..4cf3843bd 100644
--- a/vendor/github.com/gogo/protobuf/protobuf/google/protobuf/any.proto
+++ b/vendor/github.com/gogo/protobuf/protobuf/google/protobuf/any.proto
@@ -120,17 +120,19 @@ option objc_class_prefix = "GPB";
// }
//
message Any {
- // A URL/resource name whose content describes the type of the
- // serialized protocol buffer message.
+ // A URL/resource name that uniquely identifies the type of the serialized
+ // protocol buffer message. This string must contain at least
+ // one "/" character. The last segment of the URL's path must represent
+ // the fully qualified name of the type (as in
+ // `path/google.protobuf.Duration`). The name should be in a canonical form
+ // (e.g., leading "." is not accepted).
//
- // For URLs which use the scheme `http`, `https`, or no scheme, the
- // following restrictions and interpretations apply:
+ // In practice, teams usually precompile into the binary all types that they
+ // expect it to use in the context of Any. However, for URLs which use the
+ // scheme `http`, `https`, or no scheme, one can optionally set up a type
+ // server that maps type URLs to message definitions as follows:
//
// * If no scheme is provided, `https` is assumed.
- // * The last segment of the URL's path must represent the fully
- // qualified name of the type (as in `path/google.protobuf.Duration`).
- // The name should be in a canonical form (e.g., leading "." is
- // not accepted).
// * An HTTP GET on the URL must yield a [google.protobuf.Type][]
// value in binary format, or produce an error.
// * Applications are allowed to cache lookup results based on the
@@ -139,6 +141,10 @@ message Any {
// on changes to types. (Use versioned type names to manage
// breaking changes.)
//
+ // Note: this functionality is not currently available in the official
+ // protobuf release, and it is not used for type URLs beginning with
+ // type.googleapis.com.
+ //
// Schemes other than `http`, `https` (or the empty scheme) might be
// used with implementation specific semantics.
//
diff --git a/vendor/github.com/gogo/protobuf/protobuf/google/protobuf/api.proto b/vendor/github.com/gogo/protobuf/protobuf/google/protobuf/api.proto
new file mode 100644
index 000000000..67c1ddbd9
--- /dev/null
+++ b/vendor/github.com/gogo/protobuf/protobuf/google/protobuf/api.proto
@@ -0,0 +1,210 @@
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc. All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+syntax = "proto3";
+
+package google.protobuf;
+
+import "google/protobuf/source_context.proto";
+import "google/protobuf/type.proto";
+
+option csharp_namespace = "Google.Protobuf.WellKnownTypes";
+option java_package = "com.google.protobuf";
+option java_outer_classname = "ApiProto";
+option java_multiple_files = true;
+option objc_class_prefix = "GPB";
+option go_package = "types";
+
+// Api is a light-weight descriptor for an API Interface.
+//
+// Interfaces are also described as "protocol buffer services" in some contexts,
+// such as by the "service" keyword in a .proto file, but they are different
+// from API Services, which represent a concrete implementation of an interface
+// as opposed to simply a description of methods and bindings. They are also
+// sometimes simply referred to as "APIs" in other contexts, such as the name of
+// this message itself. See https://cloud.google.com/apis/design/glossary for
+// detailed terminology.
+message Api {
+
+ // The fully qualified name of this interface, including package name
+ // followed by the interface's simple name.
+ string name = 1;
+
+ // The methods of this interface, in unspecified order.
+ repeated Method methods = 2;
+
+ // Any metadata attached to the interface.
+ repeated Option options = 3;
+
+ // A version string for this interface. If specified, must have the form
+ // `major-version.minor-version`, as in `1.10`. If the minor version is
+ // omitted, it defaults to zero. If the entire version field is empty, the
+ // major version is derived from the package name, as outlined below. If the
+ // field is not empty, the version in the package name will be verified to be
+ // consistent with what is provided here.
+ //
+ // The versioning schema uses [semantic
+ // versioning](http://semver.org) where the major version number
+ // indicates a breaking change and the minor version an additive,
+ // non-breaking change. Both version numbers are signals to users
+ // what to expect from different versions, and should be carefully
+ // chosen based on the product plan.
+ //
+ // The major version is also reflected in the package name of the
+ // interface, which must end in `v`, as in
+ // `google.feature.v1`. For major versions 0 and 1, the suffix can
+ // be omitted. Zero major versions must only be used for
+ // experimental, non-GA interfaces.
+ //
+ //
+ string version = 4;
+
+ // Source context for the protocol buffer service represented by this
+ // message.
+ SourceContext source_context = 5;
+
+ // Included interfaces. See [Mixin][].
+ repeated Mixin mixins = 6;
+
+ // The source syntax of the service.
+ Syntax syntax = 7;
+}
+
+// Method represents a method of an API interface.
+message Method {
+
+ // The simple name of this method.
+ string name = 1;
+
+ // A URL of the input message type.
+ string request_type_url = 2;
+
+ // If true, the request is streamed.
+ bool request_streaming = 3;
+
+ // The URL of the output message type.
+ string response_type_url = 4;
+
+ // If true, the response is streamed.
+ bool response_streaming = 5;
+
+ // Any metadata attached to the method.
+ repeated Option options = 6;
+
+ // The source syntax of this method.
+ Syntax syntax = 7;
+}
+
+// Declares an API Interface to be included in this interface. The including
+// interface must redeclare all the methods from the included interface, but
+// documentation and options are inherited as follows:
+//
+// - If after comment and whitespace stripping, the documentation
+// string of the redeclared method is empty, it will be inherited
+// from the original method.
+//
+// - Each annotation belonging to the service config (http,
+// visibility) which is not set in the redeclared method will be
+// inherited.
+//
+// - If an http annotation is inherited, the path pattern will be
+// modified as follows. Any version prefix will be replaced by the
+// version of the including interface plus the [root][] path if
+// specified.
+//
+// Example of a simple mixin:
+//
+// package google.acl.v1;
+// service AccessControl {
+// // Get the underlying ACL object.
+// rpc GetAcl(GetAclRequest) returns (Acl) {
+// option (google.api.http).get = "/v1/{resource=**}:getAcl";
+// }
+// }
+//
+// package google.storage.v2;
+// service Storage {
+// rpc GetAcl(GetAclRequest) returns (Acl);
+//
+// // Get a data record.
+// rpc GetData(GetDataRequest) returns (Data) {
+// option (google.api.http).get = "/v2/{resource=**}";
+// }
+// }
+//
+// Example of a mixin configuration:
+//
+// apis:
+// - name: google.storage.v2.Storage
+// mixins:
+// - name: google.acl.v1.AccessControl
+//
+// The mixin construct implies that all methods in `AccessControl` are
+// also declared with same name and request/response types in
+// `Storage`. A documentation generator or annotation processor will
+// see the effective `Storage.GetAcl` method after inherting
+// documentation and annotations as follows:
+//
+// service Storage {
+// // Get the underlying ACL object.
+// rpc GetAcl(GetAclRequest) returns (Acl) {
+// option (google.api.http).get = "/v2/{resource=**}:getAcl";
+// }
+// ...
+// }
+//
+// Note how the version in the path pattern changed from `v1` to `v2`.
+//
+// If the `root` field in the mixin is specified, it should be a
+// relative path under which inherited HTTP paths are placed. Example:
+//
+// apis:
+// - name: google.storage.v2.Storage
+// mixins:
+// - name: google.acl.v1.AccessControl
+// root: acls
+//
+// This implies the following inherited HTTP annotation:
+//
+// service Storage {
+// // Get the underlying ACL object.
+// rpc GetAcl(GetAclRequest) returns (Acl) {
+// option (google.api.http).get = "/v2/acls/{resource=**}:getAcl";
+// }
+// ...
+// }
+message Mixin {
+ // The fully qualified name of the interface which is included.
+ string name = 1;
+
+ // If non-empty specifies a path under which inherited HTTP paths
+ // are rooted.
+ string root = 2;
+}
diff --git a/vendor/github.com/gogo/protobuf/protobuf/google/protobuf/descriptor.proto b/vendor/github.com/gogo/protobuf/protobuf/google/protobuf/descriptor.proto
index 411cd9de2..887f16ddc 100644
--- a/vendor/github.com/gogo/protobuf/protobuf/google/protobuf/descriptor.proto
+++ b/vendor/github.com/gogo/protobuf/protobuf/google/protobuf/descriptor.proto
@@ -417,10 +417,23 @@ message FileOptions {
// determining the namespace.
optional string php_namespace = 41;
- // The parser stores options it doesn't recognize here. See above.
+
+ // Use this option to change the namespace of php generated metadata classes.
+ // Default is empty. When this option is empty, the proto file name will be used
+ // for determining the namespace.
+ optional string php_metadata_namespace = 44;
+
+ // Use this option to change the package of ruby generated classes. Default
+ // is empty. When this option is not set, the package name will be used for
+ // determining the ruby package.
+ optional string ruby_package = 45;
+
+ // The parser stores options it doesn't recognize here.
+ // See the documentation for the "Options" section above.
repeated UninterpretedOption uninterpreted_option = 999;
- // Clients can define custom options in extensions of this message. See above.
+ // Clients can define custom options in extensions of this message.
+ // See the documentation for the "Options" section above.
extensions 1000 to max;
//reserved 38;
diff --git a/vendor/github.com/gogo/protobuf/protobuf/google/protobuf/field_mask.proto b/vendor/github.com/gogo/protobuf/protobuf/google/protobuf/field_mask.proto
index 994af79f0..7b77007b7 100644
--- a/vendor/github.com/gogo/protobuf/protobuf/google/protobuf/field_mask.proto
+++ b/vendor/github.com/gogo/protobuf/protobuf/google/protobuf/field_mask.proto
@@ -38,6 +38,7 @@ option java_outer_classname = "FieldMaskProto";
option java_multiple_files = true;
option objc_class_prefix = "GPB";
option go_package = "types";
+option cc_enable_arenas = true;
// `FieldMask` represents a set of symbolic field paths, for example:
//
@@ -107,57 +108,49 @@ option go_package = "types";
// describe the updated values, the API ignores the values of all
// fields not covered by the mask.
//
-// If a repeated field is specified for an update operation, the existing
-// repeated values in the target resource will be overwritten by the new values.
-// Note that a repeated field is only allowed in the last position of a `paths`
-// string.
+// If a repeated field is specified for an update operation, new values will
+// be appended to the existing repeated field in the target resource. Note that
+// a repeated field is only allowed in the last position of a `paths` string.
//
// If a sub-message is specified in the last position of the field mask for an
-// update operation, then the existing sub-message in the target resource is
-// overwritten. Given the target message:
+// update operation, then new value will be merged into the existing sub-message
+// in the target resource.
+//
+// For example, given the target message:
//
// f {
// b {
-// d : 1
-// x : 2
+// d: 1
+// x: 2
// }
-// c : 1
+// c: [1]
// }
//
// And an update message:
//
// f {
// b {
-// d : 10
+// d: 10
// }
+// c: [2]
// }
//
// then if the field mask is:
//
-// paths: "f.b"
+// paths: ["f.b", "f.c"]
//
// then the result will be:
//
// f {
// b {
-// d : 10
+// d: 10
+// x: 2
// }
-// c : 1
+// c: [1, 2]
// }
//
-// However, if the update mask was:
-//
-// paths: "f.b.d"
-//
-// then the result would be:
-//
-// f {
-// b {
-// d : 10
-// x : 2
-// }
-// c : 1
-// }
+// An implementation may provide options to override this default behavior for
+// repeated and message fields.
//
// In order to reset a field's value to the default, the field must
// be in the mask and set to the default value in the provided resource.
@@ -240,6 +233,12 @@ option go_package = "types";
//
// Note that oneof type names ("test_oneof" in this case) cannot be used in
// paths.
+//
+// ## Field Mask Verification
+//
+// The implementation of any API method which has a FieldMask type field in the
+// request should verify the included field paths, and return an
+// `INVALID_ARGUMENT` error if any path is duplicated or unmappable.
message FieldMask {
// The set of field mask paths.
repeated string paths = 1;
diff --git a/vendor/github.com/gogo/protobuf/protobuf/google/protobuf/source_context.proto b/vendor/github.com/gogo/protobuf/protobuf/google/protobuf/source_context.proto
new file mode 100644
index 000000000..8654578c7
--- /dev/null
+++ b/vendor/github.com/gogo/protobuf/protobuf/google/protobuf/source_context.proto
@@ -0,0 +1,48 @@
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc. All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+syntax = "proto3";
+
+package google.protobuf;
+
+option csharp_namespace = "Google.Protobuf.WellKnownTypes";
+option java_package = "com.google.protobuf";
+option java_outer_classname = "SourceContextProto";
+option java_multiple_files = true;
+option objc_class_prefix = "GPB";
+option go_package = "types";
+
+// `SourceContext` represents information about the source of a
+// protobuf element, like the file in which it is defined.
+message SourceContext {
+ // The path-qualified name of the .proto file that contained the associated
+ // protobuf element. For example: `"google/protobuf/source_context.proto"`.
+ string file_name = 1;
+}
diff --git a/vendor/github.com/gogo/protobuf/protobuf/google/protobuf/timestamp.proto b/vendor/github.com/gogo/protobuf/protobuf/google/protobuf/timestamp.proto
index 4ba0b97b2..18cb7c3ea 100644
--- a/vendor/github.com/gogo/protobuf/protobuf/google/protobuf/timestamp.proto
+++ b/vendor/github.com/gogo/protobuf/protobuf/google/protobuf/timestamp.proto
@@ -40,17 +40,19 @@ option java_outer_classname = "TimestampProto";
option java_multiple_files = true;
option objc_class_prefix = "GPB";
-// A Timestamp represents a point in time independent of any time zone
-// or calendar, represented as seconds and fractions of seconds at
-// nanosecond resolution in UTC Epoch time. It is encoded using the
-// Proleptic Gregorian Calendar which extends the Gregorian calendar
-// backwards to year one. It is encoded assuming all minutes are 60
-// seconds long, i.e. leap seconds are "smeared" so that no leap second
-// table is needed for interpretation. Range is from
-// 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z.
-// By restricting to that range, we ensure that we can convert to
-// and from RFC 3339 date strings.
-// See [https://www.ietf.org/rfc/rfc3339.txt](https://www.ietf.org/rfc/rfc3339.txt).
+// A Timestamp represents a point in time independent of any time zone or local
+// calendar, encoded as a count of seconds and fractions of seconds at
+// nanosecond resolution. The count is relative to an epoch at UTC midnight on
+// January 1, 1970, in the proleptic Gregorian calendar which extends the
+// Gregorian calendar backwards to year one.
+//
+// All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap
+// second table is needed for interpretation, using a [24-hour linear
+// smear](https://developers.google.com/time/smear).
+//
+// The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By
+// restricting to that range, we ensure that we can convert to and from [RFC
+// 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings.
//
// # Examples
//
@@ -103,19 +105,21 @@ option objc_class_prefix = "GPB";
// {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional
// seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution),
// are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone
-// is required, though only UTC (as indicated by "Z") is presently supported.
+// is required. A proto3 JSON serializer should always use UTC (as indicated by
+// "Z") when printing the Timestamp type and a proto3 JSON parser should be
+// able to accept both UTC and other timezones (as indicated by an offset).
//
// For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past
// 01:30 UTC on January 15, 2017.
//
// In JavaScript, one can convert a Date object to this format using the
-// standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString]
+// standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)
// method. In Python, a standard `datetime.datetime` object can be converted
// to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime)
// with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one
// can use the Joda Time's [`ISODateTimeFormat.dateTime()`](
-// http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime())
-// to obtain a formatter capable of generating timestamps in this format.
+// http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D
+// ) to obtain a formatter capable of generating timestamps in this format.
//
//
message Timestamp {
diff --git a/vendor/github.com/gogo/protobuf/protobuf/google/protobuf/type.proto b/vendor/github.com/gogo/protobuf/protobuf/google/protobuf/type.proto
new file mode 100644
index 000000000..fcd15bfd7
--- /dev/null
+++ b/vendor/github.com/gogo/protobuf/protobuf/google/protobuf/type.proto
@@ -0,0 +1,187 @@
+// Protocol Buffers - Google's data interchange format
+// Copyright 2008 Google Inc. All rights reserved.
+// https://developers.google.com/protocol-buffers/
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+syntax = "proto3";
+
+package google.protobuf;
+
+import "google/protobuf/any.proto";
+import "google/protobuf/source_context.proto";
+
+option csharp_namespace = "Google.Protobuf.WellKnownTypes";
+option cc_enable_arenas = true;
+option java_package = "com.google.protobuf";
+option java_outer_classname = "TypeProto";
+option java_multiple_files = true;
+option objc_class_prefix = "GPB";
+option go_package = "types";
+
+// A protocol buffer message type.
+message Type {
+ // The fully qualified message name.
+ string name = 1;
+ // The list of fields.
+ repeated Field fields = 2;
+ // The list of types appearing in `oneof` definitions in this type.
+ repeated string oneofs = 3;
+ // The protocol buffer options.
+ repeated Option options = 4;
+ // The source context.
+ SourceContext source_context = 5;
+ // The source syntax.
+ Syntax syntax = 6;
+}
+
+// A single field of a message type.
+message Field {
+ // Basic field types.
+ enum Kind {
+ // Field type unknown.
+ TYPE_UNKNOWN = 0;
+ // Field type double.
+ TYPE_DOUBLE = 1;
+ // Field type float.
+ TYPE_FLOAT = 2;
+ // Field type int64.
+ TYPE_INT64 = 3;
+ // Field type uint64.
+ TYPE_UINT64 = 4;
+ // Field type int32.
+ TYPE_INT32 = 5;
+ // Field type fixed64.
+ TYPE_FIXED64 = 6;
+ // Field type fixed32.
+ TYPE_FIXED32 = 7;
+ // Field type bool.
+ TYPE_BOOL = 8;
+ // Field type string.
+ TYPE_STRING = 9;
+ // Field type group. Proto2 syntax only, and deprecated.
+ TYPE_GROUP = 10;
+ // Field type message.
+ TYPE_MESSAGE = 11;
+ // Field type bytes.
+ TYPE_BYTES = 12;
+ // Field type uint32.
+ TYPE_UINT32 = 13;
+ // Field type enum.
+ TYPE_ENUM = 14;
+ // Field type sfixed32.
+ TYPE_SFIXED32 = 15;
+ // Field type sfixed64.
+ TYPE_SFIXED64 = 16;
+ // Field type sint32.
+ TYPE_SINT32 = 17;
+ // Field type sint64.
+ TYPE_SINT64 = 18;
+ };
+
+ // Whether a field is optional, required, or repeated.
+ enum Cardinality {
+ // For fields with unknown cardinality.
+ CARDINALITY_UNKNOWN = 0;
+ // For optional fields.
+ CARDINALITY_OPTIONAL = 1;
+ // For required fields. Proto2 syntax only.
+ CARDINALITY_REQUIRED = 2;
+ // For repeated fields.
+ CARDINALITY_REPEATED = 3;
+ };
+
+ // The field type.
+ Kind kind = 1;
+ // The field cardinality.
+ Cardinality cardinality = 2;
+ // The field number.
+ int32 number = 3;
+ // The field name.
+ string name = 4;
+ // The field type URL, without the scheme, for message or enumeration
+ // types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`.
+ string type_url = 6;
+ // The index of the field type in `Type.oneofs`, for message or enumeration
+ // types. The first type has index 1; zero means the type is not in the list.
+ int32 oneof_index = 7;
+ // Whether to use alternative packed wire representation.
+ bool packed = 8;
+ // The protocol buffer options.
+ repeated Option options = 9;
+ // The field JSON name.
+ string json_name = 10;
+ // The string value of the default value of this field. Proto2 syntax only.
+ string default_value = 11;
+}
+
+// Enum type definition.
+message Enum {
+ // Enum type name.
+ string name = 1;
+ // Enum value definitions.
+ repeated EnumValue enumvalue = 2;
+ // Protocol buffer options.
+ repeated Option options = 3;
+ // The source context.
+ SourceContext source_context = 4;
+ // The source syntax.
+ Syntax syntax = 5;
+}
+
+// Enum value definition.
+message EnumValue {
+ // Enum value name.
+ string name = 1;
+ // Enum value number.
+ int32 number = 2;
+ // Protocol buffer options.
+ repeated Option options = 3;
+}
+
+// A protocol buffer option, which can be attached to a message, field,
+// enumeration, etc.
+message Option {
+ // The option's name. For protobuf built-in options (options defined in
+ // descriptor.proto), this is the short name. For example, `"map_entry"`.
+ // For custom options, it should be the fully-qualified name. For example,
+ // `"google.api.http"`.
+ string name = 1;
+ // The option's value packed in an Any message. If the value is a primitive,
+ // the corresponding wrapper type defined in google/protobuf/wrappers.proto
+ // should be used. If the value is an enum, it should be stored as an int32
+ // value using the google.protobuf.Int32Value type.
+ Any value = 2;
+}
+
+// The syntax in which a protocol buffer element is defined.
+enum Syntax {
+ // Syntax `proto2`.
+ SYNTAX_PROTO2 = 0;
+ // Syntax `proto3`.
+ SYNTAX_PROTO3 = 1;
+}
diff --git a/vendor/github.com/gogo/protobuf/protobuf/google/protobuf/wrappers.proto b/vendor/github.com/gogo/protobuf/protobuf/google/protobuf/wrappers.proto
index c5632e5ca..59b76acde 100644
--- a/vendor/github.com/gogo/protobuf/protobuf/google/protobuf/wrappers.proto
+++ b/vendor/github.com/gogo/protobuf/protobuf/google/protobuf/wrappers.proto
@@ -32,6 +32,11 @@
// for embedding primitives in the `google.protobuf.Any` type and for places
// where we need to distinguish between the absence of a primitive
// typed field and its default value.
+//
+// These wrappers have no meaningful use within repeated fields as they lack
+// the ability to detect presence on individual elements.
+// These wrappers have no meaningful use within a map or a oneof since
+// individual entries of a map or fields of a oneof can already detect presence.
syntax = "proto3";
diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/descriptor/descriptor.pb.go b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/descriptor/descriptor.pb.go
index 4174cbd9f..cacfa3923 100644
--- a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/descriptor/descriptor.pb.go
+++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/descriptor/descriptor.pb.go
@@ -1,40 +1,13 @@
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: descriptor.proto
-/*
-Package descriptor is a generated protocol buffer package.
-
-It is generated from these files:
- descriptor.proto
-
-It has these top-level messages:
- FileDescriptorSet
- FileDescriptorProto
- DescriptorProto
- ExtensionRangeOptions
- FieldDescriptorProto
- OneofDescriptorProto
- EnumDescriptorProto
- EnumValueDescriptorProto
- ServiceDescriptorProto
- MethodDescriptorProto
- FileOptions
- MessageOptions
- FieldOptions
- OneofOptions
- EnumOptions
- EnumValueOptions
- ServiceOptions
- MethodOptions
- UninterpretedOption
- SourceCodeInfo
- GeneratedCodeInfo
-*/
package descriptor
-import proto "github.com/gogo/protobuf/proto"
-import fmt "fmt"
-import math "math"
+import (
+ fmt "fmt"
+ proto "github.com/gogo/protobuf/proto"
+ math "math"
+)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
@@ -101,6 +74,7 @@ var FieldDescriptorProto_Type_name = map[int32]string{
17: "TYPE_SINT32",
18: "TYPE_SINT64",
}
+
var FieldDescriptorProto_Type_value = map[string]int32{
"TYPE_DOUBLE": 1,
"TYPE_FLOAT": 2,
@@ -127,9 +101,11 @@ func (x FieldDescriptorProto_Type) Enum() *FieldDescriptorProto_Type {
*p = x
return p
}
+
func (x FieldDescriptorProto_Type) String() string {
return proto.EnumName(FieldDescriptorProto_Type_name, int32(x))
}
+
func (x *FieldDescriptorProto_Type) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(FieldDescriptorProto_Type_value, data, "FieldDescriptorProto_Type")
if err != nil {
@@ -138,8 +114,9 @@ func (x *FieldDescriptorProto_Type) UnmarshalJSON(data []byte) error {
*x = FieldDescriptorProto_Type(value)
return nil
}
+
func (FieldDescriptorProto_Type) EnumDescriptor() ([]byte, []int) {
- return fileDescriptorDescriptor, []int{4, 0}
+ return fileDescriptor_308767df5ffe18af, []int{4, 0}
}
type FieldDescriptorProto_Label int32
@@ -156,6 +133,7 @@ var FieldDescriptorProto_Label_name = map[int32]string{
2: "LABEL_REQUIRED",
3: "LABEL_REPEATED",
}
+
var FieldDescriptorProto_Label_value = map[string]int32{
"LABEL_OPTIONAL": 1,
"LABEL_REQUIRED": 2,
@@ -167,9 +145,11 @@ func (x FieldDescriptorProto_Label) Enum() *FieldDescriptorProto_Label {
*p = x
return p
}
+
func (x FieldDescriptorProto_Label) String() string {
return proto.EnumName(FieldDescriptorProto_Label_name, int32(x))
}
+
func (x *FieldDescriptorProto_Label) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(FieldDescriptorProto_Label_value, data, "FieldDescriptorProto_Label")
if err != nil {
@@ -178,8 +158,9 @@ func (x *FieldDescriptorProto_Label) UnmarshalJSON(data []byte) error {
*x = FieldDescriptorProto_Label(value)
return nil
}
+
func (FieldDescriptorProto_Label) EnumDescriptor() ([]byte, []int) {
- return fileDescriptorDescriptor, []int{4, 1}
+ return fileDescriptor_308767df5ffe18af, []int{4, 1}
}
// Generated classes can be optimized for speed or code size.
@@ -197,6 +178,7 @@ var FileOptions_OptimizeMode_name = map[int32]string{
2: "CODE_SIZE",
3: "LITE_RUNTIME",
}
+
var FileOptions_OptimizeMode_value = map[string]int32{
"SPEED": 1,
"CODE_SIZE": 2,
@@ -208,9 +190,11 @@ func (x FileOptions_OptimizeMode) Enum() *FileOptions_OptimizeMode {
*p = x
return p
}
+
func (x FileOptions_OptimizeMode) String() string {
return proto.EnumName(FileOptions_OptimizeMode_name, int32(x))
}
+
func (x *FileOptions_OptimizeMode) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(FileOptions_OptimizeMode_value, data, "FileOptions_OptimizeMode")
if err != nil {
@@ -219,8 +203,9 @@ func (x *FileOptions_OptimizeMode) UnmarshalJSON(data []byte) error {
*x = FileOptions_OptimizeMode(value)
return nil
}
+
func (FileOptions_OptimizeMode) EnumDescriptor() ([]byte, []int) {
- return fileDescriptorDescriptor, []int{10, 0}
+ return fileDescriptor_308767df5ffe18af, []int{10, 0}
}
type FieldOptions_CType int32
@@ -237,6 +222,7 @@ var FieldOptions_CType_name = map[int32]string{
1: "CORD",
2: "STRING_PIECE",
}
+
var FieldOptions_CType_value = map[string]int32{
"STRING": 0,
"CORD": 1,
@@ -248,9 +234,11 @@ func (x FieldOptions_CType) Enum() *FieldOptions_CType {
*p = x
return p
}
+
func (x FieldOptions_CType) String() string {
return proto.EnumName(FieldOptions_CType_name, int32(x))
}
+
func (x *FieldOptions_CType) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(FieldOptions_CType_value, data, "FieldOptions_CType")
if err != nil {
@@ -259,8 +247,9 @@ func (x *FieldOptions_CType) UnmarshalJSON(data []byte) error {
*x = FieldOptions_CType(value)
return nil
}
+
func (FieldOptions_CType) EnumDescriptor() ([]byte, []int) {
- return fileDescriptorDescriptor, []int{12, 0}
+ return fileDescriptor_308767df5ffe18af, []int{12, 0}
}
type FieldOptions_JSType int32
@@ -279,6 +268,7 @@ var FieldOptions_JSType_name = map[int32]string{
1: "JS_STRING",
2: "JS_NUMBER",
}
+
var FieldOptions_JSType_value = map[string]int32{
"JS_NORMAL": 0,
"JS_STRING": 1,
@@ -290,9 +280,11 @@ func (x FieldOptions_JSType) Enum() *FieldOptions_JSType {
*p = x
return p
}
+
func (x FieldOptions_JSType) String() string {
return proto.EnumName(FieldOptions_JSType_name, int32(x))
}
+
func (x *FieldOptions_JSType) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(FieldOptions_JSType_value, data, "FieldOptions_JSType")
if err != nil {
@@ -301,8 +293,9 @@ func (x *FieldOptions_JSType) UnmarshalJSON(data []byte) error {
*x = FieldOptions_JSType(value)
return nil
}
+
func (FieldOptions_JSType) EnumDescriptor() ([]byte, []int) {
- return fileDescriptorDescriptor, []int{12, 1}
+ return fileDescriptor_308767df5ffe18af, []int{12, 1}
}
// Is this method side-effect-free (or safe in HTTP parlance), or idempotent,
@@ -321,6 +314,7 @@ var MethodOptions_IdempotencyLevel_name = map[int32]string{
1: "NO_SIDE_EFFECTS",
2: "IDEMPOTENT",
}
+
var MethodOptions_IdempotencyLevel_value = map[string]int32{
"IDEMPOTENCY_UNKNOWN": 0,
"NO_SIDE_EFFECTS": 1,
@@ -332,9 +326,11 @@ func (x MethodOptions_IdempotencyLevel) Enum() *MethodOptions_IdempotencyLevel {
*p = x
return p
}
+
func (x MethodOptions_IdempotencyLevel) String() string {
return proto.EnumName(MethodOptions_IdempotencyLevel_name, int32(x))
}
+
func (x *MethodOptions_IdempotencyLevel) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(MethodOptions_IdempotencyLevel_value, data, "MethodOptions_IdempotencyLevel")
if err != nil {
@@ -343,21 +339,43 @@ func (x *MethodOptions_IdempotencyLevel) UnmarshalJSON(data []byte) error {
*x = MethodOptions_IdempotencyLevel(value)
return nil
}
+
func (MethodOptions_IdempotencyLevel) EnumDescriptor() ([]byte, []int) {
- return fileDescriptorDescriptor, []int{17, 0}
+ return fileDescriptor_308767df5ffe18af, []int{17, 0}
}
// The protocol compiler can output a FileDescriptorSet containing the .proto
// files it parses.
type FileDescriptorSet struct {
- File []*FileDescriptorProto `protobuf:"bytes,1,rep,name=file" json:"file,omitempty"`
- XXX_unrecognized []byte `json:"-"`
+ File []*FileDescriptorProto `protobuf:"bytes,1,rep,name=file" json:"file,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *FileDescriptorSet) Reset() { *m = FileDescriptorSet{} }
-func (m *FileDescriptorSet) String() string { return proto.CompactTextString(m) }
-func (*FileDescriptorSet) ProtoMessage() {}
-func (*FileDescriptorSet) Descriptor() ([]byte, []int) { return fileDescriptorDescriptor, []int{0} }
+func (m *FileDescriptorSet) Reset() { *m = FileDescriptorSet{} }
+func (m *FileDescriptorSet) String() string { return proto.CompactTextString(m) }
+func (*FileDescriptorSet) ProtoMessage() {}
+func (*FileDescriptorSet) Descriptor() ([]byte, []int) {
+ return fileDescriptor_308767df5ffe18af, []int{0}
+}
+func (m *FileDescriptorSet) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_FileDescriptorSet.Unmarshal(m, b)
+}
+func (m *FileDescriptorSet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_FileDescriptorSet.Marshal(b, m, deterministic)
+}
+func (m *FileDescriptorSet) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_FileDescriptorSet.Merge(m, src)
+}
+func (m *FileDescriptorSet) XXX_Size() int {
+ return xxx_messageInfo_FileDescriptorSet.Size(m)
+}
+func (m *FileDescriptorSet) XXX_DiscardUnknown() {
+ xxx_messageInfo_FileDescriptorSet.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_FileDescriptorSet proto.InternalMessageInfo
func (m *FileDescriptorSet) GetFile() []*FileDescriptorProto {
if m != nil {
@@ -390,14 +408,35 @@ type FileDescriptorProto struct {
SourceCodeInfo *SourceCodeInfo `protobuf:"bytes,9,opt,name=source_code_info,json=sourceCodeInfo" json:"source_code_info,omitempty"`
// The syntax of the proto file.
// The supported values are "proto2" and "proto3".
- Syntax *string `protobuf:"bytes,12,opt,name=syntax" json:"syntax,omitempty"`
- XXX_unrecognized []byte `json:"-"`
+ Syntax *string `protobuf:"bytes,12,opt,name=syntax" json:"syntax,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *FileDescriptorProto) Reset() { *m = FileDescriptorProto{} }
-func (m *FileDescriptorProto) String() string { return proto.CompactTextString(m) }
-func (*FileDescriptorProto) ProtoMessage() {}
-func (*FileDescriptorProto) Descriptor() ([]byte, []int) { return fileDescriptorDescriptor, []int{1} }
+func (m *FileDescriptorProto) Reset() { *m = FileDescriptorProto{} }
+func (m *FileDescriptorProto) String() string { return proto.CompactTextString(m) }
+func (*FileDescriptorProto) ProtoMessage() {}
+func (*FileDescriptorProto) Descriptor() ([]byte, []int) {
+ return fileDescriptor_308767df5ffe18af, []int{1}
+}
+func (m *FileDescriptorProto) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_FileDescriptorProto.Unmarshal(m, b)
+}
+func (m *FileDescriptorProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_FileDescriptorProto.Marshal(b, m, deterministic)
+}
+func (m *FileDescriptorProto) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_FileDescriptorProto.Merge(m, src)
+}
+func (m *FileDescriptorProto) XXX_Size() int {
+ return xxx_messageInfo_FileDescriptorProto.Size(m)
+}
+func (m *FileDescriptorProto) XXX_DiscardUnknown() {
+ xxx_messageInfo_FileDescriptorProto.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_FileDescriptorProto proto.InternalMessageInfo
func (m *FileDescriptorProto) GetName() string {
if m != nil && m.Name != nil {
@@ -496,14 +535,35 @@ type DescriptorProto struct {
ReservedRange []*DescriptorProto_ReservedRange `protobuf:"bytes,9,rep,name=reserved_range,json=reservedRange" json:"reserved_range,omitempty"`
// Reserved field names, which may not be used by fields in the same message.
// A given name may only be reserved once.
- ReservedName []string `protobuf:"bytes,10,rep,name=reserved_name,json=reservedName" json:"reserved_name,omitempty"`
- XXX_unrecognized []byte `json:"-"`
+ ReservedName []string `protobuf:"bytes,10,rep,name=reserved_name,json=reservedName" json:"reserved_name,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *DescriptorProto) Reset() { *m = DescriptorProto{} }
-func (m *DescriptorProto) String() string { return proto.CompactTextString(m) }
-func (*DescriptorProto) ProtoMessage() {}
-func (*DescriptorProto) Descriptor() ([]byte, []int) { return fileDescriptorDescriptor, []int{2} }
+func (m *DescriptorProto) Reset() { *m = DescriptorProto{} }
+func (m *DescriptorProto) String() string { return proto.CompactTextString(m) }
+func (*DescriptorProto) ProtoMessage() {}
+func (*DescriptorProto) Descriptor() ([]byte, []int) {
+ return fileDescriptor_308767df5ffe18af, []int{2}
+}
+func (m *DescriptorProto) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_DescriptorProto.Unmarshal(m, b)
+}
+func (m *DescriptorProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_DescriptorProto.Marshal(b, m, deterministic)
+}
+func (m *DescriptorProto) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_DescriptorProto.Merge(m, src)
+}
+func (m *DescriptorProto) XXX_Size() int {
+ return xxx_messageInfo_DescriptorProto.Size(m)
+}
+func (m *DescriptorProto) XXX_DiscardUnknown() {
+ xxx_messageInfo_DescriptorProto.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_DescriptorProto proto.InternalMessageInfo
func (m *DescriptorProto) GetName() string {
if m != nil && m.Name != nil {
@@ -576,18 +636,37 @@ func (m *DescriptorProto) GetReservedName() []string {
}
type DescriptorProto_ExtensionRange struct {
- Start *int32 `protobuf:"varint,1,opt,name=start" json:"start,omitempty"`
- End *int32 `protobuf:"varint,2,opt,name=end" json:"end,omitempty"`
- Options *ExtensionRangeOptions `protobuf:"bytes,3,opt,name=options" json:"options,omitempty"`
- XXX_unrecognized []byte `json:"-"`
+ Start *int32 `protobuf:"varint,1,opt,name=start" json:"start,omitempty"`
+ End *int32 `protobuf:"varint,2,opt,name=end" json:"end,omitempty"`
+ Options *ExtensionRangeOptions `protobuf:"bytes,3,opt,name=options" json:"options,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
func (m *DescriptorProto_ExtensionRange) Reset() { *m = DescriptorProto_ExtensionRange{} }
func (m *DescriptorProto_ExtensionRange) String() string { return proto.CompactTextString(m) }
func (*DescriptorProto_ExtensionRange) ProtoMessage() {}
func (*DescriptorProto_ExtensionRange) Descriptor() ([]byte, []int) {
- return fileDescriptorDescriptor, []int{2, 0}
+ return fileDescriptor_308767df5ffe18af, []int{2, 0}
}
+func (m *DescriptorProto_ExtensionRange) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_DescriptorProto_ExtensionRange.Unmarshal(m, b)
+}
+func (m *DescriptorProto_ExtensionRange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_DescriptorProto_ExtensionRange.Marshal(b, m, deterministic)
+}
+func (m *DescriptorProto_ExtensionRange) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_DescriptorProto_ExtensionRange.Merge(m, src)
+}
+func (m *DescriptorProto_ExtensionRange) XXX_Size() int {
+ return xxx_messageInfo_DescriptorProto_ExtensionRange.Size(m)
+}
+func (m *DescriptorProto_ExtensionRange) XXX_DiscardUnknown() {
+ xxx_messageInfo_DescriptorProto_ExtensionRange.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_DescriptorProto_ExtensionRange proto.InternalMessageInfo
func (m *DescriptorProto_ExtensionRange) GetStart() int32 {
if m != nil && m.Start != nil {
@@ -614,17 +693,36 @@ func (m *DescriptorProto_ExtensionRange) GetOptions() *ExtensionRangeOptions {
// fields or extension ranges in the same message. Reserved ranges may
// not overlap.
type DescriptorProto_ReservedRange struct {
- Start *int32 `protobuf:"varint,1,opt,name=start" json:"start,omitempty"`
- End *int32 `protobuf:"varint,2,opt,name=end" json:"end,omitempty"`
- XXX_unrecognized []byte `json:"-"`
+ Start *int32 `protobuf:"varint,1,opt,name=start" json:"start,omitempty"`
+ End *int32 `protobuf:"varint,2,opt,name=end" json:"end,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
func (m *DescriptorProto_ReservedRange) Reset() { *m = DescriptorProto_ReservedRange{} }
func (m *DescriptorProto_ReservedRange) String() string { return proto.CompactTextString(m) }
func (*DescriptorProto_ReservedRange) ProtoMessage() {}
func (*DescriptorProto_ReservedRange) Descriptor() ([]byte, []int) {
- return fileDescriptorDescriptor, []int{2, 1}
+ return fileDescriptor_308767df5ffe18af, []int{2, 1}
}
+func (m *DescriptorProto_ReservedRange) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_DescriptorProto_ReservedRange.Unmarshal(m, b)
+}
+func (m *DescriptorProto_ReservedRange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_DescriptorProto_ReservedRange.Marshal(b, m, deterministic)
+}
+func (m *DescriptorProto_ReservedRange) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_DescriptorProto_ReservedRange.Merge(m, src)
+}
+func (m *DescriptorProto_ReservedRange) XXX_Size() int {
+ return xxx_messageInfo_DescriptorProto_ReservedRange.Size(m)
+}
+func (m *DescriptorProto_ReservedRange) XXX_DiscardUnknown() {
+ xxx_messageInfo_DescriptorProto_ReservedRange.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_DescriptorProto_ReservedRange proto.InternalMessageInfo
func (m *DescriptorProto_ReservedRange) GetStart() int32 {
if m != nil && m.Start != nil {
@@ -643,14 +741,18 @@ func (m *DescriptorProto_ReservedRange) GetEnd() int32 {
type ExtensionRangeOptions struct {
// The parser stores options it doesn't recognize here. See above.
UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
proto.XXX_InternalExtensions `json:"-"`
XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *ExtensionRangeOptions) Reset() { *m = ExtensionRangeOptions{} }
-func (m *ExtensionRangeOptions) String() string { return proto.CompactTextString(m) }
-func (*ExtensionRangeOptions) ProtoMessage() {}
-func (*ExtensionRangeOptions) Descriptor() ([]byte, []int) { return fileDescriptorDescriptor, []int{3} }
+func (m *ExtensionRangeOptions) Reset() { *m = ExtensionRangeOptions{} }
+func (m *ExtensionRangeOptions) String() string { return proto.CompactTextString(m) }
+func (*ExtensionRangeOptions) ProtoMessage() {}
+func (*ExtensionRangeOptions) Descriptor() ([]byte, []int) {
+ return fileDescriptor_308767df5ffe18af, []int{3}
+}
var extRange_ExtensionRangeOptions = []proto.ExtensionRange{
{Start: 1000, End: 536870911},
@@ -660,6 +762,24 @@ func (*ExtensionRangeOptions) ExtensionRangeArray() []proto.ExtensionRange {
return extRange_ExtensionRangeOptions
}
+func (m *ExtensionRangeOptions) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_ExtensionRangeOptions.Unmarshal(m, b)
+}
+func (m *ExtensionRangeOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_ExtensionRangeOptions.Marshal(b, m, deterministic)
+}
+func (m *ExtensionRangeOptions) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_ExtensionRangeOptions.Merge(m, src)
+}
+func (m *ExtensionRangeOptions) XXX_Size() int {
+ return xxx_messageInfo_ExtensionRangeOptions.Size(m)
+}
+func (m *ExtensionRangeOptions) XXX_DiscardUnknown() {
+ xxx_messageInfo_ExtensionRangeOptions.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_ExtensionRangeOptions proto.InternalMessageInfo
+
func (m *ExtensionRangeOptions) GetUninterpretedOption() []*UninterpretedOption {
if m != nil {
return m.UninterpretedOption
@@ -697,15 +817,36 @@ type FieldDescriptorProto struct {
// user has set a "json_name" option on this field, that option's value
// will be used. Otherwise, it's deduced from the field's name by converting
// it to camelCase.
- JsonName *string `protobuf:"bytes,10,opt,name=json_name,json=jsonName" json:"json_name,omitempty"`
- Options *FieldOptions `protobuf:"bytes,8,opt,name=options" json:"options,omitempty"`
- XXX_unrecognized []byte `json:"-"`
+ JsonName *string `protobuf:"bytes,10,opt,name=json_name,json=jsonName" json:"json_name,omitempty"`
+ Options *FieldOptions `protobuf:"bytes,8,opt,name=options" json:"options,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *FieldDescriptorProto) Reset() { *m = FieldDescriptorProto{} }
-func (m *FieldDescriptorProto) String() string { return proto.CompactTextString(m) }
-func (*FieldDescriptorProto) ProtoMessage() {}
-func (*FieldDescriptorProto) Descriptor() ([]byte, []int) { return fileDescriptorDescriptor, []int{4} }
+func (m *FieldDescriptorProto) Reset() { *m = FieldDescriptorProto{} }
+func (m *FieldDescriptorProto) String() string { return proto.CompactTextString(m) }
+func (*FieldDescriptorProto) ProtoMessage() {}
+func (*FieldDescriptorProto) Descriptor() ([]byte, []int) {
+ return fileDescriptor_308767df5ffe18af, []int{4}
+}
+func (m *FieldDescriptorProto) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_FieldDescriptorProto.Unmarshal(m, b)
+}
+func (m *FieldDescriptorProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_FieldDescriptorProto.Marshal(b, m, deterministic)
+}
+func (m *FieldDescriptorProto) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_FieldDescriptorProto.Merge(m, src)
+}
+func (m *FieldDescriptorProto) XXX_Size() int {
+ return xxx_messageInfo_FieldDescriptorProto.Size(m)
+}
+func (m *FieldDescriptorProto) XXX_DiscardUnknown() {
+ xxx_messageInfo_FieldDescriptorProto.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_FieldDescriptorProto proto.InternalMessageInfo
func (m *FieldDescriptorProto) GetName() string {
if m != nil && m.Name != nil {
@@ -779,15 +920,36 @@ func (m *FieldDescriptorProto) GetOptions() *FieldOptions {
// Describes a oneof.
type OneofDescriptorProto struct {
- Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
- Options *OneofOptions `protobuf:"bytes,2,opt,name=options" json:"options,omitempty"`
- XXX_unrecognized []byte `json:"-"`
+ Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
+ Options *OneofOptions `protobuf:"bytes,2,opt,name=options" json:"options,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *OneofDescriptorProto) Reset() { *m = OneofDescriptorProto{} }
-func (m *OneofDescriptorProto) String() string { return proto.CompactTextString(m) }
-func (*OneofDescriptorProto) ProtoMessage() {}
-func (*OneofDescriptorProto) Descriptor() ([]byte, []int) { return fileDescriptorDescriptor, []int{5} }
+func (m *OneofDescriptorProto) Reset() { *m = OneofDescriptorProto{} }
+func (m *OneofDescriptorProto) String() string { return proto.CompactTextString(m) }
+func (*OneofDescriptorProto) ProtoMessage() {}
+func (*OneofDescriptorProto) Descriptor() ([]byte, []int) {
+ return fileDescriptor_308767df5ffe18af, []int{5}
+}
+func (m *OneofDescriptorProto) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_OneofDescriptorProto.Unmarshal(m, b)
+}
+func (m *OneofDescriptorProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_OneofDescriptorProto.Marshal(b, m, deterministic)
+}
+func (m *OneofDescriptorProto) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_OneofDescriptorProto.Merge(m, src)
+}
+func (m *OneofDescriptorProto) XXX_Size() int {
+ return xxx_messageInfo_OneofDescriptorProto.Size(m)
+}
+func (m *OneofDescriptorProto) XXX_DiscardUnknown() {
+ xxx_messageInfo_OneofDescriptorProto.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OneofDescriptorProto proto.InternalMessageInfo
func (m *OneofDescriptorProto) GetName() string {
if m != nil && m.Name != nil {
@@ -814,14 +976,35 @@ type EnumDescriptorProto struct {
ReservedRange []*EnumDescriptorProto_EnumReservedRange `protobuf:"bytes,4,rep,name=reserved_range,json=reservedRange" json:"reserved_range,omitempty"`
// Reserved enum value names, which may not be reused. A given name may only
// be reserved once.
- ReservedName []string `protobuf:"bytes,5,rep,name=reserved_name,json=reservedName" json:"reserved_name,omitempty"`
- XXX_unrecognized []byte `json:"-"`
+ ReservedName []string `protobuf:"bytes,5,rep,name=reserved_name,json=reservedName" json:"reserved_name,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *EnumDescriptorProto) Reset() { *m = EnumDescriptorProto{} }
-func (m *EnumDescriptorProto) String() string { return proto.CompactTextString(m) }
-func (*EnumDescriptorProto) ProtoMessage() {}
-func (*EnumDescriptorProto) Descriptor() ([]byte, []int) { return fileDescriptorDescriptor, []int{6} }
+func (m *EnumDescriptorProto) Reset() { *m = EnumDescriptorProto{} }
+func (m *EnumDescriptorProto) String() string { return proto.CompactTextString(m) }
+func (*EnumDescriptorProto) ProtoMessage() {}
+func (*EnumDescriptorProto) Descriptor() ([]byte, []int) {
+ return fileDescriptor_308767df5ffe18af, []int{6}
+}
+func (m *EnumDescriptorProto) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_EnumDescriptorProto.Unmarshal(m, b)
+}
+func (m *EnumDescriptorProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_EnumDescriptorProto.Marshal(b, m, deterministic)
+}
+func (m *EnumDescriptorProto) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_EnumDescriptorProto.Merge(m, src)
+}
+func (m *EnumDescriptorProto) XXX_Size() int {
+ return xxx_messageInfo_EnumDescriptorProto.Size(m)
+}
+func (m *EnumDescriptorProto) XXX_DiscardUnknown() {
+ xxx_messageInfo_EnumDescriptorProto.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_EnumDescriptorProto proto.InternalMessageInfo
func (m *EnumDescriptorProto) GetName() string {
if m != nil && m.Name != nil {
@@ -865,17 +1048,36 @@ func (m *EnumDescriptorProto) GetReservedName() []string {
// is inclusive such that it can appropriately represent the entire int32
// domain.
type EnumDescriptorProto_EnumReservedRange struct {
- Start *int32 `protobuf:"varint,1,opt,name=start" json:"start,omitempty"`
- End *int32 `protobuf:"varint,2,opt,name=end" json:"end,omitempty"`
- XXX_unrecognized []byte `json:"-"`
+ Start *int32 `protobuf:"varint,1,opt,name=start" json:"start,omitempty"`
+ End *int32 `protobuf:"varint,2,opt,name=end" json:"end,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
func (m *EnumDescriptorProto_EnumReservedRange) Reset() { *m = EnumDescriptorProto_EnumReservedRange{} }
func (m *EnumDescriptorProto_EnumReservedRange) String() string { return proto.CompactTextString(m) }
func (*EnumDescriptorProto_EnumReservedRange) ProtoMessage() {}
func (*EnumDescriptorProto_EnumReservedRange) Descriptor() ([]byte, []int) {
- return fileDescriptorDescriptor, []int{6, 0}
+ return fileDescriptor_308767df5ffe18af, []int{6, 0}
}
+func (m *EnumDescriptorProto_EnumReservedRange) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_EnumDescriptorProto_EnumReservedRange.Unmarshal(m, b)
+}
+func (m *EnumDescriptorProto_EnumReservedRange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_EnumDescriptorProto_EnumReservedRange.Marshal(b, m, deterministic)
+}
+func (m *EnumDescriptorProto_EnumReservedRange) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_EnumDescriptorProto_EnumReservedRange.Merge(m, src)
+}
+func (m *EnumDescriptorProto_EnumReservedRange) XXX_Size() int {
+ return xxx_messageInfo_EnumDescriptorProto_EnumReservedRange.Size(m)
+}
+func (m *EnumDescriptorProto_EnumReservedRange) XXX_DiscardUnknown() {
+ xxx_messageInfo_EnumDescriptorProto_EnumReservedRange.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_EnumDescriptorProto_EnumReservedRange proto.InternalMessageInfo
func (m *EnumDescriptorProto_EnumReservedRange) GetStart() int32 {
if m != nil && m.Start != nil {
@@ -893,18 +1095,37 @@ func (m *EnumDescriptorProto_EnumReservedRange) GetEnd() int32 {
// Describes a value within an enum.
type EnumValueDescriptorProto struct {
- Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
- Number *int32 `protobuf:"varint,2,opt,name=number" json:"number,omitempty"`
- Options *EnumValueOptions `protobuf:"bytes,3,opt,name=options" json:"options,omitempty"`
- XXX_unrecognized []byte `json:"-"`
+ Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
+ Number *int32 `protobuf:"varint,2,opt,name=number" json:"number,omitempty"`
+ Options *EnumValueOptions `protobuf:"bytes,3,opt,name=options" json:"options,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
func (m *EnumValueDescriptorProto) Reset() { *m = EnumValueDescriptorProto{} }
func (m *EnumValueDescriptorProto) String() string { return proto.CompactTextString(m) }
func (*EnumValueDescriptorProto) ProtoMessage() {}
func (*EnumValueDescriptorProto) Descriptor() ([]byte, []int) {
- return fileDescriptorDescriptor, []int{7}
+ return fileDescriptor_308767df5ffe18af, []int{7}
}
+func (m *EnumValueDescriptorProto) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_EnumValueDescriptorProto.Unmarshal(m, b)
+}
+func (m *EnumValueDescriptorProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_EnumValueDescriptorProto.Marshal(b, m, deterministic)
+}
+func (m *EnumValueDescriptorProto) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_EnumValueDescriptorProto.Merge(m, src)
+}
+func (m *EnumValueDescriptorProto) XXX_Size() int {
+ return xxx_messageInfo_EnumValueDescriptorProto.Size(m)
+}
+func (m *EnumValueDescriptorProto) XXX_DiscardUnknown() {
+ xxx_messageInfo_EnumValueDescriptorProto.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_EnumValueDescriptorProto proto.InternalMessageInfo
func (m *EnumValueDescriptorProto) GetName() string {
if m != nil && m.Name != nil {
@@ -929,16 +1150,37 @@ func (m *EnumValueDescriptorProto) GetOptions() *EnumValueOptions {
// Describes a service.
type ServiceDescriptorProto struct {
- Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
- Method []*MethodDescriptorProto `protobuf:"bytes,2,rep,name=method" json:"method,omitempty"`
- Options *ServiceOptions `protobuf:"bytes,3,opt,name=options" json:"options,omitempty"`
- XXX_unrecognized []byte `json:"-"`
+ Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
+ Method []*MethodDescriptorProto `protobuf:"bytes,2,rep,name=method" json:"method,omitempty"`
+ Options *ServiceOptions `protobuf:"bytes,3,opt,name=options" json:"options,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *ServiceDescriptorProto) Reset() { *m = ServiceDescriptorProto{} }
-func (m *ServiceDescriptorProto) String() string { return proto.CompactTextString(m) }
-func (*ServiceDescriptorProto) ProtoMessage() {}
-func (*ServiceDescriptorProto) Descriptor() ([]byte, []int) { return fileDescriptorDescriptor, []int{8} }
+func (m *ServiceDescriptorProto) Reset() { *m = ServiceDescriptorProto{} }
+func (m *ServiceDescriptorProto) String() string { return proto.CompactTextString(m) }
+func (*ServiceDescriptorProto) ProtoMessage() {}
+func (*ServiceDescriptorProto) Descriptor() ([]byte, []int) {
+ return fileDescriptor_308767df5ffe18af, []int{8}
+}
+func (m *ServiceDescriptorProto) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_ServiceDescriptorProto.Unmarshal(m, b)
+}
+func (m *ServiceDescriptorProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_ServiceDescriptorProto.Marshal(b, m, deterministic)
+}
+func (m *ServiceDescriptorProto) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_ServiceDescriptorProto.Merge(m, src)
+}
+func (m *ServiceDescriptorProto) XXX_Size() int {
+ return xxx_messageInfo_ServiceDescriptorProto.Size(m)
+}
+func (m *ServiceDescriptorProto) XXX_DiscardUnknown() {
+ xxx_messageInfo_ServiceDescriptorProto.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_ServiceDescriptorProto proto.InternalMessageInfo
func (m *ServiceDescriptorProto) GetName() string {
if m != nil && m.Name != nil {
@@ -972,14 +1214,35 @@ type MethodDescriptorProto struct {
// Identifies if client streams multiple client messages
ClientStreaming *bool `protobuf:"varint,5,opt,name=client_streaming,json=clientStreaming,def=0" json:"client_streaming,omitempty"`
// Identifies if server streams multiple server messages
- ServerStreaming *bool `protobuf:"varint,6,opt,name=server_streaming,json=serverStreaming,def=0" json:"server_streaming,omitempty"`
- XXX_unrecognized []byte `json:"-"`
+ ServerStreaming *bool `protobuf:"varint,6,opt,name=server_streaming,json=serverStreaming,def=0" json:"server_streaming,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *MethodDescriptorProto) Reset() { *m = MethodDescriptorProto{} }
-func (m *MethodDescriptorProto) String() string { return proto.CompactTextString(m) }
-func (*MethodDescriptorProto) ProtoMessage() {}
-func (*MethodDescriptorProto) Descriptor() ([]byte, []int) { return fileDescriptorDescriptor, []int{9} }
+func (m *MethodDescriptorProto) Reset() { *m = MethodDescriptorProto{} }
+func (m *MethodDescriptorProto) String() string { return proto.CompactTextString(m) }
+func (*MethodDescriptorProto) ProtoMessage() {}
+func (*MethodDescriptorProto) Descriptor() ([]byte, []int) {
+ return fileDescriptor_308767df5ffe18af, []int{9}
+}
+func (m *MethodDescriptorProto) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_MethodDescriptorProto.Unmarshal(m, b)
+}
+func (m *MethodDescriptorProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_MethodDescriptorProto.Marshal(b, m, deterministic)
+}
+func (m *MethodDescriptorProto) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_MethodDescriptorProto.Merge(m, src)
+}
+func (m *MethodDescriptorProto) XXX_Size() int {
+ return xxx_messageInfo_MethodDescriptorProto.Size(m)
+}
+func (m *MethodDescriptorProto) XXX_DiscardUnknown() {
+ xxx_messageInfo_MethodDescriptorProto.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_MethodDescriptorProto proto.InternalMessageInfo
const Default_MethodDescriptorProto_ClientStreaming bool = false
const Default_MethodDescriptorProto_ServerStreaming bool = false
@@ -1046,7 +1309,7 @@ type FileOptions struct {
// top-level extensions defined in the file.
JavaMultipleFiles *bool `protobuf:"varint,10,opt,name=java_multiple_files,json=javaMultipleFiles,def=0" json:"java_multiple_files,omitempty"`
// This option does nothing.
- JavaGenerateEqualsAndHash *bool `protobuf:"varint,20,opt,name=java_generate_equals_and_hash,json=javaGenerateEqualsAndHash" json:"java_generate_equals_and_hash,omitempty"`
+ JavaGenerateEqualsAndHash *bool `protobuf:"varint,20,opt,name=java_generate_equals_and_hash,json=javaGenerateEqualsAndHash" json:"java_generate_equals_and_hash,omitempty"` // Deprecated: Do not use.
// If set true, then the Java2 code generator will generate code that
// throws an exception whenever an attempt is made to assign a non-UTF-8
// byte sequence to a string field.
@@ -1100,16 +1363,29 @@ type FileOptions struct {
// is empty. When this option is empty, the package name will be used for
// determining the namespace.
PhpNamespace *string `protobuf:"bytes,41,opt,name=php_namespace,json=phpNamespace" json:"php_namespace,omitempty"`
- // The parser stores options it doesn't recognize here. See above.
+ // Use this option to change the namespace of php generated metadata classes.
+ // Default is empty. When this option is empty, the proto file name will be used
+ // for determining the namespace.
+ PhpMetadataNamespace *string `protobuf:"bytes,44,opt,name=php_metadata_namespace,json=phpMetadataNamespace" json:"php_metadata_namespace,omitempty"`
+ // Use this option to change the package of ruby generated classes. Default
+ // is empty. When this option is not set, the package name will be used for
+ // determining the ruby package.
+ RubyPackage *string `protobuf:"bytes,45,opt,name=ruby_package,json=rubyPackage" json:"ruby_package,omitempty"`
+ // The parser stores options it doesn't recognize here.
+ // See the documentation for the "Options" section above.
UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
proto.XXX_InternalExtensions `json:"-"`
XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *FileOptions) Reset() { *m = FileOptions{} }
-func (m *FileOptions) String() string { return proto.CompactTextString(m) }
-func (*FileOptions) ProtoMessage() {}
-func (*FileOptions) Descriptor() ([]byte, []int) { return fileDescriptorDescriptor, []int{10} }
+func (m *FileOptions) Reset() { *m = FileOptions{} }
+func (m *FileOptions) String() string { return proto.CompactTextString(m) }
+func (*FileOptions) ProtoMessage() {}
+func (*FileOptions) Descriptor() ([]byte, []int) {
+ return fileDescriptor_308767df5ffe18af, []int{10}
+}
var extRange_FileOptions = []proto.ExtensionRange{
{Start: 1000, End: 536870911},
@@ -1119,6 +1395,24 @@ func (*FileOptions) ExtensionRangeArray() []proto.ExtensionRange {
return extRange_FileOptions
}
+func (m *FileOptions) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_FileOptions.Unmarshal(m, b)
+}
+func (m *FileOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_FileOptions.Marshal(b, m, deterministic)
+}
+func (m *FileOptions) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_FileOptions.Merge(m, src)
+}
+func (m *FileOptions) XXX_Size() int {
+ return xxx_messageInfo_FileOptions.Size(m)
+}
+func (m *FileOptions) XXX_DiscardUnknown() {
+ xxx_messageInfo_FileOptions.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_FileOptions proto.InternalMessageInfo
+
const Default_FileOptions_JavaMultipleFiles bool = false
const Default_FileOptions_JavaStringCheckUtf8 bool = false
const Default_FileOptions_OptimizeFor FileOptions_OptimizeMode = FileOptions_SPEED
@@ -1150,6 +1444,7 @@ func (m *FileOptions) GetJavaMultipleFiles() bool {
return Default_FileOptions_JavaMultipleFiles
}
+// Deprecated: Do not use.
func (m *FileOptions) GetJavaGenerateEqualsAndHash() bool {
if m != nil && m.JavaGenerateEqualsAndHash != nil {
return *m.JavaGenerateEqualsAndHash
@@ -1255,6 +1550,20 @@ func (m *FileOptions) GetPhpNamespace() string {
return ""
}
+func (m *FileOptions) GetPhpMetadataNamespace() string {
+ if m != nil && m.PhpMetadataNamespace != nil {
+ return *m.PhpMetadataNamespace
+ }
+ return ""
+}
+
+func (m *FileOptions) GetRubyPackage() string {
+ if m != nil && m.RubyPackage != nil {
+ return *m.RubyPackage
+ }
+ return ""
+}
+
func (m *FileOptions) GetUninterpretedOption() []*UninterpretedOption {
if m != nil {
return m.UninterpretedOption
@@ -1315,14 +1624,18 @@ type MessageOptions struct {
MapEntry *bool `protobuf:"varint,7,opt,name=map_entry,json=mapEntry" json:"map_entry,omitempty"`
// The parser stores options it doesn't recognize here. See above.
UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
proto.XXX_InternalExtensions `json:"-"`
XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *MessageOptions) Reset() { *m = MessageOptions{} }
-func (m *MessageOptions) String() string { return proto.CompactTextString(m) }
-func (*MessageOptions) ProtoMessage() {}
-func (*MessageOptions) Descriptor() ([]byte, []int) { return fileDescriptorDescriptor, []int{11} }
+func (m *MessageOptions) Reset() { *m = MessageOptions{} }
+func (m *MessageOptions) String() string { return proto.CompactTextString(m) }
+func (*MessageOptions) ProtoMessage() {}
+func (*MessageOptions) Descriptor() ([]byte, []int) {
+ return fileDescriptor_308767df5ffe18af, []int{11}
+}
var extRange_MessageOptions = []proto.ExtensionRange{
{Start: 1000, End: 536870911},
@@ -1332,6 +1645,24 @@ func (*MessageOptions) ExtensionRangeArray() []proto.ExtensionRange {
return extRange_MessageOptions
}
+func (m *MessageOptions) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_MessageOptions.Unmarshal(m, b)
+}
+func (m *MessageOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_MessageOptions.Marshal(b, m, deterministic)
+}
+func (m *MessageOptions) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_MessageOptions.Merge(m, src)
+}
+func (m *MessageOptions) XXX_Size() int {
+ return xxx_messageInfo_MessageOptions.Size(m)
+}
+func (m *MessageOptions) XXX_DiscardUnknown() {
+ xxx_messageInfo_MessageOptions.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_MessageOptions proto.InternalMessageInfo
+
const Default_MessageOptions_MessageSetWireFormat bool = false
const Default_MessageOptions_NoStandardDescriptorAccessor bool = false
const Default_MessageOptions_Deprecated bool = false
@@ -1433,14 +1764,18 @@ type FieldOptions struct {
Weak *bool `protobuf:"varint,10,opt,name=weak,def=0" json:"weak,omitempty"`
// The parser stores options it doesn't recognize here. See above.
UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
proto.XXX_InternalExtensions `json:"-"`
XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *FieldOptions) Reset() { *m = FieldOptions{} }
-func (m *FieldOptions) String() string { return proto.CompactTextString(m) }
-func (*FieldOptions) ProtoMessage() {}
-func (*FieldOptions) Descriptor() ([]byte, []int) { return fileDescriptorDescriptor, []int{12} }
+func (m *FieldOptions) Reset() { *m = FieldOptions{} }
+func (m *FieldOptions) String() string { return proto.CompactTextString(m) }
+func (*FieldOptions) ProtoMessage() {}
+func (*FieldOptions) Descriptor() ([]byte, []int) {
+ return fileDescriptor_308767df5ffe18af, []int{12}
+}
var extRange_FieldOptions = []proto.ExtensionRange{
{Start: 1000, End: 536870911},
@@ -1450,6 +1785,24 @@ func (*FieldOptions) ExtensionRangeArray() []proto.ExtensionRange {
return extRange_FieldOptions
}
+func (m *FieldOptions) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_FieldOptions.Unmarshal(m, b)
+}
+func (m *FieldOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_FieldOptions.Marshal(b, m, deterministic)
+}
+func (m *FieldOptions) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_FieldOptions.Merge(m, src)
+}
+func (m *FieldOptions) XXX_Size() int {
+ return xxx_messageInfo_FieldOptions.Size(m)
+}
+func (m *FieldOptions) XXX_DiscardUnknown() {
+ xxx_messageInfo_FieldOptions.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_FieldOptions proto.InternalMessageInfo
+
const Default_FieldOptions_Ctype FieldOptions_CType = FieldOptions_STRING
const Default_FieldOptions_Jstype FieldOptions_JSType = FieldOptions_JS_NORMAL
const Default_FieldOptions_Lazy bool = false
@@ -1508,14 +1861,18 @@ func (m *FieldOptions) GetUninterpretedOption() []*UninterpretedOption {
type OneofOptions struct {
// The parser stores options it doesn't recognize here. See above.
UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
proto.XXX_InternalExtensions `json:"-"`
XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *OneofOptions) Reset() { *m = OneofOptions{} }
-func (m *OneofOptions) String() string { return proto.CompactTextString(m) }
-func (*OneofOptions) ProtoMessage() {}
-func (*OneofOptions) Descriptor() ([]byte, []int) { return fileDescriptorDescriptor, []int{13} }
+func (m *OneofOptions) Reset() { *m = OneofOptions{} }
+func (m *OneofOptions) String() string { return proto.CompactTextString(m) }
+func (*OneofOptions) ProtoMessage() {}
+func (*OneofOptions) Descriptor() ([]byte, []int) {
+ return fileDescriptor_308767df5ffe18af, []int{13}
+}
var extRange_OneofOptions = []proto.ExtensionRange{
{Start: 1000, End: 536870911},
@@ -1525,6 +1882,24 @@ func (*OneofOptions) ExtensionRangeArray() []proto.ExtensionRange {
return extRange_OneofOptions
}
+func (m *OneofOptions) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_OneofOptions.Unmarshal(m, b)
+}
+func (m *OneofOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_OneofOptions.Marshal(b, m, deterministic)
+}
+func (m *OneofOptions) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_OneofOptions.Merge(m, src)
+}
+func (m *OneofOptions) XXX_Size() int {
+ return xxx_messageInfo_OneofOptions.Size(m)
+}
+func (m *OneofOptions) XXX_DiscardUnknown() {
+ xxx_messageInfo_OneofOptions.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_OneofOptions proto.InternalMessageInfo
+
func (m *OneofOptions) GetUninterpretedOption() []*UninterpretedOption {
if m != nil {
return m.UninterpretedOption
@@ -1543,14 +1918,18 @@ type EnumOptions struct {
Deprecated *bool `protobuf:"varint,3,opt,name=deprecated,def=0" json:"deprecated,omitempty"`
// The parser stores options it doesn't recognize here. See above.
UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
proto.XXX_InternalExtensions `json:"-"`
XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *EnumOptions) Reset() { *m = EnumOptions{} }
-func (m *EnumOptions) String() string { return proto.CompactTextString(m) }
-func (*EnumOptions) ProtoMessage() {}
-func (*EnumOptions) Descriptor() ([]byte, []int) { return fileDescriptorDescriptor, []int{14} }
+func (m *EnumOptions) Reset() { *m = EnumOptions{} }
+func (m *EnumOptions) String() string { return proto.CompactTextString(m) }
+func (*EnumOptions) ProtoMessage() {}
+func (*EnumOptions) Descriptor() ([]byte, []int) {
+ return fileDescriptor_308767df5ffe18af, []int{14}
+}
var extRange_EnumOptions = []proto.ExtensionRange{
{Start: 1000, End: 536870911},
@@ -1560,6 +1939,24 @@ func (*EnumOptions) ExtensionRangeArray() []proto.ExtensionRange {
return extRange_EnumOptions
}
+func (m *EnumOptions) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_EnumOptions.Unmarshal(m, b)
+}
+func (m *EnumOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_EnumOptions.Marshal(b, m, deterministic)
+}
+func (m *EnumOptions) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_EnumOptions.Merge(m, src)
+}
+func (m *EnumOptions) XXX_Size() int {
+ return xxx_messageInfo_EnumOptions.Size(m)
+}
+func (m *EnumOptions) XXX_DiscardUnknown() {
+ xxx_messageInfo_EnumOptions.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_EnumOptions proto.InternalMessageInfo
+
const Default_EnumOptions_Deprecated bool = false
func (m *EnumOptions) GetAllowAlias() bool {
@@ -1591,14 +1988,18 @@ type EnumValueOptions struct {
Deprecated *bool `protobuf:"varint,1,opt,name=deprecated,def=0" json:"deprecated,omitempty"`
// The parser stores options it doesn't recognize here. See above.
UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
proto.XXX_InternalExtensions `json:"-"`
XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *EnumValueOptions) Reset() { *m = EnumValueOptions{} }
-func (m *EnumValueOptions) String() string { return proto.CompactTextString(m) }
-func (*EnumValueOptions) ProtoMessage() {}
-func (*EnumValueOptions) Descriptor() ([]byte, []int) { return fileDescriptorDescriptor, []int{15} }
+func (m *EnumValueOptions) Reset() { *m = EnumValueOptions{} }
+func (m *EnumValueOptions) String() string { return proto.CompactTextString(m) }
+func (*EnumValueOptions) ProtoMessage() {}
+func (*EnumValueOptions) Descriptor() ([]byte, []int) {
+ return fileDescriptor_308767df5ffe18af, []int{15}
+}
var extRange_EnumValueOptions = []proto.ExtensionRange{
{Start: 1000, End: 536870911},
@@ -1608,6 +2009,24 @@ func (*EnumValueOptions) ExtensionRangeArray() []proto.ExtensionRange {
return extRange_EnumValueOptions
}
+func (m *EnumValueOptions) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_EnumValueOptions.Unmarshal(m, b)
+}
+func (m *EnumValueOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_EnumValueOptions.Marshal(b, m, deterministic)
+}
+func (m *EnumValueOptions) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_EnumValueOptions.Merge(m, src)
+}
+func (m *EnumValueOptions) XXX_Size() int {
+ return xxx_messageInfo_EnumValueOptions.Size(m)
+}
+func (m *EnumValueOptions) XXX_DiscardUnknown() {
+ xxx_messageInfo_EnumValueOptions.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_EnumValueOptions proto.InternalMessageInfo
+
const Default_EnumValueOptions_Deprecated bool = false
func (m *EnumValueOptions) GetDeprecated() bool {
@@ -1632,14 +2051,18 @@ type ServiceOptions struct {
Deprecated *bool `protobuf:"varint,33,opt,name=deprecated,def=0" json:"deprecated,omitempty"`
// The parser stores options it doesn't recognize here. See above.
UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
proto.XXX_InternalExtensions `json:"-"`
XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *ServiceOptions) Reset() { *m = ServiceOptions{} }
-func (m *ServiceOptions) String() string { return proto.CompactTextString(m) }
-func (*ServiceOptions) ProtoMessage() {}
-func (*ServiceOptions) Descriptor() ([]byte, []int) { return fileDescriptorDescriptor, []int{16} }
+func (m *ServiceOptions) Reset() { *m = ServiceOptions{} }
+func (m *ServiceOptions) String() string { return proto.CompactTextString(m) }
+func (*ServiceOptions) ProtoMessage() {}
+func (*ServiceOptions) Descriptor() ([]byte, []int) {
+ return fileDescriptor_308767df5ffe18af, []int{16}
+}
var extRange_ServiceOptions = []proto.ExtensionRange{
{Start: 1000, End: 536870911},
@@ -1649,6 +2072,24 @@ func (*ServiceOptions) ExtensionRangeArray() []proto.ExtensionRange {
return extRange_ServiceOptions
}
+func (m *ServiceOptions) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_ServiceOptions.Unmarshal(m, b)
+}
+func (m *ServiceOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_ServiceOptions.Marshal(b, m, deterministic)
+}
+func (m *ServiceOptions) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_ServiceOptions.Merge(m, src)
+}
+func (m *ServiceOptions) XXX_Size() int {
+ return xxx_messageInfo_ServiceOptions.Size(m)
+}
+func (m *ServiceOptions) XXX_DiscardUnknown() {
+ xxx_messageInfo_ServiceOptions.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_ServiceOptions proto.InternalMessageInfo
+
const Default_ServiceOptions_Deprecated bool = false
func (m *ServiceOptions) GetDeprecated() bool {
@@ -1674,14 +2115,18 @@ type MethodOptions struct {
IdempotencyLevel *MethodOptions_IdempotencyLevel `protobuf:"varint,34,opt,name=idempotency_level,json=idempotencyLevel,enum=google.protobuf.MethodOptions_IdempotencyLevel,def=0" json:"idempotency_level,omitempty"`
// The parser stores options it doesn't recognize here. See above.
UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
proto.XXX_InternalExtensions `json:"-"`
XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *MethodOptions) Reset() { *m = MethodOptions{} }
-func (m *MethodOptions) String() string { return proto.CompactTextString(m) }
-func (*MethodOptions) ProtoMessage() {}
-func (*MethodOptions) Descriptor() ([]byte, []int) { return fileDescriptorDescriptor, []int{17} }
+func (m *MethodOptions) Reset() { *m = MethodOptions{} }
+func (m *MethodOptions) String() string { return proto.CompactTextString(m) }
+func (*MethodOptions) ProtoMessage() {}
+func (*MethodOptions) Descriptor() ([]byte, []int) {
+ return fileDescriptor_308767df5ffe18af, []int{17}
+}
var extRange_MethodOptions = []proto.ExtensionRange{
{Start: 1000, End: 536870911},
@@ -1691,6 +2136,24 @@ func (*MethodOptions) ExtensionRangeArray() []proto.ExtensionRange {
return extRange_MethodOptions
}
+func (m *MethodOptions) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_MethodOptions.Unmarshal(m, b)
+}
+func (m *MethodOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_MethodOptions.Marshal(b, m, deterministic)
+}
+func (m *MethodOptions) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_MethodOptions.Merge(m, src)
+}
+func (m *MethodOptions) XXX_Size() int {
+ return xxx_messageInfo_MethodOptions.Size(m)
+}
+func (m *MethodOptions) XXX_DiscardUnknown() {
+ xxx_messageInfo_MethodOptions.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_MethodOptions proto.InternalMessageInfo
+
const Default_MethodOptions_Deprecated bool = false
const Default_MethodOptions_IdempotencyLevel MethodOptions_IdempotencyLevel = MethodOptions_IDEMPOTENCY_UNKNOWN
@@ -1725,19 +2188,40 @@ type UninterpretedOption struct {
Name []*UninterpretedOption_NamePart `protobuf:"bytes,2,rep,name=name" json:"name,omitempty"`
// The value of the uninterpreted option, in whatever type the tokenizer
// identified it as during parsing. Exactly one of these should be set.
- IdentifierValue *string `protobuf:"bytes,3,opt,name=identifier_value,json=identifierValue" json:"identifier_value,omitempty"`
- PositiveIntValue *uint64 `protobuf:"varint,4,opt,name=positive_int_value,json=positiveIntValue" json:"positive_int_value,omitempty"`
- NegativeIntValue *int64 `protobuf:"varint,5,opt,name=negative_int_value,json=negativeIntValue" json:"negative_int_value,omitempty"`
- DoubleValue *float64 `protobuf:"fixed64,6,opt,name=double_value,json=doubleValue" json:"double_value,omitempty"`
- StringValue []byte `protobuf:"bytes,7,opt,name=string_value,json=stringValue" json:"string_value,omitempty"`
- AggregateValue *string `protobuf:"bytes,8,opt,name=aggregate_value,json=aggregateValue" json:"aggregate_value,omitempty"`
- XXX_unrecognized []byte `json:"-"`
+ IdentifierValue *string `protobuf:"bytes,3,opt,name=identifier_value,json=identifierValue" json:"identifier_value,omitempty"`
+ PositiveIntValue *uint64 `protobuf:"varint,4,opt,name=positive_int_value,json=positiveIntValue" json:"positive_int_value,omitempty"`
+ NegativeIntValue *int64 `protobuf:"varint,5,opt,name=negative_int_value,json=negativeIntValue" json:"negative_int_value,omitempty"`
+ DoubleValue *float64 `protobuf:"fixed64,6,opt,name=double_value,json=doubleValue" json:"double_value,omitempty"`
+ StringValue []byte `protobuf:"bytes,7,opt,name=string_value,json=stringValue" json:"string_value,omitempty"`
+ AggregateValue *string `protobuf:"bytes,8,opt,name=aggregate_value,json=aggregateValue" json:"aggregate_value,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *UninterpretedOption) Reset() { *m = UninterpretedOption{} }
-func (m *UninterpretedOption) String() string { return proto.CompactTextString(m) }
-func (*UninterpretedOption) ProtoMessage() {}
-func (*UninterpretedOption) Descriptor() ([]byte, []int) { return fileDescriptorDescriptor, []int{18} }
+func (m *UninterpretedOption) Reset() { *m = UninterpretedOption{} }
+func (m *UninterpretedOption) String() string { return proto.CompactTextString(m) }
+func (*UninterpretedOption) ProtoMessage() {}
+func (*UninterpretedOption) Descriptor() ([]byte, []int) {
+ return fileDescriptor_308767df5ffe18af, []int{18}
+}
+func (m *UninterpretedOption) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_UninterpretedOption.Unmarshal(m, b)
+}
+func (m *UninterpretedOption) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_UninterpretedOption.Marshal(b, m, deterministic)
+}
+func (m *UninterpretedOption) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_UninterpretedOption.Merge(m, src)
+}
+func (m *UninterpretedOption) XXX_Size() int {
+ return xxx_messageInfo_UninterpretedOption.Size(m)
+}
+func (m *UninterpretedOption) XXX_DiscardUnknown() {
+ xxx_messageInfo_UninterpretedOption.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_UninterpretedOption proto.InternalMessageInfo
func (m *UninterpretedOption) GetName() []*UninterpretedOption_NamePart {
if m != nil {
@@ -1794,17 +2278,36 @@ func (m *UninterpretedOption) GetAggregateValue() string {
// E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents
// "foo.(bar.baz).qux".
type UninterpretedOption_NamePart struct {
- NamePart *string `protobuf:"bytes,1,req,name=name_part,json=namePart" json:"name_part,omitempty"`
- IsExtension *bool `protobuf:"varint,2,req,name=is_extension,json=isExtension" json:"is_extension,omitempty"`
- XXX_unrecognized []byte `json:"-"`
+ NamePart *string `protobuf:"bytes,1,req,name=name_part,json=namePart" json:"name_part,omitempty"`
+ IsExtension *bool `protobuf:"varint,2,req,name=is_extension,json=isExtension" json:"is_extension,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
func (m *UninterpretedOption_NamePart) Reset() { *m = UninterpretedOption_NamePart{} }
func (m *UninterpretedOption_NamePart) String() string { return proto.CompactTextString(m) }
func (*UninterpretedOption_NamePart) ProtoMessage() {}
func (*UninterpretedOption_NamePart) Descriptor() ([]byte, []int) {
- return fileDescriptorDescriptor, []int{18, 0}
+ return fileDescriptor_308767df5ffe18af, []int{18, 0}
}
+func (m *UninterpretedOption_NamePart) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_UninterpretedOption_NamePart.Unmarshal(m, b)
+}
+func (m *UninterpretedOption_NamePart) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_UninterpretedOption_NamePart.Marshal(b, m, deterministic)
+}
+func (m *UninterpretedOption_NamePart) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_UninterpretedOption_NamePart.Merge(m, src)
+}
+func (m *UninterpretedOption_NamePart) XXX_Size() int {
+ return xxx_messageInfo_UninterpretedOption_NamePart.Size(m)
+}
+func (m *UninterpretedOption_NamePart) XXX_DiscardUnknown() {
+ xxx_messageInfo_UninterpretedOption_NamePart.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_UninterpretedOption_NamePart proto.InternalMessageInfo
func (m *UninterpretedOption_NamePart) GetNamePart() string {
if m != nil && m.NamePart != nil {
@@ -1866,14 +2369,35 @@ type SourceCodeInfo struct {
// - Code which tries to interpret locations should probably be designed to
// ignore those that it doesn't understand, as more types of locations could
// be recorded in the future.
- Location []*SourceCodeInfo_Location `protobuf:"bytes,1,rep,name=location" json:"location,omitempty"`
- XXX_unrecognized []byte `json:"-"`
+ Location []*SourceCodeInfo_Location `protobuf:"bytes,1,rep,name=location" json:"location,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *SourceCodeInfo) Reset() { *m = SourceCodeInfo{} }
-func (m *SourceCodeInfo) String() string { return proto.CompactTextString(m) }
-func (*SourceCodeInfo) ProtoMessage() {}
-func (*SourceCodeInfo) Descriptor() ([]byte, []int) { return fileDescriptorDescriptor, []int{19} }
+func (m *SourceCodeInfo) Reset() { *m = SourceCodeInfo{} }
+func (m *SourceCodeInfo) String() string { return proto.CompactTextString(m) }
+func (*SourceCodeInfo) ProtoMessage() {}
+func (*SourceCodeInfo) Descriptor() ([]byte, []int) {
+ return fileDescriptor_308767df5ffe18af, []int{19}
+}
+func (m *SourceCodeInfo) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_SourceCodeInfo.Unmarshal(m, b)
+}
+func (m *SourceCodeInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_SourceCodeInfo.Marshal(b, m, deterministic)
+}
+func (m *SourceCodeInfo) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_SourceCodeInfo.Merge(m, src)
+}
+func (m *SourceCodeInfo) XXX_Size() int {
+ return xxx_messageInfo_SourceCodeInfo.Size(m)
+}
+func (m *SourceCodeInfo) XXX_DiscardUnknown() {
+ xxx_messageInfo_SourceCodeInfo.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_SourceCodeInfo proto.InternalMessageInfo
func (m *SourceCodeInfo) GetLocation() []*SourceCodeInfo_Location {
if m != nil {
@@ -1963,15 +2487,34 @@ type SourceCodeInfo_Location struct {
LeadingComments *string `protobuf:"bytes,3,opt,name=leading_comments,json=leadingComments" json:"leading_comments,omitempty"`
TrailingComments *string `protobuf:"bytes,4,opt,name=trailing_comments,json=trailingComments" json:"trailing_comments,omitempty"`
LeadingDetachedComments []string `protobuf:"bytes,6,rep,name=leading_detached_comments,json=leadingDetachedComments" json:"leading_detached_comments,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
func (m *SourceCodeInfo_Location) Reset() { *m = SourceCodeInfo_Location{} }
func (m *SourceCodeInfo_Location) String() string { return proto.CompactTextString(m) }
func (*SourceCodeInfo_Location) ProtoMessage() {}
func (*SourceCodeInfo_Location) Descriptor() ([]byte, []int) {
- return fileDescriptorDescriptor, []int{19, 0}
+ return fileDescriptor_308767df5ffe18af, []int{19, 0}
}
+func (m *SourceCodeInfo_Location) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_SourceCodeInfo_Location.Unmarshal(m, b)
+}
+func (m *SourceCodeInfo_Location) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_SourceCodeInfo_Location.Marshal(b, m, deterministic)
+}
+func (m *SourceCodeInfo_Location) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_SourceCodeInfo_Location.Merge(m, src)
+}
+func (m *SourceCodeInfo_Location) XXX_Size() int {
+ return xxx_messageInfo_SourceCodeInfo_Location.Size(m)
+}
+func (m *SourceCodeInfo_Location) XXX_DiscardUnknown() {
+ xxx_messageInfo_SourceCodeInfo_Location.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_SourceCodeInfo_Location proto.InternalMessageInfo
func (m *SourceCodeInfo_Location) GetPath() []int32 {
if m != nil {
@@ -2014,14 +2557,35 @@ func (m *SourceCodeInfo_Location) GetLeadingDetachedComments() []string {
type GeneratedCodeInfo struct {
// An Annotation connects some span of text in generated code to an element
// of its generating .proto file.
- Annotation []*GeneratedCodeInfo_Annotation `protobuf:"bytes,1,rep,name=annotation" json:"annotation,omitempty"`
- XXX_unrecognized []byte `json:"-"`
+ Annotation []*GeneratedCodeInfo_Annotation `protobuf:"bytes,1,rep,name=annotation" json:"annotation,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *GeneratedCodeInfo) Reset() { *m = GeneratedCodeInfo{} }
-func (m *GeneratedCodeInfo) String() string { return proto.CompactTextString(m) }
-func (*GeneratedCodeInfo) ProtoMessage() {}
-func (*GeneratedCodeInfo) Descriptor() ([]byte, []int) { return fileDescriptorDescriptor, []int{20} }
+func (m *GeneratedCodeInfo) Reset() { *m = GeneratedCodeInfo{} }
+func (m *GeneratedCodeInfo) String() string { return proto.CompactTextString(m) }
+func (*GeneratedCodeInfo) ProtoMessage() {}
+func (*GeneratedCodeInfo) Descriptor() ([]byte, []int) {
+ return fileDescriptor_308767df5ffe18af, []int{20}
+}
+func (m *GeneratedCodeInfo) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_GeneratedCodeInfo.Unmarshal(m, b)
+}
+func (m *GeneratedCodeInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_GeneratedCodeInfo.Marshal(b, m, deterministic)
+}
+func (m *GeneratedCodeInfo) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_GeneratedCodeInfo.Merge(m, src)
+}
+func (m *GeneratedCodeInfo) XXX_Size() int {
+ return xxx_messageInfo_GeneratedCodeInfo.Size(m)
+}
+func (m *GeneratedCodeInfo) XXX_DiscardUnknown() {
+ xxx_messageInfo_GeneratedCodeInfo.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_GeneratedCodeInfo proto.InternalMessageInfo
func (m *GeneratedCodeInfo) GetAnnotation() []*GeneratedCodeInfo_Annotation {
if m != nil {
@@ -2042,16 +2606,35 @@ type GeneratedCodeInfo_Annotation struct {
// Identifies the ending offset in bytes in the generated code that
// relates to the identified offset. The end offset should be one past
// the last relevant byte (so the length of the text = end - begin).
- End *int32 `protobuf:"varint,4,opt,name=end" json:"end,omitempty"`
- XXX_unrecognized []byte `json:"-"`
+ End *int32 `protobuf:"varint,4,opt,name=end" json:"end,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
func (m *GeneratedCodeInfo_Annotation) Reset() { *m = GeneratedCodeInfo_Annotation{} }
func (m *GeneratedCodeInfo_Annotation) String() string { return proto.CompactTextString(m) }
func (*GeneratedCodeInfo_Annotation) ProtoMessage() {}
func (*GeneratedCodeInfo_Annotation) Descriptor() ([]byte, []int) {
- return fileDescriptorDescriptor, []int{20, 0}
+ return fileDescriptor_308767df5ffe18af, []int{20, 0}
}
+func (m *GeneratedCodeInfo_Annotation) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_GeneratedCodeInfo_Annotation.Unmarshal(m, b)
+}
+func (m *GeneratedCodeInfo_Annotation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_GeneratedCodeInfo_Annotation.Marshal(b, m, deterministic)
+}
+func (m *GeneratedCodeInfo_Annotation) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_GeneratedCodeInfo_Annotation.Merge(m, src)
+}
+func (m *GeneratedCodeInfo_Annotation) XXX_Size() int {
+ return xxx_messageInfo_GeneratedCodeInfo_Annotation.Size(m)
+}
+func (m *GeneratedCodeInfo_Annotation) XXX_DiscardUnknown() {
+ xxx_messageInfo_GeneratedCodeInfo_Annotation.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_GeneratedCodeInfo_Annotation proto.InternalMessageInfo
func (m *GeneratedCodeInfo_Annotation) GetPath() []int32 {
if m != nil {
@@ -2082,6 +2665,12 @@ func (m *GeneratedCodeInfo_Annotation) GetEnd() int32 {
}
func init() {
+ proto.RegisterEnum("google.protobuf.FieldDescriptorProto_Type", FieldDescriptorProto_Type_name, FieldDescriptorProto_Type_value)
+ proto.RegisterEnum("google.protobuf.FieldDescriptorProto_Label", FieldDescriptorProto_Label_name, FieldDescriptorProto_Label_value)
+ proto.RegisterEnum("google.protobuf.FileOptions_OptimizeMode", FileOptions_OptimizeMode_name, FileOptions_OptimizeMode_value)
+ proto.RegisterEnum("google.protobuf.FieldOptions_CType", FieldOptions_CType_name, FieldOptions_CType_value)
+ proto.RegisterEnum("google.protobuf.FieldOptions_JSType", FieldOptions_JSType_name, FieldOptions_JSType_value)
+ proto.RegisterEnum("google.protobuf.MethodOptions_IdempotencyLevel", MethodOptions_IdempotencyLevel_name, MethodOptions_IdempotencyLevel_value)
proto.RegisterType((*FileDescriptorSet)(nil), "google.protobuf.FileDescriptorSet")
proto.RegisterType((*FileDescriptorProto)(nil), "google.protobuf.FileDescriptorProto")
proto.RegisterType((*DescriptorProto)(nil), "google.protobuf.DescriptorProto")
@@ -2109,172 +2698,168 @@ func init() {
proto.RegisterType((*SourceCodeInfo_Location)(nil), "google.protobuf.SourceCodeInfo.Location")
proto.RegisterType((*GeneratedCodeInfo)(nil), "google.protobuf.GeneratedCodeInfo")
proto.RegisterType((*GeneratedCodeInfo_Annotation)(nil), "google.protobuf.GeneratedCodeInfo.Annotation")
- proto.RegisterEnum("google.protobuf.FieldDescriptorProto_Type", FieldDescriptorProto_Type_name, FieldDescriptorProto_Type_value)
- proto.RegisterEnum("google.protobuf.FieldDescriptorProto_Label", FieldDescriptorProto_Label_name, FieldDescriptorProto_Label_value)
- proto.RegisterEnum("google.protobuf.FileOptions_OptimizeMode", FileOptions_OptimizeMode_name, FileOptions_OptimizeMode_value)
- proto.RegisterEnum("google.protobuf.FieldOptions_CType", FieldOptions_CType_name, FieldOptions_CType_value)
- proto.RegisterEnum("google.protobuf.FieldOptions_JSType", FieldOptions_JSType_name, FieldOptions_JSType_value)
- proto.RegisterEnum("google.protobuf.MethodOptions_IdempotencyLevel", MethodOptions_IdempotencyLevel_name, MethodOptions_IdempotencyLevel_value)
}
-func init() { proto.RegisterFile("descriptor.proto", fileDescriptorDescriptor) }
+func init() { proto.RegisterFile("descriptor.proto", fileDescriptor_308767df5ffe18af) }
-var fileDescriptorDescriptor = []byte{
- // 2487 bytes of a gzipped FileDescriptorProto
+var fileDescriptor_308767df5ffe18af = []byte{
+ // 2522 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x59, 0xcd, 0x6f, 0xdb, 0xc8,
- 0x15, 0x5f, 0x7d, 0x5a, 0x7a, 0x92, 0xe5, 0xf1, 0xd8,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 0x4a, 0x35, 0x34, 0x92, 0x23, 0x0e, 0xb6, 0xc7, 0x00, 0x53, 0xcd, 0xd2, 0xb4, 0x5d, 0x80,
+ 0x82, 0xff, 0xdb, 0x10, 0xfb, 0x81, 0x91, 0xdf, 0xdd, 0x81, 0x8b, 0xe8, 0x95, 0x0d, 0x6d, 0x42,
+ 0xe6, 0x84, 0x0c, 0x75, 0xd3, 0x7f, 0xf1, 0xe5, 0x83, 0xe0, 0x85, 0x25, 0x1d, 0xbe, 0xb0, 0x1c,
+ 0xfe, 0x0c, 0x36, 0x54, 0x6b, 0x3c, 0x1b, 0xee, 0xa1, 0x30, 0xf3, 0x7e, 0xe0, 0x7e, 0x91, 0xf8,
+ 0x0a, 0xa6, 0x2d, 0xe6, 0xff, 0x12, 0x89, 0x3f, 0x24, 0x53, 0x47, 0xdd, 0xc3, 0x3f, 0x26, 0xb7,
+ 0x8f, 0xb8, 0x69, 0x37, 0x58, 0xa9, 0x4c, 0x06, 0x06, 0x51, 0x69, 0xf4, 0xff, 0x0f, 0x00, 0x00,
+ 0xff, 0xff, 0x88, 0x17, 0xc1, 0xbe, 0x38, 0x1d, 0x00, 0x00,
}
diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/descriptor/descriptor_gostring.gen.go b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/descriptor/descriptor_gostring.gen.go
index 3b95a7757..165b2110d 100644
--- a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/descriptor/descriptor_gostring.gen.go
+++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/descriptor/descriptor_gostring.gen.go
@@ -1,44 +1,18 @@
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: descriptor.proto
-/*
-Package descriptor is a generated protocol buffer package.
-
-It is generated from these files:
- descriptor.proto
-
-It has these top-level messages:
- FileDescriptorSet
- FileDescriptorProto
- DescriptorProto
- ExtensionRangeOptions
- FieldDescriptorProto
- OneofDescriptorProto
- EnumDescriptorProto
- EnumValueDescriptorProto
- ServiceDescriptorProto
- MethodDescriptorProto
- FileOptions
- MessageOptions
- FieldOptions
- OneofOptions
- EnumOptions
- EnumValueOptions
- ServiceOptions
- MethodOptions
- UninterpretedOption
- SourceCodeInfo
- GeneratedCodeInfo
-*/
package descriptor
-import fmt "fmt"
-import strings "strings"
-import proto "github.com/gogo/protobuf/proto"
-import sort "sort"
-import strconv "strconv"
-import reflect "reflect"
-import math "math"
+import (
+ fmt "fmt"
+ github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto"
+ proto "github.com/gogo/protobuf/proto"
+ math "math"
+ reflect "reflect"
+ sort "sort"
+ strconv "strconv"
+ strings "strings"
+)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
@@ -386,7 +360,7 @@ func (this *FileOptions) GoString() string {
if this == nil {
return "nil"
}
- s := make([]string, 0, 23)
+ s := make([]string, 0, 25)
s = append(s, "&descriptor.FileOptions{")
if this.JavaPackage != nil {
s = append(s, "JavaPackage: "+valueToGoStringDescriptor(this.JavaPackage, "string")+",\n")
@@ -442,6 +416,12 @@ func (this *FileOptions) GoString() string {
if this.PhpNamespace != nil {
s = append(s, "PhpNamespace: "+valueToGoStringDescriptor(this.PhpNamespace, "string")+",\n")
}
+ if this.PhpMetadataNamespace != nil {
+ s = append(s, "PhpMetadataNamespace: "+valueToGoStringDescriptor(this.PhpMetadataNamespace, "string")+",\n")
+ }
+ if this.RubyPackage != nil {
+ s = append(s, "RubyPackage: "+valueToGoStringDescriptor(this.RubyPackage, "string")+",\n")
+ }
if this.UninterpretedOption != nil {
s = append(s, "UninterpretedOption: "+fmt.Sprintf("%#v", this.UninterpretedOption)+",\n")
}
@@ -752,8 +732,8 @@ func valueToGoStringDescriptor(v interface{}, typ string) string {
pv := reflect.Indirect(rv).Interface()
return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv)
}
-func extensionToGoStringDescriptor(m proto.Message) string {
- e := proto.GetUnsafeExtensionsMap(m)
+func extensionToGoStringDescriptor(m github_com_gogo_protobuf_proto.Message) string {
+ e := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(m)
if e == nil {
return "nil"
}
diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/generator/generator.go b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/generator/generator.go
index 519e22d09..d05574404 100644
--- a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/generator/generator.go
+++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/generator/generator.go
@@ -45,7 +45,11 @@ import (
"bufio"
"bytes"
"compress/gzip"
+ "crypto/sha256"
+ "encoding/hex"
"fmt"
+ "go/ast"
+ "go/build"
"go/parser"
"go/printer"
"go/token"
@@ -61,6 +65,7 @@ import (
"github.com/gogo/protobuf/gogoproto"
"github.com/gogo/protobuf/proto"
descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor"
+ "github.com/gogo/protobuf/protoc-gen-gogo/generator/internal/remap"
plugin "github.com/gogo/protobuf/protoc-gen-gogo/plugin"
)
@@ -108,6 +113,14 @@ func RegisterPlugin(p Plugin) {
plugins = append(plugins, p)
}
+// A GoImportPath is the import path of a Go package. e.g., "google.golang.org/genproto/protobuf".
+type GoImportPath string
+
+func (p GoImportPath) String() string { return strconv.Quote(string(p)) }
+
+// A GoPackageName is the name of a Go package. e.g., "protobuf".
+type GoPackageName string
+
// Each type we import as a protocol buffer (other than FileDescriptorProto) needs
// a pointer to the FileDescriptorProto that represents it. These types achieve that
// wrapping by placing each Proto inside a struct with the pointer to its File. The
@@ -116,19 +129,21 @@ func RegisterPlugin(p Plugin) {
// The file and package name method are common to messages and enums.
type common struct {
- file *descriptor.FileDescriptorProto // File this object comes from.
+ file *FileDescriptor // File this object comes from.
}
-// PackageName is name in the package clause in the generated file.
-func (c *common) PackageName() string { return uniquePackageOf(c.file) }
+// GoImportPath is the import path of the Go package containing the type.
+func (c *common) GoImportPath() GoImportPath {
+ return c.file.importPath
+}
-func (c *common) File() *descriptor.FileDescriptorProto { return c.file }
+func (c *common) File() *FileDescriptor { return c.file }
func fileIsProto3(file *descriptor.FileDescriptorProto) bool {
return file.GetSyntax() == "proto3"
}
-func (c *common) proto3() bool { return fileIsProto3(c.file) }
+func (c *common) proto3() bool { return fileIsProto3(c.file.FileDescriptorProto) }
// Descriptor represents a protocol buffer message.
type Descriptor struct {
@@ -154,7 +169,7 @@ func (d *Descriptor) TypeName() []string {
for parent := d; parent != nil; parent = parent.parent {
n++
}
- s := make([]string, n, n)
+ s := make([]string, n)
for parent := d; parent != nil; parent = parent.parent {
n--
s[n] = parent.GetName()
@@ -292,77 +307,60 @@ type FileDescriptor struct {
// This is used for supporting public imports.
exported map[Object][]symbol
- index int // The index of this file in the list of files to generate code for
+ importPath GoImportPath // Import path of this file's package.
+ packageName GoPackageName // Name of this file's Go package.
proto3 bool // whether to generate proto3 code for this file
}
-// PackageName is the package name we'll use in the generated code to refer to this file.
-func (d *FileDescriptor) PackageName() string { return uniquePackageOf(d.FileDescriptorProto) }
-
// VarName is the variable name we'll use in the generated code to refer
// to the compressed bytes of this descriptor. It is not exported, so
// it is only valid inside the generated package.
-func (d *FileDescriptor) VarName() string { return fmt.Sprintf("fileDescriptor%v", FileName(d)) }
+func (d *FileDescriptor) VarName() string {
+ h := sha256.Sum256([]byte(d.GetName()))
+ return fmt.Sprintf("fileDescriptor_%s", hex.EncodeToString(h[:8]))
+}
// goPackageOption interprets the file's go_package option.
// If there is no go_package, it returns ("", "", false).
// If there's a simple name, it returns ("", pkg, true).
// If the option implies an import path, it returns (impPath, pkg, true).
-func (d *FileDescriptor) goPackageOption() (impPath, pkg string, ok bool) {
- pkg = d.GetOptions().GetGoPackage()
- if pkg == "" {
- return
+func (d *FileDescriptor) goPackageOption() (impPath GoImportPath, pkg GoPackageName, ok bool) {
+ opt := d.GetOptions().GetGoPackage()
+ if opt == "" {
+ return "", "", false
+ }
+ // A semicolon-delimited suffix delimits the import path and package name.
+ sc := strings.Index(opt, ";")
+ if sc >= 0 {
+ return GoImportPath(opt[:sc]), cleanPackageName(opt[sc+1:]), true
}
- ok = true
// The presence of a slash implies there's an import path.
- slash := strings.LastIndex(pkg, "/")
- if slash < 0 {
- return
+ slash := strings.LastIndex(opt, "/")
+ if slash >= 0 {
+ return GoImportPath(opt), cleanPackageName(opt[slash+1:]), true
}
- impPath, pkg = pkg, pkg[slash+1:]
- // A semicolon-delimited suffix overrides the package name.
- sc := strings.IndexByte(impPath, ';')
- if sc < 0 {
- return
- }
- impPath, pkg = impPath[:sc], impPath[sc+1:]
- return
-}
-
-// goPackageName returns the Go package name to use in the
-// generated Go file. The result explicit reports whether the name
-// came from an option go_package statement. If explicit is false,
-// the name was derived from the protocol buffer's package statement
-// or the input file name.
-func (d *FileDescriptor) goPackageName() (name string, explicit bool) {
- // Does the file have a "go_package" option?
- if _, pkg, ok := d.goPackageOption(); ok {
- return pkg, true
- }
-
- // Does the file have a package clause?
- if pkg := d.GetPackage(); pkg != "" {
- return pkg, false
- }
- // Use the file base name.
- return baseName(d.GetName()), false
+ return "", cleanPackageName(opt), true
}
// goFileName returns the output name for the generated Go file.
-func (d *FileDescriptor) goFileName() string {
+func (d *FileDescriptor) goFileName(pathType pathType) string {
name := *d.Name
if ext := path.Ext(name); ext == ".proto" || ext == ".protodevel" {
name = name[:len(name)-len(ext)]
}
name += ".pb.go"
+ if pathType == pathTypeSourceRelative {
+ return name
+ }
+
// Does the file have a "go_package" option?
// If it does, it may override the filename.
if impPath, _, ok := d.goPackageOption(); ok && impPath != "" {
// Replace the existing dirname with the declared import path.
_, name = path.Split(name)
- name = path.Join(impPath, name)
+ name = path.Join(string(impPath), name)
return name
}
@@ -377,14 +375,13 @@ func (d *FileDescriptor) addExport(obj Object, sym symbol) {
type symbol interface {
// GenerateAlias should generate an appropriate alias
// for the symbol from the named package.
- GenerateAlias(g *Generator, pkg string)
+ GenerateAlias(g *Generator, filename string, pkg GoPackageName)
}
type messageSymbol struct {
sym string
hasExtensions, isMessageSet bool
- hasOneof bool
- getters []getterSymbol
+ oneofTypes []string
}
type getterSymbol struct {
@@ -394,144 +391,12 @@ type getterSymbol struct {
genType bool // whether typ contains a generated type (message/group/enum)
}
-func (ms *messageSymbol) GenerateAlias(g *Generator, pkg string) {
- remoteSym := pkg + "." + ms.sym
-
- g.P("type ", ms.sym, " ", remoteSym)
- g.P("func (m *", ms.sym, ") Reset() { (*", remoteSym, ")(m).Reset() }")
- g.P("func (m *", ms.sym, ") String() string { return (*", remoteSym, ")(m).String() }")
- g.P("func (*", ms.sym, ") ProtoMessage() {}")
- if ms.hasExtensions {
- g.P("func (*", ms.sym, ") ExtensionRangeArray() []", g.Pkg["proto"], ".ExtensionRange ",
- "{ return (*", remoteSym, ")(nil).ExtensionRangeArray() }")
- if ms.isMessageSet {
- g.P("func (m *", ms.sym, ") Marshal() ([]byte, error) ",
- "{ return (*", remoteSym, ")(m).Marshal() }")
- g.P("func (m *", ms.sym, ") Unmarshal(buf []byte) error ",
- "{ return (*", remoteSym, ")(m).Unmarshal(buf) }")
- }
+func (ms *messageSymbol) GenerateAlias(g *Generator, filename string, pkg GoPackageName) {
+ g.P("// ", ms.sym, " from public import ", filename)
+ g.P("type ", ms.sym, " = ", pkg, ".", ms.sym)
+ for _, name := range ms.oneofTypes {
+ g.P("type ", name, " = ", pkg, ".", name)
}
- if ms.hasOneof {
- // Oneofs and public imports do not mix well.
- // We can make them work okay for the binary format,
- // but they're going to break weirdly for text/JSON.
- enc := "_" + ms.sym + "_OneofMarshaler"
- dec := "_" + ms.sym + "_OneofUnmarshaler"
- size := "_" + ms.sym + "_OneofSizer"
- encSig := "(msg " + g.Pkg["proto"] + ".Message, b *" + g.Pkg["proto"] + ".Buffer) error"
- decSig := "(msg " + g.Pkg["proto"] + ".Message, tag, wire int, b *" + g.Pkg["proto"] + ".Buffer) (bool, error)"
- sizeSig := "(msg " + g.Pkg["proto"] + ".Message) int"
- g.P("func (m *", ms.sym, ") XXX_OneofFuncs() (func", encSig, ", func", decSig, ", func", sizeSig, ", []interface{}) {")
- g.P("return ", enc, ", ", dec, ", ", size, ", nil")
- g.P("}")
-
- g.P("func ", enc, encSig, " {")
- g.P("m := msg.(*", ms.sym, ")")
- g.P("m0 := (*", remoteSym, ")(m)")
- g.P("enc, _, _, _ := m0.XXX_OneofFuncs()")
- g.P("return enc(m0, b)")
- g.P("}")
-
- g.P("func ", dec, decSig, " {")
- g.P("m := msg.(*", ms.sym, ")")
- g.P("m0 := (*", remoteSym, ")(m)")
- g.P("_, dec, _, _ := m0.XXX_OneofFuncs()")
- g.P("return dec(m0, tag, wire, b)")
- g.P("}")
-
- g.P("func ", size, sizeSig, " {")
- g.P("m := msg.(*", ms.sym, ")")
- g.P("m0 := (*", remoteSym, ")(m)")
- g.P("_, _, size, _ := m0.XXX_OneofFuncs()")
- g.P("return size(m0)")
- g.P("}")
- }
- for _, get := range ms.getters {
-
- if get.typeName != "" {
- g.RecordTypeUse(get.typeName)
- }
- typ := get.typ
- val := "(*" + remoteSym + ")(m)." + get.name + "()"
- if get.genType {
- // typ will be "*pkg.T" (message/group) or "pkg.T" (enum)
- // or "map[t]*pkg.T" (map to message/enum).
- // The first two of those might have a "[]" prefix if it is repeated.
- // Drop any package qualifier since we have hoisted the type into this package.
- rep := strings.HasPrefix(typ, "[]")
- if rep {
- typ = typ[2:]
- }
- isMap := strings.HasPrefix(typ, "map[")
- star := typ[0] == '*'
- if !isMap { // map types handled lower down
- typ = typ[strings.Index(typ, ".")+1:]
- }
- if star {
- typ = "*" + typ
- }
- if rep {
- // Go does not permit conversion between slice types where both
- // element types are named. That means we need to generate a bit
- // of code in this situation.
- // typ is the element type.
- // val is the expression to get the slice from the imported type.
-
- ctyp := typ // conversion type expression; "Foo" or "(*Foo)"
- if star {
- ctyp = "(" + typ + ")"
- }
-
- g.P("func (m *", ms.sym, ") ", get.name, "() []", typ, " {")
- g.In()
- g.P("o := ", val)
- g.P("if o == nil {")
- g.In()
- g.P("return nil")
- g.Out()
- g.P("}")
- g.P("s := make([]", typ, ", len(o))")
- g.P("for i, x := range o {")
- g.In()
- g.P("s[i] = ", ctyp, "(x)")
- g.Out()
- g.P("}")
- g.P("return s")
- g.Out()
- g.P("}")
- continue
- }
- if isMap {
- // Split map[keyTyp]valTyp.
- bra, ket := strings.Index(typ, "["), strings.Index(typ, "]")
- keyTyp, valTyp := typ[bra+1:ket], typ[ket+1:]
- // Drop any package qualifier.
- // Only the value type may be foreign.
- star := valTyp[0] == '*'
- valTyp = valTyp[strings.Index(valTyp, ".")+1:]
- if star {
- valTyp = "*" + valTyp
- }
-
- maptyp := "map[" + keyTyp + "]" + valTyp
- g.P("func (m *", ms.sym, ") ", get.name, "() ", typ, " {")
- g.P("o := ", val)
- g.P("if o == nil { return nil }")
- g.P("s := make(", maptyp, ", len(o))")
- g.P("for k, v := range o {")
- g.P("s[k] = (", valTyp, ")(v)")
- g.P("}")
- g.P("return s")
- g.P("}")
- continue
- }
- // Convert imported type into the forwarding type.
- val = "(" + typ + ")(" + val + ")"
- }
-
- g.P("func (m *", ms.sym, ") ", get.name, "() ", typ, " { return ", val, " }")
- }
-
}
type enumSymbol struct {
@@ -539,16 +404,12 @@ type enumSymbol struct {
proto3 bool // Whether this came from a proto3 file.
}
-func (es enumSymbol) GenerateAlias(g *Generator, pkg string) {
+func (es enumSymbol) GenerateAlias(g *Generator, filename string, pkg GoPackageName) {
s := es.name
- g.P("type ", s, " ", pkg, ".", s)
+ g.P("// ", s, " from public import ", filename)
+ g.P("type ", s, " = ", pkg, ".", s)
g.P("var ", s, "_name = ", pkg, ".", s, "_name")
g.P("var ", s, "_value = ", pkg, ".", s, "_value")
- g.P("func (x ", s, ") String() string { return (", pkg, ".", s, ")(x).String() }")
- if !es.proto3 {
- g.P("func (x ", s, ") Enum() *", s, "{ return (*", s, ")((", pkg, ".", s, ")(x).Enum()) }")
- g.P("func (x *", s, ") UnmarshalJSON(data []byte) error { return (*", pkg, ".", s, ")(x).UnmarshalJSON(data) }")
- }
}
type constOrVarSymbol struct {
@@ -557,8 +418,8 @@ type constOrVarSymbol struct {
cast string // if non-empty, a type cast is required (used for enums)
}
-func (cs constOrVarSymbol) GenerateAlias(g *Generator, pkg string) {
- v := pkg + "." + cs.sym
+func (cs constOrVarSymbol) GenerateAlias(g *Generator, filename string, pkg GoPackageName) {
+ v := string(pkg) + "." + cs.sym
if cs.cast != "" {
v = cs.cast + "(" + v + ")"
}
@@ -567,21 +428,9 @@ func (cs constOrVarSymbol) GenerateAlias(g *Generator, pkg string) {
// Object is an interface abstracting the abilities shared by enums, messages, extensions and imported objects.
type Object interface {
- PackageName() string // The name we use in our output (a_b_c), possibly renamed for uniqueness.
+ GoImportPath() GoImportPath
TypeName() []string
- File() *descriptor.FileDescriptorProto
-}
-
-// Each package name we generate must be unique. The package we're generating
-// gets its own name but every other package must have a unique name that does
-// not conflict in the code we generate. These names are chosen globally (although
-// they don't have to be, it simplifies things to do them globally).
-func uniquePackageOf(fd *descriptor.FileDescriptorProto) string {
- s, ok := uniquePackageName[fd]
- if !ok {
- log.Fatal("internal error: no package name defined for " + fd.GetName())
- }
- return s
+ File() *FileDescriptor
}
// Generator is the type whose methods generate the output, stored in the associated response structure.
@@ -598,21 +447,34 @@ type Generator struct {
Pkg map[string]string // The names under which we import support packages
- packageName string // What we're calling ourselves.
- allFiles []*FileDescriptor // All files in the tree
- allFilesByName map[string]*FileDescriptor // All files by filename.
- genFiles []*FileDescriptor // Those files we will generate output for.
- file *FileDescriptor // The file we are compiling now.
- usedPackages map[string]bool // Names of packages used in current file.
- typeNameToObject map[string]Object // Key is a fully-qualified name in input syntax.
- init []string // Lines to emit in the init function.
+ outputImportPath GoImportPath // Package we're generating code for.
+ allFiles []*FileDescriptor // All files in the tree
+ allFilesByName map[string]*FileDescriptor // All files by filename.
+ genFiles []*FileDescriptor // Those files we will generate output for.
+ file *FileDescriptor // The file we are compiling now.
+ packageNames map[GoImportPath]GoPackageName // Imported package names in the current file.
+ usedPackages map[GoImportPath]bool // Packages used in current file.
+ usedPackageNames map[GoPackageName]bool // Package names used in the current file.
+ addedImports map[GoImportPath]bool // Additional imports to emit.`
+ typeNameToObject map[string]Object // Key is a fully-qualified name in input syntax.
+ init []string // Lines to emit in the init function.
indent string
+ pathType pathType // How to generate output filenames.
writeOutput bool
+ annotateCode bool // whether to store annotations
+ annotations []*descriptor.GeneratedCodeInfo_Annotation // annotations to store
customImports []string
writtenImports map[string]bool // For de-duplicating written imports
}
+type pathType int
+
+const (
+ pathTypeImport pathType = iota
+ pathTypeSourceRelative
+)
+
// New creates a new generator and allocates the request and response protobufs.
func New() *Generator {
g := new(Generator)
@@ -620,8 +482,6 @@ func New() *Generator {
g.Request = new(plugin.CodeGeneratorRequest)
g.Response = new(plugin.CodeGeneratorResponse)
g.writtenImports = make(map[string]bool)
- uniquePackageName = make(map[*descriptor.FileDescriptorProto]string)
- pkgNamesInUse = make(map[string][]*FileDescriptor)
return g
}
@@ -660,8 +520,21 @@ func (g *Generator) CommandLineParameters(parameter string) {
g.ImportPrefix = v
case "import_path":
g.PackageImportPath = v
+ case "paths":
+ switch v {
+ case "import":
+ g.pathType = pathTypeImport
+ case "source_relative":
+ g.pathType = pathTypeSourceRelative
+ default:
+ g.Fail(fmt.Sprintf(`Unknown path type %q: want "import" or "source_relative".`, v))
+ }
case "plugins":
pluginList = v
+ case "annotate_code":
+ if v == "true" {
+ g.annotateCode = true
+ }
default:
if len(k) > 0 && k[0] == 'M' {
g.ImportMap[k[1:]] = v
@@ -697,55 +570,55 @@ func (g *Generator) CommandLineParameters(parameter string) {
// If its file is in a different package, it returns the package name we're using for this file, plus ".".
// Otherwise it returns the empty string.
func (g *Generator) DefaultPackageName(obj Object) string {
- pkg := obj.PackageName()
- if pkg == g.packageName {
+ importPath := obj.GoImportPath()
+ if importPath == g.outputImportPath {
return ""
}
- return pkg + "."
+ return string(g.GoPackageName(importPath)) + "."
}
-// For each input file, the unique package name to use, underscored.
-var uniquePackageName = make(map[*descriptor.FileDescriptorProto]string)
+// GoPackageName returns the name used for a package.
+func (g *Generator) GoPackageName(importPath GoImportPath) GoPackageName {
+ if name, ok := g.packageNames[importPath]; ok {
+ return name
+ }
+ name := cleanPackageName(baseName(string(importPath)))
+ for i, orig := 1, name; g.usedPackageNames[name] || isGoPredeclaredIdentifier[string(name)]; i++ {
+ name = orig + GoPackageName(strconv.Itoa(i))
+ }
+ if g.packageNames == nil {
+ g.packageNames = make(map[GoImportPath]GoPackageName)
+ }
+ g.packageNames[importPath] = name
+ if g.usedPackageNames == nil {
+ g.usedPackageNames = make(map[GoPackageName]bool)
+ }
+ g.usedPackageNames[name] = true
+ return name
+}
-// Package names already registered. Key is the name from the .proto file;
-// value is the name that appears in the generated code.
-var pkgNamesInUse = make(map[string][]*FileDescriptor)
+// AddImport adds a package to the generated file's import section.
+// It returns the name used for the package.
+func (g *Generator) AddImport(importPath GoImportPath) GoPackageName {
+ g.addedImports[importPath] = true
+ return g.GoPackageName(importPath)
+}
-// Create and remember a guaranteed unique package name for this file descriptor.
-// Pkg is the candidate name. If f is nil, it's a builtin package like "proto" and
-// has no file descriptor.
+var globalPackageNames = map[GoPackageName]bool{
+ "fmt": true,
+ "math": true,
+ "proto": true,
+}
+
+// Create and remember a guaranteed unique package name. Pkg is the candidate name.
+// The FileDescriptor parameter is unused.
func RegisterUniquePackageName(pkg string, f *FileDescriptor) string {
- if f == nil {
- // For builtin and standard lib packages, try to use only
- // the last component of the package path.
- pkg = pkg[strings.LastIndex(pkg, "/")+1:]
+ name := cleanPackageName(pkg)
+ for i, orig := 1, name; globalPackageNames[name]; i++ {
+ name = orig + GoPackageName(strconv.Itoa(i))
}
-
- // Convert dots to underscores before finding a unique alias.
- pkg = strings.Map(badToUnderscore, pkg)
-
- var i = -1
- var ptr *FileDescriptor = nil
- for i, ptr = range pkgNamesInUse[pkg] {
- if ptr == f {
- if i == 0 {
- return pkg
- }
- return pkg + strconv.Itoa(i)
- }
- }
-
- pkgNamesInUse[pkg] = append(pkgNamesInUse[pkg], f)
- i += 1
-
- if i > 0 {
- pkg = pkg + strconv.Itoa(i)
- }
-
- if f != nil {
- uniquePackageName[f.FileDescriptorProto] = pkg
- }
- return pkg
+ globalPackageNames[name] = true
+ return string(name)
}
var isGoKeyword = map[string]bool{
@@ -776,98 +649,126 @@ var isGoKeyword = map[string]bool{
"var": true,
}
+var isGoPredeclaredIdentifier = map[string]bool{
+ "append": true,
+ "bool": true,
+ "byte": true,
+ "cap": true,
+ "close": true,
+ "complex": true,
+ "complex128": true,
+ "complex64": true,
+ "copy": true,
+ "delete": true,
+ "error": true,
+ "false": true,
+ "float32": true,
+ "float64": true,
+ "imag": true,
+ "int": true,
+ "int16": true,
+ "int32": true,
+ "int64": true,
+ "int8": true,
+ "iota": true,
+ "len": true,
+ "make": true,
+ "new": true,
+ "nil": true,
+ "panic": true,
+ "print": true,
+ "println": true,
+ "real": true,
+ "recover": true,
+ "rune": true,
+ "string": true,
+ "true": true,
+ "uint": true,
+ "uint16": true,
+ "uint32": true,
+ "uint64": true,
+ "uint8": true,
+ "uintptr": true,
+}
+
+func cleanPackageName(name string) GoPackageName {
+ name = strings.Map(badToUnderscore, name)
+ // Identifier must not be keyword: insert _.
+ if isGoKeyword[name] {
+ name = "_" + name
+ }
+ // Identifier must not begin with digit: insert _.
+ if r, _ := utf8.DecodeRuneInString(name); unicode.IsDigit(r) {
+ name = "_" + name
+ }
+ return GoPackageName(name)
+}
+
// defaultGoPackage returns the package name to use,
// derived from the import path of the package we're building code for.
-func (g *Generator) defaultGoPackage() string {
+func (g *Generator) defaultGoPackage() GoPackageName {
p := g.PackageImportPath
if i := strings.LastIndex(p, "/"); i >= 0 {
p = p[i+1:]
}
- if p == "" {
- return ""
- }
-
- p = strings.Map(badToUnderscore, p)
- // Identifier must not be keyword: insert _.
- if isGoKeyword[p] {
- p = "_" + p
- }
- // Identifier must not begin with digit: insert _.
- if r, _ := utf8.DecodeRuneInString(p); unicode.IsDigit(r) {
- p = "_" + p
- }
- return p
+ return cleanPackageName(p)
}
// SetPackageNames sets the package name for this run.
// The package name must agree across all files being generated.
// It also defines unique package names for all imported files.
func (g *Generator) SetPackageNames() {
- // Register the name for this package. It will be the first name
- // registered so is guaranteed to be unmodified.
- pkg, explicit := g.genFiles[0].goPackageName()
+ g.outputImportPath = g.genFiles[0].importPath
- // Check all files for an explicit go_package option.
+ defaultPackageNames := make(map[GoImportPath]GoPackageName)
for _, f := range g.genFiles {
- thisPkg, thisExplicit := f.goPackageName()
- if thisExplicit {
- if !explicit {
- // Let this file's go_package option serve for all input files.
- pkg, explicit = thisPkg, true
- } else if thisPkg != pkg {
- g.Fail("inconsistent package names:", thisPkg, pkg)
- }
+ if _, p, ok := f.goPackageOption(); ok {
+ defaultPackageNames[f.importPath] = p
+ }
+ }
+ for _, f := range g.genFiles {
+ if _, p, ok := f.goPackageOption(); ok {
+ // Source file: option go_package = "quux/bar";
+ f.packageName = p
+ } else if p, ok := defaultPackageNames[f.importPath]; ok {
+ // A go_package option in another file in the same package.
+ //
+ // This is a poor choice in general, since every source file should
+ // contain a go_package option. Supported mainly for historical
+ // compatibility.
+ f.packageName = p
+ } else if p := g.defaultGoPackage(); p != "" {
+ // Command-line: import_path=quux/bar.
+ //
+ // The import_path flag sets a package name for files which don't
+ // contain a go_package option.
+ f.packageName = p
+ } else if p := f.GetPackage(); p != "" {
+ // Source file: package quux.bar;
+ f.packageName = cleanPackageName(p)
+ } else {
+ // Source filename.
+ f.packageName = cleanPackageName(baseName(f.GetName()))
}
}
- // If we don't have an explicit go_package option but we have an
- // import path, use that.
- if !explicit {
- p := g.defaultGoPackage()
- if p != "" {
- pkg, explicit = p, true
+ // Check that all files have a consistent package name and import path.
+ for _, f := range g.genFiles[1:] {
+ if a, b := g.genFiles[0].importPath, f.importPath; a != b {
+ g.Fail(fmt.Sprintf("inconsistent package import paths: %v, %v", a, b))
+ }
+ if a, b := g.genFiles[0].packageName, f.packageName; a != b {
+ g.Fail(fmt.Sprintf("inconsistent package names: %v, %v", a, b))
}
}
- // If there was no go_package and no import path to use,
- // double-check that all the inputs have the same implicit
- // Go package name.
- if !explicit {
- for _, f := range g.genFiles {
- thisPkg, _ := f.goPackageName()
- if thisPkg != pkg {
- g.Fail("inconsistent package names:", thisPkg, pkg)
- }
- }
- }
-
- g.packageName = RegisterUniquePackageName(pkg, g.genFiles[0])
-
- // Register the support package names. They might collide with the
- // name of a package we import.
+ // Names of support packages. These never vary (if there are conflicts,
+ // we rename the conflicting package), so this could be removed someday.
g.Pkg = map[string]string{
- "fmt": RegisterUniquePackageName("fmt", nil),
- "math": RegisterUniquePackageName("math", nil),
- "proto": RegisterUniquePackageName("proto", nil),
- "golang_proto": RegisterUniquePackageName("golang_proto", nil),
- }
-
-AllFiles:
- for _, f := range g.allFiles {
- for _, genf := range g.genFiles {
- if f == genf {
- // In this package already.
- uniquePackageName[f.FileDescriptorProto] = g.packageName
- continue AllFiles
- }
- }
- // The file is a dependency, so we want to ignore its go_package option
- // because that is only relevant for its specific generated output.
- pkg := f.GetPackage()
- if pkg == "" {
- pkg = baseName(*f.Name)
- }
- RegisterUniquePackageName(pkg, f)
+ "fmt": "fmt",
+ "math": "math",
+ "proto": "proto",
+ "golang_proto": "golang_proto",
}
}
@@ -877,27 +778,51 @@ AllFiles:
func (g *Generator) WrapTypes() {
g.allFiles = make([]*FileDescriptor, 0, len(g.Request.ProtoFile))
g.allFilesByName = make(map[string]*FileDescriptor, len(g.allFiles))
+ genFileNames := make(map[string]bool)
+ for _, n := range g.Request.FileToGenerate {
+ genFileNames[n] = true
+ }
for _, f := range g.Request.ProtoFile {
- // We must wrap the descriptors before we wrap the enums
- descs := wrapDescriptors(f)
- g.buildNestedDescriptors(descs)
- enums := wrapEnumDescriptors(f, descs)
- g.buildNestedEnums(descs, enums)
- exts := wrapExtensions(f)
fd := &FileDescriptor{
FileDescriptorProto: f,
- desc: descs,
- enum: enums,
- ext: exts,
exported: make(map[Object][]symbol),
proto3: fileIsProto3(f),
}
+ // The import path may be set in a number of ways.
+ if substitution, ok := g.ImportMap[f.GetName()]; ok {
+ // Command-line: M=foo.proto=quux/bar.
+ //
+ // Explicit mapping of source file to import path.
+ fd.importPath = GoImportPath(substitution)
+ } else if genFileNames[f.GetName()] && g.PackageImportPath != "" {
+ // Command-line: import_path=quux/bar.
+ //
+ // The import_path flag sets the import path for every file that
+ // we generate code for.
+ fd.importPath = GoImportPath(g.PackageImportPath)
+ } else if p, _, _ := fd.goPackageOption(); p != "" {
+ // Source file: option go_package = "quux/bar";
+ //
+ // The go_package option sets the import path. Most users should use this.
+ fd.importPath = p
+ } else {
+ // Source filename.
+ //
+ // Last resort when nothing else is available.
+ fd.importPath = GoImportPath(path.Dir(f.GetName()))
+ }
+ // We must wrap the descriptors before we wrap the enums
+ fd.desc = wrapDescriptors(fd)
+ g.buildNestedDescriptors(fd.desc)
+ fd.enum = wrapEnumDescriptors(fd, fd.desc)
+ g.buildNestedEnums(fd.desc, fd.enum)
+ fd.ext = wrapExtensions(fd)
extractComments(fd)
g.allFiles = append(g.allFiles, fd)
g.allFilesByName[f.GetName()] = fd
}
for _, fd := range g.allFiles {
- fd.imp = wrapImported(fd.FileDescriptorProto, g)
+ fd.imp = wrapImported(fd, g)
}
g.genFiles = make([]*FileDescriptor, 0, len(g.Request.FileToGenerate))
@@ -906,7 +831,6 @@ func (g *Generator) WrapTypes() {
if fd == nil {
g.Fail("could not find file named", fileName)
}
- fd.index = len(g.genFiles)
g.genFiles = append(g.genFiles, fd)
}
}
@@ -943,7 +867,7 @@ func (g *Generator) buildNestedEnums(descs []*Descriptor, enums []*EnumDescripto
}
// Construct the Descriptor
-func newDescriptor(desc *descriptor.DescriptorProto, parent *Descriptor, file *descriptor.FileDescriptorProto, index int) *Descriptor {
+func newDescriptor(desc *descriptor.DescriptorProto, parent *Descriptor, file *FileDescriptor, index int) *Descriptor {
d := &Descriptor{
common: common{file},
DescriptorProto: desc,
@@ -980,7 +904,7 @@ func newDescriptor(desc *descriptor.DescriptorProto, parent *Descriptor, file *d
}
// Return a slice of all the Descriptors defined within this file
-func wrapDescriptors(file *descriptor.FileDescriptorProto) []*Descriptor {
+func wrapDescriptors(file *FileDescriptor) []*Descriptor {
sl := make([]*Descriptor, 0, len(file.MessageType)+10)
for i, desc := range file.MessageType {
sl = wrapThisDescriptor(sl, desc, nil, file, i)
@@ -989,7 +913,7 @@ func wrapDescriptors(file *descriptor.FileDescriptorProto) []*Descriptor {
}
// Wrap this Descriptor, recursively
-func wrapThisDescriptor(sl []*Descriptor, desc *descriptor.DescriptorProto, parent *Descriptor, file *descriptor.FileDescriptorProto, index int) []*Descriptor {
+func wrapThisDescriptor(sl []*Descriptor, desc *descriptor.DescriptorProto, parent *Descriptor, file *FileDescriptor, index int) []*Descriptor {
sl = append(sl, newDescriptor(desc, parent, file, index))
me := sl[len(sl)-1]
for i, nested := range desc.NestedType {
@@ -999,7 +923,7 @@ func wrapThisDescriptor(sl []*Descriptor, desc *descriptor.DescriptorProto, pare
}
// Construct the EnumDescriptor
-func newEnumDescriptor(desc *descriptor.EnumDescriptorProto, parent *Descriptor, file *descriptor.FileDescriptorProto, index int) *EnumDescriptor {
+func newEnumDescriptor(desc *descriptor.EnumDescriptorProto, parent *Descriptor, file *FileDescriptor, index int) *EnumDescriptor {
ed := &EnumDescriptor{
common: common{file},
EnumDescriptorProto: desc,
@@ -1015,7 +939,7 @@ func newEnumDescriptor(desc *descriptor.EnumDescriptorProto, parent *Descriptor,
}
// Return a slice of all the EnumDescriptors defined within this file
-func wrapEnumDescriptors(file *descriptor.FileDescriptorProto, descs []*Descriptor) []*EnumDescriptor {
+func wrapEnumDescriptors(file *FileDescriptor, descs []*Descriptor) []*EnumDescriptor {
sl := make([]*EnumDescriptor, 0, len(file.EnumType)+10)
// Top-level enums.
for i, enum := range file.EnumType {
@@ -1031,7 +955,7 @@ func wrapEnumDescriptors(file *descriptor.FileDescriptorProto, descs []*Descript
}
// Return a slice of all the top-level ExtensionDescriptors defined within this file.
-func wrapExtensions(file *descriptor.FileDescriptorProto) []*ExtensionDescriptor {
+func wrapExtensions(file *FileDescriptor) []*ExtensionDescriptor {
var sl []*ExtensionDescriptor
for _, field := range file.Extension {
sl = append(sl, &ExtensionDescriptor{common{file}, field, nil})
@@ -1040,7 +964,7 @@ func wrapExtensions(file *descriptor.FileDescriptorProto) []*ExtensionDescriptor
}
// Return a slice of all the types that are publicly imported into this file.
-func wrapImported(file *descriptor.FileDescriptorProto, g *Generator) (sl []*ImportedDescriptor) {
+func wrapImported(file *FileDescriptor, g *Generator) (sl []*ImportedDescriptor) {
for _, index := range file.PublicDependency {
df := g.fileByName(file.Dependency[index])
for _, d := range df.desc {
@@ -1104,71 +1028,87 @@ func (g *Generator) ObjectNamed(typeName string) Object {
if !ok {
g.Fail("can't find object with type", typeName)
}
-
- // If the file of this object isn't a direct dependency of the current file,
- // or in the current file, then this object has been publicly imported into
- // a dependency of the current file.
- // We should return the ImportedDescriptor object for it instead.
- direct := *o.File().Name == *g.file.Name
- if !direct {
- for _, dep := range g.file.Dependency {
- if *g.fileByName(dep).Name == *o.File().Name {
- direct = true
- break
- }
- }
- }
- if !direct {
- found := false
- Loop:
- for _, dep := range g.file.Dependency {
- df := g.fileByName(*g.fileByName(dep).Name)
- for _, td := range df.imp {
- if td.o == o {
- // Found it!
- o = td
- found = true
- break Loop
- }
- }
- }
- if !found {
- log.Printf("protoc-gen-gogo: WARNING: failed finding publicly imported dependency for %v, used in %v", typeName, *g.file.Name)
- }
- }
-
return o
}
+// AnnotatedAtoms is a list of atoms (as consumed by P) that records the file name and proto AST path from which they originated.
+type AnnotatedAtoms struct {
+ source string
+ path string
+ atoms []interface{}
+}
+
+// Annotate records the file name and proto AST path of a list of atoms
+// so that a later call to P can emit a link from each atom to its origin.
+func Annotate(file *FileDescriptor, path string, atoms ...interface{}) *AnnotatedAtoms {
+ return &AnnotatedAtoms{source: *file.Name, path: path, atoms: atoms}
+}
+
+// printAtom prints the (atomic, non-annotation) argument to the generated output.
+func (g *Generator) printAtom(v interface{}) {
+ switch v := v.(type) {
+ case string:
+ g.WriteString(v)
+ case *string:
+ g.WriteString(*v)
+ case bool:
+ fmt.Fprint(g, v)
+ case *bool:
+ fmt.Fprint(g, *v)
+ case int:
+ fmt.Fprint(g, v)
+ case *int32:
+ fmt.Fprint(g, *v)
+ case *int64:
+ fmt.Fprint(g, *v)
+ case float64:
+ fmt.Fprint(g, v)
+ case *float64:
+ fmt.Fprint(g, *v)
+ case GoPackageName:
+ g.WriteString(string(v))
+ case GoImportPath:
+ g.WriteString(strconv.Quote(string(v)))
+ default:
+ g.Fail(fmt.Sprintf("unknown type in printer: %T", v))
+ }
+}
+
// P prints the arguments to the generated output. It handles strings and int32s, plus
-// handling indirections because they may be *string, etc.
+// handling indirections because they may be *string, etc. Any inputs of type AnnotatedAtoms may emit
+// annotations in a .meta file in addition to outputting the atoms themselves (if g.annotateCode
+// is true).
func (g *Generator) P(str ...interface{}) {
if !g.writeOutput {
return
}
g.WriteString(g.indent)
for _, v := range str {
- switch s := v.(type) {
- case string:
- g.WriteString(s)
- case *string:
- g.WriteString(*s)
- case bool:
- fmt.Fprintf(g, "%t", s)
- case *bool:
- fmt.Fprintf(g, "%t", *s)
- case int:
- fmt.Fprintf(g, "%d", s)
- case *int32:
- fmt.Fprintf(g, "%d", *s)
- case *int64:
- fmt.Fprintf(g, "%d", *s)
- case float64:
- fmt.Fprintf(g, "%g", s)
- case *float64:
- fmt.Fprintf(g, "%g", *s)
+ switch v := v.(type) {
+ case *AnnotatedAtoms:
+ begin := int32(g.Len())
+ for _, v := range v.atoms {
+ g.printAtom(v)
+ }
+ if g.annotateCode {
+ end := int32(g.Len())
+ var path []int32
+ for _, token := range strings.Split(v.path, ",") {
+ val, err := strconv.ParseInt(token, 10, 32)
+ if err != nil {
+ g.Fail("could not parse proto AST path: ", err.Error())
+ }
+ path = append(path, int32(val))
+ }
+ g.annotations = append(g.annotations, &descriptor.GeneratedCodeInfo_Annotation{
+ Path: path,
+ SourceFile: &v.source,
+ Begin: &begin,
+ End: &end,
+ })
+ }
default:
- g.Fail(fmt.Sprintf("unknown type in printer: %T", v))
+ g.printAtom(v)
}
}
g.WriteByte('\n')
@@ -1180,8 +1120,8 @@ func (g *Generator) addInitf(stmt string, a ...interface{}) {
g.init = append(g.init, fmt.Sprintf(stmt, a...))
}
-func (g *Generator) PrintImport(alias, pkg string) {
- statement := "import " + alias + " " + strconv.Quote(pkg)
+func (g *Generator) PrintImport(alias GoPackageName, pkg GoImportPath) {
+ statement := string(alias) + " " + strconv.Quote(string(pkg))
if g.writtenImports[statement] {
return
}
@@ -1214,15 +1154,25 @@ func (g *Generator) GenerateAllFiles() {
}
for _, file := range g.allFiles {
g.Reset()
+ g.annotations = nil
g.writeOutput = genFileMap[file]
g.generate(file)
if !g.writeOutput {
continue
}
+ fname := file.goFileName(g.pathType)
g.Response.File = append(g.Response.File, &plugin.CodeGeneratorResponse_File{
- Name: proto.String(file.goFileName()),
+ Name: proto.String(fname),
Content: proto.String(g.String()),
})
+ if g.annotateCode {
+ // Store the generated code annotations in text, as the protoc plugin protocol requires that
+ // strings contain valid UTF-8.
+ g.Response.File = append(g.Response.File, &plugin.CodeGeneratorResponse_File{
+ Name: proto.String(file.goFileName(g.pathType) + ".meta"),
+ Content: proto.String(proto.CompactTextString(&descriptor.GeneratedCodeInfo{Annotation: g.annotations})),
+ })
+ }
}
}
@@ -1233,37 +1183,29 @@ func (g *Generator) runPlugins(file *FileDescriptor) {
}
}
-// FileOf return the FileDescriptor for this FileDescriptorProto.
-func (g *Generator) FileOf(fd *descriptor.FileDescriptorProto) *FileDescriptor {
- for _, file := range g.allFiles {
- if file.FileDescriptorProto == fd {
- return file
- }
- }
- g.Fail("could not find file in table:", fd.GetName())
- return nil
-}
-
// Fill the response protocol buffer with the generated output for all the files we're
// supposed to generate.
func (g *Generator) generate(file *FileDescriptor) {
g.customImports = make([]string, 0)
- g.file = g.FileOf(file.FileDescriptorProto)
- g.usedPackages = make(map[string]bool)
-
- if g.file.index == 0 {
- // For one file in the package, assert version compatibility.
- g.P("// This is a compile-time assertion to ensure that this generated file")
- g.P("// is compatible with the proto package it is being compiled against.")
- g.P("// A compilation error at this line likely means your copy of the")
- g.P("// proto package needs to be updated.")
- if gogoproto.ImportsGoGoProto(file.FileDescriptorProto) {
- g.P("const _ = ", g.Pkg["proto"], ".GoGoProtoPackageIsVersion", generatedCodeVersion, " // please upgrade the proto package")
- } else {
- g.P("const _ = ", g.Pkg["proto"], ".ProtoPackageIsVersion", generatedCodeVersion, " // please upgrade the proto package")
- }
- g.P()
+ g.file = file
+ g.usedPackages = make(map[GoImportPath]bool)
+ g.packageNames = make(map[GoImportPath]GoPackageName)
+ g.usedPackageNames = make(map[GoPackageName]bool)
+ g.addedImports = make(map[GoImportPath]bool)
+ for name := range globalPackageNames {
+ g.usedPackageNames[name] = true
}
+
+ g.P("// This is a compile-time assertion to ensure that this generated file")
+ g.P("// is compatible with the proto package it is being compiled against.")
+ g.P("// A compilation error at this line likely means your copy of the")
+ g.P("// proto package needs to be updated.")
+ if gogoproto.ImportsGoGoProto(file.FileDescriptorProto) {
+ g.P("const _ = ", g.Pkg["proto"], ".GoGoProtoPackageIsVersion", generatedCodeVersion, " // please upgrade the proto package")
+ } else {
+ g.P("const _ = ", g.Pkg["proto"], ".ProtoPackageIsVersion", generatedCodeVersion, " // please upgrade the proto package")
+ }
+ g.P()
// Reset on each file
g.writtenImports = make(map[string]bool)
for _, td := range g.file.imp {
@@ -1283,95 +1225,93 @@ func (g *Generator) generate(file *FileDescriptor) {
g.generateExtension(ext)
}
g.generateInitFunction()
+ g.generateFileDescriptor(file)
// Run the plugins before the imports so we know which imports are necessary.
g.runPlugins(file)
- g.generateFileDescriptor(file)
-
// Generate header and imports last, though they appear first in the output.
rem := g.Buffer
+ remAnno := g.annotations
g.Buffer = new(bytes.Buffer)
+ g.annotations = nil
g.generateHeader()
g.generateImports()
if !g.writeOutput {
return
}
+ // Adjust the offsets for annotations displaced by the header and imports.
+ for _, anno := range remAnno {
+ *anno.Begin += int32(g.Len())
+ *anno.End += int32(g.Len())
+ g.annotations = append(g.annotations, anno)
+ }
g.Write(rem.Bytes())
- // Reformat generated code.
+ // Reformat generated code and patch annotation locations.
fset := token.NewFileSet()
- raw := g.Bytes()
- ast, err := parser.ParseFile(fset, "", g, parser.ParseComments)
+ original := g.Bytes()
+ if g.annotateCode {
+ // make a copy independent of g; we'll need it after Reset.
+ original = append([]byte(nil), original...)
+ }
+ fileAST, err := parser.ParseFile(fset, "", original, parser.ParseComments)
if err != nil {
// Print out the bad code with line numbers.
// This should never happen in practice, but it can while changing generated code,
// so consider this a debugging aid.
var src bytes.Buffer
- s := bufio.NewScanner(bytes.NewReader(raw))
+ s := bufio.NewScanner(bytes.NewReader(original))
for line := 1; s.Scan(); line++ {
fmt.Fprintf(&src, "%5d\t%s\n", line, s.Bytes())
}
if serr := s.Err(); serr != nil {
- g.Fail("bad Go source code was generated:", err.Error(), "\n"+string(raw))
+ g.Fail("bad Go source code was generated:", err.Error(), "\n"+string(original))
} else {
g.Fail("bad Go source code was generated:", err.Error(), "\n"+src.String())
}
}
+ ast.SortImports(fset, fileAST)
g.Reset()
- err = (&printer.Config{Mode: printer.TabIndent | printer.UseSpaces, Tabwidth: 8}).Fprint(g, fset, ast)
+ err = (&printer.Config{Mode: printer.TabIndent | printer.UseSpaces, Tabwidth: 8}).Fprint(g, fset, fileAST)
if err != nil {
g.Fail("generated Go source code could not be reformatted:", err.Error())
}
+ if g.annotateCode {
+ m, err := remap.Compute(original, g.Bytes())
+ if err != nil {
+ g.Fail("formatted generated Go source code could not be mapped back to the original code:", err.Error())
+ }
+ for _, anno := range g.annotations {
+ new, ok := m.Find(int(*anno.Begin), int(*anno.End))
+ if !ok {
+ g.Fail("span in formatted generated Go source code could not be mapped back to the original code")
+ }
+ *anno.Begin = int32(new.Pos)
+ *anno.End = int32(new.End)
+ }
+ }
}
// Generate the header, including package definition
func (g *Generator) generateHeader() {
g.P("// Code generated by protoc-gen-gogo. DO NOT EDIT.")
- g.P("// source: ", *g.file.Name)
- g.P()
-
- name := g.file.PackageName()
-
- if g.file.index == 0 {
- // Generate package docs for the first file in the package.
- g.P("/*")
- g.P("Package ", name, " is a generated protocol buffer package.")
- g.P()
- if loc, ok := g.file.comments[strconv.Itoa(packagePath)]; ok {
- // not using g.PrintComments because this is a /* */ comment block.
- text := strings.TrimSuffix(loc.GetLeadingComments(), "\n")
- for _, line := range strings.Split(text, "\n") {
- line = strings.TrimPrefix(line, " ")
- // ensure we don't escape from the block comment
- line = strings.Replace(line, "*/", "* /", -1)
- g.P(line)
- }
- g.P()
- }
- var topMsgs []string
- g.P("It is generated from these files:")
- for _, f := range g.genFiles {
- g.P("\t", f.Name)
- for _, msg := range f.desc {
- if msg.parent != nil {
- continue
- }
- topMsgs = append(topMsgs, CamelCaseSlice(msg.TypeName()))
- }
- }
- g.P()
- g.P("It has these top-level messages:")
- for _, msg := range topMsgs {
- g.P("\t", msg)
- }
- g.P("*/")
+ if g.file.GetOptions().GetDeprecated() {
+ g.P("// ", *g.file.Name, " is a deprecated file.")
+ } else {
+ g.P("// source: ", *g.file.Name)
}
-
- g.P("package ", name)
+ g.P()
+ g.PrintComments(strconv.Itoa(packagePath))
+ g.P()
+ g.P("package ", g.file.packageName)
g.P()
}
+// deprecationComment is the standard comment added to deprecated
+// messages, fields, enums, and enum values.
+var deprecationComment = "// Deprecated: Do not use."
+
// PrintComments prints any comments from the source .proto file.
// The path is a comma-separated list of integers.
// It returns an indication of whether any comments were printed.
@@ -1380,16 +1320,28 @@ func (g *Generator) PrintComments(path string) bool {
if !g.writeOutput {
return false
}
- if loc, ok := g.file.comments[path]; ok {
- text := strings.TrimSuffix(loc.GetLeadingComments(), "\n")
- for _, line := range strings.Split(text, "\n") {
- g.P("// ", strings.TrimPrefix(line, " "))
- }
+ if c, ok := g.makeComments(path); ok {
+ g.P(c)
return true
}
return false
}
+// makeComments generates the comment string for the field, no "\n" at the end
+func (g *Generator) makeComments(path string) (string, bool) {
+ loc, ok := g.file.comments[path]
+ if !ok {
+ return "", false
+ }
+ w := new(bytes.Buffer)
+ nl := ""
+ for _, line := range strings.Split(strings.TrimSuffix(loc.GetLeadingComments(), "\n"), "\n") {
+ fmt.Fprintf(w, "%s//%s", nl, line)
+ nl = "\n"
+ }
+ return w.String(), true
+}
+
// Comments returns any comments from the source .proto file and empty string if comments not found.
// The path is a comma-separated list of intergers.
// See descriptor.proto for its format.
@@ -1418,58 +1370,64 @@ func (g *Generator) weak(i int32) bool {
// Generate the imports
func (g *Generator) generateImports() {
- // We almost always need a proto import. Rather than computing when we
- // do, which is tricky when there's a plugin, just import it and
- // reference it later. The same argument applies to the fmt and math packages.
- if gogoproto.ImportsGoGoProto(g.file.FileDescriptorProto) {
- g.PrintImport(g.Pkg["proto"], g.ImportPrefix+"github.com/gogo/protobuf/proto")
- if gogoproto.RegistersGolangProto(g.file.FileDescriptorProto) {
- g.PrintImport(g.Pkg["golang_proto"], g.ImportPrefix+"github.com/golang/protobuf/proto")
- }
- } else {
- g.PrintImport(g.Pkg["proto"], g.ImportPrefix+"github.com/golang/protobuf/proto")
- }
- g.PrintImport(g.Pkg["fmt"], "fmt")
- g.PrintImport(g.Pkg["math"], "math")
-
+ imports := make(map[GoImportPath]GoPackageName)
for i, s := range g.file.Dependency {
fd := g.fileByName(s)
+ importPath := fd.importPath
// Do not import our own package.
- if fd.PackageName() == g.packageName {
+ if importPath == g.file.importPath {
continue
}
- filename := fd.goFileName()
- // By default, import path is the dirname of the Go filename.
- importPath := path.Dir(filename)
- if substitution, ok := g.ImportMap[s]; ok {
- importPath = substitution
- }
- importPath = g.ImportPrefix + importPath
- // Skip weak imports.
+ // Do not import weak imports.
if g.weak(int32(i)) {
- g.P("// skipping weak import ", fd.PackageName(), " ", strconv.Quote(importPath))
+ continue
+ }
+ // Do not import a package twice.
+ if _, ok := imports[importPath]; ok {
continue
}
// We need to import all the dependencies, even if we don't reference them,
// because other code and tools depend on having the full transitive closure
// of protocol buffer types in the binary.
- if _, ok := g.usedPackages[fd.PackageName()]; ok {
- g.PrintImport(fd.PackageName(), importPath)
- } else {
- g.P("import _ ", strconv.Quote(importPath))
+ packageName := g.GoPackageName(importPath)
+ if _, ok := g.usedPackages[importPath]; !ok {
+ packageName = "_"
}
+ imports[importPath] = packageName
}
- g.P()
+ for importPath := range g.addedImports {
+ imports[importPath] = g.GoPackageName(importPath)
+ }
+ // We almost always need a proto import. Rather than computing when we
+ // do, which is tricky when there's a plugin, just import it and
+ // reference it later. The same argument applies to the fmt and math packages.
+ g.P("import (")
+ g.PrintImport(GoPackageName(g.Pkg["fmt"]), "fmt")
+ g.PrintImport(GoPackageName(g.Pkg["math"]), "math")
+ if gogoproto.ImportsGoGoProto(g.file.FileDescriptorProto) {
+ g.PrintImport(GoPackageName(g.Pkg["proto"]), GoImportPath(g.ImportPrefix)+GoImportPath("github.com/gogo/protobuf/proto"))
+ if gogoproto.RegistersGolangProto(g.file.FileDescriptorProto) {
+ g.PrintImport(GoPackageName(g.Pkg["golang_proto"]), GoImportPath(g.ImportPrefix)+GoImportPath("github.com/golang/protobuf/proto"))
+ }
+ } else {
+ g.PrintImport(GoPackageName(g.Pkg["proto"]), GoImportPath(g.ImportPrefix)+GoImportPath("github.com/golang/protobuf/proto"))
+ }
+ for importPath, packageName := range imports {
+ g.P(packageName, " ", GoImportPath(g.ImportPrefix)+importPath)
+ }
+ // Custom gogo imports
for _, s := range g.customImports {
s1 := strings.Map(badToUnderscore, s)
- g.PrintImport(s1, s)
+ g.PrintImport(GoPackageName(s1), GoImportPath(s))
}
- g.P()
- // TODO: may need to worry about uniqueness across plugins
+ // gogo plugin imports
+ // TODO: may need to worry about uniqueness across plugins and could change this
+ // to use the `addedImports` technique
for _, p := range plugins {
p.GenerateImports(g.file)
- g.P()
}
+ g.P(")")
+
g.P("// Reference imports to suppress errors if they are not otherwise used.")
g.P("var _ = ", g.Pkg["proto"], ".Marshal")
if gogoproto.ImportsGoGoProto(g.file.FileDescriptorProto) && gogoproto.RegistersGolangProto(g.file.FileDescriptorProto) {
@@ -1487,28 +1445,20 @@ func (g *Generator) generateImports() {
}
func (g *Generator) generateImported(id *ImportedDescriptor) {
- // Don't generate public import symbols for files that we are generating
- // code for, since those symbols will already be in this package.
- // We can't simply avoid creating the ImportedDescriptor objects,
- // because g.genFiles isn't populated at that stage.
- tn := id.TypeName()
- sn := tn[len(tn)-1]
- df := g.FileOf(id.o.File())
+ df := id.o.File()
filename := *df.Name
- for _, fd := range g.genFiles {
- if *fd.Name == filename {
- g.P("// Ignoring public import of ", sn, " from ", filename)
- g.P()
- return
- }
+ if df.importPath == g.file.importPath {
+ // Don't generate type aliases for files in the same Go package as this one.
+ return
}
- g.P("// ", sn, " from public import ", filename)
- g.usedPackages[df.PackageName()] = true
+ if !supportTypeAliases {
+ g.Fail(fmt.Sprintf("%s: public imports require at least go1.9", filename))
+ }
+ g.usedPackages[df.importPath] = true
for _, sym := range df.exported[id.o] {
- sym.GenerateAlias(g, df.PackageName())
+ sym.GenerateAlias(g, filename, g.GoPackageName(df.importPath))
}
-
g.P()
}
@@ -1520,31 +1470,42 @@ func (g *Generator) generateEnum(enum *EnumDescriptor) {
ccTypeName := CamelCaseSlice(typeName)
ccPrefix := enum.prefix()
+ deprecatedEnum := ""
+ if enum.GetOptions().GetDeprecated() {
+ deprecatedEnum = deprecationComment
+ }
+
g.PrintComments(enum.path)
- if !gogoproto.EnabledGoEnumPrefix(enum.file, enum.EnumDescriptorProto) {
+ if !gogoproto.EnabledGoEnumPrefix(enum.file.FileDescriptorProto, enum.EnumDescriptorProto) {
ccPrefix = ""
}
- if gogoproto.HasEnumDecl(enum.file, enum.EnumDescriptorProto) {
- g.P("type ", ccTypeName, " int32")
+ if gogoproto.HasEnumDecl(enum.file.FileDescriptorProto, enum.EnumDescriptorProto) {
+ g.P("type ", Annotate(enum.file, enum.path, ccTypeName), " int32", deprecatedEnum)
g.file.addExport(enum, enumSymbol{ccTypeName, enum.proto3()})
g.P("const (")
g.In()
for i, e := range enum.Value {
- g.PrintComments(fmt.Sprintf("%s,%d,%d", enum.path, enumValuePath, i))
+ etorPath := fmt.Sprintf("%s,%d,%d", enum.path, enumValuePath, i)
+ g.PrintComments(etorPath)
+
+ deprecatedValue := ""
+ if e.GetOptions().GetDeprecated() {
+ deprecatedValue = deprecationComment
+ }
name := *e.Name
if gogoproto.IsEnumValueCustomName(e) {
name = gogoproto.GetEnumValueCustomName(e)
}
name = ccPrefix + name
- g.P(name, " ", ccTypeName, " = ", e.Number)
+ g.P(Annotate(enum.file, etorPath, name), " ", ccTypeName, " = ", e.Number, " ", deprecatedValue)
g.file.addExport(enum, constOrVarSymbol{name, "const", ccTypeName})
}
g.Out()
g.P(")")
}
-
+ g.P()
g.P("var ", ccTypeName, "_name = map[int32]string{")
g.In()
generated := make(map[int32]bool) // avoid duplicate values
@@ -1558,6 +1519,7 @@ func (g *Generator) generateEnum(enum *EnumDescriptor) {
}
g.Out()
g.P("}")
+ g.P()
g.P("var ", ccTypeName, "_value = map[string]int32{")
g.In()
for _, e := range enum.Value {
@@ -1565,6 +1527,7 @@ func (g *Generator) generateEnum(enum *EnumDescriptor) {
}
g.Out()
g.P("}")
+ g.P()
if !enum.proto3() {
g.P("func (x ", ccTypeName, ") Enum() *", ccTypeName, " {")
@@ -1574,6 +1537,7 @@ func (g *Generator) generateEnum(enum *EnumDescriptor) {
g.P("return p")
g.Out()
g.P("}")
+ g.P()
}
if gogoproto.IsGoEnumStringer(g.file.FileDescriptorProto, enum.EnumDescriptorProto) {
@@ -1582,6 +1546,7 @@ func (g *Generator) generateEnum(enum *EnumDescriptor) {
g.P("return ", g.Pkg["proto"], ".EnumName(", ccTypeName, "_name, int32(x))")
g.Out()
g.P("}")
+ g.P()
}
if !enum.proto3() && !gogoproto.IsGoEnumStringer(g.file.FileDescriptorProto, enum.EnumDescriptorProto) {
@@ -1590,6 +1555,7 @@ func (g *Generator) generateEnum(enum *EnumDescriptor) {
g.P("return ", g.Pkg["proto"], ".MarshalJSONEnum(", ccTypeName, "_name, int32(x))")
g.Out()
g.P("}")
+ g.P()
}
if !enum.proto3() {
g.P("func (x *", ccTypeName, ") UnmarshalJSON(data []byte) error {")
@@ -1604,6 +1570,7 @@ func (g *Generator) generateEnum(enum *EnumDescriptor) {
g.P("return nil")
g.Out()
g.P("}")
+ g.P()
}
var indexes []string
@@ -1612,11 +1579,18 @@ func (g *Generator) generateEnum(enum *EnumDescriptor) {
indexes = append([]string{strconv.Itoa(m.index)}, indexes...)
}
indexes = append(indexes, strconv.Itoa(enum.index))
- g.P("func (", ccTypeName, ") EnumDescriptor() ([]byte, []int) { return ", g.file.VarName(), ", []int{", strings.Join(indexes, ", "), "} }")
+ g.P("func (", ccTypeName, ") EnumDescriptor() ([]byte, []int) {")
+ g.In()
+ g.P("return ", g.file.VarName(), ", []int{", strings.Join(indexes, ", "), "}")
+ g.Out()
+ g.P("}")
+ g.P()
if enum.file.GetPackage() == "google.protobuf" && enum.GetName() == "NullValue" {
g.P("func (", ccTypeName, `) XXX_WellKnownType() string { return "`, enum.GetName(), `" }`)
+ g.P()
}
- g.P()
+
+ g.generateEnumRegistration(enum)
}
// The tag is a string like "varint,2,opt,name=fieldname,def=7" that
@@ -1673,12 +1647,24 @@ func (g *Generator) goTag(message *Descriptor, field *descriptor.FieldDescriptor
g.Fail("unknown enum type", CamelCaseSlice(obj.TypeName()))
}
defaultValue = enum.integerValueAsString(defaultValue)
+ case descriptor.FieldDescriptorProto_TYPE_FLOAT:
+ if def := defaultValue; def != "inf" && def != "-inf" && def != "nan" {
+ if f, err := strconv.ParseFloat(defaultValue, 32); err == nil {
+ defaultValue = fmt.Sprint(float32(f))
+ }
+ }
+ case descriptor.FieldDescriptorProto_TYPE_DOUBLE:
+ if def := defaultValue; def != "inf" && def != "-inf" && def != "nan" {
+ if f, err := strconv.ParseFloat(defaultValue, 64); err == nil {
+ defaultValue = fmt.Sprint(f)
+ }
+ }
}
defaultValue = ",def=" + defaultValue
}
enum := ""
if *field.Type == descriptor.FieldDescriptorProto_TYPE_ENUM {
- // We avoid using obj.PackageName(), because we want to use the
+ // We avoid using obj.goPackageNamehe
// original (proto-world) package name.
obj := g.ObjectNamed(field.GetTypeName())
if id, ok := obj.(*ImportedDescriptor); ok {
@@ -1710,7 +1696,7 @@ func (g *Generator) goTag(message *Descriptor, field *descriptor.FieldDescriptor
name = name[i+1:]
}
}
- if json := field.GetJsonName(); json != "" && json != name {
+ if json := field.GetJsonName(); field.Extendee == nil && json != "" && json != name {
// TODO: escaping might be needed, in which case
// perhaps this should be in its own "json" tag.
name += ",json=" + json
@@ -1751,13 +1737,7 @@ func (g *Generator) goTag(message *Descriptor, field *descriptor.FieldDescriptor
}
if message.proto3() {
- // We only need the extra tag for []byte fields;
- // no need to add noise for the others.
- if *field.Type != descriptor.FieldDescriptorProto_TYPE_MESSAGE &&
- *field.Type != descriptor.FieldDescriptorProto_TYPE_GROUP &&
- !field.IsRepeated() {
- name += ",proto3"
- }
+ name += ",proto3"
}
oneof := ""
if field.OneofIndex != nil {
@@ -1771,7 +1751,11 @@ func (g *Generator) goTag(message *Descriptor, field *descriptor.FieldDescriptor
if gogoproto.IsStdDuration(field) {
stdduration = ",stdduration"
}
- return strconv.Quote(fmt.Sprintf("%s,%d,%s%s%s%s%s%s%s%s%s%s%s%s%s",
+ wktptr := ""
+ if gogoproto.IsWktPtr(field) {
+ wktptr = ",wktptr"
+ }
+ return strconv.Quote(fmt.Sprintf("%s,%d,%s%s%s%s%s%s%s%s%s%s%s%s%s%s",
wiretype,
field.GetNumber(),
optrepreq,
@@ -1786,7 +1770,8 @@ func (g *Generator) goTag(message *Descriptor, field *descriptor.FieldDescriptor
castkey,
castvalue,
stdtime,
- stdduration))
+ stdduration,
+ wktptr))
}
func needsStar(field *descriptor.FieldDescriptorProto, proto3 bool, allowOneOf bool) bool {
@@ -1824,12 +1809,6 @@ func (g *Generator) TypeName(obj Object) string {
return g.DefaultPackageName(obj) + CamelCaseSlice(obj.TypeName())
}
-// TypeNameWithPackage is like TypeName, but always includes the package
-// name even if the object is in our own package.
-func (g *Generator) TypeNameWithPackage(obj Object) string {
- return obj.PackageName() + CamelCaseSlice(obj.TypeName())
-}
-
// GoType returns a string representing the type name, and the wire type
func (g *Generator) GoType(message *Descriptor, field *descriptor.FieldDescriptorProto) (typ string, wire string) {
// TODO: Options.
@@ -1905,6 +1884,24 @@ func (g *Generator) GoType(message *Descriptor, field *descriptor.FieldDescripto
case gogoproto.IsStdDuration(field):
g.customImports = append(g.customImports, "time")
typ = "time.Duration"
+ case gogoproto.IsStdDouble(field):
+ typ = "float64"
+ case gogoproto.IsStdFloat(field):
+ typ = "float32"
+ case gogoproto.IsStdInt64(field):
+ typ = "int64"
+ case gogoproto.IsStdUInt64(field):
+ typ = "uint64"
+ case gogoproto.IsStdInt32(field):
+ typ = "int32"
+ case gogoproto.IsStdUInt32(field):
+ typ = "uint32"
+ case gogoproto.IsStdBool(field):
+ typ = "bool"
+ case gogoproto.IsStdString(field):
+ typ = "string"
+ case gogoproto.IsStdBytes(field):
+ typ = "[]byte"
}
if needsStar(field, g.file.proto3 && field.Extendee == nil, message != nil && message.allowOneof()) {
typ = "*" + typ
@@ -1977,7 +1974,7 @@ func (g *Generator) GoMapType(d *Descriptor, field *descriptor.FieldDescriptorPr
if !gogoproto.IsNullable(m.ValueAliasField) {
valType = strings.TrimPrefix(valType, "*")
}
- if !gogoproto.IsStdTime(field) && !gogoproto.IsStdDuration(field) {
+ if !gogoproto.IsStdType(m.ValueAliasField) && !gogoproto.IsCustomType(field) && !gogoproto.IsCastType(field) {
g.RecordTypeUse(m.ValueAliasField.GetTypeName())
}
default:
@@ -1985,7 +1982,9 @@ func (g *Generator) GoMapType(d *Descriptor, field *descriptor.FieldDescriptorPr
if !gogoproto.IsNullable(m.ValueAliasField) {
valType = strings.TrimPrefix(valType, "*")
}
- g.RecordTypeUse(m.ValueAliasField.GetTypeName())
+ if !gogoproto.IsStdType(field) {
+ g.RecordTypeUse(m.ValueAliasField.GetTypeName())
+ }
} else {
valType = strings.TrimPrefix(valType, "*")
}
@@ -1996,11 +1995,16 @@ func (g *Generator) GoMapType(d *Descriptor, field *descriptor.FieldDescriptorPr
}
func (g *Generator) RecordTypeUse(t string) {
- if obj, ok := g.typeNameToObject[t]; ok {
- // Call ObjectNamed to get the true object to record the use.
- obj = g.ObjectNamed(t)
- g.usedPackages[obj.PackageName()] = true
+ if _, ok := g.typeNameToObject[t]; !ok {
+ return
}
+ importPath := g.ObjectNamed(t).GoImportPath()
+ if importPath == g.outputImportPath {
+ // Don't record use of objects in our package.
+ return
+ }
+ g.AddImport(importPath)
+ g.usedPackages[importPath] = true
}
// Method names that may be generated. Fields with these names get an
@@ -2044,296 +2048,676 @@ var wellKnownTypes = map[string]bool{
"BytesValue": true,
}
-// Generate the type and default constant definitions for this Descriptor.
-func (g *Generator) generateMessage(message *Descriptor) {
- // The full type name
- typeName := message.TypeName()
- // The full type name, CamelCased.
- ccTypeName := CamelCaseSlice(typeName)
-
- usedNames := make(map[string]bool)
- for _, n := range methodNames {
- usedNames[n] = true
+// getterDefault finds the default value for the field to return from a getter,
+// regardless of if it's a built in default or explicit from the source. Returns e.g. "nil", `""`, "Default_MessageType_FieldName"
+func (g *Generator) getterDefault(field *descriptor.FieldDescriptorProto, goMessageType, goTypeName string) string {
+ if isRepeated(field) {
+ return "nil"
}
- if !gogoproto.IsProtoSizer(message.file, message.DescriptorProto) {
- usedNames["Size"] = true
- }
- fieldNames := make(map[*descriptor.FieldDescriptorProto]string)
- fieldGetterNames := make(map[*descriptor.FieldDescriptorProto]string)
- fieldTypes := make(map[*descriptor.FieldDescriptorProto]string)
- mapFieldTypes := make(map[*descriptor.FieldDescriptorProto]string)
-
- oneofFieldName := make(map[int32]string) // indexed by oneof_index field of FieldDescriptorProto
- oneofDisc := make(map[int32]string) // name of discriminator method
- oneofTypeName := make(map[*descriptor.FieldDescriptorProto]string) // without star
- oneofInsertPoints := make(map[int32]int) // oneof_index => offset of g.Buffer
-
- // allocNames finds a conflict-free variation of the given strings,
- // consistently mutating their suffixes.
- // It returns the same number of strings.
- allocNames := func(ns ...string) []string {
- Loop:
- for {
- for _, n := range ns {
- if usedNames[n] {
- for i := range ns {
- ns[i] += "_"
- }
- continue Loop
- }
- }
- for _, n := range ns {
- usedNames[n] = true
- }
- return ns
+ if def := field.GetDefaultValue(); def != "" {
+ defaultConstant := g.defaultConstantName(goMessageType, field.GetName())
+ if *field.Type != descriptor.FieldDescriptorProto_TYPE_BYTES {
+ return defaultConstant
}
+ return "append([]byte(nil), " + defaultConstant + "...)"
}
-
- for _, field := range message.Field {
- // Allocate the getter and the field at the same time so name
- // collisions create field/method consistent names.
- // TODO: This allocation occurs based on the order of the fields
- // in the proto file, meaning that a change in the field
- // ordering can change generated Method/Field names.
- base := CamelCase(*field.Name)
- if gogoproto.IsCustomName(field) {
- base = gogoproto.GetCustomName(field)
- }
- ns := allocNames(base, "Get"+base)
- fieldName, fieldGetterName := ns[0], ns[1]
- fieldNames[field] = fieldName
- fieldGetterNames[field] = fieldGetterName
- }
-
- if gogoproto.HasTypeDecl(message.file, message.DescriptorProto) {
- g.PrintComments(message.path)
- g.P("type ", ccTypeName, " struct {")
- g.In()
-
- for i, field := range message.Field {
- fieldName := fieldNames[field]
- typename, wiretype := g.GoType(message, field)
- jsonName := *field.Name
- jsonTag := jsonName + ",omitempty"
- repeatedNativeType := (!field.IsMessage() && !gogoproto.IsCustomType(field) && field.IsRepeated())
- if !gogoproto.IsNullable(field) && !repeatedNativeType {
- jsonTag = jsonName
- }
- gogoJsonTag := gogoproto.GetJsonTag(field)
- if gogoJsonTag != nil {
- jsonTag = *gogoJsonTag
- }
- gogoMoreTags := gogoproto.GetMoreTags(field)
- moreTags := ""
- if gogoMoreTags != nil {
- moreTags = " " + *gogoMoreTags
- }
- tag := fmt.Sprintf("protobuf:%s json:%q%s", g.goTag(message, field, wiretype), jsonTag, moreTags)
- if *field.Type == descriptor.FieldDescriptorProto_TYPE_MESSAGE && gogoproto.IsEmbed(field) {
- fieldName = ""
- }
-
- oneof := field.OneofIndex != nil && message.allowOneof()
- if oneof && oneofFieldName[*field.OneofIndex] == "" {
- odp := message.OneofDecl[int(*field.OneofIndex)]
- fname := allocNames(CamelCase(odp.GetName()))[0]
-
- // This is the first field of a oneof we haven't seen before.
- // Generate the union field.
- com := g.PrintComments(fmt.Sprintf("%s,%d,%d", message.path, messageOneofPath, *field.OneofIndex))
- if com {
- g.P("//")
- }
- g.P("// Types that are valid to be assigned to ", fname, ":")
- // Generate the rest of this comment later,
- // when we've computed any disambiguation.
- oneofInsertPoints[*field.OneofIndex] = g.Buffer.Len()
-
- dname := "is" + ccTypeName + "_" + fname
- oneofFieldName[*field.OneofIndex] = fname
- oneofDisc[*field.OneofIndex] = dname
- otag := `protobuf_oneof:"` + odp.GetName() + `"`
- g.P(fname, " ", dname, " `", otag, "`")
- }
-
- if *field.Type == descriptor.FieldDescriptorProto_TYPE_MESSAGE {
- desc := g.ObjectNamed(field.GetTypeName())
- if d, ok := desc.(*Descriptor); ok && d.GetOptions().GetMapEntry() {
- m := g.GoMapType(d, field)
- typename = m.GoType
- mapFieldTypes[field] = typename // record for the getter generation
-
- tag += fmt.Sprintf(" protobuf_key:%s protobuf_val:%s", m.KeyTag, m.ValueTag)
- }
- }
-
- fieldTypes[field] = typename
-
- if oneof {
- tname := ccTypeName + "_" + fieldName
- // It is possible for this to collide with a message or enum
- // nested in this message. Check for collisions.
- for {
- ok := true
- for _, desc := range message.nested {
- if CamelCaseSlice(desc.TypeName()) == tname {
- ok = false
- break
- }
- }
- for _, enum := range message.enums {
- if CamelCaseSlice(enum.TypeName()) == tname {
- ok = false
- break
- }
- }
- if !ok {
- tname += "_"
- continue
- }
- break
- }
-
- oneofTypeName[field] = tname
- continue
- }
-
- g.PrintComments(fmt.Sprintf("%s,%d,%d", message.path, messageFieldPath, i))
- g.P(fieldName, "\t", typename, "\t`", tag, "`")
- if !gogoproto.IsStdTime(field) && !gogoproto.IsStdDuration(field) {
- g.RecordTypeUse(field.GetTypeName())
- }
- }
- if len(message.ExtensionRange) > 0 {
- if gogoproto.HasExtensionsMap(g.file.FileDescriptorProto, message.DescriptorProto) {
- g.P(g.Pkg["proto"], ".XXX_InternalExtensions `json:\"-\"`")
+ switch *field.Type {
+ case descriptor.FieldDescriptorProto_TYPE_GROUP,
+ descriptor.FieldDescriptorProto_TYPE_MESSAGE:
+ if field.OneofIndex != nil {
+ return "nil"
+ } else {
+ if !gogoproto.IsNullable(field) && (gogoproto.IsStdDuration(field) ||
+ gogoproto.IsStdDouble(field) || gogoproto.IsStdFloat(field) ||
+ gogoproto.IsStdInt64(field) || gogoproto.IsStdUInt64(field) ||
+ gogoproto.IsStdInt32(field) || gogoproto.IsStdUInt32(field)) {
+ return "0"
+ } else if !gogoproto.IsNullable(field) && gogoproto.IsStdBool(field) {
+ return "false"
+ } else if !gogoproto.IsNullable(field) && gogoproto.IsStdString(field) {
+ return "\"\""
+ } else if !gogoproto.IsNullable(field) && gogoproto.IsStdBytes(field) {
+ return "[]byte{}"
} else {
- g.P("XXX_extensions\t\t[]byte `protobuf:\"bytes,0,opt\" json:\"-\"`")
+ return goTypeName + "{}"
}
}
- if gogoproto.HasUnrecognized(g.file.FileDescriptorProto, message.DescriptorProto) && !message.proto3() {
- g.P("XXX_unrecognized\t[]byte `json:\"-\"`")
+ case descriptor.FieldDescriptorProto_TYPE_BOOL:
+ return "false"
+ case descriptor.FieldDescriptorProto_TYPE_STRING:
+ return "\"\""
+ case descriptor.FieldDescriptorProto_TYPE_BYTES:
+ // This is only possible for oneof fields.
+ return "nil"
+ case descriptor.FieldDescriptorProto_TYPE_ENUM:
+ // The default default for an enum is the first value in the enum,
+ // not zero.
+ obj := g.ObjectNamed(field.GetTypeName())
+ var enum *EnumDescriptor
+ if id, ok := obj.(*ImportedDescriptor); ok {
+ // The enum type has been publicly imported.
+ enum, _ = id.o.(*EnumDescriptor)
+ } else {
+ enum, _ = obj.(*EnumDescriptor)
}
+ if enum == nil {
+ log.Printf("don't know how to generate getter for %s", field.GetName())
+ return "nil"
+ }
+ if len(enum.Value) == 0 {
+ return "0 // empty enum"
+ } else {
+ first := enum.Value[0].GetName()
+ if gogoproto.IsEnumValueCustomName(enum.Value[0]) {
+ first = gogoproto.GetEnumValueCustomName(enum.Value[0])
+ }
+ if gogoproto.EnabledGoEnumPrefix(enum.file.FileDescriptorProto, enum.EnumDescriptorProto) {
+ return g.DefaultPackageName(obj) + enum.prefix() + first
+ } else {
+ return g.DefaultPackageName(obj) + first
+ }
+ }
+ default:
+ return "0"
+ }
+}
+
+// defaultConstantName builds the name of the default constant from the message
+// type name and the untouched field name, e.g. "Default_MessageType_FieldName"
+func (g *Generator) defaultConstantName(goMessageType, protoFieldName string) string {
+ return "Default_" + goMessageType + "_" + CamelCase(protoFieldName)
+}
+
+// The different types of fields in a message and how to actually print them
+// Most of the logic for generateMessage is in the methods of these types.
+//
+// Note that the content of the field is irrelevant, a simpleField can contain
+// anything from a scalar to a group (which is just a message).
+//
+// Extension fields (and message sets) are however handled separately.
+//
+// simpleField - a field that is neiter weak nor oneof, possibly repeated
+// oneofField - field containing list of subfields:
+// - oneofSubField - a field within the oneof
+
+// msgCtx contains the context for the generator functions.
+type msgCtx struct {
+ goName string // Go struct name of the message, e.g. MessageName
+ message *Descriptor // The descriptor for the message
+}
+
+// fieldCommon contains data common to all types of fields.
+type fieldCommon struct {
+ goName string // Go name of field, e.g. "FieldName" or "Descriptor_"
+ protoName string // Name of field in proto language, e.g. "field_name" or "descriptor"
+ getterName string // Name of the getter, e.g. "GetFieldName" or "GetDescriptor_"
+ goType string // The Go type as a string, e.g. "*int32" or "*OtherMessage"
+ tags string // The tag string/annotation for the type, e.g. `protobuf:"varint,8,opt,name=region_id,json=regionId"`
+ fullPath string // The full path of the field as used by Annotate etc, e.g. "4,0,2,0"
+ protoField *descriptor.FieldDescriptorProto // gogo. Passing in the fieldDescriptor in for gogo options. TODO rethink this, we might need a better way of getting options.
+}
+
+// getProtoName gets the proto name of a field, e.g. "field_name" or "descriptor".
+func (f *fieldCommon) getProtoName() string {
+ return f.protoName
+}
+
+// getGoType returns the go type of the field as a string, e.g. "*int32".
+func (f *fieldCommon) getGoType() string {
+ return f.goType
+}
+
+// simpleField is not weak, not a oneof, not an extension. Can be required, optional or repeated.
+type simpleField struct {
+ fieldCommon
+ protoTypeName string // Proto type name, empty if primitive, e.g. ".google.protobuf.Duration"
+ protoType descriptor.FieldDescriptorProto_Type // Actual type enum value, e.g. descriptor.FieldDescriptorProto_TYPE_FIXED64
+ deprecated string // Deprecation comment, if any, e.g. "// Deprecated: Do not use."
+ getterDef string // Default for getters, e.g. "nil", `""` or "Default_MessageType_FieldName"
+ protoDef string // Default value as defined in the proto file, e.g "yoshi" or "5"
+ comment string // The full comment for the field, e.g. "// Useful information"
+}
+
+// decl prints the declaration of the field in the struct (if any).
+func (f *simpleField) decl(g *Generator, mc *msgCtx) {
+ g.P(f.comment, Annotate(mc.message.file, f.fullPath, f.goName), "\t", f.goType, "\t`", f.tags, "`", f.deprecated)
+}
+
+// getter prints the getter for the field.
+func (f *simpleField) getter(g *Generator, mc *msgCtx) {
+ oneof := false
+ if !oneof && !gogoproto.HasGoGetters(g.file.FileDescriptorProto, mc.message.DescriptorProto) {
+ return
+ }
+ if gogoproto.IsEmbed(f.protoField) || gogoproto.IsCustomType(f.protoField) {
+ return
+ }
+ if f.deprecated != "" {
+ g.P(f.deprecated)
+ }
+ g.generateGet(mc, f.protoField, f.protoType, false, f.goName, f.goType, "", "", f.fullPath, f.getterName, f.getterDef)
+}
+
+// setter prints the setter method of the field.
+func (f *simpleField) setter(g *Generator, mc *msgCtx) {
+ // No setter for regular fields yet
+}
+
+// getProtoDef returns the default value explicitly stated in the proto file, e.g "yoshi" or "5".
+func (f *simpleField) getProtoDef() string {
+ return f.protoDef
+}
+
+// getProtoTypeName returns the protobuf type name for the field as returned by field.GetTypeName(), e.g. ".google.protobuf.Duration".
+func (f *simpleField) getProtoTypeName() string {
+ return f.protoTypeName
+}
+
+// getProtoType returns the *field.Type value, e.g. descriptor.FieldDescriptorProto_TYPE_FIXED64.
+func (f *simpleField) getProtoType() descriptor.FieldDescriptorProto_Type {
+ return f.protoType
+}
+
+func (f *simpleField) getProto() *descriptor.FieldDescriptorProto {
+ return f.protoField
+}
+
+// oneofSubFields are kept slize held by each oneofField. They do not appear in the top level slize of fields for the message.
+type oneofSubField struct {
+ fieldCommon
+ protoTypeName string // Proto type name, empty if primitive, e.g. ".google.protobuf.Duration"
+ protoType descriptor.FieldDescriptorProto_Type // Actual type enum value, e.g. descriptor.FieldDescriptorProto_TYPE_FIXED64
+ oneofTypeName string // Type name of the enclosing struct, e.g. "MessageName_FieldName"
+ fieldNumber int // Actual field number, as defined in proto, e.g. 12
+ getterDef string // Default for getters, e.g. "nil", `""` or "Default_MessageType_FieldName"
+ protoDef string // Default value as defined in the proto file, e.g "yoshi" or "5"
+ deprecated string // Deprecation comment, if any.
+ wireType string // gogo. We can set this on creation, instead of using a function
+}
+
+// wireTypeName returns a textual wire type, needed for oneof sub fields in generated code.
+func (f *oneofSubField) wireTypeName() string {
+ return f.wireType
+}
+
+// typedNil prints a nil casted to the pointer to this field.
+// - for XXX_OneofFuncs
+func (f *oneofSubField) typedNil(g *Generator) {
+ g.P("(*", f.oneofTypeName, ")(nil),")
+}
+
+// marshalCase prints the case matching this oneof subfield in the marshalling code.
+func (f *oneofSubField) marshalCase(g *Generator, mc *msgCtx) {
+ // if field.OneofIndex == nil || int(*field.OneofIndex) != oi {
+ // continue
+ // }
+ g.P("case *", f.oneofTypeName, ":")
+ var pre, post string
+ val := "x." + f.goName // overridden for TYPE_BOOL
+ canFail := false // only TYPE_MESSAGE and TYPE_GROUP can fail
+ switch f.protoType {
+ case descriptor.FieldDescriptorProto_TYPE_DOUBLE:
+ pre = "b.EncodeFixed64(" + g.Pkg["math"] + ".Float64bits("
+ post = "))"
+ case descriptor.FieldDescriptorProto_TYPE_FLOAT:
+ pre = "b.EncodeFixed32(uint64(" + g.Pkg["math"] + ".Float32bits("
+ post = ")))"
+ case descriptor.FieldDescriptorProto_TYPE_INT64,
+ descriptor.FieldDescriptorProto_TYPE_UINT64:
+ pre, post = "b.EncodeVarint(uint64(", "))"
+ case descriptor.FieldDescriptorProto_TYPE_INT32,
+ descriptor.FieldDescriptorProto_TYPE_UINT32,
+ descriptor.FieldDescriptorProto_TYPE_ENUM:
+ pre, post = "b.EncodeVarint(uint64(", "))"
+ case descriptor.FieldDescriptorProto_TYPE_FIXED64,
+ descriptor.FieldDescriptorProto_TYPE_SFIXED64:
+ pre, post = "b.EncodeFixed64(uint64(", "))"
+ case descriptor.FieldDescriptorProto_TYPE_FIXED32,
+ descriptor.FieldDescriptorProto_TYPE_SFIXED32:
+ pre, post = "b.EncodeFixed32(uint64(", "))"
+ case descriptor.FieldDescriptorProto_TYPE_BOOL:
+ // bool needs special handling.
+ g.P("t := uint64(0)")
+ g.P("if ", val, " { t = 1 }")
+ val = "t"
+ pre, post = "b.EncodeVarint(", ")"
+ case descriptor.FieldDescriptorProto_TYPE_STRING:
+ pre, post = "b.EncodeStringBytes(", ")"
+ case descriptor.FieldDescriptorProto_TYPE_GROUP:
+ pre, post = "b.Marshal(", ")"
+ canFail = true
+ case descriptor.FieldDescriptorProto_TYPE_MESSAGE:
+ pre, post = "b.EncodeMessage(", ")"
+ canFail = true
+ case descriptor.FieldDescriptorProto_TYPE_BYTES:
+ pre, post = "b.EncodeRawBytes(", ")"
+ case descriptor.FieldDescriptorProto_TYPE_SINT32:
+ pre, post = "b.EncodeZigzag32(uint64(", "))"
+ case descriptor.FieldDescriptorProto_TYPE_SINT64:
+ pre, post = "b.EncodeZigzag64(uint64(", "))"
+ default:
+ g.Fail("unhandled oneof field type ", f.protoType.String())
+ }
+ g.P("_ = b.EncodeVarint(", f.fieldNumber, "<<3|", g.Pkg["proto"], ".", f.wireTypeName(), ")")
+ if f.protoType == descriptor.FieldDescriptorProto_TYPE_BYTES && gogoproto.IsCustomType(f.protoField) {
+ g.P(`dAtA, err := `, val, `.Marshal()`)
+ g.P(`if err != nil {`)
+ g.In()
+ g.P(`return err`)
g.Out()
- g.P("}")
+ g.P(`}`)
+ val = "dAtA"
+ } else if gogoproto.IsStdType(f.protoField) {
+ pkg := g.useTypes()
+ ptr := ""
+ fnname := ""
+ if gogoproto.IsNullable(f.protoField) {
+ ptr = "*"
+ }
+ if gogoproto.IsStdTime(f.protoField) {
+ fnname = "Time"
+ } else if gogoproto.IsStdDuration(f.protoField) {
+ fnname = "Duration"
+ } else if gogoproto.IsStdDouble(f.protoField) {
+ fnname = "Double"
+ } else if gogoproto.IsStdFloat(f.protoField) {
+ fnname = "Float"
+ } else if gogoproto.IsStdInt64(f.protoField) {
+ fnname = "Int64"
+ } else if gogoproto.IsStdUInt64(f.protoField) {
+ fnname = "UInt64"
+ } else if gogoproto.IsStdInt32(f.protoField) {
+ fnname = "Int32"
+ } else if gogoproto.IsStdUInt32(f.protoField) {
+ fnname = "UInt32"
+ } else if gogoproto.IsStdBool(f.protoField) {
+ fnname = "Bool"
+ } else if gogoproto.IsStdString(f.protoField) {
+ fnname = "String"
+ } else if gogoproto.IsStdBytes(f.protoField) {
+ fnname = "Bytes"
+ } else {
+ panic("internal error")
+ }
+ g.P(`dAtA, err := `, pkg, `.Std`, fnname, `Marshal(`, ptr, val, `)`)
+ g.P(`if err != nil {`)
+ g.In()
+ g.P(`return err`)
+ g.Out()
+ g.P(`}`)
+ val = "dAtA"
+ pre, post = "b.EncodeRawBytes(", ")"
+ }
+ if !canFail {
+ g.P("_ = ", pre, val, post)
} else {
- // Even if the type does not need to be generated, we need to iterate
- // over all its fields to be able to mark as used any imported types
- // used by those fields.
- for _, field := range message.Field {
- if !gogoproto.IsStdTime(field) && !gogoproto.IsStdDuration(field) {
- g.RecordTypeUse(field.GetTypeName())
- }
- }
- }
-
- // Update g.Buffer to list valid oneof types.
- // We do this down here, after we've disambiguated the oneof type names.
- // We go in reverse order of insertion point to avoid invalidating offsets.
- for oi := int32(len(message.OneofDecl)); oi >= 0; oi-- {
- ip := oneofInsertPoints[oi]
- all := g.Buffer.Bytes()
- rem := all[ip:]
- g.Buffer = bytes.NewBuffer(all[:ip:ip]) // set cap so we don't scribble on rem
- for _, field := range message.Field {
- if field.OneofIndex == nil || *field.OneofIndex != oi {
- continue
- }
- g.P("//\t*", oneofTypeName[field])
- }
- g.Buffer.Write(rem)
- }
-
- // Reset, String and ProtoMessage methods.
- g.P("func (m *", ccTypeName, ") Reset() { *m = ", ccTypeName, "{} }")
- if gogoproto.EnabledGoStringer(g.file.FileDescriptorProto, message.DescriptorProto) {
- g.P("func (m *", ccTypeName, ") String() string { return ", g.Pkg["proto"], ".CompactTextString(m) }")
- }
- g.P("func (*", ccTypeName, ") ProtoMessage() {}")
- var indexes []string
- for m := message; m != nil; m = m.parent {
- indexes = append([]string{strconv.Itoa(m.index)}, indexes...)
- }
- g.P("func (*", ccTypeName, ") Descriptor() ([]byte, []int) { return ", g.file.VarName(), ", []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
- if len(message.ExtensionRange) > 0 {
- hasExtensions = true
- // message_set_wire_format only makes sense when extensions are defined.
- if opts := message.Options; opts != nil && opts.GetMessageSetWireFormat() {
- isMessageSet = true
- g.P()
- g.P("func (m *", ccTypeName, ") Marshal() ([]byte, error) {")
- g.In()
- g.P("return ", g.Pkg["proto"], ".MarshalMessageSet(&m.XXX_InternalExtensions)")
- g.Out()
- g.P("}")
- g.P("func (m *", ccTypeName, ") Unmarshal(buf []byte) error {")
- g.In()
- g.P("return ", g.Pkg["proto"], ".UnmarshalMessageSet(buf, &m.XXX_InternalExtensions)")
- g.Out()
- g.P("}")
- g.P("func (m *", ccTypeName, ") MarshalJSON() ([]byte, error) {")
- g.In()
- g.P("return ", g.Pkg["proto"], ".MarshalMessageSetJSON(&m.XXX_InternalExtensions)")
- g.Out()
- g.P("}")
- g.P("func (m *", ccTypeName, ") UnmarshalJSON(buf []byte) error {")
- g.In()
- g.P("return ", g.Pkg["proto"], ".UnmarshalMessageSetJSON(buf, &m.XXX_InternalExtensions)")
- g.Out()
- g.P("}")
- g.P("// ensure ", ccTypeName, " satisfies proto.Marshaler and proto.Unmarshaler")
- g.P("var _ ", g.Pkg["proto"], ".Marshaler = (*", ccTypeName, ")(nil)")
- g.P("var _ ", g.Pkg["proto"], ".Unmarshaler = (*", ccTypeName, ")(nil)")
- }
-
- g.P()
- g.P("var extRange_", ccTypeName, " = []", g.Pkg["proto"], ".ExtensionRange{")
+ g.P("if err := ", pre, val, post, "; err != nil {")
g.In()
- for _, r := range message.ExtensionRange {
- end := fmt.Sprint(*r.End - 1) // make range inclusive on both ends
- g.P("{Start: ", r.Start, ", End: ", end, "},")
- }
+ g.P("return err")
g.Out()
g.P("}")
- g.P("func (*", ccTypeName, ") ExtensionRangeArray() []", g.Pkg["proto"], ".ExtensionRange {")
+ }
+ if f.protoType == descriptor.FieldDescriptorProto_TYPE_GROUP {
+ g.P("_ = b.EncodeVarint(", f.fieldNumber, "<<3|", g.Pkg["proto"], ".WireEndGroup)")
+ }
+}
+
+// unmarshalCase prints the case matching this oneof subfield in the unmarshalling code.
+func (f *oneofSubField) unmarshalCase(g *Generator, origOneofName string, oneofName string, mc *msgCtx) {
+ // if field.OneofIndex == nil {
+ // continue
+ // }
+ g.P("case ", f.fieldNumber, ": // ", origOneofName, ".", f.getProtoName())
+ g.P("if wire != ", g.Pkg["proto"], ".", f.wireTypeName(), " {")
+ g.P("return true, ", g.Pkg["proto"], ".ErrInternalBadWireType")
+ g.P("}")
+ lhs := "x, err" // overridden for TYPE_MESSAGE and TYPE_GROUP
+ var dec, cast, cast2 string
+ switch f.protoType {
+ case descriptor.FieldDescriptorProto_TYPE_DOUBLE:
+ dec, cast = "b.DecodeFixed64()", g.Pkg["math"]+".Float64frombits"
+ case descriptor.FieldDescriptorProto_TYPE_FLOAT:
+ dec, cast, cast2 = "b.DecodeFixed32()", "uint32", g.Pkg["math"]+".Float32frombits"
+ case descriptor.FieldDescriptorProto_TYPE_INT64:
+ dec, cast = "b.DecodeVarint()", "int64"
+ case descriptor.FieldDescriptorProto_TYPE_UINT64:
+ dec = "b.DecodeVarint()"
+ case descriptor.FieldDescriptorProto_TYPE_INT32:
+ dec, cast = "b.DecodeVarint()", "int32"
+ case descriptor.FieldDescriptorProto_TYPE_FIXED64:
+ dec = "b.DecodeFixed64()"
+ case descriptor.FieldDescriptorProto_TYPE_FIXED32:
+ dec, cast = "b.DecodeFixed32()", "uint32"
+ case descriptor.FieldDescriptorProto_TYPE_BOOL:
+ dec = "b.DecodeVarint()"
+ // handled specially below
+ case descriptor.FieldDescriptorProto_TYPE_STRING:
+ dec = "b.DecodeStringBytes()"
+ case descriptor.FieldDescriptorProto_TYPE_GROUP:
+ g.P("msg := new(", f.goType[1:], ")") // drop star
+ lhs = "err"
+ dec = "b.DecodeGroup(msg)"
+ // handled specially below
+ case descriptor.FieldDescriptorProto_TYPE_MESSAGE:
+ if gogoproto.IsStdType(f.protoField) {
+ dec = "b.DecodeRawBytes(true)"
+ } else {
+ g.P("msg := new(", f.goType[1:], ")") // drop star
+ lhs = "err"
+ dec = "b.DecodeMessage(msg)"
+ }
+ // handled specially below
+ case descriptor.FieldDescriptorProto_TYPE_BYTES:
+ dec = "b.DecodeRawBytes(true)"
+ case descriptor.FieldDescriptorProto_TYPE_UINT32:
+ dec, cast = "b.DecodeVarint()", "uint32"
+ case descriptor.FieldDescriptorProto_TYPE_ENUM:
+ dec, cast = "b.DecodeVarint()", f.goType
+ case descriptor.FieldDescriptorProto_TYPE_SFIXED32:
+ dec, cast = "b.DecodeFixed32()", "int32"
+ case descriptor.FieldDescriptorProto_TYPE_SFIXED64:
+ dec, cast = "b.DecodeFixed64()", "int64"
+ case descriptor.FieldDescriptorProto_TYPE_SINT32:
+ dec, cast = "b.DecodeZigzag32()", "int32"
+ case descriptor.FieldDescriptorProto_TYPE_SINT64:
+ dec, cast = "b.DecodeZigzag64()", "int64"
+ default:
+ g.Fail("unhandled oneof field type ", f.protoType.String())
+ }
+ g.P(lhs, " := ", dec)
+ val := "x"
+ if f.protoType == descriptor.FieldDescriptorProto_TYPE_BYTES && gogoproto.IsCustomType(f.protoField) {
+ g.P(`if err != nil {`)
g.In()
- g.P("return extRange_", ccTypeName)
+ g.P(`return true, err`)
g.Out()
- g.P("}")
- if !gogoproto.HasExtensionsMap(g.file.FileDescriptorProto, message.DescriptorProto) {
- g.P("func (m *", ccTypeName, ") GetExtensions() *[]byte {")
- g.In()
- g.P("if m.XXX_extensions == nil {")
- g.In()
- g.P("m.XXX_extensions = make([]byte, 0)")
- g.Out()
- g.P("}")
- g.P("return &m.XXX_extensions")
- g.Out()
- g.P("}")
+ g.P(`}`)
+ _, ctyp, err := GetCustomType(f.protoField)
+ if err != nil {
+ panic(err)
+ }
+ g.P(`var cc `, ctyp)
+ g.P(`c := &cc`)
+ g.P(`err = c.Unmarshal(`, val, `)`)
+ val = "*c"
+ } else if gogoproto.IsStdType(f.protoField) {
+ var stdtype string
+ var fnname string
+ if gogoproto.IsStdTime(f.protoField) {
+ stdtype = "time.Time"
+ fnname = "Time"
+ } else if gogoproto.IsStdDuration(f.protoField) {
+ stdtype = "time.Duration"
+ fnname = "Duration"
+ } else if gogoproto.IsStdDouble(f.protoField) {
+ stdtype = "float64"
+ fnname = "Double"
+ } else if gogoproto.IsStdFloat(f.protoField) {
+ stdtype = "float32"
+ fnname = "Float"
+ } else if gogoproto.IsStdInt64(f.protoField) {
+ stdtype = "int64"
+ fnname = "Int64"
+ } else if gogoproto.IsStdUInt64(f.protoField) {
+ stdtype = "uint64"
+ fnname = "UInt64"
+ } else if gogoproto.IsStdInt32(f.protoField) {
+ stdtype = "int32"
+ fnname = "Int32"
+ } else if gogoproto.IsStdUInt32(f.protoField) {
+ stdtype = "uint32"
+ fnname = "UInt32"
+ } else if gogoproto.IsStdBool(f.protoField) {
+ stdtype = "bool"
+ fnname = "Bool"
+ } else if gogoproto.IsStdString(f.protoField) {
+ stdtype = "string"
+ fnname = "String"
+ } else if gogoproto.IsStdBytes(f.protoField) {
+ stdtype = "[]byte"
+ fnname = "Bytes"
+ } else {
+ panic("internal error")
+ }
+
+ pkg := g.useTypes()
+ g.P(`if err != nil {`)
+ g.In()
+ g.P(`return true, err`)
+ g.Out()
+ g.P(`}`)
+ g.P(`c := new(`, stdtype, `)`)
+ g.P(`if err2 := `, pkg, `.Std`, fnname, `Unmarshal(c, `, val, `); err2 != nil {`)
+ g.In()
+ g.P(`return true, err`)
+ g.Out()
+ g.P(`}`)
+ val = "c"
+ }
+ if cast != "" {
+ val = cast + "(" + val + ")"
+ }
+ if cast2 != "" {
+ val = cast2 + "(" + val + ")"
+ }
+ switch f.protoType {
+ case descriptor.FieldDescriptorProto_TYPE_BOOL:
+ val += " != 0"
+ case descriptor.FieldDescriptorProto_TYPE_GROUP,
+ descriptor.FieldDescriptorProto_TYPE_MESSAGE:
+ if !gogoproto.IsStdType(f.protoField) {
+ val = "msg"
}
}
+ if gogoproto.IsCastType(f.protoField) {
+ _, typ, err := getCastType(f.protoField)
+ if err != nil {
+ g.Fail(err.Error())
+ }
+ val = typ + "(" + val + ")"
+ }
+ g.P("m.", oneofName, " = &", f.oneofTypeName, "{", val, "}")
+ g.P("return true, err")
+}
- // Default constants
- defNames := make(map[*descriptor.FieldDescriptorProto]string)
- for _, field := range message.Field {
- def := field.GetDefaultValue()
+// sizerCase prints the case matching this oneof subfield in the sizer code.
+func (f *oneofSubField) sizerCase(g *Generator) {
+ // if field.OneofIndex == nil || int(*field.OneofIndex) != oi {
+ // continue
+ // }
+ g.P("case *", f.oneofTypeName, ":")
+ val := "x." + f.goName
+ var varint, fixed string
+ switch f.protoType {
+ case descriptor.FieldDescriptorProto_TYPE_DOUBLE:
+ fixed = "8"
+ case descriptor.FieldDescriptorProto_TYPE_FLOAT:
+ fixed = "4"
+ case descriptor.FieldDescriptorProto_TYPE_INT64,
+ descriptor.FieldDescriptorProto_TYPE_UINT64,
+ descriptor.FieldDescriptorProto_TYPE_INT32,
+ descriptor.FieldDescriptorProto_TYPE_UINT32,
+ descriptor.FieldDescriptorProto_TYPE_ENUM:
+ varint = val
+ case descriptor.FieldDescriptorProto_TYPE_FIXED64,
+ descriptor.FieldDescriptorProto_TYPE_SFIXED64:
+ fixed = "8"
+ case descriptor.FieldDescriptorProto_TYPE_FIXED32,
+ descriptor.FieldDescriptorProto_TYPE_SFIXED32:
+ fixed = "4"
+ case descriptor.FieldDescriptorProto_TYPE_BOOL:
+ fixed = "1"
+ case descriptor.FieldDescriptorProto_TYPE_STRING:
+ fixed = "len(" + val + ")"
+ varint = fixed
+ case descriptor.FieldDescriptorProto_TYPE_GROUP:
+ fixed = g.Pkg["proto"] + ".Size(" + val + ")"
+ case descriptor.FieldDescriptorProto_TYPE_MESSAGE:
+ if gogoproto.IsStdType(f.protoField) {
+ pkg := g.useTypes()
+ if gogoproto.IsNullable(f.protoField) {
+ val = "*" + val
+ }
+ if gogoproto.IsStdTime(f.protoField) {
+ g.P("s := ", pkg, ".SizeOfStdTime(", val, ")")
+ } else if gogoproto.IsStdDuration(f.protoField) {
+ g.P("s := ", pkg, ".SizeOfStdDuration(", val, ")")
+ } else if gogoproto.IsStdDouble(f.protoField) {
+ g.P("s := ", pkg, ".SizeOfStdDouble(", val, ")")
+ } else if gogoproto.IsStdFloat(f.protoField) {
+ g.P("s := ", pkg, ".SizeOfStdFloat(", val, ")")
+ } else if gogoproto.IsStdInt64(f.protoField) {
+ g.P("s := ", pkg, ".SizeOfStdInt64(", val, ")")
+ } else if gogoproto.IsStdUInt64(f.protoField) {
+ g.P("s := ", pkg, ".SizeOfStdUInt64(", val, ")")
+ } else if gogoproto.IsStdInt32(f.protoField) {
+ g.P("s := ", pkg, ".SizeOfStdInt32(", val, ")")
+ } else if gogoproto.IsStdUInt32(f.protoField) {
+ g.P("s := ", pkg, ".SizeOfStdUInt32(", val, ")")
+ } else if gogoproto.IsStdBool(f.protoField) {
+ g.P("s := ", pkg, ".SizeOfStdBool(", val, ")")
+ } else if gogoproto.IsStdString(f.protoField) {
+ g.P("s := ", pkg, ".SizeOfStdString(", val, ")")
+ } else if gogoproto.IsStdBytes(f.protoField) {
+ g.P("s := ", pkg, ".SizeOfStdBytes(", val, ")")
+ } else {
+ panic("internal error")
+ }
+ } else {
+ g.P("s := ", g.Pkg["proto"], ".Size(", val, ")")
+ }
+ fixed = "s"
+ varint = fixed
+ case descriptor.FieldDescriptorProto_TYPE_BYTES:
+ if gogoproto.IsCustomType(f.protoField) {
+ fixed = val + ".Size()"
+ } else {
+ fixed = "len(" + val + ")"
+ }
+ varint = fixed
+ case descriptor.FieldDescriptorProto_TYPE_SINT32:
+ varint = "(uint32(" + val + ") << 1) ^ uint32((int32(" + val + ") >> 31))"
+ case descriptor.FieldDescriptorProto_TYPE_SINT64:
+ varint = "uint64(" + val + " << 1) ^ uint64((int64(" + val + ") >> 63))"
+ default:
+ g.Fail("unhandled oneof field type ", f.protoType.String())
+ }
+ // Tag and wire varint is known statically,
+ // so don't generate code for that part of the size computation.
+ tagAndWireSize := proto.SizeVarint(uint64(f.fieldNumber << 3)) // wire doesn't affect varint size
+ g.P("n += ", tagAndWireSize, " // tag and wire")
+ if varint != "" {
+ g.P("n += ", g.Pkg["proto"], ".SizeVarint(uint64(", varint, "))")
+ }
+ if fixed != "" {
+ g.P("n += ", fixed)
+ }
+ if f.protoType == descriptor.FieldDescriptorProto_TYPE_GROUP {
+ g.P("n += ", tagAndWireSize, " // tag and wire")
+ }
+}
+
+// getProtoDef returns the default value explicitly stated in the proto file, e.g "yoshi" or "5".
+func (f *oneofSubField) getProtoDef() string {
+ return f.protoDef
+}
+
+// getProtoTypeName returns the protobuf type name for the field as returned by field.GetTypeName(), e.g. ".google.protobuf.Duration".
+func (f *oneofSubField) getProtoTypeName() string {
+ return f.protoTypeName
+}
+
+// getProtoType returns the *field.Type value, e.g. descriptor.FieldDescriptorProto_TYPE_FIXED64.
+func (f *oneofSubField) getProtoType() descriptor.FieldDescriptorProto_Type {
+ return f.protoType
+}
+
+func (f *oneofSubField) getProto() *descriptor.FieldDescriptorProto {
+ return f.protoField
+}
+
+// oneofField represents the oneof on top level.
+// The alternative fields within the oneof are represented by oneofSubField.
+type oneofField struct {
+ fieldCommon
+ subFields []*oneofSubField // All the possible oneof fields
+ comment string // The full comment for the field, e.g. "// Types that are valid to be assigned to MyOneof:\n\\"
+}
+
+// decl prints the declaration of the field in the struct (if any).
+func (f *oneofField) decl(g *Generator, mc *msgCtx) {
+ comment := f.comment
+ for _, sf := range f.subFields {
+ comment += "//\t*" + sf.oneofTypeName + "\n"
+ }
+ g.P(comment, Annotate(mc.message.file, f.fullPath, f.goName), " ", f.goType, " `", f.tags, "`")
+}
+
+// getter for a oneof field will print additional discriminators and interfaces for the oneof,
+// also it prints all the getters for the sub fields.
+func (f *oneofField) getter(g *Generator, mc *msgCtx) {
+ oneof := true
+ if !oneof && !gogoproto.HasGoGetters(g.file.FileDescriptorProto, mc.message.DescriptorProto) {
+ return
+ }
+
+ for _, sf := range f.subFields {
+ if gogoproto.IsEmbed(sf.protoField) || gogoproto.IsCustomType(sf.protoField) {
+ continue
+ }
+ if sf.deprecated != "" {
+ g.P(sf.deprecated)
+ }
+ g.generateGet(mc, sf.protoField, sf.protoType, true, sf.goName, sf.goType, f.goName, sf.oneofTypeName, sf.fullPath, sf.getterName, sf.getterDef)
+ }
+}
+
+// setter prints the setter method of the field.
+func (f *oneofField) setter(g *Generator, mc *msgCtx) {
+ // No setters for oneof yet
+}
+
+// topLevelField interface implemented by all types of fields on the top level (not oneofSubField).
+type topLevelField interface {
+ decl(g *Generator, mc *msgCtx) // print declaration within the struct
+ getter(g *Generator, mc *msgCtx) // print getter
+ setter(g *Generator, mc *msgCtx) // print setter if applicable
+}
+
+// defField interface implemented by all types of fields that can have defaults (not oneofField, but instead oneofSubField).
+type defField interface {
+ getProtoDef() string // default value explicitly stated in the proto file, e.g "yoshi" or "5"
+ getProtoName() string // proto name of a field, e.g. "field_name" or "descriptor"
+ getGoType() string // go type of the field as a string, e.g. "*int32"
+ getProtoTypeName() string // protobuf type name for the field, e.g. ".google.protobuf.Duration"
+ getProtoType() descriptor.FieldDescriptorProto_Type // *field.Type value, e.g. descriptor.FieldDescriptorProto_TYPE_FIXED64
+ getProto() *descriptor.FieldDescriptorProto
+}
+
+// generateDefaultConstants adds constants for default values if needed, which is only if the default value is.
+// explicit in the proto.
+func (g *Generator) generateDefaultConstants(mc *msgCtx, topLevelFields []topLevelField) {
+ // Collect fields that can have defaults
+ dFields := []defField{}
+ for _, pf := range topLevelFields {
+ if f, ok := pf.(*oneofField); ok {
+ for _, osf := range f.subFields {
+ dFields = append(dFields, osf)
+ }
+ continue
+ }
+ dFields = append(dFields, pf.(defField))
+ }
+ for _, df := range dFields {
+ def := df.getProtoDef()
if def == "" {
continue
}
- if !gogoproto.IsNullable(field) {
- g.Fail("illegal default value: ", field.GetName(), " in ", message.GetName(), " is not nullable and is thus not allowed to have a default value")
+ if !gogoproto.IsNullable(df.getProto()) {
+ g.Fail("illegal default value: ", df.getProtoName(), " in ", mc.message.GetName(), " is not nullable and is thus not allowed to have a default value")
}
- fieldname := "Default_" + ccTypeName + "_" + CamelCase(*field.Name)
- defNames[field] = fieldname
- typename, _ := g.GoType(message, field)
+ fieldname := g.defaultConstantName(mc.goName, df.getProtoName())
+ typename := df.getGoType()
if typename[0] == '*' {
typename = typename[1:]
}
@@ -2355,13 +2739,21 @@ func (g *Generator) generateMessage(message *Descriptor) {
case "nan":
def = "math.NaN()"
}
- if *field.Type == descriptor.FieldDescriptorProto_TYPE_FLOAT {
+ if df.getProtoType() == descriptor.FieldDescriptorProto_TYPE_FLOAT {
def = "float32(" + def + ")"
}
kind = "var "
- case *field.Type == descriptor.FieldDescriptorProto_TYPE_ENUM:
+ case df.getProtoType() == descriptor.FieldDescriptorProto_TYPE_FLOAT:
+ if f, err := strconv.ParseFloat(def, 32); err == nil {
+ def = fmt.Sprint(float32(f))
+ }
+ case df.getProtoType() == descriptor.FieldDescriptorProto_TYPE_DOUBLE:
+ if f, err := strconv.ParseFloat(def, 64); err == nil {
+ def = fmt.Sprint(f)
+ }
+ case df.getProtoType() == descriptor.FieldDescriptorProto_TYPE_ENUM:
// Must be an enum. Need to construct the prefixed name.
- obj := g.ObjectNamed(field.GetTypeName())
+ obj := g.ObjectNamed(df.getProtoTypeName())
var enum *EnumDescriptor
if id, ok := obj.(*ImportedDescriptor); ok {
// The enum type has been publicly imported.
@@ -2387,664 +2779,697 @@ func (g *Generator) generateMessage(message *Descriptor) {
def = gogoproto.GetEnumValueCustomName(enumValue)
}
} else {
- g.Fail(fmt.Sprintf("could not resolve default enum value for %v.%v",
- g.DefaultPackageName(obj), def))
-
+ g.Fail(fmt.Sprintf("could not resolve default enum value for %v.%v", g.DefaultPackageName(obj), def))
}
- if gogoproto.EnabledGoEnumPrefix(enum.file, enum.EnumDescriptorProto) {
+ if gogoproto.EnabledGoEnumPrefix(enum.file.FileDescriptorProto, enum.EnumDescriptorProto) {
def = g.DefaultPackageName(obj) + enum.prefix() + def
} else {
def = g.DefaultPackageName(obj) + def
}
}
g.P(kind, fieldname, " ", typename, " = ", def)
- g.file.addExport(message, constOrVarSymbol{fieldname, kind, ""})
+ g.file.addExport(mc.message, constOrVarSymbol{fieldname, kind, ""})
}
g.P()
+}
- // Oneof per-field types, discriminants and getters.
- if message.allowOneof() {
- // Generate unexported named types for the discriminant interfaces.
- // We shouldn't have to do this, but there was (~19 Aug 2015) a compiler/linker bug
- // that was triggered by using anonymous interfaces here.
- // TODO: Revisit this and consider reverting back to anonymous interfaces.
- for oi := range message.OneofDecl {
- dname := oneofDisc[int32(oi)]
- g.P("type ", dname, " interface {")
- g.In()
- g.P(dname, "()")
- if gogoproto.HasEqual(g.file.FileDescriptorProto, message.DescriptorProto) {
- g.P(`Equal(interface{}) bool`)
- }
- if gogoproto.HasVerboseEqual(g.file.FileDescriptorProto, message.DescriptorProto) {
- g.P(`VerboseEqual(interface{}) error`)
- }
- if gogoproto.IsMarshaler(g.file.FileDescriptorProto, message.DescriptorProto) ||
- gogoproto.IsUnsafeMarshaler(g.file.FileDescriptorProto, message.DescriptorProto) {
- g.P(`MarshalTo([]byte) (int, error)`)
- }
- if gogoproto.IsSizer(g.file.FileDescriptorProto, message.DescriptorProto) {
- g.P(`Size() int`)
- }
- if gogoproto.IsProtoSizer(g.file.FileDescriptorProto, message.DescriptorProto) {
- g.P(`ProtoSize() int`)
- }
- g.Out()
- g.P("}")
- }
- g.P()
- for _, field := range message.Field {
- if field.OneofIndex == nil {
- continue
- }
- _, wiretype := g.GoType(message, field)
- tag := "protobuf:" + g.goTag(message, field, wiretype)
- g.P("type ", oneofTypeName[field], " struct{ ", fieldNames[field], " ", fieldTypes[field], " `", tag, "` }")
- if !gogoproto.IsStdTime(field) && !gogoproto.IsStdDuration(field) {
- g.RecordTypeUse(field.GetTypeName())
- }
- }
- g.P()
- for _, field := range message.Field {
- if field.OneofIndex == nil {
- continue
- }
- g.P("func (*", oneofTypeName[field], ") ", oneofDisc[*field.OneofIndex], "() {}")
- }
- g.P()
- for oi := range message.OneofDecl {
- fname := oneofFieldName[int32(oi)]
- g.P("func (m *", ccTypeName, ") Get", fname, "() ", oneofDisc[int32(oi)], " {")
- g.P("if m != nil { return m.", fname, " }")
- g.P("return nil")
- g.P("}")
- }
- g.P()
+// generateGet generates the getter for both the simpleField and oneofSubField.
+// We did not want to duplicate the code since it is quite intricate so we came
+// up with this ugly method. At least the logic is in one place. This can be reworked.
+func (g *Generator) generateGet(mc *msgCtx, protoField *descriptor.FieldDescriptorProto, protoType descriptor.FieldDescriptorProto_Type,
+ oneof bool, fname, tname, uname, oneoftname, fullpath, gname, def string) {
+ star := ""
+ if (protoType != descriptor.FieldDescriptorProto_TYPE_MESSAGE) &&
+ (protoType != descriptor.FieldDescriptorProto_TYPE_GROUP) &&
+ needsStar(protoField, g.file.proto3, mc.message != nil && mc.message.allowOneof()) && tname[0] == '*' {
+ tname = tname[1:]
+ star = "*"
}
-
- // Field getters
- var getters []getterSymbol
- for _, field := range message.Field {
- oneof := field.OneofIndex != nil && message.allowOneof()
- if !oneof && !gogoproto.HasGoGetters(g.file.FileDescriptorProto, message.DescriptorProto) {
- continue
- }
- if gogoproto.IsEmbed(field) || gogoproto.IsCustomType(field) {
- continue
- }
- fname := fieldNames[field]
- typename, _ := g.GoType(message, field)
- if t, ok := mapFieldTypes[field]; ok {
- typename = t
- }
- mname := fieldGetterNames[field]
- star := ""
- if (*field.Type != descriptor.FieldDescriptorProto_TYPE_MESSAGE) &&
- (*field.Type != descriptor.FieldDescriptorProto_TYPE_GROUP) &&
- needsStar(field, g.file.proto3, message != nil && message.allowOneof()) && typename[0] == '*' {
- typename = typename[1:]
- star = "*"
- }
-
- // Only export getter symbols for basic types,
- // and for messages and enums in the same package.
- // Groups are not exported.
- // Foreign types can't be hoisted through a public import because
- // the importer may not already be importing the defining .proto.
- // As an example, imagine we have an import tree like this:
- // A.proto -> B.proto -> C.proto
- // If A publicly imports B, we need to generate the getters from B in A's output,
- // but if one such getter returns something from C then we cannot do that
- // because A is not importing C already.
- var getter, genType bool
- switch *field.Type {
- case descriptor.FieldDescriptorProto_TYPE_GROUP:
- getter = false
- case descriptor.FieldDescriptorProto_TYPE_MESSAGE, descriptor.FieldDescriptorProto_TYPE_ENUM:
- // Only export getter if its return type is in this package.
- getter = g.ObjectNamed(field.GetTypeName()).PackageName() == message.PackageName()
- genType = true
- default:
- getter = true
- }
- if getter {
- getters = append(getters, getterSymbol{
- name: mname,
- typ: typename,
- typeName: field.GetTypeName(),
- genType: genType,
- })
- }
-
- g.P("func (m *", ccTypeName, ") "+mname+"() "+typename+" {")
+ typeDefaultIsNil := false // whether this field type's default value is a literal nil unless specified
+ switch protoType {
+ case descriptor.FieldDescriptorProto_TYPE_BYTES:
+ typeDefaultIsNil = def == "nil"
+ case descriptor.FieldDescriptorProto_TYPE_GROUP, descriptor.FieldDescriptorProto_TYPE_MESSAGE:
+ typeDefaultIsNil = gogoproto.IsNullable(protoField)
+ }
+ if isRepeated(protoField) {
+ typeDefaultIsNil = true
+ }
+ g.P("func (m *", mc.goName, ") ", Annotate(mc.message.file, fullpath, gname), "() "+tname+" {")
+ if !oneof && typeDefaultIsNil {
+ // A bytes field with no explicit default needs less generated code,
+ // as does a message or group field, or a repeated field.
+ g.P("if m != nil {")
g.In()
- def, hasDef := defNames[field]
- typeDefaultIsNil := false // whether this field type's default value is a literal nil unless specified
- switch *field.Type {
- case descriptor.FieldDescriptorProto_TYPE_BYTES:
- typeDefaultIsNil = !hasDef
- case descriptor.FieldDescriptorProto_TYPE_GROUP, descriptor.FieldDescriptorProto_TYPE_MESSAGE:
- typeDefaultIsNil = gogoproto.IsNullable(field)
- }
- if isRepeated(field) {
- typeDefaultIsNil = true
- }
- if typeDefaultIsNil && !oneof {
- // A bytes field with no explicit default needs less generated code,
- // as does a message or group field, or a repeated field.
- g.P("if m != nil {")
- g.In()
- g.P("return m." + fname)
- g.Out()
- g.P("}")
- g.P("return nil")
- g.Out()
- g.P("}")
- g.P()
- continue
- }
- if !gogoproto.IsNullable(field) {
- g.P("if m != nil {")
- g.In()
- g.P("return m." + fname)
- g.Out()
- g.P("}")
- } else if !oneof {
- if message.proto3() {
- g.P("if m != nil {")
- } else {
- g.P("if m != nil && m." + fname + " != nil {")
- }
- g.In()
- g.P("return " + star + "m." + fname)
- g.Out()
- g.P("}")
- } else {
- uname := oneofFieldName[*field.OneofIndex]
- tname := oneofTypeName[field]
- g.P("if x, ok := m.Get", uname, "().(*", tname, "); ok {")
- g.P("return x.", fname)
- g.P("}")
- }
- if hasDef {
- if *field.Type != descriptor.FieldDescriptorProto_TYPE_BYTES {
- g.P("return " + def)
- } else {
- // The default is a []byte var.
- // Make a copy when returning it to be safe.
- g.P("return append([]byte(nil), ", def, "...)")
- }
- } else {
- switch *field.Type {
- case descriptor.FieldDescriptorProto_TYPE_GROUP,
- descriptor.FieldDescriptorProto_TYPE_MESSAGE:
- if field.OneofIndex != nil {
- g.P(`return nil`)
- } else {
- goTyp, _ := g.GoType(message, field)
- goTypName := GoTypeToName(goTyp)
- if !gogoproto.IsNullable(field) && gogoproto.IsStdDuration(field) {
- g.P("return 0")
- } else {
- g.P("return ", goTypName, "{}")
- }
- }
- case descriptor.FieldDescriptorProto_TYPE_BOOL:
- g.P("return false")
- case descriptor.FieldDescriptorProto_TYPE_STRING:
- g.P(`return ""`)
- case descriptor.FieldDescriptorProto_TYPE_BYTES:
- // This is only possible for oneof fields.
- g.P("return nil")
- case descriptor.FieldDescriptorProto_TYPE_ENUM:
- // The default default for an enum is the first value in the enum,
- // not zero.
- obj := g.ObjectNamed(field.GetTypeName())
- var enum *EnumDescriptor
- if id, ok := obj.(*ImportedDescriptor); ok {
- // The enum type has been publicly imported.
- enum, _ = id.o.(*EnumDescriptor)
- } else {
- enum, _ = obj.(*EnumDescriptor)
- }
- if enum == nil {
- log.Printf("don't know how to generate getter for %s", field.GetName())
- continue
- }
- if len(enum.Value) == 0 {
- g.P("return 0 // empty enum")
- } else {
- first := enum.Value[0].GetName()
- if gogoproto.IsEnumValueCustomName(enum.Value[0]) {
- first = gogoproto.GetEnumValueCustomName(enum.Value[0])
- }
-
- if gogoproto.EnabledGoEnumPrefix(enum.file, enum.EnumDescriptorProto) {
- g.P("return ", g.DefaultPackageName(obj)+enum.prefix()+first)
- } else {
- g.P("return ", g.DefaultPackageName(obj)+first)
- }
- }
- default:
- g.P("return 0")
- }
- }
+ g.P("return m." + fname)
+ g.Out()
+ g.P("}")
+ g.P("return nil")
g.Out()
g.P("}")
g.P()
+ return
}
-
- if !message.group {
- ms := &messageSymbol{
- sym: ccTypeName,
- hasExtensions: hasExtensions,
- isMessageSet: isMessageSet,
- hasOneof: len(message.OneofDecl) > 0,
- getters: getters,
+ if !gogoproto.IsNullable(protoField) {
+ g.P("if m != nil {")
+ g.In()
+ g.P("return m." + fname)
+ g.Out()
+ g.P("}")
+ } else if !oneof {
+ if mc.message.proto3() {
+ g.P("if m != nil {")
+ } else {
+ g.P("if m != nil && m." + fname + " != nil {")
}
- g.file.addExport(message, ms)
+ g.In()
+ g.P("return " + star + "m." + fname)
+ g.Out()
+ g.P("}")
+ } else {
+ uname := uname
+ tname := oneoftname
+ g.P("if x, ok := m.Get", uname, "().(*", tname, "); ok {")
+ g.P("return x.", fname)
+ g.P("}")
}
+ g.P("return ", def)
+ g.Out()
+ g.P("}")
+ g.P()
+}
- // Oneof functions
- if len(message.OneofDecl) > 0 && message.allowOneof() {
- fieldWire := make(map[*descriptor.FieldDescriptorProto]string)
-
- // method
- enc := "_" + ccTypeName + "_OneofMarshaler"
- dec := "_" + ccTypeName + "_OneofUnmarshaler"
- size := "_" + ccTypeName + "_OneofSizer"
- encSig := "(msg " + g.Pkg["proto"] + ".Message, b *" + g.Pkg["proto"] + ".Buffer) error"
- decSig := "(msg " + g.Pkg["proto"] + ".Message, tag, wire int, b *" + g.Pkg["proto"] + ".Buffer) (bool, error)"
- sizeSig := "(msg " + g.Pkg["proto"] + ".Message) (n int)"
-
- g.P("// XXX_OneofFuncs is for the internal use of the proto package.")
- g.P("func (*", ccTypeName, ") XXX_OneofFuncs() (func", encSig, ", func", decSig, ", func", sizeSig, ", []interface{}) {")
- g.P("return ", enc, ", ", dec, ", ", size, ", []interface{}{")
- for _, field := range message.Field {
- if field.OneofIndex == nil {
- continue
+// generateInternalStructFields just adds the XXX_ fields to the message struct.
+func (g *Generator) generateInternalStructFields(mc *msgCtx, topLevelFields []topLevelField) {
+ if gogoproto.HasUnkeyed(g.file.FileDescriptorProto, mc.message.DescriptorProto) {
+ g.P("XXX_NoUnkeyedLiteral\tstruct{} `json:\"-\"`") // prevent unkeyed struct literals
+ }
+ if len(mc.message.ExtensionRange) > 0 {
+ if gogoproto.HasExtensionsMap(g.file.FileDescriptorProto, mc.message.DescriptorProto) {
+ messageset := ""
+ if opts := mc.message.Options; opts != nil && opts.GetMessageSetWireFormat() {
+ messageset = "protobuf_messageset:\"1\" "
}
- g.P("(*", oneofTypeName[field], ")(nil),")
+ g.P(g.Pkg["proto"], ".XXX_InternalExtensions `", messageset, "json:\"-\"`")
+ } else {
+ g.P("XXX_extensions\t\t[]byte `protobuf:\"bytes,0,opt\" json:\"-\"`")
}
- g.P("}")
- g.P("}")
- g.P()
+ }
+ if gogoproto.HasUnrecognized(g.file.FileDescriptorProto, mc.message.DescriptorProto) {
+ g.P("XXX_unrecognized\t[]byte `json:\"-\"`")
+ }
+ if gogoproto.HasSizecache(g.file.FileDescriptorProto, mc.message.DescriptorProto) {
+ g.P("XXX_sizecache\tint32 `json:\"-\"`")
+ }
+}
- // marshaler
- g.P("func ", enc, encSig, " {")
- g.P("m := msg.(*", ccTypeName, ")")
- for oi, odp := range message.OneofDecl {
- g.P("// ", odp.GetName())
- fname := oneofFieldName[int32(oi)]
- g.P("switch x := m.", fname, ".(type) {")
- for _, field := range message.Field {
- if field.OneofIndex == nil || int(*field.OneofIndex) != oi {
- continue
- }
- g.P("case *", oneofTypeName[field], ":")
- var wire, pre, post string
- val := "x." + fieldNames[field] // overridden for TYPE_BOOL
- canFail := false // only TYPE_MESSAGE and TYPE_GROUP can fail
- switch *field.Type {
- case descriptor.FieldDescriptorProto_TYPE_DOUBLE:
- wire = "WireFixed64"
- pre = "b.EncodeFixed64(" + g.Pkg["math"] + ".Float64bits("
- post = "))"
- case descriptor.FieldDescriptorProto_TYPE_FLOAT:
- wire = "WireFixed32"
- pre = "b.EncodeFixed32(uint64(" + g.Pkg["math"] + ".Float32bits("
- post = ")))"
- case descriptor.FieldDescriptorProto_TYPE_INT64,
- descriptor.FieldDescriptorProto_TYPE_UINT64:
- wire = "WireVarint"
- pre, post = "b.EncodeVarint(uint64(", "))"
- case descriptor.FieldDescriptorProto_TYPE_INT32,
- descriptor.FieldDescriptorProto_TYPE_UINT32,
- descriptor.FieldDescriptorProto_TYPE_ENUM:
- wire = "WireVarint"
- pre, post = "b.EncodeVarint(uint64(", "))"
- case descriptor.FieldDescriptorProto_TYPE_FIXED64,
- descriptor.FieldDescriptorProto_TYPE_SFIXED64:
- wire = "WireFixed64"
- pre, post = "b.EncodeFixed64(uint64(", "))"
- case descriptor.FieldDescriptorProto_TYPE_FIXED32,
- descriptor.FieldDescriptorProto_TYPE_SFIXED32:
- wire = "WireFixed32"
- pre, post = "b.EncodeFixed32(uint64(", "))"
- case descriptor.FieldDescriptorProto_TYPE_BOOL:
- // bool needs special handling.
- g.P("t := uint64(0)")
- g.P("if ", val, " { t = 1 }")
- val = "t"
- wire = "WireVarint"
- pre, post = "b.EncodeVarint(", ")"
- case descriptor.FieldDescriptorProto_TYPE_STRING:
- wire = "WireBytes"
- pre, post = "b.EncodeStringBytes(", ")"
- case descriptor.FieldDescriptorProto_TYPE_GROUP:
- wire = "WireStartGroup"
- pre, post = "b.Marshal(", ")"
- canFail = true
- case descriptor.FieldDescriptorProto_TYPE_MESSAGE:
- wire = "WireBytes"
- pre, post = "b.EncodeMessage(", ")"
- canFail = true
- case descriptor.FieldDescriptorProto_TYPE_BYTES:
- wire = "WireBytes"
- pre, post = "b.EncodeRawBytes(", ")"
- case descriptor.FieldDescriptorProto_TYPE_SINT32:
- wire = "WireVarint"
- pre, post = "b.EncodeZigzag32(uint64(", "))"
- case descriptor.FieldDescriptorProto_TYPE_SINT64:
- wire = "WireVarint"
- pre, post = "b.EncodeZigzag64(uint64(", "))"
- default:
- g.Fail("unhandled oneof field type ", field.Type.String())
- }
- fieldWire[field] = wire
- g.P("_ = b.EncodeVarint(", field.Number, "<<3|", g.Pkg["proto"], ".", wire, ")")
- if *field.Type == descriptor.FieldDescriptorProto_TYPE_BYTES && gogoproto.IsCustomType(field) {
- g.P(`dAtA, err := `, val, `.Marshal()`)
- g.P(`if err != nil {`)
- g.In()
- g.P(`return err`)
- g.Out()
- g.P(`}`)
- val = "dAtA"
- } else if gogoproto.IsStdTime(field) {
- pkg := g.useTypes()
- if gogoproto.IsNullable(field) {
- g.P(`dAtA, err := `, pkg, `.StdTimeMarshal(*`, val, `)`)
- } else {
- g.P(`dAtA, err := `, pkg, `.StdTimeMarshal(`, val, `)`)
- }
- g.P(`if err != nil {`)
- g.In()
- g.P(`return err`)
- g.Out()
- g.P(`}`)
- val = "dAtA"
- pre, post = "b.EncodeRawBytes(", ")"
- } else if gogoproto.IsStdDuration(field) {
- pkg := g.useTypes()
- if gogoproto.IsNullable(field) {
- g.P(`dAtA, err := `, pkg, `.StdDurationMarshal(*`, val, `)`)
- } else {
- g.P(`dAtA, err := `, pkg, `.StdDurationMarshal(`, val, `)`)
- }
- g.P(`if err != nil {`)
- g.In()
- g.P(`return err`)
- g.Out()
- g.P(`}`)
- val = "dAtA"
- pre, post = "b.EncodeRawBytes(", ")"
- }
- if !canFail {
- g.P("_ = ", pre, val, post)
- } else {
- g.P("if err := ", pre, val, post, "; err != nil {")
- g.In()
- g.P("return err")
- g.Out()
- g.P("}")
- }
- if *field.Type == descriptor.FieldDescriptorProto_TYPE_GROUP {
- g.P("_ = b.EncodeVarint(", field.Number, "<<3|", g.Pkg["proto"], ".WireEndGroup)")
- }
- }
- g.P("case nil:")
- g.P("default: return ", g.Pkg["fmt"], `.Errorf("`, ccTypeName, ".", fname, ` has unexpected type %T", x)`)
- g.P("}")
+// generateOneofFuncs adds all the utility functions for oneof, including marshalling, unmarshalling and sizer.
+func (g *Generator) generateOneofFuncs(mc *msgCtx, topLevelFields []topLevelField) {
+ ofields := []*oneofField{}
+ for _, f := range topLevelFields {
+ if o, ok := f.(*oneofField); ok {
+ ofields = append(ofields, o)
}
+ }
+ if len(ofields) == 0 {
+ return
+ }
+ enc := "_" + mc.goName + "_OneofMarshaler"
+ dec := "_" + mc.goName + "_OneofUnmarshaler"
+ size := "_" + mc.goName + "_OneofSizer"
+ encSig := "(msg " + g.Pkg["proto"] + ".Message, b *" + g.Pkg["proto"] + ".Buffer) error"
+ decSig := "(msg " + g.Pkg["proto"] + ".Message, tag, wire int, b *" + g.Pkg["proto"] + ".Buffer) (bool, error)"
+ sizeSig := "(msg " + g.Pkg["proto"] + ".Message) (n int)"
+
+ // OneofFuncs
+ g.P("// XXX_OneofFuncs is for the internal use of the proto package.")
+ g.P("func (*", mc.goName, ") XXX_OneofFuncs() (func", encSig, ", func", decSig, ", func", sizeSig, ", []interface{}) {")
+ g.P("return ", enc, ", ", dec, ", ", size, ", []interface{}{")
+ for _, of := range ofields {
+ for _, sf := range of.subFields {
+ sf.typedNil(g)
+ }
+ }
+ g.P("}")
+ g.P("}")
+ g.P()
+
+ // marshaler
+ g.P("func ", enc, encSig, " {")
+ g.P("m := msg.(*", mc.goName, ")")
+ for _, of := range ofields {
+ g.P("// ", of.getProtoName())
+ g.P("switch x := m.", of.goName, ".(type) {")
+ for _, sf := range of.subFields {
+ sf.marshalCase(g, mc)
+ }
+ g.P("case nil:")
+ g.P("default: return ", g.Pkg["fmt"], `.Errorf("`, mc.goName, ".", of.goName, ` has unexpected type %T", x)`)
+ g.P("}")
+ }
+ g.P("return nil")
+ g.P("}")
+ g.P()
+
+ // unmarshaler
+ g.P("func ", dec, decSig, " {")
+ g.P("m := msg.(*", mc.goName, ")")
+ g.P("switch tag {")
+ for _, of := range ofields {
+ for _, sf := range of.subFields {
+ sf.unmarshalCase(g, of.getProtoName(), of.goName, mc)
+ }
+ }
+ g.P("default: return false, nil")
+ g.P("}")
+ g.P("}")
+ g.P()
+
+ // sizer
+ g.P("func ", size, sizeSig, " {")
+ g.P("m := msg.(*", mc.goName, ")")
+ for _, of := range ofields {
+ g.P("// ", of.getProtoName())
+ g.P("switch x := m.", of.goName, ".(type) {")
+ for _, sf := range of.subFields {
+ // also fills in field.wire
+ sf.sizerCase(g)
+ }
+ g.P("case nil:")
+ g.P("default:")
+ g.P("panic(", g.Pkg["fmt"], ".Sprintf(\"proto: unexpected type %T in oneof\", x))")
+ g.P("}")
+ }
+ g.P("return n")
+ g.P("}")
+ g.P()
+}
+
+func (g *Generator) generateOneofDecls(mc *msgCtx, topLevelFields []topLevelField) {
+ ofields := []*oneofField{}
+ for _, f := range topLevelFields {
+ if o, ok := f.(*oneofField); ok {
+ ofields = append(ofields, o)
+ }
+ }
+ if len(ofields) == 0 {
+ return
+ }
+ // Oneof per-field types, discriminants and getters.
+ // Generate unexported named types for the discriminant interfaces.
+ // We shouldn't have to do this, but there was (~19 Aug 2015) a compiler/linker bug
+ // that was triggered by using anonymous interfaces here.
+ // TODO: Revisit this and consider reverting back to anonymous interfaces.
+ // for oi := range message.OneofDecl {
+ for _, of := range ofields {
+ dname := of.goType
+ g.P("type ", dname, " interface {")
+ g.In()
+ g.P(dname, "()")
+ if gogoproto.HasEqual(g.file.FileDescriptorProto, mc.message.DescriptorProto) {
+ g.P(`Equal(interface{}) bool`)
+ }
+ if gogoproto.HasVerboseEqual(g.file.FileDescriptorProto, mc.message.DescriptorProto) {
+ g.P(`VerboseEqual(interface{}) error`)
+ }
+ if gogoproto.IsMarshaler(g.file.FileDescriptorProto, mc.message.DescriptorProto) ||
+ gogoproto.IsUnsafeMarshaler(g.file.FileDescriptorProto, mc.message.DescriptorProto) ||
+ gogoproto.IsStableMarshaler(g.file.FileDescriptorProto, mc.message.DescriptorProto) {
+ g.P(`MarshalTo([]byte) (int, error)`)
+ }
+ if gogoproto.IsSizer(g.file.FileDescriptorProto, mc.message.DescriptorProto) {
+ g.P(`Size() int`)
+ }
+ if gogoproto.IsProtoSizer(g.file.FileDescriptorProto, mc.message.DescriptorProto) {
+ g.P(`ProtoSize() int`)
+ }
+ g.Out()
+ g.P("}")
+ }
+ g.P()
+ for _, of := range ofields {
+ for i, sf := range of.subFields {
+ _, wiretype := g.GoType(mc.message, sf.protoField)
+ tag := "protobuf:" + g.goTag(mc.message, sf.protoField, wiretype)
+ fieldFullPath := fmt.Sprintf("%s,%d,%d", mc.message.path, messageFieldPath, i)
+ g.P("type ", Annotate(mc.message.file, fieldFullPath, sf.oneofTypeName), " struct{ ", Annotate(mc.message.file, fieldFullPath, sf.goName), " ", sf.goType, " `", tag, "` }")
+ if !gogoproto.IsStdType(sf.protoField) && !gogoproto.IsCustomType(sf.protoField) && !gogoproto.IsCastType(sf.protoField) {
+ g.RecordTypeUse(sf.protoField.GetTypeName())
+ }
+ }
+ }
+ g.P()
+ for _, of := range ofields {
+ for _, sf := range of.subFields {
+ g.P("func (*", sf.oneofTypeName, ") ", of.goType, "() {}")
+ }
+ }
+ g.P()
+ for _, of := range ofields {
+ fname := of.goName
+ g.P("func (m *", mc.goName, ") Get", fname, "() ", of.goType, " {")
+ g.P("if m != nil { return m.", fname, " }")
g.P("return nil")
g.P("}")
- g.P()
+ }
+ g.P()
+}
- // unmarshaler
- g.P("func ", dec, decSig, " {")
- g.P("m := msg.(*", ccTypeName, ")")
- g.P("switch tag {")
- for _, field := range message.Field {
- if field.OneofIndex == nil {
- continue
- }
- odp := message.OneofDecl[int(*field.OneofIndex)]
- g.P("case ", field.Number, ": // ", odp.GetName(), ".", *field.Name)
- g.P("if wire != ", g.Pkg["proto"], ".", fieldWire[field], " {")
- g.P("return true, ", g.Pkg["proto"], ".ErrInternalBadWireType")
- g.P("}")
- lhs := "x, err" // overridden for TYPE_MESSAGE and TYPE_GROUP
- var dec, cast, cast2 string
- switch *field.Type {
- case descriptor.FieldDescriptorProto_TYPE_DOUBLE:
- dec, cast = "b.DecodeFixed64()", g.Pkg["math"]+".Float64frombits"
- case descriptor.FieldDescriptorProto_TYPE_FLOAT:
- dec, cast, cast2 = "b.DecodeFixed32()", "uint32", g.Pkg["math"]+".Float32frombits"
- case descriptor.FieldDescriptorProto_TYPE_INT64:
- dec, cast = "b.DecodeVarint()", "int64"
- case descriptor.FieldDescriptorProto_TYPE_UINT64:
- dec = "b.DecodeVarint()"
- case descriptor.FieldDescriptorProto_TYPE_INT32:
- dec, cast = "b.DecodeVarint()", "int32"
- case descriptor.FieldDescriptorProto_TYPE_FIXED64:
- dec = "b.DecodeFixed64()"
- case descriptor.FieldDescriptorProto_TYPE_FIXED32:
- dec, cast = "b.DecodeFixed32()", "uint32"
- case descriptor.FieldDescriptorProto_TYPE_BOOL:
- dec = "b.DecodeVarint()"
- // handled specially below
- case descriptor.FieldDescriptorProto_TYPE_STRING:
- dec = "b.DecodeStringBytes()"
- case descriptor.FieldDescriptorProto_TYPE_GROUP:
- g.P("msg := new(", fieldTypes[field][1:], ")") // drop star
- lhs = "err"
- dec = "b.DecodeGroup(msg)"
- // handled specially below
- case descriptor.FieldDescriptorProto_TYPE_MESSAGE:
- if gogoproto.IsStdTime(field) || gogoproto.IsStdDuration(field) {
- dec = "b.DecodeRawBytes(true)"
- } else {
- g.P("msg := new(", fieldTypes[field][1:], ")") // drop star
- lhs = "err"
- dec = "b.DecodeMessage(msg)"
- }
- // handled specially below
- case descriptor.FieldDescriptorProto_TYPE_BYTES:
- dec = "b.DecodeRawBytes(true)"
- case descriptor.FieldDescriptorProto_TYPE_UINT32:
- dec, cast = "b.DecodeVarint()", "uint32"
- case descriptor.FieldDescriptorProto_TYPE_ENUM:
- dec, cast = "b.DecodeVarint()", fieldTypes[field]
- case descriptor.FieldDescriptorProto_TYPE_SFIXED32:
- dec, cast = "b.DecodeFixed32()", "int32"
- case descriptor.FieldDescriptorProto_TYPE_SFIXED64:
- dec, cast = "b.DecodeFixed64()", "int64"
- case descriptor.FieldDescriptorProto_TYPE_SINT32:
- dec, cast = "b.DecodeZigzag32()", "int32"
- case descriptor.FieldDescriptorProto_TYPE_SINT64:
- dec, cast = "b.DecodeZigzag64()", "int64"
- default:
- g.Fail("unhandled oneof field type ", field.Type.String())
- }
- g.P(lhs, " := ", dec)
- val := "x"
- if *field.Type == descriptor.FieldDescriptorProto_TYPE_BYTES && gogoproto.IsCustomType(field) {
- g.P(`if err != nil {`)
- g.In()
- g.P(`return true, err`)
- g.Out()
- g.P(`}`)
- _, ctyp, err := GetCustomType(field)
- if err != nil {
- panic(err)
- }
- g.P(`var cc `, ctyp)
- g.P(`c := &cc`)
- g.P(`err = c.Unmarshal(`, val, `)`)
- val = "*c"
- } else if gogoproto.IsStdTime(field) {
- pkg := g.useTypes()
- g.P(`if err != nil {`)
- g.In()
- g.P(`return true, err`)
- g.Out()
- g.P(`}`)
- g.P(`c := new(time.Time)`)
- g.P(`if err2 := `, pkg, `.StdTimeUnmarshal(c, `, val, `); err2 != nil {`)
- g.In()
- g.P(`return true, err`)
- g.Out()
- g.P(`}`)
- val = "c"
- } else if gogoproto.IsStdDuration(field) {
- pkg := g.useTypes()
- g.P(`if err != nil {`)
- g.In()
- g.P(`return true, err`)
- g.Out()
- g.P(`}`)
- g.P(`c := new(time.Duration)`)
- g.P(`if err2 := `, pkg, `.StdDurationUnmarshal(c, `, val, `); err2 != nil {`)
- g.In()
- g.P(`return true, err`)
- g.Out()
- g.P(`}`)
- val = "c"
- }
- if cast != "" {
- val = cast + "(" + val + ")"
- }
- if cast2 != "" {
- val = cast2 + "(" + val + ")"
- }
- switch *field.Type {
- case descriptor.FieldDescriptorProto_TYPE_BOOL:
- val += " != 0"
- case descriptor.FieldDescriptorProto_TYPE_GROUP,
- descriptor.FieldDescriptorProto_TYPE_MESSAGE:
- if !gogoproto.IsStdTime(field) && !gogoproto.IsStdDuration(field) {
- val = "msg"
- }
- }
- if gogoproto.IsCastType(field) {
- _, typ, err := getCastType(field)
- if err != nil {
- g.Fail(err.Error())
- }
- val = typ + "(" + val + ")"
- }
- g.P("m.", oneofFieldName[*field.OneofIndex], " = &", oneofTypeName[field], "{", val, "}")
- g.P("return true, err")
+// generateMessageStruct adds the actual struct with it's members (but not methods) to the output.
+func (g *Generator) generateMessageStruct(mc *msgCtx, topLevelFields []topLevelField) {
+ comments := g.PrintComments(mc.message.path)
+
+ // Guarantee deprecation comments appear after user-provided comments.
+ if mc.message.GetOptions().GetDeprecated() {
+ if comments {
+ // Convention: Separate deprecation comments from original
+ // comments with an empty line.
+ g.P("//")
}
- g.P("default: return false, nil")
+ g.P(deprecationComment)
+ }
+ g.P("type ", Annotate(mc.message.file, mc.message.path, mc.goName), " struct {")
+ for _, pf := range topLevelFields {
+ pf.decl(g, mc)
+ }
+ g.generateInternalStructFields(mc, topLevelFields)
+ g.P("}")
+}
+
+// generateGetters adds getters for all fields, including oneofs and weak fields when applicable.
+func (g *Generator) generateGetters(mc *msgCtx, topLevelFields []topLevelField) {
+ for _, pf := range topLevelFields {
+ pf.getter(g, mc)
+
+ }
+}
+
+// generateSetters add setters for all fields, including oneofs and weak fields when applicable.
+func (g *Generator) generateSetters(mc *msgCtx, topLevelFields []topLevelField) {
+ for _, pf := range topLevelFields {
+ pf.setter(g, mc)
+ }
+}
+
+// generateCommonMethods adds methods to the message that are not on a per field basis.
+func (g *Generator) generateCommonMethods(mc *msgCtx) {
+ // Reset, String and ProtoMessage methods.
+ g.P("func (m *", mc.goName, ") Reset() { *m = ", mc.goName, "{} }")
+ if gogoproto.EnabledGoStringer(g.file.FileDescriptorProto, mc.message.DescriptorProto) {
+ g.P("func (m *", mc.goName, ") String() string { return ", g.Pkg["proto"], ".CompactTextString(m) }")
+ }
+ g.P("func (*", mc.goName, ") ProtoMessage() {}")
+ var indexes []string
+ for m := mc.message; m != nil; m = m.parent {
+ indexes = append([]string{strconv.Itoa(m.index)}, indexes...)
+ }
+ g.P("func (*", mc.goName, ") Descriptor() ([]byte, []int) {")
+ g.P("return ", g.file.VarName(), ", []int{", strings.Join(indexes, ", "), "}")
+ g.P("}")
+ // TODO: Revisit the decision to use a XXX_WellKnownType method
+ // if we change proto.MessageName to work with multiple equivalents.
+ if mc.message.file.GetPackage() == "google.protobuf" && wellKnownTypes[mc.message.GetName()] {
+ g.P("func (*", mc.goName, `) XXX_WellKnownType() string { return "`, mc.message.GetName(), `" }`)
+ }
+
+ // Extension support methods
+ if len(mc.message.ExtensionRange) > 0 {
+ g.P()
+ g.P("var extRange_", mc.goName, " = []", g.Pkg["proto"], ".ExtensionRange{")
+ g.In()
+ for _, r := range mc.message.ExtensionRange {
+ end := fmt.Sprint(*r.End - 1) // make range inclusive on both ends
+ g.P("{Start: ", r.Start, ", End: ", end, "},")
+ }
+ g.Out()
g.P("}")
+ g.P("func (*", mc.goName, ") ExtensionRangeArray() []", g.Pkg["proto"], ".ExtensionRange {")
+ g.In()
+ g.P("return extRange_", mc.goName)
+ g.Out()
g.P("}")
g.P()
+ if !gogoproto.HasExtensionsMap(g.file.FileDescriptorProto, mc.message.DescriptorProto) {
+ g.P("func (m *", mc.goName, ") GetExtensions() *[]byte {")
+ g.In()
+ g.P("if m.XXX_extensions == nil {")
+ g.In()
+ g.P("m.XXX_extensions = make([]byte, 0)")
+ g.Out()
+ g.P("}")
+ g.P("return &m.XXX_extensions")
+ g.Out()
+ g.P("}")
+ }
+ }
- // sizer
- g.P("func ", size, sizeSig, " {")
- g.P("m := msg.(*", ccTypeName, ")")
- for oi, odp := range message.OneofDecl {
- g.P("// ", odp.GetName())
- fname := oneofFieldName[int32(oi)]
- g.P("switch x := m.", fname, ".(type) {")
- for _, field := range message.Field {
- if field.OneofIndex == nil || int(*field.OneofIndex) != oi {
+ // TODO: It does not scale to keep adding another method for every
+ // operation on protos that we want to switch over to using the
+ // table-driven approach. Instead, we should only add a single method
+ // that allows getting access to the *InternalMessageInfo struct and then
+ // calling Unmarshal, Marshal, Merge, Size, and Discard directly on that.
+
+ // Wrapper for table-driven marshaling and unmarshaling.
+ g.P("func (m *", mc.goName, ") XXX_Unmarshal(b []byte) error {")
+ g.In()
+ if gogoproto.IsUnmarshaler(g.file.FileDescriptorProto, mc.message.DescriptorProto) {
+ g.P("return m.Unmarshal(b)")
+ } else {
+ g.P("return xxx_messageInfo_", mc.goName, ".Unmarshal(m, b)")
+ }
+ g.Out()
+ g.P("}")
+
+ g.P("func (m *", mc.goName, ") XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {")
+ g.In()
+ if gogoproto.IsMarshaler(g.file.FileDescriptorProto, mc.message.DescriptorProto) ||
+ gogoproto.IsUnsafeMarshaler(g.file.FileDescriptorProto, mc.message.DescriptorProto) {
+ if gogoproto.IsStableMarshaler(g.file.FileDescriptorProto, mc.message.DescriptorProto) {
+ g.P("b = b[:cap(b)]")
+ g.P("n, err := m.MarshalTo(b)")
+ g.P("if err != nil {")
+ g.In()
+ g.P("return nil, err")
+ g.Out()
+ g.P("}")
+ g.P("return b[:n], nil")
+ } else {
+ g.P("if deterministic {")
+ g.In()
+ g.P("return xxx_messageInfo_", mc.goName, ".Marshal(b, m, deterministic)")
+ g.P("} else {")
+ g.In()
+ g.P("b = b[:cap(b)]")
+ g.P("n, err := m.MarshalTo(b)")
+ g.P("if err != nil {")
+ g.In()
+ g.P("return nil, err")
+ g.Out()
+ g.P("}")
+ g.Out()
+ g.P("return b[:n], nil")
+ g.Out()
+ g.P("}")
+ }
+ } else {
+ g.P("return xxx_messageInfo_", mc.goName, ".Marshal(b, m, deterministic)")
+ }
+ g.Out()
+ g.P("}")
+
+ g.P("func (m *", mc.goName, ") XXX_Merge(src ", g.Pkg["proto"], ".Message) {")
+ g.In()
+ g.P("xxx_messageInfo_", mc.goName, ".Merge(m, src)")
+ g.Out()
+ g.P("}")
+
+ g.P("func (m *", mc.goName, ") XXX_Size() int {") // avoid name clash with "Size" field in some message
+ g.In()
+ if (gogoproto.IsMarshaler(g.file.FileDescriptorProto, mc.message.DescriptorProto) ||
+ gogoproto.IsUnsafeMarshaler(g.file.FileDescriptorProto, mc.message.DescriptorProto)) &&
+ gogoproto.IsSizer(g.file.FileDescriptorProto, mc.message.DescriptorProto) {
+ g.P("return m.Size()")
+ } else if (gogoproto.IsMarshaler(g.file.FileDescriptorProto, mc.message.DescriptorProto) ||
+ gogoproto.IsUnsafeMarshaler(g.file.FileDescriptorProto, mc.message.DescriptorProto)) &&
+ gogoproto.IsProtoSizer(g.file.FileDescriptorProto, mc.message.DescriptorProto) {
+ g.P("return m.ProtoSize()")
+ } else {
+ g.P("return xxx_messageInfo_", mc.goName, ".Size(m)")
+ }
+ g.Out()
+ g.P("}")
+
+ g.P("func (m *", mc.goName, ") XXX_DiscardUnknown() {")
+ g.In()
+ g.P("xxx_messageInfo_", mc.goName, ".DiscardUnknown(m)")
+ g.Out()
+ g.P("}")
+
+ g.P("var xxx_messageInfo_", mc.goName, " ", g.Pkg["proto"], ".InternalMessageInfo")
+}
+
+// Generate the type and default constant definitions for this Descriptor.
+func (g *Generator) generateMessage(message *Descriptor) {
+ topLevelFields := []topLevelField{}
+ oFields := make(map[int32]*oneofField)
+ // The full type name
+ typeName := message.TypeName()
+ // The full type name, CamelCased.
+ goTypeName := CamelCaseSlice(typeName)
+
+ usedNames := make(map[string]bool)
+ for _, n := range methodNames {
+ usedNames[n] = true
+ }
+ if !gogoproto.IsProtoSizer(message.file.FileDescriptorProto, message.DescriptorProto) {
+ usedNames["Size"] = true
+ }
+
+ // allocNames finds a conflict-free variation of the given strings,
+ // consistently mutating their suffixes.
+ // It returns the same number of strings.
+ allocNames := func(ns ...string) []string {
+ Loop:
+ for {
+ for _, n := range ns {
+ if usedNames[n] {
+ for i := range ns {
+ ns[i] += "_"
+ }
+ continue Loop
+ }
+ }
+ for _, n := range ns {
+ usedNames[n] = true
+ }
+ return ns
+ }
+ }
+
+ mapFieldTypes := make(map[*descriptor.FieldDescriptorProto]string) // keep track of the map fields to be added later
+
+ for i, field := range message.Field {
+ // Allocate the getter and the field at the same time so name
+ // collisions create field/method consistent names.
+ // TODO: This allocation occurs based on the order of the fields
+ // in the proto file, meaning that a change in the field
+ // ordering can change generated Method/Field names.
+ base := CamelCase(*field.Name)
+ if gogoproto.IsCustomName(field) {
+ base = gogoproto.GetCustomName(field)
+ }
+ ns := allocNames(base, "Get"+base)
+ fieldName, fieldGetterName := ns[0], ns[1]
+
+ typename, wiretype := g.GoType(message, field)
+ jsonName := *field.Name
+ jsonTag := jsonName + ",omitempty"
+ repeatedNativeType := (!field.IsMessage() && !gogoproto.IsCustomType(field) && field.IsRepeated())
+ if !gogoproto.IsNullable(field) && !repeatedNativeType {
+ jsonTag = jsonName
+ }
+ gogoJsonTag := gogoproto.GetJsonTag(field)
+ if gogoJsonTag != nil {
+ jsonTag = *gogoJsonTag
+ }
+ gogoMoreTags := gogoproto.GetMoreTags(field)
+ moreTags := ""
+ if gogoMoreTags != nil {
+ moreTags = " " + *gogoMoreTags
+ }
+ tag := fmt.Sprintf("protobuf:%s json:%q%s", g.goTag(message, field, wiretype), jsonTag, moreTags)
+ if *field.Type == descriptor.FieldDescriptorProto_TYPE_MESSAGE && gogoproto.IsEmbed(field) {
+ fieldName = ""
+ }
+
+ oneof := field.OneofIndex != nil && message.allowOneof()
+ if oneof && oFields[*field.OneofIndex] == nil {
+ odp := message.OneofDecl[int(*field.OneofIndex)]
+ base := CamelCase(odp.GetName())
+ names := allocNames(base, "Get"+base)
+ fname, gname := names[0], names[1]
+
+ // This is the first field of a oneof we haven't seen before.
+ // Generate the union field.
+ oneofFullPath := fmt.Sprintf("%s,%d,%d", message.path, messageOneofPath, *field.OneofIndex)
+ c, ok := g.makeComments(oneofFullPath)
+ if ok {
+ c += "\n//\n"
+ }
+ c += "// Types that are valid to be assigned to " + fname + ":\n"
+ // Generate the rest of this comment later,
+ // when we've computed any disambiguation.
+
+ dname := "is" + goTypeName + "_" + fname
+ tag := `protobuf_oneof:"` + odp.GetName() + `"`
+ of := oneofField{
+ fieldCommon: fieldCommon{
+ goName: fname,
+ getterName: gname,
+ goType: dname,
+ tags: tag,
+ protoName: odp.GetName(),
+ fullPath: oneofFullPath,
+ protoField: field,
+ },
+ comment: c,
+ }
+ topLevelFields = append(topLevelFields, &of)
+ oFields[*field.OneofIndex] = &of
+ }
+
+ if *field.Type == descriptor.FieldDescriptorProto_TYPE_MESSAGE {
+ desc := g.ObjectNamed(field.GetTypeName())
+ if d, ok := desc.(*Descriptor); ok && d.GetOptions().GetMapEntry() {
+ m := g.GoMapType(d, field)
+ typename = m.GoType
+ mapFieldTypes[field] = typename // record for the getter generation
+
+ tag += fmt.Sprintf(" protobuf_key:%s protobuf_val:%s", m.KeyTag, m.ValueTag)
+ }
+ }
+ goTyp, _ := g.GoType(message, field)
+ fieldDeprecated := ""
+ if field.GetOptions().GetDeprecated() {
+ fieldDeprecated = deprecationComment
+ }
+ dvalue := g.getterDefault(field, goTypeName, GoTypeToName(goTyp))
+ if oneof {
+ tname := goTypeName + "_" + fieldName
+ // It is possible for this to collide with a message or enum
+ // nested in this message. Check for collisions.
+ for {
+ ok := true
+ for _, desc := range message.nested {
+ if CamelCaseSlice(desc.TypeName()) == tname {
+ ok = false
+ break
+ }
+ }
+ for _, enum := range message.enums {
+ if CamelCaseSlice(enum.TypeName()) == tname {
+ ok = false
+ break
+ }
+ }
+ if !ok {
+ tname += "_"
continue
}
- g.P("case *", oneofTypeName[field], ":")
- val := "x." + fieldNames[field]
- var wire, varint, fixed string
- switch *field.Type {
- case descriptor.FieldDescriptorProto_TYPE_DOUBLE:
- wire = "WireFixed64"
- fixed = "8"
- case descriptor.FieldDescriptorProto_TYPE_FLOAT:
- wire = "WireFixed32"
- fixed = "4"
- case descriptor.FieldDescriptorProto_TYPE_INT64,
- descriptor.FieldDescriptorProto_TYPE_UINT64,
- descriptor.FieldDescriptorProto_TYPE_INT32,
- descriptor.FieldDescriptorProto_TYPE_UINT32,
- descriptor.FieldDescriptorProto_TYPE_ENUM:
- wire = "WireVarint"
- varint = val
- case descriptor.FieldDescriptorProto_TYPE_FIXED64,
- descriptor.FieldDescriptorProto_TYPE_SFIXED64:
- wire = "WireFixed64"
- fixed = "8"
- case descriptor.FieldDescriptorProto_TYPE_FIXED32,
- descriptor.FieldDescriptorProto_TYPE_SFIXED32:
- wire = "WireFixed32"
- fixed = "4"
- case descriptor.FieldDescriptorProto_TYPE_BOOL:
- wire = "WireVarint"
- fixed = "1"
- case descriptor.FieldDescriptorProto_TYPE_STRING:
- wire = "WireBytes"
- fixed = "len(" + val + ")"
- varint = fixed
- case descriptor.FieldDescriptorProto_TYPE_GROUP:
- wire = "WireStartGroup"
- fixed = g.Pkg["proto"] + ".Size(" + val + ")"
- case descriptor.FieldDescriptorProto_TYPE_MESSAGE:
- wire = "WireBytes"
- if gogoproto.IsStdTime(field) {
- if gogoproto.IsNullable(field) {
- val = "*" + val
- }
- pkg := g.useTypes()
- g.P("s := ", pkg, ".SizeOfStdTime(", val, ")")
- } else if gogoproto.IsStdDuration(field) {
- if gogoproto.IsNullable(field) {
- val = "*" + val
- }
- pkg := g.useTypes()
- g.P("s := ", pkg, ".SizeOfStdDuration(", val, ")")
- } else {
- g.P("s := ", g.Pkg["proto"], ".Size(", val, ")")
- }
- fixed = "s"
- varint = fixed
- case descriptor.FieldDescriptorProto_TYPE_BYTES:
- wire = "WireBytes"
- if gogoproto.IsCustomType(field) {
- fixed = val + ".Size()"
- } else {
- fixed = "len(" + val + ")"
- }
- varint = fixed
- case descriptor.FieldDescriptorProto_TYPE_SINT32:
- wire = "WireVarint"
- varint = "(uint32(" + val + ") << 1) ^ uint32((int32(" + val + ") >> 31))"
- case descriptor.FieldDescriptorProto_TYPE_SINT64:
- wire = "WireVarint"
- varint = "uint64(" + val + " << 1) ^ uint64((int64(" + val + ") >> 63))"
- default:
- g.Fail("unhandled oneof field type ", field.Type.String())
- }
- g.P("n += ", g.Pkg["proto"], ".SizeVarint(", field.Number, "<<3|", g.Pkg["proto"], ".", wire, ")")
- if varint != "" {
- g.P("n += ", g.Pkg["proto"], ".SizeVarint(uint64(", varint, "))")
- }
- if fixed != "" {
- g.P("n += ", fixed)
- }
- if *field.Type == descriptor.FieldDescriptorProto_TYPE_GROUP {
- g.P("n += ", g.Pkg["proto"], ".SizeVarint(", field.Number, "<<3|", g.Pkg["proto"], ".WireEndGroup)")
+ break
+ }
+
+ oneofField := oFields[*field.OneofIndex]
+ tag = "protobuf:" + g.goTag(message, field, wiretype)
+ sf := oneofSubField{
+ fieldCommon: fieldCommon{
+ goName: fieldName,
+ getterName: fieldGetterName,
+ goType: typename,
+ tags: tag,
+ protoName: field.GetName(),
+ fullPath: fmt.Sprintf("%s,%d,%d", message.path, messageFieldPath, i),
+ protoField: field,
+ },
+ protoTypeName: field.GetTypeName(),
+ fieldNumber: int(*field.Number),
+ protoType: *field.Type,
+ getterDef: dvalue,
+ protoDef: field.GetDefaultValue(),
+ oneofTypeName: tname,
+ deprecated: fieldDeprecated,
+ wireType: wireTypeName(field),
+ }
+
+ oneofField.subFields = append(oneofField.subFields, &sf)
+ if !gogoproto.IsStdType(field) && !gogoproto.IsCustomType(field) && !gogoproto.IsCastType(field) {
+ g.RecordTypeUse(field.GetTypeName())
+ }
+ continue
+ }
+
+ fieldFullPath := fmt.Sprintf("%s,%d,%d", message.path, messageFieldPath, i)
+ c, ok := g.makeComments(fieldFullPath)
+ if ok {
+ c += "\n"
+ }
+ rf := simpleField{
+ fieldCommon: fieldCommon{
+ goName: fieldName,
+ getterName: fieldGetterName,
+ goType: typename,
+ tags: tag,
+ protoName: field.GetName(),
+ fullPath: fieldFullPath,
+ protoField: field,
+ },
+ protoTypeName: field.GetTypeName(),
+ protoType: *field.Type,
+ deprecated: fieldDeprecated,
+ getterDef: dvalue,
+ protoDef: field.GetDefaultValue(),
+ comment: c,
+ }
+ var pf topLevelField = &rf
+
+ topLevelFields = append(topLevelFields, pf)
+
+ if gogoproto.HasTypeDecl(message.file.FileDescriptorProto, message.DescriptorProto) {
+ if !gogoproto.IsStdType(field) && !gogoproto.IsCustomType(field) && !gogoproto.IsCastType(field) {
+ g.RecordTypeUse(field.GetTypeName())
+ }
+ } else {
+ // Even if the type does not need to be generated, we need to iterate
+ // over all its fields to be able to mark as used any imported types
+ // used by those fields.
+ for _, mfield := range message.Field {
+ if !gogoproto.IsStdType(mfield) && !gogoproto.IsCustomType(mfield) && !gogoproto.IsCastType(mfield) {
+ g.RecordTypeUse(mfield.GetTypeName())
}
}
- g.P("case nil:")
- g.P("default:")
- g.P("panic(", g.Pkg["fmt"], ".Sprintf(\"proto: unexpected type %T in oneof\", x))")
- g.P("}")
}
- g.P("return n")
- g.P("}")
+ }
+
+ mc := &msgCtx{
+ goName: goTypeName,
+ message: message,
+ }
+
+ if gogoproto.HasTypeDecl(message.file.FileDescriptorProto, message.DescriptorProto) {
+ g.generateMessageStruct(mc, topLevelFields)
g.P()
}
+ g.generateCommonMethods(mc)
+ g.P()
+ g.generateDefaultConstants(mc, topLevelFields)
+ g.P()
+ g.generateOneofDecls(mc, topLevelFields)
+ g.P()
+ g.generateGetters(mc, topLevelFields)
+ g.P()
+ g.generateSetters(mc, topLevelFields)
+ g.P()
+ g.generateOneofFuncs(mc, topLevelFields)
+ g.P()
+
+ var oneofTypes []string
+ for _, f := range topLevelFields {
+ if of, ok := f.(*oneofField); ok {
+ for _, osf := range of.subFields {
+ oneofTypes = append(oneofTypes, osf.oneofTypeName)
+ }
+ }
+ }
+
+ opts := message.Options
+ ms := &messageSymbol{
+ sym: goTypeName,
+ hasExtensions: len(message.ExtensionRange) > 0,
+ isMessageSet: opts != nil && opts.GetMessageSetWireFormat(),
+ oneofTypes: oneofTypes,
+ }
+ g.file.addExport(message, ms)
for _, ext := range message.ext {
g.generateExtension(ext)
@@ -3055,10 +3480,41 @@ func (g *Generator) generateMessage(message *Descriptor) {
fullName = *g.file.Package + "." + fullName
}
- g.addInitf("%s.RegisterType((*%s)(nil), %q)", g.Pkg["proto"], ccTypeName, fullName)
+ g.addInitf("%s.RegisterType((*%s)(nil), %q)", g.Pkg["proto"], goTypeName, fullName)
if gogoproto.ImportsGoGoProto(g.file.FileDescriptorProto) && gogoproto.RegistersGolangProto(g.file.FileDescriptorProto) {
- g.addInitf("%s.RegisterType((*%s)(nil), %q)", g.Pkg["golang_proto"], ccTypeName, fullName)
+ g.addInitf("%s.RegisterType((*%s)(nil), %q)", g.Pkg["golang_proto"], goTypeName, fullName)
}
+ if gogoproto.HasMessageName(g.file.FileDescriptorProto, message.DescriptorProto) {
+ g.P("func (*", goTypeName, ") XXX_MessageName() string {")
+ g.In()
+ g.P("return ", strconv.Quote(fullName))
+ g.Out()
+ g.P("}")
+ }
+ // Register types for native map types.
+ for _, k := range mapFieldKeys(mapFieldTypes) {
+ fullName := strings.TrimPrefix(*k.TypeName, ".")
+ g.addInitf("%s.RegisterMapType((%s)(nil), %q)", g.Pkg["proto"], mapFieldTypes[k], fullName)
+ if gogoproto.ImportsGoGoProto(g.file.FileDescriptorProto) && gogoproto.RegistersGolangProto(g.file.FileDescriptorProto) {
+ g.addInitf("%s.RegisterMapType((%s)(nil), %q)", g.Pkg["golang_proto"], mapFieldTypes[k], fullName)
+ }
+ }
+}
+
+type byTypeName []*descriptor.FieldDescriptorProto
+
+func (a byTypeName) Len() int { return len(a) }
+func (a byTypeName) Swap(i, j int) { a[i], a[j] = a[j], a[i] }
+func (a byTypeName) Less(i, j int) bool { return *a[i].TypeName < *a[j].TypeName }
+
+// mapFieldKeys returns the keys of m in a consistent order.
+func mapFieldKeys(m map[*descriptor.FieldDescriptorProto]string) []*descriptor.FieldDescriptorProto {
+ keys := make([]*descriptor.FieldDescriptorProto, 0, len(m))
+ for k := range m {
+ keys = append(keys, k)
+ }
+ sort.Sort(byTypeName(keys))
+ return keys
}
var escapeChars = [256]byte{
@@ -3147,12 +3603,15 @@ func (g *Generator) generateExtension(ext *ExtensionDescriptor) {
typeName := ext.TypeName()
// Special case for proto2 message sets: If this extension is extending
- // proto2_bridge.MessageSet, and its final name component is "message_set_extension",
+ // proto2.bridge.MessageSet, and its final name component is "message_set_extension",
// then drop that last component.
- mset := false
- if extendedType == "*proto2_bridge.MessageSet" && typeName[len(typeName)-1] == "message_set_extension" {
+ //
+ // TODO: This should be implemented in the text formatter rather than the generator.
+ // In addition, the situation for when to apply this special case is implemented
+ // differently in other languages:
+ // https://github.com/google/protobuf/blob/aff10976/src/google/protobuf/text_format.cc#L1560
+ if extDesc.GetOptions().GetMessageSetWireFormat() && typeName[len(typeName)-1] == "message_set_extension" {
typeName = typeName[:len(typeName)-1]
- mset = true
}
// For text formatting, the package must be exactly what the .proto file declares,
@@ -3175,29 +3634,12 @@ func (g *Generator) generateExtension(ext *ExtensionDescriptor) {
g.P("}")
g.P()
- if mset {
- // Generate a bit more code to register with message_set.go.
- g.addInitf("%s.RegisterMessageSetType((%s)(nil), %d, %q)", g.Pkg["proto"], fieldType, *field.Number, extName)
- if gogoproto.ImportsGoGoProto(g.file.FileDescriptorProto) && gogoproto.RegistersGolangProto(g.file.FileDescriptorProto) {
- g.addInitf("%s.RegisterMessageSetType((%s)(nil), %d, %q)", g.Pkg["golang_proto"], fieldType, *field.Number, extName)
- }
- }
+ g.addInitf("%s.RegisterExtension(%s)", g.Pkg["proto"], ext.DescName())
g.file.addExport(ext, constOrVarSymbol{ccTypeName, "var", ""})
}
func (g *Generator) generateInitFunction() {
- for _, enum := range g.file.enum {
- g.generateEnumRegistration(enum)
- }
- for _, d := range g.file.desc {
- for _, ext := range d.ext {
- g.generateExtensionRegistration(ext)
- }
- }
- for _, ext := range g.file.ext {
- g.generateExtensionRegistration(ext)
- }
if len(g.init) == 0 {
return
}
@@ -3271,13 +3713,6 @@ func (g *Generator) generateEnumRegistration(enum *EnumDescriptor) {
}
}
-func (g *Generator) generateExtensionRegistration(ext *ExtensionDescriptor) {
- g.addInitf("%s.RegisterExtension(%s)", g.Pkg["proto"], ext.DescName())
- if gogoproto.ImportsGoGoProto(g.file.FileDescriptorProto) && gogoproto.RegistersGolangProto(g.file.FileDescriptorProto) {
- g.addInitf("%s.RegisterExtension(%s)", g.Pkg["golang_proto"], ext.DescName())
- }
-}
-
// And now lots of helper functions.
// Is c an ASCII lower-case letter?
@@ -3385,6 +3820,44 @@ func IsScalar(field *descriptor.FieldDescriptorProto) bool {
}
}
+func wireTypeName(field *descriptor.FieldDescriptorProto) string {
+ switch *field.Type {
+ case descriptor.FieldDescriptorProto_TYPE_DOUBLE:
+ return "WireFixed64"
+ case descriptor.FieldDescriptorProto_TYPE_FLOAT:
+ return "WireFixed32"
+ case descriptor.FieldDescriptorProto_TYPE_INT64,
+ descriptor.FieldDescriptorProto_TYPE_UINT64:
+ return "WireVarint"
+ case descriptor.FieldDescriptorProto_TYPE_INT32,
+ descriptor.FieldDescriptorProto_TYPE_UINT32,
+ descriptor.FieldDescriptorProto_TYPE_ENUM:
+ return "WireVarint"
+ case descriptor.FieldDescriptorProto_TYPE_FIXED64,
+ descriptor.FieldDescriptorProto_TYPE_SFIXED64:
+ return "WireFixed64"
+ case descriptor.FieldDescriptorProto_TYPE_FIXED32,
+ descriptor.FieldDescriptorProto_TYPE_SFIXED32:
+ return "WireFixed32"
+ case descriptor.FieldDescriptorProto_TYPE_BOOL:
+ return "WireVarint"
+ case descriptor.FieldDescriptorProto_TYPE_STRING:
+ return "WireBytes"
+ case descriptor.FieldDescriptorProto_TYPE_GROUP:
+ return "WireStartGroup"
+ case descriptor.FieldDescriptorProto_TYPE_MESSAGE:
+ return "WireBytes"
+ case descriptor.FieldDescriptorProto_TYPE_BYTES:
+ return "WireBytes"
+ case descriptor.FieldDescriptorProto_TYPE_SINT32:
+ return "WireVarint"
+ case descriptor.FieldDescriptorProto_TYPE_SINT64:
+ return "WireVarint"
+ default:
+ return "WireVarint"
+ }
+}
+
// badToUnderscore is the mapping function used to generate Go names from package names,
// which can be dotted in the input .proto file. It replaces non-identifier characters such as
// dot or dash with underscore.
@@ -3429,3 +3902,14 @@ const (
// tag numbers in EnumDescriptorProto
enumValuePath = 2 // value
)
+
+var supportTypeAliases bool
+
+func init() {
+ for _, tag := range build.Default.ReleaseTags {
+ if tag == "go1.9" {
+ supportTypeAliases = true
+ return
+ }
+ }
+}
diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/generator/helper.go b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/generator/helper.go
index d7a406e7c..abd821ce7 100644
--- a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/generator/helper.go
+++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/generator/helper.go
@@ -118,7 +118,7 @@ func (this *pluginImports) NewImport(pkg string) Single {
func (this *pluginImports) GenerateImports(file *FileDescriptor) {
for _, s := range this.singles {
if s.IsUsed() {
- this.generator.PrintImport(s.Name(), s.Location())
+ this.generator.PrintImport(GoPackageName(s.Name()), GoImportPath(s.Location()))
}
}
}
@@ -137,7 +137,7 @@ type importedPackage struct {
importPrefix string
}
-func newImportedPackage(importPrefix, pkg string) *importedPackage {
+func newImportedPackage(importPrefix string, pkg string) *importedPackage {
return &importedPackage{
pkg: pkg,
importPrefix: importPrefix,
@@ -146,7 +146,7 @@ func newImportedPackage(importPrefix, pkg string) *importedPackage {
func (this *importedPackage) Use() string {
if !this.used {
- this.name = RegisterUniquePackageName(this.pkg, nil)
+ this.name = string(cleanPackageName(this.pkg))
this.used = true
}
return this.name
@@ -182,7 +182,7 @@ func (g *Generator) GetFieldName(message *Descriptor, field *descriptor.FieldDes
return fieldname + "_"
}
}
- if !gogoproto.IsProtoSizer(message.file, message.DescriptorProto) {
+ if !gogoproto.IsProtoSizer(message.file.FileDescriptorProto, message.DescriptorProto) {
if fieldname == "Size" {
return fieldname + "_"
}
@@ -204,7 +204,7 @@ func (g *Generator) GetOneOfFieldName(message *Descriptor, field *descriptor.Fie
return fieldname + "_"
}
}
- if !gogoproto.IsProtoSizer(message.file, message.DescriptorProto) {
+ if !gogoproto.IsProtoSizer(message.file.FileDescriptorProto, message.DescriptorProto) {
if fieldname == "Size" {
return fieldname + "_"
}
@@ -262,6 +262,13 @@ func (g *Generator) GetMapValueField(field, valField *descriptor.FieldDescriptor
}
}
+ wktptr := gogoproto.IsWktPtr(field)
+ if wktptr {
+ if err := proto.SetExtension(valField.Options, gogoproto.E_Wktpointer, &wktptr); err != nil {
+ g.Fail(err.Error())
+ }
+ }
+
if valType := gogoproto.GetCastValue(field); len(valType) > 0 {
if err := proto.SetExtension(valField.Options, gogoproto.E_Casttype, &valType); err != nil {
g.Fail(err.Error())
@@ -333,20 +340,22 @@ func (g *Generator) GeneratePlugin(p Plugin) {
continue
}
g.Response.File = append(g.Response.File, &plugin.CodeGeneratorResponse_File{
- Name: proto.String(file.goFileName()),
+ Name: proto.String(file.goFileName(g.pathType)),
Content: proto.String(g.String()),
})
}
}
-func (g *Generator) SetFile(file *descriptor.FileDescriptorProto) {
- g.file = g.FileOf(file)
+func (g *Generator) SetFile(filename string) {
+ g.file = g.fileByName(filename)
}
func (g *Generator) generatePlugin(file *FileDescriptor, p Plugin) {
g.writtenImports = make(map[string]bool)
- g.file = g.FileOf(file.FileDescriptorProto)
- g.usedPackages = make(map[string]bool)
+ g.usedPackages = make(map[GoImportPath]bool)
+ g.packageNames = make(map[GoImportPath]GoPackageName)
+ g.usedPackageNames = make(map[GoPackageName]bool)
+ g.file = file
// Run the plugins before the imports so we know which imports are necessary.
p.Generate(file)
@@ -355,7 +364,7 @@ func (g *Generator) generatePlugin(file *FileDescriptor, p Plugin) {
rem := g.Buffer
g.Buffer = new(bytes.Buffer)
g.generateHeader()
- p.GenerateImports(g.file)
+ // p.GenerateImports(g.file)
g.generateImports()
if !g.writeOutput {
return
@@ -445,3 +454,7 @@ func (g *Generator) useTypes() string {
g.customImports = append(g.customImports, "github.com/gogo/protobuf/types")
return pkg
}
+
+func (d *FileDescriptor) GoPackageName() string {
+ return string(d.packageName)
+}
diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/generator/internal/remap/remap.go b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/generator/internal/remap/remap.go
new file mode 100644
index 000000000..a9b61036c
--- /dev/null
+++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/generator/internal/remap/remap.go
@@ -0,0 +1,117 @@
+// Go support for Protocol Buffers - Google's data interchange format
+//
+// Copyright 2017 The Go Authors. All rights reserved.
+// https://github.com/golang/protobuf
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+/*
+Package remap handles tracking the locations of Go tokens in a source text
+across a rewrite by the Go formatter.
+*/
+package remap
+
+import (
+ "fmt"
+ "go/scanner"
+ "go/token"
+)
+
+// A Location represents a span of byte offsets in the source text.
+type Location struct {
+ Pos, End int // End is exclusive
+}
+
+// A Map represents a mapping between token locations in an input source text
+// and locations in the correspnding output text.
+type Map map[Location]Location
+
+// Find reports whether the specified span is recorded by m, and if so returns
+// the new location it was mapped to. If the input span was not found, the
+// returned location is the same as the input.
+func (m Map) Find(pos, end int) (Location, bool) {
+ key := Location{
+ Pos: pos,
+ End: end,
+ }
+ if loc, ok := m[key]; ok {
+ return loc, true
+ }
+ return key, false
+}
+
+func (m Map) add(opos, oend, npos, nend int) {
+ m[Location{Pos: opos, End: oend}] = Location{Pos: npos, End: nend}
+}
+
+// Compute constructs a location mapping from input to output. An error is
+// reported if any of the tokens of output cannot be mapped.
+func Compute(input, output []byte) (Map, error) {
+ itok := tokenize(input)
+ otok := tokenize(output)
+ if len(itok) != len(otok) {
+ return nil, fmt.Errorf("wrong number of tokens, %d ≠%d", len(itok), len(otok))
+ }
+ m := make(Map)
+ for i, ti := range itok {
+ to := otok[i]
+ if ti.Token != to.Token {
+ return nil, fmt.Errorf("token %d type mismatch: %s ≠%s", i+1, ti, to)
+ }
+ m.add(ti.pos, ti.end, to.pos, to.end)
+ }
+ return m, nil
+}
+
+// tokinfo records the span and type of a source token.
+type tokinfo struct {
+ pos, end int
+ token.Token
+}
+
+func tokenize(src []byte) []tokinfo {
+ fs := token.NewFileSet()
+ var s scanner.Scanner
+ s.Init(fs.AddFile("src", fs.Base(), len(src)), src, nil, scanner.ScanComments)
+ var info []tokinfo
+ for {
+ pos, next, lit := s.Scan()
+ switch next {
+ case token.SEMICOLON:
+ continue
+ }
+ info = append(info, tokinfo{
+ pos: int(pos - 1),
+ end: int(pos + token.Pos(len(lit)) - 1),
+ Token: next,
+ })
+ if next == token.EOF {
+ break
+ }
+ }
+ return info
+}
diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/grpc/grpc.go b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/grpc/grpc.go
index 06abe9b6a..42661f9df 100644
--- a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/grpc/grpc.go
+++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/grpc/grpc.go
@@ -52,7 +52,7 @@ const generatedCodeVersion = 4
// Paths for packages used by code generated in this file,
// relative to the import_prefix of the generator.Generator.
const (
- contextPkgPath = "golang.org/x/net/context"
+ contextPkgPath = "context"
grpcPkgPath = "google.golang.org/grpc"
)
@@ -82,8 +82,6 @@ var (
// Init initializes the plugin.
func (g *grpc) Init(gen *generator.Generator) {
g.gen = gen
- contextPkg = generator.RegisterUniquePackageName("context", nil)
- grpcPkg = generator.RegisterUniquePackageName("grpc", nil)
}
// Given a type name defined in a .proto, return its object.
@@ -107,6 +105,9 @@ func (g *grpc) Generate(file *generator.FileDescriptor) {
return
}
+ contextPkg = string(g.gen.AddImport(contextPkgPath))
+ grpcPkg = string(g.gen.AddImport(grpcPkgPath))
+
g.P("// Reference imports to suppress errors if they are not otherwise used.")
g.P("var _ ", contextPkg, ".Context")
g.P("var _ ", grpcPkg, ".ClientConn")
@@ -124,24 +125,19 @@ func (g *grpc) Generate(file *generator.FileDescriptor) {
}
// GenerateImports generates the import declaration for this file.
-func (g *grpc) GenerateImports(file *generator.FileDescriptor) {
- if len(file.FileDescriptorProto.Service) == 0 {
- return
- }
- imports := generator.NewPluginImports(g.gen)
- for _, i := range []string{contextPkgPath, grpcPkgPath} {
- imports.NewImport(i).Use()
- }
- imports.GenerateImports(file)
-}
+func (g *grpc) GenerateImports(file *generator.FileDescriptor) {}
// reservedClientName records whether a client name is reserved on the client side.
var reservedClientName = map[string]bool{
-// TODO: do we need any in gRPC?
+ // TODO: do we need any in gRPC?
}
func unexport(s string) string { return strings.ToLower(s[:1]) + s[1:] }
+// deprecationComment is the standard comment added to deprecated
+// messages, fields, enums, and enum values.
+var deprecationComment = "// Deprecated: Do not use."
+
// generateService generates all the code for the named service.
func (g *grpc) generateService(file *generator.FileDescriptor, service *pb.ServiceDescriptorProto, index int) {
path := fmt.Sprintf("6,%d", index) // 6 means service.
@@ -152,12 +148,18 @@ func (g *grpc) generateService(file *generator.FileDescriptor, service *pb.Servi
fullServName = pkg + "." + fullServName
}
servName := generator.CamelCase(origServName)
+ deprecated := service.GetOptions().GetDeprecated()
g.P()
- g.P("// Client API for ", servName, " service")
- g.P()
+ g.P(fmt.Sprintf(`// %sClient is the client API for %s service.
+//
+// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.`, servName, servName))
// Client interface.
+ if deprecated {
+ g.P("//")
+ g.P(deprecationComment)
+ }
g.P("type ", servName, "Client interface {")
for i, method := range service.Method {
g.gen.PrintComments(fmt.Sprintf("%s,2,%d", path, i)) // 2 means method in a service.
@@ -173,6 +175,9 @@ func (g *grpc) generateService(file *generator.FileDescriptor, service *pb.Servi
g.P()
// NewClient factory.
+ if deprecated {
+ g.P(deprecationComment)
+ }
g.P("func New", servName, "Client (cc *", grpcPkg, ".ClientConn) ", servName, "Client {")
g.P("return &", unexport(servName), "Client{cc}")
g.P("}")
@@ -195,11 +200,13 @@ func (g *grpc) generateService(file *generator.FileDescriptor, service *pb.Servi
g.generateClientMethod(servName, fullServName, serviceDescVar, method, descExpr)
}
- g.P("// Server API for ", servName, " service")
- g.P()
-
// Server interface.
serverType := servName + "Server"
+ g.P("// ", serverType, " is the server API for ", servName, " service.")
+ if deprecated {
+ g.P("//")
+ g.P(deprecationComment)
+ }
g.P("type ", serverType, " interface {")
for i, method := range service.Method {
g.gen.PrintComments(fmt.Sprintf("%s,2,%d", path, i)) // 2 means method in a service.
@@ -209,6 +216,9 @@ func (g *grpc) generateService(file *generator.FileDescriptor, service *pb.Servi
g.P()
// Server registration.
+ if deprecated {
+ g.P(deprecationComment)
+ }
g.P("func Register", servName, "Server(s *", grpcPkg, ".Server, srv ", serverType, ") {")
g.P("s.RegisterService(&", serviceDescVar, `, srv)`)
g.P("}")
@@ -282,11 +292,14 @@ func (g *grpc) generateClientMethod(servName, fullServName, serviceDescVar strin
inType := g.typeName(method.GetInputType())
outType := g.typeName(method.GetOutputType())
+ if method.GetOptions().GetDeprecated() {
+ g.P(deprecationComment)
+ }
g.P("func (c *", unexport(servName), "Client) ", g.generateClientSignature(servName, method), "{")
if !method.GetServerStreaming() && !method.GetClientStreaming() {
g.P("out := new(", outType, ")")
// TODO: Pass descExpr to Invoke.
- g.P("err := ", grpcPkg, `.Invoke(ctx, "`, sname, `", in, out, c.cc, opts...)`)
+ g.P(`err := c.cc.Invoke(ctx, "`, sname, `", in, out, opts...)`)
g.P("if err != nil { return nil, err }")
g.P("return out, nil")
g.P("}")
@@ -294,7 +307,7 @@ func (g *grpc) generateClientMethod(servName, fullServName, serviceDescVar strin
return
}
streamType := unexport(servName) + methName + "Client"
- g.P("stream, err := ", grpcPkg, ".NewClientStream(ctx, ", descExpr, `, c.cc, "`, sname, `", opts...)`)
+ g.P("stream, err := c.cc.NewStream(ctx, ", descExpr, `, "`, sname, `", opts...)`)
g.P("if err != nil { return nil, err }")
g.P("x := &", streamType, "{stream}")
if !method.GetClientStreaming() {
diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/plugin/plugin.pb.go b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/plugin/plugin.pb.go
index c673d5035..131d05ffe 100644
--- a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/plugin/plugin.pb.go
+++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/plugin/plugin.pb.go
@@ -1,23 +1,14 @@
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: plugin.proto
-/*
-Package plugin_go is a generated protocol buffer package.
-
-It is generated from these files:
- plugin.proto
-
-It has these top-level messages:
- Version
- CodeGeneratorRequest
- CodeGeneratorResponse
-*/
package plugin_go
-import proto "github.com/gogo/protobuf/proto"
-import fmt "fmt"
-import math "math"
-import google_protobuf "github.com/gogo/protobuf/protoc-gen-gogo/descriptor"
+import (
+ fmt "fmt"
+ proto "github.com/gogo/protobuf/proto"
+ descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor"
+ math "math"
+)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
@@ -37,14 +28,35 @@ type Version struct {
Patch *int32 `protobuf:"varint,3,opt,name=patch" json:"patch,omitempty"`
// A suffix for alpha, beta or rc release, e.g., "alpha-1", "rc2". It should
// be empty for mainline stable releases.
- Suffix *string `protobuf:"bytes,4,opt,name=suffix" json:"suffix,omitempty"`
- XXX_unrecognized []byte `json:"-"`
+ Suffix *string `protobuf:"bytes,4,opt,name=suffix" json:"suffix,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *Version) Reset() { *m = Version{} }
-func (m *Version) String() string { return proto.CompactTextString(m) }
-func (*Version) ProtoMessage() {}
-func (*Version) Descriptor() ([]byte, []int) { return fileDescriptorPlugin, []int{0} }
+func (m *Version) Reset() { *m = Version{} }
+func (m *Version) String() string { return proto.CompactTextString(m) }
+func (*Version) ProtoMessage() {}
+func (*Version) Descriptor() ([]byte, []int) {
+ return fileDescriptor_22a625af4bc1cc87, []int{0}
+}
+func (m *Version) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_Version.Unmarshal(m, b)
+}
+func (m *Version) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_Version.Marshal(b, m, deterministic)
+}
+func (m *Version) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_Version.Merge(m, src)
+}
+func (m *Version) XXX_Size() int {
+ return xxx_messageInfo_Version.Size(m)
+}
+func (m *Version) XXX_DiscardUnknown() {
+ xxx_messageInfo_Version.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Version proto.InternalMessageInfo
func (m *Version) GetMajor() int32 {
if m != nil && m.Major != nil {
@@ -96,16 +108,37 @@ type CodeGeneratorRequest struct {
//
// Type names of fields and extensions in the FileDescriptorProto are always
// fully qualified.
- ProtoFile []*google_protobuf.FileDescriptorProto `protobuf:"bytes,15,rep,name=proto_file,json=protoFile" json:"proto_file,omitempty"`
+ ProtoFile []*descriptor.FileDescriptorProto `protobuf:"bytes,15,rep,name=proto_file,json=protoFile" json:"proto_file,omitempty"`
// The version number of protocol compiler.
- CompilerVersion *Version `protobuf:"bytes,3,opt,name=compiler_version,json=compilerVersion" json:"compiler_version,omitempty"`
- XXX_unrecognized []byte `json:"-"`
+ CompilerVersion *Version `protobuf:"bytes,3,opt,name=compiler_version,json=compilerVersion" json:"compiler_version,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *CodeGeneratorRequest) Reset() { *m = CodeGeneratorRequest{} }
-func (m *CodeGeneratorRequest) String() string { return proto.CompactTextString(m) }
-func (*CodeGeneratorRequest) ProtoMessage() {}
-func (*CodeGeneratorRequest) Descriptor() ([]byte, []int) { return fileDescriptorPlugin, []int{1} }
+func (m *CodeGeneratorRequest) Reset() { *m = CodeGeneratorRequest{} }
+func (m *CodeGeneratorRequest) String() string { return proto.CompactTextString(m) }
+func (*CodeGeneratorRequest) ProtoMessage() {}
+func (*CodeGeneratorRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_22a625af4bc1cc87, []int{1}
+}
+func (m *CodeGeneratorRequest) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_CodeGeneratorRequest.Unmarshal(m, b)
+}
+func (m *CodeGeneratorRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_CodeGeneratorRequest.Marshal(b, m, deterministic)
+}
+func (m *CodeGeneratorRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_CodeGeneratorRequest.Merge(m, src)
+}
+func (m *CodeGeneratorRequest) XXX_Size() int {
+ return xxx_messageInfo_CodeGeneratorRequest.Size(m)
+}
+func (m *CodeGeneratorRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_CodeGeneratorRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_CodeGeneratorRequest proto.InternalMessageInfo
func (m *CodeGeneratorRequest) GetFileToGenerate() []string {
if m != nil {
@@ -121,7 +154,7 @@ func (m *CodeGeneratorRequest) GetParameter() string {
return ""
}
-func (m *CodeGeneratorRequest) GetProtoFile() []*google_protobuf.FileDescriptorProto {
+func (m *CodeGeneratorRequest) GetProtoFile() []*descriptor.FileDescriptorProto {
if m != nil {
return m.ProtoFile
}
@@ -145,15 +178,36 @@ type CodeGeneratorResponse struct {
// problem in protoc itself -- such as the input CodeGeneratorRequest being
// unparseable -- should be reported by writing a message to stderr and
// exiting with a non-zero status code.
- Error *string `protobuf:"bytes,1,opt,name=error" json:"error,omitempty"`
- File []*CodeGeneratorResponse_File `protobuf:"bytes,15,rep,name=file" json:"file,omitempty"`
- XXX_unrecognized []byte `json:"-"`
+ Error *string `protobuf:"bytes,1,opt,name=error" json:"error,omitempty"`
+ File []*CodeGeneratorResponse_File `protobuf:"bytes,15,rep,name=file" json:"file,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *CodeGeneratorResponse) Reset() { *m = CodeGeneratorResponse{} }
-func (m *CodeGeneratorResponse) String() string { return proto.CompactTextString(m) }
-func (*CodeGeneratorResponse) ProtoMessage() {}
-func (*CodeGeneratorResponse) Descriptor() ([]byte, []int) { return fileDescriptorPlugin, []int{2} }
+func (m *CodeGeneratorResponse) Reset() { *m = CodeGeneratorResponse{} }
+func (m *CodeGeneratorResponse) String() string { return proto.CompactTextString(m) }
+func (*CodeGeneratorResponse) ProtoMessage() {}
+func (*CodeGeneratorResponse) Descriptor() ([]byte, []int) {
+ return fileDescriptor_22a625af4bc1cc87, []int{2}
+}
+func (m *CodeGeneratorResponse) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_CodeGeneratorResponse.Unmarshal(m, b)
+}
+func (m *CodeGeneratorResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_CodeGeneratorResponse.Marshal(b, m, deterministic)
+}
+func (m *CodeGeneratorResponse) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_CodeGeneratorResponse.Merge(m, src)
+}
+func (m *CodeGeneratorResponse) XXX_Size() int {
+ return xxx_messageInfo_CodeGeneratorResponse.Size(m)
+}
+func (m *CodeGeneratorResponse) XXX_DiscardUnknown() {
+ xxx_messageInfo_CodeGeneratorResponse.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_CodeGeneratorResponse proto.InternalMessageInfo
func (m *CodeGeneratorResponse) GetError() string {
if m != nil && m.Error != nil {
@@ -222,16 +276,35 @@ type CodeGeneratorResponse_File struct {
// If |insertion_point| is present, |name| must also be present.
InsertionPoint *string `protobuf:"bytes,2,opt,name=insertion_point,json=insertionPoint" json:"insertion_point,omitempty"`
// The file contents.
- Content *string `protobuf:"bytes,15,opt,name=content" json:"content,omitempty"`
- XXX_unrecognized []byte `json:"-"`
+ Content *string `protobuf:"bytes,15,opt,name=content" json:"content,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
func (m *CodeGeneratorResponse_File) Reset() { *m = CodeGeneratorResponse_File{} }
func (m *CodeGeneratorResponse_File) String() string { return proto.CompactTextString(m) }
func (*CodeGeneratorResponse_File) ProtoMessage() {}
func (*CodeGeneratorResponse_File) Descriptor() ([]byte, []int) {
- return fileDescriptorPlugin, []int{2, 0}
+ return fileDescriptor_22a625af4bc1cc87, []int{2, 0}
}
+func (m *CodeGeneratorResponse_File) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_CodeGeneratorResponse_File.Unmarshal(m, b)
+}
+func (m *CodeGeneratorResponse_File) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_CodeGeneratorResponse_File.Marshal(b, m, deterministic)
+}
+func (m *CodeGeneratorResponse_File) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_CodeGeneratorResponse_File.Merge(m, src)
+}
+func (m *CodeGeneratorResponse_File) XXX_Size() int {
+ return xxx_messageInfo_CodeGeneratorResponse_File.Size(m)
+}
+func (m *CodeGeneratorResponse_File) XXX_DiscardUnknown() {
+ xxx_messageInfo_CodeGeneratorResponse_File.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_CodeGeneratorResponse_File proto.InternalMessageInfo
func (m *CodeGeneratorResponse_File) GetName() string {
if m != nil && m.Name != nil {
@@ -261,9 +334,9 @@ func init() {
proto.RegisterType((*CodeGeneratorResponse_File)(nil), "google.protobuf.compiler.CodeGeneratorResponse.File")
}
-func init() { proto.RegisterFile("plugin.proto", fileDescriptorPlugin) }
+func init() { proto.RegisterFile("plugin.proto", fileDescriptor_22a625af4bc1cc87) }
-var fileDescriptorPlugin = []byte{
+var fileDescriptor_22a625af4bc1cc87 = []byte{
// 383 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x92, 0xcd, 0x6a, 0xd5, 0x40,
0x14, 0xc7, 0x89, 0x37, 0xb5, 0xe4, 0xb4, 0x34, 0x65, 0xa8, 0x32, 0x94, 0x2e, 0xe2, 0x45, 0x30,
diff --git a/vendor/github.com/gogo/protobuf/types/any.go b/vendor/github.com/gogo/protobuf/types/any.go
index d83c3ad00..df4787de3 100644
--- a/vendor/github.com/gogo/protobuf/types/any.go
+++ b/vendor/github.com/gogo/protobuf/types/any.go
@@ -129,10 +129,12 @@ func UnmarshalAny(any *Any, pb proto.Message) error {
// Is returns true if any value contains a given message type.
func Is(any *Any, pb proto.Message) bool {
- aname, err := AnyMessageName(any)
- if err != nil {
+ // The following is equivalent to AnyMessageName(any) == proto.MessageName(pb),
+ // but it avoids scanning TypeUrl for the slash.
+ if any == nil {
return false
}
-
- return aname == proto.MessageName(pb)
+ name := proto.MessageName(pb)
+ prefix := len(any.TypeUrl) - len(name)
+ return prefix >= 1 && any.TypeUrl[prefix-1] == '/' && any.TypeUrl[prefix:] == name
}
diff --git a/vendor/github.com/gogo/protobuf/types/any.pb.go b/vendor/github.com/gogo/protobuf/types/any.pb.go
index 4b5f5705a..202fe8e00 100644
--- a/vendor/github.com/gogo/protobuf/types/any.pb.go
+++ b/vendor/github.com/gogo/protobuf/types/any.pb.go
@@ -1,27 +1,17 @@
// Code generated by protoc-gen-gogo. DO NOT EDIT.
-// source: any.proto
+// source: google/protobuf/any.proto
-/*
- Package types is a generated protocol buffer package.
-
- It is generated from these files:
- any.proto
-
- It has these top-level messages:
- Any
-*/
package types
-import proto "github.com/gogo/protobuf/proto"
-import fmt "fmt"
-import math "math"
-
-import bytes "bytes"
-
-import strings "strings"
-import reflect "reflect"
-
-import io "io"
+import (
+ bytes "bytes"
+ fmt "fmt"
+ proto "github.com/gogo/protobuf/proto"
+ io "io"
+ math "math"
+ reflect "reflect"
+ strings "strings"
+)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
@@ -115,17 +105,19 @@ const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
// }
//
type Any struct {
- // A URL/resource name whose content describes the type of the
- // serialized protocol buffer message.
+ // A URL/resource name that uniquely identifies the type of the serialized
+ // protocol buffer message. This string must contain at least
+ // one "/" character. The last segment of the URL's path must represent
+ // the fully qualified name of the type (as in
+ // `path/google.protobuf.Duration`). The name should be in a canonical form
+ // (e.g., leading "." is not accepted).
//
- // For URLs which use the scheme `http`, `https`, or no scheme, the
- // following restrictions and interpretations apply:
+ // In practice, teams usually precompile into the binary all types that they
+ // expect it to use in the context of Any. However, for URLs which use the
+ // scheme `http`, `https`, or no scheme, one can optionally set up a type
+ // server that maps type URLs to message definitions as follows:
//
// * If no scheme is provided, `https` is assumed.
- // * The last segment of the URL's path must represent the fully
- // qualified name of the type (as in `path/google.protobuf.Duration`).
- // The name should be in a canonical form (e.g., leading "." is
- // not accepted).
// * An HTTP GET on the URL must yield a [google.protobuf.Type][]
// value in binary format, or produce an error.
// * Applications are allowed to cache lookup results based on the
@@ -134,18 +126,53 @@ type Any struct {
// on changes to types. (Use versioned type names to manage
// breaking changes.)
//
+ // Note: this functionality is not currently available in the official
+ // protobuf release, and it is not used for type URLs beginning with
+ // type.googleapis.com.
+ //
// Schemes other than `http`, `https` (or the empty scheme) might be
// used with implementation specific semantics.
//
TypeUrl string `protobuf:"bytes,1,opt,name=type_url,json=typeUrl,proto3" json:"type_url,omitempty"`
// Must be a valid serialized protocol buffer of the above specified type.
- Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
+ Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *Any) Reset() { *m = Any{} }
-func (*Any) ProtoMessage() {}
-func (*Any) Descriptor() ([]byte, []int) { return fileDescriptorAny, []int{0} }
-func (*Any) XXX_WellKnownType() string { return "Any" }
+func (m *Any) Reset() { *m = Any{} }
+func (*Any) ProtoMessage() {}
+func (*Any) Descriptor() ([]byte, []int) {
+ return fileDescriptor_b53526c13ae22eb4, []int{0}
+}
+func (*Any) XXX_WellKnownType() string { return "Any" }
+func (m *Any) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *Any) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_Any.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *Any) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_Any.Merge(m, src)
+}
+func (m *Any) XXX_Size() int {
+ return m.Size()
+}
+func (m *Any) XXX_DiscardUnknown() {
+ xxx_messageInfo_Any.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Any proto.InternalMessageInfo
func (m *Any) GetTypeUrl() string {
if m != nil {
@@ -161,9 +188,33 @@ func (m *Any) GetValue() []byte {
return nil
}
+func (*Any) XXX_MessageName() string {
+ return "google.protobuf.Any"
+}
func init() {
proto.RegisterType((*Any)(nil), "google.protobuf.Any")
}
+
+func init() { proto.RegisterFile("google/protobuf/any.proto", fileDescriptor_b53526c13ae22eb4) }
+
+var fileDescriptor_b53526c13ae22eb4 = []byte{
+ // 211 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00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, 0xe7, 0x85, 0x80, 0x94,
+ 0x25, 0xb1, 0x81, 0xcd, 0x30, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0xb7, 0x81, 0x82, 0xd3, 0xed,
+ 0x00, 0x00, 0x00,
+}
+
func (this *Any) Compare(that interface{}) int {
if that == nil {
if this == nil {
@@ -198,6 +249,9 @@ func (this *Any) Compare(that interface{}) int {
if c := bytes.Compare(this.Value, that1.Value); c != 0 {
return c
}
+ if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 {
+ return c
+ }
return 0
}
func (this *Any) Equal(that interface{}) bool {
@@ -225,6 +279,9 @@ func (this *Any) Equal(that interface{}) bool {
if !bytes.Equal(this.Value, that1.Value) {
return false
}
+ if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
+ return false
+ }
return true
}
func (this *Any) GoString() string {
@@ -235,6 +292,9 @@ func (this *Any) GoString() string {
s = append(s, "&types.Any{")
s = append(s, "TypeUrl: "+fmt.Sprintf("%#v", this.TypeUrl)+",\n")
s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n")
+ if this.XXX_unrecognized != nil {
+ s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n")
+ }
s = append(s, "}")
return strings.Join(s, "")
}
@@ -273,6 +333,9 @@ func (m *Any) MarshalTo(dAtA []byte) (int, error) {
i = encodeVarintAny(dAtA, i, uint64(len(m.Value)))
i += copy(dAtA[i:], m.Value)
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -294,6 +357,7 @@ func NewPopulatedAny(r randyAny, easy bool) *Any {
this.Value[i] = byte(r.Intn(256))
}
if !easy && r.Intn(10) != 0 {
+ this.XXX_unrecognized = randUnrecognizedAny(r, 3)
}
return this
}
@@ -371,6 +435,9 @@ func encodeVarintPopulateAny(dAtA []byte, v uint64) []byte {
return dAtA
}
func (m *Any) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.TypeUrl)
@@ -381,6 +448,9 @@ func (m *Any) Size() (n int) {
if l > 0 {
n += 1 + l + sovAny(uint64(l))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
@@ -404,6 +474,7 @@ func (this *Any) String() string {
s := strings.Join([]string{`&Any{`,
`TypeUrl:` + fmt.Sprintf("%v", this.TypeUrl) + `,`,
`Value:` + fmt.Sprintf("%v", this.Value) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -431,7 +502,7 @@ func (m *Any) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -459,7 +530,7 @@ func (m *Any) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -469,6 +540,9 @@ func (m *Any) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthAny
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthAny
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -488,7 +562,7 @@ func (m *Any) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- byteLen |= (int(b) & 0x7F) << shift
+ byteLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -497,6 +571,9 @@ func (m *Any) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthAny
}
postIndex := iNdEx + byteLen
+ if postIndex < 0 {
+ return ErrInvalidLengthAny
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -514,9 +591,13 @@ func (m *Any) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthAny
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthAny
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -580,10 +661,13 @@ func skipAny(dAtA []byte) (n int, err error) {
break
}
}
- iNdEx += length
if length < 0 {
return 0, ErrInvalidLengthAny
}
+ iNdEx += length
+ if iNdEx < 0 {
+ return 0, ErrInvalidLengthAny
+ }
return iNdEx, nil
case 3:
for {
@@ -612,6 +696,9 @@ func skipAny(dAtA []byte) (n int, err error) {
return 0, err
}
iNdEx = start + next
+ if iNdEx < 0 {
+ return 0, ErrInvalidLengthAny
+ }
}
return iNdEx, nil
case 4:
@@ -630,22 +717,3 @@ var (
ErrInvalidLengthAny = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowAny = fmt.Errorf("proto: integer overflow")
)
-
-func init() { proto.RegisterFile("any.proto", fileDescriptorAny) }
-
-var fileDescriptorAny = []byte{
- // 204 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x4c, 0xcc, 0xab, 0xd4,
- 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x4f, 0xcf, 0xcf, 0x4f, 0xcf, 0x49, 0x85, 0xf0, 0x92,
- 0x4a, 0xd3, 0x94, 0xcc, 0xb8, 0x98, 0x1d, 0xf3, 0x2a, 0x85, 0x24, 0xb9, 0x38, 0x4a, 0x2a, 0x0b,
- 0x52, 0xe3, 0x4b, 0x8b, 0x72, 0x24, 0x18, 0x15, 0x18, 0x35, 0x38, 0x83, 0xd8, 0x41, 0xfc, 0xd0,
- 0xa2, 0x1c, 0x21, 0x11, 0x2e, 0xd6, 0xb2, 0xc4, 0x9c, 0xd2, 0x54, 0x09, 0x26, 0x05, 0x46, 0x0d,
- 0x9e, 0x20, 0x08, 0xc7, 0xa9, 0xfe, 0xc2, 0x43, 0x39, 0x86, 0x1b, 0x0f, 0xe5, 0x18, 0x3e, 0x3c,
- 0x94, 0x63, 0xfc, 0xf1, 0x50, 0x8e, 0xb1, 0xe1, 0x91, 0x1c, 0xe3, 0x8a, 0x47, 0x72, 0x8c, 0x27,
- 0x1e, 0xc9, 0x31, 0x5e, 0x78, 0x24, 0xc7, 0xf8, 0xe0, 0x91, 0x1c, 0xe3, 0x8b, 0x47, 0x72, 0x0c,
- 0x1f, 0x40, 0xe2, 0x8f, 0xe5, 0x18, 0xb9, 0x84, 0x93, 0xf3, 0x73, 0xf5, 0xd0, 0xac, 0x77, 0xe2,
- 0x70, 0xcc, 0xab, 0x0c, 0x00, 0x71, 0x02, 0x18, 0xa3, 0x58, 0x41, 0x36, 0x16, 0x2f, 0x62, 0x62,
- 0x76, 0x0f, 0x70, 0x5a, 0xc5, 0x24, 0xe7, 0x0e, 0x51, 0x1a, 0x00, 0x55, 0xaa, 0x17, 0x9e, 0x9a,
- 0x93, 0xe3, 0x9d, 0x97, 0x5f, 0x9e, 0x17, 0x02, 0x52, 0x96, 0xc4, 0x06, 0x36, 0xc3, 0x18, 0x10,
- 0x00, 0x00, 0xff, 0xff, 0xb7, 0x39, 0x2f, 0x89, 0xdd, 0x00, 0x00, 0x00,
-}
diff --git a/vendor/github.com/gogo/protobuf/types/api.pb.go b/vendor/github.com/gogo/protobuf/types/api.pb.go
new file mode 100644
index 000000000..fe0eefd2d
--- /dev/null
+++ b/vendor/github.com/gogo/protobuf/types/api.pb.go
@@ -0,0 +1,2118 @@
+// Code generated by protoc-gen-gogo. DO NOT EDIT.
+// source: google/protobuf/api.proto
+
+package types
+
+import (
+ bytes "bytes"
+ fmt "fmt"
+ proto "github.com/gogo/protobuf/proto"
+ io "io"
+ math "math"
+ reflect "reflect"
+ strings "strings"
+)
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the proto package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// proto package needs to be updated.
+const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
+
+// Api is a light-weight descriptor for an API Interface.
+//
+// Interfaces are also described as "protocol buffer services" in some contexts,
+// such as by the "service" keyword in a .proto file, but they are different
+// from API Services, which represent a concrete implementation of an interface
+// as opposed to simply a description of methods and bindings. They are also
+// sometimes simply referred to as "APIs" in other contexts, such as the name of
+// this message itself. See https://cloud.google.com/apis/design/glossary for
+// detailed terminology.
+type Api struct {
+ // The fully qualified name of this interface, including package name
+ // followed by the interface's simple name.
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ // The methods of this interface, in unspecified order.
+ Methods []*Method `protobuf:"bytes,2,rep,name=methods,proto3" json:"methods,omitempty"`
+ // Any metadata attached to the interface.
+ Options []*Option `protobuf:"bytes,3,rep,name=options,proto3" json:"options,omitempty"`
+ // A version string for this interface. If specified, must have the form
+ // `major-version.minor-version`, as in `1.10`. If the minor version is
+ // omitted, it defaults to zero. If the entire version field is empty, the
+ // major version is derived from the package name, as outlined below. If the
+ // field is not empty, the version in the package name will be verified to be
+ // consistent with what is provided here.
+ //
+ // The versioning schema uses [semantic
+ // versioning](http://semver.org) where the major version number
+ // indicates a breaking change and the minor version an additive,
+ // non-breaking change. Both version numbers are signals to users
+ // what to expect from different versions, and should be carefully
+ // chosen based on the product plan.
+ //
+ // The major version is also reflected in the package name of the
+ // interface, which must end in `v`, as in
+ // `google.feature.v1`. For major versions 0 and 1, the suffix can
+ // be omitted. Zero major versions must only be used for
+ // experimental, non-GA interfaces.
+ //
+ //
+ Version string `protobuf:"bytes,4,opt,name=version,proto3" json:"version,omitempty"`
+ // Source context for the protocol buffer service represented by this
+ // message.
+ SourceContext *SourceContext `protobuf:"bytes,5,opt,name=source_context,json=sourceContext,proto3" json:"source_context,omitempty"`
+ // Included interfaces. See [Mixin][].
+ Mixins []*Mixin `protobuf:"bytes,6,rep,name=mixins,proto3" json:"mixins,omitempty"`
+ // The source syntax of the service.
+ Syntax Syntax `protobuf:"varint,7,opt,name=syntax,proto3,enum=google.protobuf.Syntax" json:"syntax,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *Api) Reset() { *m = Api{} }
+func (*Api) ProtoMessage() {}
+func (*Api) Descriptor() ([]byte, []int) {
+ return fileDescriptor_a2ec32096296c143, []int{0}
+}
+func (m *Api) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *Api) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_Api.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *Api) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_Api.Merge(m, src)
+}
+func (m *Api) XXX_Size() int {
+ return m.Size()
+}
+func (m *Api) XXX_DiscardUnknown() {
+ xxx_messageInfo_Api.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Api proto.InternalMessageInfo
+
+func (m *Api) GetName() string {
+ if m != nil {
+ return m.Name
+ }
+ return ""
+}
+
+func (m *Api) GetMethods() []*Method {
+ if m != nil {
+ return m.Methods
+ }
+ return nil
+}
+
+func (m *Api) GetOptions() []*Option {
+ if m != nil {
+ return m.Options
+ }
+ return nil
+}
+
+func (m *Api) GetVersion() string {
+ if m != nil {
+ return m.Version
+ }
+ return ""
+}
+
+func (m *Api) GetSourceContext() *SourceContext {
+ if m != nil {
+ return m.SourceContext
+ }
+ return nil
+}
+
+func (m *Api) GetMixins() []*Mixin {
+ if m != nil {
+ return m.Mixins
+ }
+ return nil
+}
+
+func (m *Api) GetSyntax() Syntax {
+ if m != nil {
+ return m.Syntax
+ }
+ return Syntax_SYNTAX_PROTO2
+}
+
+func (*Api) XXX_MessageName() string {
+ return "google.protobuf.Api"
+}
+
+// Method represents a method of an API interface.
+type Method struct {
+ // The simple name of this method.
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ // A URL of the input message type.
+ RequestTypeUrl string `protobuf:"bytes,2,opt,name=request_type_url,json=requestTypeUrl,proto3" json:"request_type_url,omitempty"`
+ // If true, the request is streamed.
+ RequestStreaming bool `protobuf:"varint,3,opt,name=request_streaming,json=requestStreaming,proto3" json:"request_streaming,omitempty"`
+ // The URL of the output message type.
+ ResponseTypeUrl string `protobuf:"bytes,4,opt,name=response_type_url,json=responseTypeUrl,proto3" json:"response_type_url,omitempty"`
+ // If true, the response is streamed.
+ ResponseStreaming bool `protobuf:"varint,5,opt,name=response_streaming,json=responseStreaming,proto3" json:"response_streaming,omitempty"`
+ // Any metadata attached to the method.
+ Options []*Option `protobuf:"bytes,6,rep,name=options,proto3" json:"options,omitempty"`
+ // The source syntax of this method.
+ Syntax Syntax `protobuf:"varint,7,opt,name=syntax,proto3,enum=google.protobuf.Syntax" json:"syntax,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *Method) Reset() { *m = Method{} }
+func (*Method) ProtoMessage() {}
+func (*Method) Descriptor() ([]byte, []int) {
+ return fileDescriptor_a2ec32096296c143, []int{1}
+}
+func (m *Method) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *Method) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_Method.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *Method) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_Method.Merge(m, src)
+}
+func (m *Method) XXX_Size() int {
+ return m.Size()
+}
+func (m *Method) XXX_DiscardUnknown() {
+ xxx_messageInfo_Method.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Method proto.InternalMessageInfo
+
+func (m *Method) GetName() string {
+ if m != nil {
+ return m.Name
+ }
+ return ""
+}
+
+func (m *Method) GetRequestTypeUrl() string {
+ if m != nil {
+ return m.RequestTypeUrl
+ }
+ return ""
+}
+
+func (m *Method) GetRequestStreaming() bool {
+ if m != nil {
+ return m.RequestStreaming
+ }
+ return false
+}
+
+func (m *Method) GetResponseTypeUrl() string {
+ if m != nil {
+ return m.ResponseTypeUrl
+ }
+ return ""
+}
+
+func (m *Method) GetResponseStreaming() bool {
+ if m != nil {
+ return m.ResponseStreaming
+ }
+ return false
+}
+
+func (m *Method) GetOptions() []*Option {
+ if m != nil {
+ return m.Options
+ }
+ return nil
+}
+
+func (m *Method) GetSyntax() Syntax {
+ if m != nil {
+ return m.Syntax
+ }
+ return Syntax_SYNTAX_PROTO2
+}
+
+func (*Method) XXX_MessageName() string {
+ return "google.protobuf.Method"
+}
+
+// Declares an API Interface to be included in this interface. The including
+// interface must redeclare all the methods from the included interface, but
+// documentation and options are inherited as follows:
+//
+// - If after comment and whitespace stripping, the documentation
+// string of the redeclared method is empty, it will be inherited
+// from the original method.
+//
+// - Each annotation belonging to the service config (http,
+// visibility) which is not set in the redeclared method will be
+// inherited.
+//
+// - If an http annotation is inherited, the path pattern will be
+// modified as follows. Any version prefix will be replaced by the
+// version of the including interface plus the [root][] path if
+// specified.
+//
+// Example of a simple mixin:
+//
+// package google.acl.v1;
+// service AccessControl {
+// // Get the underlying ACL object.
+// rpc GetAcl(GetAclRequest) returns (Acl) {
+// option (google.api.http).get = "/v1/{resource=**}:getAcl";
+// }
+// }
+//
+// package google.storage.v2;
+// service Storage {
+// rpc GetAcl(GetAclRequest) returns (Acl);
+//
+// // Get a data record.
+// rpc GetData(GetDataRequest) returns (Data) {
+// option (google.api.http).get = "/v2/{resource=**}";
+// }
+// }
+//
+// Example of a mixin configuration:
+//
+// apis:
+// - name: google.storage.v2.Storage
+// mixins:
+// - name: google.acl.v1.AccessControl
+//
+// The mixin construct implies that all methods in `AccessControl` are
+// also declared with same name and request/response types in
+// `Storage`. A documentation generator or annotation processor will
+// see the effective `Storage.GetAcl` method after inherting
+// documentation and annotations as follows:
+//
+// service Storage {
+// // Get the underlying ACL object.
+// rpc GetAcl(GetAclRequest) returns (Acl) {
+// option (google.api.http).get = "/v2/{resource=**}:getAcl";
+// }
+// ...
+// }
+//
+// Note how the version in the path pattern changed from `v1` to `v2`.
+//
+// If the `root` field in the mixin is specified, it should be a
+// relative path under which inherited HTTP paths are placed. Example:
+//
+// apis:
+// - name: google.storage.v2.Storage
+// mixins:
+// - name: google.acl.v1.AccessControl
+// root: acls
+//
+// This implies the following inherited HTTP annotation:
+//
+// service Storage {
+// // Get the underlying ACL object.
+// rpc GetAcl(GetAclRequest) returns (Acl) {
+// option (google.api.http).get = "/v2/acls/{resource=**}:getAcl";
+// }
+// ...
+// }
+type Mixin struct {
+ // The fully qualified name of the interface which is included.
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ // If non-empty specifies a path under which inherited HTTP paths
+ // are rooted.
+ Root string `protobuf:"bytes,2,opt,name=root,proto3" json:"root,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *Mixin) Reset() { *m = Mixin{} }
+func (*Mixin) ProtoMessage() {}
+func (*Mixin) Descriptor() ([]byte, []int) {
+ return fileDescriptor_a2ec32096296c143, []int{2}
+}
+func (m *Mixin) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *Mixin) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_Mixin.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *Mixin) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_Mixin.Merge(m, src)
+}
+func (m *Mixin) XXX_Size() int {
+ return m.Size()
+}
+func (m *Mixin) XXX_DiscardUnknown() {
+ xxx_messageInfo_Mixin.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Mixin proto.InternalMessageInfo
+
+func (m *Mixin) GetName() string {
+ if m != nil {
+ return m.Name
+ }
+ return ""
+}
+
+func (m *Mixin) GetRoot() string {
+ if m != nil {
+ return m.Root
+ }
+ return ""
+}
+
+func (*Mixin) XXX_MessageName() string {
+ return "google.protobuf.Mixin"
+}
+func init() {
+ proto.RegisterType((*Api)(nil), "google.protobuf.Api")
+ proto.RegisterType((*Method)(nil), "google.protobuf.Method")
+ proto.RegisterType((*Mixin)(nil), "google.protobuf.Mixin")
+}
+
+func init() { proto.RegisterFile("google/protobuf/api.proto", fileDescriptor_a2ec32096296c143) }
+
+var fileDescriptor_a2ec32096296c143 = []byte{
+ // 467 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x91, 0x31, 0x6f, 0x13, 0x31,
+ 0x14, 0xc7, 0xeb, 0xbb, 0xe4, 0x52, 0x5c, 0x91, 0x82, 0x91, 0xc0, 0x64, 0xb0, 0x4e, 0x15, 0xc3,
+ 0x09, 0xc4, 0x45, 0x94, 0x4f, 0xd0, 0x20, 0xd4, 0x01, 0x21, 0xa2, 0x0b, 0x08, 0x89, 0x25, 0x4a,
+ 0x83, 0x09, 0x96, 0xee, 0x6c, 0x63, 0x3b, 0x90, 0x4c, 0xf0, 0x59, 0x98, 0x10, 0x23, 0xdf, 0x80,
+ 0xad, 0x23, 0x23, 0x23, 0xb9, 0x2e, 0x8c, 0x1d, 0x19, 0x91, 0x7d, 0xe7, 0xa6, 0x5c,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a, 0xf4, 0x13, 0x3f, 0xa7, 0x79, 0xfe, 0x88, 0x8b, 0x77, 0xdc, 0xc6, 0xa8,
+ 0x8f, 0x22, 0xe7, 0x71, 0xff, 0x77, 0x00, 0x00, 0x00, 0xff, 0xff, 0x2b, 0x64, 0x40, 0x40, 0xa1,
+ 0x03, 0x00, 0x00,
+}
+
+func (this *Api) Compare(that interface{}) int {
+ if that == nil {
+ if this == nil {
+ return 0
+ }
+ return 1
+ }
+
+ that1, ok := that.(*Api)
+ if !ok {
+ that2, ok := that.(Api)
+ if ok {
+ that1 = &that2
+ } else {
+ return 1
+ }
+ }
+ if that1 == nil {
+ if this == nil {
+ return 0
+ }
+ return 1
+ } else if this == nil {
+ return -1
+ }
+ if this.Name != that1.Name {
+ if this.Name < that1.Name {
+ return -1
+ }
+ return 1
+ }
+ if len(this.Methods) != len(that1.Methods) {
+ if len(this.Methods) < len(that1.Methods) {
+ return -1
+ }
+ return 1
+ }
+ for i := range this.Methods {
+ if c := this.Methods[i].Compare(that1.Methods[i]); c != 0 {
+ return c
+ }
+ }
+ if len(this.Options) != len(that1.Options) {
+ if len(this.Options) < len(that1.Options) {
+ return -1
+ }
+ return 1
+ }
+ for i := range this.Options {
+ if c := this.Options[i].Compare(that1.Options[i]); c != 0 {
+ return c
+ }
+ }
+ if this.Version != that1.Version {
+ if this.Version < that1.Version {
+ return -1
+ }
+ return 1
+ }
+ if c := this.SourceContext.Compare(that1.SourceContext); c != 0 {
+ return c
+ }
+ if len(this.Mixins) != len(that1.Mixins) {
+ if len(this.Mixins) < len(that1.Mixins) {
+ return -1
+ }
+ return 1
+ }
+ for i := range this.Mixins {
+ if c := this.Mixins[i].Compare(that1.Mixins[i]); c != 0 {
+ return c
+ }
+ }
+ if this.Syntax != that1.Syntax {
+ if this.Syntax < that1.Syntax {
+ return -1
+ }
+ return 1
+ }
+ if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 {
+ return c
+ }
+ return 0
+}
+func (this *Method) Compare(that interface{}) int {
+ if that == nil {
+ if this == nil {
+ return 0
+ }
+ return 1
+ }
+
+ that1, ok := that.(*Method)
+ if !ok {
+ that2, ok := that.(Method)
+ if ok {
+ that1 = &that2
+ } else {
+ return 1
+ }
+ }
+ if that1 == nil {
+ if this == nil {
+ return 0
+ }
+ return 1
+ } else if this == nil {
+ return -1
+ }
+ if this.Name != that1.Name {
+ if this.Name < that1.Name {
+ return -1
+ }
+ return 1
+ }
+ if this.RequestTypeUrl != that1.RequestTypeUrl {
+ if this.RequestTypeUrl < that1.RequestTypeUrl {
+ return -1
+ }
+ return 1
+ }
+ if this.RequestStreaming != that1.RequestStreaming {
+ if !this.RequestStreaming {
+ return -1
+ }
+ return 1
+ }
+ if this.ResponseTypeUrl != that1.ResponseTypeUrl {
+ if this.ResponseTypeUrl < that1.ResponseTypeUrl {
+ return -1
+ }
+ return 1
+ }
+ if this.ResponseStreaming != that1.ResponseStreaming {
+ if !this.ResponseStreaming {
+ return -1
+ }
+ return 1
+ }
+ if len(this.Options) != len(that1.Options) {
+ if len(this.Options) < len(that1.Options) {
+ return -1
+ }
+ return 1
+ }
+ for i := range this.Options {
+ if c := this.Options[i].Compare(that1.Options[i]); c != 0 {
+ return c
+ }
+ }
+ if this.Syntax != that1.Syntax {
+ if this.Syntax < that1.Syntax {
+ return -1
+ }
+ return 1
+ }
+ if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 {
+ return c
+ }
+ return 0
+}
+func (this *Mixin) Compare(that interface{}) int {
+ if that == nil {
+ if this == nil {
+ return 0
+ }
+ return 1
+ }
+
+ that1, ok := that.(*Mixin)
+ if !ok {
+ that2, ok := that.(Mixin)
+ if ok {
+ that1 = &that2
+ } else {
+ return 1
+ }
+ }
+ if that1 == nil {
+ if this == nil {
+ return 0
+ }
+ return 1
+ } else if this == nil {
+ return -1
+ }
+ if this.Name != that1.Name {
+ if this.Name < that1.Name {
+ return -1
+ }
+ return 1
+ }
+ if this.Root != that1.Root {
+ if this.Root < that1.Root {
+ return -1
+ }
+ return 1
+ }
+ if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 {
+ return c
+ }
+ return 0
+}
+func (this *Api) Equal(that interface{}) bool {
+ if that == nil {
+ return this == nil
+ }
+
+ that1, ok := that.(*Api)
+ if !ok {
+ that2, ok := that.(Api)
+ if ok {
+ that1 = &that2
+ } else {
+ return false
+ }
+ }
+ if that1 == nil {
+ return this == nil
+ } else if this == nil {
+ return false
+ }
+ if this.Name != that1.Name {
+ return false
+ }
+ if len(this.Methods) != len(that1.Methods) {
+ return false
+ }
+ for i := range this.Methods {
+ if !this.Methods[i].Equal(that1.Methods[i]) {
+ return false
+ }
+ }
+ if len(this.Options) != len(that1.Options) {
+ return false
+ }
+ for i := range this.Options {
+ if !this.Options[i].Equal(that1.Options[i]) {
+ return false
+ }
+ }
+ if this.Version != that1.Version {
+ return false
+ }
+ if !this.SourceContext.Equal(that1.SourceContext) {
+ return false
+ }
+ if len(this.Mixins) != len(that1.Mixins) {
+ return false
+ }
+ for i := range this.Mixins {
+ if !this.Mixins[i].Equal(that1.Mixins[i]) {
+ return false
+ }
+ }
+ if this.Syntax != that1.Syntax {
+ return false
+ }
+ if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
+ return false
+ }
+ return true
+}
+func (this *Method) Equal(that interface{}) bool {
+ if that == nil {
+ return this == nil
+ }
+
+ that1, ok := that.(*Method)
+ if !ok {
+ that2, ok := that.(Method)
+ if ok {
+ that1 = &that2
+ } else {
+ return false
+ }
+ }
+ if that1 == nil {
+ return this == nil
+ } else if this == nil {
+ return false
+ }
+ if this.Name != that1.Name {
+ return false
+ }
+ if this.RequestTypeUrl != that1.RequestTypeUrl {
+ return false
+ }
+ if this.RequestStreaming != that1.RequestStreaming {
+ return false
+ }
+ if this.ResponseTypeUrl != that1.ResponseTypeUrl {
+ return false
+ }
+ if this.ResponseStreaming != that1.ResponseStreaming {
+ return false
+ }
+ if len(this.Options) != len(that1.Options) {
+ return false
+ }
+ for i := range this.Options {
+ if !this.Options[i].Equal(that1.Options[i]) {
+ return false
+ }
+ }
+ if this.Syntax != that1.Syntax {
+ return false
+ }
+ if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
+ return false
+ }
+ return true
+}
+func (this *Mixin) Equal(that interface{}) bool {
+ if that == nil {
+ return this == nil
+ }
+
+ that1, ok := that.(*Mixin)
+ if !ok {
+ that2, ok := that.(Mixin)
+ if ok {
+ that1 = &that2
+ } else {
+ return false
+ }
+ }
+ if that1 == nil {
+ return this == nil
+ } else if this == nil {
+ return false
+ }
+ if this.Name != that1.Name {
+ return false
+ }
+ if this.Root != that1.Root {
+ return false
+ }
+ if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
+ return false
+ }
+ return true
+}
+func (this *Api) GoString() string {
+ if this == nil {
+ return "nil"
+ }
+ s := make([]string, 0, 11)
+ s = append(s, "&types.Api{")
+ s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n")
+ if this.Methods != nil {
+ s = append(s, "Methods: "+fmt.Sprintf("%#v", this.Methods)+",\n")
+ }
+ if this.Options != nil {
+ s = append(s, "Options: "+fmt.Sprintf("%#v", this.Options)+",\n")
+ }
+ s = append(s, "Version: "+fmt.Sprintf("%#v", this.Version)+",\n")
+ if this.SourceContext != nil {
+ s = append(s, "SourceContext: "+fmt.Sprintf("%#v", this.SourceContext)+",\n")
+ }
+ if this.Mixins != nil {
+ s = append(s, "Mixins: "+fmt.Sprintf("%#v", this.Mixins)+",\n")
+ }
+ s = append(s, "Syntax: "+fmt.Sprintf("%#v", this.Syntax)+",\n")
+ if this.XXX_unrecognized != nil {
+ s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n")
+ }
+ s = append(s, "}")
+ return strings.Join(s, "")
+}
+func (this *Method) GoString() string {
+ if this == nil {
+ return "nil"
+ }
+ s := make([]string, 0, 11)
+ s = append(s, "&types.Method{")
+ s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n")
+ s = append(s, "RequestTypeUrl: "+fmt.Sprintf("%#v", this.RequestTypeUrl)+",\n")
+ s = append(s, "RequestStreaming: "+fmt.Sprintf("%#v", this.RequestStreaming)+",\n")
+ s = append(s, "ResponseTypeUrl: "+fmt.Sprintf("%#v", this.ResponseTypeUrl)+",\n")
+ s = append(s, "ResponseStreaming: "+fmt.Sprintf("%#v", this.ResponseStreaming)+",\n")
+ if this.Options != nil {
+ s = append(s, "Options: "+fmt.Sprintf("%#v", this.Options)+",\n")
+ }
+ s = append(s, "Syntax: "+fmt.Sprintf("%#v", this.Syntax)+",\n")
+ if this.XXX_unrecognized != nil {
+ s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n")
+ }
+ s = append(s, "}")
+ return strings.Join(s, "")
+}
+func (this *Mixin) GoString() string {
+ if this == nil {
+ return "nil"
+ }
+ s := make([]string, 0, 6)
+ s = append(s, "&types.Mixin{")
+ s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n")
+ s = append(s, "Root: "+fmt.Sprintf("%#v", this.Root)+",\n")
+ if this.XXX_unrecognized != nil {
+ s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n")
+ }
+ s = append(s, "}")
+ return strings.Join(s, "")
+}
+func valueToGoStringApi(v interface{}, typ string) string {
+ rv := reflect.ValueOf(v)
+ if rv.IsNil() {
+ return "nil"
+ }
+ pv := reflect.Indirect(rv).Interface()
+ return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv)
+}
+func (m *Api) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *Api) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.Name) > 0 {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(m.Name)))
+ i += copy(dAtA[i:], m.Name)
+ }
+ if len(m.Methods) > 0 {
+ for _, msg := range m.Methods {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ if len(m.Options) > 0 {
+ for _, msg := range m.Options {
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ if len(m.Version) > 0 {
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(m.Version)))
+ i += copy(dAtA[i:], m.Version)
+ }
+ if m.SourceContext != nil {
+ dAtA[i] = 0x2a
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(m.SourceContext.Size()))
+ n1, err := m.SourceContext.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n1
+ }
+ if len(m.Mixins) > 0 {
+ for _, msg := range m.Mixins {
+ dAtA[i] = 0x32
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ if m.Syntax != 0 {
+ dAtA[i] = 0x38
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(m.Syntax))
+ }
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
+ return i, nil
+}
+
+func (m *Method) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *Method) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.Name) > 0 {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(m.Name)))
+ i += copy(dAtA[i:], m.Name)
+ }
+ if len(m.RequestTypeUrl) > 0 {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(m.RequestTypeUrl)))
+ i += copy(dAtA[i:], m.RequestTypeUrl)
+ }
+ if m.RequestStreaming {
+ dAtA[i] = 0x18
+ i++
+ if m.RequestStreaming {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ }
+ if len(m.ResponseTypeUrl) > 0 {
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(m.ResponseTypeUrl)))
+ i += copy(dAtA[i:], m.ResponseTypeUrl)
+ }
+ if m.ResponseStreaming {
+ dAtA[i] = 0x28
+ i++
+ if m.ResponseStreaming {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ }
+ if len(m.Options) > 0 {
+ for _, msg := range m.Options {
+ dAtA[i] = 0x32
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ if m.Syntax != 0 {
+ dAtA[i] = 0x38
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(m.Syntax))
+ }
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
+ return i, nil
+}
+
+func (m *Mixin) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *Mixin) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.Name) > 0 {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(m.Name)))
+ i += copy(dAtA[i:], m.Name)
+ }
+ if len(m.Root) > 0 {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintApi(dAtA, i, uint64(len(m.Root)))
+ i += copy(dAtA[i:], m.Root)
+ }
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
+ return i, nil
+}
+
+func encodeVarintApi(dAtA []byte, offset int, v uint64) int {
+ for v >= 1<<7 {
+ dAtA[offset] = uint8(v&0x7f | 0x80)
+ v >>= 7
+ offset++
+ }
+ dAtA[offset] = uint8(v)
+ return offset + 1
+}
+func NewPopulatedApi(r randyApi, easy bool) *Api {
+ this := &Api{}
+ this.Name = string(randStringApi(r))
+ if r.Intn(10) != 0 {
+ v1 := r.Intn(5)
+ this.Methods = make([]*Method, v1)
+ for i := 0; i < v1; i++ {
+ this.Methods[i] = NewPopulatedMethod(r, easy)
+ }
+ }
+ if r.Intn(10) != 0 {
+ v2 := r.Intn(5)
+ this.Options = make([]*Option, v2)
+ for i := 0; i < v2; i++ {
+ this.Options[i] = NewPopulatedOption(r, easy)
+ }
+ }
+ this.Version = string(randStringApi(r))
+ if r.Intn(10) != 0 {
+ this.SourceContext = NewPopulatedSourceContext(r, easy)
+ }
+ if r.Intn(10) != 0 {
+ v3 := r.Intn(5)
+ this.Mixins = make([]*Mixin, v3)
+ for i := 0; i < v3; i++ {
+ this.Mixins[i] = NewPopulatedMixin(r, easy)
+ }
+ }
+ this.Syntax = Syntax([]int32{0, 1}[r.Intn(2)])
+ if !easy && r.Intn(10) != 0 {
+ this.XXX_unrecognized = randUnrecognizedApi(r, 8)
+ }
+ return this
+}
+
+func NewPopulatedMethod(r randyApi, easy bool) *Method {
+ this := &Method{}
+ this.Name = string(randStringApi(r))
+ this.RequestTypeUrl = string(randStringApi(r))
+ this.RequestStreaming = bool(bool(r.Intn(2) == 0))
+ this.ResponseTypeUrl = string(randStringApi(r))
+ this.ResponseStreaming = bool(bool(r.Intn(2) == 0))
+ if r.Intn(10) != 0 {
+ v4 := r.Intn(5)
+ this.Options = make([]*Option, v4)
+ for i := 0; i < v4; i++ {
+ this.Options[i] = NewPopulatedOption(r, easy)
+ }
+ }
+ this.Syntax = Syntax([]int32{0, 1}[r.Intn(2)])
+ if !easy && r.Intn(10) != 0 {
+ this.XXX_unrecognized = randUnrecognizedApi(r, 8)
+ }
+ return this
+}
+
+func NewPopulatedMixin(r randyApi, easy bool) *Mixin {
+ this := &Mixin{}
+ this.Name = string(randStringApi(r))
+ this.Root = string(randStringApi(r))
+ if !easy && r.Intn(10) != 0 {
+ this.XXX_unrecognized = randUnrecognizedApi(r, 3)
+ }
+ return this
+}
+
+type randyApi interface {
+ Float32() float32
+ Float64() float64
+ Int63() int64
+ Int31() int32
+ Uint32() uint32
+ Intn(n int) int
+}
+
+func randUTF8RuneApi(r randyApi) rune {
+ ru := r.Intn(62)
+ if ru < 10 {
+ return rune(ru + 48)
+ } else if ru < 36 {
+ return rune(ru + 55)
+ }
+ return rune(ru + 61)
+}
+func randStringApi(r randyApi) string {
+ v5 := r.Intn(100)
+ tmps := make([]rune, v5)
+ for i := 0; i < v5; i++ {
+ tmps[i] = randUTF8RuneApi(r)
+ }
+ return string(tmps)
+}
+func randUnrecognizedApi(r randyApi, maxFieldNumber int) (dAtA []byte) {
+ l := r.Intn(5)
+ for i := 0; i < l; i++ {
+ wire := r.Intn(4)
+ if wire == 3 {
+ wire = 5
+ }
+ fieldNumber := maxFieldNumber + r.Intn(100)
+ dAtA = randFieldApi(dAtA, r, fieldNumber, wire)
+ }
+ return dAtA
+}
+func randFieldApi(dAtA []byte, r randyApi, fieldNumber int, wire int) []byte {
+ key := uint32(fieldNumber)<<3 | uint32(wire)
+ switch wire {
+ case 0:
+ dAtA = encodeVarintPopulateApi(dAtA, uint64(key))
+ v6 := r.Int63()
+ if r.Intn(2) == 0 {
+ v6 *= -1
+ }
+ dAtA = encodeVarintPopulateApi(dAtA, uint64(v6))
+ case 1:
+ dAtA = encodeVarintPopulateApi(dAtA, uint64(key))
+ dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)))
+ case 2:
+ dAtA = encodeVarintPopulateApi(dAtA, uint64(key))
+ ll := r.Intn(100)
+ dAtA = encodeVarintPopulateApi(dAtA, uint64(ll))
+ for j := 0; j < ll; j++ {
+ dAtA = append(dAtA, byte(r.Intn(256)))
+ }
+ default:
+ dAtA = encodeVarintPopulateApi(dAtA, uint64(key))
+ dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)))
+ }
+ return dAtA
+}
+func encodeVarintPopulateApi(dAtA []byte, v uint64) []byte {
+ for v >= 1<<7 {
+ dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80))
+ v >>= 7
+ }
+ dAtA = append(dAtA, uint8(v))
+ return dAtA
+}
+func (m *Api) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.Name)
+ if l > 0 {
+ n += 1 + l + sovApi(uint64(l))
+ }
+ if len(m.Methods) > 0 {
+ for _, e := range m.Methods {
+ l = e.Size()
+ n += 1 + l + sovApi(uint64(l))
+ }
+ }
+ if len(m.Options) > 0 {
+ for _, e := range m.Options {
+ l = e.Size()
+ n += 1 + l + sovApi(uint64(l))
+ }
+ }
+ l = len(m.Version)
+ if l > 0 {
+ n += 1 + l + sovApi(uint64(l))
+ }
+ if m.SourceContext != nil {
+ l = m.SourceContext.Size()
+ n += 1 + l + sovApi(uint64(l))
+ }
+ if len(m.Mixins) > 0 {
+ for _, e := range m.Mixins {
+ l = e.Size()
+ n += 1 + l + sovApi(uint64(l))
+ }
+ }
+ if m.Syntax != 0 {
+ n += 1 + sovApi(uint64(m.Syntax))
+ }
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
+ return n
+}
+
+func (m *Method) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.Name)
+ if l > 0 {
+ n += 1 + l + sovApi(uint64(l))
+ }
+ l = len(m.RequestTypeUrl)
+ if l > 0 {
+ n += 1 + l + sovApi(uint64(l))
+ }
+ if m.RequestStreaming {
+ n += 2
+ }
+ l = len(m.ResponseTypeUrl)
+ if l > 0 {
+ n += 1 + l + sovApi(uint64(l))
+ }
+ if m.ResponseStreaming {
+ n += 2
+ }
+ if len(m.Options) > 0 {
+ for _, e := range m.Options {
+ l = e.Size()
+ n += 1 + l + sovApi(uint64(l))
+ }
+ }
+ if m.Syntax != 0 {
+ n += 1 + sovApi(uint64(m.Syntax))
+ }
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
+ return n
+}
+
+func (m *Mixin) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.Name)
+ if l > 0 {
+ n += 1 + l + sovApi(uint64(l))
+ }
+ l = len(m.Root)
+ if l > 0 {
+ n += 1 + l + sovApi(uint64(l))
+ }
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
+ return n
+}
+
+func sovApi(x uint64) (n int) {
+ for {
+ n++
+ x >>= 7
+ if x == 0 {
+ break
+ }
+ }
+ return n
+}
+func sozApi(x uint64) (n int) {
+ return sovApi(uint64((x << 1) ^ uint64((int64(x) >> 63))))
+}
+func (this *Api) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&Api{`,
+ `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
+ `Methods:` + strings.Replace(fmt.Sprintf("%v", this.Methods), "Method", "Method", 1) + `,`,
+ `Options:` + strings.Replace(fmt.Sprintf("%v", this.Options), "Option", "Option", 1) + `,`,
+ `Version:` + fmt.Sprintf("%v", this.Version) + `,`,
+ `SourceContext:` + strings.Replace(fmt.Sprintf("%v", this.SourceContext), "SourceContext", "SourceContext", 1) + `,`,
+ `Mixins:` + strings.Replace(fmt.Sprintf("%v", this.Mixins), "Mixin", "Mixin", 1) + `,`,
+ `Syntax:` + fmt.Sprintf("%v", this.Syntax) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *Method) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&Method{`,
+ `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
+ `RequestTypeUrl:` + fmt.Sprintf("%v", this.RequestTypeUrl) + `,`,
+ `RequestStreaming:` + fmt.Sprintf("%v", this.RequestStreaming) + `,`,
+ `ResponseTypeUrl:` + fmt.Sprintf("%v", this.ResponseTypeUrl) + `,`,
+ `ResponseStreaming:` + fmt.Sprintf("%v", this.ResponseStreaming) + `,`,
+ `Options:` + strings.Replace(fmt.Sprintf("%v", this.Options), "Option", "Option", 1) + `,`,
+ `Syntax:` + fmt.Sprintf("%v", this.Syntax) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *Mixin) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&Mixin{`,
+ `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
+ `Root:` + fmt.Sprintf("%v", this.Root) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func valueToStringApi(v interface{}) string {
+ rv := reflect.ValueOf(v)
+ if rv.IsNil() {
+ return "nil"
+ }
+ pv := reflect.Indirect(rv).Interface()
+ return fmt.Sprintf("*%v", pv)
+}
+func (m *Api) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: Api: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: Api: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthApi
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Name = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Methods", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthApi
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Methods = append(m.Methods, &Method{})
+ if err := m.Methods[len(m.Methods)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Options", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthApi
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Options = append(m.Options, &Option{})
+ if err := m.Options[len(m.Options)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthApi
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Version = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field SourceContext", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthApi
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.SourceContext == nil {
+ m.SourceContext = &SourceContext{}
+ }
+ if err := m.SourceContext.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 6:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Mixins", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthApi
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Mixins = append(m.Mixins, &Mixin{})
+ if err := m.Mixins[len(m.Mixins)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 7:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Syntax", wireType)
+ }
+ m.Syntax = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Syntax |= Syntax(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ default:
+ iNdEx = preIndex
+ skippy, err := skipApi(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthApi
+ }
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthApi
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *Method) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: Method: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: Method: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthApi
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Name = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field RequestTypeUrl", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthApi
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.RequestTypeUrl = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 3:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field RequestStreaming", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.RequestStreaming = bool(v != 0)
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ResponseTypeUrl", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthApi
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ResponseTypeUrl = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 5:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ResponseStreaming", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.ResponseStreaming = bool(v != 0)
+ case 6:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Options", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthApi
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Options = append(m.Options, &Option{})
+ if err := m.Options[len(m.Options)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 7:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Syntax", wireType)
+ }
+ m.Syntax = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Syntax |= Syntax(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ default:
+ iNdEx = preIndex
+ skippy, err := skipApi(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthApi
+ }
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthApi
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *Mixin) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: Mixin: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: Mixin: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthApi
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Name = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Root", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthApi
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthApi
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Root = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipApi(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthApi
+ }
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthApi
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func skipApi(dAtA []byte) (n int, err error) {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ wireType := int(wire & 0x7)
+ switch wireType {
+ case 0:
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ iNdEx++
+ if dAtA[iNdEx-1] < 0x80 {
+ break
+ }
+ }
+ return iNdEx, nil
+ case 1:
+ iNdEx += 8
+ return iNdEx, nil
+ case 2:
+ var length int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ length |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if length < 0 {
+ return 0, ErrInvalidLengthApi
+ }
+ iNdEx += length
+ if iNdEx < 0 {
+ return 0, ErrInvalidLengthApi
+ }
+ return iNdEx, nil
+ case 3:
+ for {
+ var innerWire uint64
+ var start int = iNdEx
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowApi
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ innerWire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ innerWireType := int(innerWire & 0x7)
+ if innerWireType == 4 {
+ break
+ }
+ next, err := skipApi(dAtA[start:])
+ if err != nil {
+ return 0, err
+ }
+ iNdEx = start + next
+ if iNdEx < 0 {
+ return 0, ErrInvalidLengthApi
+ }
+ }
+ return iNdEx, nil
+ case 4:
+ return iNdEx, nil
+ case 5:
+ iNdEx += 4
+ return iNdEx, nil
+ default:
+ return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
+ }
+ }
+ panic("unreachable")
+}
+
+var (
+ ErrInvalidLengthApi = fmt.Errorf("proto: negative length found during unmarshaling")
+ ErrIntOverflowApi = fmt.Errorf("proto: integer overflow")
+)
diff --git a/vendor/github.com/gogo/protobuf/types/duration.go b/vendor/github.com/gogo/protobuf/types/duration.go
index 475d61f1d..979b8e78a 100644
--- a/vendor/github.com/gogo/protobuf/types/duration.go
+++ b/vendor/github.com/gogo/protobuf/types/duration.go
@@ -80,7 +80,7 @@ func DurationFromProto(p *Duration) (time.Duration, error) {
return 0, fmt.Errorf("duration: %#v is out of range for time.Duration", p)
}
if p.Nanos != 0 {
- d += time.Duration(p.Nanos)
+ d += time.Duration(p.Nanos) * time.Nanosecond
if (d < 0) != (p.Nanos < 0) {
return 0, fmt.Errorf("duration: %#v is out of range for time.Duration", p)
}
diff --git a/vendor/github.com/gogo/protobuf/types/duration.pb.go b/vendor/github.com/gogo/protobuf/types/duration.pb.go
index ee9deacfd..f328ee0e2 100644
--- a/vendor/github.com/gogo/protobuf/types/duration.pb.go
+++ b/vendor/github.com/gogo/protobuf/types/duration.pb.go
@@ -1,25 +1,17 @@
// Code generated by protoc-gen-gogo. DO NOT EDIT.
-// source: duration.proto
+// source: google/protobuf/duration.proto
-/*
- Package types is a generated protocol buffer package.
-
- It is generated from these files:
- duration.proto
-
- It has these top-level messages:
- Duration
-*/
package types
-import proto "github.com/gogo/protobuf/proto"
-import fmt "fmt"
-import math "math"
-
-import strings "strings"
-import reflect "reflect"
-
-import io "io"
+import (
+ bytes "bytes"
+ fmt "fmt"
+ proto "github.com/gogo/protobuf/proto"
+ io "io"
+ math "math"
+ reflect "reflect"
+ strings "strings"
+)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
@@ -103,13 +95,44 @@ type Duration struct {
// of one second or more, a non-zero value for the `nanos` field must be
// of the same sign as the `seconds` field. Must be from -999,999,999
// to +999,999,999 inclusive.
- Nanos int32 `protobuf:"varint,2,opt,name=nanos,proto3" json:"nanos,omitempty"`
+ Nanos int32 `protobuf:"varint,2,opt,name=nanos,proto3" json:"nanos,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *Duration) Reset() { *m = Duration{} }
-func (*Duration) ProtoMessage() {}
-func (*Duration) Descriptor() ([]byte, []int) { return fileDescriptorDuration, []int{0} }
-func (*Duration) XXX_WellKnownType() string { return "Duration" }
+func (m *Duration) Reset() { *m = Duration{} }
+func (*Duration) ProtoMessage() {}
+func (*Duration) Descriptor() ([]byte, []int) {
+ return fileDescriptor_23597b2ebd7ac6c5, []int{0}
+}
+func (*Duration) XXX_WellKnownType() string { return "Duration" }
+func (m *Duration) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *Duration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_Duration.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *Duration) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_Duration.Merge(m, src)
+}
+func (m *Duration) XXX_Size() int {
+ return m.Size()
+}
+func (m *Duration) XXX_DiscardUnknown() {
+ xxx_messageInfo_Duration.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Duration proto.InternalMessageInfo
func (m *Duration) GetSeconds() int64 {
if m != nil {
@@ -125,9 +148,33 @@ func (m *Duration) GetNanos() int32 {
return 0
}
+func (*Duration) XXX_MessageName() string {
+ return "google.protobuf.Duration"
+}
func init() {
proto.RegisterType((*Duration)(nil), "google.protobuf.Duration")
}
+
+func init() { proto.RegisterFile("google/protobuf/duration.proto", fileDescriptor_23597b2ebd7ac6c5) }
+
+var fileDescriptor_23597b2ebd7ac6c5 = []byte{
+ // 209 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4b, 0xcf, 0xcf, 0x4f,
+ 0xcf, 0x49, 0xd5, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0x4f, 0x2a, 0x4d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, 0xf6, 0x00, 0x00,
+ 0x00,
+}
+
func (this *Duration) Compare(that interface{}) int {
if that == nil {
if this == nil {
@@ -165,6 +212,9 @@ func (this *Duration) Compare(that interface{}) int {
}
return 1
}
+ if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 {
+ return c
+ }
return 0
}
func (this *Duration) Equal(that interface{}) bool {
@@ -192,6 +242,9 @@ func (this *Duration) Equal(that interface{}) bool {
if this.Nanos != that1.Nanos {
return false
}
+ if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
+ return false
+ }
return true
}
func (this *Duration) GoString() string {
@@ -202,6 +255,9 @@ func (this *Duration) GoString() string {
s = append(s, "&types.Duration{")
s = append(s, "Seconds: "+fmt.Sprintf("%#v", this.Seconds)+",\n")
s = append(s, "Nanos: "+fmt.Sprintf("%#v", this.Nanos)+",\n")
+ if this.XXX_unrecognized != nil {
+ s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n")
+ }
s = append(s, "}")
return strings.Join(s, "")
}
@@ -238,6 +294,9 @@ func (m *Duration) MarshalTo(dAtA []byte) (int, error) {
i++
i = encodeVarintDuration(dAtA, i, uint64(m.Nanos))
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -251,6 +310,9 @@ func encodeVarintDuration(dAtA []byte, offset int, v uint64) int {
return offset + 1
}
func (m *Duration) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
if m.Seconds != 0 {
@@ -259,6 +321,9 @@ func (m *Duration) Size() (n int) {
if m.Nanos != 0 {
n += 1 + sovDuration(uint64(m.Nanos))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
@@ -290,7 +355,7 @@ func (m *Duration) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -318,7 +383,7 @@ func (m *Duration) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- m.Seconds |= (int64(b) & 0x7F) << shift
+ m.Seconds |= int64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -337,7 +402,7 @@ func (m *Duration) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- m.Nanos |= (int32(b) & 0x7F) << shift
+ m.Nanos |= int32(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -351,9 +416,13 @@ func (m *Duration) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthDuration
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthDuration
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -417,10 +486,13 @@ func skipDuration(dAtA []byte) (n int, err error) {
break
}
}
- iNdEx += length
if length < 0 {
return 0, ErrInvalidLengthDuration
}
+ iNdEx += length
+ if iNdEx < 0 {
+ return 0, ErrInvalidLengthDuration
+ }
return iNdEx, nil
case 3:
for {
@@ -449,6 +521,9 @@ func skipDuration(dAtA []byte) (n int, err error) {
return 0, err
}
iNdEx = start + next
+ if iNdEx < 0 {
+ return 0, ErrInvalidLengthDuration
+ }
}
return iNdEx, nil
case 4:
@@ -467,22 +542,3 @@ var (
ErrInvalidLengthDuration = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowDuration = fmt.Errorf("proto: integer overflow")
)
-
-func init() { proto.RegisterFile("duration.proto", fileDescriptorDuration) }
-
-var fileDescriptorDuration = []byte{
- // 203 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x4b, 0x29, 0x2d, 0x4a,
- 0x2c, 0x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a5, 0xe6, 0x00, 0x00, 0x00,
-}
diff --git a/vendor/github.com/gogo/protobuf/types/empty.pb.go b/vendor/github.com/gogo/protobuf/types/empty.pb.go
index e7018b905..85881878f 100644
--- a/vendor/github.com/gogo/protobuf/types/empty.pb.go
+++ b/vendor/github.com/gogo/protobuf/types/empty.pb.go
@@ -1,25 +1,17 @@
// Code generated by protoc-gen-gogo. DO NOT EDIT.
-// source: empty.proto
+// source: google/protobuf/empty.proto
-/*
-Package types is a generated protocol buffer package.
-
-It is generated from these files:
- empty.proto
-
-It has these top-level messages:
- Empty
-*/
package types
-import proto "github.com/gogo/protobuf/proto"
-import fmt "fmt"
-import math "math"
-
-import strings "strings"
-import reflect "reflect"
-
-import io "io"
+import (
+ bytes "bytes"
+ fmt "fmt"
+ proto "github.com/gogo/protobuf/proto"
+ io "io"
+ math "math"
+ reflect "reflect"
+ strings "strings"
+)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
@@ -42,16 +34,68 @@ const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
//
// The JSON representation for `Empty` is empty JSON object `{}`.
type Empty struct {
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *Empty) Reset() { *m = Empty{} }
-func (*Empty) ProtoMessage() {}
-func (*Empty) Descriptor() ([]byte, []int) { return fileDescriptorEmpty, []int{0} }
-func (*Empty) XXX_WellKnownType() string { return "Empty" }
+func (m *Empty) Reset() { *m = Empty{} }
+func (*Empty) ProtoMessage() {}
+func (*Empty) Descriptor() ([]byte, []int) {
+ return fileDescriptor_900544acb223d5b8, []int{0}
+}
+func (*Empty) XXX_WellKnownType() string { return "Empty" }
+func (m *Empty) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *Empty) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_Empty.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *Empty) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_Empty.Merge(m, src)
+}
+func (m *Empty) XXX_Size() int {
+ return m.Size()
+}
+func (m *Empty) XXX_DiscardUnknown() {
+ xxx_messageInfo_Empty.DiscardUnknown(m)
+}
+var xxx_messageInfo_Empty proto.InternalMessageInfo
+
+func (*Empty) XXX_MessageName() string {
+ return "google.protobuf.Empty"
+}
func init() {
proto.RegisterType((*Empty)(nil), "google.protobuf.Empty")
}
+
+func init() { proto.RegisterFile("google/protobuf/empty.proto", fileDescriptor_900544acb223d5b8) }
+
+var fileDescriptor_900544acb223d5b8 = []byte{
+ // 176 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4e, 0xcf, 0xcf, 0x4f,
+ 0xcf, 0x49, 0xd5, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0x4f, 0x2a, 0x4d, 0xd3, 0x4f, 0xcd, 0x2d, 0x28,
+ 0xa9, 0xd4, 0x03, 0x73, 0x85, 0xf8, 0x21, 0x92, 0x7a, 0x30, 0x49, 0x25, 0x76, 0x2e, 0x56, 0x57,
+ 0x90, 0xbc, 0x53, 0x0b, 0xe3, 0x8d, 0x87, 0x72, 0x0c, 0x1f, 0x1e, 0xca, 0x31, 0xfe, 0x78, 0x28,
+ 0xc7, 0xd8, 0xf0, 0x48, 0x8e, 0x71, 0xc5, 0x23, 0x39, 0xc6, 0x13, 0x8f, 0xe4, 0x18, 0x2f, 0x3c,
+ 0x92, 0x63, 0x7c, 0xf0, 0x48, 0x8e, 0xf1, 0xc5, 0x23, 0x39, 0x86, 0x0f, 0x20, 0xf1, 0xc7, 0x72,
+ 0x8c, 0x27, 0x1e, 0xcb, 0x31, 0x72, 0x09, 0x27, 0xe7, 0xe7, 0xea, 0xa1, 0x19, 0xe8, 0xc4, 0x05,
+ 0x36, 0x2e, 0x00, 0xc4, 0x0d, 0x60, 0x8c, 0x62, 0x2d, 0xa9, 0x2c, 0x48, 0x2d, 0xfe, 0xc1, 0xc8,
+ 0xb8, 0x88, 0x89, 0xd9, 0x3d, 0xc0, 0x69, 0x15, 0x93, 0x9c, 0x3b, 0x44, 0x7d, 0x00, 0x54, 0xbd,
+ 0x5e, 0x78, 0x6a, 0x4e, 0x8e, 0x77, 0x5e, 0x7e, 0x79, 0x5e, 0x08, 0x48, 0x65, 0x12, 0x1b, 0xd8,
+ 0x20, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0x21, 0xbe, 0xb6, 0x31, 0xc6, 0x00, 0x00, 0x00,
+}
+
func (this *Empty) Compare(that interface{}) int {
if that == nil {
if this == nil {
@@ -77,6 +121,9 @@ func (this *Empty) Compare(that interface{}) int {
} else if this == nil {
return -1
}
+ if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 {
+ return c
+ }
return 0
}
func (this *Empty) Equal(that interface{}) bool {
@@ -98,6 +145,9 @@ func (this *Empty) Equal(that interface{}) bool {
} else if this == nil {
return false
}
+ if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
+ return false
+ }
return true
}
func (this *Empty) GoString() string {
@@ -106,6 +156,9 @@ func (this *Empty) GoString() string {
}
s := make([]string, 0, 4)
s = append(s, "&types.Empty{")
+ if this.XXX_unrecognized != nil {
+ s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n")
+ }
s = append(s, "}")
return strings.Join(s, "")
}
@@ -132,6 +185,9 @@ func (m *Empty) MarshalTo(dAtA []byte) (int, error) {
_ = i
var l int
_ = l
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -147,6 +203,7 @@ func encodeVarintEmpty(dAtA []byte, offset int, v uint64) int {
func NewPopulatedEmpty(r randyEmpty, easy bool) *Empty {
this := &Empty{}
if !easy && r.Intn(10) != 0 {
+ this.XXX_unrecognized = randUnrecognizedEmpty(r, 1)
}
return this
}
@@ -224,8 +281,14 @@ func encodeVarintPopulateEmpty(dAtA []byte, v uint64) []byte {
return dAtA
}
func (m *Empty) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
@@ -247,6 +310,7 @@ func (this *Empty) String() string {
return "nil"
}
s := strings.Join([]string{`&Empty{`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -274,7 +338,7 @@ func (m *Empty) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -297,9 +361,13 @@ func (m *Empty) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthEmpty
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthEmpty
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -363,10 +431,13 @@ func skipEmpty(dAtA []byte) (n int, err error) {
break
}
}
- iNdEx += length
if length < 0 {
return 0, ErrInvalidLengthEmpty
}
+ iNdEx += length
+ if iNdEx < 0 {
+ return 0, ErrInvalidLengthEmpty
+ }
return iNdEx, nil
case 3:
for {
@@ -395,6 +466,9 @@ func skipEmpty(dAtA []byte) (n int, err error) {
return 0, err
}
iNdEx = start + next
+ if iNdEx < 0 {
+ return 0, ErrInvalidLengthEmpty
+ }
}
return iNdEx, nil
case 4:
@@ -413,20 +487,3 @@ var (
ErrInvalidLengthEmpty = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowEmpty = fmt.Errorf("proto: integer overflow")
)
-
-func init() { proto.RegisterFile("empty.proto", fileDescriptorEmpty) }
-
-var fileDescriptorEmpty = []byte{
- // 169 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x4e, 0xcd, 0x2d, 0x28,
- 0xa9, 0xd4, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x4f, 0xcf, 0xcf, 0x4f, 0xcf, 0x49, 0x85,
- 0xf0, 0x92, 0x4a, 0xd3, 0x94, 0xd8, 0xb9, 0x58, 0x5d, 0x41, 0xf2, 0x4e, 0x2d, 0x8c, 0x17, 0x1e,
- 0xca, 0x31, 0xdc, 0x78, 0x28, 0xc7, 0xf0, 0xe1, 0xa1, 0x1c, 0xe3, 0x8f, 0x87, 0x72, 0x8c, 0x0d,
- 0x8f, 0xe4, 0x18, 0x57, 0x3c, 0x92, 0x63, 0x3c, 0xf1, 0x48, 0x8e, 0xf1, 0xc2, 0x23, 0x39, 0xc6,
- 0x07, 0x8f, 0xe4, 0x18, 0x5f, 0x3c, 0x92, 0x63, 0xf8, 0x00, 0x12, 0x7f, 0x2c, 0xc7, 0xc8, 0x25,
- 0x9c, 0x9c, 0x9f, 0xab, 0x87, 0x66, 0xa0, 0x13, 0x17, 0xd8, 0xb8, 0x00, 0x10, 0x37, 0x80, 0x31,
- 0x8a, 0xb5, 0xa4, 0xb2, 0x20, 0xb5, 0xf8, 0x07, 0x23, 0xe3, 0x22, 0x26, 0x66, 0xf7, 0x00, 0xa7,
- 0x55, 0x4c, 0x72, 0xee, 0x10, 0xf5, 0x01, 0x50, 0xf5, 0x7a, 0xe1, 0xa9, 0x39, 0x39, 0xde, 0x79,
- 0xf9, 0xe5, 0x79, 0x21, 0x20, 0x95, 0x49, 0x6c, 0x60, 0x83, 0x8c, 0x01, 0x01, 0x00, 0x00, 0xff,
- 0xff, 0x7c, 0xa8, 0xf0, 0xc4, 0xb6, 0x00, 0x00, 0x00,
-}
diff --git a/vendor/github.com/gogo/protobuf/types/field_mask.pb.go b/vendor/github.com/gogo/protobuf/types/field_mask.pb.go
index 22e8b4f0d..b401a2b3f 100644
--- a/vendor/github.com/gogo/protobuf/types/field_mask.pb.go
+++ b/vendor/github.com/gogo/protobuf/types/field_mask.pb.go
@@ -1,25 +1,17 @@
// Code generated by protoc-gen-gogo. DO NOT EDIT.
-// source: field_mask.proto
+// source: google/protobuf/field_mask.proto
-/*
-Package types is a generated protocol buffer package.
-
-It is generated from these files:
- field_mask.proto
-
-It has these top-level messages:
- FieldMask
-*/
package types
-import proto "github.com/gogo/protobuf/proto"
-import fmt "fmt"
-import math "math"
-
-import strings "strings"
-import reflect "reflect"
-
-import io "io"
+import (
+ bytes "bytes"
+ fmt "fmt"
+ proto "github.com/gogo/protobuf/proto"
+ io "io"
+ math "math"
+ reflect "reflect"
+ strings "strings"
+)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
@@ -100,57 +92,49 @@ const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
// describe the updated values, the API ignores the values of all
// fields not covered by the mask.
//
-// If a repeated field is specified for an update operation, the existing
-// repeated values in the target resource will be overwritten by the new values.
-// Note that a repeated field is only allowed in the last position of a `paths`
-// string.
+// If a repeated field is specified for an update operation, new values will
+// be appended to the existing repeated field in the target resource. Note that
+// a repeated field is only allowed in the last position of a `paths` string.
//
// If a sub-message is specified in the last position of the field mask for an
-// update operation, then the existing sub-message in the target resource is
-// overwritten. Given the target message:
+// update operation, then new value will be merged into the existing sub-message
+// in the target resource.
+//
+// For example, given the target message:
//
// f {
// b {
-// d : 1
-// x : 2
+// d: 1
+// x: 2
// }
-// c : 1
+// c: [1]
// }
//
// And an update message:
//
// f {
// b {
-// d : 10
+// d: 10
// }
+// c: [2]
// }
//
// then if the field mask is:
//
-// paths: "f.b"
+// paths: ["f.b", "f.c"]
//
// then the result will be:
//
// f {
// b {
-// d : 10
+// d: 10
+// x: 2
// }
-// c : 1
+// c: [1, 2]
// }
//
-// However, if the update mask was:
-//
-// paths: "f.b.d"
-//
-// then the result would be:
-//
-// f {
-// b {
-// d : 10
-// x : 2
-// }
-// c : 1
-// }
+// An implementation may provide options to override this default behavior for
+// repeated and message fields.
//
// In order to reset a field's value to the default, the field must
// be in the mask and set to the default value in the provided resource.
@@ -233,14 +217,51 @@ const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
//
// Note that oneof type names ("test_oneof" in this case) cannot be used in
// paths.
+//
+// ## Field Mask Verification
+//
+// The implementation of any API method which has a FieldMask type field in the
+// request should verify the included field paths, and return an
+// `INVALID_ARGUMENT` error if any path is duplicated or unmappable.
type FieldMask struct {
// The set of field mask paths.
- Paths []string `protobuf:"bytes,1,rep,name=paths" json:"paths,omitempty"`
+ Paths []string `protobuf:"bytes,1,rep,name=paths,proto3" json:"paths,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *FieldMask) Reset() { *m = FieldMask{} }
-func (*FieldMask) ProtoMessage() {}
-func (*FieldMask) Descriptor() ([]byte, []int) { return fileDescriptorFieldMask, []int{0} }
+func (m *FieldMask) Reset() { *m = FieldMask{} }
+func (*FieldMask) ProtoMessage() {}
+func (*FieldMask) Descriptor() ([]byte, []int) {
+ return fileDescriptor_5158202634f0da48, []int{0}
+}
+func (m *FieldMask) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *FieldMask) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_FieldMask.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *FieldMask) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_FieldMask.Merge(m, src)
+}
+func (m *FieldMask) XXX_Size() int {
+ return m.Size()
+}
+func (m *FieldMask) XXX_DiscardUnknown() {
+ xxx_messageInfo_FieldMask.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_FieldMask proto.InternalMessageInfo
func (m *FieldMask) GetPaths() []string {
if m != nil {
@@ -249,9 +270,32 @@ func (m *FieldMask) GetPaths() []string {
return nil
}
+func (*FieldMask) XXX_MessageName() string {
+ return "google.protobuf.FieldMask"
+}
func init() {
proto.RegisterType((*FieldMask)(nil), "google.protobuf.FieldMask")
}
+
+func init() { proto.RegisterFile("google/protobuf/field_mask.proto", fileDescriptor_5158202634f0da48) }
+
+var fileDescriptor_5158202634f0da48 = []byte{
+ // 203 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x48, 0xcf, 0xcf, 0x4f,
+ 0xcf, 0x49, 0xd5, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0x4f, 0x2a, 0x4d, 0xd3, 0x4f, 0xcb, 0x4c, 0xcd,
+ 0x49, 0x89, 0xcf, 0x4d, 0x2c, 0xce, 0xd6, 0x03, 0x8b, 0x09, 0xf1, 0x43, 0x54, 0xe8, 0xc1, 0x54,
+ 0x28, 0x29, 0x72, 0x71, 0xba, 0x81, 0x14, 0xf9, 0x26, 0x16, 0x67, 0x0b, 0x89, 0x70, 0xb1, 0x16,
+ 0x24, 0x96, 0x64, 0x14, 0x4b, 0x30, 0x2a, 0x30, 0x6b, 0x70, 0x06, 0x41, 0x38, 0x4e, 0x1d, 0x8c,
+ 0x37, 0x1e, 0xca, 0x31, 0x7c, 0x78, 0x28, 0xc7, 0xf8, 0xe3, 0xa1, 0x1c, 0x63, 0xc3, 0x23, 0x39,
+ 0xc6, 0x15, 0x8f, 0xe4, 0x18, 0x4f, 0x3c, 0x92, 0x63, 0xbc, 0xf0, 0x48, 0x8e, 0xf1, 0xc1, 0x23,
+ 0x39, 0xc6, 0x17, 0x8f, 0xe4, 0x18, 0x3e, 0x80, 0xc4, 0x1f, 0xcb, 0x31, 0x9e, 0x78, 0x2c, 0xc7,
+ 0xc8, 0x25, 0x9c, 0x9c, 0x9f, 0xab, 0x87, 0x66, 0x95, 0x13, 0x1f, 0xdc, 0xa2, 0x00, 0x90, 0x50,
+ 0x00, 0x63, 0x14, 0x6b, 0x49, 0x65, 0x41, 0x6a, 0xf1, 0x0f, 0x46, 0xc6, 0x45, 0x4c, 0xcc, 0xee,
+ 0x01, 0x4e, 0xab, 0x98, 0xe4, 0xdc, 0x21, 0x7a, 0x02, 0xa0, 0x7a, 0xf4, 0xc2, 0x53, 0x73, 0x72,
+ 0xbc, 0xf3, 0xf2, 0xcb, 0xf3, 0x42, 0x40, 0x2a, 0x93, 0xd8, 0xc0, 0x86, 0x19, 0x03, 0x02, 0x00,
+ 0x00, 0xff, 0xff, 0x43, 0xa0, 0x83, 0xd0, 0xe9, 0x00, 0x00, 0x00,
+}
+
func (this *FieldMask) Compare(that interface{}) int {
if that == nil {
if this == nil {
@@ -291,6 +335,9 @@ func (this *FieldMask) Compare(that interface{}) int {
return 1
}
}
+ if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 {
+ return c
+ }
return 0
}
func (this *FieldMask) Equal(that interface{}) bool {
@@ -320,6 +367,9 @@ func (this *FieldMask) Equal(that interface{}) bool {
return false
}
}
+ if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
+ return false
+ }
return true
}
func (this *FieldMask) GoString() string {
@@ -329,6 +379,9 @@ func (this *FieldMask) GoString() string {
s := make([]string, 0, 5)
s = append(s, "&types.FieldMask{")
s = append(s, "Paths: "+fmt.Sprintf("%#v", this.Paths)+",\n")
+ if this.XXX_unrecognized != nil {
+ s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n")
+ }
s = append(s, "}")
return strings.Join(s, "")
}
@@ -370,6 +423,9 @@ func (m *FieldMask) MarshalTo(dAtA []byte) (int, error) {
i += copy(dAtA[i:], s)
}
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -390,6 +446,7 @@ func NewPopulatedFieldMask(r randyFieldMask, easy bool) *FieldMask {
this.Paths[i] = string(randStringFieldMask(r))
}
if !easy && r.Intn(10) != 0 {
+ this.XXX_unrecognized = randUnrecognizedFieldMask(r, 2)
}
return this
}
@@ -467,6 +524,9 @@ func encodeVarintPopulateFieldMask(dAtA []byte, v uint64) []byte {
return dAtA
}
func (m *FieldMask) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
if len(m.Paths) > 0 {
@@ -475,6 +535,9 @@ func (m *FieldMask) Size() (n int) {
n += 1 + l + sovFieldMask(uint64(l))
}
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
@@ -497,6 +560,7 @@ func (this *FieldMask) String() string {
}
s := strings.Join([]string{`&FieldMask{`,
`Paths:` + fmt.Sprintf("%v", this.Paths) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -524,7 +588,7 @@ func (m *FieldMask) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -552,7 +616,7 @@ func (m *FieldMask) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -562,6 +626,9 @@ func (m *FieldMask) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthFieldMask
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthFieldMask
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -576,9 +643,13 @@ func (m *FieldMask) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthFieldMask
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthFieldMask
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -642,10 +713,13 @@ func skipFieldMask(dAtA []byte) (n int, err error) {
break
}
}
- iNdEx += length
if length < 0 {
return 0, ErrInvalidLengthFieldMask
}
+ iNdEx += length
+ if iNdEx < 0 {
+ return 0, ErrInvalidLengthFieldMask
+ }
return iNdEx, nil
case 3:
for {
@@ -674,6 +748,9 @@ func skipFieldMask(dAtA []byte) (n int, err error) {
return 0, err
}
iNdEx = start + next
+ if iNdEx < 0 {
+ return 0, ErrInvalidLengthFieldMask
+ }
}
return iNdEx, nil
case 4:
@@ -692,22 +769,3 @@ var (
ErrInvalidLengthFieldMask = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowFieldMask = fmt.Errorf("proto: integer overflow")
)
-
-func init() { proto.RegisterFile("field_mask.proto", fileDescriptorFieldMask) }
-
-var fileDescriptorFieldMask = []byte{
- // 193 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x48, 0xcb, 0x4c, 0xcd,
- 0x49, 0x89, 0xcf, 0x4d, 0x2c, 0xce, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x4f, 0xcf,
- 0xcf, 0x4f, 0xcf, 0x49, 0x85, 0xf0, 0x92, 0x4a, 0xd3, 0x94, 0x14, 0xb9, 0x38, 0xdd, 0x40, 0x8a,
- 0x7c, 0x13, 0x8b, 0xb3, 0x85, 0x44, 0xb8, 0x58, 0x0b, 0x12, 0x4b, 0x32, 0x8a, 0x25, 0x18, 0x15,
- 0x98, 0x35, 0x38, 0x83, 0x20, 0x1c, 0xa7, 0x56, 0xc6, 0x0b, 0x0f, 0xe5, 0x18, 0x6e, 0x3c, 0x94,
- 0x63, 0xf8, 0xf0, 0x50, 0x8e, 0xf1, 0xc7, 0x43, 0x39, 0xc6, 0x86, 0x47, 0x72, 0x8c, 0x2b, 0x1e,
- 0xc9, 0x31, 0x9e, 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x2f,
- 0x1e, 0xc9, 0x31, 0x7c, 0x00, 0x89, 0x3f, 0x96, 0x63, 0xe4, 0x12, 0x4e, 0xce, 0xcf, 0xd5, 0x43,
- 0xb3, 0xca, 0x89, 0x0f, 0x6e, 0x51, 0x00, 0x48, 0x28, 0x80, 0x31, 0x8a, 0xb5, 0xa4, 0xb2, 0x20,
- 0xb5, 0x78, 0x11, 0x13, 0xb3, 0x7b, 0x80, 0xd3, 0x2a, 0x26, 0x39, 0x77, 0x88, 0x86, 0x00, 0xa8,
- 0x06, 0xbd, 0xf0, 0xd4, 0x9c, 0x1c, 0xef, 0xbc, 0xfc, 0xf2, 0xbc, 0x10, 0x90, 0xb2, 0x24, 0x36,
- 0xb0, 0x49, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0x51, 0x31, 0x89, 0xb5, 0xd6, 0x00, 0x00,
- 0x00,
-}
diff --git a/vendor/github.com/gogo/protobuf/types/protosize.go b/vendor/github.com/gogo/protobuf/types/protosize.go
new file mode 100644
index 000000000..3a2d1b7e1
--- /dev/null
+++ b/vendor/github.com/gogo/protobuf/types/protosize.go
@@ -0,0 +1,34 @@
+package types
+
+func (m *Any) ProtoSize() (n int) { return m.Size() }
+func (m *Api) ProtoSize() (n int) { return m.Size() }
+func (m *Method) ProtoSize() (n int) { return m.Size() }
+func (m *Mixin) ProtoSize() (n int) { return m.Size() }
+func (m *Duration) ProtoSize() (n int) { return m.Size() }
+func (m *Empty) ProtoSize() (n int) { return m.Size() }
+func (m *FieldMask) ProtoSize() (n int) { return m.Size() }
+func (m *SourceContext) ProtoSize() (n int) { return m.Size() }
+func (m *Struct) ProtoSize() (n int) { return m.Size() }
+func (m *Value) ProtoSize() (n int) { return m.Size() }
+func (m *Value_NullValue) ProtoSize() (n int) { return m.Size() }
+func (m *Value_NumberValue) ProtoSize() (n int) { return m.Size() }
+func (m *Value_StringValue) ProtoSize() (n int) { return m.Size() }
+func (m *Value_BoolValue) ProtoSize() (n int) { return m.Size() }
+func (m *Value_StructValue) ProtoSize() (n int) { return m.Size() }
+func (m *Value_ListValue) ProtoSize() (n int) { return m.Size() }
+func (m *ListValue) ProtoSize() (n int) { return m.Size() }
+func (m *Timestamp) ProtoSize() (n int) { return m.Size() }
+func (m *Type) ProtoSize() (n int) { return m.Size() }
+func (m *Field) ProtoSize() (n int) { return m.Size() }
+func (m *Enum) ProtoSize() (n int) { return m.Size() }
+func (m *EnumValue) ProtoSize() (n int) { return m.Size() }
+func (m *Option) ProtoSize() (n int) { return m.Size() }
+func (m *DoubleValue) ProtoSize() (n int) { return m.Size() }
+func (m *FloatValue) ProtoSize() (n int) { return m.Size() }
+func (m *Int64Value) ProtoSize() (n int) { return m.Size() }
+func (m *UInt64Value) ProtoSize() (n int) { return m.Size() }
+func (m *Int32Value) ProtoSize() (n int) { return m.Size() }
+func (m *UInt32Value) ProtoSize() (n int) { return m.Size() }
+func (m *BoolValue) ProtoSize() (n int) { return m.Size() }
+func (m *StringValue) ProtoSize() (n int) { return m.Size() }
+func (m *BytesValue) ProtoSize() (n int) { return m.Size() }
diff --git a/vendor/github.com/gogo/protobuf/types/source_context.pb.go b/vendor/github.com/gogo/protobuf/types/source_context.pb.go
new file mode 100644
index 000000000..3688840b5
--- /dev/null
+++ b/vendor/github.com/gogo/protobuf/types/source_context.pb.go
@@ -0,0 +1,550 @@
+// Code generated by protoc-gen-gogo. DO NOT EDIT.
+// source: google/protobuf/source_context.proto
+
+package types
+
+import (
+ bytes "bytes"
+ fmt "fmt"
+ proto "github.com/gogo/protobuf/proto"
+ io "io"
+ math "math"
+ reflect "reflect"
+ strings "strings"
+)
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the proto package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// proto package needs to be updated.
+const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
+
+// `SourceContext` represents information about the source of a
+// protobuf element, like the file in which it is defined.
+type SourceContext struct {
+ // The path-qualified name of the .proto file that contained the associated
+ // protobuf element. For example: `"google/protobuf/source_context.proto"`.
+ FileName string `protobuf:"bytes,1,opt,name=file_name,json=fileName,proto3" json:"file_name,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *SourceContext) Reset() { *m = SourceContext{} }
+func (*SourceContext) ProtoMessage() {}
+func (*SourceContext) Descriptor() ([]byte, []int) {
+ return fileDescriptor_b686cdb126d509db, []int{0}
+}
+func (m *SourceContext) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *SourceContext) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_SourceContext.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *SourceContext) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_SourceContext.Merge(m, src)
+}
+func (m *SourceContext) XXX_Size() int {
+ return m.Size()
+}
+func (m *SourceContext) XXX_DiscardUnknown() {
+ xxx_messageInfo_SourceContext.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_SourceContext proto.InternalMessageInfo
+
+func (m *SourceContext) GetFileName() string {
+ if m != nil {
+ return m.FileName
+ }
+ return ""
+}
+
+func (*SourceContext) XXX_MessageName() string {
+ return "google.protobuf.SourceContext"
+}
+func init() {
+ proto.RegisterType((*SourceContext)(nil), "google.protobuf.SourceContext")
+}
+
+func init() {
+ proto.RegisterFile("google/protobuf/source_context.proto", fileDescriptor_b686cdb126d509db)
+}
+
+var fileDescriptor_b686cdb126d509db = []byte{
+ // 212 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x49, 0xcf, 0xcf, 0x4f,
+ 0xcf, 0x49, 0xd5, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0x4f, 0x2a, 0x4d, 0xd3, 0x2f, 0xce, 0x2f, 0x2d,
+ 0x4a, 0x4e, 0x8d, 0x4f, 0xce, 0xcf, 0x2b, 0x49, 0xad, 0x28, 0xd1, 0x03, 0x8b, 0x0b, 0xf1, 0x43,
+ 0x54, 0xe9, 0xc1, 0x54, 0x29, 0xe9, 0x70, 0xf1, 0x06, 0x83, 0x15, 0x3a, 0x43, 0xd4, 0x09, 0x49,
+ 0x73, 0x71, 0xa6, 0x65, 0xe6, 0xa4, 0xc6, 0xe7, 0x25, 0xe6, 0xa6, 0x4a, 0x30, 0x2a, 0x30, 0x6a,
+ 0x70, 0x06, 0x71, 0x80, 0x04, 0xfc, 0x12, 0x73, 0x53, 0x9d, 0x3a, 0x19, 0x6f, 0x3c, 0x94, 0x63,
+ 0xf8, 0xf0, 0x50, 0x8e, 0xf1, 0xc7, 0x43, 0x39, 0xc6, 0x86, 0x47, 0x72, 0x8c, 0x2b, 0x1e, 0xc9,
+ 0x31, 0x9e, 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x2f, 0x1e,
+ 0xc9, 0x31, 0x7c, 0x00, 0x89, 0x3f, 0x96, 0x63, 0x3c, 0xf1, 0x58, 0x8e, 0x91, 0x4b, 0x38, 0x39,
+ 0x3f, 0x57, 0x0f, 0xcd, 0x56, 0x27, 0x21, 0x14, 0x3b, 0x03, 0x40, 0xc2, 0x01, 0x8c, 0x51, 0xac,
+ 0x25, 0x95, 0x05, 0xa9, 0xc5, 0x8b, 0x98, 0x98, 0xdd, 0x03, 0x9c, 0x56, 0x31, 0xc9, 0xb9, 0x43,
+ 0x34, 0x05, 0x40, 0x35, 0xe9, 0x85, 0xa7, 0xe6, 0xe4, 0x78, 0xe7, 0xe5, 0x97, 0xe7, 0x85, 0x80,
+ 0x94, 0x25, 0xb1, 0x81, 0x4d, 0x33, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0xb8, 0x37, 0x2a, 0xa1,
+ 0xf9, 0x00, 0x00, 0x00,
+}
+
+func (this *SourceContext) Compare(that interface{}) int {
+ if that == nil {
+ if this == nil {
+ return 0
+ }
+ return 1
+ }
+
+ that1, ok := that.(*SourceContext)
+ if !ok {
+ that2, ok := that.(SourceContext)
+ if ok {
+ that1 = &that2
+ } else {
+ return 1
+ }
+ }
+ if that1 == nil {
+ if this == nil {
+ return 0
+ }
+ return 1
+ } else if this == nil {
+ return -1
+ }
+ if this.FileName != that1.FileName {
+ if this.FileName < that1.FileName {
+ return -1
+ }
+ return 1
+ }
+ if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 {
+ return c
+ }
+ return 0
+}
+func (this *SourceContext) Equal(that interface{}) bool {
+ if that == nil {
+ return this == nil
+ }
+
+ that1, ok := that.(*SourceContext)
+ if !ok {
+ that2, ok := that.(SourceContext)
+ if ok {
+ that1 = &that2
+ } else {
+ return false
+ }
+ }
+ if that1 == nil {
+ return this == nil
+ } else if this == nil {
+ return false
+ }
+ if this.FileName != that1.FileName {
+ return false
+ }
+ if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
+ return false
+ }
+ return true
+}
+func (this *SourceContext) GoString() string {
+ if this == nil {
+ return "nil"
+ }
+ s := make([]string, 0, 5)
+ s = append(s, "&types.SourceContext{")
+ s = append(s, "FileName: "+fmt.Sprintf("%#v", this.FileName)+",\n")
+ if this.XXX_unrecognized != nil {
+ s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n")
+ }
+ s = append(s, "}")
+ return strings.Join(s, "")
+}
+func valueToGoStringSourceContext(v interface{}, typ string) string {
+ rv := reflect.ValueOf(v)
+ if rv.IsNil() {
+ return "nil"
+ }
+ pv := reflect.Indirect(rv).Interface()
+ return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv)
+}
+func (m *SourceContext) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *SourceContext) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.FileName) > 0 {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintSourceContext(dAtA, i, uint64(len(m.FileName)))
+ i += copy(dAtA[i:], m.FileName)
+ }
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
+ return i, nil
+}
+
+func encodeVarintSourceContext(dAtA []byte, offset int, v uint64) int {
+ for v >= 1<<7 {
+ dAtA[offset] = uint8(v&0x7f | 0x80)
+ v >>= 7
+ offset++
+ }
+ dAtA[offset] = uint8(v)
+ return offset + 1
+}
+func NewPopulatedSourceContext(r randySourceContext, easy bool) *SourceContext {
+ this := &SourceContext{}
+ this.FileName = string(randStringSourceContext(r))
+ if !easy && r.Intn(10) != 0 {
+ this.XXX_unrecognized = randUnrecognizedSourceContext(r, 2)
+ }
+ return this
+}
+
+type randySourceContext interface {
+ Float32() float32
+ Float64() float64
+ Int63() int64
+ Int31() int32
+ Uint32() uint32
+ Intn(n int) int
+}
+
+func randUTF8RuneSourceContext(r randySourceContext) rune {
+ ru := r.Intn(62)
+ if ru < 10 {
+ return rune(ru + 48)
+ } else if ru < 36 {
+ return rune(ru + 55)
+ }
+ return rune(ru + 61)
+}
+func randStringSourceContext(r randySourceContext) string {
+ v1 := r.Intn(100)
+ tmps := make([]rune, v1)
+ for i := 0; i < v1; i++ {
+ tmps[i] = randUTF8RuneSourceContext(r)
+ }
+ return string(tmps)
+}
+func randUnrecognizedSourceContext(r randySourceContext, maxFieldNumber int) (dAtA []byte) {
+ l := r.Intn(5)
+ for i := 0; i < l; i++ {
+ wire := r.Intn(4)
+ if wire == 3 {
+ wire = 5
+ }
+ fieldNumber := maxFieldNumber + r.Intn(100)
+ dAtA = randFieldSourceContext(dAtA, r, fieldNumber, wire)
+ }
+ return dAtA
+}
+func randFieldSourceContext(dAtA []byte, r randySourceContext, fieldNumber int, wire int) []byte {
+ key := uint32(fieldNumber)<<3 | uint32(wire)
+ switch wire {
+ case 0:
+ dAtA = encodeVarintPopulateSourceContext(dAtA, uint64(key))
+ v2 := r.Int63()
+ if r.Intn(2) == 0 {
+ v2 *= -1
+ }
+ dAtA = encodeVarintPopulateSourceContext(dAtA, uint64(v2))
+ case 1:
+ dAtA = encodeVarintPopulateSourceContext(dAtA, uint64(key))
+ dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)))
+ case 2:
+ dAtA = encodeVarintPopulateSourceContext(dAtA, uint64(key))
+ ll := r.Intn(100)
+ dAtA = encodeVarintPopulateSourceContext(dAtA, uint64(ll))
+ for j := 0; j < ll; j++ {
+ dAtA = append(dAtA, byte(r.Intn(256)))
+ }
+ default:
+ dAtA = encodeVarintPopulateSourceContext(dAtA, uint64(key))
+ dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)))
+ }
+ return dAtA
+}
+func encodeVarintPopulateSourceContext(dAtA []byte, v uint64) []byte {
+ for v >= 1<<7 {
+ dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80))
+ v >>= 7
+ }
+ dAtA = append(dAtA, uint8(v))
+ return dAtA
+}
+func (m *SourceContext) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.FileName)
+ if l > 0 {
+ n += 1 + l + sovSourceContext(uint64(l))
+ }
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
+ return n
+}
+
+func sovSourceContext(x uint64) (n int) {
+ for {
+ n++
+ x >>= 7
+ if x == 0 {
+ break
+ }
+ }
+ return n
+}
+func sozSourceContext(x uint64) (n int) {
+ return sovSourceContext(uint64((x << 1) ^ uint64((int64(x) >> 63))))
+}
+func (this *SourceContext) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&SourceContext{`,
+ `FileName:` + fmt.Sprintf("%v", this.FileName) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func valueToStringSourceContext(v interface{}) string {
+ rv := reflect.ValueOf(v)
+ if rv.IsNil() {
+ return "nil"
+ }
+ pv := reflect.Indirect(rv).Interface()
+ return fmt.Sprintf("*%v", pv)
+}
+func (m *SourceContext) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowSourceContext
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: SourceContext: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: SourceContext: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field FileName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowSourceContext
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthSourceContext
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthSourceContext
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.FileName = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipSourceContext(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthSourceContext
+ }
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthSourceContext
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func skipSourceContext(dAtA []byte) (n int, err error) {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowSourceContext
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ wireType := int(wire & 0x7)
+ switch wireType {
+ case 0:
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowSourceContext
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ iNdEx++
+ if dAtA[iNdEx-1] < 0x80 {
+ break
+ }
+ }
+ return iNdEx, nil
+ case 1:
+ iNdEx += 8
+ return iNdEx, nil
+ case 2:
+ var length int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowSourceContext
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ length |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if length < 0 {
+ return 0, ErrInvalidLengthSourceContext
+ }
+ iNdEx += length
+ if iNdEx < 0 {
+ return 0, ErrInvalidLengthSourceContext
+ }
+ return iNdEx, nil
+ case 3:
+ for {
+ var innerWire uint64
+ var start int = iNdEx
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowSourceContext
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ innerWire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ innerWireType := int(innerWire & 0x7)
+ if innerWireType == 4 {
+ break
+ }
+ next, err := skipSourceContext(dAtA[start:])
+ if err != nil {
+ return 0, err
+ }
+ iNdEx = start + next
+ if iNdEx < 0 {
+ return 0, ErrInvalidLengthSourceContext
+ }
+ }
+ return iNdEx, nil
+ case 4:
+ return iNdEx, nil
+ case 5:
+ iNdEx += 4
+ return iNdEx, nil
+ default:
+ return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
+ }
+ }
+ panic("unreachable")
+}
+
+var (
+ ErrInvalidLengthSourceContext = fmt.Errorf("proto: negative length found during unmarshaling")
+ ErrIntOverflowSourceContext = fmt.Errorf("proto: integer overflow")
+)
diff --git a/vendor/github.com/gogo/protobuf/types/struct.pb.go b/vendor/github.com/gogo/protobuf/types/struct.pb.go
index 7d5372b03..63fd17b03 100644
--- a/vendor/github.com/gogo/protobuf/types/struct.pb.go
+++ b/vendor/github.com/gogo/protobuf/types/struct.pb.go
@@ -1,32 +1,20 @@
// Code generated by protoc-gen-gogo. DO NOT EDIT.
-// source: struct.proto
+// source: google/protobuf/struct.proto
-/*
- Package types is a generated protocol buffer package.
-
- It is generated from these files:
- struct.proto
-
- It has these top-level messages:
- Struct
- Value
- ListValue
-*/
package types
-import proto "github.com/gogo/protobuf/proto"
-import fmt "fmt"
-import math "math"
-
-import strconv "strconv"
-
-import strings "strings"
-import reflect "reflect"
-import sortkeys "github.com/gogo/protobuf/sortkeys"
-
-import binary "encoding/binary"
-
-import io "io"
+import (
+ bytes "bytes"
+ encoding_binary "encoding/binary"
+ fmt "fmt"
+ proto "github.com/gogo/protobuf/proto"
+ github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys"
+ io "io"
+ math "math"
+ reflect "reflect"
+ strconv "strconv"
+ strings "strings"
+)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
@@ -47,18 +35,22 @@ type NullValue int32
const (
// Null value.
- NULL_VALUE NullValue = 0
+ NullValue_NULL_VALUE NullValue = 0
)
var NullValue_name = map[int32]string{
0: "NULL_VALUE",
}
+
var NullValue_value = map[string]int32{
"NULL_VALUE": 0,
}
-func (NullValue) EnumDescriptor() ([]byte, []int) { return fileDescriptorStruct, []int{0} }
-func (NullValue) XXX_WellKnownType() string { return "NullValue" }
+func (NullValue) EnumDescriptor() ([]byte, []int) {
+ return fileDescriptor_df322afd6c9fb402, []int{0}
+}
+
+func (NullValue) XXX_WellKnownType() string { return "NullValue" }
// `Struct` represents a structured data value, consisting of fields
// which map to dynamically typed values. In some languages, `Struct`
@@ -70,13 +62,44 @@ func (NullValue) XXX_WellKnownType() string { return "NullValue" }
// The JSON representation for `Struct` is JSON object.
type Struct struct {
// Unordered map of dynamically typed values.
- Fields map[string]*Value `protobuf:"bytes,1,rep,name=fields" json:"fields,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"`
+ Fields map[string]*Value `protobuf:"bytes,1,rep,name=fields,proto3" json:"fields,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 *Struct) Reset() { *m = Struct{} }
-func (*Struct) ProtoMessage() {}
-func (*Struct) Descriptor() ([]byte, []int) { return fileDescriptorStruct, []int{0} }
-func (*Struct) XXX_WellKnownType() string { return "Struct" }
+func (m *Struct) Reset() { *m = Struct{} }
+func (*Struct) ProtoMessage() {}
+func (*Struct) Descriptor() ([]byte, []int) {
+ return fileDescriptor_df322afd6c9fb402, []int{0}
+}
+func (*Struct) XXX_WellKnownType() string { return "Struct" }
+func (m *Struct) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *Struct) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_Struct.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *Struct) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_Struct.Merge(m, src)
+}
+func (m *Struct) XXX_Size() int {
+ return m.Size()
+}
+func (m *Struct) XXX_DiscardUnknown() {
+ xxx_messageInfo_Struct.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Struct proto.InternalMessageInfo
func (m *Struct) GetFields() map[string]*Value {
if m != nil {
@@ -85,6 +108,10 @@ func (m *Struct) GetFields() map[string]*Value {
return nil
}
+func (*Struct) XXX_MessageName() string {
+ return "google.protobuf.Struct"
+}
+
// `Value` represents a dynamically typed value which can be either
// null, a number, a string, a boolean, a recursive struct value, or a
// list of values. A producer of value is expected to set one of that
@@ -101,13 +128,44 @@ type Value struct {
// *Value_BoolValue
// *Value_StructValue
// *Value_ListValue
- Kind isValue_Kind `protobuf_oneof:"kind"`
+ Kind isValue_Kind `protobuf_oneof:"kind"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *Value) Reset() { *m = Value{} }
-func (*Value) ProtoMessage() {}
-func (*Value) Descriptor() ([]byte, []int) { return fileDescriptorStruct, []int{1} }
-func (*Value) XXX_WellKnownType() string { return "Value" }
+func (m *Value) Reset() { *m = Value{} }
+func (*Value) ProtoMessage() {}
+func (*Value) Descriptor() ([]byte, []int) {
+ return fileDescriptor_df322afd6c9fb402, []int{1}
+}
+func (*Value) XXX_WellKnownType() string { return "Value" }
+func (m *Value) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *Value) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_Value.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *Value) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_Value.Merge(m, src)
+}
+func (m *Value) XXX_Size() int {
+ return m.Size()
+}
+func (m *Value) XXX_DiscardUnknown() {
+ xxx_messageInfo_Value.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Value proto.InternalMessageInfo
type isValue_Kind interface {
isValue_Kind()
@@ -129,10 +187,10 @@ type Value_BoolValue struct {
BoolValue bool `protobuf:"varint,4,opt,name=bool_value,json=boolValue,proto3,oneof"`
}
type Value_StructValue struct {
- StructValue *Struct `protobuf:"bytes,5,opt,name=struct_value,json=structValue,oneof"`
+ StructValue *Struct `protobuf:"bytes,5,opt,name=struct_value,json=structValue,proto3,oneof"`
}
type Value_ListValue struct {
- ListValue *ListValue `protobuf:"bytes,6,opt,name=list_value,json=listValue,oneof"`
+ ListValue *ListValue `protobuf:"bytes,6,opt,name=list_value,json=listValue,proto3,oneof"`
}
func (*Value_NullValue) isValue_Kind() {}
@@ -153,7 +211,7 @@ func (m *Value) GetNullValue() NullValue {
if x, ok := m.GetKind().(*Value_NullValue); ok {
return x.NullValue
}
- return NULL_VALUE
+ return NullValue_NULL_VALUE
}
func (m *Value) GetNumberValue() float64 {
@@ -297,26 +355,26 @@ func _Value_OneofSizer(msg proto.Message) (n int) {
// kind
switch x := m.Kind.(type) {
case *Value_NullValue:
- n += proto.SizeVarint(1<<3 | proto.WireVarint)
+ n += 1 // tag and wire
n += proto.SizeVarint(uint64(x.NullValue))
case *Value_NumberValue:
- n += proto.SizeVarint(2<<3 | proto.WireFixed64)
+ n += 1 // tag and wire
n += 8
case *Value_StringValue:
- n += proto.SizeVarint(3<<3 | proto.WireBytes)
+ n += 1 // tag and wire
n += proto.SizeVarint(uint64(len(x.StringValue)))
n += len(x.StringValue)
case *Value_BoolValue:
- n += proto.SizeVarint(4<<3 | proto.WireVarint)
+ n += 1 // tag and wire
n += 1
case *Value_StructValue:
s := proto.Size(x.StructValue)
- n += proto.SizeVarint(5<<3 | proto.WireBytes)
+ n += 1 // tag and wire
n += proto.SizeVarint(uint64(s))
n += s
case *Value_ListValue:
s := proto.Size(x.ListValue)
- n += proto.SizeVarint(6<<3 | proto.WireBytes)
+ n += 1 // tag and wire
n += proto.SizeVarint(uint64(s))
n += s
case nil:
@@ -326,18 +384,53 @@ func _Value_OneofSizer(msg proto.Message) (n int) {
return n
}
+func (*Value) XXX_MessageName() string {
+ return "google.protobuf.Value"
+}
+
// `ListValue` is a wrapper around a repeated field of values.
//
// The JSON representation for `ListValue` is JSON array.
type ListValue struct {
// Repeated field of dynamically typed values.
- Values []*Value `protobuf:"bytes,1,rep,name=values" json:"values,omitempty"`
+ Values []*Value `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *ListValue) Reset() { *m = ListValue{} }
-func (*ListValue) ProtoMessage() {}
-func (*ListValue) Descriptor() ([]byte, []int) { return fileDescriptorStruct, []int{2} }
-func (*ListValue) XXX_WellKnownType() string { return "ListValue" }
+func (m *ListValue) Reset() { *m = ListValue{} }
+func (*ListValue) ProtoMessage() {}
+func (*ListValue) Descriptor() ([]byte, []int) {
+ return fileDescriptor_df322afd6c9fb402, []int{2}
+}
+func (*ListValue) XXX_WellKnownType() string { return "ListValue" }
+func (m *ListValue) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *ListValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_ListValue.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *ListValue) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_ListValue.Merge(m, src)
+}
+func (m *ListValue) XXX_Size() int {
+ return m.Size()
+}
+func (m *ListValue) XXX_DiscardUnknown() {
+ xxx_messageInfo_ListValue.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_ListValue proto.InternalMessageInfo
func (m *ListValue) GetValues() []*Value {
if m != nil {
@@ -346,12 +439,51 @@ func (m *ListValue) GetValues() []*Value {
return nil
}
+func (*ListValue) XXX_MessageName() string {
+ return "google.protobuf.ListValue"
+}
func init() {
+ proto.RegisterEnum("google.protobuf.NullValue", NullValue_name, NullValue_value)
proto.RegisterType((*Struct)(nil), "google.protobuf.Struct")
+ proto.RegisterMapType((map[string]*Value)(nil), "google.protobuf.Struct.FieldsEntry")
proto.RegisterType((*Value)(nil), "google.protobuf.Value")
proto.RegisterType((*ListValue)(nil), "google.protobuf.ListValue")
- proto.RegisterEnum("google.protobuf.NullValue", NullValue_name, NullValue_value)
}
+
+func init() { proto.RegisterFile("google/protobuf/struct.proto", fileDescriptor_df322afd6c9fb402) }
+
+var fileDescriptor_df322afd6c9fb402 = []byte{
+ // 439 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x91, 0xc1, 0x6b, 0xd4, 0x40,
+ 0x14, 0xc6, 0xf3, 0xb2, 0xdd, 0xe0, 0xbe, 0x48, 0x2d, 0x23, 0xe8, 0x52, 0x65, 0x5c, 0xb6, 0x97,
+ 0x45, 0x24, 0x85, 0xf5, 0x22, 0xae, 0x17, 0x17, 0x6a, 0x0b, 0x86, 0x12, 0xa3, 0xad, 0xe0, 0x65,
+ 0x31, 0x69, 0xba, 0x84, 0x4e, 0x67, 0x4a, 0x32, 0xa3, 0xec, 0x4d, 0xff, 0x0b, 0xcf, 0x9e, 0xc4,
+ 0xa3, 0x7f, 0x85, 0x47, 0x8f, 0x1e, 0xdd, 0x78, 0xf1, 0xd8, 0x63, 0x8f, 0x32, 0x33, 0x49, 0x94,
+ 0x2e, 0xbd, 0xe5, 0x7d, 0xf3, 0x7b, 0xdf, 0x7b, 0xdf, 0x0b, 0xde, 0x9d, 0x0b, 0x31, 0x67, 0xd9,
+ 0xf6, 0x59, 0x21, 0xa4, 0x48, 0xd4, 0xf1, 0x76, 0x29, 0x0b, 0x95, 0xca, 0xc0, 0xd4, 0xe4, 0x86,
+ 0x7d, 0x0d, 0x9a, 0xd7, 0xe1, 0x27, 0x40, 0xef, 0xa5, 0x21, 0xc8, 0x04, 0xbd, 0xe3, 0x3c, 0x63,
+ 0x47, 0x65, 0x1f, 0x06, 0x9d, 0x91, 0x3f, 0xde, 0x0a, 0x2e, 0xc1, 0x81, 0x05, 0x83, 0x67, 0x86,
+ 0xda, 0xe1, 0xb2, 0x58, 0x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x6b, 0x8f, 0x48, 0xd6, 0x11, 0xf7, 0x0f, 0xc2, 0x70, 0x76,
+ 0xf8, 0x34, 0x3c, 0xd8, 0xd9, 0x70, 0xa6, 0x1f, 0xe1, 0xe7, 0x92, 0x3a, 0xe7, 0x4b, 0x0a, 0x17,
+ 0x4b, 0x0a, 0x1f, 0x2a, 0x0a, 0x5f, 0x2a, 0x0a, 0xdf, 0x2b, 0x0a, 0x3f, 0x2a, 0x0a, 0xbf, 0x2a,
+ 0x0a, 0x7f, 0x2a, 0xea, 0x9c, 0x6b, 0xed, 0x37, 0x05, 0xbc, 0x99, 0x8a, 0xd3, 0xcb, 0xe3, 0xa6,
+ 0xbe, 0x4d, 0x1e, 0xe9, 0x3a, 0x82, 0x37, 0x5d, 0xb9, 0x38, 0xcb, 0xca, 0x0b, 0x80, 0xcf, 0x6e,
+ 0x67, 0x37, 0x9a, 0x7e, 0x75, 0xe9, 0xae, 0x6d, 0x88, 0x9a, 0xfd, 0x5e, 0x67, 0x8c, 0x3d, 0xe7,
+ 0xe2, 0x3d, 0x7f, 0xa5, 0xc9, 0xc4, 0x33, 0x4e, 0x0f, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0xad,
+ 0x84, 0x08, 0xae, 0xe5, 0x02, 0x00, 0x00,
+}
+
func (x NullValue) String() string {
s, ok := NullValue_name[int32(x)]
if ok {
@@ -386,6 +518,9 @@ func (this *Struct) Equal(that interface{}) bool {
return false
}
}
+ if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
+ return false
+ }
return true
}
func (this *Value) Equal(that interface{}) bool {
@@ -416,6 +551,9 @@ func (this *Value) Equal(that interface{}) bool {
} else if !this.Kind.Equal(that1.Kind) {
return false
}
+ if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
+ return false
+ }
return true
}
func (this *Value_NullValue) Equal(that interface{}) bool {
@@ -589,6 +727,9 @@ func (this *ListValue) Equal(that interface{}) bool {
return false
}
}
+ if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
+ return false
+ }
return true
}
func (this *Struct) GoString() string {
@@ -601,7 +742,7 @@ func (this *Struct) GoString() string {
for k := range this.Fields {
keysForFields = append(keysForFields, k)
}
- sortkeys.Strings(keysForFields)
+ github_com_gogo_protobuf_sortkeys.Strings(keysForFields)
mapStringForFields := "map[string]*Value{"
for _, k := range keysForFields {
mapStringForFields += fmt.Sprintf("%#v: %#v,", k, this.Fields[k])
@@ -610,6 +751,9 @@ func (this *Struct) GoString() string {
if this.Fields != nil {
s = append(s, "Fields: "+mapStringForFields+",\n")
}
+ if this.XXX_unrecognized != nil {
+ s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n")
+ }
s = append(s, "}")
return strings.Join(s, "")
}
@@ -622,6 +766,9 @@ func (this *Value) GoString() string {
if this.Kind != nil {
s = append(s, "Kind: "+fmt.Sprintf("%#v", this.Kind)+",\n")
}
+ if this.XXX_unrecognized != nil {
+ s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n")
+ }
s = append(s, "}")
return strings.Join(s, "")
}
@@ -682,6 +829,9 @@ func (this *ListValue) GoString() string {
if this.Values != nil {
s = append(s, "Values: "+fmt.Sprintf("%#v", this.Values)+",\n")
}
+ if this.XXX_unrecognized != nil {
+ s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n")
+ }
s = append(s, "}")
return strings.Join(s, "")
}
@@ -736,6 +886,9 @@ func (m *Struct) MarshalTo(dAtA []byte) (int, error) {
}
}
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -761,6 +914,9 @@ func (m *Value) MarshalTo(dAtA []byte) (int, error) {
}
i += nn2
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -775,7 +931,7 @@ func (m *Value_NumberValue) MarshalTo(dAtA []byte) (int, error) {
i := 0
dAtA[i] = 0x11
i++
- binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.NumberValue))))
+ encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.NumberValue))))
i += 8
return i, nil
}
@@ -854,6 +1010,9 @@ func (m *ListValue) MarshalTo(dAtA []byte) (int, error) {
i += n
}
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -876,6 +1035,7 @@ func NewPopulatedStruct(r randyStruct, easy bool) *Struct {
}
}
if !easy && r.Intn(10) != 0 {
+ this.XXX_unrecognized = randUnrecognizedStruct(r, 2)
}
return this
}
@@ -898,6 +1058,7 @@ func NewPopulatedValue(r randyStruct, easy bool) *Value {
this.Kind = NewPopulatedValue_ListValue(r, easy)
}
if !easy && r.Intn(10) != 0 {
+ this.XXX_unrecognized = randUnrecognizedStruct(r, 7)
}
return this
}
@@ -945,6 +1106,7 @@ func NewPopulatedListValue(r randyStruct, easy bool) *ListValue {
}
}
if !easy && r.Intn(10) != 0 {
+ this.XXX_unrecognized = randUnrecognizedStruct(r, 2)
}
return this
}
@@ -1022,6 +1184,9 @@ func encodeVarintPopulateStruct(dAtA []byte, v uint64) []byte {
return dAtA
}
func (m *Struct) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
if len(m.Fields) > 0 {
@@ -1037,31 +1202,49 @@ func (m *Struct) Size() (n int) {
n += mapEntrySize + 1 + sovStruct(uint64(mapEntrySize))
}
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *Value) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
if m.Kind != nil {
n += m.Kind.Size()
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *Value_NullValue) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
n += 1 + sovStruct(uint64(m.NullValue))
return n
}
func (m *Value_NumberValue) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
n += 9
return n
}
func (m *Value_StringValue) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.StringValue)
@@ -1069,12 +1252,18 @@ func (m *Value_StringValue) Size() (n int) {
return n
}
func (m *Value_BoolValue) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
n += 2
return n
}
func (m *Value_StructValue) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
if m.StructValue != nil {
@@ -1084,6 +1273,9 @@ func (m *Value_StructValue) Size() (n int) {
return n
}
func (m *Value_ListValue) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
if m.ListValue != nil {
@@ -1093,6 +1285,9 @@ func (m *Value_ListValue) Size() (n int) {
return n
}
func (m *ListValue) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
if len(m.Values) > 0 {
@@ -1101,6 +1296,9 @@ func (m *ListValue) Size() (n int) {
n += 1 + l + sovStruct(uint64(l))
}
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
@@ -1125,7 +1323,7 @@ func (this *Struct) String() string {
for k := range this.Fields {
keysForFields = append(keysForFields, k)
}
- sortkeys.Strings(keysForFields)
+ github_com_gogo_protobuf_sortkeys.Strings(keysForFields)
mapStringForFields := "map[string]*Value{"
for _, k := range keysForFields {
mapStringForFields += fmt.Sprintf("%v: %v,", k, this.Fields[k])
@@ -1133,6 +1331,7 @@ func (this *Struct) String() string {
mapStringForFields += "}"
s := strings.Join([]string{`&Struct{`,
`Fields:` + mapStringForFields + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -1143,6 +1342,7 @@ func (this *Value) String() string {
}
s := strings.Join([]string{`&Value{`,
`Kind:` + fmt.Sprintf("%v", this.Kind) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -1213,6 +1413,7 @@ func (this *ListValue) String() string {
}
s := strings.Join([]string{`&ListValue{`,
`Values:` + strings.Replace(fmt.Sprintf("%v", this.Values), "Value", "Value", 1) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -1240,7 +1441,7 @@ func (m *Struct) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1268,7 +1469,7 @@ func (m *Struct) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1277,6 +1478,9 @@ func (m *Struct) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthStruct
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthStruct
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -1297,7 +1501,7 @@ func (m *Struct) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1314,7 +1518,7 @@ func (m *Struct) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLenmapkey |= (uint64(b) & 0x7F) << shift
+ stringLenmapkey |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1324,6 +1528,9 @@ func (m *Struct) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthStruct
}
postStringIndexmapkey := iNdEx + intStringLenmapkey
+ if postStringIndexmapkey < 0 {
+ return ErrInvalidLengthStruct
+ }
if postStringIndexmapkey > l {
return io.ErrUnexpectedEOF
}
@@ -1340,7 +1547,7 @@ func (m *Struct) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- mapmsglen |= (int(b) & 0x7F) << shift
+ mapmsglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1349,7 +1556,7 @@ func (m *Struct) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthStruct
}
postmsgIndex := iNdEx + mapmsglen
- if mapmsglen < 0 {
+ if postmsgIndex < 0 {
return ErrInvalidLengthStruct
}
if postmsgIndex > l {
@@ -1386,9 +1593,13 @@ func (m *Struct) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthStruct
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthStruct
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -1413,7 +1624,7 @@ func (m *Value) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1441,7 +1652,7 @@ func (m *Value) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- v |= (NullValue(b) & 0x7F) << shift
+ v |= NullValue(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1455,7 +1666,7 @@ func (m *Value) Unmarshal(dAtA []byte) error {
if (iNdEx + 8) > l {
return io.ErrUnexpectedEOF
}
- v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:]))
+ v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:]))
iNdEx += 8
m.Kind = &Value_NumberValue{float64(math.Float64frombits(v))}
case 3:
@@ -1472,7 +1683,7 @@ func (m *Value) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1482,6 +1693,9 @@ func (m *Value) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthStruct
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthStruct
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -1501,7 +1715,7 @@ func (m *Value) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- v |= (int(b) & 0x7F) << shift
+ v |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1522,7 +1736,7 @@ func (m *Value) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1531,6 +1745,9 @@ func (m *Value) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthStruct
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthStruct
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -1554,7 +1771,7 @@ func (m *Value) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1563,6 +1780,9 @@ func (m *Value) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthStruct
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthStruct
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -1581,9 +1801,13 @@ func (m *Value) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthStruct
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthStruct
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -1608,7 +1832,7 @@ func (m *ListValue) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1636,7 +1860,7 @@ func (m *ListValue) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1645,6 +1869,9 @@ func (m *ListValue) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthStruct
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthStruct
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -1662,9 +1889,13 @@ func (m *ListValue) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthStruct
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthStruct
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -1728,10 +1959,13 @@ func skipStruct(dAtA []byte) (n int, err error) {
break
}
}
- iNdEx += length
if length < 0 {
return 0, ErrInvalidLengthStruct
}
+ iNdEx += length
+ if iNdEx < 0 {
+ return 0, ErrInvalidLengthStruct
+ }
return iNdEx, nil
case 3:
for {
@@ -1760,6 +1994,9 @@ func skipStruct(dAtA []byte) (n int, err error) {
return 0, err
}
iNdEx = start + next
+ if iNdEx < 0 {
+ return 0, ErrInvalidLengthStruct
+ }
}
return iNdEx, nil
case 4:
@@ -1778,36 +2015,3 @@ var (
ErrInvalidLengthStruct = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowStruct = fmt.Errorf("proto: integer overflow")
)
-
-func init() { proto.RegisterFile("struct.proto", fileDescriptorStruct) }
-
-var fileDescriptorStruct = []byte{
- // 432 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x91, 0xb1, 0x6f, 0xd3, 0x40,
- 0x14, 0xc6, 0xfd, 0x9c, 0xc6, 0x22, 0xcf, 0x55, 0xa9, 0x0e, 0x09, 0xa2, 0x22, 0x1d, 0x51, 0xba,
- 0x58, 0x08, 0x79, 0x08, 0x0b, 0x22, 0x2c, 0x58, 0x2a, 0xad, 0x84, 0x55, 0x19, 0x43, 0x8b, 0xc4,
- 0x12, 0xe1, 0xd4, 0x8d, 0xac, 0x5e, 0xef, 0x2a, 0xfb, 0x0c, 0xca, 0x06, 0xff, 0x05, 0x33, 0x13,
- 0x62, 0xe4, 0xaf, 0x60, 0xec, 0xc8, 0x88, 0x3d, 0x31, 0x76, 0xec, 0x88, 0xee, 0xce, 0x36, 0xa8,
- 0x51, 0x36, 0xbf, 0xcf, 0xbf, 0xf7, 0xbd, 0xf7, 0xbd, 0xc3, 0xcd, 0x42, 0xe6, 0xe5, 0x5c, 0xfa,
- 0x17, 0xb9, 0x90, 0x82, 0xdc, 0x5e, 0x08, 0xb1, 0x60, 0xa9, 0xa9, 0x92, 0xf2, 0x74, 0xfc, 0x05,
- 0xd0, 0x79, 0xad, 0x09, 0x32, 0x45, 0xe7, 0x34, 0x4b, 0xd9, 0x49, 0x31, 0x84, 0x51, 0xcf, 0x73,
- 0x27, 0xbb, 0xfe, 0x0d, 0xd8, 0x37, 0xa0, 0xff, 0x42, 0x53, 0x7b, 0x5c, 0xe6, 0xcb, 0xb8, 0x69,
- 0xd9, 0x79, 0x85, 0xee, 0x7f, 0x32, 0xd9, 0xc6, 0xde, 0x59, 0xba, 0x1c, 0xc2, 0x08, 0xbc, 0x41,
- 0xac, 0x3e, 0xc9, 0x23, 0xec, 0x7f, 0x78, 0xcf, 0xca, 0x74, 0x68, 0x8f, 0xc0, 0x73, 0x27, 0x77,
- 0x57, 0xcc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e1, 0xb2, 0xa6, 0xf0, 0xbb, 0xa6, 0xf0, 0xa7, 0xa6, 0xd6, 0x55,
- 0x4d, 0x01, 0xef, 0xcc, 0xc5, 0xf9, 0xcd, 0x71, 0x81, 0x6b, 0x92, 0x47, 0xaa, 0x8e, 0xe0, 0x5d,
- 0x5f, 0x2e, 0x2f, 0xd2, 0xe2, 0x1a, 0xe0, 0xab, 0xdd, 0xdb, 0x8f, 0x82, 0xef, 0x36, 0xdd, 0x37,
- 0x0d, 0x51, 0xbb, 0xdf, 0xdb, 0x94, 0xb1, 0x97, 0x5c, 0x7c, 0xe4, 0x6f, 0x14, 0x99, 0x38, 0xda,
- 0xe9, 0xf1, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x75, 0xc5, 0x1c, 0x3b, 0xd5, 0x02, 0x00, 0x00,
-}
diff --git a/vendor/github.com/gogo/protobuf/types/timestamp.go b/vendor/github.com/gogo/protobuf/types/timestamp.go
index 7ae54d8b3..232ada57c 100644
--- a/vendor/github.com/gogo/protobuf/types/timestamp.go
+++ b/vendor/github.com/gogo/protobuf/types/timestamp.go
@@ -109,11 +109,9 @@ func TimestampNow() *Timestamp {
// TimestampProto converts the time.Time to a google.protobuf.Timestamp proto.
// It returns an error if the resulting Timestamp is invalid.
func TimestampProto(t time.Time) (*Timestamp, error) {
- seconds := t.Unix()
- nanos := int32(t.Sub(time.Unix(seconds, 0)))
ts := &Timestamp{
- Seconds: seconds,
- Nanos: nanos,
+ Seconds: t.Unix(),
+ Nanos: int32(t.Nanosecond()),
}
if err := validateTimestamp(ts); err != nil {
return nil, err
diff --git a/vendor/github.com/gogo/protobuf/types/timestamp.pb.go b/vendor/github.com/gogo/protobuf/types/timestamp.pb.go
index 41b18f941..3ee6cb0a1 100644
--- a/vendor/github.com/gogo/protobuf/types/timestamp.pb.go
+++ b/vendor/github.com/gogo/protobuf/types/timestamp.pb.go
@@ -1,25 +1,17 @@
// Code generated by protoc-gen-gogo. DO NOT EDIT.
-// source: timestamp.proto
+// source: google/protobuf/timestamp.proto
-/*
- Package types is a generated protocol buffer package.
-
- It is generated from these files:
- timestamp.proto
-
- It has these top-level messages:
- Timestamp
-*/
package types
-import proto "github.com/gogo/protobuf/proto"
-import fmt "fmt"
-import math "math"
-
-import strings "strings"
-import reflect "reflect"
-
-import io "io"
+import (
+ bytes "bytes"
+ fmt "fmt"
+ proto "github.com/gogo/protobuf/proto"
+ io "io"
+ math "math"
+ reflect "reflect"
+ strings "strings"
+)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
@@ -32,17 +24,19 @@ var _ = math.Inf
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
-// A Timestamp represents a point in time independent of any time zone
-// or calendar, represented as seconds and fractions of seconds at
-// nanosecond resolution in UTC Epoch time. It is encoded using the
-// Proleptic Gregorian Calendar which extends the Gregorian calendar
-// backwards to year one. It is encoded assuming all minutes are 60
-// seconds long, i.e. leap seconds are "smeared" so that no leap second
-// table is needed for interpretation. Range is from
-// 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z.
-// By restricting to that range, we ensure that we can convert to
-// and from RFC 3339 date strings.
-// See [https://www.ietf.org/rfc/rfc3339.txt](https://www.ietf.org/rfc/rfc3339.txt).
+// A Timestamp represents a point in time independent of any time zone or local
+// calendar, encoded as a count of seconds and fractions of seconds at
+// nanosecond resolution. The count is relative to an epoch at UTC midnight on
+// January 1, 1970, in the proleptic Gregorian calendar which extends the
+// Gregorian calendar backwards to year one.
+//
+// All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap
+// second table is needed for interpretation, using a [24-hour linear
+// smear](https://developers.google.com/time/smear).
+//
+// The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By
+// restricting to that range, we ensure that we can convert to and from [RFC
+// 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings.
//
// # Examples
//
@@ -95,19 +89,21 @@ const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
// {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional
// seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution),
// are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone
-// is required, though only UTC (as indicated by "Z") is presently supported.
+// is required. A proto3 JSON serializer should always use UTC (as indicated by
+// "Z") when printing the Timestamp type and a proto3 JSON parser should be
+// able to accept both UTC and other timezones (as indicated by an offset).
//
// For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past
// 01:30 UTC on January 15, 2017.
//
// In JavaScript, one can convert a Date object to this format using the
-// standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString]
+// standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)
// method. In Python, a standard `datetime.datetime` object can be converted
// to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime)
// with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one
// can use the Joda Time's [`ISODateTimeFormat.dateTime()`](
-// http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime())
-// to obtain a formatter capable of generating timestamps in this format.
+// http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D
+// ) to obtain a formatter capable of generating timestamps in this format.
//
//
type Timestamp struct {
@@ -119,13 +115,44 @@ type Timestamp struct {
// second values with fractions must still have non-negative nanos values
// that count forward in time. Must be from 0 to 999,999,999
// inclusive.
- Nanos int32 `protobuf:"varint,2,opt,name=nanos,proto3" json:"nanos,omitempty"`
+ Nanos int32 `protobuf:"varint,2,opt,name=nanos,proto3" json:"nanos,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *Timestamp) Reset() { *m = Timestamp{} }
-func (*Timestamp) ProtoMessage() {}
-func (*Timestamp) Descriptor() ([]byte, []int) { return fileDescriptorTimestamp, []int{0} }
-func (*Timestamp) XXX_WellKnownType() string { return "Timestamp" }
+func (m *Timestamp) Reset() { *m = Timestamp{} }
+func (*Timestamp) ProtoMessage() {}
+func (*Timestamp) Descriptor() ([]byte, []int) {
+ return fileDescriptor_292007bbfe81227e, []int{0}
+}
+func (*Timestamp) XXX_WellKnownType() string { return "Timestamp" }
+func (m *Timestamp) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *Timestamp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_Timestamp.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *Timestamp) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_Timestamp.Merge(m, src)
+}
+func (m *Timestamp) XXX_Size() int {
+ return m.Size()
+}
+func (m *Timestamp) XXX_DiscardUnknown() {
+ xxx_messageInfo_Timestamp.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Timestamp proto.InternalMessageInfo
func (m *Timestamp) GetSeconds() int64 {
if m != nil {
@@ -141,9 +168,33 @@ func (m *Timestamp) GetNanos() int32 {
return 0
}
+func (*Timestamp) XXX_MessageName() string {
+ return "google.protobuf.Timestamp"
+}
func init() {
proto.RegisterType((*Timestamp)(nil), "google.protobuf.Timestamp")
}
+
+func init() { proto.RegisterFile("google/protobuf/timestamp.proto", fileDescriptor_292007bbfe81227e) }
+
+var fileDescriptor_292007bbfe81227e = []byte{
+ // 212 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4f, 0xcf, 0xcf, 0x4f,
+ 0xcf, 0x49, 0xd5, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0x4f, 0x2a, 0x4d, 0xd3,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 0xfa, 0x00, 0x00, 0x00,
+}
+
func (this *Timestamp) Compare(that interface{}) int {
if that == nil {
if this == nil {
@@ -181,6 +232,9 @@ func (this *Timestamp) Compare(that interface{}) int {
}
return 1
}
+ if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 {
+ return c
+ }
return 0
}
func (this *Timestamp) Equal(that interface{}) bool {
@@ -208,6 +262,9 @@ func (this *Timestamp) Equal(that interface{}) bool {
if this.Nanos != that1.Nanos {
return false
}
+ if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
+ return false
+ }
return true
}
func (this *Timestamp) GoString() string {
@@ -218,6 +275,9 @@ func (this *Timestamp) GoString() string {
s = append(s, "&types.Timestamp{")
s = append(s, "Seconds: "+fmt.Sprintf("%#v", this.Seconds)+",\n")
s = append(s, "Nanos: "+fmt.Sprintf("%#v", this.Nanos)+",\n")
+ if this.XXX_unrecognized != nil {
+ s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n")
+ }
s = append(s, "}")
return strings.Join(s, "")
}
@@ -254,6 +314,9 @@ func (m *Timestamp) MarshalTo(dAtA []byte) (int, error) {
i++
i = encodeVarintTimestamp(dAtA, i, uint64(m.Nanos))
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -267,6 +330,9 @@ func encodeVarintTimestamp(dAtA []byte, offset int, v uint64) int {
return offset + 1
}
func (m *Timestamp) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
if m.Seconds != 0 {
@@ -275,6 +341,9 @@ func (m *Timestamp) Size() (n int) {
if m.Nanos != 0 {
n += 1 + sovTimestamp(uint64(m.Nanos))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
@@ -306,7 +375,7 @@ func (m *Timestamp) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -334,7 +403,7 @@ func (m *Timestamp) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- m.Seconds |= (int64(b) & 0x7F) << shift
+ m.Seconds |= int64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -353,7 +422,7 @@ func (m *Timestamp) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- m.Nanos |= (int32(b) & 0x7F) << shift
+ m.Nanos |= int32(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -367,9 +436,13 @@ func (m *Timestamp) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthTimestamp
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthTimestamp
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -433,10 +506,13 @@ func skipTimestamp(dAtA []byte) (n int, err error) {
break
}
}
- iNdEx += length
if length < 0 {
return 0, ErrInvalidLengthTimestamp
}
+ iNdEx += length
+ if iNdEx < 0 {
+ return 0, ErrInvalidLengthTimestamp
+ }
return iNdEx, nil
case 3:
for {
@@ -465,6 +541,9 @@ func skipTimestamp(dAtA []byte) (n int, err error) {
return 0, err
}
iNdEx = start + next
+ if iNdEx < 0 {
+ return 0, ErrInvalidLengthTimestamp
+ }
}
return iNdEx, nil
case 4:
@@ -483,22 +562,3 @@ var (
ErrInvalidLengthTimestamp = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowTimestamp = fmt.Errorf("proto: integer overflow")
)
-
-func init() { proto.RegisterFile("timestamp.proto", fileDescriptorTimestamp) }
-
-var fileDescriptorTimestamp = []byte{
- // 205 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0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d8, 0x30, 0x63, 0x40,
- 0x00, 0x00, 0x00, 0xff, 0xff, 0x9b, 0xa2, 0x42, 0xda, 0xea, 0x00, 0x00, 0x00,
-}
diff --git a/vendor/github.com/gogo/protobuf/types/type.pb.go b/vendor/github.com/gogo/protobuf/types/type.pb.go
new file mode 100644
index 000000000..366f493d2
--- /dev/null
+++ b/vendor/github.com/gogo/protobuf/types/type.pb.go
@@ -0,0 +1,3320 @@
+// Code generated by protoc-gen-gogo. DO NOT EDIT.
+// source: google/protobuf/type.proto
+
+package types
+
+import (
+ bytes "bytes"
+ fmt "fmt"
+ proto "github.com/gogo/protobuf/proto"
+ io "io"
+ math "math"
+ reflect "reflect"
+ strconv "strconv"
+ strings "strings"
+)
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the proto package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// proto package needs to be updated.
+const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
+
+// The syntax in which a protocol buffer element is defined.
+type Syntax int32
+
+const (
+ // Syntax `proto2`.
+ Syntax_SYNTAX_PROTO2 Syntax = 0
+ // Syntax `proto3`.
+ Syntax_SYNTAX_PROTO3 Syntax = 1
+)
+
+var Syntax_name = map[int32]string{
+ 0: "SYNTAX_PROTO2",
+ 1: "SYNTAX_PROTO3",
+}
+
+var Syntax_value = map[string]int32{
+ "SYNTAX_PROTO2": 0,
+ "SYNTAX_PROTO3": 1,
+}
+
+func (Syntax) EnumDescriptor() ([]byte, []int) {
+ return fileDescriptor_dd271cc1e348c538, []int{0}
+}
+
+// Basic field types.
+type Field_Kind int32
+
+const (
+ // Field type unknown.
+ Field_TYPE_UNKNOWN Field_Kind = 0
+ // Field type double.
+ Field_TYPE_DOUBLE Field_Kind = 1
+ // Field type float.
+ Field_TYPE_FLOAT Field_Kind = 2
+ // Field type int64.
+ Field_TYPE_INT64 Field_Kind = 3
+ // Field type uint64.
+ Field_TYPE_UINT64 Field_Kind = 4
+ // Field type int32.
+ Field_TYPE_INT32 Field_Kind = 5
+ // Field type fixed64.
+ Field_TYPE_FIXED64 Field_Kind = 6
+ // Field type fixed32.
+ Field_TYPE_FIXED32 Field_Kind = 7
+ // Field type bool.
+ Field_TYPE_BOOL Field_Kind = 8
+ // Field type string.
+ Field_TYPE_STRING Field_Kind = 9
+ // Field type group. Proto2 syntax only, and deprecated.
+ Field_TYPE_GROUP Field_Kind = 10
+ // Field type message.
+ Field_TYPE_MESSAGE Field_Kind = 11
+ // Field type bytes.
+ Field_TYPE_BYTES Field_Kind = 12
+ // Field type uint32.
+ Field_TYPE_UINT32 Field_Kind = 13
+ // Field type enum.
+ Field_TYPE_ENUM Field_Kind = 14
+ // Field type sfixed32.
+ Field_TYPE_SFIXED32 Field_Kind = 15
+ // Field type sfixed64.
+ Field_TYPE_SFIXED64 Field_Kind = 16
+ // Field type sint32.
+ Field_TYPE_SINT32 Field_Kind = 17
+ // Field type sint64.
+ Field_TYPE_SINT64 Field_Kind = 18
+)
+
+var Field_Kind_name = map[int32]string{
+ 0: "TYPE_UNKNOWN",
+ 1: "TYPE_DOUBLE",
+ 2: "TYPE_FLOAT",
+ 3: "TYPE_INT64",
+ 4: "TYPE_UINT64",
+ 5: "TYPE_INT32",
+ 6: "TYPE_FIXED64",
+ 7: "TYPE_FIXED32",
+ 8: "TYPE_BOOL",
+ 9: "TYPE_STRING",
+ 10: "TYPE_GROUP",
+ 11: "TYPE_MESSAGE",
+ 12: "TYPE_BYTES",
+ 13: "TYPE_UINT32",
+ 14: "TYPE_ENUM",
+ 15: "TYPE_SFIXED32",
+ 16: "TYPE_SFIXED64",
+ 17: "TYPE_SINT32",
+ 18: "TYPE_SINT64",
+}
+
+var Field_Kind_value = map[string]int32{
+ "TYPE_UNKNOWN": 0,
+ "TYPE_DOUBLE": 1,
+ "TYPE_FLOAT": 2,
+ "TYPE_INT64": 3,
+ "TYPE_UINT64": 4,
+ "TYPE_INT32": 5,
+ "TYPE_FIXED64": 6,
+ "TYPE_FIXED32": 7,
+ "TYPE_BOOL": 8,
+ "TYPE_STRING": 9,
+ "TYPE_GROUP": 10,
+ "TYPE_MESSAGE": 11,
+ "TYPE_BYTES": 12,
+ "TYPE_UINT32": 13,
+ "TYPE_ENUM": 14,
+ "TYPE_SFIXED32": 15,
+ "TYPE_SFIXED64": 16,
+ "TYPE_SINT32": 17,
+ "TYPE_SINT64": 18,
+}
+
+func (Field_Kind) EnumDescriptor() ([]byte, []int) {
+ return fileDescriptor_dd271cc1e348c538, []int{1, 0}
+}
+
+// Whether a field is optional, required, or repeated.
+type Field_Cardinality int32
+
+const (
+ // For fields with unknown cardinality.
+ Field_CARDINALITY_UNKNOWN Field_Cardinality = 0
+ // For optional fields.
+ Field_CARDINALITY_OPTIONAL Field_Cardinality = 1
+ // For required fields. Proto2 syntax only.
+ Field_CARDINALITY_REQUIRED Field_Cardinality = 2
+ // For repeated fields.
+ Field_CARDINALITY_REPEATED Field_Cardinality = 3
+)
+
+var Field_Cardinality_name = map[int32]string{
+ 0: "CARDINALITY_UNKNOWN",
+ 1: "CARDINALITY_OPTIONAL",
+ 2: "CARDINALITY_REQUIRED",
+ 3: "CARDINALITY_REPEATED",
+}
+
+var Field_Cardinality_value = map[string]int32{
+ "CARDINALITY_UNKNOWN": 0,
+ "CARDINALITY_OPTIONAL": 1,
+ "CARDINALITY_REQUIRED": 2,
+ "CARDINALITY_REPEATED": 3,
+}
+
+func (Field_Cardinality) EnumDescriptor() ([]byte, []int) {
+ return fileDescriptor_dd271cc1e348c538, []int{1, 1}
+}
+
+// A protocol buffer message type.
+type Type struct {
+ // The fully qualified message name.
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ // The list of fields.
+ Fields []*Field `protobuf:"bytes,2,rep,name=fields,proto3" json:"fields,omitempty"`
+ // The list of types appearing in `oneof` definitions in this type.
+ Oneofs []string `protobuf:"bytes,3,rep,name=oneofs,proto3" json:"oneofs,omitempty"`
+ // The protocol buffer options.
+ Options []*Option `protobuf:"bytes,4,rep,name=options,proto3" json:"options,omitempty"`
+ // The source context.
+ SourceContext *SourceContext `protobuf:"bytes,5,opt,name=source_context,json=sourceContext,proto3" json:"source_context,omitempty"`
+ // The source syntax.
+ Syntax Syntax `protobuf:"varint,6,opt,name=syntax,proto3,enum=google.protobuf.Syntax" json:"syntax,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *Type) Reset() { *m = Type{} }
+func (*Type) ProtoMessage() {}
+func (*Type) Descriptor() ([]byte, []int) {
+ return fileDescriptor_dd271cc1e348c538, []int{0}
+}
+func (m *Type) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *Type) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_Type.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *Type) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_Type.Merge(m, src)
+}
+func (m *Type) XXX_Size() int {
+ return m.Size()
+}
+func (m *Type) XXX_DiscardUnknown() {
+ xxx_messageInfo_Type.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Type proto.InternalMessageInfo
+
+func (m *Type) GetName() string {
+ if m != nil {
+ return m.Name
+ }
+ return ""
+}
+
+func (m *Type) GetFields() []*Field {
+ if m != nil {
+ return m.Fields
+ }
+ return nil
+}
+
+func (m *Type) GetOneofs() []string {
+ if m != nil {
+ return m.Oneofs
+ }
+ return nil
+}
+
+func (m *Type) GetOptions() []*Option {
+ if m != nil {
+ return m.Options
+ }
+ return nil
+}
+
+func (m *Type) GetSourceContext() *SourceContext {
+ if m != nil {
+ return m.SourceContext
+ }
+ return nil
+}
+
+func (m *Type) GetSyntax() Syntax {
+ if m != nil {
+ return m.Syntax
+ }
+ return Syntax_SYNTAX_PROTO2
+}
+
+func (*Type) XXX_MessageName() string {
+ return "google.protobuf.Type"
+}
+
+// A single field of a message type.
+type Field struct {
+ // The field type.
+ Kind Field_Kind `protobuf:"varint,1,opt,name=kind,proto3,enum=google.protobuf.Field_Kind" json:"kind,omitempty"`
+ // The field cardinality.
+ Cardinality Field_Cardinality `protobuf:"varint,2,opt,name=cardinality,proto3,enum=google.protobuf.Field_Cardinality" json:"cardinality,omitempty"`
+ // The field number.
+ Number int32 `protobuf:"varint,3,opt,name=number,proto3" json:"number,omitempty"`
+ // The field name.
+ Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"`
+ // The field type URL, without the scheme, for message or enumeration
+ // types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`.
+ TypeUrl string `protobuf:"bytes,6,opt,name=type_url,json=typeUrl,proto3" json:"type_url,omitempty"`
+ // The index of the field type in `Type.oneofs`, for message or enumeration
+ // types. The first type has index 1; zero means the type is not in the list.
+ OneofIndex int32 `protobuf:"varint,7,opt,name=oneof_index,json=oneofIndex,proto3" json:"oneof_index,omitempty"`
+ // Whether to use alternative packed wire representation.
+ Packed bool `protobuf:"varint,8,opt,name=packed,proto3" json:"packed,omitempty"`
+ // The protocol buffer options.
+ Options []*Option `protobuf:"bytes,9,rep,name=options,proto3" json:"options,omitempty"`
+ // The field JSON name.
+ JsonName string `protobuf:"bytes,10,opt,name=json_name,json=jsonName,proto3" json:"json_name,omitempty"`
+ // The string value of the default value of this field. Proto2 syntax only.
+ DefaultValue string `protobuf:"bytes,11,opt,name=default_value,json=defaultValue,proto3" json:"default_value,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *Field) Reset() { *m = Field{} }
+func (*Field) ProtoMessage() {}
+func (*Field) Descriptor() ([]byte, []int) {
+ return fileDescriptor_dd271cc1e348c538, []int{1}
+}
+func (m *Field) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *Field) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_Field.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *Field) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_Field.Merge(m, src)
+}
+func (m *Field) XXX_Size() int {
+ return m.Size()
+}
+func (m *Field) XXX_DiscardUnknown() {
+ xxx_messageInfo_Field.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Field proto.InternalMessageInfo
+
+func (m *Field) GetKind() Field_Kind {
+ if m != nil {
+ return m.Kind
+ }
+ return Field_TYPE_UNKNOWN
+}
+
+func (m *Field) GetCardinality() Field_Cardinality {
+ if m != nil {
+ return m.Cardinality
+ }
+ return Field_CARDINALITY_UNKNOWN
+}
+
+func (m *Field) GetNumber() int32 {
+ if m != nil {
+ return m.Number
+ }
+ return 0
+}
+
+func (m *Field) GetName() string {
+ if m != nil {
+ return m.Name
+ }
+ return ""
+}
+
+func (m *Field) GetTypeUrl() string {
+ if m != nil {
+ return m.TypeUrl
+ }
+ return ""
+}
+
+func (m *Field) GetOneofIndex() int32 {
+ if m != nil {
+ return m.OneofIndex
+ }
+ return 0
+}
+
+func (m *Field) GetPacked() bool {
+ if m != nil {
+ return m.Packed
+ }
+ return false
+}
+
+func (m *Field) GetOptions() []*Option {
+ if m != nil {
+ return m.Options
+ }
+ return nil
+}
+
+func (m *Field) GetJsonName() string {
+ if m != nil {
+ return m.JsonName
+ }
+ return ""
+}
+
+func (m *Field) GetDefaultValue() string {
+ if m != nil {
+ return m.DefaultValue
+ }
+ return ""
+}
+
+func (*Field) XXX_MessageName() string {
+ return "google.protobuf.Field"
+}
+
+// Enum type definition.
+type Enum struct {
+ // Enum type name.
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ // Enum value definitions.
+ Enumvalue []*EnumValue `protobuf:"bytes,2,rep,name=enumvalue,proto3" json:"enumvalue,omitempty"`
+ // Protocol buffer options.
+ Options []*Option `protobuf:"bytes,3,rep,name=options,proto3" json:"options,omitempty"`
+ // The source context.
+ SourceContext *SourceContext `protobuf:"bytes,4,opt,name=source_context,json=sourceContext,proto3" json:"source_context,omitempty"`
+ // The source syntax.
+ Syntax Syntax `protobuf:"varint,5,opt,name=syntax,proto3,enum=google.protobuf.Syntax" json:"syntax,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *Enum) Reset() { *m = Enum{} }
+func (*Enum) ProtoMessage() {}
+func (*Enum) Descriptor() ([]byte, []int) {
+ return fileDescriptor_dd271cc1e348c538, []int{2}
+}
+func (m *Enum) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *Enum) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_Enum.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *Enum) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_Enum.Merge(m, src)
+}
+func (m *Enum) XXX_Size() int {
+ return m.Size()
+}
+func (m *Enum) XXX_DiscardUnknown() {
+ xxx_messageInfo_Enum.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Enum proto.InternalMessageInfo
+
+func (m *Enum) GetName() string {
+ if m != nil {
+ return m.Name
+ }
+ return ""
+}
+
+func (m *Enum) GetEnumvalue() []*EnumValue {
+ if m != nil {
+ return m.Enumvalue
+ }
+ return nil
+}
+
+func (m *Enum) GetOptions() []*Option {
+ if m != nil {
+ return m.Options
+ }
+ return nil
+}
+
+func (m *Enum) GetSourceContext() *SourceContext {
+ if m != nil {
+ return m.SourceContext
+ }
+ return nil
+}
+
+func (m *Enum) GetSyntax() Syntax {
+ if m != nil {
+ return m.Syntax
+ }
+ return Syntax_SYNTAX_PROTO2
+}
+
+func (*Enum) XXX_MessageName() string {
+ return "google.protobuf.Enum"
+}
+
+// Enum value definition.
+type EnumValue struct {
+ // Enum value name.
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ // Enum value number.
+ Number int32 `protobuf:"varint,2,opt,name=number,proto3" json:"number,omitempty"`
+ // Protocol buffer options.
+ Options []*Option `protobuf:"bytes,3,rep,name=options,proto3" json:"options,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *EnumValue) Reset() { *m = EnumValue{} }
+func (*EnumValue) ProtoMessage() {}
+func (*EnumValue) Descriptor() ([]byte, []int) {
+ return fileDescriptor_dd271cc1e348c538, []int{3}
+}
+func (m *EnumValue) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *EnumValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_EnumValue.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *EnumValue) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_EnumValue.Merge(m, src)
+}
+func (m *EnumValue) XXX_Size() int {
+ return m.Size()
+}
+func (m *EnumValue) XXX_DiscardUnknown() {
+ xxx_messageInfo_EnumValue.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_EnumValue proto.InternalMessageInfo
+
+func (m *EnumValue) GetName() string {
+ if m != nil {
+ return m.Name
+ }
+ return ""
+}
+
+func (m *EnumValue) GetNumber() int32 {
+ if m != nil {
+ return m.Number
+ }
+ return 0
+}
+
+func (m *EnumValue) GetOptions() []*Option {
+ if m != nil {
+ return m.Options
+ }
+ return nil
+}
+
+func (*EnumValue) XXX_MessageName() string {
+ return "google.protobuf.EnumValue"
+}
+
+// A protocol buffer option, which can be attached to a message, field,
+// enumeration, etc.
+type Option struct {
+ // The option's name. For protobuf built-in options (options defined in
+ // descriptor.proto), this is the short name. For example, `"map_entry"`.
+ // For custom options, it should be the fully-qualified name. For example,
+ // `"google.api.http"`.
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ // The option's value packed in an Any message. If the value is a primitive,
+ // the corresponding wrapper type defined in google/protobuf/wrappers.proto
+ // should be used. If the value is an enum, it should be stored as an int32
+ // value using the google.protobuf.Int32Value type.
+ Value *Any `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *Option) Reset() { *m = Option{} }
+func (*Option) ProtoMessage() {}
+func (*Option) Descriptor() ([]byte, []int) {
+ return fileDescriptor_dd271cc1e348c538, []int{4}
+}
+func (m *Option) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *Option) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_Option.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *Option) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_Option.Merge(m, src)
+}
+func (m *Option) XXX_Size() int {
+ return m.Size()
+}
+func (m *Option) XXX_DiscardUnknown() {
+ xxx_messageInfo_Option.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Option proto.InternalMessageInfo
+
+func (m *Option) GetName() string {
+ if m != nil {
+ return m.Name
+ }
+ return ""
+}
+
+func (m *Option) GetValue() *Any {
+ if m != nil {
+ return m.Value
+ }
+ return nil
+}
+
+func (*Option) XXX_MessageName() string {
+ return "google.protobuf.Option"
+}
+func init() {
+ proto.RegisterEnum("google.protobuf.Syntax", Syntax_name, Syntax_value)
+ proto.RegisterEnum("google.protobuf.Field_Kind", Field_Kind_name, Field_Kind_value)
+ proto.RegisterEnum("google.protobuf.Field_Cardinality", Field_Cardinality_name, Field_Cardinality_value)
+ proto.RegisterType((*Type)(nil), "google.protobuf.Type")
+ proto.RegisterType((*Field)(nil), "google.protobuf.Field")
+ proto.RegisterType((*Enum)(nil), "google.protobuf.Enum")
+ proto.RegisterType((*EnumValue)(nil), "google.protobuf.EnumValue")
+ proto.RegisterType((*Option)(nil), "google.protobuf.Option")
+}
+
+func init() { proto.RegisterFile("google/protobuf/type.proto", fileDescriptor_dd271cc1e348c538) }
+
+var fileDescriptor_dd271cc1e348c538 = []byte{
+ // 840 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x55, 0xcf, 0x73, 0xda, 0x46,
+ 0x14, 0xf6, 0x0a, 0x21, 0xa3, 0x87, 0xc1, 0x9b, 0x4d, 0x26, 0x51, 0x9c, 0x19, 0x95, 0xa1, 0x3d,
+ 0x30, 0x39, 0xe0, 0x29, 0x78, 0x3c, 0xbd, 0x82, 0x91, 0x29, 0x63, 0x22, 0xa9, 0x8b, 0x68, 0xe2,
+ 0x5e, 0x18, 0x0c, 0x72, 0x86, 0x44, 0xac, 0x18, 0x24, 0x5a, 0x73, 0xeb, 0x4c, 0xcf, 0xfd, 0x27,
+ 0x7a, 0xea, 0xf4, 0xdc, 0x3f, 0xc2, 0xc7, 0x1e, 0x7b, 0xac, 0xc9, 0xa5, 0xc7, 0x1c, 0x73, 0x6b,
+ 0x67, 0x57, 0x20, 0x8b, 0x1f, 0x9d, 0x49, 0xdb, 0x1b, 0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
+ 0x94, 0x6a, 0xda, 0xf5, 0x5f, 0x24, 0xbd, 0x19, 0xc9, 0xed, 0x55, 0xc5, 0x2f, 0x5d, 0xcf, 0xbb,
+ 0x60, 0xfe, 0x77, 0x8c, 0xbb, 0x05, 0x57, 0x8a, 0x88, 0x53, 0xfd, 0x3b, 0x00, 0x00, 0xff, 0xff,
+ 0xbc, 0x2a, 0x5e, 0x82, 0x2b, 0x07, 0x00, 0x00,
+}
+
+func (this *Type) Compare(that interface{}) int {
+ if that == nil {
+ if this == nil {
+ return 0
+ }
+ return 1
+ }
+
+ that1, ok := that.(*Type)
+ if !ok {
+ that2, ok := that.(Type)
+ if ok {
+ that1 = &that2
+ } else {
+ return 1
+ }
+ }
+ if that1 == nil {
+ if this == nil {
+ return 0
+ }
+ return 1
+ } else if this == nil {
+ return -1
+ }
+ if this.Name != that1.Name {
+ if this.Name < that1.Name {
+ return -1
+ }
+ return 1
+ }
+ if len(this.Fields) != len(that1.Fields) {
+ if len(this.Fields) < len(that1.Fields) {
+ return -1
+ }
+ return 1
+ }
+ for i := range this.Fields {
+ if c := this.Fields[i].Compare(that1.Fields[i]); c != 0 {
+ return c
+ }
+ }
+ if len(this.Oneofs) != len(that1.Oneofs) {
+ if len(this.Oneofs) < len(that1.Oneofs) {
+ return -1
+ }
+ return 1
+ }
+ for i := range this.Oneofs {
+ if this.Oneofs[i] != that1.Oneofs[i] {
+ if this.Oneofs[i] < that1.Oneofs[i] {
+ return -1
+ }
+ return 1
+ }
+ }
+ if len(this.Options) != len(that1.Options) {
+ if len(this.Options) < len(that1.Options) {
+ return -1
+ }
+ return 1
+ }
+ for i := range this.Options {
+ if c := this.Options[i].Compare(that1.Options[i]); c != 0 {
+ return c
+ }
+ }
+ if c := this.SourceContext.Compare(that1.SourceContext); c != 0 {
+ return c
+ }
+ if this.Syntax != that1.Syntax {
+ if this.Syntax < that1.Syntax {
+ return -1
+ }
+ return 1
+ }
+ if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 {
+ return c
+ }
+ return 0
+}
+func (this *Field) Compare(that interface{}) int {
+ if that == nil {
+ if this == nil {
+ return 0
+ }
+ return 1
+ }
+
+ that1, ok := that.(*Field)
+ if !ok {
+ that2, ok := that.(Field)
+ if ok {
+ that1 = &that2
+ } else {
+ return 1
+ }
+ }
+ if that1 == nil {
+ if this == nil {
+ return 0
+ }
+ return 1
+ } else if this == nil {
+ return -1
+ }
+ if this.Kind != that1.Kind {
+ if this.Kind < that1.Kind {
+ return -1
+ }
+ return 1
+ }
+ if this.Cardinality != that1.Cardinality {
+ if this.Cardinality < that1.Cardinality {
+ return -1
+ }
+ return 1
+ }
+ if this.Number != that1.Number {
+ if this.Number < that1.Number {
+ return -1
+ }
+ return 1
+ }
+ if this.Name != that1.Name {
+ if this.Name < that1.Name {
+ return -1
+ }
+ return 1
+ }
+ if this.TypeUrl != that1.TypeUrl {
+ if this.TypeUrl < that1.TypeUrl {
+ return -1
+ }
+ return 1
+ }
+ if this.OneofIndex != that1.OneofIndex {
+ if this.OneofIndex < that1.OneofIndex {
+ return -1
+ }
+ return 1
+ }
+ if this.Packed != that1.Packed {
+ if !this.Packed {
+ return -1
+ }
+ return 1
+ }
+ if len(this.Options) != len(that1.Options) {
+ if len(this.Options) < len(that1.Options) {
+ return -1
+ }
+ return 1
+ }
+ for i := range this.Options {
+ if c := this.Options[i].Compare(that1.Options[i]); c != 0 {
+ return c
+ }
+ }
+ if this.JsonName != that1.JsonName {
+ if this.JsonName < that1.JsonName {
+ return -1
+ }
+ return 1
+ }
+ if this.DefaultValue != that1.DefaultValue {
+ if this.DefaultValue < that1.DefaultValue {
+ return -1
+ }
+ return 1
+ }
+ if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 {
+ return c
+ }
+ return 0
+}
+func (this *Enum) Compare(that interface{}) int {
+ if that == nil {
+ if this == nil {
+ return 0
+ }
+ return 1
+ }
+
+ that1, ok := that.(*Enum)
+ if !ok {
+ that2, ok := that.(Enum)
+ if ok {
+ that1 = &that2
+ } else {
+ return 1
+ }
+ }
+ if that1 == nil {
+ if this == nil {
+ return 0
+ }
+ return 1
+ } else if this == nil {
+ return -1
+ }
+ if this.Name != that1.Name {
+ if this.Name < that1.Name {
+ return -1
+ }
+ return 1
+ }
+ if len(this.Enumvalue) != len(that1.Enumvalue) {
+ if len(this.Enumvalue) < len(that1.Enumvalue) {
+ return -1
+ }
+ return 1
+ }
+ for i := range this.Enumvalue {
+ if c := this.Enumvalue[i].Compare(that1.Enumvalue[i]); c != 0 {
+ return c
+ }
+ }
+ if len(this.Options) != len(that1.Options) {
+ if len(this.Options) < len(that1.Options) {
+ return -1
+ }
+ return 1
+ }
+ for i := range this.Options {
+ if c := this.Options[i].Compare(that1.Options[i]); c != 0 {
+ return c
+ }
+ }
+ if c := this.SourceContext.Compare(that1.SourceContext); c != 0 {
+ return c
+ }
+ if this.Syntax != that1.Syntax {
+ if this.Syntax < that1.Syntax {
+ return -1
+ }
+ return 1
+ }
+ if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 {
+ return c
+ }
+ return 0
+}
+func (this *EnumValue) Compare(that interface{}) int {
+ if that == nil {
+ if this == nil {
+ return 0
+ }
+ return 1
+ }
+
+ that1, ok := that.(*EnumValue)
+ if !ok {
+ that2, ok := that.(EnumValue)
+ if ok {
+ that1 = &that2
+ } else {
+ return 1
+ }
+ }
+ if that1 == nil {
+ if this == nil {
+ return 0
+ }
+ return 1
+ } else if this == nil {
+ return -1
+ }
+ if this.Name != that1.Name {
+ if this.Name < that1.Name {
+ return -1
+ }
+ return 1
+ }
+ if this.Number != that1.Number {
+ if this.Number < that1.Number {
+ return -1
+ }
+ return 1
+ }
+ if len(this.Options) != len(that1.Options) {
+ if len(this.Options) < len(that1.Options) {
+ return -1
+ }
+ return 1
+ }
+ for i := range this.Options {
+ if c := this.Options[i].Compare(that1.Options[i]); c != 0 {
+ return c
+ }
+ }
+ if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 {
+ return c
+ }
+ return 0
+}
+func (this *Option) Compare(that interface{}) int {
+ if that == nil {
+ if this == nil {
+ return 0
+ }
+ return 1
+ }
+
+ that1, ok := that.(*Option)
+ if !ok {
+ that2, ok := that.(Option)
+ if ok {
+ that1 = &that2
+ } else {
+ return 1
+ }
+ }
+ if that1 == nil {
+ if this == nil {
+ return 0
+ }
+ return 1
+ } else if this == nil {
+ return -1
+ }
+ if this.Name != that1.Name {
+ if this.Name < that1.Name {
+ return -1
+ }
+ return 1
+ }
+ if c := this.Value.Compare(that1.Value); c != 0 {
+ return c
+ }
+ if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 {
+ return c
+ }
+ return 0
+}
+func (x Syntax) String() string {
+ s, ok := Syntax_name[int32(x)]
+ if ok {
+ return s
+ }
+ return strconv.Itoa(int(x))
+}
+func (x Field_Kind) String() string {
+ s, ok := Field_Kind_name[int32(x)]
+ if ok {
+ return s
+ }
+ return strconv.Itoa(int(x))
+}
+func (x Field_Cardinality) String() string {
+ s, ok := Field_Cardinality_name[int32(x)]
+ if ok {
+ return s
+ }
+ return strconv.Itoa(int(x))
+}
+func (this *Type) Equal(that interface{}) bool {
+ if that == nil {
+ return this == nil
+ }
+
+ that1, ok := that.(*Type)
+ if !ok {
+ that2, ok := that.(Type)
+ if ok {
+ that1 = &that2
+ } else {
+ return false
+ }
+ }
+ if that1 == nil {
+ return this == nil
+ } else if this == nil {
+ return false
+ }
+ if this.Name != that1.Name {
+ return false
+ }
+ if len(this.Fields) != len(that1.Fields) {
+ return false
+ }
+ for i := range this.Fields {
+ if !this.Fields[i].Equal(that1.Fields[i]) {
+ return false
+ }
+ }
+ if len(this.Oneofs) != len(that1.Oneofs) {
+ return false
+ }
+ for i := range this.Oneofs {
+ if this.Oneofs[i] != that1.Oneofs[i] {
+ return false
+ }
+ }
+ if len(this.Options) != len(that1.Options) {
+ return false
+ }
+ for i := range this.Options {
+ if !this.Options[i].Equal(that1.Options[i]) {
+ return false
+ }
+ }
+ if !this.SourceContext.Equal(that1.SourceContext) {
+ return false
+ }
+ if this.Syntax != that1.Syntax {
+ return false
+ }
+ if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
+ return false
+ }
+ return true
+}
+func (this *Field) Equal(that interface{}) bool {
+ if that == nil {
+ return this == nil
+ }
+
+ that1, ok := that.(*Field)
+ if !ok {
+ that2, ok := that.(Field)
+ if ok {
+ that1 = &that2
+ } else {
+ return false
+ }
+ }
+ if that1 == nil {
+ return this == nil
+ } else if this == nil {
+ return false
+ }
+ if this.Kind != that1.Kind {
+ return false
+ }
+ if this.Cardinality != that1.Cardinality {
+ return false
+ }
+ if this.Number != that1.Number {
+ return false
+ }
+ if this.Name != that1.Name {
+ return false
+ }
+ if this.TypeUrl != that1.TypeUrl {
+ return false
+ }
+ if this.OneofIndex != that1.OneofIndex {
+ return false
+ }
+ if this.Packed != that1.Packed {
+ return false
+ }
+ if len(this.Options) != len(that1.Options) {
+ return false
+ }
+ for i := range this.Options {
+ if !this.Options[i].Equal(that1.Options[i]) {
+ return false
+ }
+ }
+ if this.JsonName != that1.JsonName {
+ return false
+ }
+ if this.DefaultValue != that1.DefaultValue {
+ return false
+ }
+ if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
+ return false
+ }
+ return true
+}
+func (this *Enum) Equal(that interface{}) bool {
+ if that == nil {
+ return this == nil
+ }
+
+ that1, ok := that.(*Enum)
+ if !ok {
+ that2, ok := that.(Enum)
+ if ok {
+ that1 = &that2
+ } else {
+ return false
+ }
+ }
+ if that1 == nil {
+ return this == nil
+ } else if this == nil {
+ return false
+ }
+ if this.Name != that1.Name {
+ return false
+ }
+ if len(this.Enumvalue) != len(that1.Enumvalue) {
+ return false
+ }
+ for i := range this.Enumvalue {
+ if !this.Enumvalue[i].Equal(that1.Enumvalue[i]) {
+ return false
+ }
+ }
+ if len(this.Options) != len(that1.Options) {
+ return false
+ }
+ for i := range this.Options {
+ if !this.Options[i].Equal(that1.Options[i]) {
+ return false
+ }
+ }
+ if !this.SourceContext.Equal(that1.SourceContext) {
+ return false
+ }
+ if this.Syntax != that1.Syntax {
+ return false
+ }
+ if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
+ return false
+ }
+ return true
+}
+func (this *EnumValue) Equal(that interface{}) bool {
+ if that == nil {
+ return this == nil
+ }
+
+ that1, ok := that.(*EnumValue)
+ if !ok {
+ that2, ok := that.(EnumValue)
+ if ok {
+ that1 = &that2
+ } else {
+ return false
+ }
+ }
+ if that1 == nil {
+ return this == nil
+ } else if this == nil {
+ return false
+ }
+ if this.Name != that1.Name {
+ return false
+ }
+ if this.Number != that1.Number {
+ return false
+ }
+ if len(this.Options) != len(that1.Options) {
+ return false
+ }
+ for i := range this.Options {
+ if !this.Options[i].Equal(that1.Options[i]) {
+ return false
+ }
+ }
+ if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
+ return false
+ }
+ return true
+}
+func (this *Option) Equal(that interface{}) bool {
+ if that == nil {
+ return this == nil
+ }
+
+ that1, ok := that.(*Option)
+ if !ok {
+ that2, ok := that.(Option)
+ if ok {
+ that1 = &that2
+ } else {
+ return false
+ }
+ }
+ if that1 == nil {
+ return this == nil
+ } else if this == nil {
+ return false
+ }
+ if this.Name != that1.Name {
+ return false
+ }
+ if !this.Value.Equal(that1.Value) {
+ return false
+ }
+ if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
+ return false
+ }
+ return true
+}
+func (this *Type) GoString() string {
+ if this == nil {
+ return "nil"
+ }
+ s := make([]string, 0, 10)
+ s = append(s, "&types.Type{")
+ s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n")
+ if this.Fields != nil {
+ s = append(s, "Fields: "+fmt.Sprintf("%#v", this.Fields)+",\n")
+ }
+ s = append(s, "Oneofs: "+fmt.Sprintf("%#v", this.Oneofs)+",\n")
+ if this.Options != nil {
+ s = append(s, "Options: "+fmt.Sprintf("%#v", this.Options)+",\n")
+ }
+ if this.SourceContext != nil {
+ s = append(s, "SourceContext: "+fmt.Sprintf("%#v", this.SourceContext)+",\n")
+ }
+ s = append(s, "Syntax: "+fmt.Sprintf("%#v", this.Syntax)+",\n")
+ if this.XXX_unrecognized != nil {
+ s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n")
+ }
+ s = append(s, "}")
+ return strings.Join(s, "")
+}
+func (this *Field) GoString() string {
+ if this == nil {
+ return "nil"
+ }
+ s := make([]string, 0, 14)
+ s = append(s, "&types.Field{")
+ s = append(s, "Kind: "+fmt.Sprintf("%#v", this.Kind)+",\n")
+ s = append(s, "Cardinality: "+fmt.Sprintf("%#v", this.Cardinality)+",\n")
+ s = append(s, "Number: "+fmt.Sprintf("%#v", this.Number)+",\n")
+ s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n")
+ s = append(s, "TypeUrl: "+fmt.Sprintf("%#v", this.TypeUrl)+",\n")
+ s = append(s, "OneofIndex: "+fmt.Sprintf("%#v", this.OneofIndex)+",\n")
+ s = append(s, "Packed: "+fmt.Sprintf("%#v", this.Packed)+",\n")
+ if this.Options != nil {
+ s = append(s, "Options: "+fmt.Sprintf("%#v", this.Options)+",\n")
+ }
+ s = append(s, "JsonName: "+fmt.Sprintf("%#v", this.JsonName)+",\n")
+ s = append(s, "DefaultValue: "+fmt.Sprintf("%#v", this.DefaultValue)+",\n")
+ if this.XXX_unrecognized != nil {
+ s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n")
+ }
+ s = append(s, "}")
+ return strings.Join(s, "")
+}
+func (this *Enum) GoString() string {
+ if this == nil {
+ return "nil"
+ }
+ s := make([]string, 0, 9)
+ s = append(s, "&types.Enum{")
+ s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n")
+ if this.Enumvalue != nil {
+ s = append(s, "Enumvalue: "+fmt.Sprintf("%#v", this.Enumvalue)+",\n")
+ }
+ if this.Options != nil {
+ s = append(s, "Options: "+fmt.Sprintf("%#v", this.Options)+",\n")
+ }
+ if this.SourceContext != nil {
+ s = append(s, "SourceContext: "+fmt.Sprintf("%#v", this.SourceContext)+",\n")
+ }
+ s = append(s, "Syntax: "+fmt.Sprintf("%#v", this.Syntax)+",\n")
+ if this.XXX_unrecognized != nil {
+ s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n")
+ }
+ s = append(s, "}")
+ return strings.Join(s, "")
+}
+func (this *EnumValue) GoString() string {
+ if this == nil {
+ return "nil"
+ }
+ s := make([]string, 0, 7)
+ s = append(s, "&types.EnumValue{")
+ s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n")
+ s = append(s, "Number: "+fmt.Sprintf("%#v", this.Number)+",\n")
+ if this.Options != nil {
+ s = append(s, "Options: "+fmt.Sprintf("%#v", this.Options)+",\n")
+ }
+ if this.XXX_unrecognized != nil {
+ s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n")
+ }
+ s = append(s, "}")
+ return strings.Join(s, "")
+}
+func (this *Option) GoString() string {
+ if this == nil {
+ return "nil"
+ }
+ s := make([]string, 0, 6)
+ s = append(s, "&types.Option{")
+ s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n")
+ if this.Value != nil {
+ s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n")
+ }
+ if this.XXX_unrecognized != nil {
+ s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n")
+ }
+ s = append(s, "}")
+ return strings.Join(s, "")
+}
+func valueToGoStringType(v interface{}, typ string) string {
+ rv := reflect.ValueOf(v)
+ if rv.IsNil() {
+ return "nil"
+ }
+ pv := reflect.Indirect(rv).Interface()
+ return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv)
+}
+func (m *Type) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *Type) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.Name) > 0 {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintType(dAtA, i, uint64(len(m.Name)))
+ i += copy(dAtA[i:], m.Name)
+ }
+ if len(m.Fields) > 0 {
+ for _, msg := range m.Fields {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintType(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ if len(m.Oneofs) > 0 {
+ for _, s := range m.Oneofs {
+ dAtA[i] = 0x1a
+ i++
+ l = len(s)
+ for l >= 1<<7 {
+ dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
+ l >>= 7
+ i++
+ }
+ dAtA[i] = uint8(l)
+ i++
+ i += copy(dAtA[i:], s)
+ }
+ }
+ if len(m.Options) > 0 {
+ for _, msg := range m.Options {
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintType(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ if m.SourceContext != nil {
+ dAtA[i] = 0x2a
+ i++
+ i = encodeVarintType(dAtA, i, uint64(m.SourceContext.Size()))
+ n1, err := m.SourceContext.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n1
+ }
+ if m.Syntax != 0 {
+ dAtA[i] = 0x30
+ i++
+ i = encodeVarintType(dAtA, i, uint64(m.Syntax))
+ }
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
+ return i, nil
+}
+
+func (m *Field) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *Field) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if m.Kind != 0 {
+ dAtA[i] = 0x8
+ i++
+ i = encodeVarintType(dAtA, i, uint64(m.Kind))
+ }
+ if m.Cardinality != 0 {
+ dAtA[i] = 0x10
+ i++
+ i = encodeVarintType(dAtA, i, uint64(m.Cardinality))
+ }
+ if m.Number != 0 {
+ dAtA[i] = 0x18
+ i++
+ i = encodeVarintType(dAtA, i, uint64(m.Number))
+ }
+ if len(m.Name) > 0 {
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintType(dAtA, i, uint64(len(m.Name)))
+ i += copy(dAtA[i:], m.Name)
+ }
+ if len(m.TypeUrl) > 0 {
+ dAtA[i] = 0x32
+ i++
+ i = encodeVarintType(dAtA, i, uint64(len(m.TypeUrl)))
+ i += copy(dAtA[i:], m.TypeUrl)
+ }
+ if m.OneofIndex != 0 {
+ dAtA[i] = 0x38
+ i++
+ i = encodeVarintType(dAtA, i, uint64(m.OneofIndex))
+ }
+ if m.Packed {
+ dAtA[i] = 0x40
+ i++
+ if m.Packed {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i++
+ }
+ if len(m.Options) > 0 {
+ for _, msg := range m.Options {
+ dAtA[i] = 0x4a
+ i++
+ i = encodeVarintType(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ if len(m.JsonName) > 0 {
+ dAtA[i] = 0x52
+ i++
+ i = encodeVarintType(dAtA, i, uint64(len(m.JsonName)))
+ i += copy(dAtA[i:], m.JsonName)
+ }
+ if len(m.DefaultValue) > 0 {
+ dAtA[i] = 0x5a
+ i++
+ i = encodeVarintType(dAtA, i, uint64(len(m.DefaultValue)))
+ i += copy(dAtA[i:], m.DefaultValue)
+ }
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
+ return i, nil
+}
+
+func (m *Enum) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *Enum) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.Name) > 0 {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintType(dAtA, i, uint64(len(m.Name)))
+ i += copy(dAtA[i:], m.Name)
+ }
+ if len(m.Enumvalue) > 0 {
+ for _, msg := range m.Enumvalue {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintType(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ if len(m.Options) > 0 {
+ for _, msg := range m.Options {
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintType(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ if m.SourceContext != nil {
+ dAtA[i] = 0x22
+ i++
+ i = encodeVarintType(dAtA, i, uint64(m.SourceContext.Size()))
+ n2, err := m.SourceContext.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n2
+ }
+ if m.Syntax != 0 {
+ dAtA[i] = 0x28
+ i++
+ i = encodeVarintType(dAtA, i, uint64(m.Syntax))
+ }
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
+ return i, nil
+}
+
+func (m *EnumValue) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *EnumValue) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.Name) > 0 {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintType(dAtA, i, uint64(len(m.Name)))
+ i += copy(dAtA[i:], m.Name)
+ }
+ if m.Number != 0 {
+ dAtA[i] = 0x10
+ i++
+ i = encodeVarintType(dAtA, i, uint64(m.Number))
+ }
+ if len(m.Options) > 0 {
+ for _, msg := range m.Options {
+ dAtA[i] = 0x1a
+ i++
+ i = encodeVarintType(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
+ return i, nil
+}
+
+func (m *Option) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalTo(dAtA)
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *Option) MarshalTo(dAtA []byte) (int, error) {
+ var i int
+ _ = i
+ var l int
+ _ = l
+ if len(m.Name) > 0 {
+ dAtA[i] = 0xa
+ i++
+ i = encodeVarintType(dAtA, i, uint64(len(m.Name)))
+ i += copy(dAtA[i:], m.Name)
+ }
+ if m.Value != nil {
+ dAtA[i] = 0x12
+ i++
+ i = encodeVarintType(dAtA, i, uint64(m.Value.Size()))
+ n3, err := m.Value.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n3
+ }
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
+ return i, nil
+}
+
+func encodeVarintType(dAtA []byte, offset int, v uint64) int {
+ for v >= 1<<7 {
+ dAtA[offset] = uint8(v&0x7f | 0x80)
+ v >>= 7
+ offset++
+ }
+ dAtA[offset] = uint8(v)
+ return offset + 1
+}
+func NewPopulatedType(r randyType, easy bool) *Type {
+ this := &Type{}
+ this.Name = string(randStringType(r))
+ if r.Intn(10) != 0 {
+ v1 := r.Intn(5)
+ this.Fields = make([]*Field, v1)
+ for i := 0; i < v1; i++ {
+ this.Fields[i] = NewPopulatedField(r, easy)
+ }
+ }
+ v2 := r.Intn(10)
+ this.Oneofs = make([]string, v2)
+ for i := 0; i < v2; i++ {
+ this.Oneofs[i] = string(randStringType(r))
+ }
+ if r.Intn(10) != 0 {
+ v3 := r.Intn(5)
+ this.Options = make([]*Option, v3)
+ for i := 0; i < v3; i++ {
+ this.Options[i] = NewPopulatedOption(r, easy)
+ }
+ }
+ if r.Intn(10) != 0 {
+ this.SourceContext = NewPopulatedSourceContext(r, easy)
+ }
+ this.Syntax = Syntax([]int32{0, 1}[r.Intn(2)])
+ if !easy && r.Intn(10) != 0 {
+ this.XXX_unrecognized = randUnrecognizedType(r, 7)
+ }
+ return this
+}
+
+func NewPopulatedField(r randyType, easy bool) *Field {
+ this := &Field{}
+ this.Kind = Field_Kind([]int32{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18}[r.Intn(19)])
+ this.Cardinality = Field_Cardinality([]int32{0, 1, 2, 3}[r.Intn(4)])
+ this.Number = int32(r.Int31())
+ if r.Intn(2) == 0 {
+ this.Number *= -1
+ }
+ this.Name = string(randStringType(r))
+ this.TypeUrl = string(randStringType(r))
+ this.OneofIndex = int32(r.Int31())
+ if r.Intn(2) == 0 {
+ this.OneofIndex *= -1
+ }
+ this.Packed = bool(bool(r.Intn(2) == 0))
+ if r.Intn(10) != 0 {
+ v4 := r.Intn(5)
+ this.Options = make([]*Option, v4)
+ for i := 0; i < v4; i++ {
+ this.Options[i] = NewPopulatedOption(r, easy)
+ }
+ }
+ this.JsonName = string(randStringType(r))
+ this.DefaultValue = string(randStringType(r))
+ if !easy && r.Intn(10) != 0 {
+ this.XXX_unrecognized = randUnrecognizedType(r, 12)
+ }
+ return this
+}
+
+func NewPopulatedEnum(r randyType, easy bool) *Enum {
+ this := &Enum{}
+ this.Name = string(randStringType(r))
+ if r.Intn(10) != 0 {
+ v5 := r.Intn(5)
+ this.Enumvalue = make([]*EnumValue, v5)
+ for i := 0; i < v5; i++ {
+ this.Enumvalue[i] = NewPopulatedEnumValue(r, easy)
+ }
+ }
+ if r.Intn(10) != 0 {
+ v6 := r.Intn(5)
+ this.Options = make([]*Option, v6)
+ for i := 0; i < v6; i++ {
+ this.Options[i] = NewPopulatedOption(r, easy)
+ }
+ }
+ if r.Intn(10) != 0 {
+ this.SourceContext = NewPopulatedSourceContext(r, easy)
+ }
+ this.Syntax = Syntax([]int32{0, 1}[r.Intn(2)])
+ if !easy && r.Intn(10) != 0 {
+ this.XXX_unrecognized = randUnrecognizedType(r, 6)
+ }
+ return this
+}
+
+func NewPopulatedEnumValue(r randyType, easy bool) *EnumValue {
+ this := &EnumValue{}
+ this.Name = string(randStringType(r))
+ this.Number = int32(r.Int31())
+ if r.Intn(2) == 0 {
+ this.Number *= -1
+ }
+ if r.Intn(10) != 0 {
+ v7 := r.Intn(5)
+ this.Options = make([]*Option, v7)
+ for i := 0; i < v7; i++ {
+ this.Options[i] = NewPopulatedOption(r, easy)
+ }
+ }
+ if !easy && r.Intn(10) != 0 {
+ this.XXX_unrecognized = randUnrecognizedType(r, 4)
+ }
+ return this
+}
+
+func NewPopulatedOption(r randyType, easy bool) *Option {
+ this := &Option{}
+ this.Name = string(randStringType(r))
+ if r.Intn(10) != 0 {
+ this.Value = NewPopulatedAny(r, easy)
+ }
+ if !easy && r.Intn(10) != 0 {
+ this.XXX_unrecognized = randUnrecognizedType(r, 3)
+ }
+ return this
+}
+
+type randyType interface {
+ Float32() float32
+ Float64() float64
+ Int63() int64
+ Int31() int32
+ Uint32() uint32
+ Intn(n int) int
+}
+
+func randUTF8RuneType(r randyType) rune {
+ ru := r.Intn(62)
+ if ru < 10 {
+ return rune(ru + 48)
+ } else if ru < 36 {
+ return rune(ru + 55)
+ }
+ return rune(ru + 61)
+}
+func randStringType(r randyType) string {
+ v8 := r.Intn(100)
+ tmps := make([]rune, v8)
+ for i := 0; i < v8; i++ {
+ tmps[i] = randUTF8RuneType(r)
+ }
+ return string(tmps)
+}
+func randUnrecognizedType(r randyType, maxFieldNumber int) (dAtA []byte) {
+ l := r.Intn(5)
+ for i := 0; i < l; i++ {
+ wire := r.Intn(4)
+ if wire == 3 {
+ wire = 5
+ }
+ fieldNumber := maxFieldNumber + r.Intn(100)
+ dAtA = randFieldType(dAtA, r, fieldNumber, wire)
+ }
+ return dAtA
+}
+func randFieldType(dAtA []byte, r randyType, fieldNumber int, wire int) []byte {
+ key := uint32(fieldNumber)<<3 | uint32(wire)
+ switch wire {
+ case 0:
+ dAtA = encodeVarintPopulateType(dAtA, uint64(key))
+ v9 := r.Int63()
+ if r.Intn(2) == 0 {
+ v9 *= -1
+ }
+ dAtA = encodeVarintPopulateType(dAtA, uint64(v9))
+ case 1:
+ dAtA = encodeVarintPopulateType(dAtA, uint64(key))
+ dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)))
+ case 2:
+ dAtA = encodeVarintPopulateType(dAtA, uint64(key))
+ ll := r.Intn(100)
+ dAtA = encodeVarintPopulateType(dAtA, uint64(ll))
+ for j := 0; j < ll; j++ {
+ dAtA = append(dAtA, byte(r.Intn(256)))
+ }
+ default:
+ dAtA = encodeVarintPopulateType(dAtA, uint64(key))
+ dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)))
+ }
+ return dAtA
+}
+func encodeVarintPopulateType(dAtA []byte, v uint64) []byte {
+ for v >= 1<<7 {
+ dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80))
+ v >>= 7
+ }
+ dAtA = append(dAtA, uint8(v))
+ return dAtA
+}
+func (m *Type) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.Name)
+ if l > 0 {
+ n += 1 + l + sovType(uint64(l))
+ }
+ if len(m.Fields) > 0 {
+ for _, e := range m.Fields {
+ l = e.Size()
+ n += 1 + l + sovType(uint64(l))
+ }
+ }
+ if len(m.Oneofs) > 0 {
+ for _, s := range m.Oneofs {
+ l = len(s)
+ n += 1 + l + sovType(uint64(l))
+ }
+ }
+ if len(m.Options) > 0 {
+ for _, e := range m.Options {
+ l = e.Size()
+ n += 1 + l + sovType(uint64(l))
+ }
+ }
+ if m.SourceContext != nil {
+ l = m.SourceContext.Size()
+ n += 1 + l + sovType(uint64(l))
+ }
+ if m.Syntax != 0 {
+ n += 1 + sovType(uint64(m.Syntax))
+ }
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
+ return n
+}
+
+func (m *Field) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.Kind != 0 {
+ n += 1 + sovType(uint64(m.Kind))
+ }
+ if m.Cardinality != 0 {
+ n += 1 + sovType(uint64(m.Cardinality))
+ }
+ if m.Number != 0 {
+ n += 1 + sovType(uint64(m.Number))
+ }
+ l = len(m.Name)
+ if l > 0 {
+ n += 1 + l + sovType(uint64(l))
+ }
+ l = len(m.TypeUrl)
+ if l > 0 {
+ n += 1 + l + sovType(uint64(l))
+ }
+ if m.OneofIndex != 0 {
+ n += 1 + sovType(uint64(m.OneofIndex))
+ }
+ if m.Packed {
+ n += 2
+ }
+ if len(m.Options) > 0 {
+ for _, e := range m.Options {
+ l = e.Size()
+ n += 1 + l + sovType(uint64(l))
+ }
+ }
+ l = len(m.JsonName)
+ if l > 0 {
+ n += 1 + l + sovType(uint64(l))
+ }
+ l = len(m.DefaultValue)
+ if l > 0 {
+ n += 1 + l + sovType(uint64(l))
+ }
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
+ return n
+}
+
+func (m *Enum) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.Name)
+ if l > 0 {
+ n += 1 + l + sovType(uint64(l))
+ }
+ if len(m.Enumvalue) > 0 {
+ for _, e := range m.Enumvalue {
+ l = e.Size()
+ n += 1 + l + sovType(uint64(l))
+ }
+ }
+ if len(m.Options) > 0 {
+ for _, e := range m.Options {
+ l = e.Size()
+ n += 1 + l + sovType(uint64(l))
+ }
+ }
+ if m.SourceContext != nil {
+ l = m.SourceContext.Size()
+ n += 1 + l + sovType(uint64(l))
+ }
+ if m.Syntax != 0 {
+ n += 1 + sovType(uint64(m.Syntax))
+ }
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
+ return n
+}
+
+func (m *EnumValue) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.Name)
+ if l > 0 {
+ n += 1 + l + sovType(uint64(l))
+ }
+ if m.Number != 0 {
+ n += 1 + sovType(uint64(m.Number))
+ }
+ if len(m.Options) > 0 {
+ for _, e := range m.Options {
+ l = e.Size()
+ n += 1 + l + sovType(uint64(l))
+ }
+ }
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
+ return n
+}
+
+func (m *Option) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.Name)
+ if l > 0 {
+ n += 1 + l + sovType(uint64(l))
+ }
+ if m.Value != nil {
+ l = m.Value.Size()
+ n += 1 + l + sovType(uint64(l))
+ }
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
+ return n
+}
+
+func sovType(x uint64) (n int) {
+ for {
+ n++
+ x >>= 7
+ if x == 0 {
+ break
+ }
+ }
+ return n
+}
+func sozType(x uint64) (n int) {
+ return sovType(uint64((x << 1) ^ uint64((int64(x) >> 63))))
+}
+func (this *Type) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&Type{`,
+ `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
+ `Fields:` + strings.Replace(fmt.Sprintf("%v", this.Fields), "Field", "Field", 1) + `,`,
+ `Oneofs:` + fmt.Sprintf("%v", this.Oneofs) + `,`,
+ `Options:` + strings.Replace(fmt.Sprintf("%v", this.Options), "Option", "Option", 1) + `,`,
+ `SourceContext:` + strings.Replace(fmt.Sprintf("%v", this.SourceContext), "SourceContext", "SourceContext", 1) + `,`,
+ `Syntax:` + fmt.Sprintf("%v", this.Syntax) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *Field) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&Field{`,
+ `Kind:` + fmt.Sprintf("%v", this.Kind) + `,`,
+ `Cardinality:` + fmt.Sprintf("%v", this.Cardinality) + `,`,
+ `Number:` + fmt.Sprintf("%v", this.Number) + `,`,
+ `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
+ `TypeUrl:` + fmt.Sprintf("%v", this.TypeUrl) + `,`,
+ `OneofIndex:` + fmt.Sprintf("%v", this.OneofIndex) + `,`,
+ `Packed:` + fmt.Sprintf("%v", this.Packed) + `,`,
+ `Options:` + strings.Replace(fmt.Sprintf("%v", this.Options), "Option", "Option", 1) + `,`,
+ `JsonName:` + fmt.Sprintf("%v", this.JsonName) + `,`,
+ `DefaultValue:` + fmt.Sprintf("%v", this.DefaultValue) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *Enum) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&Enum{`,
+ `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
+ `Enumvalue:` + strings.Replace(fmt.Sprintf("%v", this.Enumvalue), "EnumValue", "EnumValue", 1) + `,`,
+ `Options:` + strings.Replace(fmt.Sprintf("%v", this.Options), "Option", "Option", 1) + `,`,
+ `SourceContext:` + strings.Replace(fmt.Sprintf("%v", this.SourceContext), "SourceContext", "SourceContext", 1) + `,`,
+ `Syntax:` + fmt.Sprintf("%v", this.Syntax) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *EnumValue) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&EnumValue{`,
+ `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
+ `Number:` + fmt.Sprintf("%v", this.Number) + `,`,
+ `Options:` + strings.Replace(fmt.Sprintf("%v", this.Options), "Option", "Option", 1) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func (this *Option) String() string {
+ if this == nil {
+ return "nil"
+ }
+ s := strings.Join([]string{`&Option{`,
+ `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
+ `Value:` + strings.Replace(fmt.Sprintf("%v", this.Value), "Any", "Any", 1) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
+ `}`,
+ }, "")
+ return s
+}
+func valueToStringType(v interface{}) string {
+ rv := reflect.ValueOf(v)
+ if rv.IsNil() {
+ return "nil"
+ }
+ pv := reflect.Indirect(rv).Interface()
+ return fmt.Sprintf("*%v", pv)
+}
+func (m *Type) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowType
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: Type: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: Type: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowType
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthType
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthType
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Name = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Fields", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowType
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthType
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthType
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Fields = append(m.Fields, &Field{})
+ if err := m.Fields[len(m.Fields)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Oneofs", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowType
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthType
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthType
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Oneofs = append(m.Oneofs, string(dAtA[iNdEx:postIndex]))
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Options", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowType
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthType
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthType
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Options = append(m.Options, &Option{})
+ if err := m.Options[len(m.Options)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 5:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field SourceContext", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowType
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthType
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthType
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.SourceContext == nil {
+ m.SourceContext = &SourceContext{}
+ }
+ if err := m.SourceContext.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 6:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Syntax", wireType)
+ }
+ m.Syntax = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowType
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Syntax |= Syntax(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ default:
+ iNdEx = preIndex
+ skippy, err := skipType(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthType
+ }
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthType
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *Field) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowType
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: Field: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: Field: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType)
+ }
+ m.Kind = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowType
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Kind |= Field_Kind(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 2:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Cardinality", wireType)
+ }
+ m.Cardinality = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowType
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Cardinality |= Field_Cardinality(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 3:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Number", wireType)
+ }
+ m.Number = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowType
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Number |= int32(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowType
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthType
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthType
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Name = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 6:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field TypeUrl", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowType
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthType
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthType
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.TypeUrl = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 7:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field OneofIndex", wireType)
+ }
+ m.OneofIndex = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowType
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.OneofIndex |= int32(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 8:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Packed", wireType)
+ }
+ var v int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowType
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ v |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ m.Packed = bool(v != 0)
+ case 9:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Options", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowType
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthType
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthType
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Options = append(m.Options, &Option{})
+ if err := m.Options[len(m.Options)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 10:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field JsonName", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowType
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthType
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthType
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.JsonName = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 11:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field DefaultValue", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowType
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthType
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthType
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.DefaultValue = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipType(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthType
+ }
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthType
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *Enum) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowType
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: Enum: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: Enum: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowType
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthType
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthType
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Name = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Enumvalue", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowType
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthType
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthType
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Enumvalue = append(m.Enumvalue, &EnumValue{})
+ if err := m.Enumvalue[len(m.Enumvalue)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Options", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowType
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthType
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthType
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Options = append(m.Options, &Option{})
+ if err := m.Options[len(m.Options)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 4:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field SourceContext", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowType
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthType
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthType
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.SourceContext == nil {
+ m.SourceContext = &SourceContext{}
+ }
+ if err := m.SourceContext.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ case 5:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Syntax", wireType)
+ }
+ m.Syntax = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowType
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Syntax |= Syntax(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ default:
+ iNdEx = preIndex
+ skippy, err := skipType(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthType
+ }
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthType
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *EnumValue) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowType
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: EnumValue: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: EnumValue: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowType
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthType
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthType
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Name = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Number", wireType)
+ }
+ m.Number = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowType
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Number |= int32(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ case 3:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Options", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowType
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthType
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthType
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Options = append(m.Options, &Option{})
+ if err := m.Options[len(m.Options)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipType(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthType
+ }
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthType
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *Option) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowType
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: Option: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: Option: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowType
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthType
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthType
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.Name = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowType
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= int(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthType
+ }
+ postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthType
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ if m.Value == nil {
+ m.Value = &Any{}
+ }
+ if err := m.Value.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipType(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if skippy < 0 {
+ return ErrInvalidLengthType
+ }
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthType
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func skipType(dAtA []byte) (n int, err error) {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowType
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ wireType := int(wire & 0x7)
+ switch wireType {
+ case 0:
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowType
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ iNdEx++
+ if dAtA[iNdEx-1] < 0x80 {
+ break
+ }
+ }
+ return iNdEx, nil
+ case 1:
+ iNdEx += 8
+ return iNdEx, nil
+ case 2:
+ var length int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowType
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ length |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if length < 0 {
+ return 0, ErrInvalidLengthType
+ }
+ iNdEx += length
+ if iNdEx < 0 {
+ return 0, ErrInvalidLengthType
+ }
+ return iNdEx, nil
+ case 3:
+ for {
+ var innerWire uint64
+ var start int = iNdEx
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return 0, ErrIntOverflowType
+ }
+ if iNdEx >= l {
+ return 0, io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ innerWire |= (uint64(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ innerWireType := int(innerWire & 0x7)
+ if innerWireType == 4 {
+ break
+ }
+ next, err := skipType(dAtA[start:])
+ if err != nil {
+ return 0, err
+ }
+ iNdEx = start + next
+ if iNdEx < 0 {
+ return 0, ErrInvalidLengthType
+ }
+ }
+ return iNdEx, nil
+ case 4:
+ return iNdEx, nil
+ case 5:
+ iNdEx += 4
+ return iNdEx, nil
+ default:
+ return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
+ }
+ }
+ panic("unreachable")
+}
+
+var (
+ ErrInvalidLengthType = fmt.Errorf("proto: negative length found during unmarshaling")
+ ErrIntOverflowType = fmt.Errorf("proto: integer overflow")
+)
diff --git a/vendor/github.com/gogo/protobuf/types/wrappers.pb.go b/vendor/github.com/gogo/protobuf/types/wrappers.pb.go
index 18b384ea3..5ade933ef 100644
--- a/vendor/github.com/gogo/protobuf/types/wrappers.pb.go
+++ b/vendor/github.com/gogo/protobuf/types/wrappers.pb.go
@@ -1,37 +1,18 @@
// Code generated by protoc-gen-gogo. DO NOT EDIT.
-// source: wrappers.proto
+// source: google/protobuf/wrappers.proto
-/*
-Package types is a generated protocol buffer package.
-
-It is generated from these files:
- wrappers.proto
-
-It has these top-level messages:
- DoubleValue
- FloatValue
- Int64Value
- UInt64Value
- Int32Value
- UInt32Value
- BoolValue
- StringValue
- BytesValue
-*/
package types
-import proto "github.com/gogo/protobuf/proto"
-import fmt "fmt"
-import math "math"
-
-import bytes "bytes"
-
-import strings "strings"
-import reflect "reflect"
-
-import binary "encoding/binary"
-
-import io "io"
+import (
+ bytes "bytes"
+ encoding_binary "encoding/binary"
+ fmt "fmt"
+ proto "github.com/gogo/protobuf/proto"
+ io "io"
+ math "math"
+ reflect "reflect"
+ strings "strings"
+)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
@@ -49,13 +30,44 @@ const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
// The JSON representation for `DoubleValue` is JSON number.
type DoubleValue struct {
// The double value.
- Value float64 `protobuf:"fixed64,1,opt,name=value,proto3" json:"value,omitempty"`
+ Value float64 `protobuf:"fixed64,1,opt,name=value,proto3" json:"value,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *DoubleValue) Reset() { *m = DoubleValue{} }
-func (*DoubleValue) ProtoMessage() {}
-func (*DoubleValue) Descriptor() ([]byte, []int) { return fileDescriptorWrappers, []int{0} }
-func (*DoubleValue) XXX_WellKnownType() string { return "DoubleValue" }
+func (m *DoubleValue) Reset() { *m = DoubleValue{} }
+func (*DoubleValue) ProtoMessage() {}
+func (*DoubleValue) Descriptor() ([]byte, []int) {
+ return fileDescriptor_5377b62bda767935, []int{0}
+}
+func (*DoubleValue) XXX_WellKnownType() string { return "DoubleValue" }
+func (m *DoubleValue) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *DoubleValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_DoubleValue.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *DoubleValue) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_DoubleValue.Merge(m, src)
+}
+func (m *DoubleValue) XXX_Size() int {
+ return m.Size()
+}
+func (m *DoubleValue) XXX_DiscardUnknown() {
+ xxx_messageInfo_DoubleValue.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_DoubleValue proto.InternalMessageInfo
func (m *DoubleValue) GetValue() float64 {
if m != nil {
@@ -64,18 +76,53 @@ func (m *DoubleValue) GetValue() float64 {
return 0
}
+func (*DoubleValue) XXX_MessageName() string {
+ return "google.protobuf.DoubleValue"
+}
+
// Wrapper message for `float`.
//
// The JSON representation for `FloatValue` is JSON number.
type FloatValue struct {
// The float value.
- Value float32 `protobuf:"fixed32,1,opt,name=value,proto3" json:"value,omitempty"`
+ Value float32 `protobuf:"fixed32,1,opt,name=value,proto3" json:"value,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *FloatValue) Reset() { *m = FloatValue{} }
-func (*FloatValue) ProtoMessage() {}
-func (*FloatValue) Descriptor() ([]byte, []int) { return fileDescriptorWrappers, []int{1} }
-func (*FloatValue) XXX_WellKnownType() string { return "FloatValue" }
+func (m *FloatValue) Reset() { *m = FloatValue{} }
+func (*FloatValue) ProtoMessage() {}
+func (*FloatValue) Descriptor() ([]byte, []int) {
+ return fileDescriptor_5377b62bda767935, []int{1}
+}
+func (*FloatValue) XXX_WellKnownType() string { return "FloatValue" }
+func (m *FloatValue) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *FloatValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_FloatValue.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *FloatValue) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_FloatValue.Merge(m, src)
+}
+func (m *FloatValue) XXX_Size() int {
+ return m.Size()
+}
+func (m *FloatValue) XXX_DiscardUnknown() {
+ xxx_messageInfo_FloatValue.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_FloatValue proto.InternalMessageInfo
func (m *FloatValue) GetValue() float32 {
if m != nil {
@@ -84,18 +131,53 @@ func (m *FloatValue) GetValue() float32 {
return 0
}
+func (*FloatValue) XXX_MessageName() string {
+ return "google.protobuf.FloatValue"
+}
+
// Wrapper message for `int64`.
//
// The JSON representation for `Int64Value` is JSON string.
type Int64Value struct {
// The int64 value.
- Value int64 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"`
+ Value int64 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *Int64Value) Reset() { *m = Int64Value{} }
-func (*Int64Value) ProtoMessage() {}
-func (*Int64Value) Descriptor() ([]byte, []int) { return fileDescriptorWrappers, []int{2} }
-func (*Int64Value) XXX_WellKnownType() string { return "Int64Value" }
+func (m *Int64Value) Reset() { *m = Int64Value{} }
+func (*Int64Value) ProtoMessage() {}
+func (*Int64Value) Descriptor() ([]byte, []int) {
+ return fileDescriptor_5377b62bda767935, []int{2}
+}
+func (*Int64Value) XXX_WellKnownType() string { return "Int64Value" }
+func (m *Int64Value) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *Int64Value) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_Int64Value.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *Int64Value) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_Int64Value.Merge(m, src)
+}
+func (m *Int64Value) XXX_Size() int {
+ return m.Size()
+}
+func (m *Int64Value) XXX_DiscardUnknown() {
+ xxx_messageInfo_Int64Value.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Int64Value proto.InternalMessageInfo
func (m *Int64Value) GetValue() int64 {
if m != nil {
@@ -104,18 +186,53 @@ func (m *Int64Value) GetValue() int64 {
return 0
}
+func (*Int64Value) XXX_MessageName() string {
+ return "google.protobuf.Int64Value"
+}
+
// Wrapper message for `uint64`.
//
// The JSON representation for `UInt64Value` is JSON string.
type UInt64Value struct {
// The uint64 value.
- Value uint64 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"`
+ Value uint64 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *UInt64Value) Reset() { *m = UInt64Value{} }
-func (*UInt64Value) ProtoMessage() {}
-func (*UInt64Value) Descriptor() ([]byte, []int) { return fileDescriptorWrappers, []int{3} }
-func (*UInt64Value) XXX_WellKnownType() string { return "UInt64Value" }
+func (m *UInt64Value) Reset() { *m = UInt64Value{} }
+func (*UInt64Value) ProtoMessage() {}
+func (*UInt64Value) Descriptor() ([]byte, []int) {
+ return fileDescriptor_5377b62bda767935, []int{3}
+}
+func (*UInt64Value) XXX_WellKnownType() string { return "UInt64Value" }
+func (m *UInt64Value) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *UInt64Value) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_UInt64Value.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *UInt64Value) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_UInt64Value.Merge(m, src)
+}
+func (m *UInt64Value) XXX_Size() int {
+ return m.Size()
+}
+func (m *UInt64Value) XXX_DiscardUnknown() {
+ xxx_messageInfo_UInt64Value.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_UInt64Value proto.InternalMessageInfo
func (m *UInt64Value) GetValue() uint64 {
if m != nil {
@@ -124,18 +241,53 @@ func (m *UInt64Value) GetValue() uint64 {
return 0
}
+func (*UInt64Value) XXX_MessageName() string {
+ return "google.protobuf.UInt64Value"
+}
+
// Wrapper message for `int32`.
//
// The JSON representation for `Int32Value` is JSON number.
type Int32Value struct {
// The int32 value.
- Value int32 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"`
+ Value int32 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *Int32Value) Reset() { *m = Int32Value{} }
-func (*Int32Value) ProtoMessage() {}
-func (*Int32Value) Descriptor() ([]byte, []int) { return fileDescriptorWrappers, []int{4} }
-func (*Int32Value) XXX_WellKnownType() string { return "Int32Value" }
+func (m *Int32Value) Reset() { *m = Int32Value{} }
+func (*Int32Value) ProtoMessage() {}
+func (*Int32Value) Descriptor() ([]byte, []int) {
+ return fileDescriptor_5377b62bda767935, []int{4}
+}
+func (*Int32Value) XXX_WellKnownType() string { return "Int32Value" }
+func (m *Int32Value) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *Int32Value) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_Int32Value.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *Int32Value) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_Int32Value.Merge(m, src)
+}
+func (m *Int32Value) XXX_Size() int {
+ return m.Size()
+}
+func (m *Int32Value) XXX_DiscardUnknown() {
+ xxx_messageInfo_Int32Value.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Int32Value proto.InternalMessageInfo
func (m *Int32Value) GetValue() int32 {
if m != nil {
@@ -144,18 +296,53 @@ func (m *Int32Value) GetValue() int32 {
return 0
}
+func (*Int32Value) XXX_MessageName() string {
+ return "google.protobuf.Int32Value"
+}
+
// Wrapper message for `uint32`.
//
// The JSON representation for `UInt32Value` is JSON number.
type UInt32Value struct {
// The uint32 value.
- Value uint32 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"`
+ Value uint32 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *UInt32Value) Reset() { *m = UInt32Value{} }
-func (*UInt32Value) ProtoMessage() {}
-func (*UInt32Value) Descriptor() ([]byte, []int) { return fileDescriptorWrappers, []int{5} }
-func (*UInt32Value) XXX_WellKnownType() string { return "UInt32Value" }
+func (m *UInt32Value) Reset() { *m = UInt32Value{} }
+func (*UInt32Value) ProtoMessage() {}
+func (*UInt32Value) Descriptor() ([]byte, []int) {
+ return fileDescriptor_5377b62bda767935, []int{5}
+}
+func (*UInt32Value) XXX_WellKnownType() string { return "UInt32Value" }
+func (m *UInt32Value) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *UInt32Value) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_UInt32Value.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *UInt32Value) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_UInt32Value.Merge(m, src)
+}
+func (m *UInt32Value) XXX_Size() int {
+ return m.Size()
+}
+func (m *UInt32Value) XXX_DiscardUnknown() {
+ xxx_messageInfo_UInt32Value.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_UInt32Value proto.InternalMessageInfo
func (m *UInt32Value) GetValue() uint32 {
if m != nil {
@@ -164,18 +351,53 @@ func (m *UInt32Value) GetValue() uint32 {
return 0
}
+func (*UInt32Value) XXX_MessageName() string {
+ return "google.protobuf.UInt32Value"
+}
+
// Wrapper message for `bool`.
//
// The JSON representation for `BoolValue` is JSON `true` and `false`.
type BoolValue struct {
// The bool value.
- Value bool `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"`
+ Value bool `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *BoolValue) Reset() { *m = BoolValue{} }
-func (*BoolValue) ProtoMessage() {}
-func (*BoolValue) Descriptor() ([]byte, []int) { return fileDescriptorWrappers, []int{6} }
-func (*BoolValue) XXX_WellKnownType() string { return "BoolValue" }
+func (m *BoolValue) Reset() { *m = BoolValue{} }
+func (*BoolValue) ProtoMessage() {}
+func (*BoolValue) Descriptor() ([]byte, []int) {
+ return fileDescriptor_5377b62bda767935, []int{6}
+}
+func (*BoolValue) XXX_WellKnownType() string { return "BoolValue" }
+func (m *BoolValue) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *BoolValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_BoolValue.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *BoolValue) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_BoolValue.Merge(m, src)
+}
+func (m *BoolValue) XXX_Size() int {
+ return m.Size()
+}
+func (m *BoolValue) XXX_DiscardUnknown() {
+ xxx_messageInfo_BoolValue.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_BoolValue proto.InternalMessageInfo
func (m *BoolValue) GetValue() bool {
if m != nil {
@@ -184,18 +406,53 @@ func (m *BoolValue) GetValue() bool {
return false
}
+func (*BoolValue) XXX_MessageName() string {
+ return "google.protobuf.BoolValue"
+}
+
// Wrapper message for `string`.
//
// The JSON representation for `StringValue` is JSON string.
type StringValue struct {
// The string value.
- Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
+ Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *StringValue) Reset() { *m = StringValue{} }
-func (*StringValue) ProtoMessage() {}
-func (*StringValue) Descriptor() ([]byte, []int) { return fileDescriptorWrappers, []int{7} }
-func (*StringValue) XXX_WellKnownType() string { return "StringValue" }
+func (m *StringValue) Reset() { *m = StringValue{} }
+func (*StringValue) ProtoMessage() {}
+func (*StringValue) Descriptor() ([]byte, []int) {
+ return fileDescriptor_5377b62bda767935, []int{7}
+}
+func (*StringValue) XXX_WellKnownType() string { return "StringValue" }
+func (m *StringValue) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *StringValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_StringValue.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *StringValue) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_StringValue.Merge(m, src)
+}
+func (m *StringValue) XXX_Size() int {
+ return m.Size()
+}
+func (m *StringValue) XXX_DiscardUnknown() {
+ xxx_messageInfo_StringValue.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_StringValue proto.InternalMessageInfo
func (m *StringValue) GetValue() string {
if m != nil {
@@ -204,18 +461,53 @@ func (m *StringValue) GetValue() string {
return ""
}
+func (*StringValue) XXX_MessageName() string {
+ return "google.protobuf.StringValue"
+}
+
// Wrapper message for `bytes`.
//
// The JSON representation for `BytesValue` is JSON string.
type BytesValue struct {
// The bytes value.
- Value []byte `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
+ Value []byte `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *BytesValue) Reset() { *m = BytesValue{} }
-func (*BytesValue) ProtoMessage() {}
-func (*BytesValue) Descriptor() ([]byte, []int) { return fileDescriptorWrappers, []int{8} }
-func (*BytesValue) XXX_WellKnownType() string { return "BytesValue" }
+func (m *BytesValue) Reset() { *m = BytesValue{} }
+func (*BytesValue) ProtoMessage() {}
+func (*BytesValue) Descriptor() ([]byte, []int) {
+ return fileDescriptor_5377b62bda767935, []int{8}
+}
+func (*BytesValue) XXX_WellKnownType() string { return "BytesValue" }
+func (m *BytesValue) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *BytesValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_BytesValue.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *BytesValue) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_BytesValue.Merge(m, src)
+}
+func (m *BytesValue) XXX_Size() int {
+ return m.Size()
+}
+func (m *BytesValue) XXX_DiscardUnknown() {
+ xxx_messageInfo_BytesValue.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_BytesValue proto.InternalMessageInfo
func (m *BytesValue) GetValue() []byte {
if m != nil {
@@ -224,6 +516,9 @@ func (m *BytesValue) GetValue() []byte {
return nil
}
+func (*BytesValue) XXX_MessageName() string {
+ return "google.protobuf.BytesValue"
+}
func init() {
proto.RegisterType((*DoubleValue)(nil), "google.protobuf.DoubleValue")
proto.RegisterType((*FloatValue)(nil), "google.protobuf.FloatValue")
@@ -235,6 +530,31 @@ func init() {
proto.RegisterType((*StringValue)(nil), "google.protobuf.StringValue")
proto.RegisterType((*BytesValue)(nil), "google.protobuf.BytesValue")
}
+
+func init() { proto.RegisterFile("google/protobuf/wrappers.proto", fileDescriptor_5377b62bda767935) }
+
+var fileDescriptor_5377b62bda767935 = []byte{
+ // 285 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 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 0x3c, 0x92, 0x63, 0x7c, 0xf0,
+ 0x48, 0x8e, 0xf1, 0xc5, 0x23, 0x39, 0x86, 0x0f, 0x20, 0xf1, 0xc7, 0x72, 0x8c, 0x27, 0x1e, 0xcb,
+ 0x31, 0x72, 0x09, 0x27, 0xe7, 0xe7, 0xea, 0xa1, 0x45, 0x87, 0x13, 0x6f, 0x38, 0x34, 0xbe, 0x02,
+ 0x40, 0x22, 0x01, 0x8c, 0x51, 0xac, 0x25, 0x95, 0x05, 0xa9, 0xc5, 0x3f, 0x18, 0x19, 0x17, 0x31,
+ 0x31, 0xbb, 0x07, 0x38, 0xad, 0x62, 0x92, 0x73, 0x87, 0x68, 0x09, 0x80, 0x6a, 0xd1, 0x0b, 0x4f,
+ 0xcd, 0xc9, 0xf1, 0xce, 0xcb, 0x2f, 0xcf, 0x0b, 0x01, 0xa9, 0x4c, 0x62, 0x03, 0x9b, 0x65, 0x0c,
+ 0x08, 0x00, 0x00, 0xff, 0xff, 0x31, 0x55, 0x64, 0x90, 0x0a, 0x02, 0x00, 0x00,
+}
+
func (this *DoubleValue) Compare(that interface{}) int {
if that == nil {
if this == nil {
@@ -266,6 +586,9 @@ func (this *DoubleValue) Compare(that interface{}) int {
}
return 1
}
+ if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 {
+ return c
+ }
return 0
}
func (this *FloatValue) Compare(that interface{}) int {
@@ -299,6 +622,9 @@ func (this *FloatValue) Compare(that interface{}) int {
}
return 1
}
+ if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 {
+ return c
+ }
return 0
}
func (this *Int64Value) Compare(that interface{}) int {
@@ -332,6 +658,9 @@ func (this *Int64Value) Compare(that interface{}) int {
}
return 1
}
+ if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 {
+ return c
+ }
return 0
}
func (this *UInt64Value) Compare(that interface{}) int {
@@ -365,6 +694,9 @@ func (this *UInt64Value) Compare(that interface{}) int {
}
return 1
}
+ if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 {
+ return c
+ }
return 0
}
func (this *Int32Value) Compare(that interface{}) int {
@@ -398,6 +730,9 @@ func (this *Int32Value) Compare(that interface{}) int {
}
return 1
}
+ if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 {
+ return c
+ }
return 0
}
func (this *UInt32Value) Compare(that interface{}) int {
@@ -431,6 +766,9 @@ func (this *UInt32Value) Compare(that interface{}) int {
}
return 1
}
+ if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 {
+ return c
+ }
return 0
}
func (this *BoolValue) Compare(that interface{}) int {
@@ -464,6 +802,9 @@ func (this *BoolValue) Compare(that interface{}) int {
}
return 1
}
+ if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 {
+ return c
+ }
return 0
}
func (this *StringValue) Compare(that interface{}) int {
@@ -497,6 +838,9 @@ func (this *StringValue) Compare(that interface{}) int {
}
return 1
}
+ if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 {
+ return c
+ }
return 0
}
func (this *BytesValue) Compare(that interface{}) int {
@@ -527,6 +871,9 @@ func (this *BytesValue) Compare(that interface{}) int {
if c := bytes.Compare(this.Value, that1.Value); c != 0 {
return c
}
+ if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 {
+ return c
+ }
return 0
}
func (this *DoubleValue) Equal(that interface{}) bool {
@@ -551,6 +898,9 @@ func (this *DoubleValue) Equal(that interface{}) bool {
if this.Value != that1.Value {
return false
}
+ if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
+ return false
+ }
return true
}
func (this *FloatValue) Equal(that interface{}) bool {
@@ -575,6 +925,9 @@ func (this *FloatValue) Equal(that interface{}) bool {
if this.Value != that1.Value {
return false
}
+ if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
+ return false
+ }
return true
}
func (this *Int64Value) Equal(that interface{}) bool {
@@ -599,6 +952,9 @@ func (this *Int64Value) Equal(that interface{}) bool {
if this.Value != that1.Value {
return false
}
+ if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
+ return false
+ }
return true
}
func (this *UInt64Value) Equal(that interface{}) bool {
@@ -623,6 +979,9 @@ func (this *UInt64Value) Equal(that interface{}) bool {
if this.Value != that1.Value {
return false
}
+ if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
+ return false
+ }
return true
}
func (this *Int32Value) Equal(that interface{}) bool {
@@ -647,6 +1006,9 @@ func (this *Int32Value) Equal(that interface{}) bool {
if this.Value != that1.Value {
return false
}
+ if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
+ return false
+ }
return true
}
func (this *UInt32Value) Equal(that interface{}) bool {
@@ -671,6 +1033,9 @@ func (this *UInt32Value) Equal(that interface{}) bool {
if this.Value != that1.Value {
return false
}
+ if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
+ return false
+ }
return true
}
func (this *BoolValue) Equal(that interface{}) bool {
@@ -695,6 +1060,9 @@ func (this *BoolValue) Equal(that interface{}) bool {
if this.Value != that1.Value {
return false
}
+ if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
+ return false
+ }
return true
}
func (this *StringValue) Equal(that interface{}) bool {
@@ -719,6 +1087,9 @@ func (this *StringValue) Equal(that interface{}) bool {
if this.Value != that1.Value {
return false
}
+ if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
+ return false
+ }
return true
}
func (this *BytesValue) Equal(that interface{}) bool {
@@ -743,6 +1114,9 @@ func (this *BytesValue) Equal(that interface{}) bool {
if !bytes.Equal(this.Value, that1.Value) {
return false
}
+ if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
+ return false
+ }
return true
}
func (this *DoubleValue) GoString() string {
@@ -752,6 +1126,9 @@ func (this *DoubleValue) GoString() string {
s := make([]string, 0, 5)
s = append(s, "&types.DoubleValue{")
s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n")
+ if this.XXX_unrecognized != nil {
+ s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n")
+ }
s = append(s, "}")
return strings.Join(s, "")
}
@@ -762,6 +1139,9 @@ func (this *FloatValue) GoString() string {
s := make([]string, 0, 5)
s = append(s, "&types.FloatValue{")
s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n")
+ if this.XXX_unrecognized != nil {
+ s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n")
+ }
s = append(s, "}")
return strings.Join(s, "")
}
@@ -772,6 +1152,9 @@ func (this *Int64Value) GoString() string {
s := make([]string, 0, 5)
s = append(s, "&types.Int64Value{")
s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n")
+ if this.XXX_unrecognized != nil {
+ s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n")
+ }
s = append(s, "}")
return strings.Join(s, "")
}
@@ -782,6 +1165,9 @@ func (this *UInt64Value) GoString() string {
s := make([]string, 0, 5)
s = append(s, "&types.UInt64Value{")
s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n")
+ if this.XXX_unrecognized != nil {
+ s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n")
+ }
s = append(s, "}")
return strings.Join(s, "")
}
@@ -792,6 +1178,9 @@ func (this *Int32Value) GoString() string {
s := make([]string, 0, 5)
s = append(s, "&types.Int32Value{")
s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n")
+ if this.XXX_unrecognized != nil {
+ s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n")
+ }
s = append(s, "}")
return strings.Join(s, "")
}
@@ -802,6 +1191,9 @@ func (this *UInt32Value) GoString() string {
s := make([]string, 0, 5)
s = append(s, "&types.UInt32Value{")
s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n")
+ if this.XXX_unrecognized != nil {
+ s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n")
+ }
s = append(s, "}")
return strings.Join(s, "")
}
@@ -812,6 +1204,9 @@ func (this *BoolValue) GoString() string {
s := make([]string, 0, 5)
s = append(s, "&types.BoolValue{")
s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n")
+ if this.XXX_unrecognized != nil {
+ s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n")
+ }
s = append(s, "}")
return strings.Join(s, "")
}
@@ -822,6 +1217,9 @@ func (this *StringValue) GoString() string {
s := make([]string, 0, 5)
s = append(s, "&types.StringValue{")
s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n")
+ if this.XXX_unrecognized != nil {
+ s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n")
+ }
s = append(s, "}")
return strings.Join(s, "")
}
@@ -832,6 +1230,9 @@ func (this *BytesValue) GoString() string {
s := make([]string, 0, 5)
s = append(s, "&types.BytesValue{")
s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n")
+ if this.XXX_unrecognized != nil {
+ s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n")
+ }
s = append(s, "}")
return strings.Join(s, "")
}
@@ -861,9 +1262,12 @@ func (m *DoubleValue) MarshalTo(dAtA []byte) (int, error) {
if m.Value != 0 {
dAtA[i] = 0x9
i++
- binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Value))))
+ encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Value))))
i += 8
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -885,9 +1289,12 @@ func (m *FloatValue) MarshalTo(dAtA []byte) (int, error) {
if m.Value != 0 {
dAtA[i] = 0xd
i++
- binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.Value))))
+ encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.Value))))
i += 4
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -911,6 +1318,9 @@ func (m *Int64Value) MarshalTo(dAtA []byte) (int, error) {
i++
i = encodeVarintWrappers(dAtA, i, uint64(m.Value))
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -934,6 +1344,9 @@ func (m *UInt64Value) MarshalTo(dAtA []byte) (int, error) {
i++
i = encodeVarintWrappers(dAtA, i, uint64(m.Value))
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -957,6 +1370,9 @@ func (m *Int32Value) MarshalTo(dAtA []byte) (int, error) {
i++
i = encodeVarintWrappers(dAtA, i, uint64(m.Value))
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -980,6 +1396,9 @@ func (m *UInt32Value) MarshalTo(dAtA []byte) (int, error) {
i++
i = encodeVarintWrappers(dAtA, i, uint64(m.Value))
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -1008,6 +1427,9 @@ func (m *BoolValue) MarshalTo(dAtA []byte) (int, error) {
}
i++
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -1032,6 +1454,9 @@ func (m *StringValue) MarshalTo(dAtA []byte) (int, error) {
i = encodeVarintWrappers(dAtA, i, uint64(len(m.Value)))
i += copy(dAtA[i:], m.Value)
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -1056,6 +1481,9 @@ func (m *BytesValue) MarshalTo(dAtA []byte) (int, error) {
i = encodeVarintWrappers(dAtA, i, uint64(len(m.Value)))
i += copy(dAtA[i:], m.Value)
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -1075,6 +1503,7 @@ func NewPopulatedDoubleValue(r randyWrappers, easy bool) *DoubleValue {
this.Value *= -1
}
if !easy && r.Intn(10) != 0 {
+ this.XXX_unrecognized = randUnrecognizedWrappers(r, 2)
}
return this
}
@@ -1086,6 +1515,7 @@ func NewPopulatedFloatValue(r randyWrappers, easy bool) *FloatValue {
this.Value *= -1
}
if !easy && r.Intn(10) != 0 {
+ this.XXX_unrecognized = randUnrecognizedWrappers(r, 2)
}
return this
}
@@ -1097,6 +1527,7 @@ func NewPopulatedInt64Value(r randyWrappers, easy bool) *Int64Value {
this.Value *= -1
}
if !easy && r.Intn(10) != 0 {
+ this.XXX_unrecognized = randUnrecognizedWrappers(r, 2)
}
return this
}
@@ -1105,6 +1536,7 @@ func NewPopulatedUInt64Value(r randyWrappers, easy bool) *UInt64Value {
this := &UInt64Value{}
this.Value = uint64(uint64(r.Uint32()))
if !easy && r.Intn(10) != 0 {
+ this.XXX_unrecognized = randUnrecognizedWrappers(r, 2)
}
return this
}
@@ -1116,6 +1548,7 @@ func NewPopulatedInt32Value(r randyWrappers, easy bool) *Int32Value {
this.Value *= -1
}
if !easy && r.Intn(10) != 0 {
+ this.XXX_unrecognized = randUnrecognizedWrappers(r, 2)
}
return this
}
@@ -1124,6 +1557,7 @@ func NewPopulatedUInt32Value(r randyWrappers, easy bool) *UInt32Value {
this := &UInt32Value{}
this.Value = uint32(r.Uint32())
if !easy && r.Intn(10) != 0 {
+ this.XXX_unrecognized = randUnrecognizedWrappers(r, 2)
}
return this
}
@@ -1132,6 +1566,7 @@ func NewPopulatedBoolValue(r randyWrappers, easy bool) *BoolValue {
this := &BoolValue{}
this.Value = bool(bool(r.Intn(2) == 0))
if !easy && r.Intn(10) != 0 {
+ this.XXX_unrecognized = randUnrecognizedWrappers(r, 2)
}
return this
}
@@ -1140,6 +1575,7 @@ func NewPopulatedStringValue(r randyWrappers, easy bool) *StringValue {
this := &StringValue{}
this.Value = string(randStringWrappers(r))
if !easy && r.Intn(10) != 0 {
+ this.XXX_unrecognized = randUnrecognizedWrappers(r, 2)
}
return this
}
@@ -1152,6 +1588,7 @@ func NewPopulatedBytesValue(r randyWrappers, easy bool) *BytesValue {
this.Value[i] = byte(r.Intn(256))
}
if !easy && r.Intn(10) != 0 {
+ this.XXX_unrecognized = randUnrecognizedWrappers(r, 2)
}
return this
}
@@ -1229,85 +1666,139 @@ func encodeVarintPopulateWrappers(dAtA []byte, v uint64) []byte {
return dAtA
}
func (m *DoubleValue) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
if m.Value != 0 {
n += 9
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *FloatValue) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
if m.Value != 0 {
n += 5
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *Int64Value) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
if m.Value != 0 {
n += 1 + sovWrappers(uint64(m.Value))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *UInt64Value) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
if m.Value != 0 {
n += 1 + sovWrappers(uint64(m.Value))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *Int32Value) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
if m.Value != 0 {
n += 1 + sovWrappers(uint64(m.Value))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *UInt32Value) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
if m.Value != 0 {
n += 1 + sovWrappers(uint64(m.Value))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *BoolValue) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
if m.Value {
n += 2
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *StringValue) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.Value)
if l > 0 {
n += 1 + l + sovWrappers(uint64(l))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *BytesValue) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.Value)
if l > 0 {
n += 1 + l + sovWrappers(uint64(l))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
@@ -1330,6 +1821,7 @@ func (this *DoubleValue) String() string {
}
s := strings.Join([]string{`&DoubleValue{`,
`Value:` + fmt.Sprintf("%v", this.Value) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -1340,6 +1832,7 @@ func (this *FloatValue) String() string {
}
s := strings.Join([]string{`&FloatValue{`,
`Value:` + fmt.Sprintf("%v", this.Value) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -1350,6 +1843,7 @@ func (this *Int64Value) String() string {
}
s := strings.Join([]string{`&Int64Value{`,
`Value:` + fmt.Sprintf("%v", this.Value) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -1360,6 +1854,7 @@ func (this *UInt64Value) String() string {
}
s := strings.Join([]string{`&UInt64Value{`,
`Value:` + fmt.Sprintf("%v", this.Value) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -1370,6 +1865,7 @@ func (this *Int32Value) String() string {
}
s := strings.Join([]string{`&Int32Value{`,
`Value:` + fmt.Sprintf("%v", this.Value) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -1380,6 +1876,7 @@ func (this *UInt32Value) String() string {
}
s := strings.Join([]string{`&UInt32Value{`,
`Value:` + fmt.Sprintf("%v", this.Value) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -1390,6 +1887,7 @@ func (this *BoolValue) String() string {
}
s := strings.Join([]string{`&BoolValue{`,
`Value:` + fmt.Sprintf("%v", this.Value) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -1400,6 +1898,7 @@ func (this *StringValue) String() string {
}
s := strings.Join([]string{`&StringValue{`,
`Value:` + fmt.Sprintf("%v", this.Value) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -1410,6 +1909,7 @@ func (this *BytesValue) String() string {
}
s := strings.Join([]string{`&BytesValue{`,
`Value:` + fmt.Sprintf("%v", this.Value) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -1437,7 +1937,7 @@ func (m *DoubleValue) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1459,7 +1959,7 @@ func (m *DoubleValue) Unmarshal(dAtA []byte) error {
if (iNdEx + 8) > l {
return io.ErrUnexpectedEOF
}
- v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:]))
+ v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:]))
iNdEx += 8
m.Value = float64(math.Float64frombits(v))
default:
@@ -1471,9 +1971,13 @@ func (m *DoubleValue) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthWrappers
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthWrappers
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -1498,7 +2002,7 @@ func (m *FloatValue) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1520,7 +2024,7 @@ func (m *FloatValue) Unmarshal(dAtA []byte) error {
if (iNdEx + 4) > l {
return io.ErrUnexpectedEOF
}
- v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:]))
+ v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:]))
iNdEx += 4
m.Value = float32(math.Float32frombits(v))
default:
@@ -1532,9 +2036,13 @@ func (m *FloatValue) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthWrappers
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthWrappers
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -1559,7 +2067,7 @@ func (m *Int64Value) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1587,7 +2095,7 @@ func (m *Int64Value) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- m.Value |= (int64(b) & 0x7F) << shift
+ m.Value |= int64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1601,9 +2109,13 @@ func (m *Int64Value) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthWrappers
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthWrappers
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -1628,7 +2140,7 @@ func (m *UInt64Value) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1656,7 +2168,7 @@ func (m *UInt64Value) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- m.Value |= (uint64(b) & 0x7F) << shift
+ m.Value |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1670,9 +2182,13 @@ func (m *UInt64Value) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthWrappers
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthWrappers
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -1697,7 +2213,7 @@ func (m *Int32Value) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1725,7 +2241,7 @@ func (m *Int32Value) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- m.Value |= (int32(b) & 0x7F) << shift
+ m.Value |= int32(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1739,9 +2255,13 @@ func (m *Int32Value) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthWrappers
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthWrappers
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -1766,7 +2286,7 @@ func (m *UInt32Value) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1794,7 +2314,7 @@ func (m *UInt32Value) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- m.Value |= (uint32(b) & 0x7F) << shift
+ m.Value |= uint32(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1808,9 +2328,13 @@ func (m *UInt32Value) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthWrappers
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthWrappers
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -1835,7 +2359,7 @@ func (m *BoolValue) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1863,7 +2387,7 @@ func (m *BoolValue) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- v |= (int(b) & 0x7F) << shift
+ v |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1878,9 +2402,13 @@ func (m *BoolValue) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthWrappers
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthWrappers
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -1905,7 +2433,7 @@ func (m *StringValue) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1933,7 +2461,7 @@ func (m *StringValue) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -1943,6 +2471,9 @@ func (m *StringValue) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthWrappers
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthWrappers
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -1957,9 +2488,13 @@ func (m *StringValue) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthWrappers
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthWrappers
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -1984,7 +2519,7 @@ func (m *BytesValue) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2012,7 +2547,7 @@ func (m *BytesValue) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- byteLen |= (int(b) & 0x7F) << shift
+ byteLen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -2021,6 +2556,9 @@ func (m *BytesValue) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthWrappers
}
postIndex := iNdEx + byteLen
+ if postIndex < 0 {
+ return ErrInvalidLengthWrappers
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -2038,9 +2576,13 @@ func (m *BytesValue) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthWrappers
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthWrappers
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -2104,10 +2646,13 @@ func skipWrappers(dAtA []byte) (n int, err error) {
break
}
}
- iNdEx += length
if length < 0 {
return 0, ErrInvalidLengthWrappers
}
+ iNdEx += length
+ if iNdEx < 0 {
+ return 0, ErrInvalidLengthWrappers
+ }
return iNdEx, nil
case 3:
for {
@@ -2136,6 +2681,9 @@ func skipWrappers(dAtA []byte) (n int, err error) {
return 0, err
}
iNdEx = start + next
+ if iNdEx < 0 {
+ return 0, ErrInvalidLengthWrappers
+ }
}
return iNdEx, nil
case 4:
@@ -2154,27 +2702,3 @@ var (
ErrInvalidLengthWrappers = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowWrappers = fmt.Errorf("proto: integer overflow")
)
-
-func init() { proto.RegisterFile("wrappers.proto", fileDescriptorWrappers) }
-
-var fileDescriptorWrappers = []byte{
- // 278 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x2b, 0x2f, 0x4a, 0x2c,
- 0x28, 0x48, 0x2d, 0x2a, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x4f, 0xcf, 0xcf, 0x4f,
- 0xcf, 0x49, 0x85, 0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 0x02, 0x18, 0xa3, 0x58, 0x4b,
- 0x2a, 0x0b, 0x52, 0x8b, 0x7f, 0x30, 0x32, 0x2e, 0x62, 0x62, 0x76, 0x0f, 0x70, 0x5a, 0xc5, 0x24,
- 0xe7, 0x0e, 0xd1, 0x12, 0x00, 0xd5, 0xa2, 0x17, 0x9e, 0x9a, 0x93, 0xe3, 0x9d, 0x97, 0x5f, 0x9e,
- 0x17, 0x02, 0x52, 0x99, 0xc4, 0x06, 0x36, 0xcb, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, 0x23, 0x27,
- 0x6c, 0x5f, 0xfa, 0x01, 0x00, 0x00,
-}
diff --git a/vendor/github.com/gogo/protobuf/types/wrappers_gogo.go b/vendor/github.com/gogo/protobuf/types/wrappers_gogo.go
new file mode 100644
index 000000000..d905df360
--- /dev/null
+++ b/vendor/github.com/gogo/protobuf/types/wrappers_gogo.go
@@ -0,0 +1,300 @@
+// Protocol Buffers for Go with Gadgets
+//
+// Copyright (c) 2018, The GoGo Authors. All rights reserved.
+// http://github.com/gogo/protobuf
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+package types
+
+func NewPopulatedStdDouble(r randyWrappers, easy bool) *float64 {
+ v := NewPopulatedDoubleValue(r, easy)
+ return &v.Value
+}
+
+func SizeOfStdDouble(v float64) int {
+ pv := &DoubleValue{Value: v}
+ return pv.Size()
+}
+
+func StdDoubleMarshal(v float64) ([]byte, error) {
+ size := SizeOfStdDouble(v)
+ buf := make([]byte, size)
+ _, err := StdDoubleMarshalTo(v, buf)
+ return buf, err
+}
+
+func StdDoubleMarshalTo(v float64, data []byte) (int, error) {
+ pv := &DoubleValue{Value: v}
+ return pv.MarshalTo(data)
+}
+
+func StdDoubleUnmarshal(v *float64, data []byte) error {
+ pv := &DoubleValue{}
+ if err := pv.Unmarshal(data); err != nil {
+ return err
+ }
+ *v = pv.Value
+ return nil
+}
+func NewPopulatedStdFloat(r randyWrappers, easy bool) *float32 {
+ v := NewPopulatedFloatValue(r, easy)
+ return &v.Value
+}
+
+func SizeOfStdFloat(v float32) int {
+ pv := &FloatValue{Value: v}
+ return pv.Size()
+}
+
+func StdFloatMarshal(v float32) ([]byte, error) {
+ size := SizeOfStdFloat(v)
+ buf := make([]byte, size)
+ _, err := StdFloatMarshalTo(v, buf)
+ return buf, err
+}
+
+func StdFloatMarshalTo(v float32, data []byte) (int, error) {
+ pv := &FloatValue{Value: v}
+ return pv.MarshalTo(data)
+}
+
+func StdFloatUnmarshal(v *float32, data []byte) error {
+ pv := &FloatValue{}
+ if err := pv.Unmarshal(data); err != nil {
+ return err
+ }
+ *v = pv.Value
+ return nil
+}
+func NewPopulatedStdInt64(r randyWrappers, easy bool) *int64 {
+ v := NewPopulatedInt64Value(r, easy)
+ return &v.Value
+}
+
+func SizeOfStdInt64(v int64) int {
+ pv := &Int64Value{Value: v}
+ return pv.Size()
+}
+
+func StdInt64Marshal(v int64) ([]byte, error) {
+ size := SizeOfStdInt64(v)
+ buf := make([]byte, size)
+ _, err := StdInt64MarshalTo(v, buf)
+ return buf, err
+}
+
+func StdInt64MarshalTo(v int64, data []byte) (int, error) {
+ pv := &Int64Value{Value: v}
+ return pv.MarshalTo(data)
+}
+
+func StdInt64Unmarshal(v *int64, data []byte) error {
+ pv := &Int64Value{}
+ if err := pv.Unmarshal(data); err != nil {
+ return err
+ }
+ *v = pv.Value
+ return nil
+}
+func NewPopulatedStdUInt64(r randyWrappers, easy bool) *uint64 {
+ v := NewPopulatedUInt64Value(r, easy)
+ return &v.Value
+}
+
+func SizeOfStdUInt64(v uint64) int {
+ pv := &UInt64Value{Value: v}
+ return pv.Size()
+}
+
+func StdUInt64Marshal(v uint64) ([]byte, error) {
+ size := SizeOfStdUInt64(v)
+ buf := make([]byte, size)
+ _, err := StdUInt64MarshalTo(v, buf)
+ return buf, err
+}
+
+func StdUInt64MarshalTo(v uint64, data []byte) (int, error) {
+ pv := &UInt64Value{Value: v}
+ return pv.MarshalTo(data)
+}
+
+func StdUInt64Unmarshal(v *uint64, data []byte) error {
+ pv := &UInt64Value{}
+ if err := pv.Unmarshal(data); err != nil {
+ return err
+ }
+ *v = pv.Value
+ return nil
+}
+func NewPopulatedStdInt32(r randyWrappers, easy bool) *int32 {
+ v := NewPopulatedInt32Value(r, easy)
+ return &v.Value
+}
+
+func SizeOfStdInt32(v int32) int {
+ pv := &Int32Value{Value: v}
+ return pv.Size()
+}
+
+func StdInt32Marshal(v int32) ([]byte, error) {
+ size := SizeOfStdInt32(v)
+ buf := make([]byte, size)
+ _, err := StdInt32MarshalTo(v, buf)
+ return buf, err
+}
+
+func StdInt32MarshalTo(v int32, data []byte) (int, error) {
+ pv := &Int32Value{Value: v}
+ return pv.MarshalTo(data)
+}
+
+func StdInt32Unmarshal(v *int32, data []byte) error {
+ pv := &Int32Value{}
+ if err := pv.Unmarshal(data); err != nil {
+ return err
+ }
+ *v = pv.Value
+ return nil
+}
+func NewPopulatedStdUInt32(r randyWrappers, easy bool) *uint32 {
+ v := NewPopulatedUInt32Value(r, easy)
+ return &v.Value
+}
+
+func SizeOfStdUInt32(v uint32) int {
+ pv := &UInt32Value{Value: v}
+ return pv.Size()
+}
+
+func StdUInt32Marshal(v uint32) ([]byte, error) {
+ size := SizeOfStdUInt32(v)
+ buf := make([]byte, size)
+ _, err := StdUInt32MarshalTo(v, buf)
+ return buf, err
+}
+
+func StdUInt32MarshalTo(v uint32, data []byte) (int, error) {
+ pv := &UInt32Value{Value: v}
+ return pv.MarshalTo(data)
+}
+
+func StdUInt32Unmarshal(v *uint32, data []byte) error {
+ pv := &UInt32Value{}
+ if err := pv.Unmarshal(data); err != nil {
+ return err
+ }
+ *v = pv.Value
+ return nil
+}
+func NewPopulatedStdBool(r randyWrappers, easy bool) *bool {
+ v := NewPopulatedBoolValue(r, easy)
+ return &v.Value
+}
+
+func SizeOfStdBool(v bool) int {
+ pv := &BoolValue{Value: v}
+ return pv.Size()
+}
+
+func StdBoolMarshal(v bool) ([]byte, error) {
+ size := SizeOfStdBool(v)
+ buf := make([]byte, size)
+ _, err := StdBoolMarshalTo(v, buf)
+ return buf, err
+}
+
+func StdBoolMarshalTo(v bool, data []byte) (int, error) {
+ pv := &BoolValue{Value: v}
+ return pv.MarshalTo(data)
+}
+
+func StdBoolUnmarshal(v *bool, data []byte) error {
+ pv := &BoolValue{}
+ if err := pv.Unmarshal(data); err != nil {
+ return err
+ }
+ *v = pv.Value
+ return nil
+}
+func NewPopulatedStdString(r randyWrappers, easy bool) *string {
+ v := NewPopulatedStringValue(r, easy)
+ return &v.Value
+}
+
+func SizeOfStdString(v string) int {
+ pv := &StringValue{Value: v}
+ return pv.Size()
+}
+
+func StdStringMarshal(v string) ([]byte, error) {
+ size := SizeOfStdString(v)
+ buf := make([]byte, size)
+ _, err := StdStringMarshalTo(v, buf)
+ return buf, err
+}
+
+func StdStringMarshalTo(v string, data []byte) (int, error) {
+ pv := &StringValue{Value: v}
+ return pv.MarshalTo(data)
+}
+
+func StdStringUnmarshal(v *string, data []byte) error {
+ pv := &StringValue{}
+ if err := pv.Unmarshal(data); err != nil {
+ return err
+ }
+ *v = pv.Value
+ return nil
+}
+func NewPopulatedStdBytes(r randyWrappers, easy bool) *[]byte {
+ v := NewPopulatedBytesValue(r, easy)
+ return &v.Value
+}
+
+func SizeOfStdBytes(v []byte) int {
+ pv := &BytesValue{Value: v}
+ return pv.Size()
+}
+
+func StdBytesMarshal(v []byte) ([]byte, error) {
+ size := SizeOfStdBytes(v)
+ buf := make([]byte, size)
+ _, err := StdBytesMarshalTo(v, buf)
+ return buf, err
+}
+
+func StdBytesMarshalTo(v []byte, data []byte) (int, error) {
+ pv := &BytesValue{Value: v}
+ return pv.MarshalTo(data)
+}
+
+func StdBytesUnmarshal(v *[]byte, data []byte) error {
+ pv := &BytesValue{}
+ if err := pv.Unmarshal(data); err != nil {
+ return err
+ }
+ *v = pv.Value
+ return nil
+}
diff --git a/vendor/github.com/gogo/protobuf/vanity/file.go b/vendor/github.com/gogo/protobuf/vanity/file.go
index e7b56de1f..2055c6615 100644
--- a/vendor/github.com/gogo/protobuf/vanity/file.go
+++ b/vendor/github.com/gogo/protobuf/vanity/file.go
@@ -172,6 +172,14 @@ func TurnOffGoUnrecognizedAll(file *descriptor.FileDescriptorProto) {
SetBoolFileOption(gogoproto.E_GoprotoUnrecognizedAll, false)(file)
}
+func TurnOffGoUnkeyedAll(file *descriptor.FileDescriptorProto) {
+ SetBoolFileOption(gogoproto.E_GoprotoUnkeyedAll, false)(file)
+}
+
+func TurnOffGoSizecacheAll(file *descriptor.FileDescriptorProto) {
+ SetBoolFileOption(gogoproto.E_GoprotoSizecacheAll, false)(file)
+}
+
func TurnOffGogoImport(file *descriptor.FileDescriptorProto) {
SetBoolFileOption(gogoproto.E_GogoprotoImport, false)(file)
}
@@ -179,3 +187,11 @@ func TurnOffGogoImport(file *descriptor.FileDescriptorProto) {
func TurnOnCompareAll(file *descriptor.FileDescriptorProto) {
SetBoolFileOption(gogoproto.E_CompareAll, true)(file)
}
+
+func TurnOnMessageNameAll(file *descriptor.FileDescriptorProto) {
+ SetBoolFileOption(gogoproto.E_MessagenameAll, true)(file)
+}
+
+func TurnOnGoRegistration(file *descriptor.FileDescriptorProto) {
+ SetBoolFileOption(gogoproto.E_GoprotoRegistration, true)(file)
+}
diff --git a/vendor/github.com/gogo/protobuf/vanity/msg.go b/vendor/github.com/gogo/protobuf/vanity/msg.go
index 7ff2b9879..390ff5ad4 100644
--- a/vendor/github.com/gogo/protobuf/vanity/msg.go
+++ b/vendor/github.com/gogo/protobuf/vanity/msg.go
@@ -137,6 +137,18 @@ func TurnOffGoUnrecognized(msg *descriptor.DescriptorProto) {
SetBoolMessageOption(gogoproto.E_GoprotoUnrecognized, false)(msg)
}
+func TurnOffGoUnkeyed(msg *descriptor.DescriptorProto) {
+ SetBoolMessageOption(gogoproto.E_GoprotoUnkeyed, false)(msg)
+}
+
+func TurnOffGoSizecache(msg *descriptor.DescriptorProto) {
+ SetBoolMessageOption(gogoproto.E_GoprotoSizecache, false)(msg)
+}
+
func TurnOnCompare(msg *descriptor.DescriptorProto) {
SetBoolMessageOption(gogoproto.E_Compare, true)(msg)
}
+
+func TurnOnMessageName(msg *descriptor.DescriptorProto) {
+ SetBoolMessageOption(gogoproto.E_Messagename, true)(msg)
+}
diff --git a/vendor/github.com/golang/protobuf/LICENSE b/vendor/github.com/golang/protobuf/LICENSE
index 1b1b1921e..0f646931a 100644
--- a/vendor/github.com/golang/protobuf/LICENSE
+++ b/vendor/github.com/golang/protobuf/LICENSE
@@ -1,7 +1,4 @@
-Go support for Protocol Buffers - Google's data interchange format
-
Copyright 2010 The Go Authors. All rights reserved.
-https://github.com/golang/protobuf
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
diff --git a/vendor/github.com/golang/protobuf/README.md b/vendor/github.com/golang/protobuf/README.md
index 01b29daf2..61820bed6 100644
--- a/vendor/github.com/golang/protobuf/README.md
+++ b/vendor/github.com/golang/protobuf/README.md
@@ -1,4 +1,4 @@
-# Go support for Protocol Buffers
+# Go support for Protocol Buffers - Google's data interchange format
[](https://travis-ci.org/golang/protobuf)
[](https://godoc.org/github.com/golang/protobuf)
@@ -83,15 +83,19 @@ be:
- Relative to the import path:
- protoc --go_out=. inputs/x.proto
- # writes ./github.com/golang/protobuf/p/x.pb.go
+```shell
+ protoc --go_out=. inputs/x.proto
+ # writes ./github.com/golang/protobuf/p/x.pb.go
+```
(This can work well with `--go_out=$GOPATH`.)
- Relative to the input file:
- protoc --go_out=paths=source_relative:. inputs/x.proto
- # generate ./inputs/x.pb.go
+```shell
+protoc --go_out=paths=source_relative:. inputs/x.proto
+# generate ./inputs/x.pb.go
+```
## Generated code ##
@@ -157,9 +161,6 @@ Consider file test.proto, containing
required string label = 1;
optional int32 type = 2 [default=77];
repeated int64 reps = 3;
- optional group OptionalGroup = 4 {
- required string RequiredField = 5;
- }
}
```
@@ -176,13 +177,10 @@ To create and play with a Test object from the example package,
)
func main() {
- test := &example.Test {
+ test := &example.Test{
Label: proto.String("hello"),
Type: proto.Int32(17),
Reps: []int64{1, 2, 3},
- Optionalgroup: &example.Test_OptionalGroup {
- RequiredField: proto.String("good bye"),
- },
}
data, err := proto.Marshal(test)
if err != nil {
diff --git a/vendor/github.com/golang/protobuf/proto/encode.go b/vendor/github.com/golang/protobuf/proto/encode.go
index c27d35f86..3abfed2cf 100644
--- a/vendor/github.com/golang/protobuf/proto/encode.go
+++ b/vendor/github.com/golang/protobuf/proto/encode.go
@@ -37,27 +37,9 @@ package proto
import (
"errors"
- "fmt"
"reflect"
)
-// RequiredNotSetError is the error returned if Marshal is called with
-// a protocol buffer struct whose required fields have not
-// all been initialized. It is also the error returned if Unmarshal is
-// called with an encoded protocol buffer that does not include all the
-// required fields.
-//
-// When printed, RequiredNotSetError reports the first unset required field in a
-// message. If the field cannot be precisely determined, it is reported as
-// "{Unknown}".
-type RequiredNotSetError struct {
- field string
-}
-
-func (e *RequiredNotSetError) Error() string {
- return fmt.Sprintf("proto: required field %q not set", e.field)
-}
-
var (
// errRepeatedHasNil is the error returned if Marshal is called with
// a struct with a repeated field containing a nil element.
diff --git a/vendor/github.com/golang/protobuf/proto/lib.go b/vendor/github.com/golang/protobuf/proto/lib.go
index 0e2191b8a..75565cc6d 100644
--- a/vendor/github.com/golang/protobuf/proto/lib.go
+++ b/vendor/github.com/golang/protobuf/proto/lib.go
@@ -265,7 +265,6 @@ package proto
import (
"encoding/json"
- "errors"
"fmt"
"log"
"reflect"
@@ -274,7 +273,66 @@ import (
"sync"
)
-var errInvalidUTF8 = errors.New("proto: invalid UTF-8 string")
+// RequiredNotSetError is an error type returned by either Marshal or Unmarshal.
+// Marshal reports this when a required field is not initialized.
+// Unmarshal reports this when a required field is missing from the wire data.
+type RequiredNotSetError struct{ field string }
+
+func (e *RequiredNotSetError) Error() string {
+ if e.field == "" {
+ return fmt.Sprintf("proto: required field not set")
+ }
+ return fmt.Sprintf("proto: required field %q not set", e.field)
+}
+func (e *RequiredNotSetError) RequiredNotSet() bool {
+ return true
+}
+
+type invalidUTF8Error struct{ field string }
+
+func (e *invalidUTF8Error) Error() string {
+ if e.field == "" {
+ return "proto: invalid UTF-8 detected"
+ }
+ return fmt.Sprintf("proto: field %q contains invalid UTF-8", e.field)
+}
+func (e *invalidUTF8Error) InvalidUTF8() bool {
+ return true
+}
+
+// errInvalidUTF8 is a sentinel error to identify fields with invalid UTF-8.
+// This error should not be exposed to the external API as such errors should
+// be recreated with the field information.
+var errInvalidUTF8 = &invalidUTF8Error{}
+
+// isNonFatal reports whether the error is either a RequiredNotSet error
+// or a InvalidUTF8 error.
+func isNonFatal(err error) bool {
+ if re, ok := err.(interface{ RequiredNotSet() bool }); ok && re.RequiredNotSet() {
+ return true
+ }
+ if re, ok := err.(interface{ InvalidUTF8() bool }); ok && re.InvalidUTF8() {
+ return true
+ }
+ return false
+}
+
+type nonFatal struct{ E error }
+
+// Merge merges err into nf and reports whether it was successful.
+// Otherwise it returns false for any fatal non-nil errors.
+func (nf *nonFatal) Merge(err error) (ok bool) {
+ if err == nil {
+ return true // not an error
+ }
+ if !isNonFatal(err) {
+ return false // fatal error
+ }
+ if nf.E == nil {
+ nf.E = err // store first instance of non-fatal error
+ }
+ return true
+}
// Message is implemented by generated protocol buffer messages.
type Message interface {
diff --git a/vendor/github.com/golang/protobuf/proto/properties.go b/vendor/github.com/golang/protobuf/proto/properties.go
index f710adab0..50b99b83a 100644
--- a/vendor/github.com/golang/protobuf/proto/properties.go
+++ b/vendor/github.com/golang/protobuf/proto/properties.go
@@ -139,7 +139,7 @@ type Properties struct {
Repeated bool
Packed bool // relevant for repeated primitives only
Enum string // set for enum types only
- proto3 bool // whether this is known to be a proto3 field; set for []byte only
+ proto3 bool // whether this is known to be a proto3 field
oneof bool // whether this is a oneof field
Default string // default value
@@ -148,9 +148,9 @@ type Properties struct {
stype reflect.Type // set for struct types only
sprop *StructProperties // set for struct types only
- mtype reflect.Type // set for map types only
- mkeyprop *Properties // set for map types only
- mvalprop *Properties // set for map types only
+ mtype reflect.Type // set for map types only
+ MapKeyProp *Properties // set for map types only
+ MapValProp *Properties // set for map types only
}
// String formats the properties in the protobuf struct field tag style.
@@ -275,16 +275,16 @@ func (p *Properties) setFieldProps(typ reflect.Type, f *reflect.StructField, loc
case reflect.Map:
p.mtype = t1
- p.mkeyprop = &Properties{}
- p.mkeyprop.init(reflect.PtrTo(p.mtype.Key()), "Key", f.Tag.Get("protobuf_key"), nil, lockGetProp)
- p.mvalprop = &Properties{}
+ p.MapKeyProp = &Properties{}
+ p.MapKeyProp.init(reflect.PtrTo(p.mtype.Key()), "Key", f.Tag.Get("protobuf_key"), nil, lockGetProp)
+ p.MapValProp = &Properties{}
vtype := p.mtype.Elem()
if vtype.Kind() != reflect.Ptr && vtype.Kind() != reflect.Slice {
// The value type is not a message (*T) or bytes ([]byte),
// so we need encoders for the pointer to this type.
vtype = reflect.PtrTo(vtype)
}
- p.mvalprop.init(vtype, "Value", f.Tag.Get("protobuf_val"), nil, lockGetProp)
+ p.MapValProp.init(vtype, "Value", f.Tag.Get("protobuf_val"), nil, lockGetProp)
}
if p.stype != nil {
diff --git a/vendor/github.com/golang/protobuf/proto/table_marshal.go b/vendor/github.com/golang/protobuf/proto/table_marshal.go
index 0f212b302..b16794496 100644
--- a/vendor/github.com/golang/protobuf/proto/table_marshal.go
+++ b/vendor/github.com/golang/protobuf/proto/table_marshal.go
@@ -231,7 +231,7 @@ func (u *marshalInfo) marshal(b []byte, ptr pointer, deterministic bool) ([]byte
return b, err
}
- var err, errreq error
+ var err, errLater error
// The old marshaler encodes extensions at beginning.
if u.extensions.IsValid() {
e := ptr.offset(u.extensions).toExtensions()
@@ -252,11 +252,13 @@ func (u *marshalInfo) marshal(b []byte, ptr pointer, deterministic bool) ([]byte
}
}
for _, f := range u.fields {
- if f.required && errreq == nil {
+ if f.required {
if ptr.offset(f.field).getPointer().isNil() {
// Required field is not set.
// We record the error but keep going, to give a complete marshaling.
- errreq = &RequiredNotSetError{f.name}
+ if errLater == nil {
+ errLater = &RequiredNotSetError{f.name}
+ }
continue
}
}
@@ -269,14 +271,21 @@ func (u *marshalInfo) marshal(b []byte, ptr pointer, deterministic bool) ([]byte
if err1, ok := err.(*RequiredNotSetError); ok {
// Required field in submessage is not set.
// We record the error but keep going, to give a complete marshaling.
- if errreq == nil {
- errreq = &RequiredNotSetError{f.name + "." + err1.field}
+ if errLater == nil {
+ errLater = &RequiredNotSetError{f.name + "." + err1.field}
}
continue
}
if err == errRepeatedHasNil {
err = errors.New("proto: repeated field " + f.name + " has nil element")
}
+ if err == errInvalidUTF8 {
+ if errLater == nil {
+ fullName := revProtoTypes[reflect.PtrTo(u.typ)] + "." + f.name
+ errLater = &invalidUTF8Error{fullName}
+ }
+ continue
+ }
return b, err
}
}
@@ -284,7 +293,7 @@ func (u *marshalInfo) marshal(b []byte, ptr pointer, deterministic bool) ([]byte
s := *ptr.offset(u.unrecognized).toBytes()
b = append(b, s...)
}
- return b, errreq
+ return b, errLater
}
// computeMarshalInfo initializes the marshal info.
@@ -530,6 +539,7 @@ func typeMarshaler(t reflect.Type, tags []string, nozero, oneof bool) (sizer, ma
packed := false
proto3 := false
+ validateUTF8 := true
for i := 2; i < len(tags); i++ {
if tags[i] == "packed" {
packed = true
@@ -538,6 +548,7 @@ func typeMarshaler(t reflect.Type, tags []string, nozero, oneof bool) (sizer, ma
proto3 = true
}
}
+ validateUTF8 = validateUTF8 && proto3
switch t.Kind() {
case reflect.Bool:
@@ -735,6 +746,18 @@ func typeMarshaler(t reflect.Type, tags []string, nozero, oneof bool) (sizer, ma
}
return sizeFloat64Value, appendFloat64Value
case reflect.String:
+ if validateUTF8 {
+ if pointer {
+ return sizeStringPtr, appendUTF8StringPtr
+ }
+ if slice {
+ return sizeStringSlice, appendUTF8StringSlice
+ }
+ if nozero {
+ return sizeStringValueNoZero, appendUTF8StringValueNoZero
+ }
+ return sizeStringValue, appendUTF8StringValue
+ }
if pointer {
return sizeStringPtr, appendStringPtr
}
@@ -1984,9 +2007,6 @@ func appendBoolPackedSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byt
}
func appendStringValue(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
v := *ptr.toString()
- if !utf8.ValidString(v) {
- return nil, errInvalidUTF8
- }
b = appendVarint(b, wiretag)
b = appendVarint(b, uint64(len(v)))
b = append(b, v...)
@@ -1997,9 +2017,6 @@ func appendStringValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]b
if v == "" {
return b, nil
}
- if !utf8.ValidString(v) {
- return nil, errInvalidUTF8
- }
b = appendVarint(b, wiretag)
b = appendVarint(b, uint64(len(v)))
b = append(b, v...)
@@ -2011,24 +2028,83 @@ func appendStringPtr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, err
return b, nil
}
v := *p
- if !utf8.ValidString(v) {
- return nil, errInvalidUTF8
- }
b = appendVarint(b, wiretag)
b = appendVarint(b, uint64(len(v)))
b = append(b, v...)
return b, nil
}
func appendStringSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ s := *ptr.toStringSlice()
+ for _, v := range s {
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, uint64(len(v)))
+ b = append(b, v...)
+ }
+ return b, nil
+}
+func appendUTF8StringValue(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ var invalidUTF8 bool
+ v := *ptr.toString()
+ if !utf8.ValidString(v) {
+ invalidUTF8 = true
+ }
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, uint64(len(v)))
+ b = append(b, v...)
+ if invalidUTF8 {
+ return b, errInvalidUTF8
+ }
+ return b, nil
+}
+func appendUTF8StringValueNoZero(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ var invalidUTF8 bool
+ v := *ptr.toString()
+ if v == "" {
+ return b, nil
+ }
+ if !utf8.ValidString(v) {
+ invalidUTF8 = true
+ }
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, uint64(len(v)))
+ b = append(b, v...)
+ if invalidUTF8 {
+ return b, errInvalidUTF8
+ }
+ return b, nil
+}
+func appendUTF8StringPtr(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ var invalidUTF8 bool
+ p := *ptr.toStringPtr()
+ if p == nil {
+ return b, nil
+ }
+ v := *p
+ if !utf8.ValidString(v) {
+ invalidUTF8 = true
+ }
+ b = appendVarint(b, wiretag)
+ b = appendVarint(b, uint64(len(v)))
+ b = append(b, v...)
+ if invalidUTF8 {
+ return b, errInvalidUTF8
+ }
+ return b, nil
+}
+func appendUTF8StringSlice(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
+ var invalidUTF8 bool
s := *ptr.toStringSlice()
for _, v := range s {
if !utf8.ValidString(v) {
- return nil, errInvalidUTF8
+ invalidUTF8 = true
}
b = appendVarint(b, wiretag)
b = appendVarint(b, uint64(len(v)))
b = append(b, v...)
}
+ if invalidUTF8 {
+ return b, errInvalidUTF8
+ }
return b, nil
}
func appendBytes(b []byte, ptr pointer, wiretag uint64, _ bool) ([]byte, error) {
@@ -2107,7 +2183,8 @@ func makeGroupSliceMarshaler(u *marshalInfo) (sizer, marshaler) {
},
func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) {
s := ptr.getPointerSlice()
- var err, errreq error
+ var err error
+ var nerr nonFatal
for _, v := range s {
if v.isNil() {
return b, errRepeatedHasNil
@@ -2115,22 +2192,14 @@ func makeGroupSliceMarshaler(u *marshalInfo) (sizer, marshaler) {
b = appendVarint(b, wiretag) // start group
b, err = u.marshal(b, v, deterministic)
b = appendVarint(b, wiretag+(WireEndGroup-WireStartGroup)) // end group
- if err != nil {
- if _, ok := err.(*RequiredNotSetError); ok {
- // Required field in submessage is not set.
- // We record the error but keep going, to give a complete marshaling.
- if errreq == nil {
- errreq = err
- }
- continue
- }
+ if !nerr.Merge(err) {
if err == ErrNil {
err = errRepeatedHasNil
}
return b, err
}
}
- return b, errreq
+ return b, nerr.E
}
}
@@ -2174,7 +2243,8 @@ func makeMessageSliceMarshaler(u *marshalInfo) (sizer, marshaler) {
},
func(b []byte, ptr pointer, wiretag uint64, deterministic bool) ([]byte, error) {
s := ptr.getPointerSlice()
- var err, errreq error
+ var err error
+ var nerr nonFatal
for _, v := range s {
if v.isNil() {
return b, errRepeatedHasNil
@@ -2184,22 +2254,14 @@ func makeMessageSliceMarshaler(u *marshalInfo) (sizer, marshaler) {
b = appendVarint(b, uint64(siz))
b, err = u.marshal(b, v, deterministic)
- if err != nil {
- if _, ok := err.(*RequiredNotSetError); ok {
- // Required field in submessage is not set.
- // We record the error but keep going, to give a complete marshaling.
- if errreq == nil {
- errreq = err
- }
- continue
- }
+ if !nerr.Merge(err) {
if err == ErrNil {
err = errRepeatedHasNil
}
return b, err
}
}
- return b, errreq
+ return b, nerr.E
}
}
@@ -2223,6 +2285,25 @@ func makeMapMarshaler(f *reflect.StructField) (sizer, marshaler) {
// value.
// Key cannot be pointer-typed.
valIsPtr := valType.Kind() == reflect.Ptr
+
+ // If value is a message with nested maps, calling
+ // valSizer in marshal may be quadratic. We should use
+ // cached version in marshal (but not in size).
+ // If value is not message type, we don't have size cache,
+ // but it cannot be nested either. Just use valSizer.
+ valCachedSizer := valSizer
+ if valIsPtr && valType.Elem().Kind() == reflect.Struct {
+ u := getMarshalInfo(valType.Elem())
+ valCachedSizer = func(ptr pointer, tagsize int) int {
+ // Same as message sizer, but use cache.
+ p := ptr.getPointer()
+ if p.isNil() {
+ return 0
+ }
+ siz := u.cachedsize(p)
+ return siz + SizeVarint(uint64(siz)) + tagsize
+ }
+ }
return func(ptr pointer, tagsize int) int {
m := ptr.asPointerTo(t).Elem() // the map
n := 0
@@ -2243,24 +2324,26 @@ func makeMapMarshaler(f *reflect.StructField) (sizer, marshaler) {
if len(keys) > 1 && deterministic {
sort.Sort(mapKeys(keys))
}
+
+ var nerr nonFatal
for _, k := range keys {
ki := k.Interface()
vi := m.MapIndex(k).Interface()
kaddr := toAddrPointer(&ki, false) // pointer to key
vaddr := toAddrPointer(&vi, valIsPtr) // pointer to value
b = appendVarint(b, tag)
- siz := keySizer(kaddr, 1) + valSizer(vaddr, 1) // tag of key = 1 (size=1), tag of val = 2 (size=1)
+ siz := keySizer(kaddr, 1) + valCachedSizer(vaddr, 1) // tag of key = 1 (size=1), tag of val = 2 (size=1)
b = appendVarint(b, uint64(siz))
b, err = keyMarshaler(b, kaddr, keyWireTag, deterministic)
- if err != nil {
+ if !nerr.Merge(err) {
return b, err
}
b, err = valMarshaler(b, vaddr, valWireTag, deterministic)
- if err != nil && err != ErrNil { // allow nil value in map
+ if err != ErrNil && !nerr.Merge(err) { // allow nil value in map
return b, err
}
}
- return b, nil
+ return b, nerr.E
}
}
@@ -2333,6 +2416,7 @@ func (u *marshalInfo) appendExtensions(b []byte, ext *XXX_InternalExtensions, de
defer mu.Unlock()
var err error
+ var nerr nonFatal
// Fast-path for common cases: zero or one extensions.
// Don't bother sorting the keys.
@@ -2352,11 +2436,11 @@ func (u *marshalInfo) appendExtensions(b []byte, ext *XXX_InternalExtensions, de
v := e.value
p := toAddrPointer(&v, ei.isptr)
b, err = ei.marshaler(b, p, ei.wiretag, deterministic)
- if err != nil {
+ if !nerr.Merge(err) {
return b, err
}
}
- return b, nil
+ return b, nerr.E
}
// Sort the keys to provide a deterministic encoding.
@@ -2383,11 +2467,11 @@ func (u *marshalInfo) appendExtensions(b []byte, ext *XXX_InternalExtensions, de
v := e.value
p := toAddrPointer(&v, ei.isptr)
b, err = ei.marshaler(b, p, ei.wiretag, deterministic)
- if err != nil {
+ if !nerr.Merge(err) {
return b, err
}
}
- return b, nil
+ return b, nerr.E
}
// message set format is:
@@ -2444,6 +2528,7 @@ func (u *marshalInfo) appendMessageSet(b []byte, ext *XXX_InternalExtensions, de
defer mu.Unlock()
var err error
+ var nerr nonFatal
// Fast-path for common cases: zero or one extensions.
// Don't bother sorting the keys.
@@ -2470,12 +2555,12 @@ func (u *marshalInfo) appendMessageSet(b []byte, ext *XXX_InternalExtensions, de
v := e.value
p := toAddrPointer(&v, ei.isptr)
b, err = ei.marshaler(b, p, 3<<3|WireBytes, deterministic)
- if err != nil {
+ if !nerr.Merge(err) {
return b, err
}
b = append(b, 1<<3|WireEndGroup)
}
- return b, nil
+ return b, nerr.E
}
// Sort the keys to provide a deterministic encoding.
@@ -2509,11 +2594,11 @@ func (u *marshalInfo) appendMessageSet(b []byte, ext *XXX_InternalExtensions, de
p := toAddrPointer(&v, ei.isptr)
b, err = ei.marshaler(b, p, 3<<3|WireBytes, deterministic)
b = append(b, 1<<3|WireEndGroup)
- if err != nil {
+ if !nerr.Merge(err) {
return b, err
}
}
- return b, nil
+ return b, nerr.E
}
// sizeV1Extensions computes the size of encoded data for a V1-API extension field.
@@ -2556,6 +2641,7 @@ func (u *marshalInfo) appendV1Extensions(b []byte, m map[int32]Extension, determ
sort.Ints(keys)
var err error
+ var nerr nonFatal
for _, k := range keys {
e := m[int32(k)]
if e.value == nil || e.desc == nil {
@@ -2572,11 +2658,11 @@ func (u *marshalInfo) appendV1Extensions(b []byte, m map[int32]Extension, determ
v := e.value
p := toAddrPointer(&v, ei.isptr)
b, err = ei.marshaler(b, p, ei.wiretag, deterministic)
- if err != nil {
+ if !nerr.Merge(err) {
return b, err
}
}
- return b, nil
+ return b, nerr.E
}
// newMarshaler is the interface representing objects that can marshal themselves.
diff --git a/vendor/github.com/golang/protobuf/proto/table_unmarshal.go b/vendor/github.com/golang/protobuf/proto/table_unmarshal.go
index 55f0340a3..ebf1caa56 100644
--- a/vendor/github.com/golang/protobuf/proto/table_unmarshal.go
+++ b/vendor/github.com/golang/protobuf/proto/table_unmarshal.go
@@ -97,6 +97,8 @@ type unmarshalFieldInfo struct {
// if a required field, contains a single set bit at this field's index in the required field list.
reqMask uint64
+
+ name string // name of the field, for error reporting
}
var (
@@ -136,8 +138,8 @@ func (u *unmarshalInfo) unmarshal(m pointer, b []byte) error {
if u.isMessageSet {
return UnmarshalMessageSet(b, m.offset(u.extensions).toExtensions())
}
- var reqMask uint64 // bitmask of required fields we've seen.
- var rnse *RequiredNotSetError // an instance of a RequiredNotSetError returned by a submessage.
+ var reqMask uint64 // bitmask of required fields we've seen.
+ var errLater error
for len(b) > 0 {
// Read tag and wire type.
// Special case 1 and 2 byte varints.
@@ -176,11 +178,20 @@ func (u *unmarshalInfo) unmarshal(m pointer, b []byte) error {
if r, ok := err.(*RequiredNotSetError); ok {
// Remember this error, but keep parsing. We need to produce
// a full parse even if a required field is missing.
- rnse = r
+ if errLater == nil {
+ errLater = r
+ }
reqMask |= f.reqMask
continue
}
if err != errInternalBadWireType {
+ if err == errInvalidUTF8 {
+ if errLater == nil {
+ fullName := revProtoTypes[reflect.PtrTo(u.typ)] + "." + f.name
+ errLater = &invalidUTF8Error{fullName}
+ }
+ continue
+ }
return err
}
// Fragments with bad wire type are treated as unknown fields.
@@ -239,20 +250,16 @@ func (u *unmarshalInfo) unmarshal(m pointer, b []byte) error {
emap[int32(tag)] = e
}
}
- if rnse != nil {
- // A required field of a submessage/group is missing. Return that error.
- return rnse
- }
- if reqMask != u.reqMask {
+ if reqMask != u.reqMask && errLater == nil {
// A required field of this message is missing.
for _, n := range u.reqFields {
if reqMask&1 == 0 {
- return &RequiredNotSetError{n}
+ errLater = &RequiredNotSetError{n}
}
reqMask >>= 1
}
}
- return nil
+ return errLater
}
// computeUnmarshalInfo fills in u with information for use
@@ -351,7 +358,7 @@ func (u *unmarshalInfo) computeUnmarshalInfo() {
}
// Store the info in the correct slot in the message.
- u.setTag(tag, toField(&f), unmarshal, reqMask)
+ u.setTag(tag, toField(&f), unmarshal, reqMask, name)
}
// Find any types associated with oneof fields.
@@ -366,10 +373,17 @@ func (u *unmarshalInfo) computeUnmarshalInfo() {
f := typ.Field(0) // oneof implementers have one field
baseUnmarshal := fieldUnmarshaler(&f)
- tagstr := strings.Split(f.Tag.Get("protobuf"), ",")[1]
- tag, err := strconv.Atoi(tagstr)
+ tags := strings.Split(f.Tag.Get("protobuf"), ",")
+ fieldNum, err := strconv.Atoi(tags[1])
if err != nil {
- panic("protobuf tag field not an integer: " + tagstr)
+ panic("protobuf tag field not an integer: " + tags[1])
+ }
+ var name string
+ for _, tag := range tags {
+ if strings.HasPrefix(tag, "name=") {
+ name = strings.TrimPrefix(tag, "name=")
+ break
+ }
}
// Find the oneof field that this struct implements.
@@ -380,7 +394,7 @@ func (u *unmarshalInfo) computeUnmarshalInfo() {
// That lets us know where this struct should be stored
// when we encounter it during unmarshaling.
unmarshal := makeUnmarshalOneof(typ, of.ityp, baseUnmarshal)
- u.setTag(tag, of.field, unmarshal, 0)
+ u.setTag(fieldNum, of.field, unmarshal, 0, name)
}
}
}
@@ -401,7 +415,7 @@ func (u *unmarshalInfo) computeUnmarshalInfo() {
// [0 0] is [tag=0/wiretype=varint varint-encoded-0].
u.setTag(0, zeroField, func(b []byte, f pointer, w int) ([]byte, error) {
return nil, fmt.Errorf("proto: %s: illegal tag 0 (wire type %d)", t, w)
- }, 0)
+ }, 0, "")
// Set mask for required field check.
u.reqMask = uint64(1)<= 0 && (tag < 16 || tag < 2*n) { // TODO: what are the right numbers here?
for len(u.dense) <= tag {
@@ -442,11 +457,17 @@ func typeUnmarshaler(t reflect.Type, tags string) unmarshaler {
tagArray := strings.Split(tags, ",")
encoding := tagArray[0]
name := "unknown"
+ proto3 := false
+ validateUTF8 := true
for _, tag := range tagArray[3:] {
if strings.HasPrefix(tag, "name=") {
name = tag[5:]
}
+ if tag == "proto3" {
+ proto3 = true
+ }
}
+ validateUTF8 = validateUTF8 && proto3
// Figure out packaging (pointer, slice, or both)
slice := false
@@ -594,6 +615,15 @@ func typeUnmarshaler(t reflect.Type, tags string) unmarshaler {
}
return unmarshalBytesValue
case reflect.String:
+ if validateUTF8 {
+ if pointer {
+ return unmarshalUTF8StringPtr
+ }
+ if slice {
+ return unmarshalUTF8StringSlice
+ }
+ return unmarshalUTF8StringValue
+ }
if pointer {
return unmarshalStringPtr
}
@@ -1448,9 +1478,6 @@ func unmarshalStringValue(b []byte, f pointer, w int) ([]byte, error) {
return nil, io.ErrUnexpectedEOF
}
v := string(b[:x])
- if !utf8.ValidString(v) {
- return nil, errInvalidUTF8
- }
*f.toString() = v
return b[x:], nil
}
@@ -1468,9 +1495,6 @@ func unmarshalStringPtr(b []byte, f pointer, w int) ([]byte, error) {
return nil, io.ErrUnexpectedEOF
}
v := string(b[:x])
- if !utf8.ValidString(v) {
- return nil, errInvalidUTF8
- }
*f.toStringPtr() = &v
return b[x:], nil
}
@@ -1488,14 +1512,72 @@ func unmarshalStringSlice(b []byte, f pointer, w int) ([]byte, error) {
return nil, io.ErrUnexpectedEOF
}
v := string(b[:x])
- if !utf8.ValidString(v) {
- return nil, errInvalidUTF8
- }
s := f.toStringSlice()
*s = append(*s, v)
return b[x:], nil
}
+func unmarshalUTF8StringValue(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireBytes {
+ return b, errInternalBadWireType
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ if x > uint64(len(b)) {
+ return nil, io.ErrUnexpectedEOF
+ }
+ v := string(b[:x])
+ *f.toString() = v
+ if !utf8.ValidString(v) {
+ return b[x:], errInvalidUTF8
+ }
+ return b[x:], nil
+}
+
+func unmarshalUTF8StringPtr(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireBytes {
+ return b, errInternalBadWireType
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ if x > uint64(len(b)) {
+ return nil, io.ErrUnexpectedEOF
+ }
+ v := string(b[:x])
+ *f.toStringPtr() = &v
+ if !utf8.ValidString(v) {
+ return b[x:], errInvalidUTF8
+ }
+ return b[x:], nil
+}
+
+func unmarshalUTF8StringSlice(b []byte, f pointer, w int) ([]byte, error) {
+ if w != WireBytes {
+ return b, errInternalBadWireType
+ }
+ x, n := decodeVarint(b)
+ if n == 0 {
+ return nil, io.ErrUnexpectedEOF
+ }
+ b = b[n:]
+ if x > uint64(len(b)) {
+ return nil, io.ErrUnexpectedEOF
+ }
+ v := string(b[:x])
+ s := f.toStringSlice()
+ *s = append(*s, v)
+ if !utf8.ValidString(v) {
+ return b[x:], errInvalidUTF8
+ }
+ return b[x:], nil
+}
+
var emptyBuf [0]byte
func unmarshalBytesValue(b []byte, f pointer, w int) ([]byte, error) {
@@ -1674,6 +1756,7 @@ func makeUnmarshalMap(f *reflect.StructField) unmarshaler {
// Maps will be somewhat slow. Oh well.
// Read key and value from data.
+ var nerr nonFatal
k := reflect.New(kt)
v := reflect.New(vt)
for len(b) > 0 {
@@ -1694,7 +1777,7 @@ func makeUnmarshalMap(f *reflect.StructField) unmarshaler {
err = errInternalBadWireType // skip unknown tag
}
- if err == nil {
+ if nerr.Merge(err) {
continue
}
if err != errInternalBadWireType {
@@ -1717,7 +1800,7 @@ func makeUnmarshalMap(f *reflect.StructField) unmarshaler {
// Insert into map.
m.SetMapIndex(k.Elem(), v.Elem())
- return r, nil
+ return r, nerr.E
}
}
@@ -1743,15 +1826,16 @@ func makeUnmarshalOneof(typ, ityp reflect.Type, unmarshal unmarshaler) unmarshal
// Unmarshal data into holder.
// We unmarshal into the first field of the holder object.
var err error
+ var nerr nonFatal
b, err = unmarshal(b, valToPointer(v).offset(field0), w)
- if err != nil {
+ if !nerr.Merge(err) {
return nil, err
}
// Write pointer to holder into target field.
f.asPointerTo(ityp).Elem().Set(v)
- return b, nil
+ return b, nerr.E
}
}
diff --git a/vendor/github.com/golang/protobuf/proto/text.go b/vendor/github.com/golang/protobuf/proto/text.go
index 2205fdaad..1aaee725b 100644
--- a/vendor/github.com/golang/protobuf/proto/text.go
+++ b/vendor/github.com/golang/protobuf/proto/text.go
@@ -353,7 +353,7 @@ func (tm *TextMarshaler) writeStruct(w *textWriter, sv reflect.Value) error {
return err
}
}
- if err := tm.writeAny(w, key, props.mkeyprop); err != nil {
+ if err := tm.writeAny(w, key, props.MapKeyProp); err != nil {
return err
}
if err := w.WriteByte('\n'); err != nil {
@@ -370,7 +370,7 @@ func (tm *TextMarshaler) writeStruct(w *textWriter, sv reflect.Value) error {
return err
}
}
- if err := tm.writeAny(w, val, props.mvalprop); err != nil {
+ if err := tm.writeAny(w, val, props.MapValProp); err != nil {
return err
}
if err := w.WriteByte('\n'); err != nil {
diff --git a/vendor/github.com/golang/protobuf/proto/text_parser.go b/vendor/github.com/golang/protobuf/proto/text_parser.go
index 0685bae36..bb55a3af2 100644
--- a/vendor/github.com/golang/protobuf/proto/text_parser.go
+++ b/vendor/github.com/golang/protobuf/proto/text_parser.go
@@ -630,17 +630,17 @@ func (p *textParser) readStruct(sv reflect.Value, terminator string) error {
if err := p.consumeToken(":"); err != nil {
return err
}
- if err := p.readAny(key, props.mkeyprop); err != nil {
+ if err := p.readAny(key, props.MapKeyProp); err != nil {
return err
}
if err := p.consumeOptionalSeparator(); err != nil {
return err
}
case "value":
- if err := p.checkForColon(props.mvalprop, dst.Type().Elem()); err != nil {
+ if err := p.checkForColon(props.MapValProp, dst.Type().Elem()); err != nil {
return err
}
- if err := p.readAny(val, props.mvalprop); err != nil {
+ if err := p.readAny(val, props.MapValProp); err != nil {
return err
}
if err := p.consumeOptionalSeparator(); err != nil {
diff --git a/vendor/github.com/golang/protobuf/ptypes/any.go b/vendor/github.com/golang/protobuf/ptypes/any.go
index b2af97f4a..70276e8f5 100644
--- a/vendor/github.com/golang/protobuf/ptypes/any.go
+++ b/vendor/github.com/golang/protobuf/ptypes/any.go
@@ -130,10 +130,12 @@ func UnmarshalAny(any *any.Any, pb proto.Message) error {
// Is returns true if any value contains a given message type.
func Is(any *any.Any, pb proto.Message) bool {
- aname, err := AnyMessageName(any)
- if err != nil {
+ // The following is equivalent to AnyMessageName(any) == proto.MessageName(pb),
+ // but it avoids scanning TypeUrl for the slash.
+ if any == nil {
return false
}
-
- return aname == proto.MessageName(pb)
+ name := proto.MessageName(pb)
+ prefix := len(any.TypeUrl) - len(name)
+ return prefix >= 1 && any.TypeUrl[prefix-1] == '/' && any.TypeUrl[prefix:] == name
}
diff --git a/vendor/github.com/golang/protobuf/ptypes/any/any.pb.go b/vendor/github.com/golang/protobuf/ptypes/any/any.pb.go
index f67edc7dc..e3c56d3ff 100644
--- a/vendor/github.com/golang/protobuf/ptypes/any/any.pb.go
+++ b/vendor/github.com/golang/protobuf/ptypes/any/any.pb.go
@@ -121,7 +121,7 @@ type Any struct {
// Schemes other than `http`, `https` (or the empty scheme) might be
// used with implementation specific semantics.
//
- TypeUrl string `protobuf:"bytes,1,opt,name=type_url,json=typeUrl" json:"type_url,omitempty"`
+ TypeUrl string `protobuf:"bytes,1,opt,name=type_url,json=typeUrl,proto3" json:"type_url,omitempty"`
// Must be a valid serialized protocol buffer of the above specified type.
Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
diff --git a/vendor/github.com/golang/protobuf/ptypes/duration/duration.pb.go b/vendor/github.com/golang/protobuf/ptypes/duration/duration.pb.go
index 4d75473b8..a7beb2c41 100644
--- a/vendor/github.com/golang/protobuf/ptypes/duration/duration.pb.go
+++ b/vendor/github.com/golang/protobuf/ptypes/duration/duration.pb.go
@@ -82,14 +82,14 @@ type Duration struct {
// Signed seconds of the span of time. Must be from -315,576,000,000
// to +315,576,000,000 inclusive. Note: these bounds are computed from:
// 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
- Seconds int64 `protobuf:"varint,1,opt,name=seconds" json:"seconds,omitempty"`
+ Seconds int64 `protobuf:"varint,1,opt,name=seconds,proto3" json:"seconds,omitempty"`
// Signed fractions of a second at nanosecond resolution of the span
// of time. Durations less than one second are represented with a 0
// `seconds` field and a positive or negative `nanos` field. For durations
// of one second or more, a non-zero value for the `nanos` field must be
// of the same sign as the `seconds` field. Must be from -999,999,999
// to +999,999,999 inclusive.
- Nanos int32 `protobuf:"varint,2,opt,name=nanos" json:"nanos,omitempty"`
+ Nanos int32 `protobuf:"varint,2,opt,name=nanos,proto3" json:"nanos,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
diff --git a/vendor/github.com/golang/protobuf/ptypes/timestamp/timestamp.pb.go b/vendor/github.com/golang/protobuf/ptypes/timestamp/timestamp.pb.go
index e9c222282..8e76ae976 100644
--- a/vendor/github.com/golang/protobuf/ptypes/timestamp/timestamp.pb.go
+++ b/vendor/github.com/golang/protobuf/ptypes/timestamp/timestamp.pb.go
@@ -100,12 +100,12 @@ type Timestamp struct {
// Represents seconds of UTC time since Unix epoch
// 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
// 9999-12-31T23:59:59Z inclusive.
- Seconds int64 `protobuf:"varint,1,opt,name=seconds" json:"seconds,omitempty"`
+ Seconds int64 `protobuf:"varint,1,opt,name=seconds,proto3" json:"seconds,omitempty"`
// Non-negative fractions of a second at nanosecond resolution. Negative
// second values with fractions must still have non-negative nanos values
// that count forward in time. Must be from 0 to 999,999,999
// inclusive.
- Nanos int32 `protobuf:"varint,2,opt,name=nanos" json:"nanos,omitempty"`
+ Nanos int32 `protobuf:"varint,2,opt,name=nanos,proto3" json:"nanos,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
diff --git a/windows/hcsshimtypes/hcsshim.pb.go b/windows/hcsshimtypes/hcsshim.pb.go
index 827bb6b29..ca9d54060 100644
--- a/windows/hcsshimtypes/hcsshim.pb.go
+++ b/windows/hcsshimtypes/hcsshim.pb.go
@@ -1,34 +1,19 @@
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: github.com/containerd/containerd/windows/hcsshimtypes/hcsshim.proto
-/*
- Package hcsshimtypes is a generated protocol buffer package.
-
- It is generated from these files:
- github.com/containerd/containerd/windows/hcsshimtypes/hcsshim.proto
-
- It has these top-level messages:
- CreateOptions
- ProcessDetails
-*/
package hcsshimtypes
-import proto "github.com/gogo/protobuf/proto"
-import fmt "fmt"
-import math "math"
-
-// skipping weak import gogoproto "github.com/gogo/protobuf/gogoproto"
-import _ "github.com/gogo/protobuf/types"
-import _ "github.com/gogo/protobuf/types"
-
-import time "time"
-
-import types "github.com/gogo/protobuf/types"
-
-import strings "strings"
-import reflect "reflect"
-
-import io "io"
+import (
+ fmt "fmt"
+ proto "github.com/gogo/protobuf/proto"
+ _ "github.com/gogo/protobuf/types"
+ github_com_gogo_protobuf_types "github.com/gogo/protobuf/types"
+ io "io"
+ math "math"
+ reflect "reflect"
+ strings "strings"
+ time "time"
+)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
@@ -43,18 +28,49 @@ var _ = time.Kitchen
const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
type CreateOptions struct {
- TerminateDuration time.Duration `protobuf:"bytes,1,opt,name=terminate_duration,json=terminateDuration,stdduration" json:"terminate_duration"`
+ TerminateDuration time.Duration `protobuf:"bytes,1,opt,name=terminate_duration,json=terminateDuration,proto3,stdduration" json:"terminate_duration"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *CreateOptions) Reset() { *m = CreateOptions{} }
-func (*CreateOptions) ProtoMessage() {}
-func (*CreateOptions) Descriptor() ([]byte, []int) { return fileDescriptorHcsshim, []int{0} }
+func (m *CreateOptions) Reset() { *m = CreateOptions{} }
+func (*CreateOptions) ProtoMessage() {}
+func (*CreateOptions) Descriptor() ([]byte, []int) {
+ return fileDescriptor_7d909fc5b35cb1de, []int{0}
+}
+func (m *CreateOptions) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *CreateOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_CreateOptions.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *CreateOptions) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_CreateOptions.Merge(m, src)
+}
+func (m *CreateOptions) XXX_Size() int {
+ return m.Size()
+}
+func (m *CreateOptions) XXX_DiscardUnknown() {
+ xxx_messageInfo_CreateOptions.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_CreateOptions proto.InternalMessageInfo
// ProcessDetails contains additional information about a process
// ProcessDetails is made of the same fields as found in hcsshim.ProcessListItem
type ProcessDetails struct {
ImageName string `protobuf:"bytes,1,opt,name=image_name,json=imageName,proto3" json:"image_name,omitempty"`
- CreatedAt time.Time `protobuf:"bytes,2,opt,name=created_at,json=createdAt,stdtime" json:"created_at"`
+ CreatedAt time.Time `protobuf:"bytes,2,opt,name=created_at,json=createdAt,proto3,stdtime" json:"created_at"`
KernelTime_100Ns uint64 `protobuf:"varint,3,opt,name=kernel_time_100_ns,json=kernelTime100Ns,proto3" json:"kernel_time_100_ns,omitempty"`
MemoryCommitBytes uint64 `protobuf:"varint,4,opt,name=memory_commit_bytes,json=memoryCommitBytes,proto3" json:"memory_commit_bytes,omitempty"`
MemoryWorkingSetPrivateBytes uint64 `protobuf:"varint,5,opt,name=memory_working_set_private_bytes,json=memoryWorkingSetPrivateBytes,proto3" json:"memory_working_set_private_bytes,omitempty"`
@@ -62,16 +78,88 @@ type ProcessDetails struct {
ProcessID uint32 `protobuf:"varint,7,opt,name=process_id,json=processId,proto3" json:"process_id,omitempty"`
UserTime_100Ns uint64 `protobuf:"varint,8,opt,name=user_time_100_ns,json=userTime100Ns,proto3" json:"user_time_100_ns,omitempty"`
ExecID string `protobuf:"bytes,9,opt,name=exec_id,json=execId,proto3" json:"exec_id,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
-func (m *ProcessDetails) Reset() { *m = ProcessDetails{} }
-func (*ProcessDetails) ProtoMessage() {}
-func (*ProcessDetails) Descriptor() ([]byte, []int) { return fileDescriptorHcsshim, []int{1} }
+func (m *ProcessDetails) Reset() { *m = ProcessDetails{} }
+func (*ProcessDetails) ProtoMessage() {}
+func (*ProcessDetails) Descriptor() ([]byte, []int) {
+ return fileDescriptor_7d909fc5b35cb1de, []int{1}
+}
+func (m *ProcessDetails) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *ProcessDetails) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_ProcessDetails.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalTo(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *ProcessDetails) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_ProcessDetails.Merge(m, src)
+}
+func (m *ProcessDetails) XXX_Size() int {
+ return m.Size()
+}
+func (m *ProcessDetails) XXX_DiscardUnknown() {
+ xxx_messageInfo_ProcessDetails.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_ProcessDetails proto.InternalMessageInfo
func init() {
proto.RegisterType((*CreateOptions)(nil), "containerd.windows.hcsshim.CreateOptions")
proto.RegisterType((*ProcessDetails)(nil), "containerd.windows.hcsshim.ProcessDetails")
}
+
+func init() {
+ proto.RegisterFile("github.com/containerd/containerd/windows/hcsshimtypes/hcsshim.proto", fileDescriptor_7d909fc5b35cb1de)
+}
+
+var fileDescriptor_7d909fc5b35cb1de = []byte{
+ // 507 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x93, 0x41, 0x6f, 0xd3, 0x3c,
+ 0x18, 0xc7, 0x9b, 0x77, 0x7b, 0xbb, 0xc5, 0xa8, 0xc0, 0x0c, 0x87, 0x52, 0x20, 0xa9, 0xc6, 0x81,
+ 0x4a, 0xa0, 0xb4, 0x83, 0x23, 0x27, 0xd2, 0x82, 0xd4, 0xcb, 0x98, 0x32, 0x24, 0x10, 0x42, 0xb2,
+ 0xdc, 0xe4, 0x21, 0xb5, 0x56, 0xc7, 0x91, 0xed, 0xd2, 0xf5, 0xc6, 0x47, 0xe0, 0xc8, 0x47, 0xea,
+ 0x91, 0x23, 0x12, 0x52, 0x61, 0xf9, 0x24, 0xc8, 0x76, 0xba, 0x8d, 0xc1, 0x89, 0x9b, 0xed, 0xff,
+ 0xef, 0xf9, 0x3d, 0xf1, 0x63, 0x05, 0x0d, 0x73, 0xa6, 0xa7, 0xf3, 0x49, 0x94, 0x0a, 0xde, 0x4f,
+ 0x45,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, 0x8b, 0xdf, 0xaf, 0xce, 0x82, 0xc6, 0xb7, 0xb3, 0xa0,
+ 0xf1, 0xa9, 0x0a, 0xbc, 0x55, 0x15, 0x78, 0x5f, 0xab, 0xc0, 0xfb, 0x59, 0x05, 0xde, 0xbb, 0xf8,
+ 0x9f, 0x7e, 0x8a, 0x67, 0x97, 0x37, 0x6f, 0x1b, 0x93, 0xa6, 0x7d, 0xef, 0xa7, 0xbf, 0x02, 0x00,
+ 0x00, 0xff, 0xff, 0x1e, 0xd7, 0x2f, 0xa8, 0x63, 0x03, 0x00, 0x00,
+}
+
func (m *CreateOptions) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
@@ -89,12 +177,15 @@ func (m *CreateOptions) MarshalTo(dAtA []byte) (int, error) {
_ = l
dAtA[i] = 0xa
i++
- i = encodeVarintHcsshim(dAtA, i, uint64(types.SizeOfStdDuration(m.TerminateDuration)))
- n1, err := types.StdDurationMarshalTo(m.TerminateDuration, dAtA[i:])
+ i = encodeVarintHcsshim(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdDuration(m.TerminateDuration)))
+ n1, err := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.TerminateDuration, dAtA[i:])
if err != nil {
return 0, err
}
i += n1
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -121,8 +212,8 @@ func (m *ProcessDetails) MarshalTo(dAtA []byte) (int, error) {
}
dAtA[i] = 0x12
i++
- i = encodeVarintHcsshim(dAtA, i, uint64(types.SizeOfStdTime(m.CreatedAt)))
- n2, err := types.StdTimeMarshalTo(m.CreatedAt, dAtA[i:])
+ i = encodeVarintHcsshim(dAtA, i, uint64(github_com_gogo_protobuf_types.SizeOfStdTime(m.CreatedAt)))
+ n2, err := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.CreatedAt, dAtA[i:])
if err != nil {
return 0, err
}
@@ -163,6 +254,9 @@ func (m *ProcessDetails) MarshalTo(dAtA []byte) (int, error) {
i = encodeVarintHcsshim(dAtA, i, uint64(len(m.ExecID)))
i += copy(dAtA[i:], m.ExecID)
}
+ if m.XXX_unrecognized != nil {
+ i += copy(dAtA[i:], m.XXX_unrecognized)
+ }
return i, nil
}
@@ -176,21 +270,30 @@ func encodeVarintHcsshim(dAtA []byte, offset int, v uint64) int {
return offset + 1
}
func (m *CreateOptions) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
- l = types.SizeOfStdDuration(m.TerminateDuration)
+ l = github_com_gogo_protobuf_types.SizeOfStdDuration(m.TerminateDuration)
n += 1 + l + sovHcsshim(uint64(l))
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
func (m *ProcessDetails) Size() (n int) {
+ if m == nil {
+ return 0
+ }
var l int
_ = l
l = len(m.ImageName)
if l > 0 {
n += 1 + l + sovHcsshim(uint64(l))
}
- l = types.SizeOfStdTime(m.CreatedAt)
+ l = github_com_gogo_protobuf_types.SizeOfStdTime(m.CreatedAt)
n += 1 + l + sovHcsshim(uint64(l))
if m.KernelTime_100Ns != 0 {
n += 1 + sovHcsshim(uint64(m.KernelTime_100Ns))
@@ -214,6 +317,9 @@ func (m *ProcessDetails) Size() (n int) {
if l > 0 {
n += 1 + l + sovHcsshim(uint64(l))
}
+ if m.XXX_unrecognized != nil {
+ n += len(m.XXX_unrecognized)
+ }
return n
}
@@ -235,7 +341,8 @@ func (this *CreateOptions) String() string {
return "nil"
}
s := strings.Join([]string{`&CreateOptions{`,
- `TerminateDuration:` + strings.Replace(strings.Replace(this.TerminateDuration.String(), "Duration", "google_protobuf1.Duration", 1), `&`, ``, 1) + `,`,
+ `TerminateDuration:` + strings.Replace(strings.Replace(this.TerminateDuration.String(), "Duration", "types.Duration", 1), `&`, ``, 1) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -246,7 +353,7 @@ func (this *ProcessDetails) String() string {
}
s := strings.Join([]string{`&ProcessDetails{`,
`ImageName:` + fmt.Sprintf("%v", this.ImageName) + `,`,
- `CreatedAt:` + strings.Replace(strings.Replace(this.CreatedAt.String(), "Timestamp", "google_protobuf2.Timestamp", 1), `&`, ``, 1) + `,`,
+ `CreatedAt:` + strings.Replace(strings.Replace(this.CreatedAt.String(), "Timestamp", "types.Timestamp", 1), `&`, ``, 1) + `,`,
`KernelTime_100Ns:` + fmt.Sprintf("%v", this.KernelTime_100Ns) + `,`,
`MemoryCommitBytes:` + fmt.Sprintf("%v", this.MemoryCommitBytes) + `,`,
`MemoryWorkingSetPrivateBytes:` + fmt.Sprintf("%v", this.MemoryWorkingSetPrivateBytes) + `,`,
@@ -254,6 +361,7 @@ func (this *ProcessDetails) String() string {
`ProcessID:` + fmt.Sprintf("%v", this.ProcessID) + `,`,
`UserTime_100Ns:` + fmt.Sprintf("%v", this.UserTime_100Ns) + `,`,
`ExecID:` + fmt.Sprintf("%v", this.ExecID) + `,`,
+ `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`,
`}`,
}, "")
return s
@@ -281,7 +389,7 @@ func (m *CreateOptions) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -309,7 +417,7 @@ func (m *CreateOptions) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -318,10 +426,13 @@ func (m *CreateOptions) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthHcsshim
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthHcsshim
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
- if err := types.StdDurationUnmarshal(&m.TerminateDuration, dAtA[iNdEx:postIndex]); err != nil {
+ if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(&m.TerminateDuration, dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
@@ -334,9 +445,13 @@ func (m *CreateOptions) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthHcsshim
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthHcsshim
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -361,7 +476,7 @@ func (m *ProcessDetails) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
+ wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -389,7 +504,7 @@ func (m *ProcessDetails) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -399,6 +514,9 @@ func (m *ProcessDetails) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthHcsshim
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthHcsshim
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -418,7 +536,7 @@ func (m *ProcessDetails) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- msglen |= (int(b) & 0x7F) << shift
+ msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -427,10 +545,13 @@ func (m *ProcessDetails) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthHcsshim
}
postIndex := iNdEx + msglen
+ if postIndex < 0 {
+ return ErrInvalidLengthHcsshim
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
- if err := types.StdTimeUnmarshal(&m.CreatedAt, dAtA[iNdEx:postIndex]); err != nil {
+ if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.CreatedAt, dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
@@ -448,7 +569,7 @@ func (m *ProcessDetails) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- m.KernelTime_100Ns |= (uint64(b) & 0x7F) << shift
+ m.KernelTime_100Ns |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -467,7 +588,7 @@ func (m *ProcessDetails) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- m.MemoryCommitBytes |= (uint64(b) & 0x7F) << shift
+ m.MemoryCommitBytes |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -486,7 +607,7 @@ func (m *ProcessDetails) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- m.MemoryWorkingSetPrivateBytes |= (uint64(b) & 0x7F) << shift
+ m.MemoryWorkingSetPrivateBytes |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -505,7 +626,7 @@ func (m *ProcessDetails) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- m.MemoryWorkingSetSharedBytes |= (uint64(b) & 0x7F) << shift
+ m.MemoryWorkingSetSharedBytes |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -524,7 +645,7 @@ func (m *ProcessDetails) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- m.ProcessID |= (uint32(b) & 0x7F) << shift
+ m.ProcessID |= uint32(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -543,7 +664,7 @@ func (m *ProcessDetails) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- m.UserTime_100Ns |= (uint64(b) & 0x7F) << shift
+ m.UserTime_100Ns |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -562,7 +683,7 @@ func (m *ProcessDetails) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
+ stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
@@ -572,6 +693,9 @@ func (m *ProcessDetails) Unmarshal(dAtA []byte) error {
return ErrInvalidLengthHcsshim
}
postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthHcsshim
+ }
if postIndex > l {
return io.ErrUnexpectedEOF
}
@@ -586,9 +710,13 @@ func (m *ProcessDetails) Unmarshal(dAtA []byte) error {
if skippy < 0 {
return ErrInvalidLengthHcsshim
}
+ if (iNdEx + skippy) < 0 {
+ return ErrInvalidLengthHcsshim
+ }
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
+ m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
@@ -652,10 +780,13 @@ func skipHcsshim(dAtA []byte) (n int, err error) {
break
}
}
- iNdEx += length
if length < 0 {
return 0, ErrInvalidLengthHcsshim
}
+ iNdEx += length
+ if iNdEx < 0 {
+ return 0, ErrInvalidLengthHcsshim
+ }
return iNdEx, nil
case 3:
for {
@@ -684,6 +815,9 @@ func skipHcsshim(dAtA []byte) (n int, err error) {
return 0, err
}
iNdEx = start + next
+ if iNdEx < 0 {
+ return 0, ErrInvalidLengthHcsshim
+ }
}
return iNdEx, nil
case 4:
@@ -702,43 +836,3 @@ var (
ErrInvalidLengthHcsshim = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowHcsshim = fmt.Errorf("proto: integer overflow")
)
-
-func init() {
- proto.RegisterFile("github.com/containerd/containerd/windows/hcsshimtypes/hcsshim.proto", fileDescriptorHcsshim)
-}
-
-var fileDescriptorHcsshim = []byte{
- // 507 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x93, 0x41, 0x6f, 0xd3, 0x3c,
- 0x18,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