|
@@ -35,9 +35,10 @@ type InternalRaftRequest struct {
|
|
|
AuthUserAdd *AuthUserAddRequest `protobuf:"bytes,11,opt,name=auth_user_add" json:"auth_user_add,omitempty"`
|
|
AuthUserAdd *AuthUserAddRequest `protobuf:"bytes,11,opt,name=auth_user_add" json:"auth_user_add,omitempty"`
|
|
|
AuthUserDelete *AuthUserDeleteRequest `protobuf:"bytes,12,opt,name=auth_user_delete" json:"auth_user_delete,omitempty"`
|
|
AuthUserDelete *AuthUserDeleteRequest `protobuf:"bytes,12,opt,name=auth_user_delete" json:"auth_user_delete,omitempty"`
|
|
|
AuthUserChangePassword *AuthUserChangePasswordRequest `protobuf:"bytes,13,opt,name=auth_user_change_password" json:"auth_user_change_password,omitempty"`
|
|
AuthUserChangePassword *AuthUserChangePasswordRequest `protobuf:"bytes,13,opt,name=auth_user_change_password" json:"auth_user_change_password,omitempty"`
|
|
|
- AuthRoleAdd *AuthRoleAddRequest `protobuf:"bytes,14,opt,name=auth_role_add" json:"auth_role_add,omitempty"`
|
|
|
|
|
- AuthRoleGrant *AuthRoleGrantRequest `protobuf:"bytes,15,opt,name=auth_role_grant" json:"auth_role_grant,omitempty"`
|
|
|
|
|
- Alarm *AlarmRequest `protobuf:"bytes,16,opt,name=alarm" json:"alarm,omitempty"`
|
|
|
|
|
|
|
+ AuthUserGrant *AuthUserGrantRequest `protobuf:"bytes,14,opt,name=auth_user_grant" json:"auth_user_grant,omitempty"`
|
|
|
|
|
+ AuthRoleAdd *AuthRoleAddRequest `protobuf:"bytes,15,opt,name=auth_role_add" json:"auth_role_add,omitempty"`
|
|
|
|
|
+ AuthRoleGrant *AuthRoleGrantRequest `protobuf:"bytes,16,opt,name=auth_role_grant" json:"auth_role_grant,omitempty"`
|
|
|
|
|
+ Alarm *AlarmRequest `protobuf:"bytes,17,opt,name=alarm" json:"alarm,omitempty"`
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
func (m *InternalRaftRequest) Reset() { *m = InternalRaftRequest{} }
|
|
func (m *InternalRaftRequest) Reset() { *m = InternalRaftRequest{} }
|
|
@@ -195,38 +196,50 @@ func (m *InternalRaftRequest) MarshalTo(data []byte) (int, error) {
|
|
|
}
|
|
}
|
|
|
i += n12
|
|
i += n12
|
|
|
}
|
|
}
|
|
|
- if m.AuthRoleAdd != nil {
|
|
|
|
|
|
|
+ if m.AuthUserGrant != nil {
|
|
|
data[i] = 0x72
|
|
data[i] = 0x72
|
|
|
i++
|
|
i++
|
|
|
- i = encodeVarintRaftInternal(data, i, uint64(m.AuthRoleAdd.Size()))
|
|
|
|
|
- n13, err := m.AuthRoleAdd.MarshalTo(data[i:])
|
|
|
|
|
|
|
+ i = encodeVarintRaftInternal(data, i, uint64(m.AuthUserGrant.Size()))
|
|
|
|
|
+ n13, err := m.AuthUserGrant.MarshalTo(data[i:])
|
|
|
if err != nil {
|
|
if err != nil {
|
|
|
return 0, err
|
|
return 0, err
|
|
|
}
|
|
}
|
|
|
i += n13
|
|
i += n13
|
|
|
}
|
|
}
|
|
|
- if m.AuthRoleGrant != nil {
|
|
|
|
|
|
|
+ if m.AuthRoleAdd != nil {
|
|
|
data[i] = 0x7a
|
|
data[i] = 0x7a
|
|
|
i++
|
|
i++
|
|
|
- i = encodeVarintRaftInternal(data, i, uint64(m.AuthRoleGrant.Size()))
|
|
|
|
|
- n14, err := m.AuthRoleGrant.MarshalTo(data[i:])
|
|
|
|
|
|
|
+ i = encodeVarintRaftInternal(data, i, uint64(m.AuthRoleAdd.Size()))
|
|
|
|
|
+ n14, err := m.AuthRoleAdd.MarshalTo(data[i:])
|
|
|
if err != nil {
|
|
if err != nil {
|
|
|
return 0, err
|
|
return 0, err
|
|
|
}
|
|
}
|
|
|
i += n14
|
|
i += n14
|
|
|
}
|
|
}
|
|
|
- if m.Alarm != nil {
|
|
|
|
|
|
|
+ if m.AuthRoleGrant != nil {
|
|
|
data[i] = 0x82
|
|
data[i] = 0x82
|
|
|
i++
|
|
i++
|
|
|
data[i] = 0x1
|
|
data[i] = 0x1
|
|
|
i++
|
|
i++
|
|
|
- i = encodeVarintRaftInternal(data, i, uint64(m.Alarm.Size()))
|
|
|
|
|
- n15, err := m.Alarm.MarshalTo(data[i:])
|
|
|
|
|
|
|
+ i = encodeVarintRaftInternal(data, i, uint64(m.AuthRoleGrant.Size()))
|
|
|
|
|
+ n15, err := m.AuthRoleGrant.MarshalTo(data[i:])
|
|
|
if err != nil {
|
|
if err != nil {
|
|
|
return 0, err
|
|
return 0, err
|
|
|
}
|
|
}
|
|
|
i += n15
|
|
i += n15
|
|
|
}
|
|
}
|
|
|
|
|
+ if m.Alarm != nil {
|
|
|
|
|
+ data[i] = 0x8a
|
|
|
|
|
+ i++
|
|
|
|
|
+ data[i] = 0x1
|
|
|
|
|
+ i++
|
|
|
|
|
+ i = encodeVarintRaftInternal(data, i, uint64(m.Alarm.Size()))
|
|
|
|
|
+ n16, err := m.Alarm.MarshalTo(data[i:])
|
|
|
|
|
+ if err != nil {
|
|
|
|
|
+ return 0, err
|
|
|
|
|
+ }
|
|
|
|
|
+ i += n16
|
|
|
|
|
+ }
|
|
|
return i, nil
|
|
return i, nil
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -329,13 +342,17 @@ func (m *InternalRaftRequest) Size() (n int) {
|
|
|
l = m.AuthUserChangePassword.Size()
|
|
l = m.AuthUserChangePassword.Size()
|
|
|
n += 1 + l + sovRaftInternal(uint64(l))
|
|
n += 1 + l + sovRaftInternal(uint64(l))
|
|
|
}
|
|
}
|
|
|
|
|
+ if m.AuthUserGrant != nil {
|
|
|
|
|
+ l = m.AuthUserGrant.Size()
|
|
|
|
|
+ n += 1 + l + sovRaftInternal(uint64(l))
|
|
|
|
|
+ }
|
|
|
if m.AuthRoleAdd != nil {
|
|
if m.AuthRoleAdd != nil {
|
|
|
l = m.AuthRoleAdd.Size()
|
|
l = m.AuthRoleAdd.Size()
|
|
|
n += 1 + l + sovRaftInternal(uint64(l))
|
|
n += 1 + l + sovRaftInternal(uint64(l))
|
|
|
}
|
|
}
|
|
|
if m.AuthRoleGrant != nil {
|
|
if m.AuthRoleGrant != nil {
|
|
|
l = m.AuthRoleGrant.Size()
|
|
l = m.AuthRoleGrant.Size()
|
|
|
- n += 1 + l + sovRaftInternal(uint64(l))
|
|
|
|
|
|
|
+ n += 2 + l + sovRaftInternal(uint64(l))
|
|
|
}
|
|
}
|
|
|
if m.Alarm != nil {
|
|
if m.Alarm != nil {
|
|
|
l = m.Alarm.Size()
|
|
l = m.Alarm.Size()
|
|
@@ -808,6 +825,39 @@ func (m *InternalRaftRequest) Unmarshal(data []byte) error {
|
|
|
}
|
|
}
|
|
|
iNdEx = postIndex
|
|
iNdEx = postIndex
|
|
|
case 14:
|
|
case 14:
|
|
|
|
|
+ if wireType != 2 {
|
|
|
|
|
+ return fmt.Errorf("proto: wrong wireType = %d for field AuthUserGrant", wireType)
|
|
|
|
|
+ }
|
|
|
|
|
+ var msglen int
|
|
|
|
|
+ for shift := uint(0); ; shift += 7 {
|
|
|
|
|
+ if shift >= 64 {
|
|
|
|
|
+ return ErrIntOverflowRaftInternal
|
|
|
|
|
+ }
|
|
|
|
|
+ if iNdEx >= l {
|
|
|
|
|
+ return io.ErrUnexpectedEOF
|
|
|
|
|
+ }
|
|
|
|
|
+ b := data[iNdEx]
|
|
|
|
|
+ iNdEx++
|
|
|
|
|
+ msglen |= (int(b) & 0x7F) << shift
|
|
|
|
|
+ if b < 0x80 {
|
|
|
|
|
+ break
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ if msglen < 0 {
|
|
|
|
|
+ return ErrInvalidLengthRaftInternal
|
|
|
|
|
+ }
|
|
|
|
|
+ postIndex := iNdEx + msglen
|
|
|
|
|
+ if postIndex > l {
|
|
|
|
|
+ return io.ErrUnexpectedEOF
|
|
|
|
|
+ }
|
|
|
|
|
+ if m.AuthUserGrant == nil {
|
|
|
|
|
+ m.AuthUserGrant = &AuthUserGrantRequest{}
|
|
|
|
|
+ }
|
|
|
|
|
+ if err := m.AuthUserGrant.Unmarshal(data[iNdEx:postIndex]); err != nil {
|
|
|
|
|
+ return err
|
|
|
|
|
+ }
|
|
|
|
|
+ iNdEx = postIndex
|
|
|
|
|
+ case 15:
|
|
|
if wireType != 2 {
|
|
if wireType != 2 {
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field AuthRoleAdd", wireType)
|
|
return fmt.Errorf("proto: wrong wireType = %d for field AuthRoleAdd", wireType)
|
|
|
}
|
|
}
|
|
@@ -840,7 +890,7 @@ func (m *InternalRaftRequest) Unmarshal(data []byte) error {
|
|
|
return err
|
|
return err
|
|
|
}
|
|
}
|
|
|
iNdEx = postIndex
|
|
iNdEx = postIndex
|
|
|
- case 15:
|
|
|
|
|
|
|
+ case 16:
|
|
|
if wireType != 2 {
|
|
if wireType != 2 {
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field AuthRoleGrant", wireType)
|
|
return fmt.Errorf("proto: wrong wireType = %d for field AuthRoleGrant", wireType)
|
|
|
}
|
|
}
|
|
@@ -873,7 +923,7 @@ func (m *InternalRaftRequest) Unmarshal(data []byte) error {
|
|
|
return err
|
|
return err
|
|
|
}
|
|
}
|
|
|
iNdEx = postIndex
|
|
iNdEx = postIndex
|
|
|
- case 16:
|
|
|
|
|
|
|
+ case 17:
|
|
|
if wireType != 2 {
|
|
if wireType != 2 {
|
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Alarm", wireType)
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Alarm", wireType)
|
|
|
}
|
|
}
|