// Code generated by protoc-gen-gogo. DO NOT EDIT. // source: github.com/containerd/containerd/api/types/sandbox.proto package types import ( fmt "fmt" 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" math_bits "math/bits" 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.GoGoProtoPackageIsVersion3 // please upgrade the proto package // Sandbox represents a sandbox metadata object that keeps all info required by controller to // work with a particular instance. type Sandbox struct { // SandboxID is a unique instance identifier within namespace SandboxID string `protobuf:"bytes,1,opt,name=sandbox_id,json=sandboxId,proto3" json:"sandbox_id,omitempty"` // Runtime specifies which runtime to use for executing this container. Runtime *Sandbox_Runtime `protobuf:"bytes,2,opt,name=runtime,proto3" json:"runtime,omitempty"` // Spec is sandbox configuration (kin of OCI runtime spec), spec's data will be written to a config.json file in the // bundle directory (similary to OCI spec). Spec *types.Any `protobuf:"bytes,3,opt,name=spec,proto3" json:"spec,omitempty"` // Labels provides an area to include arbitrary data on containers. Labels map[string]string `protobuf:"bytes,4,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // CreatedAt is the time the container was first created. CreatedAt *types.Timestamp `protobuf:"bytes,5,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` // UpdatedAt is the last time the container was mutated. UpdatedAt *types.Timestamp `protobuf:"bytes,6,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` // Extensions allow clients to provide optional blobs that can be handled by runtime. Extensions map[string]*types.Any `protobuf:"bytes,7,rep,name=extensions,proto3" json:"extensions,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *Sandbox) Reset() { *m = Sandbox{} } func (*Sandbox) ProtoMessage() {} func (*Sandbox) Descriptor() ([]byte, []int) { return fileDescriptor_f2257af6cf851f1c, []int{0} } func (m *Sandbox) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *Sandbox) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_Sandbox.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } } func (m *Sandbox) XXX_Merge(src proto.Message) { xxx_messageInfo_Sandbox.Merge(m, src) } func (m *Sandbox) XXX_Size() int { return m.Size() } func (m *Sandbox) XXX_DiscardUnknown() { xxx_messageInfo_Sandbox.DiscardUnknown(m) } var xxx_messageInfo_Sandbox proto.InternalMessageInfo type Sandbox_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 for the shim (this data will be available in StartShim). // Typically this data expected to be runtime shim implementation specific. 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 *Sandbox_Runtime) Reset() { *m = Sandbox_Runtime{} } func (*Sandbox_Runtime) ProtoMessage() {} func (*Sandbox_Runtime) Descriptor() ([]byte, []int) { return fileDescriptor_f2257af6cf851f1c, []int{0, 0} } func (m *Sandbox_Runtime) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *Sandbox_Runtime) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_Sandbox_Runtime.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } } func (m *Sandbox_Runtime) XXX_Merge(src proto.Message) { xxx_messageInfo_Sandbox_Runtime.Merge(m, src) } func (m *Sandbox_Runtime) XXX_Size() int { return m.Size() } func (m *Sandbox_Runtime) XXX_DiscardUnknown() { xxx_messageInfo_Sandbox_Runtime.DiscardUnknown(m) } var xxx_messageInfo_Sandbox_Runtime proto.InternalMessageInfo func init() { proto.RegisterType((*Sandbox)(nil), "containerd.types.Sandbox") proto.RegisterMapType((map[string]*types.Any)(nil), "containerd.types.Sandbox.ExtensionsEntry") proto.RegisterMapType((map[string]string)(nil), "containerd.types.Sandbox.LabelsEntry") proto.RegisterType((*Sandbox_Runtime)(nil), "containerd.types.Sandbox.Runtime") } func init() { proto.RegisterFile("github.com/containerd/containerd/api/types/sandbox.proto", fileDescriptor_f2257af6cf851f1c) } var fileDescriptor_f2257af6cf851f1c = []byte{ // 438 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x93, 0xc1, 0x6b, 0xd4, 0x40, 0x14, 0xc6, 0x77, 0x76, 0xb7, 0x1b, 0xf2, 0x16, 0xb1, 0x0c, 0x7b, 0x88, 0x39, 0xa4, 0xab, 0x20, 0xac, 0x22, 0x13, 0xa9, 0x97, 0xd6, 0xe2, 0x61, 0x8b, 0x3d, 0xac, 0xe8, 0x65, 0xea, 0x41, 0xbc, 0x94, 0xc9, 0x66, 0x8c, 0xc1, 0xcd, 0x4c, 0x48, 0x26, 0xd2, 0xdc, 0xfc, 0xf3, 0x7a, 0xf4, 0xe8, 0x49, 0x6c, 0xfe, 0x0f, 0x41, 0x32, 0x33, 0xb1, 0x61, 0x75, 0xb5, 0x97, 0xf0, 0x86, 0xf7, 0xfb, 0xde, 0xf7, 0xf1, 0x1e, 0x81, 0xa3, 0x24, 0x55, 0x1f, 0xab, 0x88, 0xac, 0x65, 0x16, 0xae, 0xa5, 0x50, 0x2c, 0x15, 0xbc, 0x88, 0xfb, 0x25, 0xcb, 0xd3, 0x50, 0xd5, 0x39, 0x2f, 0xc3, 0x92, 0x89, 0x38, 0x92, 0x97, 0x24, 0x2f, 0xa4, 0x92, 0x78, 0xff, 0x86, 0x21, 0xba, 0xef, 0xcf, 0x12, 0x99, 0x48, 0xdd, 0x0c, 0xdb, 0xca, 0x70, 0xfe, 0xbd, 0x44, 0xca, 0x64, 0xc3, 0x43, 0xfd, 0x8a, 0xaa, 0x0f, 0x21, 0x13, 0xb5, 0x6d, 0x1d, 0x6c, 0xb7, 0x54, 0x9a, 0xf1, 0x52, 0xb1, 0x2c, 0x37, 0xc0, 0x83, 0x9f, 0x63, 0x70, 0xce, 0x8d, 0x2b, 0x7e, 0x02, 0x60, 0x03, 0x5c, 0xa4, 0xb1, 0x87, 0xe6, 0x68, 0xe1, 0x9e, 0xde, 0x69, 0xbe, 0x1f, 0xb8, 0x16, 0x58, 0xbd, 0xa4, 0xae, 0x05, 0x56, 0x31, 0x3e, 0x01, 0xa7, 0xa8, 0x44, 0x3b, 0xcf, 0x1b, 0xce, 0xd1, 0x62, 0x7a, 0x78, 0x9f, 0x6c, 0xe7, 0x25, 0x56, 0x48, 0xa8, 0x01, 0x69, 0xa7, 0xc0, 0x0b, 0x18, 0x97, 0x39, 0x5f, 0x7b, 0x23, 0xad, 0x9c, 0x11, 0x13, 0x93, 0x74, 0x31, 0xc9, 0x52, 0xd4, 0x54, 0x13, 0xf8, 0x05, 0x4c, 0x36, 0x2c, 0xe2, 0x9b, 0xd2, 0x1b, 0xcf, 0x47, 0x8b, 0xe9, 0xe1, 0xc3, 0xdd, 0x2e, 0xaf, 0x35, 0x77, 0x26, 0x54, 0x51, 0x53, 0x2b, 0xc2, 0xc7, 0x00, 0xeb, 0x82, 0x33, 0xc5, 0xe3, 0x0b, 0xa6, 0xbc, 0x3d, 0x6d, 0xe7, 0xff, 0x61, 0xf7, 0xb6, 0xdb, 0x0a, 0x75, 0x2d, 0xbd, 0x54, 0xad, 0xb4, 0xca, 0xe3, 0x4e, 0x3a, 0xf9, 0xbf, 0xd4, 0xd2, 0x4b, 0x85, 0x57, 0x00, 0xfc, 0x52, 0x71, 0x51, 0xa6, 0x52, 0x94, 0x9e, 0xa3, 0x83, 0x3f, 0xda, 0x1d, 0xfc, 0xec, 0x37, 0x6b, 0xc2, 0xf7, 0xc4, 0xfe, 0x1b, 0x70, 0xec, 0xf6, 0x30, 0x86, 0xb1, 0x60, 0x19, 0x37, 0x97, 0xa1, 0xba, 0xc6, 0x04, 0x1c, 0x99, 0x2b, 0x6d, 0x33, 0xfc, 0xc7, 0x2e, 0x3b, 0xc8, 0x3f, 0x86, 0x69, 0x6f, 0x4d, 0x78, 0x1f, 0x46, 0x9f, 0x78, 0x6d, 0x27, 0xb6, 0x25, 0x9e, 0xc1, 0xde, 0x67, 0xb6, 0xa9, 0xcc, 0x51, 0x5d, 0x6a, 0x1e, 0xcf, 0x87, 0x47, 0xc8, 0x3f, 0x87, 0xbb, 0x5b, 0x41, 0xff, 0x22, 0x7f, 0xdc, 0x97, 0xef, 0x4a, 0x73, 0x33, 0xf4, 0xf4, 0xd5, 0xd5, 0x75, 0x30, 0xf8, 0x76, 0x1d, 0x0c, 0xbe, 0x34, 0x01, 0xba, 0x6a, 0x02, 0xf4, 0xb5, 0x09, 0xd0, 0x8f, 0x26, 0x40, 0xef, 0x9f, 0xde, 0xfe, 0xbf, 0x39, 0xd1, 0xdf, 0x77, 0x83, 0x68, 0xa2, 0x6d, 0x9e, 0xfd, 0x0a, 0x00, 0x00, 0xff, 0xff, 0x1b, 0xa8, 0x0f, 0x4d, 0x74, 0x03, 0x00, 0x00, } func (m *Sandbox) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *Sandbox) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *Sandbox) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.XXX_unrecognized != nil { i -= len(m.XXX_unrecognized) copy(dAtA[i:], m.XXX_unrecognized) } if len(m.Extensions) > 0 { for k := range m.Extensions { v := m.Extensions[k] baseI := i if v != nil { { size, err := v.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintSandbox(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x12 } i -= len(k) copy(dAtA[i:], k) i = encodeVarintSandbox(dAtA, i, uint64(len(k))) i-- dAtA[i] = 0xa i = encodeVarintSandbox(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0x3a } } if m.UpdatedAt != nil { { size, err := m.UpdatedAt.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintSandbox(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x32 } if m.CreatedAt != nil { { size, err := m.CreatedAt.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintSandbox(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x2a } if len(m.Labels) > 0 { for k := range m.Labels { v := m.Labels[k] baseI := i i -= len(v) copy(dAtA[i:], v) i = encodeVarintSandbox(dAtA, i, uint64(len(v))) i-- dAtA[i] = 0x12 i -= len(k) copy(dAtA[i:], k) i = encodeVarintSandbox(dAtA, i, uint64(len(k))) i-- dAtA[i] = 0xa i = encodeVarintSandbox(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0x22 } } if m.Spec != nil { { size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintSandbox(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x1a } if m.Runtime != nil { { size, err := m.Runtime.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintSandbox(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x12 } if len(m.SandboxID) > 0 { i -= len(m.SandboxID) copy(dAtA[i:], m.SandboxID) i = encodeVarintSandbox(dAtA, i, uint64(len(m.SandboxID))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func (m *Sandbox_Runtime) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } func (m *Sandbox_Runtime) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *Sandbox_Runtime) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l if m.XXX_unrecognized != nil { i -= len(m.XXX_unrecognized) copy(dAtA[i:], m.XXX_unrecognized) } if m.Options != nil { { size, err := m.Options.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintSandbox(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x12 } if len(m.Name) > 0 { i -= len(m.Name) copy(dAtA[i:], m.Name) i = encodeVarintSandbox(dAtA, i, uint64(len(m.Name))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func encodeVarintSandbox(dAtA []byte, offset int, v uint64) int { offset -= sovSandbox(v) base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) return base } func (m *Sandbox) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.SandboxID) if l > 0 { n += 1 + l + sovSandbox(uint64(l)) } if m.Runtime != nil { l = m.Runtime.Size() n += 1 + l + sovSandbox(uint64(l)) } if m.Spec != nil { l = m.Spec.Size() n += 1 + l + sovSandbox(uint64(l)) } if len(m.Labels) > 0 { for k, v := range m.Labels { _ = k _ = v mapEntrySize := 1 + len(k) + sovSandbox(uint64(len(k))) + 1 + len(v) + sovSandbox(uint64(len(v))) n += mapEntrySize + 1 + sovSandbox(uint64(mapEntrySize)) } } if m.CreatedAt != nil { l = m.CreatedAt.Size() n += 1 + l + sovSandbox(uint64(l)) } if m.UpdatedAt != nil { l = m.UpdatedAt.Size() n += 1 + l + sovSandbox(uint64(l)) } if len(m.Extensions) > 0 { for k, v := range m.Extensions { _ = k _ = v l = 0 if v != nil { l = v.Size() l += 1 + sovSandbox(uint64(l)) } mapEntrySize := 1 + len(k) + sovSandbox(uint64(len(k))) + l n += mapEntrySize + 1 + sovSandbox(uint64(mapEntrySize)) } } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } return n } func (m *Sandbox_Runtime) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.Name) if l > 0 { n += 1 + l + sovSandbox(uint64(l)) } if m.Options != nil { l = m.Options.Size() n += 1 + l + sovSandbox(uint64(l)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } return n } func sovSandbox(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } func sozSandbox(x uint64) (n int) { return sovSandbox(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } func (this *Sandbox) 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 += "}" keysForExtensions := make([]string, 0, len(this.Extensions)) for k, _ := range this.Extensions { keysForExtensions = append(keysForExtensions, k) } 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]) } mapStringForExtensions += "}" s := strings.Join([]string{`&Sandbox{`, `SandboxID:` + fmt.Sprintf("%v", this.SandboxID) + `,`, `Runtime:` + strings.Replace(fmt.Sprintf("%v", this.Runtime), "Sandbox_Runtime", "Sandbox_Runtime", 1) + `,`, `Spec:` + strings.Replace(fmt.Sprintf("%v", this.Spec), "Any", "types.Any", 1) + `,`, `Labels:` + mapStringForLabels + `,`, `CreatedAt:` + strings.Replace(fmt.Sprintf("%v", this.CreatedAt), "Timestamp", "types.Timestamp", 1) + `,`, `UpdatedAt:` + strings.Replace(fmt.Sprintf("%v", this.UpdatedAt), "Timestamp", "types.Timestamp", 1) + `,`, `Extensions:` + mapStringForExtensions + `,`, `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, `}`, }, "") return s } func (this *Sandbox_Runtime) String() string { if this == nil { return "nil" } s := strings.Join([]string{`&Sandbox_Runtime{`, `Name:` + fmt.Sprintf("%v", this.Name) + `,`, `Options:` + strings.Replace(fmt.Sprintf("%v", this.Options), "Any", "types.Any", 1) + `,`, `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, `}`, }, "") return s } func valueToStringSandbox(v interface{}) string { rv := reflect.ValueOf(v) if rv.IsNil() { return "nil" } pv := reflect.Indirect(rv).Interface() return fmt.Sprintf("*%v", pv) } func (m *Sandbox) 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 ErrIntOverflowSandbox } 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: Sandbox: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: Sandbox: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field SandboxID", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSandbox } 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 ErrInvalidLengthSandbox } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthSandbox } if postIndex > l { return io.ErrUnexpectedEOF } m.SandboxID = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: 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 ErrIntOverflowSandbox } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthSandbox } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthSandbox } if postIndex > l { return io.ErrUnexpectedEOF } if m.Runtime == nil { m.Runtime = &Sandbox_Runtime{} } if err := m.Runtime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSandbox } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthSandbox } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthSandbox } if postIndex > l { return io.ErrUnexpectedEOF } if m.Spec == nil { m.Spec = &types.Any{} } if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 4: 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 ErrIntOverflowSandbox } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthSandbox } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthSandbox } if postIndex > l { return io.ErrUnexpectedEOF } if m.Labels == nil { m.Labels = make(map[string]string) } var mapkey string var mapvalue string for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSandbox } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { var stringLenmapkey uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSandbox } 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 ErrInvalidLengthSandbox } postStringIndexmapkey := iNdEx + intStringLenmapkey if postStringIndexmapkey < 0 { return ErrInvalidLengthSandbox } if postStringIndexmapkey > l { return io.ErrUnexpectedEOF } mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) iNdEx = postStringIndexmapkey } else if fieldNum == 2 { var stringLenmapvalue uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSandbox } 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 ErrInvalidLengthSandbox } postStringIndexmapvalue := iNdEx + intStringLenmapvalue if postStringIndexmapvalue < 0 { return ErrInvalidLengthSandbox } if postStringIndexmapvalue > l { return io.ErrUnexpectedEOF } mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) iNdEx = postStringIndexmapvalue } else { iNdEx = entryPreIndex skippy, err := skipSandbox(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthSandbox } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.Labels[mapkey] = mapvalue iNdEx = postIndex case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field CreatedAt", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSandbox } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthSandbox } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthSandbox } if postIndex > l { return io.ErrUnexpectedEOF } if m.CreatedAt == nil { m.CreatedAt = &types.Timestamp{} } if err := m.CreatedAt.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 6: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field UpdatedAt", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSandbox } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthSandbox } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthSandbox } if postIndex > l { return io.ErrUnexpectedEOF } if m.UpdatedAt == nil { m.UpdatedAt = &types.Timestamp{} } if err := m.UpdatedAt.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 7: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Extensions", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSandbox } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthSandbox } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthSandbox } if postIndex > l { return io.ErrUnexpectedEOF } if m.Extensions == nil { m.Extensions = make(map[string]*types.Any) } var mapkey string var mapvalue *types.Any for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSandbox } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ wire |= uint64(b&0x7F) << shift if b < 0x80 { break } } fieldNum := int32(wire >> 3) if fieldNum == 1 { var stringLenmapkey uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSandbox } 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 ErrInvalidLengthSandbox } postStringIndexmapkey := iNdEx + intStringLenmapkey if postStringIndexmapkey < 0 { return ErrInvalidLengthSandbox } if postStringIndexmapkey > l { return io.ErrUnexpectedEOF } mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) iNdEx = postStringIndexmapkey } else if fieldNum == 2 { var mapmsglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSandbox } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ mapmsglen |= int(b&0x7F) << shift if b < 0x80 { break } } if mapmsglen < 0 { return ErrInvalidLengthSandbox } postmsgIndex := iNdEx + mapmsglen if postmsgIndex < 0 { return ErrInvalidLengthSandbox } if postmsgIndex > l { return io.ErrUnexpectedEOF } mapvalue = &types.Any{} if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { return err } iNdEx = postmsgIndex } else { iNdEx = entryPreIndex skippy, err := skipSandbox(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthSandbox } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF } iNdEx += skippy } } m.Extensions[mapkey] = mapvalue iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipSandbox(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthSandbox } 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 *Sandbox_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 ErrIntOverflowSandbox } 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 { return ErrIntOverflowSandbox } 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 ErrInvalidLengthSandbox } postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthSandbox } 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 Options", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowSandbox } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthSandbox } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthSandbox } if postIndex > l { return io.ErrUnexpectedEOF } if m.Options == nil { m.Options = &types.Any{} } if err := m.Options.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipSandbox(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthSandbox } 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 skipSandbox(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowSandbox } 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, ErrIntOverflowSandbox } if iNdEx >= l { return 0, io.ErrUnexpectedEOF } iNdEx++ if dAtA[iNdEx-1] < 0x80 { break } } case 1: iNdEx += 8 case 2: var length int for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowSandbox } 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, ErrInvalidLengthSandbox } iNdEx += length case 3: depth++ case 4: if depth == 0 { return 0, ErrUnexpectedEndOfGroupSandbox } depth-- case 5: iNdEx += 4 default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } if iNdEx < 0 { return 0, ErrInvalidLengthSandbox } if depth == 0 { return iNdEx, nil } } return 0, io.ErrUnexpectedEOF } var ( ErrInvalidLengthSandbox = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowSandbox = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupSandbox = fmt.Errorf("proto: unexpected end of group") )