Update GRPC for consistency
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
@@ -21,7 +21,7 @@
|
||||
ContainerDelete
|
||||
ContentDelete
|
||||
Envelope
|
||||
ImagePut
|
||||
ImageUpdate
|
||||
ImageDelete
|
||||
NamespaceCreate
|
||||
NamespaceUpdate
|
||||
@@ -63,15 +63,26 @@ var _ = math.Inf
|
||||
const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
|
||||
|
||||
type ContainerCreate struct {
|
||||
ContainerID string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"`
|
||||
Image string `protobuf:"bytes,2,opt,name=image,proto3" json:"image,omitempty"`
|
||||
Runtime string `protobuf:"bytes,3,opt,name=runtime,proto3" json:"runtime,omitempty"`
|
||||
ContainerID string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_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"`
|
||||
}
|
||||
|
||||
func (m *ContainerCreate) Reset() { *m = ContainerCreate{} }
|
||||
func (*ContainerCreate) ProtoMessage() {}
|
||||
func (*ContainerCreate) Descriptor() ([]byte, []int) { return fileDescriptorContainer, []int{0} }
|
||||
|
||||
type ContainerCreate_Runtime struct {
|
||||
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Options map[string]string `protobuf:"bytes,2,rep,name=options" json:"options,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
||||
}
|
||||
|
||||
func (m *ContainerCreate_Runtime) Reset() { *m = ContainerCreate_Runtime{} }
|
||||
func (*ContainerCreate_Runtime) ProtoMessage() {}
|
||||
func (*ContainerCreate_Runtime) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptorContainer, []int{0, 0}
|
||||
}
|
||||
|
||||
type ContainerUpdate struct {
|
||||
ContainerID string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"`
|
||||
Image string `protobuf:"bytes,2,opt,name=image,proto3" json:"image,omitempty"`
|
||||
@@ -93,6 +104,7 @@ func (*ContainerDelete) Descriptor() ([]byte, []int) { return fileDescriptorCont
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*ContainerCreate)(nil), "containerd.v1.types.ContainerCreate")
|
||||
proto.RegisterType((*ContainerCreate_Runtime)(nil), "containerd.v1.types.ContainerCreate.Runtime")
|
||||
proto.RegisterType((*ContainerUpdate)(nil), "containerd.v1.types.ContainerUpdate")
|
||||
proto.RegisterType((*ContainerDelete)(nil), "containerd.v1.types.ContainerDelete")
|
||||
}
|
||||
@@ -123,11 +135,56 @@ func (m *ContainerCreate) MarshalTo(dAtA []byte) (int, error) {
|
||||
i = encodeVarintContainer(dAtA, i, uint64(len(m.Image)))
|
||||
i += copy(dAtA[i:], m.Image)
|
||||
}
|
||||
if len(m.Runtime) > 0 {
|
||||
if m.Runtime != nil {
|
||||
dAtA[i] = 0x1a
|
||||
i++
|
||||
i = encodeVarintContainer(dAtA, i, uint64(len(m.Runtime)))
|
||||
i += copy(dAtA[i:], m.Runtime)
|
||||
i = encodeVarintContainer(dAtA, i, uint64(m.Runtime.Size()))
|
||||
n1, err := m.Runtime.MarshalTo(dAtA[i:])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
i += n1
|
||||
}
|
||||
return i, nil
|
||||
}
|
||||
|
||||
func (m *ContainerCreate_Runtime) 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 *ContainerCreate_Runtime) MarshalTo(dAtA []byte) (int, error) {
|
||||
var i int
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if len(m.Name) > 0 {
|
||||
dAtA[i] = 0xa
|
||||
i++
|
||||
i = encodeVarintContainer(dAtA, i, uint64(len(m.Name)))
|
||||
i += copy(dAtA[i:], m.Name)
|
||||
}
|
||||
if len(m.Options) > 0 {
|
||||
for k, _ := range m.Options {
|
||||
dAtA[i] = 0x12
|
||||
i++
|
||||
v := m.Options[k]
|
||||
mapSize := 1 + len(k) + sovContainer(uint64(len(k))) + 1 + len(v) + sovContainer(uint64(len(v)))
|
||||
i = encodeVarintContainer(dAtA, i, uint64(mapSize))
|
||||
dAtA[i] = 0xa
|
||||
i++
|
||||
i = encodeVarintContainer(dAtA, i, uint64(len(k)))
|
||||
i += copy(dAtA[i:], k)
|
||||
dAtA[i] = 0x12
|
||||
i++
|
||||
i = encodeVarintContainer(dAtA, i, uint64(len(v)))
|
||||
i += copy(dAtA[i:], v)
|
||||
}
|
||||
}
|
||||
return i, nil
|
||||
}
|
||||
@@ -247,10 +304,28 @@ func (m *ContainerCreate) Size() (n int) {
|
||||
if l > 0 {
|
||||
n += 1 + l + sovContainer(uint64(l))
|
||||
}
|
||||
l = len(m.Runtime)
|
||||
if m.Runtime != nil {
|
||||
l = m.Runtime.Size()
|
||||
n += 1 + l + sovContainer(uint64(l))
|
||||
}
|
||||
return n
|
||||
}
|
||||
|
||||
func (m *ContainerCreate_Runtime) Size() (n int) {
|
||||
var l int
|
||||
_ = l
|
||||
l = len(m.Name)
|
||||
if l > 0 {
|
||||
n += 1 + l + sovContainer(uint64(l))
|
||||
}
|
||||
if len(m.Options) > 0 {
|
||||
for k, v := range m.Options {
|
||||
_ = k
|
||||
_ = v
|
||||
mapEntrySize := 1 + len(k) + sovContainer(uint64(len(k))) + 1 + len(v) + sovContainer(uint64(len(v)))
|
||||
n += mapEntrySize + 1 + sovContainer(uint64(mapEntrySize))
|
||||
}
|
||||
}
|
||||
return n
|
||||
}
|
||||
|
||||
@@ -310,7 +385,28 @@ func (this *ContainerCreate) String() string {
|
||||
s := strings.Join([]string{`&ContainerCreate{`,
|
||||
`ContainerID:` + fmt.Sprintf("%v", this.ContainerID) + `,`,
|
||||
`Image:` + fmt.Sprintf("%v", this.Image) + `,`,
|
||||
`Runtime:` + fmt.Sprintf("%v", this.Runtime) + `,`,
|
||||
`Runtime:` + strings.Replace(fmt.Sprintf("%v", this.Runtime), "ContainerCreate_Runtime", "ContainerCreate_Runtime", 1) + `,`,
|
||||
`}`,
|
||||
}, "")
|
||||
return s
|
||||
}
|
||||
func (this *ContainerCreate_Runtime) String() string {
|
||||
if this == nil {
|
||||
return "nil"
|
||||
}
|
||||
keysForOptions := make([]string, 0, len(this.Options))
|
||||
for k, _ := range this.Options {
|
||||
keysForOptions = append(keysForOptions, k)
|
||||
}
|
||||
github_com_gogo_protobuf_sortkeys.Strings(keysForOptions)
|
||||
mapStringForOptions := "map[string]string{"
|
||||
for _, k := range keysForOptions {
|
||||
mapStringForOptions += fmt.Sprintf("%v: %v,", k, this.Options[k])
|
||||
}
|
||||
mapStringForOptions += "}"
|
||||
s := strings.Join([]string{`&ContainerCreate_Runtime{`,
|
||||
`Name:` + fmt.Sprintf("%v", this.Name) + `,`,
|
||||
`Options:` + mapStringForOptions + `,`,
|
||||
`}`,
|
||||
}, "")
|
||||
return s
|
||||
@@ -447,6 +543,89 @@ func (m *ContainerCreate) Unmarshal(dAtA []byte) error {
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Runtime", wireType)
|
||||
}
|
||||
var msglen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowContainer
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
msglen |= (int(b) & 0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if msglen < 0 {
|
||||
return ErrInvalidLengthContainer
|
||||
}
|
||||
postIndex := iNdEx + msglen
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
if m.Runtime == nil {
|
||||
m.Runtime = &ContainerCreate_Runtime{}
|
||||
}
|
||||
if err := m.Runtime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := skipContainer(dAtA[iNdEx:])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthContainer
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
iNdEx += skippy
|
||||
}
|
||||
}
|
||||
|
||||
if iNdEx > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (m *ContainerCreate_Runtime) 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 ErrIntOverflowContainer
|
||||
}
|
||||
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: Runtime: wiretype end group for non-group")
|
||||
}
|
||||
if fieldNum <= 0 {
|
||||
return fmt.Errorf("proto: Runtime: 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 {
|
||||
@@ -470,7 +649,123 @@ func (m *ContainerCreate) Unmarshal(dAtA []byte) error {
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.Runtime = string(dAtA[iNdEx:postIndex])
|
||||
m.Name = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
case 2:
|
||||
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 ErrIntOverflowContainer
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
msglen |= (int(b) & 0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if msglen < 0 {
|
||||
return ErrInvalidLengthContainer
|
||||
}
|
||||
postIndex := iNdEx + msglen
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
var keykey uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowContainer
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
keykey |= (uint64(b) & 0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
var stringLenmapkey uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowContainer
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLenmapkey |= (uint64(b) & 0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLenmapkey := int(stringLenmapkey)
|
||||
if intStringLenmapkey < 0 {
|
||||
return ErrInvalidLengthContainer
|
||||
}
|
||||
postStringIndexmapkey := iNdEx + intStringLenmapkey
|
||||
if postStringIndexmapkey > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
mapkey := string(dAtA[iNdEx:postStringIndexmapkey])
|
||||
iNdEx = postStringIndexmapkey
|
||||
if m.Options == nil {
|
||||
m.Options = make(map[string]string)
|
||||
}
|
||||
if iNdEx < postIndex {
|
||||
var valuekey uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowContainer
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
valuekey |= (uint64(b) & 0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
var stringLenmapvalue uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowContainer
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLenmapvalue |= (uint64(b) & 0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLenmapvalue := int(stringLenmapvalue)
|
||||
if intStringLenmapvalue < 0 {
|
||||
return ErrInvalidLengthContainer
|
||||
}
|
||||
postStringIndexmapvalue := iNdEx + intStringLenmapvalue
|
||||
if postStringIndexmapvalue > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
mapvalue := string(dAtA[iNdEx:postStringIndexmapvalue])
|
||||
iNdEx = postStringIndexmapvalue
|
||||
m.Options[mapkey] = mapvalue
|
||||
} else {
|
||||
var mapvalue string
|
||||
m.Options[mapkey] = mapvalue
|
||||
}
|
||||
iNdEx = postIndex
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
@@ -935,26 +1230,30 @@ func init() {
|
||||
}
|
||||
|
||||
var fileDescriptorContainer = []byte{
|
||||
// 322 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x91, 0xbf, 0x4e, 0xf3, 0x30,
|
||||
0x14, 0xc5, 0xeb, 0xe6, 0xfb, 0x82, 0x70, 0x90, 0x8a, 0x42, 0x07, 0xab, 0x43, 0x5a, 0x65, 0xea,
|
||||
0xe4, 0x40, 0x59, 0x80, 0x09, 0xf5, 0x0f, 0xa2, 0x12, 0x53, 0x10, 0x33, 0x4a, 0x9b, 0x4b, 0xb0,
|
||||
0x48, 0xe3, 0xc8, 0x75, 0x2a, 0x75, 0x63, 0xe0, 0xe1, 0x3a, 0x32, 0x32, 0x55, 0xd4, 0x4f, 0x82,
|
||||
0xe2, 0xb4, 0x69, 0x84, 0x98, 0x10, 0xdb, 0xbd, 0xbe, 0xbf, 0xa3, 0x73, 0x74, 0x8c, 0xaf, 0x23,
|
||||
0x26, 0x9f, 0xb3, 0x09, 0x9d, 0xf2, 0x99, 0x37, 0xe5, 0x89, 0x0c, 0x58, 0x02, 0x22, 0xac, 0x8e,
|
||||
0x41, 0xca, 0x3c, 0xb9, 0x4c, 0x61, 0xee, 0xc1, 0x02, 0x12, 0xb9, 0x3f, 0xd1, 0x54, 0x70, 0xc9,
|
||||
0xed, 0x93, 0x3d, 0x4b, 0x17, 0x67, 0x54, 0xa3, 0xad, 0x66, 0xc4, 0x23, 0xae, 0xef, 0x5e, 0x3e,
|
||||
0x15, 0xa8, 0x9b, 0xe1, 0xc6, 0x60, 0x07, 0x0f, 0x04, 0x04, 0x12, 0xec, 0x1e, 0x3e, 0x2a, 0xf5,
|
||||
0x8f, 0x2c, 0x24, 0xa8, 0x83, 0xba, 0x87, 0xfd, 0x86, 0x5a, 0xb7, 0xad, 0x12, 0x1d, 0x0f, 0x7d,
|
||||
0xab, 0x84, 0xc6, 0xa1, 0xdd, 0xc4, 0xff, 0xd9, 0x2c, 0x88, 0x80, 0xd4, 0x73, 0xd8, 0x2f, 0x16,
|
||||
0x9b, 0xe0, 0x03, 0x91, 0x25, 0x92, 0xcd, 0x80, 0x18, 0xfa, 0x7d, 0xb7, 0xba, 0x6f, 0xf5, 0x8a,
|
||||
0xef, 0x43, 0x1a, 0xfe, 0xad, 0xef, 0x2d, 0x36, 0xe3, 0x60, 0x02, 0xf1, 0x9c, 0x18, 0x1d, 0xa3,
|
||||
0x6b, 0xf5, 0x4e, 0xe9, 0x0f, 0x85, 0xd0, 0x6f, 0xfe, 0xf4, 0x4e, 0x4b, 0x46, 0x89, 0x14, 0x4b,
|
||||
0x7f, 0xab, 0xb7, 0x5d, 0x6c, 0x0a, 0xce, 0xe5, 0xd3, 0x9c, 0xfc, 0xd3, 0x69, 0xb0, 0x5a, 0xb7,
|
||||
0x4d, 0x9f, 0x73, 0x79, 0x73, 0xef, 0x6f, 0x2f, 0xad, 0x4b, 0x6c, 0x55, 0xa4, 0xf6, 0x31, 0x36,
|
||||
0x5e, 0x60, 0x59, 0xa4, 0xf7, 0xf3, 0x31, 0x0f, 0xb9, 0x08, 0xe2, 0xac, 0x0c, 0xa9, 0x97, 0xab,
|
||||
0xfa, 0x05, 0x72, 0x47, 0x95, 0x16, 0x86, 0x10, 0xc3, 0xef, 0x5a, 0xe8, 0x93, 0xd5, 0xc6, 0xa9,
|
||||
0x7d, 0x6c, 0x9c, 0xda, 0xab, 0x72, 0xd0, 0x4a, 0x39, 0xe8, 0x5d, 0x39, 0xe8, 0x53, 0x39, 0x68,
|
||||
0x62, 0xea, 0x5f, 0x3e, 0xff, 0x0a, 0x00, 0x00, 0xff, 0xff, 0x3f, 0xf2, 0x95, 0xd3, 0x54, 0x02,
|
||||
0x00, 0x00,
|
||||
// 387 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x52, 0x4f, 0x6b, 0xe2, 0x40,
|
||||
0x1c, 0x75, 0x12, 0x37, 0xb2, 0x13, 0xc1, 0x65, 0xd6, 0x43, 0xc8, 0x21, 0x8a, 0x27, 0x0f, 0xcb,
|
||||
0x64, 0xd7, 0xbd, 0xac, 0x9e, 0x16, 0xff, 0x51, 0xa1, 0x50, 0x18, 0xe9, 0xb9, 0x44, 0x33, 0x4d,
|
||||
0x43, 0x93, 0x4c, 0x48, 0x46, 0xc1, 0x5b, 0x0f, 0xfd, 0x3c, 0xfd, 0x1c, 0x1e, 0x7b, 0xe8, 0xa1,
|
||||
0x27, 0xa9, 0xf9, 0x24, 0x25, 0x93, 0x18, 0x43, 0x29, 0x05, 0x4b, 0x6f, 0xbf, 0xc9, 0x7b, 0xef,
|
||||
0xf7, 0x7b, 0xef, 0x11, 0xf8, 0xdf, 0x71, 0xf9, 0xcd, 0x6a, 0x81, 0x97, 0xcc, 0x37, 0x97, 0x2c,
|
||||
0xe0, 0x96, 0x1b, 0xd0, 0xc8, 0x2e, 0x8f, 0x56, 0xe8, 0x9a, 0x7c, 0x13, 0xd2, 0xd8, 0xa4, 0x6b,
|
||||
0x1a, 0xf0, 0x23, 0x84, 0xc3, 0x88, 0x71, 0x86, 0x7e, 0x1e, 0xb9, 0x78, 0xfd, 0x07, 0x0b, 0xaa,
|
||||
0xde, 0x74, 0x98, 0xc3, 0x04, 0x6e, 0xa6, 0x53, 0x46, 0xed, 0x3c, 0x49, 0xb0, 0x31, 0x3a, 0xb0,
|
||||
0x47, 0x11, 0xb5, 0x38, 0x45, 0x3d, 0x58, 0x2f, 0x16, 0x5c, 0xb9, 0xb6, 0x06, 0xda, 0xa0, 0xfb,
|
||||
0x7d, 0xd8, 0x48, 0x76, 0x2d, 0xb5, 0xa0, 0xce, 0xc6, 0x44, 0x2d, 0x48, 0x33, 0x1b, 0x35, 0xe1,
|
||||
0x37, 0xd7, 0xb7, 0x1c, 0xaa, 0x49, 0x29, 0x99, 0x64, 0x0f, 0x34, 0x85, 0xb5, 0x68, 0x15, 0x70,
|
||||
0xd7, 0xa7, 0x9a, 0xdc, 0x06, 0x5d, 0xb5, 0xf7, 0x0b, 0xbf, 0x63, 0x0d, 0xbf, 0x31, 0x80, 0x49,
|
||||
0xa6, 0x21, 0x07, 0xb1, 0xfe, 0x00, 0x60, 0x2d, 0xff, 0x88, 0x10, 0xac, 0x06, 0x96, 0x4f, 0x33,
|
||||
0x57, 0x44, 0xcc, 0x68, 0x0e, 0x6b, 0x2c, 0xe4, 0x2e, 0x0b, 0x62, 0x4d, 0x6a, 0xcb, 0x5d, 0xb5,
|
||||
0xd7, 0x3f, 0xe5, 0x0e, 0xbe, 0xc8, 0xb4, 0x93, 0x80, 0x47, 0x1b, 0x72, 0xd8, 0xa4, 0x0f, 0x60,
|
||||
0xbd, 0x0c, 0xa0, 0x1f, 0x50, 0xbe, 0xa5, 0x9b, 0xfc, 0x6e, 0x3a, 0xa6, 0xa1, 0xd7, 0x96, 0xb7,
|
||||
0x2a, 0x42, 0x8b, 0xc7, 0x40, 0xfa, 0x07, 0x3a, 0xf7, 0xe5, 0x5a, 0x2f, 0x43, 0xfb, 0x6b, 0x6b,
|
||||
0x3d, 0x83, 0x8a, 0x67, 0x2d, 0xa8, 0x17, 0x6b, 0xb2, 0x48, 0xfb, 0xfb, 0xe3, 0xb4, 0xd9, 0x7d,
|
||||
0x7c, 0x2e, 0x24, 0x59, 0xc8, 0x5c, 0x8f, 0x3a, 0x50, 0x89, 0x18, 0xe3, 0xd7, 0xb1, 0x56, 0x15,
|
||||
0x6e, 0x60, 0xb2, 0x6b, 0x29, 0x84, 0x31, 0x3e, 0x9d, 0x93, 0x1c, 0xd1, 0xfb, 0x50, 0x2d, 0x49,
|
||||
0x4f, 0xaa, 0x61, 0x52, 0x6a, 0x61, 0x4c, 0x3d, 0xfa, 0xb9, 0x16, 0x86, 0xda, 0x76, 0x6f, 0x54,
|
||||
0x9e, 0xf7, 0x46, 0xe5, 0x2e, 0x31, 0xc0, 0x36, 0x31, 0xc0, 0x63, 0x62, 0x80, 0x97, 0xc4, 0x00,
|
||||
0x0b, 0x45, 0xfc, 0xc5, 0x7f, 0x5f, 0x03, 0x00, 0x00, 0xff, 0xff, 0x47, 0x2f, 0xd1, 0x73, 0x34,
|
||||
0x03, 0x00, 0x00,
|
||||
}
|
||||
|
@@ -7,7 +7,11 @@ import "gogoproto/gogo.proto";
|
||||
message ContainerCreate {
|
||||
string container_id = 1;
|
||||
string image = 2;
|
||||
string runtime = 3;
|
||||
message Runtime {
|
||||
string name = 1;
|
||||
map<string, string> options = 2;
|
||||
}
|
||||
Runtime runtime = 3;
|
||||
}
|
||||
|
||||
message ContainerUpdate {
|
||||
|
@@ -10,6 +10,7 @@ import math "math"
|
||||
|
||||
import strings "strings"
|
||||
import reflect "reflect"
|
||||
import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys"
|
||||
|
||||
import io "io"
|
||||
|
||||
@@ -18,14 +19,14 @@ var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
|
||||
type ImagePut struct {
|
||||
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Labels string `protobuf:"bytes,2,opt,name=labels,proto3" json:"labels,omitempty"`
|
||||
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"`
|
||||
}
|
||||
|
||||
func (m *ImagePut) Reset() { *m = ImagePut{} }
|
||||
func (*ImagePut) ProtoMessage() {}
|
||||
func (*ImagePut) Descriptor() ([]byte, []int) { return fileDescriptorImage, []int{0} }
|
||||
func (m *ImageUpdate) Reset() { *m = ImageUpdate{} }
|
||||
func (*ImageUpdate) ProtoMessage() {}
|
||||
func (*ImageUpdate) Descriptor() ([]byte, []int) { return fileDescriptorImage, []int{0} }
|
||||
|
||||
type ImageDelete struct {
|
||||
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
||||
@@ -36,10 +37,10 @@ func (*ImageDelete) ProtoMessage() {}
|
||||
func (*ImageDelete) Descriptor() ([]byte, []int) { return fileDescriptorImage, []int{1} }
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*ImagePut)(nil), "containerd.v1.types.ImagePut")
|
||||
proto.RegisterType((*ImageUpdate)(nil), "containerd.v1.types.ImageUpdate")
|
||||
proto.RegisterType((*ImageDelete)(nil), "containerd.v1.types.ImageDelete")
|
||||
}
|
||||
func (m *ImagePut) Marshal() (dAtA []byte, err error) {
|
||||
func (m *ImageUpdate) Marshal() (dAtA []byte, err error) {
|
||||
size := m.Size()
|
||||
dAtA = make([]byte, size)
|
||||
n, err := m.MarshalTo(dAtA)
|
||||
@@ -49,7 +50,7 @@ func (m *ImagePut) Marshal() (dAtA []byte, err error) {
|
||||
return dAtA[:n], nil
|
||||
}
|
||||
|
||||
func (m *ImagePut) MarshalTo(dAtA []byte) (int, error) {
|
||||
func (m *ImageUpdate) MarshalTo(dAtA []byte) (int, error) {
|
||||
var i int
|
||||
_ = i
|
||||
var l int
|
||||
@@ -61,10 +62,21 @@ func (m *ImagePut) MarshalTo(dAtA []byte) (int, error) {
|
||||
i += copy(dAtA[i:], m.Name)
|
||||
}
|
||||
if len(m.Labels) > 0 {
|
||||
dAtA[i] = 0x12
|
||||
i++
|
||||
i = encodeVarintImage(dAtA, i, uint64(len(m.Labels)))
|
||||
i += copy(dAtA[i:], m.Labels)
|
||||
for k, _ := range m.Labels {
|
||||
dAtA[i] = 0x12
|
||||
i++
|
||||
v := m.Labels[k]
|
||||
mapSize := 1 + len(k) + sovImage(uint64(len(k))) + 1 + len(v) + sovImage(uint64(len(v)))
|
||||
i = encodeVarintImage(dAtA, i, uint64(mapSize))
|
||||
dAtA[i] = 0xa
|
||||
i++
|
||||
i = encodeVarintImage(dAtA, i, uint64(len(k)))
|
||||
i += copy(dAtA[i:], k)
|
||||
dAtA[i] = 0x12
|
||||
i++
|
||||
i = encodeVarintImage(dAtA, i, uint64(len(v)))
|
||||
i += copy(dAtA[i:], v)
|
||||
}
|
||||
}
|
||||
return i, nil
|
||||
}
|
||||
@@ -120,16 +132,20 @@ func encodeVarintImage(dAtA []byte, offset int, v uint64) int {
|
||||
dAtA[offset] = uint8(v)
|
||||
return offset + 1
|
||||
}
|
||||
func (m *ImagePut) Size() (n int) {
|
||||
func (m *ImageUpdate) Size() (n int) {
|
||||
var l int
|
||||
_ = l
|
||||
l = len(m.Name)
|
||||
if l > 0 {
|
||||
n += 1 + l + sovImage(uint64(l))
|
||||
}
|
||||
l = len(m.Labels)
|
||||
if l > 0 {
|
||||
n += 1 + l + sovImage(uint64(l))
|
||||
if len(m.Labels) > 0 {
|
||||
for k, v := range m.Labels {
|
||||
_ = k
|
||||
_ = v
|
||||
mapEntrySize := 1 + len(k) + sovImage(uint64(len(k))) + 1 + len(v) + sovImage(uint64(len(v)))
|
||||
n += mapEntrySize + 1 + sovImage(uint64(mapEntrySize))
|
||||
}
|
||||
}
|
||||
return n
|
||||
}
|
||||
@@ -157,13 +173,23 @@ func sovImage(x uint64) (n int) {
|
||||
func sozImage(x uint64) (n int) {
|
||||
return sovImage(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
||||
}
|
||||
func (this *ImagePut) String() string {
|
||||
func (this *ImageUpdate) String() string {
|
||||
if this == nil {
|
||||
return "nil"
|
||||
}
|
||||
s := strings.Join([]string{`&ImagePut{`,
|
||||
keysForLabels := make([]string, 0, len(this.Labels))
|
||||
for k, _ := range this.Labels {
|
||||
keysForLabels = append(keysForLabels, k)
|
||||
}
|
||||
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{`&ImageUpdate{`,
|
||||
`Name:` + fmt.Sprintf("%v", this.Name) + `,`,
|
||||
`Labels:` + fmt.Sprintf("%v", this.Labels) + `,`,
|
||||
`Labels:` + mapStringForLabels + `,`,
|
||||
`}`,
|
||||
}, "")
|
||||
return s
|
||||
@@ -186,7 +212,7 @@ func valueToStringImage(v interface{}) string {
|
||||
pv := reflect.Indirect(rv).Interface()
|
||||
return fmt.Sprintf("*%v", pv)
|
||||
}
|
||||
func (m *ImagePut) Unmarshal(dAtA []byte) error {
|
||||
func (m *ImageUpdate) Unmarshal(dAtA []byte) error {
|
||||
l := len(dAtA)
|
||||
iNdEx := 0
|
||||
for iNdEx < l {
|
||||
@@ -209,10 +235,10 @@ func (m *ImagePut) Unmarshal(dAtA []byte) error {
|
||||
fieldNum := int32(wire >> 3)
|
||||
wireType := int(wire & 0x7)
|
||||
if wireType == 4 {
|
||||
return fmt.Errorf("proto: ImagePut: wiretype end group for non-group")
|
||||
return fmt.Errorf("proto: ImageUpdate: wiretype end group for non-group")
|
||||
}
|
||||
if fieldNum <= 0 {
|
||||
return fmt.Errorf("proto: ImagePut: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
return fmt.Errorf("proto: ImageUpdate: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
}
|
||||
switch fieldNum {
|
||||
case 1:
|
||||
@@ -248,7 +274,7 @@ func (m *ImagePut) Unmarshal(dAtA []byte) error {
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
var msglen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowImage
|
||||
@@ -258,20 +284,107 @@ func (m *ImagePut) Unmarshal(dAtA []byte) error {
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLen |= (uint64(b) & 0x7F) << shift
|
||||
msglen |= (int(b) & 0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLen := int(stringLen)
|
||||
if intStringLen < 0 {
|
||||
if msglen < 0 {
|
||||
return ErrInvalidLengthImage
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
postIndex := iNdEx + msglen
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.Labels = string(dAtA[iNdEx:postIndex])
|
||||
var keykey uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowImage
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
keykey |= (uint64(b) & 0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
var stringLenmapkey uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowImage
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLenmapkey |= (uint64(b) & 0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLenmapkey := int(stringLenmapkey)
|
||||
if intStringLenmapkey < 0 {
|
||||
return ErrInvalidLengthImage
|
||||
}
|
||||
postStringIndexmapkey := iNdEx + intStringLenmapkey
|
||||
if postStringIndexmapkey > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
mapkey := string(dAtA[iNdEx:postStringIndexmapkey])
|
||||
iNdEx = postStringIndexmapkey
|
||||
if m.Labels == nil {
|
||||
m.Labels = make(map[string]string)
|
||||
}
|
||||
if iNdEx < postIndex {
|
||||
var valuekey uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowImage
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
valuekey |= (uint64(b) & 0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
var stringLenmapvalue uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowImage
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLenmapvalue |= (uint64(b) & 0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLenmapvalue := int(stringLenmapvalue)
|
||||
if intStringLenmapvalue < 0 {
|
||||
return ErrInvalidLengthImage
|
||||
}
|
||||
postStringIndexmapvalue := iNdEx + intStringLenmapvalue
|
||||
if postStringIndexmapvalue > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
mapvalue := string(dAtA[iNdEx:postStringIndexmapvalue])
|
||||
iNdEx = postStringIndexmapvalue
|
||||
m.Labels[mapkey] = mapvalue
|
||||
} else {
|
||||
var mapvalue string
|
||||
m.Labels[mapkey] = mapvalue
|
||||
}
|
||||
iNdEx = postIndex
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
@@ -483,16 +596,20 @@ func init() {
|
||||
}
|
||||
|
||||
var fileDescriptorImage = []byte{
|
||||
// 175 bytes of a gzipped FileDescriptorProto
|
||||
// 232 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xb2, 0x49, 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, 0x96, 0xa5,
|
||||
0xe6, 0x95, 0xe8, 0x67, 0xe6, 0x26, 0xa6, 0xa7, 0xea, 0x15, 0x14, 0xe5, 0x97, 0xe4, 0x0b, 0x09,
|
||||
0x23, 0xd4, 0xe9, 0x95, 0x19, 0xea, 0x81, 0x95, 0x29, 0x99, 0x71, 0x71, 0x78, 0x82, 0xd4, 0x04,
|
||||
0x94, 0x96, 0x08, 0x09, 0x71, 0xb1, 0xe4, 0x25, 0xe6, 0xa6, 0x4a, 0x30, 0x2a, 0x30, 0x6a, 0x70,
|
||||
0x06, 0x81, 0xd9, 0x42, 0x62, 0x5c, 0x6c, 0x39, 0x89, 0x49, 0xa9, 0x39, 0xc5, 0x12, 0x4c, 0x60,
|
||||
0x51, 0x28, 0x4f, 0x49, 0x91, 0x8b, 0x1b, 0xac, 0xcf, 0x25, 0x35, 0x27, 0xb5, 0x24, 0x15, 0x9b,
|
||||
0x56, 0x27, 0x89, 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, 0x26, 0xb1, 0x81, 0x1d,
|
||||
0x64, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0xfa, 0x87, 0x34, 0x3a, 0xd0, 0x00, 0x00, 0x00,
|
||||
0x23, 0xd4, 0xe9, 0x95, 0x19, 0xea, 0x81, 0x95, 0x29, 0x2d, 0x62, 0xe4, 0xe2, 0xf6, 0x04, 0x29,
|
||||
0x0a, 0x2d, 0x48, 0x49, 0x2c, 0x49, 0x15, 0x12, 0xe2, 0x62, 0xc9, 0x4b, 0xcc, 0x4d, 0x95, 0x60,
|
||||
0x54, 0x60, 0xd4, 0xe0, 0x0c, 0x02, 0xb3, 0x85, 0x5c, 0xb8, 0xd8, 0x72, 0x12, 0x93, 0x52, 0x73,
|
||||
0x8a, 0x25, 0x98, 0x14, 0x98, 0x35, 0xb8, 0x8d, 0x74, 0xf4, 0xb0, 0x98, 0xa4, 0x87, 0x64, 0x8a,
|
||||
0x9e, 0x0f, 0x58, 0xb9, 0x6b, 0x5e, 0x49, 0x51, 0x65, 0x10, 0x54, 0xaf, 0x94, 0x25, 0x17, 0x37,
|
||||
0x92, 0xb0, 0x90, 0x00, 0x17, 0x73, 0x76, 0x6a, 0x25, 0xd4, 0x1e, 0x10, 0x53, 0x48, 0x84, 0x8b,
|
||||
0xb5, 0x2c, 0x31, 0xa7, 0x34, 0x55, 0x82, 0x09, 0x2c, 0x06, 0xe1, 0x58, 0x31, 0x59, 0x30, 0x2a,
|
||||
0x29, 0x42, 0xdd, 0xe8, 0x92, 0x9a, 0x93, 0x8a, 0xdd, 0x8d, 0x4e, 0x12, 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, 0x4c, 0x62, 0x03, 0xfb, 0xde, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff,
|
||||
0xa7, 0x64, 0x49, 0x13, 0x3d, 0x01, 0x00, 0x00,
|
||||
}
|
||||
|
@@ -2,9 +2,9 @@ syntax = "proto3";
|
||||
|
||||
package containerd.v1.types;
|
||||
|
||||
message ImagePut {
|
||||
message ImageUpdate {
|
||||
string name = 1;
|
||||
string labels = 2;
|
||||
map<string, string> labels = 2;
|
||||
}
|
||||
|
||||
message ImageDelete {
|
||||
|
Reference in New Issue
Block a user