872 lines
21 KiB
Go
872 lines
21 KiB
Go
|
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||
|
// source: v1/Shield.proto
|
||
|
|
||
|
package v1
|
||
|
|
||
|
import proto "github.com/gogo/protobuf/proto"
|
||
|
import fmt "fmt"
|
||
|
import math "math"
|
||
|
import _ "github.com/gogo/protobuf/gogoproto"
|
||
|
|
||
|
import io "io"
|
||
|
|
||
|
// 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package
|
||
|
|
||
|
type ShieldIsShieldContentReq struct {
|
||
|
// 房主uid
|
||
|
Uid int64 `protobuf:"varint,1,opt,name=uid,proto3" json:"uid"`
|
||
|
// 内容
|
||
|
Content string `protobuf:"bytes,2,opt,name=content,proto3" json:"content"`
|
||
|
}
|
||
|
|
||
|
func (m *ShieldIsShieldContentReq) Reset() { *m = ShieldIsShieldContentReq{} }
|
||
|
func (m *ShieldIsShieldContentReq) String() string { return proto.CompactTextString(m) }
|
||
|
func (*ShieldIsShieldContentReq) ProtoMessage() {}
|
||
|
func (*ShieldIsShieldContentReq) Descriptor() ([]byte, []int) {
|
||
|
return fileDescriptor_Shield_14b4a725a4fd2eaf, []int{0}
|
||
|
}
|
||
|
func (m *ShieldIsShieldContentReq) XXX_Unmarshal(b []byte) error {
|
||
|
return m.Unmarshal(b)
|
||
|
}
|
||
|
func (m *ShieldIsShieldContentReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||
|
if deterministic {
|
||
|
return xxx_messageInfo_ShieldIsShieldContentReq.Marshal(b, m, deterministic)
|
||
|
} else {
|
||
|
b = b[:cap(b)]
|
||
|
n, err := m.MarshalTo(b)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return b[:n], nil
|
||
|
}
|
||
|
}
|
||
|
func (dst *ShieldIsShieldContentReq) XXX_Merge(src proto.Message) {
|
||
|
xxx_messageInfo_ShieldIsShieldContentReq.Merge(dst, src)
|
||
|
}
|
||
|
func (m *ShieldIsShieldContentReq) XXX_Size() int {
|
||
|
return m.Size()
|
||
|
}
|
||
|
func (m *ShieldIsShieldContentReq) XXX_DiscardUnknown() {
|
||
|
xxx_messageInfo_ShieldIsShieldContentReq.DiscardUnknown(m)
|
||
|
}
|
||
|
|
||
|
var xxx_messageInfo_ShieldIsShieldContentReq proto.InternalMessageInfo
|
||
|
|
||
|
func (m *ShieldIsShieldContentReq) GetUid() int64 {
|
||
|
if m != nil {
|
||
|
return m.Uid
|
||
|
}
|
||
|
return 0
|
||
|
}
|
||
|
|
||
|
func (m *ShieldIsShieldContentReq) GetContent() string {
|
||
|
if m != nil {
|
||
|
return m.Content
|
||
|
}
|
||
|
return ""
|
||
|
}
|
||
|
|
||
|
type ShieldIsShieldContentResp struct {
|
||
|
//
|
||
|
Code int64 `protobuf:"varint,1,opt,name=code,proto3" json:"code"`
|
||
|
//
|
||
|
Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg"`
|
||
|
//
|
||
|
Data *ShieldIsShieldContentResp_Data `protobuf:"bytes,3,opt,name=data" json:"data"`
|
||
|
}
|
||
|
|
||
|
func (m *ShieldIsShieldContentResp) Reset() { *m = ShieldIsShieldContentResp{} }
|
||
|
func (m *ShieldIsShieldContentResp) String() string { return proto.CompactTextString(m) }
|
||
|
func (*ShieldIsShieldContentResp) ProtoMessage() {}
|
||
|
func (*ShieldIsShieldContentResp) Descriptor() ([]byte, []int) {
|
||
|
return fileDescriptor_Shield_14b4a725a4fd2eaf, []int{1}
|
||
|
}
|
||
|
func (m *ShieldIsShieldContentResp) XXX_Unmarshal(b []byte) error {
|
||
|
return m.Unmarshal(b)
|
||
|
}
|
||
|
func (m *ShieldIsShieldContentResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||
|
if deterministic {
|
||
|
return xxx_messageInfo_ShieldIsShieldContentResp.Marshal(b, m, deterministic)
|
||
|
} else {
|
||
|
b = b[:cap(b)]
|
||
|
n, err := m.MarshalTo(b)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return b[:n], nil
|
||
|
}
|
||
|
}
|
||
|
func (dst *ShieldIsShieldContentResp) XXX_Merge(src proto.Message) {
|
||
|
xxx_messageInfo_ShieldIsShieldContentResp.Merge(dst, src)
|
||
|
}
|
||
|
func (m *ShieldIsShieldContentResp) XXX_Size() int {
|
||
|
return m.Size()
|
||
|
}
|
||
|
func (m *ShieldIsShieldContentResp) XXX_DiscardUnknown() {
|
||
|
xxx_messageInfo_ShieldIsShieldContentResp.DiscardUnknown(m)
|
||
|
}
|
||
|
|
||
|
var xxx_messageInfo_ShieldIsShieldContentResp proto.InternalMessageInfo
|
||
|
|
||
|
func (m *ShieldIsShieldContentResp) GetCode() int64 {
|
||
|
if m != nil {
|
||
|
return m.Code
|
||
|
}
|
||
|
return 0
|
||
|
}
|
||
|
|
||
|
func (m *ShieldIsShieldContentResp) GetMsg() string {
|
||
|
if m != nil {
|
||
|
return m.Msg
|
||
|
}
|
||
|
return ""
|
||
|
}
|
||
|
|
||
|
func (m *ShieldIsShieldContentResp) GetData() *ShieldIsShieldContentResp_Data {
|
||
|
if m != nil {
|
||
|
return m.Data
|
||
|
}
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
type ShieldIsShieldContentResp_Data struct {
|
||
|
//
|
||
|
Uid int64 `protobuf:"varint,1,opt,name=uid,proto3" json:"uid"`
|
||
|
// 是否是被屏蔽的内容
|
||
|
IsShieldContent bool `protobuf:"varint,2,opt,name=is_shield_content,json=isShieldContent,proto3" json:"is_shield_content"`
|
||
|
// 命中的屏蔽词
|
||
|
ShieldBy string `protobuf:"bytes,3,opt,name=shield_by,json=shieldBy,proto3" json:"shield_by"`
|
||
|
}
|
||
|
|
||
|
func (m *ShieldIsShieldContentResp_Data) Reset() { *m = ShieldIsShieldContentResp_Data{} }
|
||
|
func (m *ShieldIsShieldContentResp_Data) String() string { return proto.CompactTextString(m) }
|
||
|
func (*ShieldIsShieldContentResp_Data) ProtoMessage() {}
|
||
|
func (*ShieldIsShieldContentResp_Data) Descriptor() ([]byte, []int) {
|
||
|
return fileDescriptor_Shield_14b4a725a4fd2eaf, []int{1, 0}
|
||
|
}
|
||
|
func (m *ShieldIsShieldContentResp_Data) XXX_Unmarshal(b []byte) error {
|
||
|
return m.Unmarshal(b)
|
||
|
}
|
||
|
func (m *ShieldIsShieldContentResp_Data) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||
|
if deterministic {
|
||
|
return xxx_messageInfo_ShieldIsShieldContentResp_Data.Marshal(b, m, deterministic)
|
||
|
} else {
|
||
|
b = b[:cap(b)]
|
||
|
n, err := m.MarshalTo(b)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return b[:n], nil
|
||
|
}
|
||
|
}
|
||
|
func (dst *ShieldIsShieldContentResp_Data) XXX_Merge(src proto.Message) {
|
||
|
xxx_messageInfo_ShieldIsShieldContentResp_Data.Merge(dst, src)
|
||
|
}
|
||
|
func (m *ShieldIsShieldContentResp_Data) XXX_Size() int {
|
||
|
return m.Size()
|
||
|
}
|
||
|
func (m *ShieldIsShieldContentResp_Data) XXX_DiscardUnknown() {
|
||
|
xxx_messageInfo_ShieldIsShieldContentResp_Data.DiscardUnknown(m)
|
||
|
}
|
||
|
|
||
|
var xxx_messageInfo_ShieldIsShieldContentResp_Data proto.InternalMessageInfo
|
||
|
|
||
|
func (m *ShieldIsShieldContentResp_Data) GetUid() int64 {
|
||
|
if m != nil {
|
||
|
return m.Uid
|
||
|
}
|
||
|
return 0
|
||
|
}
|
||
|
|
||
|
func (m *ShieldIsShieldContentResp_Data) GetIsShieldContent() bool {
|
||
|
if m != nil {
|
||
|
return m.IsShieldContent
|
||
|
}
|
||
|
return false
|
||
|
}
|
||
|
|
||
|
func (m *ShieldIsShieldContentResp_Data) GetShieldBy() string {
|
||
|
if m != nil {
|
||
|
return m.ShieldBy
|
||
|
}
|
||
|
return ""
|
||
|
}
|
||
|
|
||
|
func init() {
|
||
|
proto.RegisterType((*ShieldIsShieldContentReq)(nil), "banned_service.v1.ShieldIsShieldContentReq")
|
||
|
proto.RegisterType((*ShieldIsShieldContentResp)(nil), "banned_service.v1.ShieldIsShieldContentResp")
|
||
|
proto.RegisterType((*ShieldIsShieldContentResp_Data)(nil), "banned_service.v1.ShieldIsShieldContentResp.Data")
|
||
|
}
|
||
|
func (m *ShieldIsShieldContentReq) Marshal() (dAtA []byte, err error) {
|
||
|
size := m.Size()
|
||
|
dAtA = make([]byte, size)
|
||
|
n, err := m.MarshalTo(dAtA)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return dAtA[:n], nil
|
||
|
}
|
||
|
|
||
|
func (m *ShieldIsShieldContentReq) MarshalTo(dAtA []byte) (int, error) {
|
||
|
var i int
|
||
|
_ = i
|
||
|
var l int
|
||
|
_ = l
|
||
|
if m.Uid != 0 {
|
||
|
dAtA[i] = 0x8
|
||
|
i++
|
||
|
i = encodeVarintShield(dAtA, i, uint64(m.Uid))
|
||
|
}
|
||
|
if len(m.Content) > 0 {
|
||
|
dAtA[i] = 0x12
|
||
|
i++
|
||
|
i = encodeVarintShield(dAtA, i, uint64(len(m.Content)))
|
||
|
i += copy(dAtA[i:], m.Content)
|
||
|
}
|
||
|
return i, nil
|
||
|
}
|
||
|
|
||
|
func (m *ShieldIsShieldContentResp) Marshal() (dAtA []byte, err error) {
|
||
|
size := m.Size()
|
||
|
dAtA = make([]byte, size)
|
||
|
n, err := m.MarshalTo(dAtA)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return dAtA[:n], nil
|
||
|
}
|
||
|
|
||
|
func (m *ShieldIsShieldContentResp) MarshalTo(dAtA []byte) (int, error) {
|
||
|
var i int
|
||
|
_ = i
|
||
|
var l int
|
||
|
_ = l
|
||
|
if m.Code != 0 {
|
||
|
dAtA[i] = 0x8
|
||
|
i++
|
||
|
i = encodeVarintShield(dAtA, i, uint64(m.Code))
|
||
|
}
|
||
|
if len(m.Msg) > 0 {
|
||
|
dAtA[i] = 0x12
|
||
|
i++
|
||
|
i = encodeVarintShield(dAtA, i, uint64(len(m.Msg)))
|
||
|
i += copy(dAtA[i:], m.Msg)
|
||
|
}
|
||
|
if m.Data != nil {
|
||
|
dAtA[i] = 0x1a
|
||
|
i++
|
||
|
i = encodeVarintShield(dAtA, i, uint64(m.Data.Size()))
|
||
|
n1, err := m.Data.MarshalTo(dAtA[i:])
|
||
|
if err != nil {
|
||
|
return 0, err
|
||
|
}
|
||
|
i += n1
|
||
|
}
|
||
|
return i, nil
|
||
|
}
|
||
|
|
||
|
func (m *ShieldIsShieldContentResp_Data) Marshal() (dAtA []byte, err error) {
|
||
|
size := m.Size()
|
||
|
dAtA = make([]byte, size)
|
||
|
n, err := m.MarshalTo(dAtA)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return dAtA[:n], nil
|
||
|
}
|
||
|
|
||
|
func (m *ShieldIsShieldContentResp_Data) MarshalTo(dAtA []byte) (int, error) {
|
||
|
var i int
|
||
|
_ = i
|
||
|
var l int
|
||
|
_ = l
|
||
|
if m.Uid != 0 {
|
||
|
dAtA[i] = 0x8
|
||
|
i++
|
||
|
i = encodeVarintShield(dAtA, i, uint64(m.Uid))
|
||
|
}
|
||
|
if m.IsShieldContent {
|
||
|
dAtA[i] = 0x10
|
||
|
i++
|
||
|
if m.IsShieldContent {
|
||
|
dAtA[i] = 1
|
||
|
} else {
|
||
|
dAtA[i] = 0
|
||
|
}
|
||
|
i++
|
||
|
}
|
||
|
if len(m.ShieldBy) > 0 {
|
||
|
dAtA[i] = 0x1a
|
||
|
i++
|
||
|
i = encodeVarintShield(dAtA, i, uint64(len(m.ShieldBy)))
|
||
|
i += copy(dAtA[i:], m.ShieldBy)
|
||
|
}
|
||
|
return i, nil
|
||
|
}
|
||
|
|
||
|
func encodeVarintShield(dAtA []byte, offset int, v uint64) int {
|
||
|
for v >= 1<<7 {
|
||
|
dAtA[offset] = uint8(v&0x7f | 0x80)
|
||
|
v >>= 7
|
||
|
offset++
|
||
|
}
|
||
|
dAtA[offset] = uint8(v)
|
||
|
return offset + 1
|
||
|
}
|
||
|
func (m *ShieldIsShieldContentReq) Size() (n int) {
|
||
|
if m == nil {
|
||
|
return 0
|
||
|
}
|
||
|
var l int
|
||
|
_ = l
|
||
|
if m.Uid != 0 {
|
||
|
n += 1 + sovShield(uint64(m.Uid))
|
||
|
}
|
||
|
l = len(m.Content)
|
||
|
if l > 0 {
|
||
|
n += 1 + l + sovShield(uint64(l))
|
||
|
}
|
||
|
return n
|
||
|
}
|
||
|
|
||
|
func (m *ShieldIsShieldContentResp) Size() (n int) {
|
||
|
if m == nil {
|
||
|
return 0
|
||
|
}
|
||
|
var l int
|
||
|
_ = l
|
||
|
if m.Code != 0 {
|
||
|
n += 1 + sovShield(uint64(m.Code))
|
||
|
}
|
||
|
l = len(m.Msg)
|
||
|
if l > 0 {
|
||
|
n += 1 + l + sovShield(uint64(l))
|
||
|
}
|
||
|
if m.Data != nil {
|
||
|
l = m.Data.Size()
|
||
|
n += 1 + l + sovShield(uint64(l))
|
||
|
}
|
||
|
return n
|
||
|
}
|
||
|
|
||
|
func (m *ShieldIsShieldContentResp_Data) Size() (n int) {
|
||
|
if m == nil {
|
||
|
return 0
|
||
|
}
|
||
|
var l int
|
||
|
_ = l
|
||
|
if m.Uid != 0 {
|
||
|
n += 1 + sovShield(uint64(m.Uid))
|
||
|
}
|
||
|
if m.IsShieldContent {
|
||
|
n += 2
|
||
|
}
|
||
|
l = len(m.ShieldBy)
|
||
|
if l > 0 {
|
||
|
n += 1 + l + sovShield(uint64(l))
|
||
|
}
|
||
|
return n
|
||
|
}
|
||
|
|
||
|
func sovShield(x uint64) (n int) {
|
||
|
for {
|
||
|
n++
|
||
|
x >>= 7
|
||
|
if x == 0 {
|
||
|
break
|
||
|
}
|
||
|
}
|
||
|
return n
|
||
|
}
|
||
|
func sozShield(x uint64) (n int) {
|
||
|
return sovShield(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
||
|
}
|
||
|
func (m *ShieldIsShieldContentReq) 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 ErrIntOverflowShield
|
||
|
}
|
||
|
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: ShieldIsShieldContentReq: wiretype end group for non-group")
|
||
|
}
|
||
|
if fieldNum <= 0 {
|
||
|
return fmt.Errorf("proto: ShieldIsShieldContentReq: illegal tag %d (wire type %d)", fieldNum, wire)
|
||
|
}
|
||
|
switch fieldNum {
|
||
|
case 1:
|
||
|
if wireType != 0 {
|
||
|
return fmt.Errorf("proto: wrong wireType = %d for field Uid", wireType)
|
||
|
}
|
||
|
m.Uid = 0
|
||
|
for shift := uint(0); ; shift += 7 {
|
||
|
if shift >= 64 {
|
||
|
return ErrIntOverflowShield
|
||
|
}
|
||
|
if iNdEx >= l {
|
||
|
return io.ErrUnexpectedEOF
|
||
|
}
|
||
|
b := dAtA[iNdEx]
|
||
|
iNdEx++
|
||
|
m.Uid |= (int64(b) & 0x7F) << shift
|
||
|
if b < 0x80 {
|
||
|
break
|
||
|
}
|
||
|
}
|
||
|
case 2:
|
||
|
if wireType != 2 {
|
||
|
return fmt.Errorf("proto: wrong wireType = %d for field Content", wireType)
|
||
|
}
|
||
|
var stringLen uint64
|
||
|
for shift := uint(0); ; shift += 7 {
|
||
|
if shift >= 64 {
|
||
|
return ErrIntOverflowShield
|
||
|
}
|
||
|
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 ErrInvalidLengthShield
|
||
|
}
|
||
|
postIndex := iNdEx + intStringLen
|
||
|
if postIndex > l {
|
||
|
return io.ErrUnexpectedEOF
|
||
|
}
|
||
|
m.Content = string(dAtA[iNdEx:postIndex])
|
||
|
iNdEx = postIndex
|
||
|
default:
|
||
|
iNdEx = preIndex
|
||
|
skippy, err := skipShield(dAtA[iNdEx:])
|
||
|
if err != nil {
|
||
|
return err
|
||
|
}
|
||
|
if skippy < 0 {
|
||
|
return ErrInvalidLengthShield
|
||
|
}
|
||
|
if (iNdEx + skippy) > l {
|
||
|
return io.ErrUnexpectedEOF
|
||
|
}
|
||
|
iNdEx += skippy
|
||
|
}
|
||
|
}
|
||
|
|
||
|
if iNdEx > l {
|
||
|
return io.ErrUnexpectedEOF
|
||
|
}
|
||
|
return nil
|
||
|
}
|
||
|
func (m *ShieldIsShieldContentResp) 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 ErrIntOverflowShield
|
||
|
}
|
||
|
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: ShieldIsShieldContentResp: wiretype end group for non-group")
|
||
|
}
|
||
|
if fieldNum <= 0 {
|
||
|
return fmt.Errorf("proto: ShieldIsShieldContentResp: illegal tag %d (wire type %d)", fieldNum, wire)
|
||
|
}
|
||
|
switch fieldNum {
|
||
|
case 1:
|
||
|
if wireType != 0 {
|
||
|
return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType)
|
||
|
}
|
||
|
m.Code = 0
|
||
|
for shift := uint(0); ; shift += 7 {
|
||
|
if shift >= 64 {
|
||
|
return ErrIntOverflowShield
|
||
|
}
|
||
|
if iNdEx >= l {
|
||
|
return io.ErrUnexpectedEOF
|
||
|
}
|
||
|
b := dAtA[iNdEx]
|
||
|
iNdEx++
|
||
|
m.Code |= (int64(b) & 0x7F) << shift
|
||
|
if b < 0x80 {
|
||
|
break
|
||
|
}
|
||
|
}
|
||
|
case 2:
|
||
|
if wireType != 2 {
|
||
|
return fmt.Errorf("proto: wrong wireType = %d for field Msg", wireType)
|
||
|
}
|
||
|
var stringLen uint64
|
||
|
for shift := uint(0); ; shift += 7 {
|
||
|
if shift >= 64 {
|
||
|
return ErrIntOverflowShield
|
||
|
}
|
||
|
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 ErrInvalidLengthShield
|
||
|
}
|
||
|
postIndex := iNdEx + intStringLen
|
||
|
if postIndex > l {
|
||
|
return io.ErrUnexpectedEOF
|
||
|
}
|
||
|
m.Msg = string(dAtA[iNdEx:postIndex])
|
||
|
iNdEx = postIndex
|
||
|
case 3:
|
||
|
if wireType != 2 {
|
||
|
return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType)
|
||
|
}
|
||
|
var msglen int
|
||
|
for shift := uint(0); ; shift += 7 {
|
||
|
if shift >= 64 {
|
||
|
return ErrIntOverflowShield
|
||
|
}
|
||
|
if iNdEx >= l {
|
||
|
return io.ErrUnexpectedEOF
|
||
|
}
|
||
|
b := dAtA[iNdEx]
|
||
|
iNdEx++
|
||
|
msglen |= (int(b) & 0x7F) << shift
|
||
|
if b < 0x80 {
|
||
|
break
|
||
|
}
|
||
|
}
|
||
|
if msglen < 0 {
|
||
|
return ErrInvalidLengthShield
|
||
|
}
|
||
|
postIndex := iNdEx + msglen
|
||
|
if postIndex > l {
|
||
|
return io.ErrUnexpectedEOF
|
||
|
}
|
||
|
if m.Data == nil {
|
||
|
m.Data = &ShieldIsShieldContentResp_Data{}
|
||
|
}
|
||
|
if err := m.Data.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||
|
return err
|
||
|
}
|
||
|
iNdEx = postIndex
|
||
|
default:
|
||
|
iNdEx = preIndex
|
||
|
skippy, err := skipShield(dAtA[iNdEx:])
|
||
|
if err != nil {
|
||
|
return err
|
||
|
}
|
||
|
if skippy < 0 {
|
||
|
return ErrInvalidLengthShield
|
||
|
}
|
||
|
if (iNdEx + skippy) > l {
|
||
|
return io.ErrUnexpectedEOF
|
||
|
}
|
||
|
iNdEx += skippy
|
||
|
}
|
||
|
}
|
||
|
|
||
|
if iNdEx > l {
|
||
|
return io.ErrUnexpectedEOF
|
||
|
}
|
||
|
return nil
|
||
|
}
|
||
|
func (m *ShieldIsShieldContentResp_Data) 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 ErrIntOverflowShield
|
||
|
}
|
||
|
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: Data: wiretype end group for non-group")
|
||
|
}
|
||
|
if fieldNum <= 0 {
|
||
|
return fmt.Errorf("proto: Data: illegal tag %d (wire type %d)", fieldNum, wire)
|
||
|
}
|
||
|
switch fieldNum {
|
||
|
case 1:
|
||
|
if wireType != 0 {
|
||
|
return fmt.Errorf("proto: wrong wireType = %d for field Uid", wireType)
|
||
|
}
|
||
|
m.Uid = 0
|
||
|
for shift := uint(0); ; shift += 7 {
|
||
|
if shift >= 64 {
|
||
|
return ErrIntOverflowShield
|
||
|
}
|
||
|
if iNdEx >= l {
|
||
|
return io.ErrUnexpectedEOF
|
||
|
}
|
||
|
b := dAtA[iNdEx]
|
||
|
iNdEx++
|
||
|
m.Uid |= (int64(b) & 0x7F) << shift
|
||
|
if b < 0x80 {
|
||
|
break
|
||
|
}
|
||
|
}
|
||
|
case 2:
|
||
|
if wireType != 0 {
|
||
|
return fmt.Errorf("proto: wrong wireType = %d for field IsShieldContent", wireType)
|
||
|
}
|
||
|
var v int
|
||
|
for shift := uint(0); ; shift += 7 {
|
||
|
if shift >= 64 {
|
||
|
return ErrIntOverflowShield
|
||
|
}
|
||
|
if iNdEx >= l {
|
||
|
return io.ErrUnexpectedEOF
|
||
|
}
|
||
|
b := dAtA[iNdEx]
|
||
|
iNdEx++
|
||
|
v |= (int(b) & 0x7F) << shift
|
||
|
if b < 0x80 {
|
||
|
break
|
||
|
}
|
||
|
}
|
||
|
m.IsShieldContent = bool(v != 0)
|
||
|
case 3:
|
||
|
if wireType != 2 {
|
||
|
return fmt.Errorf("proto: wrong wireType = %d for field ShieldBy", wireType)
|
||
|
}
|
||
|
var stringLen uint64
|
||
|
for shift := uint(0); ; shift += 7 {
|
||
|
if shift >= 64 {
|
||
|
return ErrIntOverflowShield
|
||
|
}
|
||
|
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 ErrInvalidLengthShield
|
||
|
}
|
||
|
postIndex := iNdEx + intStringLen
|
||
|
if postIndex > l {
|
||
|
return io.ErrUnexpectedEOF
|
||
|
}
|
||
|
m.ShieldBy = string(dAtA[iNdEx:postIndex])
|
||
|
iNdEx = postIndex
|
||
|
default:
|
||
|
iNdEx = preIndex
|
||
|
skippy, err := skipShield(dAtA[iNdEx:])
|
||
|
if err != nil {
|
||
|
return err
|
||
|
}
|
||
|
if skippy < 0 {
|
||
|
return ErrInvalidLengthShield
|
||
|
}
|
||
|
if (iNdEx + skippy) > l {
|
||
|
return io.ErrUnexpectedEOF
|
||
|
}
|
||
|
iNdEx += skippy
|
||
|
}
|
||
|
}
|
||
|
|
||
|
if iNdEx > l {
|
||
|
return io.ErrUnexpectedEOF
|
||
|
}
|
||
|
return nil
|
||
|
}
|
||
|
func skipShield(dAtA []byte) (n int, err error) {
|
||
|
l := len(dAtA)
|
||
|
iNdEx := 0
|
||
|
for iNdEx < l {
|
||
|
var wire uint64
|
||
|
for shift := uint(0); ; shift += 7 {
|
||
|
if shift >= 64 {
|
||
|
return 0, ErrIntOverflowShield
|
||
|
}
|
||
|
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, ErrIntOverflowShield
|
||
|
}
|
||
|
if iNdEx >= l {
|
||
|
return 0, io.ErrUnexpectedEOF
|
||
|
}
|
||
|
iNdEx++
|
||
|
if dAtA[iNdEx-1] < 0x80 {
|
||
|
break
|
||
|
}
|
||
|
}
|
||
|
return iNdEx, nil
|
||
|
case 1:
|
||
|
iNdEx += 8
|
||
|
return iNdEx, nil
|
||
|
case 2:
|
||
|
var length int
|
||
|
for shift := uint(0); ; shift += 7 {
|
||
|
if shift >= 64 {
|
||
|
return 0, ErrIntOverflowShield
|
||
|
}
|
||
|
if iNdEx >= l {
|
||
|
return 0, io.ErrUnexpectedEOF
|
||
|
}
|
||
|
b := dAtA[iNdEx]
|
||
|
iNdEx++
|
||
|
length |= (int(b) & 0x7F) << shift
|
||
|
if b < 0x80 {
|
||
|
break
|
||
|
}
|
||
|
}
|
||
|
iNdEx += length
|
||
|
if length < 0 {
|
||
|
return 0, ErrInvalidLengthShield
|
||
|
}
|
||
|
return iNdEx, nil
|
||
|
case 3:
|
||
|
for {
|
||
|
var innerWire uint64
|
||
|
var start int = iNdEx
|
||
|
for shift := uint(0); ; shift += 7 {
|
||
|
if shift >= 64 {
|
||
|
return 0, ErrIntOverflowShield
|
||
|
}
|
||
|
if iNdEx >= l {
|
||
|
return 0, io.ErrUnexpectedEOF
|
||
|
}
|
||
|
b := dAtA[iNdEx]
|
||
|
iNdEx++
|
||
|
innerWire |= (uint64(b) & 0x7F) << shift
|
||
|
if b < 0x80 {
|
||
|
break
|
||
|
}
|
||
|
}
|
||
|
innerWireType := int(innerWire & 0x7)
|
||
|
if innerWireType == 4 {
|
||
|
break
|
||
|
}
|
||
|
next, err := skipShield(dAtA[start:])
|
||
|
if err != nil {
|
||
|
return 0, err
|
||
|
}
|
||
|
iNdEx = start + next
|
||
|
}
|
||
|
return iNdEx, nil
|
||
|
case 4:
|
||
|
return iNdEx, nil
|
||
|
case 5:
|
||
|
iNdEx += 4
|
||
|
return iNdEx, nil
|
||
|
default:
|
||
|
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
|
||
|
}
|
||
|
}
|
||
|
panic("unreachable")
|
||
|
}
|
||
|
|
||
|
var (
|
||
|
ErrInvalidLengthShield = fmt.Errorf("proto: negative length found during unmarshaling")
|
||
|
ErrIntOverflowShield = fmt.Errorf("proto: integer overflow")
|
||
|
)
|
||
|
|
||
|
func init() { proto.RegisterFile("v1/Shield.proto", fileDescriptor_Shield_14b4a725a4fd2eaf) }
|
||
|
|
||
|
var fileDescriptor_Shield_14b4a725a4fd2eaf = []byte{
|
||
|
// 351 bytes of a gzipped FileDescriptorProto
|
||
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x2f, 0x33, 0xd4, 0x0f,
|
||
|
0xce, 0xc8, 0x4c, 0xcd, 0x49, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x4c, 0x4a, 0xcc,
|
||
|
0xcb, 0x4b, 0x4d, 0x89, 0x2f, 0x4e, 0x2d, 0x2a, 0xcb, 0x4c, 0x4e, 0xd5, 0x2b, 0x33, 0x94, 0xd2,
|
||
|
0x4d, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xcf, 0x4f, 0xcf, 0xd7,
|
||
|
0x07, 0xab, 0x4c, 0x2a, 0x4d, 0x03, 0xf3, 0xc0, 0x1c, 0x30, 0x0b, 0x62, 0x82, 0x52, 0x0c, 0x97,
|
||
|
0x04, 0xc4, 0x44, 0xcf, 0x62, 0x08, 0xed, 0x9c, 0x9f, 0x57, 0x92, 0x9a, 0x57, 0x12, 0x94, 0x5a,
|
||
|
0x28, 0x24, 0xc9, 0xc5, 0x5c, 0x9a, 0x99, 0x22, 0xc1, 0xa8, 0xc0, 0xa8, 0xc1, 0xec, 0xc4, 0xfe,
|
||
|
0xea, 0x9e, 0x3c, 0x88, 0x1b, 0x04, 0x22, 0x84, 0x54, 0xb9, 0xd8, 0x93, 0x21, 0x0a, 0x25, 0x98,
|
||
|
0x14, 0x18, 0x35, 0x38, 0x9d, 0xb8, 0x5f, 0xdd, 0x93, 0x87, 0x09, 0x05, 0xc1, 0x18, 0x4a, 0x3b,
|
||
|
0x98, 0xb8, 0x24, 0x71, 0x18, 0x5f, 0x5c, 0x20, 0x24, 0xc3, 0xc5, 0x92, 0x9c, 0x9f, 0x92, 0x0a,
|
||
|
0xb5, 0x80, 0xe3, 0xd5, 0x3d, 0x79, 0x30, 0x3f, 0x08, 0x4c, 0x82, 0x6c, 0xcf, 0x2d, 0x4e, 0x87,
|
||
|
0x1a, 0x0f, 0xb6, 0x3d, 0xb7, 0x38, 0x3d, 0x08, 0x44, 0x08, 0xf9, 0x73, 0xb1, 0xa4, 0x24, 0x96,
|
||
|
0x24, 0x4a, 0x30, 0x2b, 0x30, 0x6a, 0x70, 0x1b, 0x19, 0xea, 0x61, 0x84, 0x82, 0x1e, 0x4e, 0x4b,
|
||
|
0xf5, 0x5c, 0x12, 0x4b, 0x12, 0x21, 0x76, 0x81, 0x8c, 0x08, 0x02, 0x93, 0x52, 0x13, 0x18, 0xb9,
|
||
|
0x58, 0x40, 0x12, 0xf8, 0xbc, 0xec, 0xc8, 0x25, 0x98, 0x59, 0x1c, 0x5f, 0x0c, 0x36, 0x30, 0x1e,
|
||
|
0xd9, 0xf3, 0x1c, 0x4e, 0xa2, 0xaf, 0xee, 0xc9, 0x63, 0x4a, 0x06, 0xf1, 0x67, 0xa2, 0xda, 0x2f,
|
||
|
0xa4, 0xc5, 0xc5, 0x09, 0x55, 0x92, 0x54, 0x09, 0x76, 0x3c, 0xa7, 0x13, 0xef, 0xab, 0x7b, 0xf2,
|
||
|
0x08, 0xc1, 0x20, 0x0e, 0x08, 0xd3, 0xa9, 0xd2, 0xa8, 0x82, 0x8b, 0x0d, 0xa2, 0x59, 0x28, 0x0f,
|
||
|
0x8b, 0xc5, 0x42, 0xda, 0xc4, 0x7b, 0xba, 0x50, 0x4a, 0x87, 0x94, 0x10, 0x72, 0x92, 0x39, 0xf1,
|
||
|
0x48, 0x8e, 0xf1, 0xc2, 0x23, 0x39, 0xc6, 0x07, 0x8f, 0xe4, 0x18, 0x27, 0x3c, 0x96, 0x63, 0xb8,
|
||
|
0xf0, 0x58, 0x8e, 0xe1, 0xc6, 0x63, 0x39, 0x86, 0x28, 0xa6, 0x32, 0xc3, 0x24, 0x36, 0x70, 0xba,
|
||
|
0x31, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0x49, 0x4c, 0xac, 0x53, 0x8c, 0x02, 0x00, 0x00,
|
||
|
}
|