| /* |
| * Licensed to the Apache Software Foundation (ASF) under one or more |
| * contributor license agreements. See the NOTICE file distributed with |
| * this work for additional information regarding copyright ownership. |
| * The ASF licenses this file to You under the Apache License, Version 2.0 |
| * (the "License"); you may not use this file except in compliance with |
| * the License. You may obtain a copy of the License at |
| * |
| * http://www.apache.org/licenses/LICENSE-2.0 |
| * |
| * Unless required by applicable law or agreed to in writing, software |
| * distributed under the License is distributed on an "AS IS" BASIS, |
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| * See the License for the specific language governing permissions and |
| * limitations under the License. |
| */ |
| |
| // Code generated by protoc-gen-gogo. DO NOT EDIT. |
| // source: authorization.proto |
| |
| package dubbo_apache_org_v1alpha1 |
| |
| import ( |
| encoding_binary "encoding/binary" |
| 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. |
| var _ = proto.Marshal |
| var _ = fmt.Errorf |
| var _ = math.Inf |
| |
| // This is a compile-time assertion to ensure that this generated file |
| // is compatible with the proto package it is being compiled against. |
| // A compilation error at this line likely means your copy of the |
| // proto package needs to be updated. |
| const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package |
| |
| type AuthorizationPolicyToClient struct { |
| Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` |
| Spec *AuthorizationPolicySpecToClient `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"` |
| XXX_NoUnkeyedLiteral struct{} `json:"-"` |
| XXX_unrecognized []byte `json:"-"` |
| XXX_sizecache int32 `json:"-"` |
| } |
| |
| func (m *AuthorizationPolicyToClient) Reset() { *m = AuthorizationPolicyToClient{} } |
| func (m *AuthorizationPolicyToClient) String() string { return proto.CompactTextString(m) } |
| func (*AuthorizationPolicyToClient) ProtoMessage() {} |
| func (*AuthorizationPolicyToClient) Descriptor() ([]byte, []int) { |
| return fileDescriptor_1dbbe58d1e51a797, []int{0} |
| } |
| func (m *AuthorizationPolicyToClient) XXX_Unmarshal(b []byte) error { |
| return m.Unmarshal(b) |
| } |
| func (m *AuthorizationPolicyToClient) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
| if deterministic { |
| return xxx_messageInfo_AuthorizationPolicyToClient.Marshal(b, m, deterministic) |
| } else { |
| b = b[:cap(b)] |
| n, err := m.MarshalToSizedBuffer(b) |
| if err != nil { |
| return nil, err |
| } |
| return b[:n], nil |
| } |
| } |
| func (m *AuthorizationPolicyToClient) XXX_Merge(src proto.Message) { |
| xxx_messageInfo_AuthorizationPolicyToClient.Merge(m, src) |
| } |
| func (m *AuthorizationPolicyToClient) XXX_Size() int { |
| return m.Size() |
| } |
| func (m *AuthorizationPolicyToClient) XXX_DiscardUnknown() { |
| xxx_messageInfo_AuthorizationPolicyToClient.DiscardUnknown(m) |
| } |
| |
| var xxx_messageInfo_AuthorizationPolicyToClient proto.InternalMessageInfo |
| |
| func (m *AuthorizationPolicyToClient) GetKey() string { |
| if m != nil { |
| return m.Key |
| } |
| return "" |
| } |
| |
| func (m *AuthorizationPolicyToClient) GetSpec() *AuthorizationPolicySpecToClient { |
| if m != nil { |
| return m.Spec |
| } |
| return nil |
| } |
| |
| type AuthorizationPolicySpecToClient struct { |
| Action string `protobuf:"bytes,1,opt,name=action,proto3" json:"action,omitempty"` |
| Rules []*AuthorizationPolicyRuleToClient `protobuf:"bytes,2,rep,name=rules,proto3" json:"rules,omitempty"` |
| Samples float32 `protobuf:"fixed32,3,opt,name=samples,proto3" json:"samples,omitempty"` |
| Order float32 `protobuf:"fixed32,4,opt,name=order,proto3" json:"order,omitempty"` |
| MatchType string `protobuf:"bytes,5,opt,name=matchType,proto3" json:"matchType,omitempty"` |
| XXX_NoUnkeyedLiteral struct{} `json:"-"` |
| XXX_unrecognized []byte `json:"-"` |
| XXX_sizecache int32 `json:"-"` |
| } |
| |
| func (m *AuthorizationPolicySpecToClient) Reset() { *m = AuthorizationPolicySpecToClient{} } |
| func (m *AuthorizationPolicySpecToClient) String() string { return proto.CompactTextString(m) } |
| func (*AuthorizationPolicySpecToClient) ProtoMessage() {} |
| func (*AuthorizationPolicySpecToClient) Descriptor() ([]byte, []int) { |
| return fileDescriptor_1dbbe58d1e51a797, []int{1} |
| } |
| func (m *AuthorizationPolicySpecToClient) XXX_Unmarshal(b []byte) error { |
| return m.Unmarshal(b) |
| } |
| func (m *AuthorizationPolicySpecToClient) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
| if deterministic { |
| return xxx_messageInfo_AuthorizationPolicySpecToClient.Marshal(b, m, deterministic) |
| } else { |
| b = b[:cap(b)] |
| n, err := m.MarshalToSizedBuffer(b) |
| if err != nil { |
| return nil, err |
| } |
| return b[:n], nil |
| } |
| } |
| func (m *AuthorizationPolicySpecToClient) XXX_Merge(src proto.Message) { |
| xxx_messageInfo_AuthorizationPolicySpecToClient.Merge(m, src) |
| } |
| func (m *AuthorizationPolicySpecToClient) XXX_Size() int { |
| return m.Size() |
| } |
| func (m *AuthorizationPolicySpecToClient) XXX_DiscardUnknown() { |
| xxx_messageInfo_AuthorizationPolicySpecToClient.DiscardUnknown(m) |
| } |
| |
| var xxx_messageInfo_AuthorizationPolicySpecToClient proto.InternalMessageInfo |
| |
| func (m *AuthorizationPolicySpecToClient) GetAction() string { |
| if m != nil { |
| return m.Action |
| } |
| return "" |
| } |
| |
| func (m *AuthorizationPolicySpecToClient) GetRules() []*AuthorizationPolicyRuleToClient { |
| if m != nil { |
| return m.Rules |
| } |
| return nil |
| } |
| |
| func (m *AuthorizationPolicySpecToClient) GetSamples() float32 { |
| if m != nil { |
| return m.Samples |
| } |
| return 0 |
| } |
| |
| func (m *AuthorizationPolicySpecToClient) GetOrder() float32 { |
| if m != nil { |
| return m.Order |
| } |
| return 0 |
| } |
| |
| func (m *AuthorizationPolicySpecToClient) GetMatchType() string { |
| if m != nil { |
| return m.MatchType |
| } |
| return "" |
| } |
| |
| type AuthorizationPolicyRuleToClient struct { |
| From *AuthorizationPolicySource `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` |
| When *AuthorizationPolicyCondition `protobuf:"bytes,2,opt,name=when,proto3" json:"when,omitempty"` |
| XXX_NoUnkeyedLiteral struct{} `json:"-"` |
| XXX_unrecognized []byte `json:"-"` |
| XXX_sizecache int32 `json:"-"` |
| } |
| |
| func (m *AuthorizationPolicyRuleToClient) Reset() { *m = AuthorizationPolicyRuleToClient{} } |
| func (m *AuthorizationPolicyRuleToClient) String() string { return proto.CompactTextString(m) } |
| func (*AuthorizationPolicyRuleToClient) ProtoMessage() {} |
| func (*AuthorizationPolicyRuleToClient) Descriptor() ([]byte, []int) { |
| return fileDescriptor_1dbbe58d1e51a797, []int{2} |
| } |
| func (m *AuthorizationPolicyRuleToClient) XXX_Unmarshal(b []byte) error { |
| return m.Unmarshal(b) |
| } |
| func (m *AuthorizationPolicyRuleToClient) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
| if deterministic { |
| return xxx_messageInfo_AuthorizationPolicyRuleToClient.Marshal(b, m, deterministic) |
| } else { |
| b = b[:cap(b)] |
| n, err := m.MarshalToSizedBuffer(b) |
| if err != nil { |
| return nil, err |
| } |
| return b[:n], nil |
| } |
| } |
| func (m *AuthorizationPolicyRuleToClient) XXX_Merge(src proto.Message) { |
| xxx_messageInfo_AuthorizationPolicyRuleToClient.Merge(m, src) |
| } |
| func (m *AuthorizationPolicyRuleToClient) XXX_Size() int { |
| return m.Size() |
| } |
| func (m *AuthorizationPolicyRuleToClient) XXX_DiscardUnknown() { |
| xxx_messageInfo_AuthorizationPolicyRuleToClient.DiscardUnknown(m) |
| } |
| |
| var xxx_messageInfo_AuthorizationPolicyRuleToClient proto.InternalMessageInfo |
| |
| func (m *AuthorizationPolicyRuleToClient) GetFrom() *AuthorizationPolicySource { |
| if m != nil { |
| return m.From |
| } |
| return nil |
| } |
| |
| func (m *AuthorizationPolicyRuleToClient) GetWhen() *AuthorizationPolicyCondition { |
| if m != nil { |
| return m.When |
| } |
| return nil |
| } |
| |
| type AuthorizationPolicy struct { |
| Action string `protobuf:"bytes,1,opt,name=action,proto3" json:"action,omitempty"` |
| Rules []*AuthorizationPolicyRule `protobuf:"bytes,2,rep,name=rules,proto3" json:"rules,omitempty"` |
| Samples float32 `protobuf:"fixed32,3,opt,name=samples,proto3" json:"samples,omitempty"` |
| Order float32 `protobuf:"fixed32,4,opt,name=order,proto3" json:"order,omitempty"` |
| MatchType string `protobuf:"bytes,5,opt,name=matchType,proto3" json:"matchType,omitempty"` |
| XXX_NoUnkeyedLiteral struct{} `json:"-"` |
| XXX_unrecognized []byte `json:"-"` |
| XXX_sizecache int32 `json:"-"` |
| } |
| |
| func (m *AuthorizationPolicy) Reset() { *m = AuthorizationPolicy{} } |
| func (m *AuthorizationPolicy) String() string { return proto.CompactTextString(m) } |
| func (*AuthorizationPolicy) ProtoMessage() {} |
| func (*AuthorizationPolicy) Descriptor() ([]byte, []int) { |
| return fileDescriptor_1dbbe58d1e51a797, []int{3} |
| } |
| func (m *AuthorizationPolicy) XXX_Unmarshal(b []byte) error { |
| return m.Unmarshal(b) |
| } |
| func (m *AuthorizationPolicy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
| if deterministic { |
| return xxx_messageInfo_AuthorizationPolicy.Marshal(b, m, deterministic) |
| } else { |
| b = b[:cap(b)] |
| n, err := m.MarshalToSizedBuffer(b) |
| if err != nil { |
| return nil, err |
| } |
| return b[:n], nil |
| } |
| } |
| func (m *AuthorizationPolicy) XXX_Merge(src proto.Message) { |
| xxx_messageInfo_AuthorizationPolicy.Merge(m, src) |
| } |
| func (m *AuthorizationPolicy) XXX_Size() int { |
| return m.Size() |
| } |
| func (m *AuthorizationPolicy) XXX_DiscardUnknown() { |
| xxx_messageInfo_AuthorizationPolicy.DiscardUnknown(m) |
| } |
| |
| var xxx_messageInfo_AuthorizationPolicy proto.InternalMessageInfo |
| |
| func (m *AuthorizationPolicy) GetAction() string { |
| if m != nil { |
| return m.Action |
| } |
| return "" |
| } |
| |
| func (m *AuthorizationPolicy) GetRules() []*AuthorizationPolicyRule { |
| if m != nil { |
| return m.Rules |
| } |
| return nil |
| } |
| |
| func (m *AuthorizationPolicy) GetSamples() float32 { |
| if m != nil { |
| return m.Samples |
| } |
| return 0 |
| } |
| |
| func (m *AuthorizationPolicy) GetOrder() float32 { |
| if m != nil { |
| return m.Order |
| } |
| return 0 |
| } |
| |
| func (m *AuthorizationPolicy) GetMatchType() string { |
| if m != nil { |
| return m.MatchType |
| } |
| return "" |
| } |
| |
| type AuthorizationPolicyRule struct { |
| From *AuthorizationPolicySource `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"` |
| To *AuthorizationPolicyTarget `protobuf:"bytes,2,opt,name=to,proto3" json:"to,omitempty"` |
| When *AuthorizationPolicyCondition `protobuf:"bytes,3,opt,name=when,proto3" json:"when,omitempty"` |
| XXX_NoUnkeyedLiteral struct{} `json:"-"` |
| XXX_unrecognized []byte `json:"-"` |
| XXX_sizecache int32 `json:"-"` |
| } |
| |
| func (m *AuthorizationPolicyRule) Reset() { *m = AuthorizationPolicyRule{} } |
| func (m *AuthorizationPolicyRule) String() string { return proto.CompactTextString(m) } |
| func (*AuthorizationPolicyRule) ProtoMessage() {} |
| func (*AuthorizationPolicyRule) Descriptor() ([]byte, []int) { |
| return fileDescriptor_1dbbe58d1e51a797, []int{4} |
| } |
| func (m *AuthorizationPolicyRule) XXX_Unmarshal(b []byte) error { |
| return m.Unmarshal(b) |
| } |
| func (m *AuthorizationPolicyRule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
| if deterministic { |
| return xxx_messageInfo_AuthorizationPolicyRule.Marshal(b, m, deterministic) |
| } else { |
| b = b[:cap(b)] |
| n, err := m.MarshalToSizedBuffer(b) |
| if err != nil { |
| return nil, err |
| } |
| return b[:n], nil |
| } |
| } |
| func (m *AuthorizationPolicyRule) XXX_Merge(src proto.Message) { |
| xxx_messageInfo_AuthorizationPolicyRule.Merge(m, src) |
| } |
| func (m *AuthorizationPolicyRule) XXX_Size() int { |
| return m.Size() |
| } |
| func (m *AuthorizationPolicyRule) XXX_DiscardUnknown() { |
| xxx_messageInfo_AuthorizationPolicyRule.DiscardUnknown(m) |
| } |
| |
| var xxx_messageInfo_AuthorizationPolicyRule proto.InternalMessageInfo |
| |
| func (m *AuthorizationPolicyRule) GetFrom() *AuthorizationPolicySource { |
| if m != nil { |
| return m.From |
| } |
| return nil |
| } |
| |
| func (m *AuthorizationPolicyRule) GetTo() *AuthorizationPolicyTarget { |
| if m != nil { |
| return m.To |
| } |
| return nil |
| } |
| |
| func (m *AuthorizationPolicyRule) GetWhen() *AuthorizationPolicyCondition { |
| if m != nil { |
| return m.When |
| } |
| return nil |
| } |
| |
| type AuthorizationPolicySource struct { |
| Namespaces []string `protobuf:"bytes,1,rep,name=namespaces,proto3" json:"namespaces,omitempty"` |
| NotNamespaces []string `protobuf:"bytes,2,rep,name=notNamespaces,proto3" json:"notNamespaces,omitempty"` |
| IpBlocks []string `protobuf:"bytes,3,rep,name=ipBlocks,proto3" json:"ipBlocks,omitempty"` |
| NotIpBlocks []string `protobuf:"bytes,4,rep,name=notIpBlocks,proto3" json:"notIpBlocks,omitempty"` |
| Principals []string `protobuf:"bytes,5,rep,name=principals,proto3" json:"principals,omitempty"` |
| NotPrincipals []string `protobuf:"bytes,6,rep,name=notPrincipals,proto3" json:"notPrincipals,omitempty"` |
| Extends []*AuthorizationPolicyExtend `protobuf:"bytes,7,rep,name=extends,proto3" json:"extends,omitempty"` |
| NotExtends []*AuthorizationPolicyExtend `protobuf:"bytes,8,rep,name=notExtends,proto3" json:"notExtends,omitempty"` |
| XXX_NoUnkeyedLiteral struct{} `json:"-"` |
| XXX_unrecognized []byte `json:"-"` |
| XXX_sizecache int32 `json:"-"` |
| } |
| |
| func (m *AuthorizationPolicySource) Reset() { *m = AuthorizationPolicySource{} } |
| func (m *AuthorizationPolicySource) String() string { return proto.CompactTextString(m) } |
| func (*AuthorizationPolicySource) ProtoMessage() {} |
| func (*AuthorizationPolicySource) Descriptor() ([]byte, []int) { |
| return fileDescriptor_1dbbe58d1e51a797, []int{5} |
| } |
| func (m *AuthorizationPolicySource) XXX_Unmarshal(b []byte) error { |
| return m.Unmarshal(b) |
| } |
| func (m *AuthorizationPolicySource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
| if deterministic { |
| return xxx_messageInfo_AuthorizationPolicySource.Marshal(b, m, deterministic) |
| } else { |
| b = b[:cap(b)] |
| n, err := m.MarshalToSizedBuffer(b) |
| if err != nil { |
| return nil, err |
| } |
| return b[:n], nil |
| } |
| } |
| func (m *AuthorizationPolicySource) XXX_Merge(src proto.Message) { |
| xxx_messageInfo_AuthorizationPolicySource.Merge(m, src) |
| } |
| func (m *AuthorizationPolicySource) XXX_Size() int { |
| return m.Size() |
| } |
| func (m *AuthorizationPolicySource) XXX_DiscardUnknown() { |
| xxx_messageInfo_AuthorizationPolicySource.DiscardUnknown(m) |
| } |
| |
| var xxx_messageInfo_AuthorizationPolicySource proto.InternalMessageInfo |
| |
| func (m *AuthorizationPolicySource) GetNamespaces() []string { |
| if m != nil { |
| return m.Namespaces |
| } |
| return nil |
| } |
| |
| func (m *AuthorizationPolicySource) GetNotNamespaces() []string { |
| if m != nil { |
| return m.NotNamespaces |
| } |
| return nil |
| } |
| |
| func (m *AuthorizationPolicySource) GetIpBlocks() []string { |
| if m != nil { |
| return m.IpBlocks |
| } |
| return nil |
| } |
| |
| func (m *AuthorizationPolicySource) GetNotIpBlocks() []string { |
| if m != nil { |
| return m.NotIpBlocks |
| } |
| return nil |
| } |
| |
| func (m *AuthorizationPolicySource) GetPrincipals() []string { |
| if m != nil { |
| return m.Principals |
| } |
| return nil |
| } |
| |
| func (m *AuthorizationPolicySource) GetNotPrincipals() []string { |
| if m != nil { |
| return m.NotPrincipals |
| } |
| return nil |
| } |
| |
| func (m *AuthorizationPolicySource) GetExtends() []*AuthorizationPolicyExtend { |
| if m != nil { |
| return m.Extends |
| } |
| return nil |
| } |
| |
| func (m *AuthorizationPolicySource) GetNotExtends() []*AuthorizationPolicyExtend { |
| if m != nil { |
| return m.NotExtends |
| } |
| return nil |
| } |
| |
| type AuthorizationPolicyTarget struct { |
| Namespaces []string `protobuf:"bytes,1,rep,name=namespaces,proto3" json:"namespaces,omitempty"` |
| NotNamespaces []string `protobuf:"bytes,2,rep,name=notNamespaces,proto3" json:"notNamespaces,omitempty"` |
| IpBlocks []string `protobuf:"bytes,3,rep,name=ipBlocks,proto3" json:"ipBlocks,omitempty"` |
| NotIpBlocks []string `protobuf:"bytes,4,rep,name=notIpBlocks,proto3" json:"notIpBlocks,omitempty"` |
| Principals []string `protobuf:"bytes,5,rep,name=principals,proto3" json:"principals,omitempty"` |
| NotPrincipals []string `protobuf:"bytes,6,rep,name=notPrincipals,proto3" json:"notPrincipals,omitempty"` |
| Extends []*AuthorizationPolicyExtend `protobuf:"bytes,7,rep,name=extends,proto3" json:"extends,omitempty"` |
| NotExtends []*AuthorizationPolicyExtend `protobuf:"bytes,8,rep,name=notExtends,proto3" json:"notExtends,omitempty"` |
| XXX_NoUnkeyedLiteral struct{} `json:"-"` |
| XXX_unrecognized []byte `json:"-"` |
| XXX_sizecache int32 `json:"-"` |
| } |
| |
| func (m *AuthorizationPolicyTarget) Reset() { *m = AuthorizationPolicyTarget{} } |
| func (m *AuthorizationPolicyTarget) String() string { return proto.CompactTextString(m) } |
| func (*AuthorizationPolicyTarget) ProtoMessage() {} |
| func (*AuthorizationPolicyTarget) Descriptor() ([]byte, []int) { |
| return fileDescriptor_1dbbe58d1e51a797, []int{6} |
| } |
| func (m *AuthorizationPolicyTarget) XXX_Unmarshal(b []byte) error { |
| return m.Unmarshal(b) |
| } |
| func (m *AuthorizationPolicyTarget) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
| if deterministic { |
| return xxx_messageInfo_AuthorizationPolicyTarget.Marshal(b, m, deterministic) |
| } else { |
| b = b[:cap(b)] |
| n, err := m.MarshalToSizedBuffer(b) |
| if err != nil { |
| return nil, err |
| } |
| return b[:n], nil |
| } |
| } |
| func (m *AuthorizationPolicyTarget) XXX_Merge(src proto.Message) { |
| xxx_messageInfo_AuthorizationPolicyTarget.Merge(m, src) |
| } |
| func (m *AuthorizationPolicyTarget) XXX_Size() int { |
| return m.Size() |
| } |
| func (m *AuthorizationPolicyTarget) XXX_DiscardUnknown() { |
| xxx_messageInfo_AuthorizationPolicyTarget.DiscardUnknown(m) |
| } |
| |
| var xxx_messageInfo_AuthorizationPolicyTarget proto.InternalMessageInfo |
| |
| func (m *AuthorizationPolicyTarget) GetNamespaces() []string { |
| if m != nil { |
| return m.Namespaces |
| } |
| return nil |
| } |
| |
| func (m *AuthorizationPolicyTarget) GetNotNamespaces() []string { |
| if m != nil { |
| return m.NotNamespaces |
| } |
| return nil |
| } |
| |
| func (m *AuthorizationPolicyTarget) GetIpBlocks() []string { |
| if m != nil { |
| return m.IpBlocks |
| } |
| return nil |
| } |
| |
| func (m *AuthorizationPolicyTarget) GetNotIpBlocks() []string { |
| if m != nil { |
| return m.NotIpBlocks |
| } |
| return nil |
| } |
| |
| func (m *AuthorizationPolicyTarget) GetPrincipals() []string { |
| if m != nil { |
| return m.Principals |
| } |
| return nil |
| } |
| |
| func (m *AuthorizationPolicyTarget) GetNotPrincipals() []string { |
| if m != nil { |
| return m.NotPrincipals |
| } |
| return nil |
| } |
| |
| func (m *AuthorizationPolicyTarget) GetExtends() []*AuthorizationPolicyExtend { |
| if m != nil { |
| return m.Extends |
| } |
| return nil |
| } |
| |
| func (m *AuthorizationPolicyTarget) GetNotExtends() []*AuthorizationPolicyExtend { |
| if m != nil { |
| return m.NotExtends |
| } |
| return nil |
| } |
| |
| type AuthorizationPolicyCondition struct { |
| Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` |
| Values []*AuthorizationPolicyMatch `protobuf:"bytes,2,rep,name=values,proto3" json:"values,omitempty"` |
| NotValues []*AuthorizationPolicyMatch `protobuf:"bytes,3,rep,name=notValues,proto3" json:"notValues,omitempty"` |
| XXX_NoUnkeyedLiteral struct{} `json:"-"` |
| XXX_unrecognized []byte `json:"-"` |
| XXX_sizecache int32 `json:"-"` |
| } |
| |
| func (m *AuthorizationPolicyCondition) Reset() { *m = AuthorizationPolicyCondition{} } |
| func (m *AuthorizationPolicyCondition) String() string { return proto.CompactTextString(m) } |
| func (*AuthorizationPolicyCondition) ProtoMessage() {} |
| func (*AuthorizationPolicyCondition) Descriptor() ([]byte, []int) { |
| return fileDescriptor_1dbbe58d1e51a797, []int{7} |
| } |
| func (m *AuthorizationPolicyCondition) XXX_Unmarshal(b []byte) error { |
| return m.Unmarshal(b) |
| } |
| func (m *AuthorizationPolicyCondition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
| if deterministic { |
| return xxx_messageInfo_AuthorizationPolicyCondition.Marshal(b, m, deterministic) |
| } else { |
| b = b[:cap(b)] |
| n, err := m.MarshalToSizedBuffer(b) |
| if err != nil { |
| return nil, err |
| } |
| return b[:n], nil |
| } |
| } |
| func (m *AuthorizationPolicyCondition) XXX_Merge(src proto.Message) { |
| xxx_messageInfo_AuthorizationPolicyCondition.Merge(m, src) |
| } |
| func (m *AuthorizationPolicyCondition) XXX_Size() int { |
| return m.Size() |
| } |
| func (m *AuthorizationPolicyCondition) XXX_DiscardUnknown() { |
| xxx_messageInfo_AuthorizationPolicyCondition.DiscardUnknown(m) |
| } |
| |
| var xxx_messageInfo_AuthorizationPolicyCondition proto.InternalMessageInfo |
| |
| func (m *AuthorizationPolicyCondition) GetKey() string { |
| if m != nil { |
| return m.Key |
| } |
| return "" |
| } |
| |
| func (m *AuthorizationPolicyCondition) GetValues() []*AuthorizationPolicyMatch { |
| if m != nil { |
| return m.Values |
| } |
| return nil |
| } |
| |
| func (m *AuthorizationPolicyCondition) GetNotValues() []*AuthorizationPolicyMatch { |
| if m != nil { |
| return m.NotValues |
| } |
| return nil |
| } |
| |
| type AuthorizationPolicyMatch struct { |
| Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` |
| Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` |
| XXX_NoUnkeyedLiteral struct{} `json:"-"` |
| XXX_unrecognized []byte `json:"-"` |
| XXX_sizecache int32 `json:"-"` |
| } |
| |
| func (m *AuthorizationPolicyMatch) Reset() { *m = AuthorizationPolicyMatch{} } |
| func (m *AuthorizationPolicyMatch) String() string { return proto.CompactTextString(m) } |
| func (*AuthorizationPolicyMatch) ProtoMessage() {} |
| func (*AuthorizationPolicyMatch) Descriptor() ([]byte, []int) { |
| return fileDescriptor_1dbbe58d1e51a797, []int{8} |
| } |
| func (m *AuthorizationPolicyMatch) XXX_Unmarshal(b []byte) error { |
| return m.Unmarshal(b) |
| } |
| func (m *AuthorizationPolicyMatch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
| if deterministic { |
| return xxx_messageInfo_AuthorizationPolicyMatch.Marshal(b, m, deterministic) |
| } else { |
| b = b[:cap(b)] |
| n, err := m.MarshalToSizedBuffer(b) |
| if err != nil { |
| return nil, err |
| } |
| return b[:n], nil |
| } |
| } |
| func (m *AuthorizationPolicyMatch) XXX_Merge(src proto.Message) { |
| xxx_messageInfo_AuthorizationPolicyMatch.Merge(m, src) |
| } |
| func (m *AuthorizationPolicyMatch) XXX_Size() int { |
| return m.Size() |
| } |
| func (m *AuthorizationPolicyMatch) XXX_DiscardUnknown() { |
| xxx_messageInfo_AuthorizationPolicyMatch.DiscardUnknown(m) |
| } |
| |
| var xxx_messageInfo_AuthorizationPolicyMatch proto.InternalMessageInfo |
| |
| func (m *AuthorizationPolicyMatch) GetType() string { |
| if m != nil { |
| return m.Type |
| } |
| return "" |
| } |
| |
| func (m *AuthorizationPolicyMatch) GetValue() string { |
| if m != nil { |
| return m.Value |
| } |
| return "" |
| } |
| |
| type AuthorizationPolicyExtend struct { |
| Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` |
| Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` |
| XXX_NoUnkeyedLiteral struct{} `json:"-"` |
| XXX_unrecognized []byte `json:"-"` |
| XXX_sizecache int32 `json:"-"` |
| } |
| |
| func (m *AuthorizationPolicyExtend) Reset() { *m = AuthorizationPolicyExtend{} } |
| func (m *AuthorizationPolicyExtend) String() string { return proto.CompactTextString(m) } |
| func (*AuthorizationPolicyExtend) ProtoMessage() {} |
| func (*AuthorizationPolicyExtend) Descriptor() ([]byte, []int) { |
| return fileDescriptor_1dbbe58d1e51a797, []int{9} |
| } |
| func (m *AuthorizationPolicyExtend) XXX_Unmarshal(b []byte) error { |
| return m.Unmarshal(b) |
| } |
| func (m *AuthorizationPolicyExtend) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
| if deterministic { |
| return xxx_messageInfo_AuthorizationPolicyExtend.Marshal(b, m, deterministic) |
| } else { |
| b = b[:cap(b)] |
| n, err := m.MarshalToSizedBuffer(b) |
| if err != nil { |
| return nil, err |
| } |
| return b[:n], nil |
| } |
| } |
| func (m *AuthorizationPolicyExtend) XXX_Merge(src proto.Message) { |
| xxx_messageInfo_AuthorizationPolicyExtend.Merge(m, src) |
| } |
| func (m *AuthorizationPolicyExtend) XXX_Size() int { |
| return m.Size() |
| } |
| func (m *AuthorizationPolicyExtend) XXX_DiscardUnknown() { |
| xxx_messageInfo_AuthorizationPolicyExtend.DiscardUnknown(m) |
| } |
| |
| var xxx_messageInfo_AuthorizationPolicyExtend proto.InternalMessageInfo |
| |
| func (m *AuthorizationPolicyExtend) GetKey() string { |
| if m != nil { |
| return m.Key |
| } |
| return "" |
| } |
| |
| func (m *AuthorizationPolicyExtend) GetValue() string { |
| if m != nil { |
| return m.Value |
| } |
| return "" |
| } |
| |
| func init() { |
| proto.RegisterType((*AuthorizationPolicyToClient)(nil), "dubbo.apache.org.v1alpha1.AuthorizationPolicyToClient") |
| proto.RegisterType((*AuthorizationPolicySpecToClient)(nil), "dubbo.apache.org.v1alpha1.AuthorizationPolicySpecToClient") |
| proto.RegisterType((*AuthorizationPolicyRuleToClient)(nil), "dubbo.apache.org.v1alpha1.AuthorizationPolicyRuleToClient") |
| proto.RegisterType((*AuthorizationPolicy)(nil), "dubbo.apache.org.v1alpha1.AuthorizationPolicy") |
| proto.RegisterType((*AuthorizationPolicyRule)(nil), "dubbo.apache.org.v1alpha1.AuthorizationPolicyRule") |
| proto.RegisterType((*AuthorizationPolicySource)(nil), "dubbo.apache.org.v1alpha1.AuthorizationPolicySource") |
| proto.RegisterType((*AuthorizationPolicyTarget)(nil), "dubbo.apache.org.v1alpha1.AuthorizationPolicyTarget") |
| proto.RegisterType((*AuthorizationPolicyCondition)(nil), "dubbo.apache.org.v1alpha1.AuthorizationPolicyCondition") |
| proto.RegisterType((*AuthorizationPolicyMatch)(nil), "dubbo.apache.org.v1alpha1.AuthorizationPolicyMatch") |
| proto.RegisterType((*AuthorizationPolicyExtend)(nil), "dubbo.apache.org.v1alpha1.AuthorizationPolicyExtend") |
| } |
| |
| func init() { proto.RegisterFile("authorization.proto", fileDescriptor_1dbbe58d1e51a797) } |
| |
| var fileDescriptor_1dbbe58d1e51a797 = []byte{ |
| // 581 bytes of a gzipped FileDescriptorProto |
| 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x96, 0x41, 0x6f, 0xd3, 0x30, |
| 0x14, 0xc7, 0x71, 0x92, 0xb6, 0xeb, 0xab, 0x90, 0x90, 0x87, 0x20, 0x83, 0xa9, 0x44, 0x11, 0x87, |
| 0x9e, 0x22, 0xad, 0x43, 0x42, 0xe2, 0xc6, 0xba, 0x49, 0x43, 0x13, 0x55, 0x31, 0x15, 0x77, 0x37, |
| 0x35, 0x6b, 0xb4, 0xd4, 0xb6, 0x12, 0x67, 0x50, 0x2e, 0x7c, 0x00, 0xbe, 0x00, 0x1f, 0x85, 0x2f, |
| 0x80, 0xc4, 0x71, 0x57, 0x6e, 0xa8, 0x7c, 0x07, 0xce, 0x28, 0x4e, 0xda, 0x74, 0x52, 0x02, 0x0a, |
| 0x0c, 0x4e, 0xbb, 0xe5, 0x3d, 0xbf, 0xfc, 0xfc, 0xf7, 0xfb, 0xbb, 0xaf, 0x81, 0x6d, 0x9a, 0xa8, |
| 0x99, 0x88, 0x82, 0x77, 0x54, 0x05, 0x82, 0x7b, 0x32, 0x12, 0x4a, 0xe0, 0x9d, 0x69, 0x32, 0x99, |
| 0x08, 0x8f, 0x4a, 0xea, 0xcf, 0x98, 0x27, 0xa2, 0x53, 0xef, 0x7c, 0x8f, 0x86, 0x72, 0x46, 0xf7, |
| 0xdc, 0xf7, 0x70, 0xff, 0xe9, 0xe6, 0x1b, 0x23, 0x11, 0x06, 0xfe, 0x62, 0x2c, 0x06, 0x61, 0xc0, |
| 0xb8, 0xc2, 0xb7, 0xc0, 0x3c, 0x63, 0x0b, 0x1b, 0x39, 0xa8, 0xd7, 0x26, 0xe9, 0x23, 0x1e, 0x82, |
| 0x15, 0x4b, 0xe6, 0xdb, 0x86, 0x83, 0x7a, 0x9d, 0xfe, 0x13, 0xaf, 0x12, 0xed, 0x95, 0x70, 0x5f, |
| 0x4a, 0xe6, 0xaf, 0xd8, 0x44, 0x73, 0xdc, 0xaf, 0x08, 0x1e, 0xfc, 0xa6, 0x12, 0xdf, 0x81, 0x26, |
| 0xf5, 0xd3, 0xb5, 0x5c, 0x48, 0x1e, 0xe1, 0x11, 0x34, 0xa2, 0x24, 0x64, 0xb1, 0x6d, 0x38, 0x66, |
| 0x7d, 0x31, 0x24, 0x09, 0xd9, 0x5a, 0x4c, 0x06, 0xc2, 0x36, 0xb4, 0x62, 0x3a, 0x97, 0x29, 0xd3, |
| 0x74, 0x50, 0xcf, 0x20, 0xab, 0x10, 0xdf, 0x86, 0x86, 0x88, 0xa6, 0x2c, 0xb2, 0x2d, 0x9d, 0xcf, |
| 0x02, 0xbc, 0x0b, 0xed, 0x39, 0x55, 0xfe, 0x6c, 0xbc, 0x90, 0xcc, 0x6e, 0x68, 0x71, 0x45, 0xc2, |
| 0xfd, 0x54, 0x7e, 0xb6, 0xcd, 0x8d, 0xf1, 0x31, 0x58, 0xaf, 0x23, 0x31, 0xd7, 0x27, 0xeb, 0xf4, |
| 0x1f, 0xd5, 0xec, 0xa7, 0x48, 0x22, 0x9f, 0x11, 0x4d, 0xc0, 0x27, 0x60, 0xbd, 0x99, 0x31, 0x9e, |
| 0x3b, 0xf3, 0xb8, 0x1e, 0x69, 0x20, 0xf8, 0x34, 0x48, 0x43, 0xa2, 0x21, 0xee, 0x67, 0x04, 0xdb, |
| 0x25, 0x65, 0x95, 0x56, 0x1c, 0x5f, 0xb6, 0xa2, 0x5f, 0xdf, 0x8a, 0x7f, 0x63, 0xc1, 0x0f, 0x04, |
| 0x77, 0x2b, 0x36, 0xbc, 0xc2, 0xd6, 0x1f, 0x82, 0xa1, 0x44, 0xde, 0xf8, 0x9a, 0x9c, 0x31, 0x8d, |
| 0x4e, 0x99, 0x22, 0x86, 0x12, 0x6b, 0x03, 0xcd, 0xab, 0x30, 0xf0, 0x83, 0x09, 0x3b, 0x95, 0xb2, |
| 0x71, 0x17, 0x80, 0xd3, 0x39, 0x8b, 0x25, 0xf5, 0x59, 0x6c, 0x23, 0xc7, 0xec, 0xb5, 0xc9, 0x46, |
| 0x06, 0x3f, 0x84, 0x9b, 0x5c, 0xa8, 0x61, 0x51, 0x62, 0xe8, 0x92, 0xcb, 0x49, 0x7c, 0x0f, 0xb6, |
| 0x02, 0x79, 0x10, 0x0a, 0xff, 0x2c, 0xf5, 0x2a, 0x2d, 0x58, 0xc7, 0xd8, 0x81, 0x0e, 0x17, 0xea, |
| 0xd9, 0x6a, 0xd9, 0xd2, 0xcb, 0x9b, 0xa9, 0x54, 0x83, 0x8c, 0x02, 0xee, 0x07, 0x92, 0x86, 0xb1, |
| 0xdd, 0xc8, 0x34, 0x14, 0x99, 0x5c, 0xc3, 0xa8, 0x28, 0x69, 0xae, 0x35, 0x14, 0x49, 0x3c, 0x84, |
| 0x16, 0x7b, 0xab, 0x18, 0x9f, 0xc6, 0x76, 0x4b, 0x5f, 0xbd, 0x9a, 0xfd, 0x3f, 0xd2, 0x2f, 0x93, |
| 0x15, 0x04, 0x8f, 0x01, 0xb8, 0x50, 0x47, 0x39, 0x72, 0xeb, 0x2f, 0x90, 0x1b, 0x9c, 0x2a, 0x37, |
| 0x32, 0xf3, 0xaf, 0xdd, 0xf8, 0xcf, 0x6e, 0x5c, 0x20, 0xd8, 0xfd, 0xd5, 0x4f, 0xa8, 0xe4, 0x6f, |
| 0xef, 0x04, 0x9a, 0xe7, 0x34, 0x4c, 0xd6, 0x03, 0x6e, 0xbf, 0x9e, 0x88, 0xe7, 0xe9, 0x40, 0x22, |
| 0x39, 0x02, 0xbf, 0x80, 0x36, 0x17, 0xea, 0x55, 0xc6, 0x33, 0xff, 0x9c, 0x57, 0x50, 0xdc, 0x43, |
| 0xb0, 0xab, 0xca, 0x30, 0x06, 0x4b, 0xa5, 0xc3, 0x31, 0x3b, 0x8e, 0x7e, 0x4e, 0x67, 0xa9, 0x16, |
| 0xa3, 0x87, 0x56, 0x9b, 0x64, 0x81, 0x3b, 0x28, 0xbd, 0xa5, 0x59, 0xdb, 0x4a, 0x9a, 0x52, 0x0a, |
| 0x39, 0xc0, 0x5f, 0x96, 0x5d, 0x74, 0xb1, 0xec, 0xa2, 0x6f, 0xcb, 0x2e, 0xfa, 0xf8, 0xbd, 0x7b, |
| 0x63, 0x84, 0x26, 0x4d, 0xfd, 0x21, 0xb2, 0xff, 0x33, 0x00, 0x00, 0xff, 0xff, 0xef, 0x81, 0x9b, |
| 0x00, 0x9f, 0x08, 0x00, 0x00, |
| } |
| |
| func (m *AuthorizationPolicyToClient) 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 *AuthorizationPolicyToClient) MarshalTo(dAtA []byte) (int, error) { |
| size := m.Size() |
| return m.MarshalToSizedBuffer(dAtA[:size]) |
| } |
| |
| func (m *AuthorizationPolicyToClient) 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.Spec != nil { |
| { |
| size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) |
| if err != nil { |
| return 0, err |
| } |
| i -= size |
| i = encodeVarintAuthorization(dAtA, i, uint64(size)) |
| } |
| i-- |
| dAtA[i] = 0x12 |
| } |
| if len(m.Key) > 0 { |
| i -= len(m.Key) |
| copy(dAtA[i:], m.Key) |
| i = encodeVarintAuthorization(dAtA, i, uint64(len(m.Key))) |
| i-- |
| dAtA[i] = 0xa |
| } |
| return len(dAtA) - i, nil |
| } |
| |
| func (m *AuthorizationPolicySpecToClient) 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 *AuthorizationPolicySpecToClient) MarshalTo(dAtA []byte) (int, error) { |
| size := m.Size() |
| return m.MarshalToSizedBuffer(dAtA[:size]) |
| } |
| |
| func (m *AuthorizationPolicySpecToClient) 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.MatchType) > 0 { |
| i -= len(m.MatchType) |
| copy(dAtA[i:], m.MatchType) |
| i = encodeVarintAuthorization(dAtA, i, uint64(len(m.MatchType))) |
| i-- |
| dAtA[i] = 0x2a |
| } |
| if m.Order != 0 { |
| i -= 4 |
| encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.Order)))) |
| i-- |
| dAtA[i] = 0x25 |
| } |
| if m.Samples != 0 { |
| i -= 4 |
| encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.Samples)))) |
| i-- |
| dAtA[i] = 0x1d |
| } |
| if len(m.Rules) > 0 { |
| for iNdEx := len(m.Rules) - 1; iNdEx >= 0; iNdEx-- { |
| { |
| size, err := m.Rules[iNdEx].MarshalToSizedBuffer(dAtA[:i]) |
| if err != nil { |
| return 0, err |
| } |
| i -= size |
| i = encodeVarintAuthorization(dAtA, i, uint64(size)) |
| } |
| i-- |
| dAtA[i] = 0x12 |
| } |
| } |
| if len(m.Action) > 0 { |
| i -= len(m.Action) |
| copy(dAtA[i:], m.Action) |
| i = encodeVarintAuthorization(dAtA, i, uint64(len(m.Action))) |
| i-- |
| dAtA[i] = 0xa |
| } |
| return len(dAtA) - i, nil |
| } |
| |
| func (m *AuthorizationPolicyRuleToClient) 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 *AuthorizationPolicyRuleToClient) MarshalTo(dAtA []byte) (int, error) { |
| size := m.Size() |
| return m.MarshalToSizedBuffer(dAtA[:size]) |
| } |
| |
| func (m *AuthorizationPolicyRuleToClient) 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.When != nil { |
| { |
| size, err := m.When.MarshalToSizedBuffer(dAtA[:i]) |
| if err != nil { |
| return 0, err |
| } |
| i -= size |
| i = encodeVarintAuthorization(dAtA, i, uint64(size)) |
| } |
| i-- |
| dAtA[i] = 0x12 |
| } |
| if m.From != nil { |
| { |
| size, err := m.From.MarshalToSizedBuffer(dAtA[:i]) |
| if err != nil { |
| return 0, err |
| } |
| i -= size |
| i = encodeVarintAuthorization(dAtA, i, uint64(size)) |
| } |
| i-- |
| dAtA[i] = 0xa |
| } |
| return len(dAtA) - i, nil |
| } |
| |
| func (m *AuthorizationPolicy) 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 *AuthorizationPolicy) MarshalTo(dAtA []byte) (int, error) { |
| size := m.Size() |
| return m.MarshalToSizedBuffer(dAtA[:size]) |
| } |
| |
| func (m *AuthorizationPolicy) 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.MatchType) > 0 { |
| i -= len(m.MatchType) |
| copy(dAtA[i:], m.MatchType) |
| i = encodeVarintAuthorization(dAtA, i, uint64(len(m.MatchType))) |
| i-- |
| dAtA[i] = 0x2a |
| } |
| if m.Order != 0 { |
| i -= 4 |
| encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.Order)))) |
| i-- |
| dAtA[i] = 0x25 |
| } |
| if m.Samples != 0 { |
| i -= 4 |
| encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.Samples)))) |
| i-- |
| dAtA[i] = 0x1d |
| } |
| if len(m.Rules) > 0 { |
| for iNdEx := len(m.Rules) - 1; iNdEx >= 0; iNdEx-- { |
| { |
| size, err := m.Rules[iNdEx].MarshalToSizedBuffer(dAtA[:i]) |
| if err != nil { |
| return 0, err |
| } |
| i -= size |
| i = encodeVarintAuthorization(dAtA, i, uint64(size)) |
| } |
| i-- |
| dAtA[i] = 0x12 |
| } |
| } |
| if len(m.Action) > 0 { |
| i -= len(m.Action) |
| copy(dAtA[i:], m.Action) |
| i = encodeVarintAuthorization(dAtA, i, uint64(len(m.Action))) |
| i-- |
| dAtA[i] = 0xa |
| } |
| return len(dAtA) - i, nil |
| } |
| |
| func (m *AuthorizationPolicyRule) 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 *AuthorizationPolicyRule) MarshalTo(dAtA []byte) (int, error) { |
| size := m.Size() |
| return m.MarshalToSizedBuffer(dAtA[:size]) |
| } |
| |
| func (m *AuthorizationPolicyRule) 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.When != nil { |
| { |
| size, err := m.When.MarshalToSizedBuffer(dAtA[:i]) |
| if err != nil { |
| return 0, err |
| } |
| i -= size |
| i = encodeVarintAuthorization(dAtA, i, uint64(size)) |
| } |
| i-- |
| dAtA[i] = 0x1a |
| } |
| if m.To != nil { |
| { |
| size, err := m.To.MarshalToSizedBuffer(dAtA[:i]) |
| if err != nil { |
| return 0, err |
| } |
| i -= size |
| i = encodeVarintAuthorization(dAtA, i, uint64(size)) |
| } |
| i-- |
| dAtA[i] = 0x12 |
| } |
| if m.From != nil { |
| { |
| size, err := m.From.MarshalToSizedBuffer(dAtA[:i]) |
| if err != nil { |
| return 0, err |
| } |
| i -= size |
| i = encodeVarintAuthorization(dAtA, i, uint64(size)) |
| } |
| i-- |
| dAtA[i] = 0xa |
| } |
| return len(dAtA) - i, nil |
| } |
| |
| func (m *AuthorizationPolicySource) 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 *AuthorizationPolicySource) MarshalTo(dAtA []byte) (int, error) { |
| size := m.Size() |
| return m.MarshalToSizedBuffer(dAtA[:size]) |
| } |
| |
| func (m *AuthorizationPolicySource) 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.NotExtends) > 0 { |
| for iNdEx := len(m.NotExtends) - 1; iNdEx >= 0; iNdEx-- { |
| { |
| size, err := m.NotExtends[iNdEx].MarshalToSizedBuffer(dAtA[:i]) |
| if err != nil { |
| return 0, err |
| } |
| i -= size |
| i = encodeVarintAuthorization(dAtA, i, uint64(size)) |
| } |
| i-- |
| dAtA[i] = 0x42 |
| } |
| } |
| if len(m.Extends) > 0 { |
| for iNdEx := len(m.Extends) - 1; iNdEx >= 0; iNdEx-- { |
| { |
| size, err := m.Extends[iNdEx].MarshalToSizedBuffer(dAtA[:i]) |
| if err != nil { |
| return 0, err |
| } |
| i -= size |
| i = encodeVarintAuthorization(dAtA, i, uint64(size)) |
| } |
| i-- |
| dAtA[i] = 0x3a |
| } |
| } |
| if len(m.NotPrincipals) > 0 { |
| for iNdEx := len(m.NotPrincipals) - 1; iNdEx >= 0; iNdEx-- { |
| i -= len(m.NotPrincipals[iNdEx]) |
| copy(dAtA[i:], m.NotPrincipals[iNdEx]) |
| i = encodeVarintAuthorization(dAtA, i, uint64(len(m.NotPrincipals[iNdEx]))) |
| i-- |
| dAtA[i] = 0x32 |
| } |
| } |
| if len(m.Principals) > 0 { |
| for iNdEx := len(m.Principals) - 1; iNdEx >= 0; iNdEx-- { |
| i -= len(m.Principals[iNdEx]) |
| copy(dAtA[i:], m.Principals[iNdEx]) |
| i = encodeVarintAuthorization(dAtA, i, uint64(len(m.Principals[iNdEx]))) |
| i-- |
| dAtA[i] = 0x2a |
| } |
| } |
| if len(m.NotIpBlocks) > 0 { |
| for iNdEx := len(m.NotIpBlocks) - 1; iNdEx >= 0; iNdEx-- { |
| i -= len(m.NotIpBlocks[iNdEx]) |
| copy(dAtA[i:], m.NotIpBlocks[iNdEx]) |
| i = encodeVarintAuthorization(dAtA, i, uint64(len(m.NotIpBlocks[iNdEx]))) |
| i-- |
| dAtA[i] = 0x22 |
| } |
| } |
| if len(m.IpBlocks) > 0 { |
| for iNdEx := len(m.IpBlocks) - 1; iNdEx >= 0; iNdEx-- { |
| i -= len(m.IpBlocks[iNdEx]) |
| copy(dAtA[i:], m.IpBlocks[iNdEx]) |
| i = encodeVarintAuthorization(dAtA, i, uint64(len(m.IpBlocks[iNdEx]))) |
| i-- |
| dAtA[i] = 0x1a |
| } |
| } |
| if len(m.NotNamespaces) > 0 { |
| for iNdEx := len(m.NotNamespaces) - 1; iNdEx >= 0; iNdEx-- { |
| i -= len(m.NotNamespaces[iNdEx]) |
| copy(dAtA[i:], m.NotNamespaces[iNdEx]) |
| i = encodeVarintAuthorization(dAtA, i, uint64(len(m.NotNamespaces[iNdEx]))) |
| i-- |
| dAtA[i] = 0x12 |
| } |
| } |
| if len(m.Namespaces) > 0 { |
| for iNdEx := len(m.Namespaces) - 1; iNdEx >= 0; iNdEx-- { |
| i -= len(m.Namespaces[iNdEx]) |
| copy(dAtA[i:], m.Namespaces[iNdEx]) |
| i = encodeVarintAuthorization(dAtA, i, uint64(len(m.Namespaces[iNdEx]))) |
| i-- |
| dAtA[i] = 0xa |
| } |
| } |
| return len(dAtA) - i, nil |
| } |
| |
| func (m *AuthorizationPolicyTarget) 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 *AuthorizationPolicyTarget) MarshalTo(dAtA []byte) (int, error) { |
| size := m.Size() |
| return m.MarshalToSizedBuffer(dAtA[:size]) |
| } |
| |
| func (m *AuthorizationPolicyTarget) 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.NotExtends) > 0 { |
| for iNdEx := len(m.NotExtends) - 1; iNdEx >= 0; iNdEx-- { |
| { |
| size, err := m.NotExtends[iNdEx].MarshalToSizedBuffer(dAtA[:i]) |
| if err != nil { |
| return 0, err |
| } |
| i -= size |
| i = encodeVarintAuthorization(dAtA, i, uint64(size)) |
| } |
| i-- |
| dAtA[i] = 0x42 |
| } |
| } |
| if len(m.Extends) > 0 { |
| for iNdEx := len(m.Extends) - 1; iNdEx >= 0; iNdEx-- { |
| { |
| size, err := m.Extends[iNdEx].MarshalToSizedBuffer(dAtA[:i]) |
| if err != nil { |
| return 0, err |
| } |
| i -= size |
| i = encodeVarintAuthorization(dAtA, i, uint64(size)) |
| } |
| i-- |
| dAtA[i] = 0x3a |
| } |
| } |
| if len(m.NotPrincipals) > 0 { |
| for iNdEx := len(m.NotPrincipals) - 1; iNdEx >= 0; iNdEx-- { |
| i -= len(m.NotPrincipals[iNdEx]) |
| copy(dAtA[i:], m.NotPrincipals[iNdEx]) |
| i = encodeVarintAuthorization(dAtA, i, uint64(len(m.NotPrincipals[iNdEx]))) |
| i-- |
| dAtA[i] = 0x32 |
| } |
| } |
| if len(m.Principals) > 0 { |
| for iNdEx := len(m.Principals) - 1; iNdEx >= 0; iNdEx-- { |
| i -= len(m.Principals[iNdEx]) |
| copy(dAtA[i:], m.Principals[iNdEx]) |
| i = encodeVarintAuthorization(dAtA, i, uint64(len(m.Principals[iNdEx]))) |
| i-- |
| dAtA[i] = 0x2a |
| } |
| } |
| if len(m.NotIpBlocks) > 0 { |
| for iNdEx := len(m.NotIpBlocks) - 1; iNdEx >= 0; iNdEx-- { |
| i -= len(m.NotIpBlocks[iNdEx]) |
| copy(dAtA[i:], m.NotIpBlocks[iNdEx]) |
| i = encodeVarintAuthorization(dAtA, i, uint64(len(m.NotIpBlocks[iNdEx]))) |
| i-- |
| dAtA[i] = 0x22 |
| } |
| } |
| if len(m.IpBlocks) > 0 { |
| for iNdEx := len(m.IpBlocks) - 1; iNdEx >= 0; iNdEx-- { |
| i -= len(m.IpBlocks[iNdEx]) |
| copy(dAtA[i:], m.IpBlocks[iNdEx]) |
| i = encodeVarintAuthorization(dAtA, i, uint64(len(m.IpBlocks[iNdEx]))) |
| i-- |
| dAtA[i] = 0x1a |
| } |
| } |
| if len(m.NotNamespaces) > 0 { |
| for iNdEx := len(m.NotNamespaces) - 1; iNdEx >= 0; iNdEx-- { |
| i -= len(m.NotNamespaces[iNdEx]) |
| copy(dAtA[i:], m.NotNamespaces[iNdEx]) |
| i = encodeVarintAuthorization(dAtA, i, uint64(len(m.NotNamespaces[iNdEx]))) |
| i-- |
| dAtA[i] = 0x12 |
| } |
| } |
| if len(m.Namespaces) > 0 { |
| for iNdEx := len(m.Namespaces) - 1; iNdEx >= 0; iNdEx-- { |
| i -= len(m.Namespaces[iNdEx]) |
| copy(dAtA[i:], m.Namespaces[iNdEx]) |
| i = encodeVarintAuthorization(dAtA, i, uint64(len(m.Namespaces[iNdEx]))) |
| i-- |
| dAtA[i] = 0xa |
| } |
| } |
| return len(dAtA) - i, nil |
| } |
| |
| func (m *AuthorizationPolicyCondition) 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 *AuthorizationPolicyCondition) MarshalTo(dAtA []byte) (int, error) { |
| size := m.Size() |
| return m.MarshalToSizedBuffer(dAtA[:size]) |
| } |
| |
| func (m *AuthorizationPolicyCondition) 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.NotValues) > 0 { |
| for iNdEx := len(m.NotValues) - 1; iNdEx >= 0; iNdEx-- { |
| { |
| size, err := m.NotValues[iNdEx].MarshalToSizedBuffer(dAtA[:i]) |
| if err != nil { |
| return 0, err |
| } |
| i -= size |
| i = encodeVarintAuthorization(dAtA, i, uint64(size)) |
| } |
| i-- |
| dAtA[i] = 0x1a |
| } |
| } |
| if len(m.Values) > 0 { |
| for iNdEx := len(m.Values) - 1; iNdEx >= 0; iNdEx-- { |
| { |
| size, err := m.Values[iNdEx].MarshalToSizedBuffer(dAtA[:i]) |
| if err != nil { |
| return 0, err |
| } |
| i -= size |
| i = encodeVarintAuthorization(dAtA, i, uint64(size)) |
| } |
| i-- |
| dAtA[i] = 0x12 |
| } |
| } |
| if len(m.Key) > 0 { |
| i -= len(m.Key) |
| copy(dAtA[i:], m.Key) |
| i = encodeVarintAuthorization(dAtA, i, uint64(len(m.Key))) |
| i-- |
| dAtA[i] = 0xa |
| } |
| return len(dAtA) - i, nil |
| } |
| |
| func (m *AuthorizationPolicyMatch) 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 *AuthorizationPolicyMatch) MarshalTo(dAtA []byte) (int, error) { |
| size := m.Size() |
| return m.MarshalToSizedBuffer(dAtA[:size]) |
| } |
| |
| func (m *AuthorizationPolicyMatch) 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.Value) > 0 { |
| i -= len(m.Value) |
| copy(dAtA[i:], m.Value) |
| i = encodeVarintAuthorization(dAtA, i, uint64(len(m.Value))) |
| i-- |
| dAtA[i] = 0x12 |
| } |
| if len(m.Type) > 0 { |
| i -= len(m.Type) |
| copy(dAtA[i:], m.Type) |
| i = encodeVarintAuthorization(dAtA, i, uint64(len(m.Type))) |
| i-- |
| dAtA[i] = 0xa |
| } |
| return len(dAtA) - i, nil |
| } |
| |
| func (m *AuthorizationPolicyExtend) 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 *AuthorizationPolicyExtend) MarshalTo(dAtA []byte) (int, error) { |
| size := m.Size() |
| return m.MarshalToSizedBuffer(dAtA[:size]) |
| } |
| |
| func (m *AuthorizationPolicyExtend) 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.Value) > 0 { |
| i -= len(m.Value) |
| copy(dAtA[i:], m.Value) |
| i = encodeVarintAuthorization(dAtA, i, uint64(len(m.Value))) |
| i-- |
| dAtA[i] = 0x12 |
| } |
| if len(m.Key) > 0 { |
| i -= len(m.Key) |
| copy(dAtA[i:], m.Key) |
| i = encodeVarintAuthorization(dAtA, i, uint64(len(m.Key))) |
| i-- |
| dAtA[i] = 0xa |
| } |
| return len(dAtA) - i, nil |
| } |
| |
| func encodeVarintAuthorization(dAtA []byte, offset int, v uint64) int { |
| offset -= sovAuthorization(v) |
| base := offset |
| for v >= 1<<7 { |
| dAtA[offset] = uint8(v&0x7f | 0x80) |
| v >>= 7 |
| offset++ |
| } |
| dAtA[offset] = uint8(v) |
| return base |
| } |
| func (m *AuthorizationPolicyToClient) Size() (n int) { |
| if m == nil { |
| return 0 |
| } |
| var l int |
| _ = l |
| l = len(m.Key) |
| if l > 0 { |
| n += 1 + l + sovAuthorization(uint64(l)) |
| } |
| if m.Spec != nil { |
| l = m.Spec.Size() |
| n += 1 + l + sovAuthorization(uint64(l)) |
| } |
| if m.XXX_unrecognized != nil { |
| n += len(m.XXX_unrecognized) |
| } |
| return n |
| } |
| |
| func (m *AuthorizationPolicySpecToClient) Size() (n int) { |
| if m == nil { |
| return 0 |
| } |
| var l int |
| _ = l |
| l = len(m.Action) |
| if l > 0 { |
| n += 1 + l + sovAuthorization(uint64(l)) |
| } |
| if len(m.Rules) > 0 { |
| for _, e := range m.Rules { |
| l = e.Size() |
| n += 1 + l + sovAuthorization(uint64(l)) |
| } |
| } |
| if m.Samples != 0 { |
| n += 5 |
| } |
| if m.Order != 0 { |
| n += 5 |
| } |
| l = len(m.MatchType) |
| if l > 0 { |
| n += 1 + l + sovAuthorization(uint64(l)) |
| } |
| if m.XXX_unrecognized != nil { |
| n += len(m.XXX_unrecognized) |
| } |
| return n |
| } |
| |
| func (m *AuthorizationPolicyRuleToClient) Size() (n int) { |
| if m == nil { |
| return 0 |
| } |
| var l int |
| _ = l |
| if m.From != nil { |
| l = m.From.Size() |
| n += 1 + l + sovAuthorization(uint64(l)) |
| } |
| if m.When != nil { |
| l = m.When.Size() |
| n += 1 + l + sovAuthorization(uint64(l)) |
| } |
| if m.XXX_unrecognized != nil { |
| n += len(m.XXX_unrecognized) |
| } |
| return n |
| } |
| |
| func (m *AuthorizationPolicy) Size() (n int) { |
| if m == nil { |
| return 0 |
| } |
| var l int |
| _ = l |
| l = len(m.Action) |
| if l > 0 { |
| n += 1 + l + sovAuthorization(uint64(l)) |
| } |
| if len(m.Rules) > 0 { |
| for _, e := range m.Rules { |
| l = e.Size() |
| n += 1 + l + sovAuthorization(uint64(l)) |
| } |
| } |
| if m.Samples != 0 { |
| n += 5 |
| } |
| if m.Order != 0 { |
| n += 5 |
| } |
| l = len(m.MatchType) |
| if l > 0 { |
| n += 1 + l + sovAuthorization(uint64(l)) |
| } |
| if m.XXX_unrecognized != nil { |
| n += len(m.XXX_unrecognized) |
| } |
| return n |
| } |
| |
| func (m *AuthorizationPolicyRule) Size() (n int) { |
| if m == nil { |
| return 0 |
| } |
| var l int |
| _ = l |
| if m.From != nil { |
| l = m.From.Size() |
| n += 1 + l + sovAuthorization(uint64(l)) |
| } |
| if m.To != nil { |
| l = m.To.Size() |
| n += 1 + l + sovAuthorization(uint64(l)) |
| } |
| if m.When != nil { |
| l = m.When.Size() |
| n += 1 + l + sovAuthorization(uint64(l)) |
| } |
| if m.XXX_unrecognized != nil { |
| n += len(m.XXX_unrecognized) |
| } |
| return n |
| } |
| |
| func (m *AuthorizationPolicySource) Size() (n int) { |
| if m == nil { |
| return 0 |
| } |
| var l int |
| _ = l |
| if len(m.Namespaces) > 0 { |
| for _, s := range m.Namespaces { |
| l = len(s) |
| n += 1 + l + sovAuthorization(uint64(l)) |
| } |
| } |
| if len(m.NotNamespaces) > 0 { |
| for _, s := range m.NotNamespaces { |
| l = len(s) |
| n += 1 + l + sovAuthorization(uint64(l)) |
| } |
| } |
| if len(m.IpBlocks) > 0 { |
| for _, s := range m.IpBlocks { |
| l = len(s) |
| n += 1 + l + sovAuthorization(uint64(l)) |
| } |
| } |
| if len(m.NotIpBlocks) > 0 { |
| for _, s := range m.NotIpBlocks { |
| l = len(s) |
| n += 1 + l + sovAuthorization(uint64(l)) |
| } |
| } |
| if len(m.Principals) > 0 { |
| for _, s := range m.Principals { |
| l = len(s) |
| n += 1 + l + sovAuthorization(uint64(l)) |
| } |
| } |
| if len(m.NotPrincipals) > 0 { |
| for _, s := range m.NotPrincipals { |
| l = len(s) |
| n += 1 + l + sovAuthorization(uint64(l)) |
| } |
| } |
| if len(m.Extends) > 0 { |
| for _, e := range m.Extends { |
| l = e.Size() |
| n += 1 + l + sovAuthorization(uint64(l)) |
| } |
| } |
| if len(m.NotExtends) > 0 { |
| for _, e := range m.NotExtends { |
| l = e.Size() |
| n += 1 + l + sovAuthorization(uint64(l)) |
| } |
| } |
| if m.XXX_unrecognized != nil { |
| n += len(m.XXX_unrecognized) |
| } |
| return n |
| } |
| |
| func (m *AuthorizationPolicyTarget) Size() (n int) { |
| if m == nil { |
| return 0 |
| } |
| var l int |
| _ = l |
| if len(m.Namespaces) > 0 { |
| for _, s := range m.Namespaces { |
| l = len(s) |
| n += 1 + l + sovAuthorization(uint64(l)) |
| } |
| } |
| if len(m.NotNamespaces) > 0 { |
| for _, s := range m.NotNamespaces { |
| l = len(s) |
| n += 1 + l + sovAuthorization(uint64(l)) |
| } |
| } |
| if len(m.IpBlocks) > 0 { |
| for _, s := range m.IpBlocks { |
| l = len(s) |
| n += 1 + l + sovAuthorization(uint64(l)) |
| } |
| } |
| if len(m.NotIpBlocks) > 0 { |
| for _, s := range m.NotIpBlocks { |
| l = len(s) |
| n += 1 + l + sovAuthorization(uint64(l)) |
| } |
| } |
| if len(m.Principals) > 0 { |
| for _, s := range m.Principals { |
| l = len(s) |
| n += 1 + l + sovAuthorization(uint64(l)) |
| } |
| } |
| if len(m.NotPrincipals) > 0 { |
| for _, s := range m.NotPrincipals { |
| l = len(s) |
| n += 1 + l + sovAuthorization(uint64(l)) |
| } |
| } |
| if len(m.Extends) > 0 { |
| for _, e := range m.Extends { |
| l = e.Size() |
| n += 1 + l + sovAuthorization(uint64(l)) |
| } |
| } |
| if len(m.NotExtends) > 0 { |
| for _, e := range m.NotExtends { |
| l = e.Size() |
| n += 1 + l + sovAuthorization(uint64(l)) |
| } |
| } |
| if m.XXX_unrecognized != nil { |
| n += len(m.XXX_unrecognized) |
| } |
| return n |
| } |
| |
| func (m *AuthorizationPolicyCondition) Size() (n int) { |
| if m == nil { |
| return 0 |
| } |
| var l int |
| _ = l |
| l = len(m.Key) |
| if l > 0 { |
| n += 1 + l + sovAuthorization(uint64(l)) |
| } |
| if len(m.Values) > 0 { |
| for _, e := range m.Values { |
| l = e.Size() |
| n += 1 + l + sovAuthorization(uint64(l)) |
| } |
| } |
| if len(m.NotValues) > 0 { |
| for _, e := range m.NotValues { |
| l = e.Size() |
| n += 1 + l + sovAuthorization(uint64(l)) |
| } |
| } |
| if m.XXX_unrecognized != nil { |
| n += len(m.XXX_unrecognized) |
| } |
| return n |
| } |
| |
| func (m *AuthorizationPolicyMatch) Size() (n int) { |
| if m == nil { |
| return 0 |
| } |
| var l int |
| _ = l |
| l = len(m.Type) |
| if l > 0 { |
| n += 1 + l + sovAuthorization(uint64(l)) |
| } |
| l = len(m.Value) |
| if l > 0 { |
| n += 1 + l + sovAuthorization(uint64(l)) |
| } |
| if m.XXX_unrecognized != nil { |
| n += len(m.XXX_unrecognized) |
| } |
| return n |
| } |
| |
| func (m *AuthorizationPolicyExtend) Size() (n int) { |
| if m == nil { |
| return 0 |
| } |
| var l int |
| _ = l |
| l = len(m.Key) |
| if l > 0 { |
| n += 1 + l + sovAuthorization(uint64(l)) |
| } |
| l = len(m.Value) |
| if l > 0 { |
| n += 1 + l + sovAuthorization(uint64(l)) |
| } |
| if m.XXX_unrecognized != nil { |
| n += len(m.XXX_unrecognized) |
| } |
| return n |
| } |
| |
| func sovAuthorization(x uint64) (n int) { |
| return (math_bits.Len64(x|1) + 6) / 7 |
| } |
| func sozAuthorization(x uint64) (n int) { |
| return sovAuthorization(uint64((x << 1) ^ uint64((int64(x) >> 63)))) |
| } |
| func (m *AuthorizationPolicyToClient) 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 ErrIntOverflowAuthorization |
| } |
| 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: AuthorizationPolicyToClient: wiretype end group for non-group") |
| } |
| if fieldNum <= 0 { |
| return fmt.Errorf("proto: AuthorizationPolicyToClient: 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 ErrIntOverflowAuthorization |
| } |
| 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 ErrInvalidLengthAuthorization |
| } |
| postIndex := iNdEx + intStringLen |
| if postIndex < 0 { |
| return ErrInvalidLengthAuthorization |
| } |
| if postIndex > l { |
| return io.ErrUnexpectedEOF |
| } |
| m.Key = string(dAtA[iNdEx:postIndex]) |
| iNdEx = postIndex |
| case 2: |
| if wireType != 2 { |
| return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) |
| } |
| var msglen int |
| for shift := uint(0); ; shift += 7 { |
| if shift >= 64 { |
| return ErrIntOverflowAuthorization |
| } |
| if iNdEx >= l { |
| return io.ErrUnexpectedEOF |
| } |
| b := dAtA[iNdEx] |
| iNdEx++ |
| msglen |= int(b&0x7F) << shift |
| if b < 0x80 { |
| break |
| } |
| } |
| if msglen < 0 { |
| return ErrInvalidLengthAuthorization |
| } |
| postIndex := iNdEx + msglen |
| if postIndex < 0 { |
| return ErrInvalidLengthAuthorization |
| } |
| if postIndex > l { |
| return io.ErrUnexpectedEOF |
| } |
| if m.Spec == nil { |
| m.Spec = &AuthorizationPolicySpecToClient{} |
| } |
| if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { |
| return err |
| } |
| iNdEx = postIndex |
| default: |
| iNdEx = preIndex |
| skippy, err := skipAuthorization(dAtA[iNdEx:]) |
| if err != nil { |
| return err |
| } |
| if (skippy < 0) || (iNdEx+skippy) < 0 { |
| return ErrInvalidLengthAuthorization |
| } |
| 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 *AuthorizationPolicySpecToClient) 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 ErrIntOverflowAuthorization |
| } |
| 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: AuthorizationPolicySpecToClient: wiretype end group for non-group") |
| } |
| if fieldNum <= 0 { |
| return fmt.Errorf("proto: AuthorizationPolicySpecToClient: illegal tag %d (wire type %d)", fieldNum, wire) |
| } |
| switch fieldNum { |
| case 1: |
| if wireType != 2 { |
| return fmt.Errorf("proto: wrong wireType = %d for field Action", wireType) |
| } |
| var stringLen uint64 |
| for shift := uint(0); ; shift += 7 { |
| if shift >= 64 { |
| return ErrIntOverflowAuthorization |
| } |
| 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 ErrInvalidLengthAuthorization |
| } |
| postIndex := iNdEx + intStringLen |
| if postIndex < 0 { |
| return ErrInvalidLengthAuthorization |
| } |
| if postIndex > l { |
| return io.ErrUnexpectedEOF |
| } |
| m.Action = string(dAtA[iNdEx:postIndex]) |
| iNdEx = postIndex |
| case 2: |
| if wireType != 2 { |
| return fmt.Errorf("proto: wrong wireType = %d for field Rules", wireType) |
| } |
| var msglen int |
| for shift := uint(0); ; shift += 7 { |
| if shift >= 64 { |
| return ErrIntOverflowAuthorization |
| } |
| if iNdEx >= l { |
| return io.ErrUnexpectedEOF |
| } |
| b := dAtA[iNdEx] |
| iNdEx++ |
| msglen |= int(b&0x7F) << shift |
| if b < 0x80 { |
| break |
| } |
| } |
| if msglen < 0 { |
| return ErrInvalidLengthAuthorization |
| } |
| postIndex := iNdEx + msglen |
| if postIndex < 0 { |
| return ErrInvalidLengthAuthorization |
| } |
| if postIndex > l { |
| return io.ErrUnexpectedEOF |
| } |
| m.Rules = append(m.Rules, &AuthorizationPolicyRuleToClient{}) |
| if err := m.Rules[len(m.Rules)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { |
| return err |
| } |
| iNdEx = postIndex |
| case 3: |
| if wireType != 5 { |
| return fmt.Errorf("proto: wrong wireType = %d for field Samples", wireType) |
| } |
| var v uint32 |
| if (iNdEx + 4) > l { |
| return io.ErrUnexpectedEOF |
| } |
| v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) |
| iNdEx += 4 |
| m.Samples = float32(math.Float32frombits(v)) |
| case 4: |
| if wireType != 5 { |
| return fmt.Errorf("proto: wrong wireType = %d for field Order", wireType) |
| } |
| var v uint32 |
| if (iNdEx + 4) > l { |
| return io.ErrUnexpectedEOF |
| } |
| v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) |
| iNdEx += 4 |
| m.Order = float32(math.Float32frombits(v)) |
| case 5: |
| if wireType != 2 { |
| return fmt.Errorf("proto: wrong wireType = %d for field MatchType", wireType) |
| } |
| var stringLen uint64 |
| for shift := uint(0); ; shift += 7 { |
| if shift >= 64 { |
| return ErrIntOverflowAuthorization |
| } |
| 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 ErrInvalidLengthAuthorization |
| } |
| postIndex := iNdEx + intStringLen |
| if postIndex < 0 { |
| return ErrInvalidLengthAuthorization |
| } |
| if postIndex > l { |
| return io.ErrUnexpectedEOF |
| } |
| m.MatchType = string(dAtA[iNdEx:postIndex]) |
| iNdEx = postIndex |
| default: |
| iNdEx = preIndex |
| skippy, err := skipAuthorization(dAtA[iNdEx:]) |
| if err != nil { |
| return err |
| } |
| if (skippy < 0) || (iNdEx+skippy) < 0 { |
| return ErrInvalidLengthAuthorization |
| } |
| 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 *AuthorizationPolicyRuleToClient) 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 ErrIntOverflowAuthorization |
| } |
| 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: AuthorizationPolicyRuleToClient: wiretype end group for non-group") |
| } |
| if fieldNum <= 0 { |
| return fmt.Errorf("proto: AuthorizationPolicyRuleToClient: illegal tag %d (wire type %d)", fieldNum, wire) |
| } |
| switch fieldNum { |
| case 1: |
| if wireType != 2 { |
| return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) |
| } |
| var msglen int |
| for shift := uint(0); ; shift += 7 { |
| if shift >= 64 { |
| return ErrIntOverflowAuthorization |
| } |
| if iNdEx >= l { |
| return io.ErrUnexpectedEOF |
| } |
| b := dAtA[iNdEx] |
| iNdEx++ |
| msglen |= int(b&0x7F) << shift |
| if b < 0x80 { |
| break |
| } |
| } |
| if msglen < 0 { |
| return ErrInvalidLengthAuthorization |
| } |
| postIndex := iNdEx + msglen |
| if postIndex < 0 { |
| return ErrInvalidLengthAuthorization |
| } |
| if postIndex > l { |
| return io.ErrUnexpectedEOF |
| } |
| if m.From == nil { |
| m.From = &AuthorizationPolicySource{} |
| } |
| if err := m.From.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { |
| return err |
| } |
| iNdEx = postIndex |
| case 2: |
| if wireType != 2 { |
| return fmt.Errorf("proto: wrong wireType = %d for field When", wireType) |
| } |
| var msglen int |
| for shift := uint(0); ; shift += 7 { |
| if shift >= 64 { |
| return ErrIntOverflowAuthorization |
| } |
| if iNdEx >= l { |
| return io.ErrUnexpectedEOF |
| } |
| b := dAtA[iNdEx] |
| iNdEx++ |
| msglen |= int(b&0x7F) << shift |
| if b < 0x80 { |
| break |
| } |
| } |
| if msglen < 0 { |
| return ErrInvalidLengthAuthorization |
| } |
| postIndex := iNdEx + msglen |
| if postIndex < 0 { |
| return ErrInvalidLengthAuthorization |
| } |
| if postIndex > l { |
| return io.ErrUnexpectedEOF |
| } |
| if m.When == nil { |
| m.When = &AuthorizationPolicyCondition{} |
| } |
| if err := m.When.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { |
| return err |
| } |
| iNdEx = postIndex |
| default: |
| iNdEx = preIndex |
| skippy, err := skipAuthorization(dAtA[iNdEx:]) |
| if err != nil { |
| return err |
| } |
| if (skippy < 0) || (iNdEx+skippy) < 0 { |
| return ErrInvalidLengthAuthorization |
| } |
| 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 *AuthorizationPolicy) 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 ErrIntOverflowAuthorization |
| } |
| 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: AuthorizationPolicy: wiretype end group for non-group") |
| } |
| if fieldNum <= 0 { |
| return fmt.Errorf("proto: AuthorizationPolicy: illegal tag %d (wire type %d)", fieldNum, wire) |
| } |
| switch fieldNum { |
| case 1: |
| if wireType != 2 { |
| return fmt.Errorf("proto: wrong wireType = %d for field Action", wireType) |
| } |
| var stringLen uint64 |
| for shift := uint(0); ; shift += 7 { |
| if shift >= 64 { |
| return ErrIntOverflowAuthorization |
| } |
| 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 ErrInvalidLengthAuthorization |
| } |
| postIndex := iNdEx + intStringLen |
| if postIndex < 0 { |
| return ErrInvalidLengthAuthorization |
| } |
| if postIndex > l { |
| return io.ErrUnexpectedEOF |
| } |
| m.Action = string(dAtA[iNdEx:postIndex]) |
| iNdEx = postIndex |
| case 2: |
| if wireType != 2 { |
| return fmt.Errorf("proto: wrong wireType = %d for field Rules", wireType) |
| } |
| var msglen int |
| for shift := uint(0); ; shift += 7 { |
| if shift >= 64 { |
| return ErrIntOverflowAuthorization |
| } |
| if iNdEx >= l { |
| return io.ErrUnexpectedEOF |
| } |
| b := dAtA[iNdEx] |
| iNdEx++ |
| msglen |= int(b&0x7F) << shift |
| if b < 0x80 { |
| break |
| } |
| } |
| if msglen < 0 { |
| return ErrInvalidLengthAuthorization |
| } |
| postIndex := iNdEx + msglen |
| if postIndex < 0 { |
| return ErrInvalidLengthAuthorization |
| } |
| if postIndex > l { |
| return io.ErrUnexpectedEOF |
| } |
| m.Rules = append(m.Rules, &AuthorizationPolicyRule{}) |
| if err := m.Rules[len(m.Rules)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { |
| return err |
| } |
| iNdEx = postIndex |
| case 3: |
| if wireType != 5 { |
| return fmt.Errorf("proto: wrong wireType = %d for field Samples", wireType) |
| } |
| var v uint32 |
| if (iNdEx + 4) > l { |
| return io.ErrUnexpectedEOF |
| } |
| v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) |
| iNdEx += 4 |
| m.Samples = float32(math.Float32frombits(v)) |
| case 4: |
| if wireType != 5 { |
| return fmt.Errorf("proto: wrong wireType = %d for field Order", wireType) |
| } |
| var v uint32 |
| if (iNdEx + 4) > l { |
| return io.ErrUnexpectedEOF |
| } |
| v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) |
| iNdEx += 4 |
| m.Order = float32(math.Float32frombits(v)) |
| case 5: |
| if wireType != 2 { |
| return fmt.Errorf("proto: wrong wireType = %d for field MatchType", wireType) |
| } |
| var stringLen uint64 |
| for shift := uint(0); ; shift += 7 { |
| if shift >= 64 { |
| return ErrIntOverflowAuthorization |
| } |
| 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 ErrInvalidLengthAuthorization |
| } |
| postIndex := iNdEx + intStringLen |
| if postIndex < 0 { |
| return ErrInvalidLengthAuthorization |
| } |
| if postIndex > l { |
| return io.ErrUnexpectedEOF |
| } |
| m.MatchType = string(dAtA[iNdEx:postIndex]) |
| iNdEx = postIndex |
| default: |
| iNdEx = preIndex |
| skippy, err := skipAuthorization(dAtA[iNdEx:]) |
| if err != nil { |
| return err |
| } |
| if (skippy < 0) || (iNdEx+skippy) < 0 { |
| return ErrInvalidLengthAuthorization |
| } |
| 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 *AuthorizationPolicyRule) 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 ErrIntOverflowAuthorization |
| } |
| 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: AuthorizationPolicyRule: wiretype end group for non-group") |
| } |
| if fieldNum <= 0 { |
| return fmt.Errorf("proto: AuthorizationPolicyRule: illegal tag %d (wire type %d)", fieldNum, wire) |
| } |
| switch fieldNum { |
| case 1: |
| if wireType != 2 { |
| return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) |
| } |
| var msglen int |
| for shift := uint(0); ; shift += 7 { |
| if shift >= 64 { |
| return ErrIntOverflowAuthorization |
| } |
| if iNdEx >= l { |
| return io.ErrUnexpectedEOF |
| } |
| b := dAtA[iNdEx] |
| iNdEx++ |
| msglen |= int(b&0x7F) << shift |
| if b < 0x80 { |
| break |
| } |
| } |
| if msglen < 0 { |
| return ErrInvalidLengthAuthorization |
| } |
| postIndex := iNdEx + msglen |
| if postIndex < 0 { |
| return ErrInvalidLengthAuthorization |
| } |
| if postIndex > l { |
| return io.ErrUnexpectedEOF |
| } |
| if m.From == nil { |
| m.From = &AuthorizationPolicySource{} |
| } |
| if err := m.From.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { |
| return err |
| } |
| iNdEx = postIndex |
| case 2: |
| if wireType != 2 { |
| return fmt.Errorf("proto: wrong wireType = %d for field To", wireType) |
| } |
| var msglen int |
| for shift := uint(0); ; shift += 7 { |
| if shift >= 64 { |
| return ErrIntOverflowAuthorization |
| } |
| if iNdEx >= l { |
| return io.ErrUnexpectedEOF |
| } |
| b := dAtA[iNdEx] |
| iNdEx++ |
| msglen |= int(b&0x7F) << shift |
| if b < 0x80 { |
| break |
| } |
| } |
| if msglen < 0 { |
| return ErrInvalidLengthAuthorization |
| } |
| postIndex := iNdEx + msglen |
| if postIndex < 0 { |
| return ErrInvalidLengthAuthorization |
| } |
| if postIndex > l { |
| return io.ErrUnexpectedEOF |
| } |
| if m.To == nil { |
| m.To = &AuthorizationPolicyTarget{} |
| } |
| if err := m.To.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { |
| return err |
| } |
| iNdEx = postIndex |
| case 3: |
| if wireType != 2 { |
| return fmt.Errorf("proto: wrong wireType = %d for field When", wireType) |
| } |
| var msglen int |
| for shift := uint(0); ; shift += 7 { |
| if shift >= 64 { |
| return ErrIntOverflowAuthorization |
| } |
| if iNdEx >= l { |
| return io.ErrUnexpectedEOF |
| } |
| b := dAtA[iNdEx] |
| iNdEx++ |
| msglen |= int(b&0x7F) << shift |
| if b < 0x80 { |
| break |
| } |
| } |
| if msglen < 0 { |
| return ErrInvalidLengthAuthorization |
| } |
| postIndex := iNdEx + msglen |
| if postIndex < 0 { |
| return ErrInvalidLengthAuthorization |
| } |
| if postIndex > l { |
| return io.ErrUnexpectedEOF |
| } |
| if m.When == nil { |
| m.When = &AuthorizationPolicyCondition{} |
| } |
| if err := m.When.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { |
| return err |
| } |
| iNdEx = postIndex |
| default: |
| iNdEx = preIndex |
| skippy, err := skipAuthorization(dAtA[iNdEx:]) |
| if err != nil { |
| return err |
| } |
| if (skippy < 0) || (iNdEx+skippy) < 0 { |
| return ErrInvalidLengthAuthorization |
| } |
| 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 *AuthorizationPolicySource) 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 ErrIntOverflowAuthorization |
| } |
| 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: AuthorizationPolicySource: wiretype end group for non-group") |
| } |
| if fieldNum <= 0 { |
| return fmt.Errorf("proto: AuthorizationPolicySource: illegal tag %d (wire type %d)", fieldNum, wire) |
| } |
| switch fieldNum { |
| case 1: |
| if wireType != 2 { |
| return fmt.Errorf("proto: wrong wireType = %d for field Namespaces", wireType) |
| } |
| var stringLen uint64 |
| for shift := uint(0); ; shift += 7 { |
| if shift >= 64 { |
| return ErrIntOverflowAuthorization |
| } |
| 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 ErrInvalidLengthAuthorization |
| } |
| postIndex := iNdEx + intStringLen |
| if postIndex < 0 { |
| return ErrInvalidLengthAuthorization |
| } |
| if postIndex > l { |
| return io.ErrUnexpectedEOF |
| } |
| m.Namespaces = append(m.Namespaces, string(dAtA[iNdEx:postIndex])) |
| iNdEx = postIndex |
| case 2: |
| if wireType != 2 { |
| return fmt.Errorf("proto: wrong wireType = %d for field NotNamespaces", wireType) |
| } |
| var stringLen uint64 |
| for shift := uint(0); ; shift += 7 { |
| if shift >= 64 { |
| return ErrIntOverflowAuthorization |
| } |
| 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 ErrInvalidLengthAuthorization |
| } |
| postIndex := iNdEx + intStringLen |
| if postIndex < 0 { |
| return ErrInvalidLengthAuthorization |
| } |
| if postIndex > l { |
| return io.ErrUnexpectedEOF |
| } |
| m.NotNamespaces = append(m.NotNamespaces, string(dAtA[iNdEx:postIndex])) |
| iNdEx = postIndex |
| case 3: |
| if wireType != 2 { |
| return fmt.Errorf("proto: wrong wireType = %d for field IpBlocks", wireType) |
| } |
| var stringLen uint64 |
| for shift := uint(0); ; shift += 7 { |
| if shift >= 64 { |
| return ErrIntOverflowAuthorization |
| } |
| 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 ErrInvalidLengthAuthorization |
| } |
| postIndex := iNdEx + intStringLen |
| if postIndex < 0 { |
| return ErrInvalidLengthAuthorization |
| } |
| if postIndex > l { |
| return io.ErrUnexpectedEOF |
| } |
| m.IpBlocks = append(m.IpBlocks, string(dAtA[iNdEx:postIndex])) |
| iNdEx = postIndex |
| case 4: |
| if wireType != 2 { |
| return fmt.Errorf("proto: wrong wireType = %d for field NotIpBlocks", wireType) |
| } |
| var stringLen uint64 |
| for shift := uint(0); ; shift += 7 { |
| if shift >= 64 { |
| return ErrIntOverflowAuthorization |
| } |
| 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 ErrInvalidLengthAuthorization |
| } |
| postIndex := iNdEx + intStringLen |
| if postIndex < 0 { |
| return ErrInvalidLengthAuthorization |
| } |
| if postIndex > l { |
| return io.ErrUnexpectedEOF |
| } |
| m.NotIpBlocks = append(m.NotIpBlocks, string(dAtA[iNdEx:postIndex])) |
| iNdEx = postIndex |
| case 5: |
| if wireType != 2 { |
| return fmt.Errorf("proto: wrong wireType = %d for field Principals", wireType) |
| } |
| var stringLen uint64 |
| for shift := uint(0); ; shift += 7 { |
| if shift >= 64 { |
| return ErrIntOverflowAuthorization |
| } |
| 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 ErrInvalidLengthAuthorization |
| } |
| postIndex := iNdEx + intStringLen |
| if postIndex < 0 { |
| return ErrInvalidLengthAuthorization |
| } |
| if postIndex > l { |
| return io.ErrUnexpectedEOF |
| } |
| m.Principals = append(m.Principals, string(dAtA[iNdEx:postIndex])) |
| iNdEx = postIndex |
| case 6: |
| if wireType != 2 { |
| return fmt.Errorf("proto: wrong wireType = %d for field NotPrincipals", wireType) |
| } |
| var stringLen uint64 |
| for shift := uint(0); ; shift += 7 { |
| if shift >= 64 { |
| return ErrIntOverflowAuthorization |
| } |
| 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 ErrInvalidLengthAuthorization |
| } |
| postIndex := iNdEx + intStringLen |
| if postIndex < 0 { |
| return ErrInvalidLengthAuthorization |
| } |
| if postIndex > l { |
| return io.ErrUnexpectedEOF |
| } |
| m.NotPrincipals = append(m.NotPrincipals, string(dAtA[iNdEx:postIndex])) |
| iNdEx = postIndex |
| case 7: |
| if wireType != 2 { |
| return fmt.Errorf("proto: wrong wireType = %d for field Extends", wireType) |
| } |
| var msglen int |
| for shift := uint(0); ; shift += 7 { |
| if shift >= 64 { |
| return ErrIntOverflowAuthorization |
| } |
| if iNdEx >= l { |
| return io.ErrUnexpectedEOF |
| } |
| b := dAtA[iNdEx] |
| iNdEx++ |
| msglen |= int(b&0x7F) << shift |
| if b < 0x80 { |
| break |
| } |
| } |
| if msglen < 0 { |
| return ErrInvalidLengthAuthorization |
| } |
| postIndex := iNdEx + msglen |
| if postIndex < 0 { |
| return ErrInvalidLengthAuthorization |
| } |
| if postIndex > l { |
| return io.ErrUnexpectedEOF |
| } |
| m.Extends = append(m.Extends, &AuthorizationPolicyExtend{}) |
| if err := m.Extends[len(m.Extends)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { |
| return err |
| } |
| iNdEx = postIndex |
| case 8: |
| if wireType != 2 { |
| return fmt.Errorf("proto: wrong wireType = %d for field NotExtends", wireType) |
| } |
| var msglen int |
| for shift := uint(0); ; shift += 7 { |
| if shift >= 64 { |
| return ErrIntOverflowAuthorization |
| } |
| if iNdEx >= l { |
| return io.ErrUnexpectedEOF |
| } |
| b := dAtA[iNdEx] |
| iNdEx++ |
| msglen |= int(b&0x7F) << shift |
| if b < 0x80 { |
| break |
| } |
| } |
| if msglen < 0 { |
| return ErrInvalidLengthAuthorization |
| } |
| postIndex := iNdEx + msglen |
| if postIndex < 0 { |
| return ErrInvalidLengthAuthorization |
| } |
| if postIndex > l { |
| return io.ErrUnexpectedEOF |
| } |
| m.NotExtends = append(m.NotExtends, &AuthorizationPolicyExtend{}) |
| if err := m.NotExtends[len(m.NotExtends)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { |
| return err |
| } |
| iNdEx = postIndex |
| default: |
| iNdEx = preIndex |
| skippy, err := skipAuthorization(dAtA[iNdEx:]) |
| if err != nil { |
| return err |
| } |
| if (skippy < 0) || (iNdEx+skippy) < 0 { |
| return ErrInvalidLengthAuthorization |
| } |
| 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 *AuthorizationPolicyTarget) 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 ErrIntOverflowAuthorization |
| } |
| 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: AuthorizationPolicyTarget: wiretype end group for non-group") |
| } |
| if fieldNum <= 0 { |
| return fmt.Errorf("proto: AuthorizationPolicyTarget: illegal tag %d (wire type %d)", fieldNum, wire) |
| } |
| switch fieldNum { |
| case 1: |
| if wireType != 2 { |
| return fmt.Errorf("proto: wrong wireType = %d for field Namespaces", wireType) |
| } |
| var stringLen uint64 |
| for shift := uint(0); ; shift += 7 { |
| if shift >= 64 { |
| return ErrIntOverflowAuthorization |
| } |
| 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 ErrInvalidLengthAuthorization |
| } |
| postIndex := iNdEx + intStringLen |
| if postIndex < 0 { |
| return ErrInvalidLengthAuthorization |
| } |
| if postIndex > l { |
| return io.ErrUnexpectedEOF |
| } |
| m.Namespaces = append(m.Namespaces, string(dAtA[iNdEx:postIndex])) |
| iNdEx = postIndex |
| case 2: |
| if wireType != 2 { |
| return fmt.Errorf("proto: wrong wireType = %d for field NotNamespaces", wireType) |
| } |
| var stringLen uint64 |
| for shift := uint(0); ; shift += 7 { |
| if shift >= 64 { |
| return ErrIntOverflowAuthorization |
| } |
| 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 ErrInvalidLengthAuthorization |
| } |
| postIndex := iNdEx + intStringLen |
| if postIndex < 0 { |
| return ErrInvalidLengthAuthorization |
| } |
| if postIndex > l { |
| return io.ErrUnexpectedEOF |
| } |
| m.NotNamespaces = append(m.NotNamespaces, string(dAtA[iNdEx:postIndex])) |
| iNdEx = postIndex |
| case 3: |
| if wireType != 2 { |
| return fmt.Errorf("proto: wrong wireType = %d for field IpBlocks", wireType) |
| } |
| var stringLen uint64 |
| for shift := uint(0); ; shift += 7 { |
| if shift >= 64 { |
| return ErrIntOverflowAuthorization |
| } |
| 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 ErrInvalidLengthAuthorization |
| } |
| postIndex := iNdEx + intStringLen |
| if postIndex < 0 { |
| return ErrInvalidLengthAuthorization |
| } |
| if postIndex > l { |
| return io.ErrUnexpectedEOF |
| } |
| m.IpBlocks = append(m.IpBlocks, string(dAtA[iNdEx:postIndex])) |
| iNdEx = postIndex |
| case 4: |
| if wireType != 2 { |
| return fmt.Errorf("proto: wrong wireType = %d for field NotIpBlocks", wireType) |
| } |
| var stringLen uint64 |
| for shift := uint(0); ; shift += 7 { |
| if shift >= 64 { |
| return ErrIntOverflowAuthorization |
| } |
| 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 ErrInvalidLengthAuthorization |
| } |
| postIndex := iNdEx + intStringLen |
| if postIndex < 0 { |
| return ErrInvalidLengthAuthorization |
| } |
| if postIndex > l { |
| return io.ErrUnexpectedEOF |
| } |
| m.NotIpBlocks = append(m.NotIpBlocks, string(dAtA[iNdEx:postIndex])) |
| iNdEx = postIndex |
| case 5: |
| if wireType != 2 { |
| return fmt.Errorf("proto: wrong wireType = %d for field Principals", wireType) |
| } |
| var stringLen uint64 |
| for shift := uint(0); ; shift += 7 { |
| if shift >= 64 { |
| return ErrIntOverflowAuthorization |
| } |
| 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 ErrInvalidLengthAuthorization |
| } |
| postIndex := iNdEx + intStringLen |
| if postIndex < 0 { |
| return ErrInvalidLengthAuthorization |
| } |
| if postIndex > l { |
| return io.ErrUnexpectedEOF |
| } |
| m.Principals = append(m.Principals, string(dAtA[iNdEx:postIndex])) |
| iNdEx = postIndex |
| case 6: |
| if wireType != 2 { |
| return fmt.Errorf("proto: wrong wireType = %d for field NotPrincipals", wireType) |
| } |
| var stringLen uint64 |
| for shift := uint(0); ; shift += 7 { |
| if shift >= 64 { |
| return ErrIntOverflowAuthorization |
| } |
| 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 ErrInvalidLengthAuthorization |
| } |
| postIndex := iNdEx + intStringLen |
| if postIndex < 0 { |
| return ErrInvalidLengthAuthorization |
| } |
| if postIndex > l { |
| return io.ErrUnexpectedEOF |
| } |
| m.NotPrincipals = append(m.NotPrincipals, string(dAtA[iNdEx:postIndex])) |
| iNdEx = postIndex |
| case 7: |
| if wireType != 2 { |
| return fmt.Errorf("proto: wrong wireType = %d for field Extends", wireType) |
| } |
| var msglen int |
| for shift := uint(0); ; shift += 7 { |
| if shift >= 64 { |
| return ErrIntOverflowAuthorization |
| } |
| if iNdEx >= l { |
| return io.ErrUnexpectedEOF |
| } |
| b := dAtA[iNdEx] |
| iNdEx++ |
| msglen |= int(b&0x7F) << shift |
| if b < 0x80 { |
| break |
| } |
| } |
| if msglen < 0 { |
| return ErrInvalidLengthAuthorization |
| } |
| postIndex := iNdEx + msglen |
| if postIndex < 0 { |
| return ErrInvalidLengthAuthorization |
| } |
| if postIndex > l { |
| return io.ErrUnexpectedEOF |
| } |
| m.Extends = append(m.Extends, &AuthorizationPolicyExtend{}) |
| if err := m.Extends[len(m.Extends)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { |
| return err |
| } |
| iNdEx = postIndex |
| case 8: |
| if wireType != 2 { |
| return fmt.Errorf("proto: wrong wireType = %d for field NotExtends", wireType) |
| } |
| var msglen int |
| for shift := uint(0); ; shift += 7 { |
| if shift >= 64 { |
| return ErrIntOverflowAuthorization |
| } |
| if iNdEx >= l { |
| return io.ErrUnexpectedEOF |
| } |
| b := dAtA[iNdEx] |
| iNdEx++ |
| msglen |= int(b&0x7F) << shift |
| if b < 0x80 { |
| break |
| } |
| } |
| if msglen < 0 { |
| return ErrInvalidLengthAuthorization |
| } |
| postIndex := iNdEx + msglen |
| if postIndex < 0 { |
| return ErrInvalidLengthAuthorization |
| } |
| if postIndex > l { |
| return io.ErrUnexpectedEOF |
| } |
| m.NotExtends = append(m.NotExtends, &AuthorizationPolicyExtend{}) |
| if err := m.NotExtends[len(m.NotExtends)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { |
| return err |
| } |
| iNdEx = postIndex |
| default: |
| iNdEx = preIndex |
| skippy, err := skipAuthorization(dAtA[iNdEx:]) |
| if err != nil { |
| return err |
| } |
| if (skippy < 0) || (iNdEx+skippy) < 0 { |
| return ErrInvalidLengthAuthorization |
| } |
| 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 *AuthorizationPolicyCondition) 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 ErrIntOverflowAuthorization |
| } |
| 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: AuthorizationPolicyCondition: wiretype end group for non-group") |
| } |
| if fieldNum <= 0 { |
| return fmt.Errorf("proto: AuthorizationPolicyCondition: 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 ErrIntOverflowAuthorization |
| } |
| 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 ErrInvalidLengthAuthorization |
| } |
| postIndex := iNdEx + intStringLen |
| if postIndex < 0 { |
| return ErrInvalidLengthAuthorization |
| } |
| if postIndex > l { |
| return io.ErrUnexpectedEOF |
| } |
| m.Key = string(dAtA[iNdEx:postIndex]) |
| iNdEx = postIndex |
| case 2: |
| if wireType != 2 { |
| return fmt.Errorf("proto: wrong wireType = %d for field Values", wireType) |
| } |
| var msglen int |
| for shift := uint(0); ; shift += 7 { |
| if shift >= 64 { |
| return ErrIntOverflowAuthorization |
| } |
| if iNdEx >= l { |
| return io.ErrUnexpectedEOF |
| } |
| b := dAtA[iNdEx] |
| iNdEx++ |
| msglen |= int(b&0x7F) << shift |
| if b < 0x80 { |
| break |
| } |
| } |
| if msglen < 0 { |
| return ErrInvalidLengthAuthorization |
| } |
| postIndex := iNdEx + msglen |
| if postIndex < 0 { |
| return ErrInvalidLengthAuthorization |
| } |
| if postIndex > l { |
| return io.ErrUnexpectedEOF |
| } |
| m.Values = append(m.Values, &AuthorizationPolicyMatch{}) |
| if err := m.Values[len(m.Values)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { |
| return err |
| } |
| iNdEx = postIndex |
| case 3: |
| if wireType != 2 { |
| return fmt.Errorf("proto: wrong wireType = %d for field NotValues", wireType) |
| } |
| var msglen int |
| for shift := uint(0); ; shift += 7 { |
| if shift >= 64 { |
| return ErrIntOverflowAuthorization |
| } |
| if iNdEx >= l { |
| return io.ErrUnexpectedEOF |
| } |
| b := dAtA[iNdEx] |
| iNdEx++ |
| msglen |= int(b&0x7F) << shift |
| if b < 0x80 { |
| break |
| } |
| } |
| if msglen < 0 { |
| return ErrInvalidLengthAuthorization |
| } |
| postIndex := iNdEx + msglen |
| if postIndex < 0 { |
| return ErrInvalidLengthAuthorization |
| } |
| if postIndex > l { |
| return io.ErrUnexpectedEOF |
| } |
| m.NotValues = append(m.NotValues, &AuthorizationPolicyMatch{}) |
| if err := m.NotValues[len(m.NotValues)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { |
| return err |
| } |
| iNdEx = postIndex |
| default: |
| iNdEx = preIndex |
| skippy, err := skipAuthorization(dAtA[iNdEx:]) |
| if err != nil { |
| return err |
| } |
| if (skippy < 0) || (iNdEx+skippy) < 0 { |
| return ErrInvalidLengthAuthorization |
| } |
| 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 *AuthorizationPolicyMatch) 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 ErrIntOverflowAuthorization |
| } |
| 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: AuthorizationPolicyMatch: wiretype end group for non-group") |
| } |
| if fieldNum <= 0 { |
| return fmt.Errorf("proto: AuthorizationPolicyMatch: illegal tag %d (wire type %d)", fieldNum, wire) |
| } |
| switch fieldNum { |
| case 1: |
| if wireType != 2 { |
| return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) |
| } |
| var stringLen uint64 |
| for shift := uint(0); ; shift += 7 { |
| if shift >= 64 { |
| return ErrIntOverflowAuthorization |
| } |
| 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 ErrInvalidLengthAuthorization |
| } |
| postIndex := iNdEx + intStringLen |
| if postIndex < 0 { |
| return ErrInvalidLengthAuthorization |
| } |
| if postIndex > l { |
| return io.ErrUnexpectedEOF |
| } |
| m.Type = string(dAtA[iNdEx:postIndex]) |
| iNdEx = postIndex |
| case 2: |
| if wireType != 2 { |
| return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) |
| } |
| var stringLen uint64 |
| for shift := uint(0); ; shift += 7 { |
| if shift >= 64 { |
| return ErrIntOverflowAuthorization |
| } |
| 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 ErrInvalidLengthAuthorization |
| } |
| postIndex := iNdEx + intStringLen |
| if postIndex < 0 { |
| return ErrInvalidLengthAuthorization |
| } |
| if postIndex > l { |
| return io.ErrUnexpectedEOF |
| } |
| m.Value = string(dAtA[iNdEx:postIndex]) |
| iNdEx = postIndex |
| default: |
| iNdEx = preIndex |
| skippy, err := skipAuthorization(dAtA[iNdEx:]) |
| if err != nil { |
| return err |
| } |
| if (skippy < 0) || (iNdEx+skippy) < 0 { |
| return ErrInvalidLengthAuthorization |
| } |
| 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 *AuthorizationPolicyExtend) 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 ErrIntOverflowAuthorization |
| } |
| 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: AuthorizationPolicyExtend: wiretype end group for non-group") |
| } |
| if fieldNum <= 0 { |
| return fmt.Errorf("proto: AuthorizationPolicyExtend: 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 ErrIntOverflowAuthorization |
| } |
| 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 ErrInvalidLengthAuthorization |
| } |
| postIndex := iNdEx + intStringLen |
| if postIndex < 0 { |
| return ErrInvalidLengthAuthorization |
| } |
| if postIndex > l { |
| return io.ErrUnexpectedEOF |
| } |
| m.Key = string(dAtA[iNdEx:postIndex]) |
| iNdEx = postIndex |
| case 2: |
| if wireType != 2 { |
| return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) |
| } |
| var stringLen uint64 |
| for shift := uint(0); ; shift += 7 { |
| if shift >= 64 { |
| return ErrIntOverflowAuthorization |
| } |
| 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 ErrInvalidLengthAuthorization |
| } |
| postIndex := iNdEx + intStringLen |
| if postIndex < 0 { |
| return ErrInvalidLengthAuthorization |
| } |
| if postIndex > l { |
| return io.ErrUnexpectedEOF |
| } |
| m.Value = string(dAtA[iNdEx:postIndex]) |
| iNdEx = postIndex |
| default: |
| iNdEx = preIndex |
| skippy, err := skipAuthorization(dAtA[iNdEx:]) |
| if err != nil { |
| return err |
| } |
| if (skippy < 0) || (iNdEx+skippy) < 0 { |
| return ErrInvalidLengthAuthorization |
| } |
| 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 skipAuthorization(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, ErrIntOverflowAuthorization |
| } |
| 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, ErrIntOverflowAuthorization |
| } |
| 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, ErrIntOverflowAuthorization |
| } |
| 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, ErrInvalidLengthAuthorization |
| } |
| iNdEx += length |
| case 3: |
| depth++ |
| case 4: |
| if depth == 0 { |
| return 0, ErrUnexpectedEndOfGroupAuthorization |
| } |
| depth-- |
| case 5: |
| iNdEx += 4 |
| default: |
| return 0, fmt.Errorf("proto: illegal wireType %d", wireType) |
| } |
| if iNdEx < 0 { |
| return 0, ErrInvalidLengthAuthorization |
| } |
| if depth == 0 { |
| return iNdEx, nil |
| } |
| } |
| return 0, io.ErrUnexpectedEOF |
| } |
| |
| var ( |
| ErrInvalidLengthAuthorization = fmt.Errorf("proto: negative length found during unmarshaling") |
| ErrIntOverflowAuthorization = fmt.Errorf("proto: integer overflow") |
| ErrUnexpectedEndOfGroupAuthorization = fmt.Errorf("proto: unexpected end of group") |
| ) |