| // Code generated by protoc-gen-gogo. |
| // source: github.com/containerd/containerd/api/services/events/v1/namespace.proto |
| // DO NOT EDIT! |
| |
| package events |
| |
| import proto "github.com/gogo/protobuf/proto" |
| import fmt "fmt" |
| import math "math" |
| import _ "github.com/gogo/protobuf/gogoproto" |
| import _ "github.com/containerd/containerd/protobuf/plugin" |
| |
| import strings "strings" |
| import reflect "reflect" |
| import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" |
| |
| import io "io" |
| |
| // Reference imports to suppress errors if they are not otherwise used. |
| var _ = proto.Marshal |
| var _ = fmt.Errorf |
| var _ = math.Inf |
| |
| 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"` |
| } |
| |
| func (m *NamespaceCreate) Reset() { *m = NamespaceCreate{} } |
| func (*NamespaceCreate) ProtoMessage() {} |
| func (*NamespaceCreate) Descriptor() ([]byte, []int) { return fileDescriptorNamespace, []int{0} } |
| |
| 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"` |
| } |
| |
| func (m *NamespaceUpdate) Reset() { *m = NamespaceUpdate{} } |
| func (*NamespaceUpdate) ProtoMessage() {} |
| func (*NamespaceUpdate) Descriptor() ([]byte, []int) { return fileDescriptorNamespace, []int{1} } |
| |
| type NamespaceDelete struct { |
| Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` |
| } |
| |
| func (m *NamespaceDelete) Reset() { *m = NamespaceDelete{} } |
| func (*NamespaceDelete) ProtoMessage() {} |
| func (*NamespaceDelete) Descriptor() ([]byte, []int) { return fileDescriptorNamespace, []int{2} } |
| |
| func init() { |
| proto.RegisterType((*NamespaceCreate)(nil), "containerd.services.events.v1.NamespaceCreate") |
| proto.RegisterType((*NamespaceUpdate)(nil), "containerd.services.events.v1.NamespaceUpdate") |
| proto.RegisterType((*NamespaceDelete)(nil), "containerd.services.events.v1.NamespaceDelete") |
| } |
| |
| // 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) { |
| if len(fieldpath) == 0 { |
| return "", false |
| } |
| |
| switch fieldpath[0] { |
| case "name": |
| return string(m.Name), len(m.Name) > 0 |
| case "labels": |
| // Labels fields have been special-cased by name. If this breaks, |
| // add better special casing to fieldpath plugin. |
| if len(m.Labels) == 0 { |
| return "", false |
| } |
| value, ok := m.Labels[strings.Join(fieldpath[1:], ".")] |
| return value, ok |
| } |
| return "", false |
| } |
| |
| // 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 *NamespaceUpdate) Field(fieldpath []string) (string, bool) { |
| if len(fieldpath) == 0 { |
| return "", false |
| } |
| |
| switch fieldpath[0] { |
| case "name": |
| return string(m.Name), len(m.Name) > 0 |
| case "labels": |
| // Labels fields have been special-cased by name. If this breaks, |
| // add better special casing to fieldpath plugin. |
| if len(m.Labels) == 0 { |
| return "", false |
| } |
| value, ok := m.Labels[strings.Join(fieldpath[1:], ".")] |
| return value, ok |
| } |
| return "", false |
| } |
| |
| // 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 *NamespaceDelete) Field(fieldpath []string) (string, bool) { |
| if len(fieldpath) == 0 { |
| return "", false |
| } |
| |
| switch fieldpath[0] { |
| case "name": |
| return string(m.Name), len(m.Name) > 0 |
| } |
| return "", false |
| } |
| func (m *NamespaceCreate) 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 *NamespaceCreate) MarshalTo(dAtA []byte) (int, error) { |
| var i int |
| _ = i |
| var l int |
| _ = l |
| if len(m.Name) > 0 { |
| dAtA[i] = 0xa |
| i++ |
| i = encodeVarintNamespace(dAtA, i, uint64(len(m.Name))) |
| i += copy(dAtA[i:], m.Name) |
| } |
| if len(m.Labels) > 0 { |
| for k, _ := range m.Labels { |
| dAtA[i] = 0x12 |
| i++ |
| v := m.Labels[k] |
| mapSize := 1 + len(k) + sovNamespace(uint64(len(k))) + 1 + len(v) + sovNamespace(uint64(len(v))) |
| i = encodeVarintNamespace(dAtA, i, uint64(mapSize)) |
| dAtA[i] = 0xa |
| i++ |
| i = encodeVarintNamespace(dAtA, i, uint64(len(k))) |
| i += copy(dAtA[i:], k) |
| dAtA[i] = 0x12 |
| i++ |
| i = encodeVarintNamespace(dAtA, i, uint64(len(v))) |
| i += copy(dAtA[i:], v) |
| } |
| } |
| return i, nil |
| } |
| |
| func (m *NamespaceUpdate) 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 *NamespaceUpdate) MarshalTo(dAtA []byte) (int, error) { |
| var i int |
| _ = i |
| var l int |
| _ = l |
| if len(m.Name) > 0 { |
| dAtA[i] = 0xa |
| i++ |
| i = encodeVarintNamespace(dAtA, i, uint64(len(m.Name))) |
| i += copy(dAtA[i:], m.Name) |
| } |
| if len(m.Labels) > 0 { |
| for k, _ := range m.Labels { |
| dAtA[i] = 0x12 |
| i++ |
| v := m.Labels[k] |
| mapSize := 1 + len(k) + sovNamespace(uint64(len(k))) + 1 + len(v) + sovNamespace(uint64(len(v))) |
| i = encodeVarintNamespace(dAtA, i, uint64(mapSize)) |
| dAtA[i] = 0xa |
| i++ |
| i = encodeVarintNamespace(dAtA, i, uint64(len(k))) |
| i += copy(dAtA[i:], k) |
| dAtA[i] = 0x12 |
| i++ |
| i = encodeVarintNamespace(dAtA, i, uint64(len(v))) |
| i += copy(dAtA[i:], v) |
| } |
| } |
| return i, nil |
| } |
| |
| func (m *NamespaceDelete) 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 *NamespaceDelete) MarshalTo(dAtA []byte) (int, error) { |
| var i int |
| _ = i |
| var l int |
| _ = l |
| if len(m.Name) > 0 { |
| dAtA[i] = 0xa |
| i++ |
| i = encodeVarintNamespace(dAtA, i, uint64(len(m.Name))) |
| i += copy(dAtA[i:], m.Name) |
| } |
| return i, nil |
| } |
| |
| func encodeFixed64Namespace(dAtA []byte, offset int, v uint64) int { |
| dAtA[offset] = uint8(v) |
| dAtA[offset+1] = uint8(v >> 8) |
| dAtA[offset+2] = uint8(v >> 16) |
| dAtA[offset+3] = uint8(v >> 24) |
| dAtA[offset+4] = uint8(v >> 32) |
| dAtA[offset+5] = uint8(v >> 40) |
| dAtA[offset+6] = uint8(v >> 48) |
| dAtA[offset+7] = uint8(v >> 56) |
| return offset + 8 |
| } |
| func encodeFixed32Namespace(dAtA []byte, offset int, v uint32) int { |
| dAtA[offset] = uint8(v) |
| dAtA[offset+1] = uint8(v >> 8) |
| dAtA[offset+2] = uint8(v >> 16) |
| dAtA[offset+3] = uint8(v >> 24) |
| return offset + 4 |
| } |
| func encodeVarintNamespace(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 (m *NamespaceCreate) Size() (n int) { |
| var l int |
| _ = l |
| l = len(m.Name) |
| if l > 0 { |
| n += 1 + l + sovNamespace(uint64(l)) |
| } |
| if len(m.Labels) > 0 { |
| for k, v := range m.Labels { |
| _ = k |
| _ = v |
| mapEntrySize := 1 + len(k) + sovNamespace(uint64(len(k))) + 1 + len(v) + sovNamespace(uint64(len(v))) |
| n += mapEntrySize + 1 + sovNamespace(uint64(mapEntrySize)) |
| } |
| } |
| return n |
| } |
| |
| func (m *NamespaceUpdate) Size() (n int) { |
| var l int |
| _ = l |
| l = len(m.Name) |
| if l > 0 { |
| n += 1 + l + sovNamespace(uint64(l)) |
| } |
| if len(m.Labels) > 0 { |
| for k, v := range m.Labels { |
| _ = k |
| _ = v |
| mapEntrySize := 1 + len(k) + sovNamespace(uint64(len(k))) + 1 + len(v) + sovNamespace(uint64(len(v))) |
| n += mapEntrySize + 1 + sovNamespace(uint64(mapEntrySize)) |
| } |
| } |
| return n |
| } |
| |
| func (m *NamespaceDelete) Size() (n int) { |
| var l int |
| _ = l |
| l = len(m.Name) |
| if l > 0 { |
| n += 1 + l + sovNamespace(uint64(l)) |
| } |
| return n |
| } |
| |
| func sovNamespace(x uint64) (n int) { |
| for { |
| n++ |
| x >>= 7 |
| if x == 0 { |
| break |
| } |
| } |
| return n |
| } |
| func sozNamespace(x uint64) (n int) { |
| return sovNamespace(uint64((x << 1) ^ uint64((int64(x) >> 63)))) |
| } |
| func (this *NamespaceCreate) String() string { |
| if this == nil { |
| return "nil" |
| } |
| 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{`&NamespaceCreate{`, |
| `Name:` + fmt.Sprintf("%v", this.Name) + `,`, |
| `Labels:` + mapStringForLabels + `,`, |
| `}`, |
| }, "") |
| return s |
| } |
| func (this *NamespaceUpdate) String() string { |
| if this == nil { |
| return "nil" |
| } |
| 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{`&NamespaceUpdate{`, |
| `Name:` + fmt.Sprintf("%v", this.Name) + `,`, |
| `Labels:` + mapStringForLabels + `,`, |
| `}`, |
| }, "") |
| return s |
| } |
| func (this *NamespaceDelete) String() string { |
| if this == nil { |
| return "nil" |
| } |
| s := strings.Join([]string{`&NamespaceDelete{`, |
| `Name:` + fmt.Sprintf("%v", this.Name) + `,`, |
| `}`, |
| }, "") |
| return s |
| } |
| func valueToStringNamespace(v interface{}) string { |
| rv := reflect.ValueOf(v) |
| if rv.IsNil() { |
| return "nil" |
| } |
| pv := reflect.Indirect(rv).Interface() |
| return fmt.Sprintf("*%v", pv) |
| } |
| func (m *NamespaceCreate) 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 ErrIntOverflowNamespace |
| } |
| 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: NamespaceCreate: wiretype end group for non-group") |
| } |
| if fieldNum <= 0 { |
| return fmt.Errorf("proto: NamespaceCreate: 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 ErrIntOverflowNamespace |
| } |
| 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 ErrInvalidLengthNamespace |
| } |
| postIndex := iNdEx + intStringLen |
| 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 Labels", wireType) |
| } |
| var msglen int |
| for shift := uint(0); ; shift += 7 { |
| if shift >= 64 { |
| return ErrIntOverflowNamespace |
| } |
| if iNdEx >= l { |
| return io.ErrUnexpectedEOF |
| } |
| b := dAtA[iNdEx] |
| iNdEx++ |
| msglen |= (int(b) & 0x7F) << shift |
| if b < 0x80 { |
| break |
| } |
| } |
| if msglen < 0 { |
| return ErrInvalidLengthNamespace |
| } |
| postIndex := iNdEx + msglen |
| if postIndex > l { |
| return io.ErrUnexpectedEOF |
| } |
| var keykey uint64 |
| for shift := uint(0); ; shift += 7 { |
| if shift >= 64 { |
| return ErrIntOverflowNamespace |
| } |
| 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 ErrIntOverflowNamespace |
| } |
| 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 ErrInvalidLengthNamespace |
| } |
| 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 ErrIntOverflowNamespace |
| } |
| 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 ErrIntOverflowNamespace |
| } |
| 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 ErrInvalidLengthNamespace |
| } |
| 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 |
| skippy, err := skipNamespace(dAtA[iNdEx:]) |
| if err != nil { |
| return err |
| } |
| if skippy < 0 { |
| return ErrInvalidLengthNamespace |
| } |
| if (iNdEx + skippy) > l { |
| return io.ErrUnexpectedEOF |
| } |
| iNdEx += skippy |
| } |
| } |
| |
| if iNdEx > l { |
| return io.ErrUnexpectedEOF |
| } |
| return nil |
| } |
| func (m *NamespaceUpdate) 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 ErrIntOverflowNamespace |
| } |
| 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: NamespaceUpdate: wiretype end group for non-group") |
| } |
| if fieldNum <= 0 { |
| return fmt.Errorf("proto: NamespaceUpdate: 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 ErrIntOverflowNamespace |
| } |
| 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 ErrInvalidLengthNamespace |
| } |
| postIndex := iNdEx + intStringLen |
| 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 Labels", wireType) |
| } |
| var msglen int |
| for shift := uint(0); ; shift += 7 { |
| if shift >= 64 { |
| return ErrIntOverflowNamespace |
| } |
| if iNdEx >= l { |
| return io.ErrUnexpectedEOF |
| } |
| b := dAtA[iNdEx] |
| iNdEx++ |
| msglen |= (int(b) & 0x7F) << shift |
| if b < 0x80 { |
| break |
| } |
| } |
| if msglen < 0 { |
| return ErrInvalidLengthNamespace |
| } |
| postIndex := iNdEx + msglen |
| if postIndex > l { |
| return io.ErrUnexpectedEOF |
| } |
| var keykey uint64 |
| for shift := uint(0); ; shift += 7 { |
| if shift >= 64 { |
| return ErrIntOverflowNamespace |
| } |
| 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 ErrIntOverflowNamespace |
| } |
| 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 ErrInvalidLengthNamespace |
| } |
| 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 ErrIntOverflowNamespace |
| } |
| 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 ErrIntOverflowNamespace |
| } |
| 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 ErrInvalidLengthNamespace |
| } |
| 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 |
| skippy, err := skipNamespace(dAtA[iNdEx:]) |
| if err != nil { |
| return err |
| } |
| if skippy < 0 { |
| return ErrInvalidLengthNamespace |
| } |
| if (iNdEx + skippy) > l { |
| return io.ErrUnexpectedEOF |
| } |
| iNdEx += skippy |
| } |
| } |
| |
| if iNdEx > l { |
| return io.ErrUnexpectedEOF |
| } |
| return nil |
| } |
| func (m *NamespaceDelete) 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 ErrIntOverflowNamespace |
| } |
| 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: NamespaceDelete: wiretype end group for non-group") |
| } |
| if fieldNum <= 0 { |
| return fmt.Errorf("proto: NamespaceDelete: 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 ErrIntOverflowNamespace |
| } |
| 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 ErrInvalidLengthNamespace |
| } |
| postIndex := iNdEx + intStringLen |
| if postIndex > l { |
| return io.ErrUnexpectedEOF |
| } |
| m.Name = string(dAtA[iNdEx:postIndex]) |
| iNdEx = postIndex |
| default: |
| iNdEx = preIndex |
| skippy, err := skipNamespace(dAtA[iNdEx:]) |
| if err != nil { |
| return err |
| } |
| if skippy < 0 { |
| return ErrInvalidLengthNamespace |
| } |
| if (iNdEx + skippy) > l { |
| return io.ErrUnexpectedEOF |
| } |
| iNdEx += skippy |
| } |
| } |
| |
| if iNdEx > l { |
| return io.ErrUnexpectedEOF |
| } |
| return nil |
| } |
| func skipNamespace(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, ErrIntOverflowNamespace |
| } |
| 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, ErrIntOverflowNamespace |
| } |
| 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, ErrIntOverflowNamespace |
| } |
| if iNdEx >= l { |
| return 0, io.ErrUnexpectedEOF |
| } |
| b := dAtA[iNdEx] |
| iNdEx++ |
| length |= (int(b) & 0x7F) << shift |
| if b < 0x80 { |
| break |
| } |
| } |
| iNdEx += length |
| if length < 0 { |
| return 0, ErrInvalidLengthNamespace |
| } |
| return iNdEx, nil |
| case 3: |
| for { |
| var innerWire uint64 |
| var start int = iNdEx |
| for shift := uint(0); ; shift += 7 { |
| if shift >= 64 { |
| return 0, ErrIntOverflowNamespace |
| } |
| 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 := skipNamespace(dAtA[start:]) |
| if err != nil { |
| return 0, err |
| } |
| iNdEx = start + next |
| } |
| 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 ( |
| 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/events/v1/namespace.proto", fileDescriptorNamespace) |
| } |
| |
| var fileDescriptorNamespace = []byte{ |
| // 310 bytes of a gzipped FileDescriptorProto |
| 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x72, 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, 0x17, 0xa7, 0x16, 0x95, 0x65, 0x26, 0xa7, 0x16, 0xeb, |
| 0xa7, 0x96, 0xa5, 0xe6, 0x95, 0x14, 0xeb, 0x97, 0x19, 0xea, 0xe7, 0x25, 0xe6, 0xa6, 0x16, 0x17, |
| 0x24, 0x26, 0xa7, 0xea, 0x15, 0x14, 0xe5, 0x97, 0xe4, 0x0b, 0xc9, 0x22, 0xb4, 0xe8, 0xc1, 0x94, |
| 0xeb, 0x41, 0x94, 0xeb, 0x95, 0x19, 0x4a, 0x89, 0xa4, 0xe7, 0xa7, 0xe7, 0x83, 0x55, 0xea, 0x83, |
| 0x58, 0x10, 0x4d, 0x52, 0x0e, 0x04, 0x6d, 0x07, 0xab, 0x4b, 0x2a, 0x4d, 0xd3, 0x2f, 0xc8, 0x29, |
| 0x4d, 0xcf, 0xcc, 0xd3, 0x4f, 0xcb, 0x4c, 0xcd, 0x49, 0x29, 0x48, 0x2c, 0xc9, 0x80, 0x98, 0xa0, |
| 0xb4, 0x85, 0x91, 0x8b, 0xdf, 0x0f, 0xe6, 0x14, 0xe7, 0xa2, 0xd4, 0xc4, 0x92, 0x54, 0x21, 0x21, |
| 0x2e, 0x16, 0x90, 0xeb, 0x24, 0x18, 0x15, 0x18, 0x35, 0x38, 0x83, 0xc0, 0x6c, 0xa1, 0x20, 0x2e, |
| 0xb6, 0x9c, 0xc4, 0xa4, 0xd4, 0x9c, 0x62, 0x09, 0x26, 0x05, 0x66, 0x0d, 0x6e, 0x23, 0x2b, 0x3d, |
| 0xbc, 0xee, 0xd5, 0x43, 0x33, 0x53, 0xcf, 0x07, 0xac, 0xd9, 0x35, 0xaf, 0xa4, 0xa8, 0x32, 0x08, |
| 0x6a, 0x92, 0x94, 0x25, 0x17, 0x37, 0x92, 0xb0, 0x90, 0x00, 0x17, 0x73, 0x76, 0x6a, 0x25, 0xd4, |
| 0x56, 0x10, 0x53, 0x48, 0x84, 0x8b, 0xb5, 0x2c, 0x31, 0xa7, 0x34, 0x55, 0x82, 0x09, 0x2c, 0x06, |
| 0xe1, 0x58, 0x31, 0x59, 0x30, 0xa2, 0x3a, 0x3b, 0xb4, 0x20, 0x85, 0xea, 0xce, 0x86, 0x98, 0x49, |
| 0x6d, 0x67, 0xab, 0x22, 0xb9, 0xda, 0x25, 0x35, 0x27, 0x15, 0xbb, 0xab, 0x9d, 0x62, 0x4e, 0x3c, |
| 0x94, 0x63, 0xb8, 0xf1, 0x50, 0x8e, 0xa1, 0xe1, 0x91, 0x1c, 0xe3, 0x89, 0x47, 0x72, 0x8c, 0x17, |
| 0x1e, 0xc9, 0x31, 0x3e, 0x78, 0x24, 0xc7, 0xb8, 0xe0, 0x8b, 0x1c, 0x63, 0x94, 0x1d, 0x99, 0x49, |
| 0xce, 0x1a, 0xc2, 0x4a, 0x62, 0x03, 0xc7, 0xbc, 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, 0x58, 0x7e, |
| 0x6c, 0xc6, 0xbb, 0x02, 0x00, 0x00, |
| } |