1068 lines
26 KiB
Go
1068 lines
26 KiB
Go
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
|
// source: app/service/main/passport-auth/api/grpc/v1/api.proto
|
|
|
|
/*
|
|
Package v1 is a generated protocol buffer package.
|
|
|
|
It is generated from these files:
|
|
app/service/main/passport-auth/api/grpc/v1/api.proto
|
|
|
|
It has these top-level messages:
|
|
GetCookieInfoReq
|
|
GetCookieInfoReply
|
|
GetTokenInfoReq
|
|
GetTokenInfoReply
|
|
*/
|
|
package v1
|
|
|
|
import proto "github.com/gogo/protobuf/proto"
|
|
import fmt "fmt"
|
|
import math "math"
|
|
import _ "github.com/gogo/protobuf/gogoproto"
|
|
|
|
import context "golang.org/x/net/context"
|
|
import grpc "google.golang.org/grpc"
|
|
|
|
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
|
|
|
|
// GetCookieInfoReq request param for rpc CookieInfo
|
|
type GetCookieInfoReq struct {
|
|
// all user cookie of HTTP request
|
|
// example: 'SESSDATA=DEE4597D836A5A9DA29DFC1AB1EFFDEB;sid=exampleSID'
|
|
Cookie string `protobuf:"bytes,1,opt,name=cookie,proto3" json:"cookie,omitempty"`
|
|
}
|
|
|
|
func (m *GetCookieInfoReq) Reset() { *m = GetCookieInfoReq{} }
|
|
func (m *GetCookieInfoReq) String() string { return proto.CompactTextString(m) }
|
|
func (*GetCookieInfoReq) ProtoMessage() {}
|
|
func (*GetCookieInfoReq) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{0} }
|
|
|
|
func (m *GetCookieInfoReq) GetCookie() string {
|
|
if m != nil {
|
|
return m.Cookie
|
|
}
|
|
return ""
|
|
}
|
|
|
|
// GetCookieInfoReply reply val for rpc CookieInfo
|
|
type GetCookieInfoReply struct {
|
|
// 用户是否登录
|
|
IsLogin bool `protobuf:"varint,1,opt,name=is_login,json=isLogin,proto3" json:"is_login"`
|
|
// user mid
|
|
Mid int64 `protobuf:"varint,2,opt,name=mid,proto3" json:"mid"`
|
|
// cookie csrf
|
|
// when token reqest this field is empty
|
|
Csrf string `protobuf:"bytes,3,opt,name=csrf,proto3" json:"csrfToken"`
|
|
// expire time(unix timestamp)
|
|
Expires int64 `protobuf:"varint,4,opt,name=expires,proto3" json:"expires"`
|
|
}
|
|
|
|
func (m *GetCookieInfoReply) Reset() { *m = GetCookieInfoReply{} }
|
|
func (m *GetCookieInfoReply) String() string { return proto.CompactTextString(m) }
|
|
func (*GetCookieInfoReply) ProtoMessage() {}
|
|
func (*GetCookieInfoReply) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{1} }
|
|
|
|
func (m *GetCookieInfoReply) GetIsLogin() bool {
|
|
if m != nil {
|
|
return m.IsLogin
|
|
}
|
|
return false
|
|
}
|
|
|
|
func (m *GetCookieInfoReply) GetMid() int64 {
|
|
if m != nil {
|
|
return m.Mid
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *GetCookieInfoReply) GetCsrf() string {
|
|
if m != nil {
|
|
return m.Csrf
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *GetCookieInfoReply) GetExpires() int64 {
|
|
if m != nil {
|
|
return m.Expires
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// GetTokenInfoReq request param for rpc TokenInfo
|
|
type GetTokenInfoReq struct {
|
|
// user access token
|
|
Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
|
|
}
|
|
|
|
func (m *GetTokenInfoReq) Reset() { *m = GetTokenInfoReq{} }
|
|
func (m *GetTokenInfoReq) String() string { return proto.CompactTextString(m) }
|
|
func (*GetTokenInfoReq) ProtoMessage() {}
|
|
func (*GetTokenInfoReq) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{2} }
|
|
|
|
func (m *GetTokenInfoReq) GetToken() string {
|
|
if m != nil {
|
|
return m.Token
|
|
}
|
|
return ""
|
|
}
|
|
|
|
// GetTokenInfoReply reply val for rpc TokenInfo
|
|
type GetTokenInfoReply struct {
|
|
// 用户是否登录
|
|
IsLogin bool `protobuf:"varint,1,opt,name=is_login,json=isLogin,proto3" json:"is_login"`
|
|
// user mid
|
|
Mid int64 `protobuf:"varint,2,opt,name=mid,proto3" json:"mid"`
|
|
// cookie csrf
|
|
// when token reqest this field is empty
|
|
Csrf string `protobuf:"bytes,3,opt,name=csrf,proto3" json:"csrfToken"`
|
|
// expire time(unix timestamp)
|
|
Expires int64 `protobuf:"varint,4,opt,name=expires,proto3" json:"expires"`
|
|
}
|
|
|
|
func (m *GetTokenInfoReply) Reset() { *m = GetTokenInfoReply{} }
|
|
func (m *GetTokenInfoReply) String() string { return proto.CompactTextString(m) }
|
|
func (*GetTokenInfoReply) ProtoMessage() {}
|
|
func (*GetTokenInfoReply) Descriptor() ([]byte, []int) { return fileDescriptorApi, []int{3} }
|
|
|
|
func (m *GetTokenInfoReply) GetIsLogin() bool {
|
|
if m != nil {
|
|
return m.IsLogin
|
|
}
|
|
return false
|
|
}
|
|
|
|
func (m *GetTokenInfoReply) GetMid() int64 {
|
|
if m != nil {
|
|
return m.Mid
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *GetTokenInfoReply) GetCsrf() string {
|
|
if m != nil {
|
|
return m.Csrf
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *GetTokenInfoReply) GetExpires() int64 {
|
|
if m != nil {
|
|
return m.Expires
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func init() {
|
|
proto.RegisterType((*GetCookieInfoReq)(nil), "passport.service.auth.v1.GetCookieInfoReq")
|
|
proto.RegisterType((*GetCookieInfoReply)(nil), "passport.service.auth.v1.GetCookieInfoReply")
|
|
proto.RegisterType((*GetTokenInfoReq)(nil), "passport.service.auth.v1.GetTokenInfoReq")
|
|
proto.RegisterType((*GetTokenInfoReply)(nil), "passport.service.auth.v1.GetTokenInfoReply")
|
|
}
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
var _ context.Context
|
|
var _ grpc.ClientConn
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
// is compatible with the grpc package it is being compiled against.
|
|
const _ = grpc.SupportPackageIsVersion4
|
|
|
|
// Client API for Auth service
|
|
|
|
type AuthClient interface {
|
|
// GetCookieInfo verify user info by cookie.
|
|
GetCookieInfo(ctx context.Context, in *GetCookieInfoReq, opts ...grpc.CallOption) (*GetCookieInfoReply, error)
|
|
// GetTokenInfo verify user info by token.
|
|
GetTokenInfo(ctx context.Context, in *GetTokenInfoReq, opts ...grpc.CallOption) (*GetTokenInfoReply, error)
|
|
}
|
|
|
|
type authClient struct {
|
|
cc *grpc.ClientConn
|
|
}
|
|
|
|
func NewAuthClient(cc *grpc.ClientConn) AuthClient {
|
|
return &authClient{cc}
|
|
}
|
|
|
|
func (c *authClient) GetCookieInfo(ctx context.Context, in *GetCookieInfoReq, opts ...grpc.CallOption) (*GetCookieInfoReply, error) {
|
|
out := new(GetCookieInfoReply)
|
|
err := grpc.Invoke(ctx, "/passport.service.auth.v1.Auth/GetCookieInfo", in, out, c.cc, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *authClient) GetTokenInfo(ctx context.Context, in *GetTokenInfoReq, opts ...grpc.CallOption) (*GetTokenInfoReply, error) {
|
|
out := new(GetTokenInfoReply)
|
|
err := grpc.Invoke(ctx, "/passport.service.auth.v1.Auth/GetTokenInfo", in, out, c.cc, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// Server API for Auth service
|
|
|
|
type AuthServer interface {
|
|
// GetCookieInfo verify user info by cookie.
|
|
GetCookieInfo(context.Context, *GetCookieInfoReq) (*GetCookieInfoReply, error)
|
|
// GetTokenInfo verify user info by token.
|
|
GetTokenInfo(context.Context, *GetTokenInfoReq) (*GetTokenInfoReply, error)
|
|
}
|
|
|
|
func RegisterAuthServer(s *grpc.Server, srv AuthServer) {
|
|
s.RegisterService(&_Auth_serviceDesc, srv)
|
|
}
|
|
|
|
func _Auth_GetCookieInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(GetCookieInfoReq)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(AuthServer).GetCookieInfo(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/passport.service.auth.v1.Auth/GetCookieInfo",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(AuthServer).GetCookieInfo(ctx, req.(*GetCookieInfoReq))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Auth_GetTokenInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(GetTokenInfoReq)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(AuthServer).GetTokenInfo(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/passport.service.auth.v1.Auth/GetTokenInfo",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(AuthServer).GetTokenInfo(ctx, req.(*GetTokenInfoReq))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
var _Auth_serviceDesc = grpc.ServiceDesc{
|
|
ServiceName: "passport.service.auth.v1.Auth",
|
|
HandlerType: (*AuthServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "GetCookieInfo",
|
|
Handler: _Auth_GetCookieInfo_Handler,
|
|
},
|
|
{
|
|
MethodName: "GetTokenInfo",
|
|
Handler: _Auth_GetTokenInfo_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "app/service/main/passport-auth/api/grpc/v1/api.proto",
|
|
}
|
|
|
|
func (m *GetCookieInfoReq) 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 *GetCookieInfoReq) MarshalTo(dAtA []byte) (int, error) {
|
|
var i int
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if len(m.Cookie) > 0 {
|
|
dAtA[i] = 0xa
|
|
i++
|
|
i = encodeVarintApi(dAtA, i, uint64(len(m.Cookie)))
|
|
i += copy(dAtA[i:], m.Cookie)
|
|
}
|
|
return i, nil
|
|
}
|
|
|
|
func (m *GetCookieInfoReply) 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 *GetCookieInfoReply) MarshalTo(dAtA []byte) (int, error) {
|
|
var i int
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.IsLogin {
|
|
dAtA[i] = 0x8
|
|
i++
|
|
if m.IsLogin {
|
|
dAtA[i] = 1
|
|
} else {
|
|
dAtA[i] = 0
|
|
}
|
|
i++
|
|
}
|
|
if m.Mid != 0 {
|
|
dAtA[i] = 0x10
|
|
i++
|
|
i = encodeVarintApi(dAtA, i, uint64(m.Mid))
|
|
}
|
|
if len(m.Csrf) > 0 {
|
|
dAtA[i] = 0x1a
|
|
i++
|
|
i = encodeVarintApi(dAtA, i, uint64(len(m.Csrf)))
|
|
i += copy(dAtA[i:], m.Csrf)
|
|
}
|
|
if m.Expires != 0 {
|
|
dAtA[i] = 0x20
|
|
i++
|
|
i = encodeVarintApi(dAtA, i, uint64(m.Expires))
|
|
}
|
|
return i, nil
|
|
}
|
|
|
|
func (m *GetTokenInfoReq) 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 *GetTokenInfoReq) MarshalTo(dAtA []byte) (int, error) {
|
|
var i int
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if len(m.Token) > 0 {
|
|
dAtA[i] = 0xa
|
|
i++
|
|
i = encodeVarintApi(dAtA, i, uint64(len(m.Token)))
|
|
i += copy(dAtA[i:], m.Token)
|
|
}
|
|
return i, nil
|
|
}
|
|
|
|
func (m *GetTokenInfoReply) 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 *GetTokenInfoReply) MarshalTo(dAtA []byte) (int, error) {
|
|
var i int
|
|
_ = i
|
|
var l int
|
|
_ = l
|
|
if m.IsLogin {
|
|
dAtA[i] = 0x8
|
|
i++
|
|
if m.IsLogin {
|
|
dAtA[i] = 1
|
|
} else {
|
|
dAtA[i] = 0
|
|
}
|
|
i++
|
|
}
|
|
if m.Mid != 0 {
|
|
dAtA[i] = 0x10
|
|
i++
|
|
i = encodeVarintApi(dAtA, i, uint64(m.Mid))
|
|
}
|
|
if len(m.Csrf) > 0 {
|
|
dAtA[i] = 0x1a
|
|
i++
|
|
i = encodeVarintApi(dAtA, i, uint64(len(m.Csrf)))
|
|
i += copy(dAtA[i:], m.Csrf)
|
|
}
|
|
if m.Expires != 0 {
|
|
dAtA[i] = 0x20
|
|
i++
|
|
i = encodeVarintApi(dAtA, i, uint64(m.Expires))
|
|
}
|
|
return i, nil
|
|
}
|
|
|
|
func encodeVarintApi(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 *GetCookieInfoReq) Size() (n int) {
|
|
var l int
|
|
_ = l
|
|
l = len(m.Cookie)
|
|
if l > 0 {
|
|
n += 1 + l + sovApi(uint64(l))
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *GetCookieInfoReply) Size() (n int) {
|
|
var l int
|
|
_ = l
|
|
if m.IsLogin {
|
|
n += 2
|
|
}
|
|
if m.Mid != 0 {
|
|
n += 1 + sovApi(uint64(m.Mid))
|
|
}
|
|
l = len(m.Csrf)
|
|
if l > 0 {
|
|
n += 1 + l + sovApi(uint64(l))
|
|
}
|
|
if m.Expires != 0 {
|
|
n += 1 + sovApi(uint64(m.Expires))
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *GetTokenInfoReq) Size() (n int) {
|
|
var l int
|
|
_ = l
|
|
l = len(m.Token)
|
|
if l > 0 {
|
|
n += 1 + l + sovApi(uint64(l))
|
|
}
|
|
return n
|
|
}
|
|
|
|
func (m *GetTokenInfoReply) Size() (n int) {
|
|
var l int
|
|
_ = l
|
|
if m.IsLogin {
|
|
n += 2
|
|
}
|
|
if m.Mid != 0 {
|
|
n += 1 + sovApi(uint64(m.Mid))
|
|
}
|
|
l = len(m.Csrf)
|
|
if l > 0 {
|
|
n += 1 + l + sovApi(uint64(l))
|
|
}
|
|
if m.Expires != 0 {
|
|
n += 1 + sovApi(uint64(m.Expires))
|
|
}
|
|
return n
|
|
}
|
|
|
|
func sovApi(x uint64) (n int) {
|
|
for {
|
|
n++
|
|
x >>= 7
|
|
if x == 0 {
|
|
break
|
|
}
|
|
}
|
|
return n
|
|
}
|
|
func sozApi(x uint64) (n int) {
|
|
return sovApi(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
|
}
|
|
func (m *GetCookieInfoReq) 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 ErrIntOverflowApi
|
|
}
|
|
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: GetCookieInfoReq: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: GetCookieInfoReq: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Cookie", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowApi
|
|
}
|
|
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 ErrInvalidLengthApi
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Cookie = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipApi(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthApi
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *GetCookieInfoReply) 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 ErrIntOverflowApi
|
|
}
|
|
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: GetCookieInfoReply: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: GetCookieInfoReply: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field IsLogin", wireType)
|
|
}
|
|
var v int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowApi
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
v |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
m.IsLogin = bool(v != 0)
|
|
case 2:
|
|
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 ErrIntOverflowApi
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.Mid |= (int64(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 3:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Csrf", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowApi
|
|
}
|
|
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 ErrInvalidLengthApi
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Csrf = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
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 ErrIntOverflowApi
|
|
}
|
|
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 := skipApi(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthApi
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *GetTokenInfoReq) 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 ErrIntOverflowApi
|
|
}
|
|
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: GetTokenInfoReq: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: GetTokenInfoReq: 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 ErrIntOverflowApi
|
|
}
|
|
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 ErrInvalidLengthApi
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Token = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
default:
|
|
iNdEx = preIndex
|
|
skippy, err := skipApi(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthApi
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func (m *GetTokenInfoReply) 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 ErrIntOverflowApi
|
|
}
|
|
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: GetTokenInfoReply: wiretype end group for non-group")
|
|
}
|
|
if fieldNum <= 0 {
|
|
return fmt.Errorf("proto: GetTokenInfoReply: illegal tag %d (wire type %d)", fieldNum, wire)
|
|
}
|
|
switch fieldNum {
|
|
case 1:
|
|
if wireType != 0 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field IsLogin", wireType)
|
|
}
|
|
var v int
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowApi
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
v |= (int(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
m.IsLogin = bool(v != 0)
|
|
case 2:
|
|
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 ErrIntOverflowApi
|
|
}
|
|
if iNdEx >= l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
b := dAtA[iNdEx]
|
|
iNdEx++
|
|
m.Mid |= (int64(b) & 0x7F) << shift
|
|
if b < 0x80 {
|
|
break
|
|
}
|
|
}
|
|
case 3:
|
|
if wireType != 2 {
|
|
return fmt.Errorf("proto: wrong wireType = %d for field Csrf", wireType)
|
|
}
|
|
var stringLen uint64
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return ErrIntOverflowApi
|
|
}
|
|
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 ErrInvalidLengthApi
|
|
}
|
|
postIndex := iNdEx + intStringLen
|
|
if postIndex > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
m.Csrf = string(dAtA[iNdEx:postIndex])
|
|
iNdEx = postIndex
|
|
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 ErrIntOverflowApi
|
|
}
|
|
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 := skipApi(dAtA[iNdEx:])
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if skippy < 0 {
|
|
return ErrInvalidLengthApi
|
|
}
|
|
if (iNdEx + skippy) > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
iNdEx += skippy
|
|
}
|
|
}
|
|
|
|
if iNdEx > l {
|
|
return io.ErrUnexpectedEOF
|
|
}
|
|
return nil
|
|
}
|
|
func skipApi(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, ErrIntOverflowApi
|
|
}
|
|
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, ErrIntOverflowApi
|
|
}
|
|
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, ErrIntOverflowApi
|
|
}
|
|
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, ErrInvalidLengthApi
|
|
}
|
|
return iNdEx, nil
|
|
case 3:
|
|
for {
|
|
var innerWire uint64
|
|
var start int = iNdEx
|
|
for shift := uint(0); ; shift += 7 {
|
|
if shift >= 64 {
|
|
return 0, ErrIntOverflowApi
|
|
}
|
|
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 := skipApi(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 (
|
|
ErrInvalidLengthApi = fmt.Errorf("proto: negative length found during unmarshaling")
|
|
ErrIntOverflowApi = fmt.Errorf("proto: integer overflow")
|
|
)
|
|
|
|
func init() {
|
|
proto.RegisterFile("app/service/main/passport-auth/api/grpc/v1/api.proto", fileDescriptorApi)
|
|
}
|
|
|
|
var fileDescriptorApi = []byte{
|
|
// 372 bytes of a gzipped FileDescriptorProto
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x52, 0xcd, 0x4e, 0xea, 0x40,
|
|
0x18, 0xcd, 0x00, 0x97, 0x9f, 0xb9, 0x90, 0xcb, 0x9d, 0xdc, 0xdc, 0xf4, 0xb2, 0xa0, 0xdc, 0x26,
|
|
0x06, 0x44, 0xe9, 0x04, 0xf5, 0x05, 0xac, 0x0b, 0x62, 0xe2, 0xaa, 0x71, 0xe5, 0xc6, 0x94, 0x3a,
|
|
0x2d, 0x13, 0xa0, 0x33, 0xb6, 0xd3, 0x46, 0x1e, 0x47, 0x9f, 0xc6, 0xa5, 0x5b, 0x37, 0x8d, 0x61,
|
|
0xd9, 0xa7, 0x30, 0x33, 0x50, 0x03, 0x24, 0x1a, 0x96, 0x6e, 0x26, 0xe7, 0x7c, 0x73, 0xce, 0x37,
|
|
0xf9, 0xce, 0x7c, 0xf0, 0xcc, 0xe1, 0x1c, 0x47, 0x24, 0x4c, 0xa8, 0x4b, 0xf0, 0xdc, 0xa1, 0x01,
|
|
0xe6, 0x4e, 0x14, 0x71, 0x16, 0x8a, 0x81, 0x13, 0x8b, 0x09, 0x76, 0x38, 0xc5, 0x7e, 0xc8, 0x5d,
|
|
0x9c, 0x0c, 0x25, 0x36, 0x79, 0xc8, 0x04, 0x43, 0x5a, 0x2e, 0x32, 0xd7, 0x56, 0x53, 0x8a, 0xcd,
|
|
0x64, 0xd8, 0x1a, 0xf8, 0x54, 0x4c, 0xe2, 0xb1, 0xe9, 0xb2, 0x39, 0xf6, 0x99, 0xcf, 0xb0, 0x32,
|
|
0x8c, 0x63, 0x4f, 0x31, 0x45, 0x14, 0x5a, 0x35, 0x32, 0xfa, 0xb0, 0x39, 0x22, 0xe2, 0x82, 0xb1,
|
|
0x29, 0x25, 0x97, 0x81, 0xc7, 0x6c, 0x72, 0x8f, 0xfe, 0xc2, 0xb2, 0xab, 0x0a, 0x1a, 0xe8, 0x80,
|
|
0x5e, 0xcd, 0x5e, 0x33, 0xe3, 0x09, 0x40, 0xb4, 0x23, 0xe6, 0xb3, 0x05, 0xea, 0xc2, 0x2a, 0x8d,
|
|
0x6e, 0x67, 0xcc, 0xa7, 0x81, 0x32, 0x54, 0xad, 0x7a, 0x96, 0xea, 0x1f, 0x35, 0xbb, 0x42, 0xa3,
|
|
0x2b, 0x09, 0xd0, 0x3f, 0x58, 0x9c, 0xd3, 0x3b, 0xad, 0xd0, 0x01, 0xbd, 0xa2, 0x55, 0xc9, 0x52,
|
|
0x5d, 0x52, 0x5b, 0x1e, 0xe8, 0x3f, 0x2c, 0xb9, 0x51, 0xe8, 0x69, 0x45, 0xf9, 0xa0, 0xd5, 0xc8,
|
|
0x52, 0xbd, 0x26, 0xf9, 0x35, 0x9b, 0x92, 0xc0, 0x56, 0x57, 0xe8, 0x00, 0x56, 0xc8, 0x03, 0xa7,
|
|
0x21, 0x89, 0xb4, 0x92, 0xea, 0xf0, 0x33, 0x4b, 0xf5, 0xbc, 0x64, 0xe7, 0xc0, 0xe8, 0xc2, 0x5f,
|
|
0x23, 0x22, 0x94, 0x31, 0x9f, 0xe7, 0x0f, 0xfc, 0x21, 0x24, 0x5f, 0x8f, 0xb3, 0x22, 0xc6, 0x23,
|
|
0x80, 0xbf, 0xb7, 0x95, 0xdf, 0x6e, 0x98, 0x93, 0x57, 0x00, 0x4b, 0xe7, 0xb1, 0x98, 0x20, 0x0a,
|
|
0x1b, 0x5b, 0xc9, 0xa3, 0xbe, 0xf9, 0xd9, 0x06, 0x98, 0xbb, 0xff, 0xd9, 0x3a, 0xde, 0x5b, 0x2b,
|
|
0x13, 0xf0, 0x60, 0x7d, 0x33, 0x16, 0x74, 0xf8, 0xa5, 0x7b, 0x33, 0xe8, 0xd6, 0xd1, 0xbe, 0x52,
|
|
0x3e, 0x5b, 0x58, 0xcd, 0xe7, 0x65, 0x1b, 0xbc, 0x2c, 0xdb, 0xe0, 0x6d, 0xd9, 0x06, 0x37, 0x85,
|
|
0x64, 0x38, 0x2e, 0xab, 0x95, 0x3c, 0x7d, 0x0f, 0x00, 0x00, 0xff, 0xff, 0x2c, 0xe5, 0xd7, 0xb9,
|
|
0x13, 0x03, 0x00, 0x00,
|
|
}
|