Documentation ¶
Index ¶
- Variables
- func RegisterUserInfServer(s grpc.ServiceRegistrar, srv UserInfServer)
- type DouyinUserRequest
- func (*DouyinUserRequest) Descriptor() ([]byte, []int)deprecated
- func (x *DouyinUserRequest) GetToken() string
- func (x *DouyinUserRequest) GetUserId() int64
- func (*DouyinUserRequest) ProtoMessage()
- func (x *DouyinUserRequest) ProtoReflect() protoreflect.Message
- func (x *DouyinUserRequest) Reset()
- func (x *DouyinUserRequest) String() string
- type DouyinUserResponse
- func (*DouyinUserResponse) Descriptor() ([]byte, []int)deprecated
- func (x *DouyinUserResponse) GetStatusCode() int32
- func (x *DouyinUserResponse) GetStatusMsg() string
- func (x *DouyinUserResponse) GetUser() *User
- func (*DouyinUserResponse) ProtoMessage()
- func (x *DouyinUserResponse) ProtoReflect() protoreflect.Message
- func (x *DouyinUserResponse) Reset()
- func (x *DouyinUserResponse) String() string
- type UnimplementedUserInfServer
- type UnsafeUserInfServer
- type User
- func (*User) Descriptor() ([]byte, []int)deprecated
- func (x *User) GetFollowCount() int64
- func (x *User) GetFollowerCount() int64
- func (x *User) GetId() int64
- func (x *User) GetIsFollow() bool
- func (x *User) GetName() string
- func (*User) ProtoMessage()
- func (x *User) ProtoReflect() protoreflect.Message
- func (x *User) Reset()
- func (x *User) String() string
- type UserInfClient
- type UserInfServer
Constants ¶
This section is empty.
Variables ¶
var File_user_proto protoreflect.FileDescriptor
var UserInf_ServiceDesc = grpc.ServiceDesc{ ServiceName: "douyin.core.userinf.UserInf", HandlerType: (*UserInfServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetUserinf", Handler: _UserInf_GetUserinf_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "user.proto", }
UserInf_ServiceDesc is the grpc.ServiceDesc for UserInf service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterUserInfServer ¶
func RegisterUserInfServer(s grpc.ServiceRegistrar, srv UserInfServer)
Types ¶
type DouyinUserRequest ¶
type DouyinUserRequest struct { //用户id UserId *int64 `protobuf:"varint,1,req,name=user_id,json=userId" json:"user_id,omitempty"` //用户鉴权token Token *string `protobuf:"bytes,2,req,name=token" json:"token,omitempty"` // contains filtered or unexported fields }
func (*DouyinUserRequest) Descriptor
deprecated
func (*DouyinUserRequest) Descriptor() ([]byte, []int)
Deprecated: Use DouyinUserRequest.ProtoReflect.Descriptor instead.
func (*DouyinUserRequest) GetToken ¶
func (x *DouyinUserRequest) GetToken() string
func (*DouyinUserRequest) GetUserId ¶
func (x *DouyinUserRequest) GetUserId() int64
func (*DouyinUserRequest) ProtoMessage ¶
func (*DouyinUserRequest) ProtoMessage()
func (*DouyinUserRequest) ProtoReflect ¶
func (x *DouyinUserRequest) ProtoReflect() protoreflect.Message
func (*DouyinUserRequest) Reset ¶
func (x *DouyinUserRequest) Reset()
func (*DouyinUserRequest) String ¶
func (x *DouyinUserRequest) String() string
type DouyinUserResponse ¶
type DouyinUserResponse struct { //状态码,0-成功,其他值-失败 StatusCode *int32 `protobuf:"varint,1,req,name=status_code,json=statusCode" json:"status_code,omitempty"` //返回状态描述 StatusMsg *string `protobuf:"bytes,2,opt,name=status_msg,json=statusMsg" json:"status_msg,omitempty"` //用户信息 User *User `protobuf:"bytes,3,req,name=user" json:"user,omitempty"` // contains filtered or unexported fields }
func (*DouyinUserResponse) Descriptor
deprecated
func (*DouyinUserResponse) Descriptor() ([]byte, []int)
Deprecated: Use DouyinUserResponse.ProtoReflect.Descriptor instead.
func (*DouyinUserResponse) GetStatusCode ¶
func (x *DouyinUserResponse) GetStatusCode() int32
func (*DouyinUserResponse) GetStatusMsg ¶
func (x *DouyinUserResponse) GetStatusMsg() string
func (*DouyinUserResponse) GetUser ¶
func (x *DouyinUserResponse) GetUser() *User
func (*DouyinUserResponse) ProtoMessage ¶
func (*DouyinUserResponse) ProtoMessage()
func (*DouyinUserResponse) ProtoReflect ¶
func (x *DouyinUserResponse) ProtoReflect() protoreflect.Message
func (*DouyinUserResponse) Reset ¶
func (x *DouyinUserResponse) Reset()
func (*DouyinUserResponse) String ¶
func (x *DouyinUserResponse) String() string
type UnimplementedUserInfServer ¶
type UnimplementedUserInfServer struct { }
UnimplementedUserInfServer must be embedded to have forward compatible implementations.
func (UnimplementedUserInfServer) GetUserinf ¶
func (UnimplementedUserInfServer) GetUserinf(context.Context, *DouyinUserRequest) (*DouyinUserResponse, error)
type UnsafeUserInfServer ¶
type UnsafeUserInfServer interface {
// contains filtered or unexported methods
}
UnsafeUserInfServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to UserInfServer will result in compilation errors.
type User ¶
type User struct { //用户id Id *int64 `protobuf:"varint,1,req,name=id" json:"id,omitempty"` //用户名称 Name *string `protobuf:"bytes,2,req,name=name" json:"name,omitempty"` //关注总数 FollowCount *int64 `protobuf:"varint,3,opt,name=follow_count,json=followCount" json:"follow_count,omitempty"` //粉丝总数 FollowerCount *int64 `protobuf:"varint,4,opt,name=follower_count,json=followerCount" json:"follower_count,omitempty"` //true-已关注,false-未关注 IsFollow *bool `protobuf:"varint,5,req,name=is_follow,json=isFollow" json:"is_follow,omitempty"` // contains filtered or unexported fields }
func (*User) Descriptor
deprecated
func (*User) GetFollowCount ¶
func (*User) GetFollowerCount ¶
func (*User) GetIsFollow ¶
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
func (*User) ProtoReflect ¶
func (x *User) ProtoReflect() protoreflect.Message
type UserInfClient ¶
type UserInfClient interface {
GetUserinf(ctx context.Context, in *DouyinUserRequest, opts ...grpc.CallOption) (*DouyinUserResponse, error)
}
UserInfClient is the client API for UserInf service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.golang.ir/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewUserInfClient ¶
func NewUserInfClient(cc grpc.ClientConnInterface) UserInfClient
type UserInfServer ¶
type UserInfServer interface { GetUserinf(context.Context, *DouyinUserRequest) (*DouyinUserResponse, error) // contains filtered or unexported methods }
UserInfServer is the server API for UserInf service. All implementations must embed UnimplementedUserInfServer for forward compatibility