master
Bowen 3 years ago
parent 526aa93b2b
commit 34ddc87cbb

@ -32,7 +32,6 @@ type User struct {
UpdatedAt string `protobuf:"bytes,3,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"`
Avatar string `protobuf:"bytes,5,opt,name=avatar,proto3" json:"avatar,omitempty"`
Token string `protobuf:"bytes,6,opt,name=token,proto3" json:"token,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
@ -106,16 +105,8 @@ func (m *User) GetAvatar() string {
return ""
}
func (m *User) GetToken() string {
if m != nil {
return m.Token
}
return ""
}
type UserRequest struct {
Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
UserId uint64 `protobuf:"varint,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
@ -161,13 +152,6 @@ func (m *UserRequest) GetToken() string {
return ""
}
func (m *UserRequest) GetUserId() uint64 {
if m != nil {
return m.UserId
}
return 0
}
type UserResponse struct {
Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
@ -240,26 +224,24 @@ func init() {
func init() { proto.RegisterFile("users.proto", fileDescriptor_030765f334c86cea) }
var fileDescriptor_030765f334c86cea = []byte{
// 289 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x4c, 0x91, 0xc1, 0x4a, 0xc3, 0x40,
0x10, 0x86, 0xbb, 0x75, 0x9b, 0xd2, 0xa9, 0x88, 0x0e, 0xa2, 0x8b, 0x60, 0x28, 0x39, 0xf5, 0xd4,
0x43, 0xbd, 0x7a, 0xa9, 0x17, 0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, 0x15,
0x96, 0xae, 0x78, 0x1f, 0xfb, 0xeb, 0x4d, 0x64, 0x7b, 0x24, 0xbb, 0x2f, 0x0b, 0xc2, 0x35, 0x4c,
0xef, 0xc9, 0xf3, 0x2b, 0x9e, 0x0d, 0x7a, 0x23, 0xf9, 0x15, 0x0e, 0xad, 0x88, 0x93, 0x8d, 0xee,
0x4e, 0xbf, 0xba, 0x54, 0x7c, 0x77, 0xa9, 0xf8, 0xe9, 0x52, 0xf1, 0xf9, 0x9b, 0x8e, 0x5e, 0x12,
0xfe, 0x96, 0x9b, 0xbf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xf8, 0x79, 0x4f, 0x0e, 0xa5, 0x01, 0x00,
0x00,
// 268 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x4c, 0x90, 0xcd, 0x4a, 0xc4, 0x30,
0x10, 0xc7, 0x37, 0x6b, 0xba, 0x4b, 0xa7, 0x22, 0x3a, 0x88, 0x14, 0xc1, 0xb2, 0xd4, 0xcb, 0x9e,
0x7a, 0xa8, 0x4f, 0x50, 0x2f, 0xde, 0x2b, 0xde, 0x04, 0x89, 0xcd, 0x20, 0x45, 0xb6, 0xad, 0x49,
0xba, 0x67, 0x1f, 0xc3, 0x47, 0xf2, 0xe8, 0x23, 0x48, 0x7d, 0x11, 0xc9, 0xa4, 0x0b, 0x7b, 0x9b,
0xff, 0x07, 0xc9, 0x6f, 0x06, 0x92, 0xd1, 0x92, 0xb1, 0xc5, 0x60, 0x7a, 0xd7, 0xa3, 0xf4, 0x22,
0xff, 0x14, 0x20, 0x9f, 0x2c, 0x19, 0x3c, 0x83, 0x65, 0xab, 0x53, 0xb1, 0x11, 0x5b, 0x59, 0x2f,
0x5b, 0x8d, 0x37, 0x00, 0x8d, 0x21, 0xe5, 0x48, 0xbf, 0x28, 0x97, 0x2e, 0x37, 0x62, 0x1b, 0xd7,
0xf1, 0xec, 0x54, 0xce, 0xc7, 0xe3, 0xa0, 0x0f, 0xf1, 0x49, 0x88, 0x67, 0xa7, 0x72, 0x88, 0x20,
0x3b, 0xb5, 0xa3, 0x54, 0x72, 0xc0, 0x33, 0x5e, 0xc1, 0x4a, 0xed, 0x95, 0x53, 0x26, 0x8d, 0xd8,
0x9d, 0x55, 0x7e, 0x0b, 0x89, 0x27, 0xa8, 0xe9, 0x63, 0x24, 0xeb, 0xf0, 0x12, 0x22, 0xd7, 0xbf,
0x53, 0xc7, 0x2c, 0x71, 0x1d, 0x44, 0xfe, 0x0c, 0xa7, 0xa1, 0x64, 0x87, 0xbe, 0xb3, 0xe4, 0x3f,
0x68, 0x7a, 0x4d, 0x5c, 0x8a, 0x6a, 0x9e, 0x31, 0x85, 0xf5, 0x8e, 0xac, 0x55, 0x6f, 0x34, 0xf3,
0x1e, 0x24, 0x66, 0x20, 0xb5, 0x72, 0x8a, 0x39, 0x93, 0x12, 0x0a, 0xbf, 0x7a, 0xc1, 0xef, 0xb1,
0x5f, 0x56, 0x01, 0xe1, 0x91, 0xcc, 0xbe, 0x6d, 0x08, 0x4b, 0x58, 0x3f, 0x90, 0xe3, 0xb3, 0x5c,
0x1c, 0x75, 0x03, 0xe0, 0x35, 0x1e, 0x5b, 0x01, 0x27, 0x5f, 0xdc, 0x9f, 0x7f, 0x4f, 0x99, 0xf8,
0x99, 0x32, 0xf1, 0x3b, 0x65, 0xe2, 0xeb, 0x2f, 0x5b, 0xbc, 0xae, 0xf8, 0xce, 0x77, 0xff, 0x01,
0x00, 0x00, 0xff, 0xff, 0x87, 0x34, 0x3f, 0xe3, 0x76, 0x01, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
@ -366,13 +348,6 @@ func (m *User) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i -= len(m.XXX_unrecognized)
copy(dAtA[i:], m.XXX_unrecognized)
}
if len(m.Token) > 0 {
i -= len(m.Token)
copy(dAtA[i:], m.Token)
i = encodeVarintUsers(dAtA, i, uint64(len(m.Token)))
i--
dAtA[i] = 0x32
}
if len(m.Avatar) > 0 {
i -= len(m.Avatar)
copy(dAtA[i:], m.Avatar)
@ -433,11 +408,6 @@ func (m *UserRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i -= len(m.XXX_unrecognized)
copy(dAtA[i:], m.XXX_unrecognized)
}
if m.UserId != 0 {
i = encodeVarintUsers(dAtA, i, uint64(m.UserId))
i--
dAtA[i] = 0x10
}
if len(m.Token) > 0 {
i -= len(m.Token)
copy(dAtA[i:], m.Token)
@ -535,10 +505,6 @@ func (m *User) Size() (n int) {
if l > 0 {
n += 1 + l + sovUsers(uint64(l))
}
l = len(m.Token)
if l > 0 {
n += 1 + l + sovUsers(uint64(l))
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
@ -555,9 +521,6 @@ func (m *UserRequest) Size() (n int) {
if l > 0 {
n += 1 + l + sovUsers(uint64(l))
}
if m.UserId != 0 {
n += 1 + sovUsers(uint64(m.UserId))
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
@ -769,38 +732,6 @@ func (m *User) Unmarshal(dAtA []byte) error {
}
m.Avatar = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 6:
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 ErrIntOverflowUsers
}
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 ErrInvalidLengthUsers
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthUsers
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Token = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipUsers(dAtA[iNdEx:])
@ -884,25 +815,6 @@ func (m *UserRequest) Unmarshal(dAtA []byte) error {
}
m.Token = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field UserId", wireType)
}
m.UserId = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowUsers
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.UserId |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
default:
iNdEx = preIndex
skippy, err := skipUsers(dAtA[iNdEx:])

@ -8,12 +8,10 @@ message User {
string updated_at = 3;
string name = 4;
string avatar = 5;
string token = 6;
}
message UserRequest {
string token = 1;
uint64 user_id = 2;
}
message UserResponse {

Loading…
Cancel
Save