// Code generated by protoc-gen-gogo. DO NOT EDIT. // source: v1/Captcha.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 CaptchaCreateReq struct { // 宽度 Width int64 `protobuf:"varint,1,opt,name=width,proto3" json:"width"` // 高度 Height int64 `protobuf:"varint,2,opt,name=height,proto3" json:"height"` } func (m *CaptchaCreateReq) Reset() { *m = CaptchaCreateReq{} } func (m *CaptchaCreateReq) String() string { return proto.CompactTextString(m) } func (*CaptchaCreateReq) ProtoMessage() {} func (*CaptchaCreateReq) Descriptor() ([]byte, []int) { return fileDescriptor_Captcha_a2a8548161d89a91, []int{0} } func (m *CaptchaCreateReq) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *CaptchaCreateReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_CaptchaCreateReq.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 *CaptchaCreateReq) XXX_Merge(src proto.Message) { xxx_messageInfo_CaptchaCreateReq.Merge(dst, src) } func (m *CaptchaCreateReq) XXX_Size() int { return m.Size() } func (m *CaptchaCreateReq) XXX_DiscardUnknown() { xxx_messageInfo_CaptchaCreateReq.DiscardUnknown(m) } var xxx_messageInfo_CaptchaCreateReq proto.InternalMessageInfo func (m *CaptchaCreateReq) GetWidth() int64 { if m != nil { return m.Width } return 0 } func (m *CaptchaCreateReq) GetHeight() int64 { if m != nil { return m.Height } return 0 } type CaptchaCreateResp struct { // code Code int64 `protobuf:"varint,1,opt,name=code,proto3" json:"code"` // msg Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg"` // Data *CaptchaCreateResp_Data `protobuf:"bytes,3,opt,name=data" json:"data"` } func (m *CaptchaCreateResp) Reset() { *m = CaptchaCreateResp{} } func (m *CaptchaCreateResp) String() string { return proto.CompactTextString(m) } func (*CaptchaCreateResp) ProtoMessage() {} func (*CaptchaCreateResp) Descriptor() ([]byte, []int) { return fileDescriptor_Captcha_a2a8548161d89a91, []int{1} } func (m *CaptchaCreateResp) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *CaptchaCreateResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_CaptchaCreateResp.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 *CaptchaCreateResp) XXX_Merge(src proto.Message) { xxx_messageInfo_CaptchaCreateResp.Merge(dst, src) } func (m *CaptchaCreateResp) XXX_Size() int { return m.Size() } func (m *CaptchaCreateResp) XXX_DiscardUnknown() { xxx_messageInfo_CaptchaCreateResp.DiscardUnknown(m) } var xxx_messageInfo_CaptchaCreateResp proto.InternalMessageInfo func (m *CaptchaCreateResp) GetCode() int64 { if m != nil { return m.Code } return 0 } func (m *CaptchaCreateResp) GetMsg() string { if m != nil { return m.Msg } return "" } func (m *CaptchaCreateResp) GetData() *CaptchaCreateResp_Data { if m != nil { return m.Data } return nil } type CaptchaCreateResp_Data struct { // Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token"` // Image string `protobuf:"bytes,2,opt,name=image,proto3" json:"image"` } func (m *CaptchaCreateResp_Data) Reset() { *m = CaptchaCreateResp_Data{} } func (m *CaptchaCreateResp_Data) String() string { return proto.CompactTextString(m) } func (*CaptchaCreateResp_Data) ProtoMessage() {} func (*CaptchaCreateResp_Data) Descriptor() ([]byte, []int) { return fileDescriptor_Captcha_a2a8548161d89a91, []int{1, 0} } func (m *CaptchaCreateResp_Data) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } func (m *CaptchaCreateResp_Data) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_CaptchaCreateResp_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 *CaptchaCreateResp_Data) XXX_Merge(src proto.Message) { xxx_messageInfo_CaptchaCreateResp_Data.Merge(dst, src) } func (m *CaptchaCreateResp_Data) XXX_Size() int { return m.Size() } func (m *CaptchaCreateResp_Data) XXX_DiscardUnknown() { xxx_messageInfo_CaptchaCreateResp_Data.DiscardUnknown(m) } var xxx_messageInfo_CaptchaCreateResp_Data proto.InternalMessageInfo func (m *CaptchaCreateResp_Data) GetToken() string { if m != nil { return m.Token } return "" } func (m *CaptchaCreateResp_Data) GetImage() string { if m != nil { return m.Image } return "" } func init() { proto.RegisterType((*CaptchaCreateReq)(nil), "captcha.v1.CaptchaCreateReq") proto.RegisterType((*CaptchaCreateResp)(nil), "captcha.v1.CaptchaCreateResp") proto.RegisterType((*CaptchaCreateResp_Data)(nil), "captcha.v1.CaptchaCreateResp.Data") } func (m *CaptchaCreateReq) 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 *CaptchaCreateReq) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if m.Width != 0 { dAtA[i] = 0x8 i++ i = encodeVarintCaptcha(dAtA, i, uint64(m.Width)) } if m.Height != 0 { dAtA[i] = 0x10 i++ i = encodeVarintCaptcha(dAtA, i, uint64(m.Height)) } return i, nil } func (m *CaptchaCreateResp) 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 *CaptchaCreateResp) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if m.Code != 0 { dAtA[i] = 0x8 i++ i = encodeVarintCaptcha(dAtA, i, uint64(m.Code)) } if len(m.Msg) > 0 { dAtA[i] = 0x12 i++ i = encodeVarintCaptcha(dAtA, i, uint64(len(m.Msg))) i += copy(dAtA[i:], m.Msg) } if m.Data != nil { dAtA[i] = 0x1a i++ i = encodeVarintCaptcha(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 *CaptchaCreateResp_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 *CaptchaCreateResp_Data) MarshalTo(dAtA []byte) (int, error) { var i int _ = i var l int _ = l if len(m.Token) > 0 { dAtA[i] = 0xa i++ i = encodeVarintCaptcha(dAtA, i, uint64(len(m.Token))) i += copy(dAtA[i:], m.Token) } if len(m.Image) > 0 { dAtA[i] = 0x12 i++ i = encodeVarintCaptcha(dAtA, i, uint64(len(m.Image))) i += copy(dAtA[i:], m.Image) } return i, nil } func encodeVarintCaptcha(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 *CaptchaCreateReq) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.Width != 0 { n += 1 + sovCaptcha(uint64(m.Width)) } if m.Height != 0 { n += 1 + sovCaptcha(uint64(m.Height)) } return n } func (m *CaptchaCreateResp) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.Code != 0 { n += 1 + sovCaptcha(uint64(m.Code)) } l = len(m.Msg) if l > 0 { n += 1 + l + sovCaptcha(uint64(l)) } if m.Data != nil { l = m.Data.Size() n += 1 + l + sovCaptcha(uint64(l)) } return n } func (m *CaptchaCreateResp_Data) Size() (n int) { if m == nil { return 0 } var l int _ = l l = len(m.Token) if l > 0 { n += 1 + l + sovCaptcha(uint64(l)) } l = len(m.Image) if l > 0 { n += 1 + l + sovCaptcha(uint64(l)) } return n } func sovCaptcha(x uint64) (n int) { for { n++ x >>= 7 if x == 0 { break } } return n } func sozCaptcha(x uint64) (n int) { return sovCaptcha(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } func (m *CaptchaCreateReq) 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 ErrIntOverflowCaptcha } 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: CaptchaCreateReq: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: CaptchaCreateReq: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Width", wireType) } m.Width = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowCaptcha } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Width |= (int64(b) & 0x7F) << shift if b < 0x80 { break } } case 2: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) } m.Height = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowCaptcha } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ m.Height |= (int64(b) & 0x7F) << shift if b < 0x80 { break } } default: iNdEx = preIndex skippy, err := skipCaptcha(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthCaptcha } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *CaptchaCreateResp) 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 ErrIntOverflowCaptcha } 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: CaptchaCreateResp: wiretype end group for non-group") } if fieldNum <= 0 { return fmt.Errorf("proto: CaptchaCreateResp: 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 ErrIntOverflowCaptcha } 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 ErrIntOverflowCaptcha } 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 ErrInvalidLengthCaptcha } 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 ErrIntOverflowCaptcha } if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] iNdEx++ msglen |= (int(b) & 0x7F) << shift if b < 0x80 { break } } if msglen < 0 { return ErrInvalidLengthCaptcha } postIndex := iNdEx + msglen if postIndex > l { return io.ErrUnexpectedEOF } if m.Data == nil { m.Data = &CaptchaCreateResp_Data{} } if err := m.Data.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipCaptcha(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthCaptcha } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func (m *CaptchaCreateResp_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 ErrIntOverflowCaptcha } 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 != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Token", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowCaptcha } 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 ErrInvalidLengthCaptcha } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.Token = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Image", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowCaptcha } 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 ErrInvalidLengthCaptcha } postIndex := iNdEx + intStringLen if postIndex > l { return io.ErrUnexpectedEOF } m.Image = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipCaptcha(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { return ErrInvalidLengthCaptcha } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF } iNdEx += skippy } } if iNdEx > l { return io.ErrUnexpectedEOF } return nil } func skipCaptcha(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, ErrIntOverflowCaptcha } 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, ErrIntOverflowCaptcha } 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, ErrIntOverflowCaptcha } 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, ErrInvalidLengthCaptcha } return iNdEx, nil case 3: for { var innerWire uint64 var start int = iNdEx for shift := uint(0); ; shift += 7 { if shift >= 64 { return 0, ErrIntOverflowCaptcha } 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 := skipCaptcha(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 ( ErrInvalidLengthCaptcha = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowCaptcha = fmt.Errorf("proto: integer overflow") ) func init() { proto.RegisterFile("v1/Captcha.proto", fileDescriptor_Captcha_a2a8548161d89a91) } var fileDescriptor_Captcha_a2a8548161d89a91 = []byte{ // 315 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x51, 0x4d, 0x4f, 0xc2, 0x40, 0x14, 0x64, 0x01, 0x41, 0x9e, 0x17, 0xdc, 0x13, 0x12, 0xdc, 0x92, 0x9e, 0xb8, 0x58, 0x02, 0xfe, 0x01, 0x03, 0x9a, 0x78, 0x34, 0x7b, 0x31, 0xf1, 0xb6, 0x94, 0x75, 0xdb, 0x18, 0x5c, 0x3e, 0x96, 0xfa, 0x37, 0xfc, 0x59, 0x1e, 0x39, 0x72, 0x6a, 0x4c, 0x7b, 0xeb, 0xaf, 0x30, 0xfb, 0x76, 0x13, 0x13, 0x4d, 0xb8, 0xbc, 0xe9, 0x4c, 0x66, 0xe7, 0xcd, 0x4b, 0xa1, 0x9b, 0x4d, 0xc6, 0x73, 0xb1, 0x36, 0x71, 0x22, 0xa2, 0xf5, 0x56, 0x1b, 0x4d, 0x21, 0xf6, 0x34, 0x9b, 0xf4, 0x6f, 0x54, 0x6a, 0x92, 0xfd, 0x22, 0x8a, 0xf5, 0x6a, 0xac, 0xb4, 0xd2, 0x63, 0xb4, 0x2c, 0xf6, 0xaf, 0xc8, 0x90, 0xe0, 0x97, 0x7b, 0x1a, 0x3e, 0x43, 0xd7, 0x67, 0xcd, 0xb7, 0x52, 0x18, 0xc9, 0xe5, 0x86, 0x06, 0x70, 0xf6, 0x91, 0x2e, 0x4d, 0xd2, 0x23, 0x43, 0x32, 0x6a, 0xcc, 0x3a, 0x55, 0x1e, 0x38, 0x81, 0x3b, 0xa0, 0x21, 0xb4, 0x12, 0x99, 0xaa, 0xc4, 0xf4, 0xea, 0xe8, 0x80, 0x2a, 0x0f, 0xbc, 0xc2, 0x3d, 0x86, 0x47, 0x02, 0x97, 0x7f, 0x92, 0x77, 0x6b, 0x3a, 0x80, 0x66, 0xac, 0x97, 0xd2, 0x27, 0x9f, 0x57, 0x79, 0x80, 0x9c, 0xe3, 0xa4, 0x57, 0xd0, 0x58, 0xed, 0x14, 0x86, 0x76, 0x66, 0xed, 0x2a, 0x0f, 0x2c, 0xe5, 0x76, 0xd0, 0x3b, 0x68, 0x2e, 0x85, 0x11, 0xbd, 0xc6, 0x90, 0x8c, 0x2e, 0xa6, 0x61, 0xf4, 0x7b, 0x71, 0xf4, 0x6f, 0x4b, 0x74, 0x2f, 0x8c, 0x70, 0xe1, 0xf6, 0x0d, 0xc7, 0xd9, 0x7f, 0x84, 0xa6, 0xd5, 0xed, 0x75, 0x46, 0xbf, 0xc9, 0x77, 0xec, 0xd0, 0x71, 0xd7, 0xa1, 0xc0, 0x1d, 0x58, 0x43, 0xba, 0x12, 0x4a, 0xfa, 0x1e, 0x68, 0x40, 0x81, 0x3b, 0x98, 0x3e, 0x41, 0xdb, 0xef, 0xa4, 0x0f, 0xd0, 0x8a, 0x71, 0x2f, 0x1d, 0x9c, 0xa8, 0xb4, 0xe9, 0x5f, 0x9f, 0x2c, 0x3c, 0x1b, 0x7c, 0x15, 0x8c, 0x1c, 0x0a, 0x46, 0xbe, 0x0b, 0x46, 0x3e, 0x4b, 0x56, 0x3b, 0x94, 0xac, 0x76, 0x2c, 0x59, 0xed, 0xa5, 0x9e, 0x4d, 0x16, 0x2d, 0xfc, 0x55, 0xb7, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0xfa, 0xba, 0xd4, 0x22, 0xf9, 0x01, 0x00, 0x00, }