go/proto/admin/v1/history.pb.go (559 lines of code) (raw):

// The MIT License (MIT) // // Copyright (c) 2021 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: uber/cadence/admin/v1/history.proto package adminv1 import ( fmt "fmt" proto "github.com/gogo/protobuf/proto" io "io" math "math" math_bits "math/bits" ) // 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 // VersionHistoryItem contains signal eventId and the corresponding version. type VersionHistoryItem struct { EventId int64 `protobuf:"varint,1,opt,name=event_id,json=eventId,proto3" json:"event_id,omitempty"` Version int64 `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *VersionHistoryItem) Reset() { *m = VersionHistoryItem{} } func (m *VersionHistoryItem) String() string { return proto.CompactTextString(m) } func (*VersionHistoryItem) ProtoMessage() {} func (*VersionHistoryItem) Descriptor() ([]byte, []int) { return fileDescriptor_6cea6a0483af1bed, []int{0} } func (m *VersionHistoryItem) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *VersionHistoryItem) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_VersionHistoryItem.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 *VersionHistoryItem) XXX_Merge(src proto.Message) { xxx_messageInfo_VersionHistoryItem.Merge(m, src) } func (m *VersionHistoryItem) XXX_Size() int { return m.Size() } func (m *VersionHistoryItem) XXX_DiscardUnknown() { xxx_messageInfo_VersionHistoryItem.DiscardUnknown(m) } var xxx_messageInfo_VersionHistoryItem proto.InternalMessageInfo func (m *VersionHistoryItem) GetEventId() int64 { if m != nil { return m.EventId } return 0 } func (m *VersionHistoryItem) GetVersion() int64 { if m != nil { return m.Version } return 0 } // VersionHistory contains the version history of a branch. type VersionHistory struct { BranchToken []byte `protobuf:"bytes,1,opt,name=branch_token,json=branchToken,proto3" json:"branch_token,omitempty"` Items []*VersionHistoryItem `protobuf:"bytes,2,rep,name=items,proto3" json:"items,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } func (m *VersionHistory) Reset() { *m = VersionHistory{} } func (m *VersionHistory) String() string { return proto.CompactTextString(m) } func (*VersionHistory) ProtoMessage() {} func (*VersionHistory) Descriptor() ([]byte, []int) { return fileDescriptor_6cea6a0483af1bed, []int{1} } func (m *VersionHistory) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *VersionHistory) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_VersionHistory.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 *VersionHistory) XXX_Merge(src proto.Message) { xxx_messageInfo_VersionHistory.Merge(m, src) } func (m *VersionHistory) XXX_Size() int { return m.Size() } func (m *VersionHistory) XXX_DiscardUnknown() { xxx_messageInfo_VersionHistory.DiscardUnknown(m) } var xxx_messageInfo_VersionHistory proto.InternalMessageInfo func (m *VersionHistory) GetBranchToken() []byte { if m != nil { return m.BranchToken } return nil } func (m *VersionHistory) GetItems() []*VersionHistoryItem { if m != nil { return m.Items } return nil } func init() { proto.RegisterType((*VersionHistoryItem)(nil), "uber.cadence.admin.v1.VersionHistoryItem") proto.RegisterType((*VersionHistory)(nil), "uber.cadence.admin.v1.VersionHistory") } func init() { proto.RegisterFile("uber/cadence/admin/v1/history.proto", fileDescriptor_6cea6a0483af1bed) } var fileDescriptor_6cea6a0483af1bed = []byte{ // 240 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x2e, 0x4d, 0x4a, 0x2d, 0xd2, 0x4f, 0x4e, 0x4c, 0x49, 0xcd, 0x4b, 0x4e, 0xd5, 0x4f, 0x4c, 0xc9, 0xcd, 0xcc, 0xd3, 0x2f, 0x33, 0xd4, 0xcf, 0xc8, 0x2c, 0x2e, 0xc9, 0x2f, 0xaa, 0xd4, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x05, 0x29, 0xd2, 0x83, 0x2a, 0xd2, 0x03, 0x2b, 0xd2, 0x2b, 0x33, 0x54, 0xf2, 0xe4, 0x12, 0x0a, 0x4b, 0x2d, 0x2a, 0xce, 0xcc, 0xcf, 0xf3, 0x80, 0x28, 0xf7, 0x2c, 0x49, 0xcd, 0x15, 0x92, 0xe4, 0xe2, 0x48, 0x2d, 0x4b, 0xcd, 0x2b, 0x89, 0xcf, 0x4c, 0x91, 0x60, 0x54, 0x60, 0xd4, 0x60, 0x0e, 0x62, 0x07, 0xf3, 0x3d, 0x53, 0x84, 0x24, 0xb8, 0xd8, 0xcb, 0x20, 0x1a, 0x24, 0x98, 0x20, 0x32, 0x50, 0xae, 0x52, 0x09, 0x17, 0x1f, 0xaa, 0x51, 0x42, 0x8a, 0x5c, 0x3c, 0x49, 0x45, 0x89, 0x79, 0xc9, 0x19, 0xf1, 0x25, 0xf9, 0xd9, 0xa9, 0x79, 0x60, 0xa3, 0x78, 0x82, 0xb8, 0x21, 0x62, 0x21, 0x20, 0x21, 0x21, 0x7b, 0x2e, 0xd6, 0xcc, 0x92, 0xd4, 0xdc, 0x62, 0x09, 0x26, 0x05, 0x66, 0x0d, 0x6e, 0x23, 0x4d, 0x3d, 0xac, 0xce, 0xd4, 0xc3, 0x74, 0x63, 0x10, 0x44, 0x9f, 0x93, 0xf3, 0x89, 0x47, 0x72, 0x8c, 0x17, 0x1e, 0xc9, 0x31, 0x3e, 0x78, 0x24, 0xc7, 0x18, 0x65, 0x9a, 0x9e, 0x59, 0x92, 0x51, 0x9a, 0xa4, 0x97, 0x9c, 0x9f, 0xab, 0x8f, 0x1c, 0x2a, 0xba, 0x99, 0x29, 0x39, 0xfa, 0xe9, 0xf9, 0xfa, 0xe0, 0xb0, 0x80, 0x07, 0x91, 0x35, 0x98, 0x51, 0x66, 0x98, 0xc4, 0x06, 0x16, 0x37, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0x36, 0x1c, 0xeb, 0x51, 0x4a, 0x01, 0x00, 0x00, } func (m *VersionHistoryItem) 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 *VersionHistoryItem) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *VersionHistoryItem) 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.Version != 0 { i = encodeVarintHistory(dAtA, i, uint64(m.Version)) i-- dAtA[i] = 0x10 } if m.EventId != 0 { i = encodeVarintHistory(dAtA, i, uint64(m.EventId)) i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } func (m *VersionHistory) 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 *VersionHistory) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } func (m *VersionHistory) 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.Items) > 0 { for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { { size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size i = encodeVarintHistory(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x12 } } if len(m.BranchToken) > 0 { i -= len(m.BranchToken) copy(dAtA[i:], m.BranchToken) i = encodeVarintHistory(dAtA, i, uint64(len(m.BranchToken))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } func encodeVarintHistory(dAtA []byte, offset int, v uint64) int { offset -= sovHistory(v) base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) v >>= 7 offset++ } dAtA[offset] = uint8(v) return base } func (m *VersionHistoryItem) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.EventId != 0 { n += 1 + sovHistory(uint64(m.EventId)) } if m.Version != 0 { n += 1 + sovHistory(uint64(m.Version)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } return n } func (m *VersionHistory) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.BranchToken) if l > 0 { n += 1 + l + sovHistory(uint64(l)) } if len(m.Items) > 0 { for _, e := range m.Items { l = e.Size() n += 1 + l + sovHistory(uint64(l)) } } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } return n } func sovHistory(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } func sozHistory(x uint64) (n int) { return sovHistory(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } func (m *VersionHistoryItem) 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 ErrIntOverflowHistory } 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: VersionHistoryItem: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: VersionHistoryItem: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field EventId", wireType) } m.EventId = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowHistory } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.EventId |= int64(b&0x7F) << shift if b < 0x80 { break } } case 2: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) } m.Version = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowHistory } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Version |= int64(b&0x7F) << shift if b < 0x80 { break } } default: iNdEx = preIndex skippy, err := skipHistory(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthHistory } 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 *VersionHistory) 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 ErrIntOverflowHistory } 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: VersionHistory: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: VersionHistory: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field BranchToken", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowHistory } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } if byteLen < 0 { return ErrInvalidLengthHistory } postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthHistory } if postIndex > l { return io.ErrUnexpectedEOF } m.BranchToken = append(m.BranchToken[:0], dAtA[iNdEx:postIndex]...) if m.BranchToken == nil { m.BranchToken = []byte{} } iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) } var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowHistory } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= int(b&0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthHistory } postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthHistory } if postIndex > l { return io.ErrUnexpectedEOF } m.Items = append(m.Items, &VersionHistoryItem{}) if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipHistory(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthHistory } 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 skipHistory(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, ErrIntOverflowHistory } 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, ErrIntOverflowHistory } 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, ErrIntOverflowHistory } 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, ErrInvalidLengthHistory } iNdEx += length case 3: depth++ case 4: if depth == 0 { return 0, ErrUnexpectedEndOfGroupHistory } depth-- case 5: iNdEx += 4 default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } if iNdEx < 0 { return 0, ErrInvalidLengthHistory } if depth == 0 { return iNdEx, nil } } return 0, io.ErrUnexpectedEOF } var ( ErrInvalidLengthHistory = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowHistory = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupHistory = fmt.Errorf("proto: unexpected end of group") )