417 lines
9.6 KiB
Go
417 lines
9.6 KiB
Go
|
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||
|
// source: sns.proto
|
||
|
|
||
|
/*
|
||
|
Package model is a generated protocol buffer package.
|
||
|
|
||
|
It is generated from these files:
|
||
|
sns.proto
|
||
|
|
||
|
It has these top-level messages:
|
||
|
SnsProto
|
||
|
*/
|
||
|
package model
|
||
|
|
||
|
import proto "github.com/golang/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.ProtoPackageIsVersion2 // please upgrade the proto package
|
||
|
|
||
|
type SnsProto struct {
|
||
|
Mid int64 `protobuf:"varint,1,opt,name=Mid,proto3" json:"mid"`
|
||
|
UnionID string `protobuf:"bytes,2,opt,name=UnionID,proto3" json:"unionid"`
|
||
|
Platform int32 `protobuf:"varint,3,opt,name=Platform,proto3" json:"platform"`
|
||
|
Expires int64 `protobuf:"varint,4,opt,name=Expires,proto3" json:"expires"`
|
||
|
}
|
||
|
|
||
|
func (m *SnsProto) Reset() { *m = SnsProto{} }
|
||
|
func (m *SnsProto) String() string { return proto.CompactTextString(m) }
|
||
|
func (*SnsProto) ProtoMessage() {}
|
||
|
func (*SnsProto) Descriptor() ([]byte, []int) { return fileDescriptorSns, []int{0} }
|
||
|
|
||
|
func (m *SnsProto) GetMid() int64 {
|
||
|
if m != nil {
|
||
|
return m.Mid
|
||
|
}
|
||
|
return 0
|
||
|
}
|
||
|
|
||
|
func (m *SnsProto) GetUnionID() string {
|
||
|
if m != nil {
|
||
|
return m.UnionID
|
||
|
}
|
||
|
return ""
|
||
|
}
|
||
|
|
||
|
func (m *SnsProto) GetPlatform() int32 {
|
||
|
if m != nil {
|
||
|
return m.Platform
|
||
|
}
|
||
|
return 0
|
||
|
}
|
||
|
|
||
|
func (m *SnsProto) GetExpires() int64 {
|
||
|
if m != nil {
|
||
|
return m.Expires
|
||
|
}
|
||
|
return 0
|
||
|
}
|
||
|
|
||
|
func init() {
|
||
|
proto.RegisterType((*SnsProto)(nil), "passport.service.sns.SnsProto")
|
||
|
}
|
||
|
func (m *SnsProto) 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 *SnsProto) MarshalTo(dAtA []byte) (int, error) {
|
||
|
var i int
|
||
|
_ = i
|
||
|
var l int
|
||
|
_ = l
|
||
|
if m.Mid != 0 {
|
||
|
dAtA[i] = 0x8
|
||
|
i++
|
||
|
i = encodeVarintSns(dAtA, i, uint64(m.Mid))
|
||
|
}
|
||
|
if len(m.UnionID) > 0 {
|
||
|
dAtA[i] = 0x12
|
||
|
i++
|
||
|
i = encodeVarintSns(dAtA, i, uint64(len(m.UnionID)))
|
||
|
i += copy(dAtA[i:], m.UnionID)
|
||
|
}
|
||
|
if m.Platform != 0 {
|
||
|
dAtA[i] = 0x18
|
||
|
i++
|
||
|
i = encodeVarintSns(dAtA, i, uint64(m.Platform))
|
||
|
}
|
||
|
if m.Expires != 0 {
|
||
|
dAtA[i] = 0x20
|
||
|
i++
|
||
|
i = encodeVarintSns(dAtA, i, uint64(m.Expires))
|
||
|
}
|
||
|
return i, nil
|
||
|
}
|
||
|
|
||
|
func encodeVarintSns(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 *SnsProto) Size() (n int) {
|
||
|
var l int
|
||
|
_ = l
|
||
|
if m.Mid != 0 {
|
||
|
n += 1 + sovSns(uint64(m.Mid))
|
||
|
}
|
||
|
l = len(m.UnionID)
|
||
|
if l > 0 {
|
||
|
n += 1 + l + sovSns(uint64(l))
|
||
|
}
|
||
|
if m.Platform != 0 {
|
||
|
n += 1 + sovSns(uint64(m.Platform))
|
||
|
}
|
||
|
if m.Expires != 0 {
|
||
|
n += 1 + sovSns(uint64(m.Expires))
|
||
|
}
|
||
|
return n
|
||
|
}
|
||
|
|
||
|
func sovSns(x uint64) (n int) {
|
||
|
for {
|
||
|
n++
|
||
|
x >>= 7
|
||
|
if x == 0 {
|
||
|
break
|
||
|
}
|
||
|
}
|
||
|
return n
|
||
|
}
|
||
|
func sozSns(x uint64) (n int) {
|
||
|
return sovSns(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
||
|
}
|
||
|
func (m *SnsProto) 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 ErrIntOverflowSns
|
||
|
}
|
||
|
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: SnsProto: wiretype end group for non-group")
|
||
|
}
|
||
|
if fieldNum <= 0 {
|
||
|
return fmt.Errorf("proto: SnsProto: illegal tag %d (wire type %d)", fieldNum, wire)
|
||
|
}
|
||
|
switch fieldNum {
|
||
|
case 1:
|
||
|
if wireType != 0 {
|
||
|
return fmt.Errorf("proto: wrong wireType = %d for field Mid", wireType)
|
||
|
}
|
||
|
m.Mid = 0
|
||
|
for shift := uint(0); ; shift += 7 {
|
||
|
if shift >= 64 {
|
||
|
return ErrIntOverflowSns
|
||
|
}
|
||
|
if iNdEx >= l {
|
||
|
return io.ErrUnexpectedEOF
|
||
|
}
|
||
|
b := dAtA[iNdEx]
|
||
|
iNdEx++
|
||
|
m.Mid |= (int64(b) & 0x7F) << shift
|
||
|
if b < 0x80 {
|
||
|
break
|
||
|
}
|
||
|
}
|
||
|
case 2:
|
||
|
if wireType != 2 {
|
||
|
return fmt.Errorf("proto: wrong wireType = %d for field UnionID", wireType)
|
||
|
}
|
||
|
var stringLen uint64
|
||
|
for shift := uint(0); ; shift += 7 {
|
||
|
if shift >= 64 {
|
||
|
return ErrIntOverflowSns
|
||
|
}
|
||
|
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 ErrInvalidLengthSns
|
||
|
}
|
||
|
postIndex := iNdEx + intStringLen
|
||
|
if postIndex > l {
|
||
|
return io.ErrUnexpectedEOF
|
||
|
}
|
||
|
m.UnionID = string(dAtA[iNdEx:postIndex])
|
||
|
iNdEx = postIndex
|
||
|
case 3:
|
||
|
if wireType != 0 {
|
||
|
return fmt.Errorf("proto: wrong wireType = %d for field Platform", wireType)
|
||
|
}
|
||
|
m.Platform = 0
|
||
|
for shift := uint(0); ; shift += 7 {
|
||
|
if shift >= 64 {
|
||
|
return ErrIntOverflowSns
|
||
|
}
|
||
|
if iNdEx >= l {
|
||
|
return io.ErrUnexpectedEOF
|
||
|
}
|
||
|
b := dAtA[iNdEx]
|
||
|
iNdEx++
|
||
|
m.Platform |= (int32(b) & 0x7F) << shift
|
||
|
if b < 0x80 {
|
||
|
break
|
||
|
}
|
||
|
}
|
||
|
case 4:
|
||
|
if wireType != 0 {
|
||
|
return fmt.Errorf("proto: wrong wireType = %d for field Expires", wireType)
|
||
|
}
|
||
|
m.Expires = 0
|
||
|
for shift := uint(0); ; shift += 7 {
|
||
|
if shift >= 64 {
|
||
|
return ErrIntOverflowSns
|
||
|
}
|
||
|
if iNdEx >= l {
|
||
|
return io.ErrUnexpectedEOF
|
||
|
}
|
||
|
b := dAtA[iNdEx]
|
||
|
iNdEx++
|
||
|
m.Expires |= (int64(b) & 0x7F) << shift
|
||
|
if b < 0x80 {
|
||
|
break
|
||
|
}
|
||
|
}
|
||
|
default:
|
||
|
iNdEx = preIndex
|
||
|
skippy, err := skipSns(dAtA[iNdEx:])
|
||
|
if err != nil {
|
||
|
return err
|
||
|
}
|
||
|
if skippy < 0 {
|
||
|
return ErrInvalidLengthSns
|
||
|
}
|
||
|
if (iNdEx + skippy) > l {
|
||
|
return io.ErrUnexpectedEOF
|
||
|
}
|
||
|
iNdEx += skippy
|
||
|
}
|
||
|
}
|
||
|
|
||
|
if iNdEx > l {
|
||
|
return io.ErrUnexpectedEOF
|
||
|
}
|
||
|
return nil
|
||
|
}
|
||
|
func skipSns(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, ErrIntOverflowSns
|
||
|
}
|
||
|
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, ErrIntOverflowSns
|
||
|
}
|
||
|
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, ErrIntOverflowSns
|
||
|
}
|
||
|
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, ErrInvalidLengthSns
|
||
|
}
|
||
|
return iNdEx, nil
|
||
|
case 3:
|
||
|
for {
|
||
|
var innerWire uint64
|
||
|
var start int = iNdEx
|
||
|
for shift := uint(0); ; shift += 7 {
|
||
|
if shift >= 64 {
|
||
|
return 0, ErrIntOverflowSns
|
||
|
}
|
||
|
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 := skipSns(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 (
|
||
|
ErrInvalidLengthSns = fmt.Errorf("proto: negative length found during unmarshaling")
|
||
|
ErrIntOverflowSns = fmt.Errorf("proto: integer overflow")
|
||
|
)
|
||
|
|
||
|
func init() { proto.RegisterFile("sns.proto", fileDescriptorSns) }
|
||
|
|
||
|
var fileDescriptorSns = []byte{
|
||
|
// 236 bytes of a gzipped FileDescriptorProto
|
||
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x2c, 0xce, 0x2b, 0xd6,
|
||
|
0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x29, 0x48, 0x2c, 0x2e, 0x2e, 0xc8, 0x2f, 0x2a, 0xd1,
|
||
|
0x2b, 0x4e, 0x2d, 0x2a, 0xcb, 0x4c, 0x4e, 0xd5, 0x2b, 0xce, 0x2b, 0x96, 0xd2, 0x4d, 0xcf, 0x2c,
|
||
|
0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xcf, 0x4f, 0xcf, 0xd7, 0x07, 0x2b, 0x4e,
|
||
|
0x2a, 0x4d, 0x03, 0xf3, 0xc0, 0x1c, 0x30, 0x0b, 0x62, 0x88, 0xd2, 0x5c, 0x46, 0x2e, 0x8e, 0xe0,
|
||
|
0xbc, 0xe2, 0x00, 0xb0, 0x89, 0x92, 0x5c, 0xcc, 0xbe, 0x99, 0x29, 0x12, 0x8c, 0x0a, 0x8c, 0x1a,
|
||
|
0xcc, 0x4e, 0xec, 0xaf, 0xee, 0xc9, 0x33, 0xe7, 0x66, 0xa6, 0x04, 0x81, 0xc4, 0x84, 0x54, 0xb9,
|
||
|
0xd8, 0x43, 0xf3, 0x32, 0xf3, 0xf3, 0x3c, 0x5d, 0x24, 0x98, 0x14, 0x18, 0x35, 0x38, 0x9d, 0xb8,
|
||
|
0x5f, 0xdd, 0x93, 0x67, 0x2f, 0x05, 0x09, 0x65, 0xa6, 0x04, 0xc1, 0xe4, 0x84, 0x34, 0xb8, 0x38,
|
||
|
0x02, 0x72, 0x12, 0x4b, 0xd2, 0xf2, 0x8b, 0x72, 0x25, 0x98, 0x15, 0x18, 0x35, 0x58, 0x9d, 0x78,
|
||
|
0x5e, 0xdd, 0x93, 0xe7, 0x28, 0x80, 0x8a, 0x05, 0xc1, 0x65, 0x41, 0x06, 0xba, 0x56, 0x14, 0x64,
|
||
|
0x16, 0xa5, 0x16, 0x4b, 0xb0, 0x80, 0xed, 0x03, 0x1b, 0x98, 0x0a, 0x11, 0x0a, 0x82, 0xc9, 0x39,
|
||
|
0x89, 0x9f, 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x33, 0x1e,
|
||
|
0xcb, 0x31, 0x44, 0xb1, 0xe6, 0xe6, 0xa7, 0xa4, 0xe6, 0x24, 0xb1, 0x81, 0xdd, 0x6f, 0x0c, 0x08,
|
||
|
0x00, 0x00, 0xff, 0xff, 0xdb, 0x0a, 0x19, 0x68, 0x11, 0x01, 0x00, 0x00,
|
||
|
}
|