diff --git a/build-support/scripts/proto-gen-entry.sh b/build-support/scripts/proto-gen-entry.sh index c02df1b5ae..4deb2bf292 100644 --- a/build-support/scripts/proto-gen-entry.sh +++ b/build-support/scripts/proto-gen-entry.sh @@ -5,6 +5,15 @@ echo $PWD if [[ "$FILENAME" =~ .*pbcommon/.* ]]; then echo "$FILENAME no gogo" ./build-support/scripts/proto-gen-no-gogo.sh $1 $2 $3 +elif [[ "$FILENAME" =~ .*pbconnect/.* ]]; then + echo "$FILENAME no gogo" + ./build-support/scripts/proto-gen-no-gogo.sh $1 $2 $3 +elif [[ "$FILENAME" =~ .*pbconfig/.* ]]; then + echo "$FILENAME no gogo" + ./build-support/scripts/proto-gen-no-gogo.sh $1 $2 $3 +elif [[ "$FILENAME" =~ .*pbautoconf/.* ]]; then + echo "$FILENAME no gogo" + ./build-support/scripts/proto-gen-no-gogo.sh $1 $2 $3 else echo "$FILENAME gogo" ./build-support/scripts/proto-gen.sh $1 $2 $3 diff --git a/proto/pbautoconf/auto_config.pb.go b/proto/pbautoconf/auto_config.pb.go index 8a4c25b5db..0f64d9688b 100644 --- a/proto/pbautoconf/auto_config.pb.go +++ b/proto/pbautoconf/auto_config.pb.go @@ -1,4 +1,4 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. +// Code generated by protoc-gen-go. DO NOT EDIT. // source: proto/pbautoconf/auto_config.proto package pbautoconf @@ -8,9 +8,7 @@ import ( proto "github.com/golang/protobuf/proto" pbconfig "github.com/hashicorp/consul/proto/pbconfig" pbconnect "github.com/hashicorp/consul/proto/pbconnect" - io "io" math "math" - math_bits "math/bits" ) // Reference imports to suppress errors if they are not otherwise used. @@ -58,26 +56,18 @@ func (*AutoConfigRequest) ProtoMessage() {} func (*AutoConfigRequest) Descriptor() ([]byte, []int) { return fileDescriptor_ccc5af992e5daf69, []int{0} } + func (m *AutoConfigRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_AutoConfigRequest.Unmarshal(m, b) } func (m *AutoConfigRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AutoConfigRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_AutoConfigRequest.Marshal(b, m, deterministic) } func (m *AutoConfigRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_AutoConfigRequest.Merge(m, src) } func (m *AutoConfigRequest) XXX_Size() int { - return m.Size() + return xxx_messageInfo_AutoConfigRequest.Size(m) } func (m *AutoConfigRequest) XXX_DiscardUnknown() { xxx_messageInfo_AutoConfigRequest.DiscardUnknown(m) @@ -156,26 +146,18 @@ func (*AutoConfigResponse) ProtoMessage() {} func (*AutoConfigResponse) Descriptor() ([]byte, []int) { return fileDescriptor_ccc5af992e5daf69, []int{1} } + func (m *AutoConfigResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_AutoConfigResponse.Unmarshal(m, b) } func (m *AutoConfigResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AutoConfigResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_AutoConfigResponse.Marshal(b, m, deterministic) } func (m *AutoConfigResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_AutoConfigResponse.Merge(m, src) } func (m *AutoConfigResponse) XXX_Size() int { - return m.Size() + return xxx_messageInfo_AutoConfigResponse.Size(m) } func (m *AutoConfigResponse) XXX_DiscardUnknown() { xxx_messageInfo_AutoConfigResponse.DiscardUnknown(m) @@ -221,814 +203,27 @@ func init() { } var fileDescriptor_ccc5af992e5daf69 = []byte{ - // 361 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff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0x2e, 0xb1, 0x7d, 0x90, 0x2a, 0x5d, 0x8e, 0xe1, 0x51, 0x48, 0x56, 0xd3, 0xc6, 0x44, 0xd9, - 0x8c, 0x3f, 0xe2, 0xac, 0x9e, 0xcf, 0xf8, 0x23, 0xde, 0xfb, 0xb0, 0x08, 0x35, 0xf7, 0x50, 0x31, - 0x48, 0x25, 0xe8, 0x01, 0xa9, 0xe5, 0x44, 0x2f, 0x61, 0x0f, 0xb6, 0xdd, 0xe2, 0x38, 0x45, 0xaf, - 0xb0, 0xf4, 0x90, 0xd4, 0xfd, 0x21, 0x07, 0x40, 0xa5, 0x77, 0xb2, 0x07, 0x2d, 0xb7, 0xbc, 0x53, - 0xc1, 0x79, 0x59, 0xa0, 0xa7, 0xc4, 0xf6, 0x45, 0x82, 0xd1, 0x2c, 0x0a, 0x03, 0x14, 0xac, 0xa2, - 0xfb, 0xed, 0x9f, 0xfe, 0x95, 0x52, 0xa9, 0x98, 0x66, 0x0d, 0x6e, 0xf6, 0xe8, 0x31, 0x69, 0x5f, - 0x3e, 0x63, 0x12, 0xf8, 0x43, 0x83, 0x2a, 0x56, 0xed, 0x56, 0xfa, 0x4d, 0xfe, 0x9f, 0x3a, 0x3f, - 0x7b, 0x5b, 0x3b, 0xd6, 0xfb, 0xda, 0xb1, 0x3e, 0xd7, 0x8e, 0xf5, 0xf2, 0xe5, 0x6c, 0xdc, 0x1f, - 0xcd, 0x23, 0x5c, 0xa4, 0x13, 0x37, 0x84, 0x95, 0xb7, 0x08, 0xd4, 0x22, 0x0a, 0x21, 0x89, 0xb3, - 0x2f, 0xaa, 0xd2, 0xa5, 0xf7, 0xf7, 0x9f, 0x99, 0xd4, 0x34, 0x39, 0xf9, 0x0e, 0x00, 0x00, 0xff, - 0xff, 0x65, 0x57, 0x2e, 0x30, 0x4e, 0x02, 0x00, 0x00, + // 340 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 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3, 0x9d, 0xe3, 0x9b, 0x54, 0xbc, 0x65, 0x8d, 0x8b, 0x8a, 0x99, 0x68, 0x26, 0x78, 0xbb, 0x9c, + 0x89, 0x66, 0x62, 0xf4, 0xe5, 0x01, 0x73, 0xf7, 0xd0, 0x19, 0x2a, 0x2d, 0xd9, 0x19, 0xb4, 0x4a, + 0x62, 0x97, 0xf0, 0x27, 0x07, 0x41, 0x75, 0x9c, 0xaa, 0x57, 0x59, 0x76, 0x0e, 0xed, 0x68, 0x2a, + 0x10, 0x49, 0xdb, 0x9d, 0xfc, 0x49, 0x2f, 0xa8, 0xef, 0x54, 0x71, 0x51, 0x17, 0xd8, 0x35, 0xf8, + 0x91, 0xcc, 0x29, 0x5d, 0xa5, 0x49, 0x4c, 0x92, 0x37, 0x6c, 0xbf, 0xff, 0xd3, 0xbf, 0xd7, 0xda, + 0xc8, 0x65, 0xd1, 0x10, 0x6e, 0x8f, 0x5d, 0x42, 0xff, 0xee, 0x83, 0xf2, 0x38, 0x9a, 0x3a, 0x54, + 0xf3, 0xe6, 0xb0, 0x31, 0xee, 0x8a, 0xff, 0xd4, 0x4d, 0xf0, 0x72, 0xb1, 0x4e, 0x69, 0x63, 0x16, + 0x41, 0x82, 0xbb, 0x70, 0x13, 0xeb, 0x4d, 0x9a, 0x60, 0x9e, 0x15, 0x5f, 0x50, 0x9b, 0x6d, 0xf8, + 0xf7, 0x1f, 0x59, 0xb4, 0x2c, 0xb9, 0xfa, 0x0e, 0x00, 0x00, 0xff, 0xff, 0x29, 0xae, 0x66, 0x30, + 0x3e, 0x02, 0x00, 0x00, } - -func (m *AutoConfigRequest) 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 *AutoConfigRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AutoConfigRequest) 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.Partition) > 0 { - i -= len(m.Partition) - copy(dAtA[i:], m.Partition) - i = encodeVarintAutoConfig(dAtA, i, uint64(len(m.Partition))) - i-- - dAtA[i] = 0x42 - } - if len(m.CSR) > 0 { - i -= len(m.CSR) - copy(dAtA[i:], m.CSR) - i = encodeVarintAutoConfig(dAtA, i, uint64(len(m.CSR))) - i-- - dAtA[i] = 0x3a - } - if len(m.ConsulToken) > 0 { - i -= len(m.ConsulToken) - copy(dAtA[i:], m.ConsulToken) - i = encodeVarintAutoConfig(dAtA, i, uint64(len(m.ConsulToken))) - i-- - dAtA[i] = 0x32 - } - if len(m.JWT) > 0 { - i -= len(m.JWT) - copy(dAtA[i:], m.JWT) - i = encodeVarintAutoConfig(dAtA, i, uint64(len(m.JWT))) - i-- - dAtA[i] = 0x2a - } - if len(m.Segment) > 0 { - i -= len(m.Segment) - copy(dAtA[i:], m.Segment) - i = encodeVarintAutoConfig(dAtA, i, uint64(len(m.Segment))) - i-- - dAtA[i] = 0x22 - } - if len(m.Node) > 0 { - i -= len(m.Node) - copy(dAtA[i:], m.Node) - i = encodeVarintAutoConfig(dAtA, i, uint64(len(m.Node))) - i-- - dAtA[i] = 0x12 - } - if len(m.Datacenter) > 0 { - i -= len(m.Datacenter) - copy(dAtA[i:], m.Datacenter) - i = encodeVarintAutoConfig(dAtA, i, uint64(len(m.Datacenter))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *AutoConfigResponse) 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 *AutoConfigResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AutoConfigResponse) 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.ExtraCACertificates) > 0 { - for iNdEx := len(m.ExtraCACertificates) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.ExtraCACertificates[iNdEx]) - copy(dAtA[i:], m.ExtraCACertificates[iNdEx]) - i = encodeVarintAutoConfig(dAtA, i, uint64(len(m.ExtraCACertificates[iNdEx]))) - i-- - dAtA[i] = 0x22 - } - } - if m.Certificate != nil { - { - size, err := m.Certificate.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAutoConfig(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.CARoots != nil { - { - size, err := m.CARoots.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAutoConfig(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Config != nil { - { - size, err := m.Config.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintAutoConfig(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintAutoConfig(dAtA []byte, offset int, v uint64) int { - offset -= sovAutoConfig(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *AutoConfigRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Datacenter) - if l > 0 { - n += 1 + l + sovAutoConfig(uint64(l)) - } - l = len(m.Node) - if l > 0 { - n += 1 + l + sovAutoConfig(uint64(l)) - } - l = len(m.Segment) - if l > 0 { - n += 1 + l + sovAutoConfig(uint64(l)) - } - l = len(m.JWT) - if l > 0 { - n += 1 + l + sovAutoConfig(uint64(l)) - } - l = len(m.ConsulToken) - if l > 0 { - n += 1 + l + sovAutoConfig(uint64(l)) - } - l = len(m.CSR) - if l > 0 { - n += 1 + l + sovAutoConfig(uint64(l)) - } - l = len(m.Partition) - if l > 0 { - n += 1 + l + sovAutoConfig(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AutoConfigResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Config != nil { - l = m.Config.Size() - n += 1 + l + sovAutoConfig(uint64(l)) - } - if m.CARoots != nil { - l = m.CARoots.Size() - n += 1 + l + sovAutoConfig(uint64(l)) - } - if m.Certificate != nil { - l = m.Certificate.Size() - n += 1 + l + sovAutoConfig(uint64(l)) - } - if len(m.ExtraCACertificates) > 0 { - for _, s := range m.ExtraCACertificates { - l = len(s) - n += 1 + l + sovAutoConfig(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovAutoConfig(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozAutoConfig(x uint64) (n int) { - return sovAutoConfig(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *AutoConfigRequest) 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 ErrIntOverflowAutoConfig - } - 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: AutoConfigRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AutoConfigRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Datacenter", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAutoConfig - } - 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 ErrInvalidLengthAutoConfig - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAutoConfig - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Datacenter = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Node", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAutoConfig - } - 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 ErrInvalidLengthAutoConfig - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAutoConfig - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Node = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Segment", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAutoConfig - } - 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 ErrInvalidLengthAutoConfig - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAutoConfig - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Segment = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field JWT", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAutoConfig - } - 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 ErrInvalidLengthAutoConfig - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAutoConfig - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.JWT = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ConsulToken", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAutoConfig - } - 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 ErrInvalidLengthAutoConfig - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAutoConfig - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ConsulToken = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CSR", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAutoConfig - } - 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 ErrInvalidLengthAutoConfig - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAutoConfig - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CSR = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Partition", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAutoConfig - } - 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 ErrInvalidLengthAutoConfig - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAutoConfig - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Partition = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAutoConfig(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthAutoConfig - } - 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 *AutoConfigResponse) 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 ErrIntOverflowAutoConfig - } - 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: AutoConfigResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AutoConfigResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Config", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAutoConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAutoConfig - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAutoConfig - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Config == nil { - m.Config = &pbconfig.Config{} - } - if err := m.Config.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CARoots", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAutoConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAutoConfig - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAutoConfig - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.CARoots == nil { - m.CARoots = &pbconnect.CARoots{} - } - if err := m.CARoots.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Certificate", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAutoConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthAutoConfig - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthAutoConfig - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Certificate == nil { - m.Certificate = &pbconnect.IssuedCert{} - } - if err := m.Certificate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ExtraCACertificates", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAutoConfig - } - 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 ErrInvalidLengthAutoConfig - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAutoConfig - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ExtraCACertificates = append(m.ExtraCACertificates, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAutoConfig(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthAutoConfig - } - 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 skipAutoConfig(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, ErrIntOverflowAutoConfig - } - 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, ErrIntOverflowAutoConfig - } - 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, ErrIntOverflowAutoConfig - } - 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, ErrInvalidLengthAutoConfig - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupAutoConfig - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthAutoConfig - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthAutoConfig = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowAutoConfig = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupAutoConfig = fmt.Errorf("proto: unexpected end of group") -) diff --git a/proto/pbcommon/common.gen.go b/proto/pbcommon/common.gen.go index 14aa7128b3..867e8089cf 100644 --- a/proto/pbcommon/common.gen.go +++ b/proto/pbcommon/common.gen.go @@ -54,3 +54,17 @@ func QueryOptionsFromStructs(t *structs.QueryOptions, s *QueryOptions) { s.MustRevalidate = t.MustRevalidate s.Filter = t.Filter } +func RaftIndexToStructs(s *RaftIndex, t *structs.RaftIndex) { + if s == nil { + return + } + t.CreateIndex = s.CreateIndex + t.ModifyIndex = s.ModifyIndex +} +func RaftIndexFromStructs(t *structs.RaftIndex, s *RaftIndex) { + if s == nil { + return + } + s.CreateIndex = t.CreateIndex + s.ModifyIndex = t.ModifyIndex +} diff --git a/proto/pbcommon/common.pb.go b/proto/pbcommon/common.pb.go index 21f3b1dee7..88a2d55b65 100644 --- a/proto/pbcommon/common.pb.go +++ b/proto/pbcommon/common.pb.go @@ -23,6 +23,13 @@ const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package // RaftIndex is used to track the index used while creating // or modifying a given struct type. +// +// mog annotation: +// +// target=github.com/hashicorp/consul/agent/structs.RaftIndex +// output=common.gen.go +// name=Structs +// ignore-fields=state,sizeCache,unknownFields type RaftIndex struct { // @gotags: bexpr:"-" CreateIndex uint64 `protobuf:"varint,1,opt,name=CreateIndex,proto3" json:"CreateIndex,omitempty" bexpr:"-"` diff --git a/proto/pbcommon/common.proto b/proto/pbcommon/common.proto index b38e77fda8..19efd232ba 100644 --- a/proto/pbcommon/common.proto +++ b/proto/pbcommon/common.proto @@ -9,6 +9,13 @@ import "google/protobuf/duration.proto"; // RaftIndex is used to track the index used while creating // or modifying a given struct type. +// +// mog annotation: +// +// target=github.com/hashicorp/consul/agent/structs.RaftIndex +// output=common.gen.go +// name=Structs +// ignore-fields=state,sizeCache,unknownFields message RaftIndex { // @gotags: bexpr:"-" uint64 CreateIndex = 1; diff --git a/proto/pbconfig/config.pb.go b/proto/pbconfig/config.pb.go index 5828b88ac6..a3dfa4c814 100644 --- a/proto/pbconfig/config.pb.go +++ b/proto/pbconfig/config.pb.go @@ -1,4 +1,4 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. +// Code generated by protoc-gen-go. DO NOT EDIT. // source: proto/pbconfig/config.proto package pbconfig @@ -6,9 +6,7 @@ package pbconfig import ( fmt "fmt" proto "github.com/golang/protobuf/proto" - io "io" math "math" - math_bits "math/bits" ) // Reference imports to suppress errors if they are not otherwise used. @@ -43,26 +41,18 @@ func (*Config) ProtoMessage() {} func (*Config) Descriptor() ([]byte, []int) { return fileDescriptor_aefa824db7b74d77, []int{0} } + func (m *Config) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_Config.Unmarshal(m, b) } func (m *Config) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Config.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_Config.Marshal(b, m, deterministic) } func (m *Config) XXX_Merge(src proto.Message) { xxx_messageInfo_Config.Merge(m, src) } func (m *Config) XXX_Size() int { - return m.Size() + return xxx_messageInfo_Config.Size(m) } func (m *Config) XXX_DiscardUnknown() { xxx_messageInfo_Config.DiscardUnknown(m) @@ -147,26 +137,18 @@ func (*Gossip) ProtoMessage() {} func (*Gossip) Descriptor() ([]byte, []int) { return fileDescriptor_aefa824db7b74d77, []int{1} } + func (m *Gossip) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_Gossip.Unmarshal(m, b) } func (m *Gossip) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Gossip.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_Gossip.Marshal(b, m, deterministic) } func (m *Gossip) XXX_Merge(src proto.Message) { xxx_messageInfo_Gossip.Merge(m, src) } func (m *Gossip) XXX_Size() int { - return m.Size() + return xxx_messageInfo_Gossip.Size(m) } func (m *Gossip) XXX_DiscardUnknown() { xxx_messageInfo_Gossip.DiscardUnknown(m) @@ -203,26 +185,18 @@ func (*GossipEncryption) ProtoMessage() {} func (*GossipEncryption) Descriptor() ([]byte, []int) { return fileDescriptor_aefa824db7b74d77, []int{2} } + func (m *GossipEncryption) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_GossipEncryption.Unmarshal(m, b) } func (m *GossipEncryption) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GossipEncryption.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_GossipEncryption.Marshal(b, m, deterministic) } func (m *GossipEncryption) XXX_Merge(src proto.Message) { xxx_messageInfo_GossipEncryption.Merge(m, src) } func (m *GossipEncryption) XXX_Size() int { - return m.Size() + return xxx_messageInfo_GossipEncryption.Size(m) } func (m *GossipEncryption) XXX_DiscardUnknown() { xxx_messageInfo_GossipEncryption.DiscardUnknown(m) @@ -270,26 +244,18 @@ func (*TLS) ProtoMessage() {} func (*TLS) Descriptor() ([]byte, []int) { return fileDescriptor_aefa824db7b74d77, []int{3} } + func (m *TLS) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_TLS.Unmarshal(m, b) } func (m *TLS) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TLS.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_TLS.Marshal(b, m, deterministic) } func (m *TLS) XXX_Merge(src proto.Message) { xxx_messageInfo_TLS.Merge(m, src) } func (m *TLS) XXX_Size() int { - return m.Size() + return xxx_messageInfo_TLS.Size(m) } func (m *TLS) XXX_DiscardUnknown() { xxx_messageInfo_TLS.DiscardUnknown(m) @@ -358,26 +324,18 @@ func (*ACL) ProtoMessage() {} func (*ACL) Descriptor() ([]byte, []int) { return fileDescriptor_aefa824db7b74d77, []int{4} } + func (m *ACL) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_ACL.Unmarshal(m, b) } func (m *ACL) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ACL.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_ACL.Marshal(b, m, deterministic) } func (m *ACL) XXX_Merge(src proto.Message) { xxx_messageInfo_ACL.Merge(m, src) } func (m *ACL) XXX_Size() int { - return m.Size() + return xxx_messageInfo_ACL.Size(m) } func (m *ACL) XXX_DiscardUnknown() { xxx_messageInfo_ACL.DiscardUnknown(m) @@ -481,26 +439,18 @@ func (*ACLTokens) ProtoMessage() {} func (*ACLTokens) Descriptor() ([]byte, []int) { return fileDescriptor_aefa824db7b74d77, []int{5} } + func (m *ACLTokens) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_ACLTokens.Unmarshal(m, b) } func (m *ACLTokens) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ACLTokens.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_ACLTokens.Marshal(b, m, deterministic) } func (m *ACLTokens) XXX_Merge(src proto.Message) { xxx_messageInfo_ACLTokens.Merge(m, src) } func (m *ACLTokens) XXX_Size() int { - return m.Size() + return xxx_messageInfo_ACLTokens.Size(m) } func (m *ACLTokens) XXX_DiscardUnknown() { xxx_messageInfo_ACLTokens.DiscardUnknown(m) @@ -564,26 +514,18 @@ func (*ACLServiceProviderToken) ProtoMessage() {} func (*ACLServiceProviderToken) Descriptor() ([]byte, []int) { return fileDescriptor_aefa824db7b74d77, []int{6} } + func (m *ACLServiceProviderToken) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_ACLServiceProviderToken.Unmarshal(m, b) } func (m *ACLServiceProviderToken) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ACLServiceProviderToken.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_ACLServiceProviderToken.Marshal(b, m, deterministic) } func (m *ACLServiceProviderToken) XXX_Merge(src proto.Message) { xxx_messageInfo_ACLServiceProviderToken.Merge(m, src) } func (m *ACLServiceProviderToken) XXX_Size() int { - return m.Size() + return xxx_messageInfo_ACLServiceProviderToken.Size(m) } func (m *ACLServiceProviderToken) XXX_DiscardUnknown() { xxx_messageInfo_ACLServiceProviderToken.DiscardUnknown(m) @@ -621,26 +563,18 @@ func (*AutoEncrypt) ProtoMessage() {} func (*AutoEncrypt) Descriptor() ([]byte, []int) { return fileDescriptor_aefa824db7b74d77, []int{7} } + func (m *AutoEncrypt) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_AutoEncrypt.Unmarshal(m, b) } func (m *AutoEncrypt) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AutoEncrypt.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_AutoEncrypt.Marshal(b, m, deterministic) } func (m *AutoEncrypt) XXX_Merge(src proto.Message) { xxx_messageInfo_AutoEncrypt.Merge(m, src) } func (m *AutoEncrypt) XXX_Size() int { - return m.Size() + return xxx_messageInfo_AutoEncrypt.Size(m) } func (m *AutoEncrypt) XXX_DiscardUnknown() { xxx_messageInfo_AutoEncrypt.DiscardUnknown(m) @@ -687,2655 +621,61 @@ func init() { proto.RegisterType((*AutoEncrypt)(nil), "config.AutoEncrypt") } -func init() { proto.RegisterFile("proto/pbconfig/config.proto", fileDescriptor_aefa824db7b74d77) } +func init() { + proto.RegisterFile("proto/pbconfig/config.proto", fileDescriptor_aefa824db7b74d77) +} var fileDescriptor_aefa824db7b74d77 = []byte{ - // 831 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x55, 0xdd, 0x8e, 0xdb, 0x44, - 0x14, 0xc6, 0x71, 0xeb, 0xdd, 0x4c, 0xa0, 0x6a, 0xa7, 0x65, 0xb1, 0xf8, 0x09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0xf0, 0xaa, 0x61, 0x9a, 0x8a, 0x97, 0xe8, 0xe4, 0x9e, 0x76, 0x52, 0xd9, - 0x97, 0xdf, 0xfe, 0x75, 0xdb, 0x77, 0xfe, 0xb9, 0xed, 0x3b, 0xff, 0xde, 0xf6, 0x9d, 0x3f, 0xfe, - 0xeb, 0xbf, 0xf1, 0xcb, 0xa7, 0x6b, 0xa6, 0x36, 0xbb, 0xc5, 0x59, 0x22, 0xb6, 0xe7, 0x9b, 0x38, - 0xdf, 0xb0, 0x44, 0xc8, 0x0c, 0x3f, 0x7b, 0xf9, 0x2e, 0x3d, 0x6f, 0x7f, 0x0c, 0x17, 0x9e, 0xb6, - 0xbf, 0x78, 0x15, 0x00, 0x00, 0xff, 0xff, 0x4f, 0xaf, 0xda, 0x68, 0x25, 0x07, 0x00, 0x00, + // 805 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x55, 0xdd, 0x8e, 0x22, 0x45, + 0x14, 0x0e, 0xf4, 0x6e, 0x0f, 0x14, 0xba, 0xd9, 0xad, 0x5d, 0xb1, 0xe3, 0x2f, 0x69, 0xcd, 0x06, + 0xcd, 0x66, 0x30, 0x63, 0x34, 0x7a, 0xc9, 0xc0, 0x46, 0x71, 0x19, 0x24, 0xdd, 0x38, 0x26, 0xde, + 0x98, 0xa6, 0x39, 0x40, 0xc5, 0xa6, 0xaa, 0x53, 0x5d, 0xcc, 0xa4, 0x5f, 0xc1, 0x57, 0xf2, 0x21, + 0x7c, 0x1f, 0xaf, 0xcc, 0xa9, 0xaa, 0xfe, 0x9b, 0x81, 0x2b, 0x38, 0xdf, 0xf7, 0xd5, 0xa9, 0x73, + 0xea, 0xfc, 0x34, 0xf9, 0x38, 0x95, 0x42, 0x89, 0x51, 0xba, 0x8e, 0x05, 0xdf, 0xb2, 0xdd, 0xc8, + 0xfc, 0x5c, 0x6a, 0x94, 0xba, 0xc6, 0xf2,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, 0xc0, 0xc6, 0xa0, 0xbf, 0x93, + 0xbe, 0x89, 0x62, 0x83, 0xed, 0xc8, 0x62, 0x58, 0x4a, 0x71, 0xc7, 0x36, 0x20, 0x3d, 0x77, 0xe0, + 0x0c, 0x7b, 0x57, 0x9f, 0xd7, 0x6a, 0xf2, 0x40, 0xa1, 0xf3, 0x0c, 0xce, 0x1c, 0xf7, 0x7f, 0x23, + 0x1f, 0x9e, 0x39, 0x82, 0xfd, 0x36, 0x8e, 0x63, 0xc8, 0x32, 0x21, 0x67, 0xd3, 0xe2, 0x3b, 0x50, + 0x21, 0xd8, 0xab, 0x21, 0xc4, 0x12, 0xd4, 0x6c, 0x6a, 0x1f, 0xa2, 0xb4, 0x7d, 0xd6, 0x58, 0xbd, + 0xb8, 0x8f, 0x70, 0x55, 0x9a, 0x21, 0xd1, 0x7b, 0xa3, 0x4f, 0xdc, 0xe9, 0x22, 0x0c, 0xcb, 0x9d, + 0x66, 0x2d, 0x4c, 0x7f, 0xb6, 0x44, 0xd8, 0xd1, 0xb0, 0x31, 0xf0, 0xaa, 0x71, 0x92, 0x88, 0x7b, + 0x74, 0xf2, 0x44, 0x3b, 0x29, 0xed, 0xeb, 0x37, 0x7f, 0x7c, 0xbd, 0x63, 0x6a, 0x7f, 0x5c, 0x5f, + 0xc6, 0xe2, 0x30, 0xda, 0x47, 0xd9, 0x9e, 0xc5, 0x42, 0xa6, 0xf8, 0x99, 0xcb, 0x8e, 0xc9, 0xa8, + 0xf9, 0xf1, 0x5b, 0xbb, 0xda, 0xfe, 0xf6, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0xa0, 0x97, 0xb9, + 0xb8, 0x15, 0x07, 0x00, 0x00, } - -func (m *Config) 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 *Config) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Config) 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.Partition) > 0 { - i -= len(m.Partition) - copy(dAtA[i:], m.Partition) - i = encodeVarintConfig(dAtA, i, uint64(len(m.Partition))) - i-- - dAtA[i] = 0x4a - } - if m.TLS != nil { - { - size, err := m.TLS.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintConfig(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x42 - } - if m.Gossip != nil { - { - size, err := m.Gossip.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintConfig(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a - } - if m.AutoEncrypt != nil { - { - size, err := m.AutoEncrypt.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintConfig(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - } - if m.ACL != nil { - { - size, err := m.ACL.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintConfig(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - if len(m.SegmentName) > 0 { - i -= len(m.SegmentName) - copy(dAtA[i:], m.SegmentName) - i = encodeVarintConfig(dAtA, i, uint64(len(m.SegmentName))) - i-- - dAtA[i] = 0x22 - } - if len(m.NodeName) > 0 { - i -= len(m.NodeName) - copy(dAtA[i:], m.NodeName) - i = encodeVarintConfig(dAtA, i, uint64(len(m.NodeName))) - i-- - dAtA[i] = 0x1a - } - if len(m.PrimaryDatacenter) > 0 { - i -= len(m.PrimaryDatacenter) - copy(dAtA[i:], m.PrimaryDatacenter) - i = encodeVarintConfig(dAtA, i, uint64(len(m.PrimaryDatacenter))) - i-- - dAtA[i] = 0x12 - } - if len(m.Datacenter) > 0 { - i -= len(m.Datacenter) - copy(dAtA[i:], m.Datacenter) - i = encodeVarintConfig(dAtA, i, uint64(len(m.Datacenter))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Gossip) 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 *Gossip) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Gossip) 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.RetryJoinLAN) > 0 { - for iNdEx := len(m.RetryJoinLAN) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.RetryJoinLAN[iNdEx]) - copy(dAtA[i:], m.RetryJoinLAN[iNdEx]) - i = encodeVarintConfig(dAtA, i, uint64(len(m.RetryJoinLAN[iNdEx]))) - i-- - dAtA[i] = 0x12 - } - } - if m.Encryption != nil { - { - size, err := m.Encryption.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintConfig(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *GossipEncryption) 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 *GossipEncryption) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GossipEncryption) 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.VerifyOutgoing { - i-- - if m.VerifyOutgoing { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x18 - } - if m.VerifyIncoming { - i-- - if m.VerifyIncoming { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x10 - } - if len(m.Key) > 0 { - i -= len(m.Key) - copy(dAtA[i:], m.Key) - i = encodeVarintConfig(dAtA, i, uint64(len(m.Key))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *TLS) 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 *TLS) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TLS) 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.Deprecated_PreferServerCipherSuites { - i-- - if m.Deprecated_PreferServerCipherSuites { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x28 - } - if len(m.MinVersion) > 0 { - i -= len(m.MinVersion) - copy(dAtA[i:], m.MinVersion) - i = encodeVarintConfig(dAtA, i, uint64(len(m.MinVersion))) - i-- - dAtA[i] = 0x22 - } - if len(m.CipherSuites) > 0 { - i -= len(m.CipherSuites) - copy(dAtA[i:], m.CipherSuites) - i = encodeVarintConfig(dAtA, i, uint64(len(m.CipherSuites))) - i-- - dAtA[i] = 0x1a - } - if m.VerifyServerHostname { - i-- - if m.VerifyServerHostname { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x10 - } - if m.VerifyOutgoing { - i-- - if m.VerifyOutgoing { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *ACL) 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 *ACL) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ACL) 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.MSPDisableBootstrap { - i-- - if m.MSPDisableBootstrap { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x58 - } - if m.EnableTokenPersistence { - i-- - if m.EnableTokenPersistence { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x50 - } - if len(m.Deprecated_DisabledTTL) > 0 { - i -= len(m.Deprecated_DisabledTTL) - copy(dAtA[i:], m.Deprecated_DisabledTTL) - i = encodeVarintConfig(dAtA, i, uint64(len(m.Deprecated_DisabledTTL))) - i-- - dAtA[i] = 0x4a - } - if m.Tokens != nil { - { - size, err := m.Tokens.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintConfig(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x42 - } - if m.EnableKeyListPolicy { - i-- - if m.EnableKeyListPolicy { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x38 - } - if len(m.DefaultPolicy) > 0 { - i -= len(m.DefaultPolicy) - copy(dAtA[i:], m.DefaultPolicy) - i = encodeVarintConfig(dAtA, i, uint64(len(m.DefaultPolicy))) - i-- - dAtA[i] = 0x32 - } - if len(m.DownPolicy) > 0 { - i -= len(m.DownPolicy) - copy(dAtA[i:], m.DownPolicy) - i = encodeVarintConfig(dAtA, i, uint64(len(m.DownPolicy))) - i-- - dAtA[i] = 0x2a - } - if len(m.TokenTTL) > 0 { - i -= len(m.TokenTTL) - copy(dAtA[i:], m.TokenTTL) - i = encodeVarintConfig(dAtA, i, uint64(len(m.TokenTTL))) - i-- - dAtA[i] = 0x22 - } - if len(m.RoleTTL) > 0 { - i -= len(m.RoleTTL) - copy(dAtA[i:], m.RoleTTL) - i = encodeVarintConfig(dAtA, i, uint64(len(m.RoleTTL))) - i-- - dAtA[i] = 0x1a - } - if len(m.PolicyTTL) > 0 { - i -= len(m.PolicyTTL) - copy(dAtA[i:], m.PolicyTTL) - i = encodeVarintConfig(dAtA, i, uint64(len(m.PolicyTTL))) - i-- - dAtA[i] = 0x12 - } - if m.Enabled { - i-- - if m.Enabled { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *ACLTokens) 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 *ACLTokens) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ACLTokens) 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.ManagedServiceProvider) > 0 { - for iNdEx := len(m.ManagedServiceProvider) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.ManagedServiceProvider[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintConfig(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - } - } - if len(m.Agent) > 0 { - i -= len(m.Agent) - copy(dAtA[i:], m.Agent) - i = encodeVarintConfig(dAtA, i, uint64(len(m.Agent))) - i-- - dAtA[i] = 0x2a - } - if len(m.Default) > 0 { - i -= len(m.Default) - copy(dAtA[i:], m.Default) - i = encodeVarintConfig(dAtA, i, uint64(len(m.Default))) - i-- - dAtA[i] = 0x22 - } - if len(m.AgentRecovery) > 0 { - i -= len(m.AgentRecovery) - copy(dAtA[i:], m.AgentRecovery) - i = encodeVarintConfig(dAtA, i, uint64(len(m.AgentRecovery))) - i-- - dAtA[i] = 0x1a - } - if len(m.Replication) > 0 { - i -= len(m.Replication) - copy(dAtA[i:], m.Replication) - i = encodeVarintConfig(dAtA, i, uint64(len(m.Replication))) - i-- - dAtA[i] = 0x12 - } - if len(m.InitialManagement) > 0 { - i -= len(m.InitialManagement) - copy(dAtA[i:], m.InitialManagement) - i = encodeVarintConfig(dAtA, i, uint64(len(m.InitialManagement))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ACLServiceProviderToken) 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 *ACLServiceProviderToken) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ACLServiceProviderToken) 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.SecretID) > 0 { - i -= len(m.SecretID) - copy(dAtA[i:], m.SecretID) - i = encodeVarintConfig(dAtA, i, uint64(len(m.SecretID))) - i-- - dAtA[i] = 0x12 - } - if len(m.AccessorID) > 0 { - i -= len(m.AccessorID) - copy(dAtA[i:], m.AccessorID) - i = encodeVarintConfig(dAtA, i, uint64(len(m.AccessorID))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *AutoEncrypt) 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 *AutoEncrypt) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AutoEncrypt) 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.AllowTLS { - i-- - if m.AllowTLS { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x20 - } - if len(m.IPSAN) > 0 { - for iNdEx := len(m.IPSAN) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.IPSAN[iNdEx]) - copy(dAtA[i:], m.IPSAN[iNdEx]) - i = encodeVarintConfig(dAtA, i, uint64(len(m.IPSAN[iNdEx]))) - i-- - dAtA[i] = 0x1a - } - } - if len(m.DNSSAN) > 0 { - for iNdEx := len(m.DNSSAN) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.DNSSAN[iNdEx]) - copy(dAtA[i:], m.DNSSAN[iNdEx]) - i = encodeVarintConfig(dAtA, i, uint64(len(m.DNSSAN[iNdEx]))) - i-- - dAtA[i] = 0x12 - } - } - if m.TLS { - i-- - if m.TLS { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func encodeVarintConfig(dAtA []byte, offset int, v uint64) int { - offset -= sovConfig(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *Config) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Datacenter) - if l > 0 { - n += 1 + l + sovConfig(uint64(l)) - } - l = len(m.PrimaryDatacenter) - if l > 0 { - n += 1 + l + sovConfig(uint64(l)) - } - l = len(m.NodeName) - if l > 0 { - n += 1 + l + sovConfig(uint64(l)) - } - l = len(m.SegmentName) - if l > 0 { - n += 1 + l + sovConfig(uint64(l)) - } - if m.ACL != nil { - l = m.ACL.Size() - n += 1 + l + sovConfig(uint64(l)) - } - if m.AutoEncrypt != nil { - l = m.AutoEncrypt.Size() - n += 1 + l + sovConfig(uint64(l)) - } - if m.Gossip != nil { - l = m.Gossip.Size() - n += 1 + l + sovConfig(uint64(l)) - } - if m.TLS != nil { - l = m.TLS.Size() - n += 1 + l + sovConfig(uint64(l)) - } - l = len(m.Partition) - if l > 0 { - n += 1 + l + sovConfig(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Gossip) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Encryption != nil { - l = m.Encryption.Size() - n += 1 + l + sovConfig(uint64(l)) - } - if len(m.RetryJoinLAN) > 0 { - for _, s := range m.RetryJoinLAN { - l = len(s) - n += 1 + l + sovConfig(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *GossipEncryption) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Key) - if l > 0 { - n += 1 + l + sovConfig(uint64(l)) - } - if m.VerifyIncoming { - n += 2 - } - if m.VerifyOutgoing { - n += 2 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *TLS) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.VerifyOutgoing { - n += 2 - } - if m.VerifyServerHostname { - n += 2 - } - l = len(m.CipherSuites) - if l > 0 { - n += 1 + l + sovConfig(uint64(l)) - } - l = len(m.MinVersion) - if l > 0 { - n += 1 + l + sovConfig(uint64(l)) - } - if m.Deprecated_PreferServerCipherSuites { - n += 2 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ACL) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Enabled { - n += 2 - } - l = len(m.PolicyTTL) - if l > 0 { - n += 1 + l + sovConfig(uint64(l)) - } - l = len(m.RoleTTL) - if l > 0 { - n += 1 + l + sovConfig(uint64(l)) - } - l = len(m.TokenTTL) - if l > 0 { - n += 1 + l + sovConfig(uint64(l)) - } - l = len(m.DownPolicy) - if l > 0 { - n += 1 + l + sovConfig(uint64(l)) - } - l = len(m.DefaultPolicy) - if l > 0 { - n += 1 + l + sovConfig(uint64(l)) - } - if m.EnableKeyListPolicy { - n += 2 - } - if m.Tokens != nil { - l = m.Tokens.Size() - n += 1 + l + sovConfig(uint64(l)) - } - l = len(m.Deprecated_DisabledTTL) - if l > 0 { - n += 1 + l + sovConfig(uint64(l)) - } - if m.EnableTokenPersistence { - n += 2 - } - if m.MSPDisableBootstrap { - n += 2 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ACLTokens) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.InitialManagement) - if l > 0 { - n += 1 + l + sovConfig(uint64(l)) - } - l = len(m.Replication) - if l > 0 { - n += 1 + l + sovConfig(uint64(l)) - } - l = len(m.AgentRecovery) - if l > 0 { - n += 1 + l + sovConfig(uint64(l)) - } - l = len(m.Default) - if l > 0 { - n += 1 + l + sovConfig(uint64(l)) - } - l = len(m.Agent) - if l > 0 { - n += 1 + l + sovConfig(uint64(l)) - } - if len(m.ManagedServiceProvider) > 0 { - for _, e := range m.ManagedServiceProvider { - l = e.Size() - n += 1 + l + sovConfig(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *ACLServiceProviderToken) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.AccessorID) - if l > 0 { - n += 1 + l + sovConfig(uint64(l)) - } - l = len(m.SecretID) - if l > 0 { - n += 1 + l + sovConfig(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *AutoEncrypt) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.TLS { - n += 2 - } - if len(m.DNSSAN) > 0 { - for _, s := range m.DNSSAN { - l = len(s) - n += 1 + l + sovConfig(uint64(l)) - } - } - if len(m.IPSAN) > 0 { - for _, s := range m.IPSAN { - l = len(s) - n += 1 + l + sovConfig(uint64(l)) - } - } - if m.AllowTLS { - n += 2 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovConfig(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozConfig(x uint64) (n int) { - return sovConfig(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *Config) 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 ErrIntOverflowConfig - } - 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: Config: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Config: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Datacenter", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfig - } - 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 ErrInvalidLengthConfig - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthConfig - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Datacenter = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PrimaryDatacenter", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfig - } - 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 ErrInvalidLengthConfig - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthConfig - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PrimaryDatacenter = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NodeName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfig - } - 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 ErrInvalidLengthConfig - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthConfig - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.NodeName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SegmentName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfig - } - 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 ErrInvalidLengthConfig - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthConfig - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SegmentName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ACL", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthConfig - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthConfig - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ACL == nil { - m.ACL = &ACL{} - } - if err := m.ACL.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AutoEncrypt", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthConfig - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthConfig - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.AutoEncrypt == nil { - m.AutoEncrypt = &AutoEncrypt{} - } - if err := m.AutoEncrypt.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Gossip", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthConfig - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthConfig - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Gossip == nil { - m.Gossip = &Gossip{} - } - if err := m.Gossip.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TLS", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthConfig - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthConfig - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.TLS == nil { - m.TLS = &TLS{} - } - if err := m.TLS.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Partition", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfig - } - 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 ErrInvalidLengthConfig - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthConfig - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Partition = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipConfig(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthConfig - } - 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 *Gossip) 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 ErrIntOverflowConfig - } - 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: Gossip: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Gossip: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Encryption", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthConfig - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthConfig - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Encryption == nil { - m.Encryption = &GossipEncryption{} - } - if err := m.Encryption.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RetryJoinLAN", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfig - } - 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 ErrInvalidLengthConfig - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthConfig - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RetryJoinLAN = append(m.RetryJoinLAN, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipConfig(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthConfig - } - 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 *GossipEncryption) 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 ErrIntOverflowConfig - } - 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: GossipEncryption: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GossipEncryption: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfig - } - 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 ErrInvalidLengthConfig - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthConfig - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Key = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field VerifyIncoming", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.VerifyIncoming = bool(v != 0) - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field VerifyOutgoing", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.VerifyOutgoing = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipConfig(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthConfig - } - 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 *TLS) 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 ErrIntOverflowConfig - } - 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: TLS: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TLS: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field VerifyOutgoing", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.VerifyOutgoing = bool(v != 0) - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field VerifyServerHostname", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.VerifyServerHostname = bool(v != 0) - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CipherSuites", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfig - } - 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 ErrInvalidLengthConfig - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthConfig - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CipherSuites = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MinVersion", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfig - } - 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 ErrInvalidLengthConfig - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthConfig - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.MinVersion = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Deprecated_PreferServerCipherSuites", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Deprecated_PreferServerCipherSuites = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipConfig(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthConfig - } - 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 *ACL) 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 ErrIntOverflowConfig - } - 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: ACL: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ACL: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Enabled", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Enabled = bool(v != 0) - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PolicyTTL", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfig - } - 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 ErrInvalidLengthConfig - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthConfig - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PolicyTTL = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RoleTTL", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfig - } - 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 ErrInvalidLengthConfig - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthConfig - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RoleTTL = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TokenTTL", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfig - } - 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 ErrInvalidLengthConfig - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthConfig - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TokenTTL = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DownPolicy", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfig - } - 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 ErrInvalidLengthConfig - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthConfig - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DownPolicy = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DefaultPolicy", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfig - } - 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 ErrInvalidLengthConfig - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthConfig - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DefaultPolicy = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EnableKeyListPolicy", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.EnableKeyListPolicy = bool(v != 0) - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Tokens", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthConfig - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthConfig - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Tokens == nil { - m.Tokens = &ACLTokens{} - } - if err := m.Tokens.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Deprecated_DisabledTTL", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfig - } - 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 ErrInvalidLengthConfig - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthConfig - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Deprecated_DisabledTTL = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 10: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field EnableTokenPersistence", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.EnableTokenPersistence = bool(v != 0) - case 11: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MSPDisableBootstrap", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.MSPDisableBootstrap = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipConfig(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthConfig - } - 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 *ACLTokens) 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 ErrIntOverflowConfig - } - 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: ACLTokens: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ACLTokens: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field InitialManagement", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfig - } - 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 ErrInvalidLengthConfig - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthConfig - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.InitialManagement = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Replication", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfig - } - 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 ErrInvalidLengthConfig - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthConfig - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Replication = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AgentRecovery", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfig - } - 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 ErrInvalidLengthConfig - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthConfig - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AgentRecovery = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Default", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfig - } - 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 ErrInvalidLengthConfig - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthConfig - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Default = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Agent", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfig - } - 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 ErrInvalidLengthConfig - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthConfig - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Agent = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ManagedServiceProvider", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthConfig - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthConfig - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ManagedServiceProvider = append(m.ManagedServiceProvider, &ACLServiceProviderToken{}) - if err := m.ManagedServiceProvider[len(m.ManagedServiceProvider)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipConfig(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthConfig - } - 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 *ACLServiceProviderToken) 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 ErrIntOverflowConfig - } - 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: ACLServiceProviderToken: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ACLServiceProviderToken: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AccessorID", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfig - } - 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 ErrInvalidLengthConfig - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthConfig - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AccessorID = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SecretID", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfig - } - 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 ErrInvalidLengthConfig - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthConfig - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SecretID = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipConfig(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthConfig - } - 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 *AutoEncrypt) 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 ErrIntOverflowConfig - } - 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: AutoEncrypt: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AutoEncrypt: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TLS", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.TLS = bool(v != 0) - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DNSSAN", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfig - } - 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 ErrInvalidLengthConfig - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthConfig - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DNSSAN = append(m.DNSSAN, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field IPSAN", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfig - } - 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 ErrInvalidLengthConfig - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthConfig - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.IPSAN = append(m.IPSAN, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AllowTLS", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConfig - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.AllowTLS = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipConfig(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthConfig - } - 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 skipConfig(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, ErrIntOverflowConfig - } - 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, ErrIntOverflowConfig - } - 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, ErrIntOverflowConfig - } - 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, ErrInvalidLengthConfig - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupConfig - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthConfig - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthConfig = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowConfig = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupConfig = fmt.Errorf("proto: unexpected end of group") -) diff --git a/proto/pbconnect/connect.gen.go b/proto/pbconnect/connect.gen.go index 433a065b70..a9fbdfe24e 100644 --- a/proto/pbconnect/connect.gen.go +++ b/proto/pbconnect/connect.gen.go @@ -13,14 +13,14 @@ func CARootToStructsCARoot(s *CARoot, t *structs.CARoot) { t.SerialNumber = s.SerialNumber t.SigningKeyID = s.SigningKeyID t.ExternalTrustDomain = s.ExternalTrustDomain - t.NotBefore = structs.TimeFromProtoGogo(s.NotBefore) - t.NotAfter = structs.TimeFromProtoGogo(s.NotAfter) + t.NotBefore = structs.TimeFromProto(s.NotBefore) + t.NotAfter = structs.TimeFromProto(s.NotAfter) t.RootCert = s.RootCert t.IntermediateCerts = s.IntermediateCerts t.SigningCert = s.SigningCert t.SigningKey = s.SigningKey t.Active = s.Active - t.RotatedOutAt = structs.TimeFromProtoGogo(s.RotatedOutAt) + t.RotatedOutAt = structs.TimeFromProto(s.RotatedOutAt) t.PrivateKeyType = s.PrivateKeyType t.PrivateKeyBits = int(s.PrivateKeyBits) t.RaftIndex = RaftIndexTo(s.RaftIndex) @@ -34,14 +34,14 @@ func CARootFromStructsCARoot(t *structs.CARoot, s *CARoot) { s.SerialNumber = t.SerialNumber s.SigningKeyID = t.SigningKeyID s.ExternalTrustDomain = t.ExternalTrustDomain - s.NotBefore = structs.TimeToProtoGogo(t.NotBefore) - s.NotAfter = structs.TimeToProtoGogo(t.NotAfter) + s.NotBefore = structs.TimeToProto(t.NotBefore) + s.NotAfter = structs.TimeToProto(t.NotAfter) s.RootCert = t.RootCert s.IntermediateCerts = t.IntermediateCerts s.SigningCert = t.SigningCert s.SigningKey = t.SigningKey s.Active = t.Active - s.RotatedOutAt = structs.TimeToProtoGogo(t.RotatedOutAt) + s.RotatedOutAt = structs.TimeToProto(t.RotatedOutAt) s.PrivateKeyType = t.PrivateKeyType s.PrivateKeyBits = int32(t.PrivateKeyBits) s.RaftIndex = RaftIndexFrom(t.RaftIndex) @@ -93,8 +93,8 @@ func IssuedCertToStructsIssuedCert(s *IssuedCert, t *structs.IssuedCert) { t.ServiceURI = s.ServiceURI t.Agent = s.Agent t.AgentURI = s.AgentURI - t.ValidAfter = structs.TimeFromProtoGogo(s.ValidAfter) - t.ValidBefore = structs.TimeFromProtoGogo(s.ValidBefore) + t.ValidAfter = structs.TimeFromProto(s.ValidAfter) + t.ValidBefore = structs.TimeFromProto(s.ValidBefore) t.EnterpriseMeta = EnterpriseMetaTo(s.EnterpriseMeta) t.RaftIndex = RaftIndexTo(s.RaftIndex) } @@ -109,8 +109,8 @@ func IssuedCertFromStructsIssuedCert(t *structs.IssuedCert, s *IssuedCert) { s.ServiceURI = t.ServiceURI s.Agent = t.Agent s.AgentURI = t.AgentURI - s.ValidAfter = structs.TimeToProtoGogo(t.ValidAfter) - s.ValidBefore = structs.TimeToProtoGogo(t.ValidBefore) + s.ValidAfter = structs.TimeToProto(t.ValidAfter) + s.ValidBefore = structs.TimeToProto(t.ValidBefore) s.EnterpriseMeta = EnterpriseMetaFrom(t.EnterpriseMeta) s.RaftIndex = RaftIndexFrom(t.RaftIndex) } diff --git a/proto/pbconnect/connect.go b/proto/pbconnect/connect.go index c61ca7c8a9..2b13a12b3f 100644 --- a/proto/pbconnect/connect.go +++ b/proto/pbconnect/connect.go @@ -2,42 +2,42 @@ package pbconnect import ( "github.com/hashicorp/consul/agent/structs" - "github.com/hashicorp/consul/proto/pbcommongogo" + "github.com/hashicorp/consul/proto/pbcommon" ) -func QueryMetaFrom(f structs.QueryMeta) *pbcommongogo.QueryMeta { - t := new(pbcommongogo.QueryMeta) - pbcommongogo.QueryMetaFromStructs(&f, t) +func QueryMetaFrom(f structs.QueryMeta) *pbcommon.QueryMeta { + t := new(pbcommon.QueryMeta) + pbcommon.QueryMetaFromStructs(&f, t) return t } -func QueryMetaTo(f *pbcommongogo.QueryMeta) structs.QueryMeta { +func QueryMetaTo(f *pbcommon.QueryMeta) structs.QueryMeta { t := new(structs.QueryMeta) - pbcommongogo.QueryMetaToStructs(f, t) + pbcommon.QueryMetaToStructs(f, t) return *t } -func RaftIndexFrom(f structs.RaftIndex) *pbcommongogo.RaftIndex { - t := new(pbcommongogo.RaftIndex) - pbcommongogo.RaftIndexFromStructs(&f, t) +func RaftIndexFrom(f structs.RaftIndex) *pbcommon.RaftIndex { + t := new(pbcommon.RaftIndex) + pbcommon.RaftIndexFromStructs(&f, t) return t } -func RaftIndexTo(f *pbcommongogo.RaftIndex) structs.RaftIndex { +func RaftIndexTo(f *pbcommon.RaftIndex) structs.RaftIndex { t := new(structs.RaftIndex) - pbcommongogo.RaftIndexToStructs(f, t) + pbcommon.RaftIndexToStructs(f, t) return *t } -func EnterpriseMetaFrom(f structs.EnterpriseMeta) *pbcommongogo.EnterpriseMeta { - t := new(pbcommongogo.EnterpriseMeta) - pbcommongogo.EnterpriseMetaFromStructs(&f, t) +func EnterpriseMetaFrom(f structs.EnterpriseMeta) *pbcommon.EnterpriseMeta { + t := new(pbcommon.EnterpriseMeta) + pbcommon.EnterpriseMetaFromStructs(&f, t) return t } -func EnterpriseMetaTo(f *pbcommongogo.EnterpriseMeta) structs.EnterpriseMeta { +func EnterpriseMetaTo(f *pbcommon.EnterpriseMeta) structs.EnterpriseMeta { t := new(structs.EnterpriseMeta) - pbcommongogo.EnterpriseMetaToStructs(f, t) + pbcommon.EnterpriseMetaToStructs(f, t) return *t } diff --git a/proto/pbconnect/connect.pb.go b/proto/pbconnect/connect.pb.go index 64a6738f91..97ce17defc 100644 --- a/proto/pbconnect/connect.pb.go +++ b/proto/pbconnect/connect.pb.go @@ -1,16 +1,14 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. +// Code generated by protoc-gen-go. DO NOT EDIT. // source: proto/pbconnect/connect.proto package pbconnect import ( fmt "fmt" - types "github.com/gogo/protobuf/types" proto "github.com/golang/protobuf/proto" - pbcommongogo "github.com/hashicorp/consul/proto/pbcommongogo" - io "io" + timestamp "github.com/golang/protobuf/ptypes/timestamp" + pbcommon "github.com/hashicorp/consul/proto/pbcommon" math "math" - math_bits "math/bits" ) // Reference imports to suppress errors if they are not otherwise used. @@ -64,10 +62,10 @@ type CARoots struct { // QueryMeta here is mainly used to contain the latest Raft Index that could // be used to perform a blocking query. // mog: func-to=QueryMetaTo func-from=QueryMetaFrom - QueryMeta *pbcommongogo.QueryMeta `protobuf:"bytes,4,opt,name=QueryMeta,proto3" json:"QueryMeta,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + QueryMeta *pbcommon.QueryMeta `protobuf:"bytes,4,opt,name=QueryMeta,proto3" json:"QueryMeta,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *CARoots) Reset() { *m = CARoots{} } @@ -76,26 +74,18 @@ func (*CARoots) ProtoMessage() {} func (*CARoots) Descriptor() ([]byte, []int) { return fileDescriptor_80627e709958eb04, []int{0} } + func (m *CARoots) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_CARoots.Unmarshal(m, b) } func (m *CARoots) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_CARoots.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_CARoots.Marshal(b, m, deterministic) } func (m *CARoots) XXX_Merge(src proto.Message) { xxx_messageInfo_CARoots.Merge(m, src) } func (m *CARoots) XXX_Size() int { - return m.Size() + return xxx_messageInfo_CARoots.Size(m) } func (m *CARoots) XXX_DiscardUnknown() { xxx_messageInfo_CARoots.DiscardUnknown(m) @@ -124,7 +114,7 @@ func (m *CARoots) GetRoots() []*CARoot { return nil } -func (m *CARoots) GetQueryMeta() *pbcommongogo.QueryMeta { +func (m *CARoots) GetQueryMeta() *pbcommon.QueryMeta { if m != nil { return m.QueryMeta } @@ -160,10 +150,10 @@ type CARoot struct { // future flexibility. ExternalTrustDomain string `protobuf:"bytes,5,opt,name=ExternalTrustDomain,proto3" json:"ExternalTrustDomain,omitempty"` // Time validity bounds. - // mog: func-to=structs.TimeFromProtoGogo func-from=structs.TimeToProtoGogo - NotBefore *types.Timestamp `protobuf:"bytes,6,opt,name=NotBefore,proto3" json:"NotBefore,omitempty"` - // mog: func-to=structs.TimeFromProtoGogo func-from=structs.TimeToProtoGogo - NotAfter *types.Timestamp `protobuf:"bytes,7,opt,name=NotAfter,proto3" json:"NotAfter,omitempty"` + // mog: func-to=structs.TimeFromProto func-from=structs.TimeToProto + NotBefore *timestamp.Timestamp `protobuf:"bytes,6,opt,name=NotBefore,proto3" json:"NotBefore,omitempty"` + // mog: func-to=structs.TimeFromProto func-from=structs.TimeToProto + NotAfter *timestamp.Timestamp `protobuf:"bytes,7,opt,name=NotAfter,proto3" json:"NotAfter,omitempty"` // RootCert is the PEM-encoded public certificate. RootCert string `protobuf:"bytes,8,opt,name=RootCert,proto3" json:"RootCert,omitempty"` // IntermediateCerts is a list of PEM-encoded intermediate certs to @@ -182,8 +172,8 @@ type CARoot struct { // RotatedOutAt is the time at which this CA was removed from the state. // This will only be set on roots that have been rotated out from being the // active root. - // mog: func-to=structs.TimeFromProtoGogo func-from=structs.TimeToProtoGogo - RotatedOutAt *types.Timestamp `protobuf:"bytes,13,opt,name=RotatedOutAt,proto3" json:"RotatedOutAt,omitempty"` + // mog: func-to=structs.TimeFromProto func-from=structs.TimeToProto + RotatedOutAt *timestamp.Timestamp `protobuf:"bytes,13,opt,name=RotatedOutAt,proto3" json:"RotatedOutAt,omitempty"` // PrivateKeyType is the type of the private key used to sign certificates. It // may be "rsa" or "ec". This is provided as a convenience to avoid parsing // the public key to from the certificate to infer the type. @@ -194,10 +184,10 @@ type CARoot struct { // mog: func-to=int func-from=int32 PrivateKeyBits int32 `protobuf:"varint,15,opt,name=PrivateKeyBits,proto3" json:"PrivateKeyBits,omitempty"` // mog: func-to=RaftIndexTo func-from=RaftIndexFrom - RaftIndex *pbcommongogo.RaftIndex `protobuf:"bytes,16,opt,name=RaftIndex,proto3" json:"RaftIndex,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + RaftIndex *pbcommon.RaftIndex `protobuf:"bytes,16,opt,name=RaftIndex,proto3" json:"RaftIndex,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *CARoot) Reset() { *m = CARoot{} } @@ -206,26 +196,18 @@ func (*CARoot) ProtoMessage() {} func (*CARoot) Descriptor() ([]byte, []int) { return fileDescriptor_80627e709958eb04, []int{1} } + func (m *CARoot) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_CARoot.Unmarshal(m, b) } func (m *CARoot) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_CARoot.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_CARoot.Marshal(b, m, deterministic) } func (m *CARoot) XXX_Merge(src proto.Message) { xxx_messageInfo_CARoot.Merge(m, src) } func (m *CARoot) XXX_Size() int { - return m.Size() + return xxx_messageInfo_CARoot.Size(m) } func (m *CARoot) XXX_DiscardUnknown() { xxx_messageInfo_CARoot.DiscardUnknown(m) @@ -268,14 +250,14 @@ func (m *CARoot) GetExternalTrustDomain() string { return "" } -func (m *CARoot) GetNotBefore() *types.Timestamp { +func (m *CARoot) GetNotBefore() *timestamp.Timestamp { if m != nil { return m.NotBefore } return nil } -func (m *CARoot) GetNotAfter() *types.Timestamp { +func (m *CARoot) GetNotAfter() *timestamp.Timestamp { if m != nil { return m.NotAfter } @@ -317,7 +299,7 @@ func (m *CARoot) GetActive() bool { return false } -func (m *CARoot) GetRotatedOutAt() *types.Timestamp { +func (m *CARoot) GetRotatedOutAt() *timestamp.Timestamp { if m != nil { return m.RotatedOutAt } @@ -338,13 +320,15 @@ func (m *CARoot) GetPrivateKeyBits() int32 { return 0 } -func (m *CARoot) GetRaftIndex() *pbcommongogo.RaftIndex { +func (m *CARoot) GetRaftIndex() *pbcommon.RaftIndex { if m != nil { return m.RaftIndex } return nil } +// RaftIndex is used to track the index used while creating +// or modifying a given struct type. // // mog annotation: // @@ -370,18 +354,18 @@ type IssuedCert struct { AgentURI string `protobuf:"bytes,7,opt,name=AgentURI,proto3" json:"AgentURI,omitempty"` // ValidAfter and ValidBefore are the validity periods for the // certificate. - // mog: func-to=structs.TimeFromProtoGogo func-from=structs.TimeToProtoGogo - ValidAfter *types.Timestamp `protobuf:"bytes,8,opt,name=ValidAfter,proto3" json:"ValidAfter,omitempty"` - // mog: func-to=structs.TimeFromProtoGogo func-from=structs.TimeToProtoGogo - ValidBefore *types.Timestamp `protobuf:"bytes,9,opt,name=ValidBefore,proto3" json:"ValidBefore,omitempty"` + // mog: func-to=structs.TimeFromProto func-from=structs.TimeToProto + ValidAfter *timestamp.Timestamp `protobuf:"bytes,8,opt,name=ValidAfter,proto3" json:"ValidAfter,omitempty"` + // mog: func-to=structs.TimeFromProto func-from=structs.TimeToProto + ValidBefore *timestamp.Timestamp `protobuf:"bytes,9,opt,name=ValidBefore,proto3" json:"ValidBefore,omitempty"` // EnterpriseMeta is the Consul Enterprise specific metadata // mog: func-to=EnterpriseMetaTo func-from=EnterpriseMetaFrom - EnterpriseMeta *pbcommongogo.EnterpriseMeta `protobuf:"bytes,10,opt,name=EnterpriseMeta,proto3" json:"EnterpriseMeta,omitempty"` + EnterpriseMeta *pbcommon.EnterpriseMeta `protobuf:"bytes,10,opt,name=EnterpriseMeta,proto3" json:"EnterpriseMeta,omitempty"` // mog: func-to=RaftIndexTo func-from=RaftIndexFrom - RaftIndex *pbcommongogo.RaftIndex `protobuf:"bytes,11,opt,name=RaftIndex,proto3" json:"RaftIndex,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + RaftIndex *pbcommon.RaftIndex `protobuf:"bytes,11,opt,name=RaftIndex,proto3" json:"RaftIndex,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *IssuedCert) Reset() { *m = IssuedCert{} } @@ -390,26 +374,18 @@ func (*IssuedCert) ProtoMessage() {} func (*IssuedCert) Descriptor() ([]byte, []int) { return fileDescriptor_80627e709958eb04, []int{2} } + func (m *IssuedCert) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) + return xxx_messageInfo_IssuedCert.Unmarshal(m, b) } func (m *IssuedCert) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_IssuedCert.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } + return xxx_messageInfo_IssuedCert.Marshal(b, m, deterministic) } func (m *IssuedCert) XXX_Merge(src proto.Message) { xxx_messageInfo_IssuedCert.Merge(m, src) } func (m *IssuedCert) XXX_Size() int { - return m.Size() + return xxx_messageInfo_IssuedCert.Size(m) } func (m *IssuedCert) XXX_DiscardUnknown() { xxx_messageInfo_IssuedCert.DiscardUnknown(m) @@ -466,28 +442,28 @@ func (m *IssuedCert) GetAgentURI() string { return "" } -func (m *IssuedCert) GetValidAfter() *types.Timestamp { +func (m *IssuedCert) GetValidAfter() *timestamp.Timestamp { if m != nil { return m.ValidAfter } return nil } -func (m *IssuedCert) GetValidBefore() *types.Timestamp { +func (m *IssuedCert) GetValidBefore() *timestamp.Timestamp { if m != nil { return m.ValidBefore } return nil } -func (m *IssuedCert) GetEnterpriseMeta() *pbcommongogo.EnterpriseMeta { +func (m *IssuedCert) GetEnterpriseMeta() *pbcommon.EnterpriseMeta { if m != nil { return m.EnterpriseMeta } return nil } -func (m *IssuedCert) GetRaftIndex() *pbcommongogo.RaftIndex { +func (m *IssuedCert) GetRaftIndex() *pbcommon.RaftIndex { if m != nil { return m.RaftIndex } @@ -500,1811 +476,50 @@ func init() { proto.RegisterType((*IssuedCert)(nil), "connect.IssuedCert") } -func init() { proto.RegisterFile("proto/pbconnect/connect.proto", fileDescriptor_80627e709958eb04) } +func init() { + proto.RegisterFile("proto/pbconnect/connect.proto", fileDescriptor_80627e709958eb04) +} var fileDescriptor_80627e709958eb04 = []byte{ - // 661 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x54, 0xcd, 0x6e, 0xd3, 0x40, - 0x10, 0xc6, 0x4d, 0xf3, 0xe3, 0x49, 0x9b, 0xc2, 0xf2, 0xa3, 0x55, 0x24, 0x52, 0x2b, 0x02, 0x14, - 0x09, 0x94, 0xa0, 0x56, 0x42, 0x08, 0x01, 0x52, 0xd2, 0xf4, 0x10, 0x55, 0x0d, 0x65, 0x5b, 0x38, - 0x70, 0x73, 0x92, 0x89, 0xbb, 0x52, 0xec, 0x8d, 0xd6, 0xeb, 0xaa, 0x39, 0xf2, 0x16, 0xbc, 0x03, - 0x2f, 0xc2, 0x0d, 0x1e, 0x01, 0x95, 0x17, 0x41, 0xbb, 0x76, 0x62, 0x3b, 0x45, 0x0a, 0xa7, 0xec, - 0x7c, 0xf3, 0xcd, 0x78, 0x66, 0xbf, 0x2f, 0x0b, 0x8f, 0xe7, 0x52, 0x28, 0xd1, 0x99, 0x8f, 0xc6, - 0x22, 0x08, 0x70, 0xac, 0x3a, 0xc9, 0x6f, 0xdb, 0xe0, 0xa4, 0x9c, 0x84, 0xf5, 0x7d, 0x4f, 0x08, - 0x6f, 0x86, 0x1d, 0x03, 0x8f, 0xa2, 0x69, 0x47, 0x71, 0x1f, 0x43, 0xe5, 0xfa, 0xf3, 0x98, 0x59, - 0xdf, 0x4f, 0x1b, 0xf9, 0xbe, 0x08, 0x3c, 0xe1, 0x89, 0x4e, 0x7c, 0x8c, 0x09, 0xcd, 0xef, 0x16, - 0x94, 0x8f, 0xba, 0x4c, 0x08, 0x15, 0x92, 0x26, 0xec, 0x74, 0xc7, 0x8a, 0x5f, 0xa1, 0x0e, 0x07, - 0x7d, 0x6a, 0x39, 0x56, 0xcb, 0x66, 0x39, 0x8c, 0x38, 0x50, 0xbd, 0x90, 0x51, 0xa8, 0xfa, 0xc2, - 0x77, 0x79, 0x40, 0xb7, 0x0c, 0x25, 0x0b, 0x91, 0xa7, 0x50, 0x34, 0xed, 0x68, 0xc1, 0x29, 0xb4, - 0xaa, 0x07, 0x7b, 0xed, 0xe5, 0xec, 0xf1, 0x67, 0x58, 0x9c, 0x25, 0x87, 0x60, 0x7f, 0x8c, 0x50, - 0x2e, 0x4e, 0x51, 0xb9, 0x74, 0xdb, 0xb1, 0x5a, 0xd5, 0x83, 0x87, 0xed, 0x74, 0xca, 0xf6, 0x2a, - 0xc9, 0x52, 0x5e, 0xf3, 0x6b, 0x11, 0x4a, 0x71, 0x1b, 0x52, 0x83, 0xad, 0xd5, 0x88, 0x5b, 0x83, - 0x3e, 0x21, 0xb0, 0x3d, 0x74, 0x7d, 0x4c, 0x26, 0x32, 0x67, 0xbd, 0xd0, 0x39, 0x4a, 0xee, 0xce, - 0x86, 0x91, 0x3f, 0x42, 0x49, 0x0b, 0x8e, 0xd5, 0xda, 0x66, 0x39, 0xcc, 0x70, 0xb8, 0x17, 0xf0, - 0xc0, 0x3b, 0xc1, 0xc5, 0xa0, 0x6f, 0x46, 0xb1, 0x59, 0x0e, 0x23, 0x2f, 0xe1, 0xfe, 0xf1, 0xb5, - 0x42, 0x19, 0xb8, 0xb3, 0xec, 0xf2, 0x45, 0x43, 0xfd, 0x57, 0x8a, 0xbc, 0x06, 0x7b, 0x28, 0x54, - 0x0f, 0xa7, 0x42, 0x22, 0x2d, 0x99, 0xed, 0xea, 0xed, 0x58, 0xac, 0xf6, 0x52, 0xac, 0xf6, 0xc5, - 0x52, 0x2c, 0x96, 0x92, 0xc9, 0x2b, 0xa8, 0x0c, 0x85, 0xea, 0x4e,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e2, 0x63, 0x4c, 0xec, 0xb9, 0x0c, 0x8d, 0x12, 0xf1, 0xf1, 0x13, 0x1b, 0x24, 0x86, 0xcc, 0x20, - 0xe4, 0x01, 0x14, 0xbb, 0x1e, 0x06, 0xca, 0x78, 0xd0, 0x66, 0x71, 0xa0, 0xbd, 0x62, 0x0e, 0xba, - 0xa6, 0x1c, 0x7b, 0x65, 0x19, 0x93, 0x37, 0x00, 0x9f, 0xdd, 0x19, 0x9f, 0xc4, 0x0e, 0xac, 0x6c, - 0x54, 0x28, 0xc3, 0x26, 0x6f, 0xa1, 0x6a, 0xa2, 0xc4, 0xf7, 0xf6, 0xc6, 0xe2, 0x2c, 0x9d, 0xf4, - 0xa0, 0x76, 0xac, 0xcd, 0x38, 0x97, 0x3c, 0x44, 0xf3, 0x2c, 0x40, 0xd2, 0x20, 0x23, 0x49, 0x9e, - 0xc1, 0xd6, 0x2a, 0xf2, 0x8a, 0x56, 0xff, 0x4f, 0xd1, 0xde, 0xbb, 0x1f, 0x37, 0x0d, 0xeb, 0xd7, - 0x4d, 0xc3, 0xfa, 0x7d, 0xd3, 0xb0, 0xbe, 0xfd, 0x69, 0xdc, 0xf9, 0xf2, 0xdc, 0xe3, 0xea, 0x32, - 0x1a, 0xe9, 0xca, 0xce, 0xa5, 0x1b, 0x5e, 0xf2, 0xb1, 0x90, 0x73, 0xfd, 0x08, 0x87, 0xd1, 0xac, - 0xb3, 0xf6, 0x36, 0x8f, 0x4a, 0x06, 0x38, 0xfc, 0x1b, 0x00, 0x00, 0xff, 0xff, 0xda, 0x8a, 0x91, - 0x6e, 0xb5, 0x05, 0x00, 0x00, + // 632 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x54, 0x5d, 0x6f, 0xd3, 0x30, + 0x14, 0x55, 0xd7, 0xcf, 0xdc, 0x6e, 0x1d, 0x33, 0x68, 0xb2, 0x8a, 0x80, 0xa8, 0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, 0xdb, 0x70, 0x7a, 0x7f, 0x6a, 0xd0, 0xb0, 0x25, 0x48, 0x07, 0xf6, 0xd6, + 0xed, 0xed, 0x05, 0x43, 0x42, 0xa0, 0x36, 0x0a, 0x23, 0xcc, 0xba, 0x31, 0x6b, 0x3d, 0xcc, 0x0d, + 0x4a, 0x1e, 0x2e, 0x46, 0x69, 0x34, 0x46, 0x49, 0xab, 0x6e, 0xc5, 0xab, 0xb1, 0x12, 0x66, 0x38, + 0x7c, 0x1e, 0xf3, 0x78, 0x7e, 0x89, 0xab, 0x60, 0x68, 0xda, 0x70, 0x58, 0x09, 0x23, 0xef, 0xe1, + 0xf1, 0xc5, 0x83, 0x42, 0x19, 0x87, 0x8b, 0xe2, 0xe0, 0x75, 0x43, 0xfd, 0x5f, 0x8a, 0x7c, 0x02, + 0x67, 0x24, 0xd4, 0x19, 0xce, 0x84, 0x44, 0xda, 0x30, 0x93, 0x75, 0xfb, 0x56, 0xa4, 0x7e, 0x2e, + 0x52, 0xff, 0x36, 0x17, 0x89, 0x6d, 0xc8, 0xe4, 0x23, 0xb4, 0x46, 0x42, 0x0d, 0x66, 0x0a, 0x25, + 0x6d, 0xee, 0xdc, 0xb8, 0xe6, 0x92, 0x2e, 0xb4, 0xf4, 0xbd, 0x9c, 0xa3, 0x54, 0xb4, 0x65, 0x1a, + 0x5b, 0xc7, 0xe4, 0x2d, 0x1c, 0x05, 0xb1, 0x42, 0x19, 0xe1, 0x94, 0x87, 0x0a, 0x35, 0x96, 0x50, + 0xc7, 0xad, 0x7a, 0x0e, 0xfb, 0x37, 0xa1, 0xe5, 0xcd, 0xa6, 0x37, 0xc5, 0xc0, 0xca, 0x5b, 0x80, + 0xc8, 0x73, 0x80, 0xcd, 0xfd, 0xd0, 0xb6, 0x21, 0x14, 0x10, 0x72, 0x0c, 0x0d, 0x6b, 0x18, 0xba, + 0xef, 0x56, 0xbc, 0x16, 0xcb, 0x22, 0x72, 0x0a, 0xfb, 0x4c, 0xa8, 0x50, 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+ 0xe5, 0x28, 0x67, 0xd9, 0x16, 0xbb, 0xac, 0x64, 0x7b, 0xb7, 0x92, 0x67, 0xef, 0x7e, 0xbe, 0x99, + 0x73, 0x75, 0x97, 0x8e, 0x35, 0xcb, 0xbf, 0x0b, 0x93, 0x3b, 0x3e, 0x11, 0x72, 0xa9, 0x1f, 0xd8, + 0x24, 0x5d, 0xf8, 0x5b, 0xef, 0xee, 0xb8, 0x61, 0x80, 0x0f, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, + 0x77, 0x18, 0x20, 0xcd, 0x91, 0x05, 0x00, 0x00, } - -func (m *CARoots) 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 *CARoots) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CARoots) 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.QueryMeta != nil { - { - size, err := m.QueryMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintConnect(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if len(m.Roots) > 0 { - for iNdEx := len(m.Roots) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Roots[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintConnect(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if len(m.TrustDomain) > 0 { - i -= len(m.TrustDomain) - copy(dAtA[i:], m.TrustDomain) - i = encodeVarintConnect(dAtA, i, uint64(len(m.TrustDomain))) - i-- - dAtA[i] = 0x12 - } - if len(m.ActiveRootID) > 0 { - i -= len(m.ActiveRootID) - copy(dAtA[i:], m.ActiveRootID) - i = encodeVarintConnect(dAtA, i, uint64(len(m.ActiveRootID))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *CARoot) 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 *CARoot) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CARoot) 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.RaftIndex != nil { - { - size, err := m.RaftIndex.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintConnect(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x82 - } - if m.PrivateKeyBits != 0 { - i = encodeVarintConnect(dAtA, i, uint64(m.PrivateKeyBits)) - i-- - dAtA[i] = 0x78 - } - if len(m.PrivateKeyType) > 0 { - i -= len(m.PrivateKeyType) - copy(dAtA[i:], m.PrivateKeyType) - i = encodeVarintConnect(dAtA, i, uint64(len(m.PrivateKeyType))) - i-- - dAtA[i] = 0x72 - } - if m.RotatedOutAt != nil { - { - size, err := m.RotatedOutAt.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintConnect(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x6a - } - if m.Active { - i-- - if m.Active { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x60 - } - if len(m.SigningKey) > 0 { - i -= len(m.SigningKey) - copy(dAtA[i:], m.SigningKey) - i = encodeVarintConnect(dAtA, i, uint64(len(m.SigningKey))) - i-- - dAtA[i] = 0x5a - } - if len(m.SigningCert) > 0 { - i -= len(m.SigningCert) - copy(dAtA[i:], m.SigningCert) - i = encodeVarintConnect(dAtA, i, uint64(len(m.SigningCert))) - i-- - dAtA[i] = 0x52 - } - if len(m.IntermediateCerts) > 0 { - for iNdEx := len(m.IntermediateCerts) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.IntermediateCerts[iNdEx]) - copy(dAtA[i:], m.IntermediateCerts[iNdEx]) - i = encodeVarintConnect(dAtA, i, uint64(len(m.IntermediateCerts[iNdEx]))) - i-- - dAtA[i] = 0x4a - } - } - if len(m.RootCert) > 0 { - i -= len(m.RootCert) - copy(dAtA[i:], m.RootCert) - i = encodeVarintConnect(dAtA, i, uint64(len(m.RootCert))) - i-- - dAtA[i] = 0x42 - } - if m.NotAfter != nil { - { - size, err := m.NotAfter.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintConnect(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a - } - if m.NotBefore != nil { - { - size, err := m.NotBefore.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintConnect(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - } - if len(m.ExternalTrustDomain) > 0 { - i -= len(m.ExternalTrustDomain) - copy(dAtA[i:], m.ExternalTrustDomain) - i = encodeVarintConnect(dAtA, i, uint64(len(m.ExternalTrustDomain))) - i-- - dAtA[i] = 0x2a - } - if len(m.SigningKeyID) > 0 { - i -= len(m.SigningKeyID) - copy(dAtA[i:], m.SigningKeyID) - i = encodeVarintConnect(dAtA, i, uint64(len(m.SigningKeyID))) - i-- - dAtA[i] = 0x22 - } - if m.SerialNumber != 0 { - i = encodeVarintConnect(dAtA, i, uint64(m.SerialNumber)) - i-- - dAtA[i] = 0x18 - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintConnect(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0x12 - } - if len(m.ID) > 0 { - i -= len(m.ID) - copy(dAtA[i:], m.ID) - i = encodeVarintConnect(dAtA, i, uint64(len(m.ID))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *IssuedCert) 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 *IssuedCert) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *IssuedCert) 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.RaftIndex != nil { - { - size, err := m.RaftIndex.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintConnect(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x5a - } - if m.EnterpriseMeta != nil { - { - size, err := m.EnterpriseMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintConnect(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x52 - } - if m.ValidBefore != nil { - { - size, err := m.ValidBefore.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintConnect(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x4a - } - if m.ValidAfter != nil { - { - size, err := m.ValidAfter.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintConnect(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x42 - } - if len(m.AgentURI) > 0 { - i -= len(m.AgentURI) - copy(dAtA[i:], m.AgentURI) - i = encodeVarintConnect(dAtA, i, uint64(len(m.AgentURI))) - i-- - dAtA[i] = 0x3a - } - if len(m.Agent) > 0 { - i -= len(m.Agent) - copy(dAtA[i:], m.Agent) - i = encodeVarintConnect(dAtA, i, uint64(len(m.Agent))) - i-- - dAtA[i] = 0x32 - } - if len(m.ServiceURI) > 0 { - i -= len(m.ServiceURI) - copy(dAtA[i:], m.ServiceURI) - i = encodeVarintConnect(dAtA, i, uint64(len(m.ServiceURI))) - i-- - dAtA[i] = 0x2a - } - if len(m.Service) > 0 { - i -= len(m.Service) - copy(dAtA[i:], m.Service) - i = encodeVarintConnect(dAtA, i, uint64(len(m.Service))) - i-- - dAtA[i] = 0x22 - } - if len(m.PrivateKeyPEM) > 0 { - i -= len(m.PrivateKeyPEM) - copy(dAtA[i:], m.PrivateKeyPEM) - i = encodeVarintConnect(dAtA, i, uint64(len(m.PrivateKeyPEM))) - i-- - dAtA[i] = 0x1a - } - if len(m.CertPEM) > 0 { - i -= len(m.CertPEM) - copy(dAtA[i:], m.CertPEM) - i = encodeVarintConnect(dAtA, i, uint64(len(m.CertPEM))) - i-- - dAtA[i] = 0x12 - } - if len(m.SerialNumber) > 0 { - i -= len(m.SerialNumber) - copy(dAtA[i:], m.SerialNumber) - i = encodeVarintConnect(dAtA, i, uint64(len(m.SerialNumber))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintConnect(dAtA []byte, offset int, v uint64) int { - offset -= sovConnect(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *CARoots) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ActiveRootID) - if l > 0 { - n += 1 + l + sovConnect(uint64(l)) - } - l = len(m.TrustDomain) - if l > 0 { - n += 1 + l + sovConnect(uint64(l)) - } - if len(m.Roots) > 0 { - for _, e := range m.Roots { - l = e.Size() - n += 1 + l + sovConnect(uint64(l)) - } - } - if m.QueryMeta != nil { - l = m.QueryMeta.Size() - n += 1 + l + sovConnect(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *CARoot) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ID) - if l > 0 { - n += 1 + l + sovConnect(uint64(l)) - } - l = len(m.Name) - if l > 0 { - n += 1 + l + sovConnect(uint64(l)) - } - if m.SerialNumber != 0 { - n += 1 + sovConnect(uint64(m.SerialNumber)) - } - l = len(m.SigningKeyID) - if l > 0 { - n += 1 + l + sovConnect(uint64(l)) - } - l = len(m.ExternalTrustDomain) - if l > 0 { - n += 1 + l + sovConnect(uint64(l)) - } - if m.NotBefore != nil { - l = m.NotBefore.Size() - n += 1 + l + sovConnect(uint64(l)) - } - if m.NotAfter != nil { - l = m.NotAfter.Size() - n += 1 + l + sovConnect(uint64(l)) - } - l = len(m.RootCert) - if l > 0 { - n += 1 + l + sovConnect(uint64(l)) - } - if len(m.IntermediateCerts) > 0 { - for _, s := range m.IntermediateCerts { - l = len(s) - n += 1 + l + sovConnect(uint64(l)) - } - } - l = len(m.SigningCert) - if l > 0 { - n += 1 + l + sovConnect(uint64(l)) - } - l = len(m.SigningKey) - if l > 0 { - n += 1 + l + sovConnect(uint64(l)) - } - if m.Active { - n += 2 - } - if m.RotatedOutAt != nil { - l = m.RotatedOutAt.Size() - n += 1 + l + sovConnect(uint64(l)) - } - l = len(m.PrivateKeyType) - if l > 0 { - n += 1 + l + sovConnect(uint64(l)) - } - if m.PrivateKeyBits != 0 { - n += 1 + sovConnect(uint64(m.PrivateKeyBits)) - } - if m.RaftIndex != nil { - l = m.RaftIndex.Size() - n += 2 + l + sovConnect(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *IssuedCert) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.SerialNumber) - if l > 0 { - n += 1 + l + sovConnect(uint64(l)) - } - l = len(m.CertPEM) - if l > 0 { - n += 1 + l + sovConnect(uint64(l)) - } - l = len(m.PrivateKeyPEM) - if l > 0 { - n += 1 + l + sovConnect(uint64(l)) - } - l = len(m.Service) - if l > 0 { - n += 1 + l + sovConnect(uint64(l)) - } - l = len(m.ServiceURI) - if l > 0 { - n += 1 + l + sovConnect(uint64(l)) - } - l = len(m.Agent) - if l > 0 { - n += 1 + l + sovConnect(uint64(l)) - } - l = len(m.AgentURI) - if l > 0 { - n += 1 + l + sovConnect(uint64(l)) - } - if m.ValidAfter != nil { - l = m.ValidAfter.Size() - n += 1 + l + sovConnect(uint64(l)) - } - if m.ValidBefore != nil { - l = m.ValidBefore.Size() - n += 1 + l + sovConnect(uint64(l)) - } - if m.EnterpriseMeta != nil { - l = m.EnterpriseMeta.Size() - n += 1 + l + sovConnect(uint64(l)) - } - if m.RaftIndex != nil { - l = m.RaftIndex.Size() - n += 1 + l + sovConnect(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovConnect(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozConnect(x uint64) (n int) { - return sovConnect(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *CARoots) 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 ErrIntOverflowConnect - } - 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: CARoots: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CARoots: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ActiveRootID", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConnect - } - 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 ErrInvalidLengthConnect - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthConnect - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ActiveRootID = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TrustDomain", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConnect - } - 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 ErrInvalidLengthConnect - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthConnect - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TrustDomain = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Roots", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConnect - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthConnect - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthConnect - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Roots = append(m.Roots, &CARoot{}) - if err := m.Roots[len(m.Roots)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field QueryMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConnect - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthConnect - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthConnect - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.QueryMeta == nil { - m.QueryMeta = &pbcommongogo.QueryMeta{} - } - if err := m.QueryMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipConnect(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthConnect - } - 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 *CARoot) 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 ErrIntOverflowConnect - } - 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: CARoot: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CARoot: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConnect - } - 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 ErrInvalidLengthConnect - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthConnect - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ID = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - 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 ErrIntOverflowConnect - } - 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 ErrInvalidLengthConnect - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthConnect - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field SerialNumber", wireType) - } - m.SerialNumber = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConnect - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.SerialNumber |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SigningKeyID", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConnect - } - 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 ErrInvalidLengthConnect - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthConnect - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SigningKeyID = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ExternalTrustDomain", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConnect - } - 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 ErrInvalidLengthConnect - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthConnect - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ExternalTrustDomain = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NotBefore", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConnect - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthConnect - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthConnect - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.NotBefore == nil { - m.NotBefore = &types.Timestamp{} - } - if err := m.NotBefore.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NotAfter", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConnect - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthConnect - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthConnect - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.NotAfter == nil { - m.NotAfter = &types.Timestamp{} - } - if err := m.NotAfter.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RootCert", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConnect - } - 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 ErrInvalidLengthConnect - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthConnect - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RootCert = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field IntermediateCerts", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConnect - } - 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 ErrInvalidLengthConnect - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthConnect - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.IntermediateCerts = append(m.IntermediateCerts, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SigningCert", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConnect - } - 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 ErrInvalidLengthConnect - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthConnect - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SigningCert = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SigningKey", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConnect - } - 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 ErrInvalidLengthConnect - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthConnect - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SigningKey = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 12: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Active", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConnect - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Active = bool(v != 0) - case 13: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RotatedOutAt", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConnect - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthConnect - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthConnect - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.RotatedOutAt == nil { - m.RotatedOutAt = &types.Timestamp{} - } - if err := m.RotatedOutAt.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PrivateKeyType", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConnect - } - 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 ErrInvalidLengthConnect - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthConnect - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PrivateKeyType = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 15: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PrivateKeyBits", wireType) - } - m.PrivateKeyBits = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConnect - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.PrivateKeyBits |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 16: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RaftIndex", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConnect - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthConnect - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthConnect - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.RaftIndex == nil { - m.RaftIndex = &pbcommongogo.RaftIndex{} - } - if err := m.RaftIndex.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipConnect(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthConnect - } - 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 *IssuedCert) 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 ErrIntOverflowConnect - } - 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: IssuedCert: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: IssuedCert: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SerialNumber", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConnect - } - 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 ErrInvalidLengthConnect - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthConnect - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SerialNumber = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CertPEM", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConnect - } - 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 ErrInvalidLengthConnect - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthConnect - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CertPEM = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PrivateKeyPEM", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConnect - } - 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 ErrInvalidLengthConnect - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthConnect - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PrivateKeyPEM = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Service", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConnect - } - 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 ErrInvalidLengthConnect - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthConnect - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Service = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ServiceURI", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConnect - } - 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 ErrInvalidLengthConnect - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthConnect - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ServiceURI = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Agent", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConnect - } - 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 ErrInvalidLengthConnect - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthConnect - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Agent = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AgentURI", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConnect - } - 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 ErrInvalidLengthConnect - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthConnect - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AgentURI = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ValidAfter", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConnect - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthConnect - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthConnect - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ValidAfter == nil { - m.ValidAfter = &types.Timestamp{} - } - if err := m.ValidAfter.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ValidBefore", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConnect - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthConnect - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthConnect - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ValidBefore == nil { - m.ValidBefore = &types.Timestamp{} - } - if err := m.ValidBefore.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EnterpriseMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConnect - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthConnect - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthConnect - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.EnterpriseMeta == nil { - m.EnterpriseMeta = &pbcommongogo.EnterpriseMeta{} - } - if err := m.EnterpriseMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RaftIndex", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConnect - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthConnect - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthConnect - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.RaftIndex == nil { - m.RaftIndex = &pbcommongogo.RaftIndex{} - } - if err := m.RaftIndex.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipConnect(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthConnect - } - 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 skipConnect(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, ErrIntOverflowConnect - } - 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, ErrIntOverflowConnect - } - 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, ErrIntOverflowConnect - } - 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, ErrInvalidLengthConnect - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupConnect - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthConnect - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthConnect = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowConnect = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupConnect = fmt.Errorf("proto: unexpected end of group") -) diff --git a/proto/pbconnect/connect.proto b/proto/pbconnect/connect.proto index 129fa53854..37ba5bcc9a 100644 --- a/proto/pbconnect/connect.proto +++ b/proto/pbconnect/connect.proto @@ -5,7 +5,7 @@ package connect; option go_package = "github.com/hashicorp/consul/proto/pbconnect"; import "google/protobuf/timestamp.proto"; -import "proto/pbcommongogo/common.proto"; +import "proto/pbcommon/common.proto"; // CARoots is the list of all currently trusted CA Roots. // @@ -50,7 +50,7 @@ message CARoots { // QueryMeta here is mainly used to contain the latest Raft Index that could // be used to perform a blocking query. // mog: func-to=QueryMetaTo func-from=QueryMetaFrom - commongogo.QueryMeta QueryMeta = 4; + common.QueryMeta QueryMeta = 4; } // CARoot is the trusted CA Root. @@ -87,9 +87,9 @@ message CARoot { string ExternalTrustDomain = 5; // Time validity bounds. - // mog: func-to=structs.TimeFromProtoGogo func-from=structs.TimeToProtoGogo + // mog: func-to=structs.TimeFromProto func-from=structs.TimeToProto google.protobuf.Timestamp NotBefore = 6; - // mog: func-to=structs.TimeFromProtoGogo func-from=structs.TimeToProtoGogo + // mog: func-to=structs.TimeFromProto func-from=structs.TimeToProto google.protobuf.Timestamp NotAfter = 7; // RootCert is the PEM-encoded public certificate. @@ -114,7 +114,7 @@ message CARoot { // RotatedOutAt is the time at which this CA was removed from the state. // This will only be set on roots that have been rotated out from being the // active root. - // mog: func-to=structs.TimeFromProtoGogo func-from=structs.TimeToProtoGogo + // mog: func-to=structs.TimeFromProto func-from=structs.TimeToProto google.protobuf.Timestamp RotatedOutAt = 13; // PrivateKeyType is the type of the private key used to sign certificates. It @@ -129,9 +129,11 @@ message CARoot { int32 PrivateKeyBits = 15; // mog: func-to=RaftIndexTo func-from=RaftIndexFrom - commongogo.RaftIndex RaftIndex = 16; + common.RaftIndex RaftIndex = 16; } +// RaftIndex is used to track the index used while creating +// or modifying a given struct type. // // mog annotation: // @@ -161,15 +163,15 @@ message IssuedCert { // ValidAfter and ValidBefore are the validity periods for the // certificate. - // mog: func-to=structs.TimeFromProtoGogo func-from=structs.TimeToProtoGogo + // mog: func-to=structs.TimeFromProto func-from=structs.TimeToProto google.protobuf.Timestamp ValidAfter = 8; - // mog: func-to=structs.TimeFromProtoGogo func-from=structs.TimeToProtoGogo + // mog: func-to=structs.TimeFromProto func-from=structs.TimeToProto google.protobuf.Timestamp ValidBefore = 9; // EnterpriseMeta is the Consul Enterprise specific metadata // mog: func-to=EnterpriseMetaTo func-from=EnterpriseMetaFrom - commongogo.EnterpriseMeta EnterpriseMeta = 10; + common.EnterpriseMeta EnterpriseMeta = 10; // mog: func-to=RaftIndexTo func-from=RaftIndexFrom - commongogo.RaftIndex RaftIndex = 11; + common.RaftIndex RaftIndex = 11; } \ No newline at end of file