Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterUserServiceHTTPServer(s *http.Server, srv UserServiceHTTPServer)
- func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer)
- type UnimplementedUserServiceServer
- func (UnimplementedUserServiceServer) GetUserInfo(context.Context, *UserInfoRequest) (*UserInfoReply, error)
- func (UnimplementedUserServiceServer) GetUserInfos(context.Context, *UserInfosRequest) (*UserInfosReply, error)
- func (UnimplementedUserServiceServer) UserLogin(context.Context, *UserLoginRequest) (*UserLoginReply, error)
- func (UnimplementedUserServiceServer) UserRegister(context.Context, *UserRegisterRequest) (*UserRegisterReply, error)
- type UnsafeUserServiceServer
- type User
- func (*User) Descriptor() ([]byte, []int)deprecated
- func (x *User) GetAvatar() string
- func (x *User) GetBackgroundImage() string
- func (x *User) GetFavoriteCount() uint32
- func (x *User) GetFollowCount() uint32
- func (x *User) GetFollowerCount() uint32
- func (x *User) GetId() uint32
- func (x *User) GetIsFollow() bool
- func (x *User) GetName() string
- func (x *User) GetSignature() string
- func (x *User) GetTotalFavorited() uint32
- func (x *User) GetWorkCount() uint32
- func (*User) ProtoMessage()
- func (x *User) ProtoReflect() protoreflect.Message
- func (x *User) Reset()
- func (x *User) String() string
- func (m *User) Validate() error
- func (m *User) ValidateAll() error
- type UserInfoReply
- func (*UserInfoReply) Descriptor() ([]byte, []int)deprecated
- func (x *UserInfoReply) GetStatusCode() int32
- func (x *UserInfoReply) GetStatusMsg() string
- func (x *UserInfoReply) GetUser() *User
- func (*UserInfoReply) ProtoMessage()
- func (x *UserInfoReply) ProtoReflect() protoreflect.Message
- func (x *UserInfoReply) Reset()
- func (x *UserInfoReply) String() string
- func (m *UserInfoReply) Validate() error
- func (m *UserInfoReply) ValidateAll() error
- type UserInfoReplyMultiError
- type UserInfoReplyValidationError
- func (e UserInfoReplyValidationError) Cause() error
- func (e UserInfoReplyValidationError) Error() string
- func (e UserInfoReplyValidationError) ErrorName() string
- func (e UserInfoReplyValidationError) Field() string
- func (e UserInfoReplyValidationError) Key() bool
- func (e UserInfoReplyValidationError) Reason() string
- type UserInfoRequest
- func (*UserInfoRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UserInfoRequest) GetToken() string
- func (x *UserInfoRequest) GetUserId() uint32
- func (*UserInfoRequest) ProtoMessage()
- func (x *UserInfoRequest) ProtoReflect() protoreflect.Message
- func (x *UserInfoRequest) Reset()
- func (x *UserInfoRequest) String() string
- func (m *UserInfoRequest) Validate() error
- func (m *UserInfoRequest) ValidateAll() error
- type UserInfoRequestMultiError
- type UserInfoRequestValidationError
- func (e UserInfoRequestValidationError) Cause() error
- func (e UserInfoRequestValidationError) Error() string
- func (e UserInfoRequestValidationError) ErrorName() string
- func (e UserInfoRequestValidationError) Field() string
- func (e UserInfoRequestValidationError) Key() bool
- func (e UserInfoRequestValidationError) Reason() string
- type UserInfosReply
- func (*UserInfosReply) Descriptor() ([]byte, []int)deprecated
- func (x *UserInfosReply) GetUsers() []*User
- func (*UserInfosReply) ProtoMessage()
- func (x *UserInfosReply) ProtoReflect() protoreflect.Message
- func (x *UserInfosReply) Reset()
- func (x *UserInfosReply) String() string
- func (m *UserInfosReply) Validate() error
- func (m *UserInfosReply) ValidateAll() error
- type UserInfosReplyMultiError
- type UserInfosReplyValidationError
- func (e UserInfosReplyValidationError) Cause() error
- func (e UserInfosReplyValidationError) Error() string
- func (e UserInfosReplyValidationError) ErrorName() string
- func (e UserInfosReplyValidationError) Field() string
- func (e UserInfosReplyValidationError) Key() bool
- func (e UserInfosReplyValidationError) Reason() string
- type UserInfosRequest
- func (*UserInfosRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UserInfosRequest) GetUserId() uint32
- func (x *UserInfosRequest) GetUserIds() []uint32
- func (*UserInfosRequest) ProtoMessage()
- func (x *UserInfosRequest) ProtoReflect() protoreflect.Message
- func (x *UserInfosRequest) Reset()
- func (x *UserInfosRequest) String() string
- func (m *UserInfosRequest) Validate() error
- func (m *UserInfosRequest) ValidateAll() error
- type UserInfosRequestMultiError
- type UserInfosRequestValidationError
- func (e UserInfosRequestValidationError) Cause() error
- func (e UserInfosRequestValidationError) Error() string
- func (e UserInfosRequestValidationError) ErrorName() string
- func (e UserInfosRequestValidationError) Field() string
- func (e UserInfosRequestValidationError) Key() bool
- func (e UserInfosRequestValidationError) Reason() string
- type UserLoginReply
- func (*UserLoginReply) Descriptor() ([]byte, []int)deprecated
- func (x *UserLoginReply) GetStatusCode() int32
- func (x *UserLoginReply) GetStatusMsg() string
- func (x *UserLoginReply) GetToken() string
- func (x *UserLoginReply) GetUserId() uint32
- func (*UserLoginReply) ProtoMessage()
- func (x *UserLoginReply) ProtoReflect() protoreflect.Message
- func (x *UserLoginReply) Reset()
- func (x *UserLoginReply) String() string
- func (m *UserLoginReply) Validate() error
- func (m *UserLoginReply) ValidateAll() error
- type UserLoginReplyMultiError
- type UserLoginReplyValidationError
- func (e UserLoginReplyValidationError) Cause() error
- func (e UserLoginReplyValidationError) Error() string
- func (e UserLoginReplyValidationError) ErrorName() string
- func (e UserLoginReplyValidationError) Field() string
- func (e UserLoginReplyValidationError) Key() bool
- func (e UserLoginReplyValidationError) Reason() string
- type UserLoginRequest
- func (*UserLoginRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UserLoginRequest) GetPassword() string
- func (x *UserLoginRequest) GetUsername() string
- func (*UserLoginRequest) ProtoMessage()
- func (x *UserLoginRequest) ProtoReflect() protoreflect.Message
- func (x *UserLoginRequest) Reset()
- func (x *UserLoginRequest) String() string
- func (m *UserLoginRequest) Validate() error
- func (m *UserLoginRequest) ValidateAll() error
- type UserLoginRequestMultiError
- type UserLoginRequestValidationError
- func (e UserLoginRequestValidationError) Cause() error
- func (e UserLoginRequestValidationError) Error() string
- func (e UserLoginRequestValidationError) ErrorName() string
- func (e UserLoginRequestValidationError) Field() string
- func (e UserLoginRequestValidationError) Key() bool
- func (e UserLoginRequestValidationError) Reason() string
- type UserMultiError
- type UserRegisterReply
- func (*UserRegisterReply) Descriptor() ([]byte, []int)deprecated
- func (x *UserRegisterReply) GetStatusCode() int32
- func (x *UserRegisterReply) GetStatusMsg() string
- func (x *UserRegisterReply) GetToken() string
- func (x *UserRegisterReply) GetUserId() uint32
- func (*UserRegisterReply) ProtoMessage()
- func (x *UserRegisterReply) ProtoReflect() protoreflect.Message
- func (x *UserRegisterReply) Reset()
- func (x *UserRegisterReply) String() string
- func (m *UserRegisterReply) Validate() error
- func (m *UserRegisterReply) ValidateAll() error
- type UserRegisterReplyMultiError
- type UserRegisterReplyValidationError
- func (e UserRegisterReplyValidationError) Cause() error
- func (e UserRegisterReplyValidationError) Error() string
- func (e UserRegisterReplyValidationError) ErrorName() string
- func (e UserRegisterReplyValidationError) Field() string
- func (e UserRegisterReplyValidationError) Key() bool
- func (e UserRegisterReplyValidationError) Reason() string
- type UserRegisterRequest
- func (*UserRegisterRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UserRegisterRequest) GetPassword() string
- func (x *UserRegisterRequest) GetUsername() string
- func (*UserRegisterRequest) ProtoMessage()
- func (x *UserRegisterRequest) ProtoReflect() protoreflect.Message
- func (x *UserRegisterRequest) Reset()
- func (x *UserRegisterRequest) String() string
- func (m *UserRegisterRequest) Validate() error
- func (m *UserRegisterRequest) ValidateAll() error
- type UserRegisterRequestMultiError
- type UserRegisterRequestValidationError
- func (e UserRegisterRequestValidationError) Cause() error
- func (e UserRegisterRequestValidationError) Error() string
- func (e UserRegisterRequestValidationError) ErrorName() string
- func (e UserRegisterRequestValidationError) Field() string
- func (e UserRegisterRequestValidationError) Key() bool
- func (e UserRegisterRequestValidationError) Reason() string
- type UserServiceClient
- type UserServiceHTTPClient
- type UserServiceHTTPClientImpl
- func (c *UserServiceHTTPClientImpl) GetUserInfo(ctx context.Context, in *UserInfoRequest, opts ...http.CallOption) (*UserInfoReply, error)
- func (c *UserServiceHTTPClientImpl) UserLogin(ctx context.Context, in *UserLoginRequest, opts ...http.CallOption) (*UserLoginReply, error)
- func (c *UserServiceHTTPClientImpl) UserRegister(ctx context.Context, in *UserRegisterRequest, opts ...http.CallOption) (*UserRegisterReply, error)
- type UserServiceHTTPServer
- type UserServiceServer
- type UserValidationError
Constants ¶
const ( UserService_UserRegister_FullMethodName = "/user.service.v1.UserService/UserRegister" UserService_UserLogin_FullMethodName = "/user.service.v1.UserService/UserLogin" UserService_GetUserInfo_FullMethodName = "/user.service.v1.UserService/GetUserInfo" UserService_GetUserInfos_FullMethodName = "/user.service.v1.UserService/GetUserInfos" )
const OperationUserServiceGetUserInfo = "/user.service.v1.UserService/GetUserInfo"
const OperationUserServiceUserLogin = "/user.service.v1.UserService/UserLogin"
const OperationUserServiceUserRegister = "/user.service.v1.UserService/UserRegister"
Variables ¶
var File_user_service_v1_user_proto protoreflect.FileDescriptor
var UserService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "user.service.v1.UserService", HandlerType: (*UserServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "UserRegister", Handler: _UserService_UserRegister_Handler, }, { MethodName: "UserLogin", Handler: _UserService_UserLogin_Handler, }, { MethodName: "GetUserInfo", Handler: _UserService_GetUserInfo_Handler, }, { MethodName: "GetUserInfos", Handler: _UserService_GetUserInfos_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "user/service/v1/user.proto", }
UserService_ServiceDesc is the grpc.ServiceDesc for UserService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterUserServiceHTTPServer ¶
func RegisterUserServiceHTTPServer(s *http.Server, srv UserServiceHTTPServer)
func RegisterUserServiceServer ¶
func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer)
Types ¶
type UnimplementedUserServiceServer ¶
type UnimplementedUserServiceServer struct { }
UnimplementedUserServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedUserServiceServer) GetUserInfo ¶
func (UnimplementedUserServiceServer) GetUserInfo(context.Context, *UserInfoRequest) (*UserInfoReply, error)
func (UnimplementedUserServiceServer) GetUserInfos ¶
func (UnimplementedUserServiceServer) GetUserInfos(context.Context, *UserInfosRequest) (*UserInfosReply, error)
func (UnimplementedUserServiceServer) UserLogin ¶
func (UnimplementedUserServiceServer) UserLogin(context.Context, *UserLoginRequest) (*UserLoginReply, error)
func (UnimplementedUserServiceServer) UserRegister ¶
func (UnimplementedUserServiceServer) UserRegister(context.Context, *UserRegisterRequest) (*UserRegisterReply, error)
type UnsafeUserServiceServer ¶
type UnsafeUserServiceServer interface {
// contains filtered or unexported methods
}
UnsafeUserServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to UserServiceServer will result in compilation errors.
type User ¶
type User struct { // 用户id Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // 用户名称 Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // 关注总数 FollowCount uint32 `protobuf:"varint,3,opt,name=follow_count,proto3" json:"follow_count,omitempty"` // 粉丝总数 FollowerCount uint32 `protobuf:"varint,4,opt,name=follower_count,proto3" json:"follower_count,omitempty"` // true-已关注,false-未关注 IsFollow bool `protobuf:"varint,5,opt,name=is_follow,proto3" json:"is_follow,omitempty"` // 用户头像 Avatar string `protobuf:"bytes,6,opt,name=avatar,proto3" json:"avatar,omitempty"` // 用户个人页顶部大图 BackgroundImage string `protobuf:"bytes,7,opt,name=background_image,proto3" json:"background_image,omitempty"` // 个人简介 Signature string `protobuf:"bytes,8,opt,name=signature,proto3" json:"signature,omitempty"` // 获赞数量 TotalFavorited uint32 `protobuf:"varint,9,opt,name=total_favorited,proto3" json:"total_favorited,omitempty"` // 作品数量 WorkCount uint32 `protobuf:"varint,10,opt,name=work_count,proto3" json:"work_count,omitempty"` // 点赞数量 FavoriteCount uint32 `protobuf:"varint,11,opt,name=favorite_count,proto3" json:"favorite_count,omitempty"` // contains filtered or unexported fields }
用户信息
func (*User) Descriptor
deprecated
func (*User) GetBackgroundImage ¶
func (*User) GetFavoriteCount ¶
func (*User) GetFollowCount ¶
func (*User) GetFollowerCount ¶
func (*User) GetIsFollow ¶
func (*User) GetSignature ¶
func (*User) GetTotalFavorited ¶
func (*User) GetWorkCount ¶
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
func (*User) ProtoReflect ¶
func (x *User) ProtoReflect() protoreflect.Message
func (*User) Validate ¶
Validate checks the field values on User with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*User) ValidateAll ¶
ValidateAll checks the field values on User with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in UserMultiError, or nil if none found.
type UserInfoReply ¶
type UserInfoReply struct { // 状态码,0-成功,其他值-失败 StatusCode int32 `protobuf:"varint,1,opt,name=status_code,proto3" json:"status_code,omitempty"` // 返回状态描述 StatusMsg string `protobuf:"bytes,2,opt,name=status_msg,proto3" json:"status_msg,omitempty"` // 用户信息 User *User `protobuf:"bytes,3,opt,name=user,proto3" json:"user,omitempty"` // contains filtered or unexported fields }
func (*UserInfoReply) Descriptor
deprecated
func (*UserInfoReply) Descriptor() ([]byte, []int)
Deprecated: Use UserInfoReply.ProtoReflect.Descriptor instead.
func (*UserInfoReply) GetStatusCode ¶
func (x *UserInfoReply) GetStatusCode() int32
func (*UserInfoReply) GetStatusMsg ¶
func (x *UserInfoReply) GetStatusMsg() string
func (*UserInfoReply) GetUser ¶
func (x *UserInfoReply) GetUser() *User
func (*UserInfoReply) ProtoMessage ¶
func (*UserInfoReply) ProtoMessage()
func (*UserInfoReply) ProtoReflect ¶
func (x *UserInfoReply) ProtoReflect() protoreflect.Message
func (*UserInfoReply) Reset ¶
func (x *UserInfoReply) Reset()
func (*UserInfoReply) String ¶
func (x *UserInfoReply) String() string
func (*UserInfoReply) Validate ¶
func (m *UserInfoReply) Validate() error
Validate checks the field values on UserInfoReply with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*UserInfoReply) ValidateAll ¶
func (m *UserInfoReply) ValidateAll() error
ValidateAll checks the field values on UserInfoReply with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in UserInfoReplyMultiError, or nil if none found.
type UserInfoReplyMultiError ¶
type UserInfoReplyMultiError []error
UserInfoReplyMultiError is an error wrapping multiple validation errors returned by UserInfoReply.ValidateAll() if the designated constraints aren't met.
func (UserInfoReplyMultiError) AllErrors ¶
func (m UserInfoReplyMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (UserInfoReplyMultiError) Error ¶
func (m UserInfoReplyMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type UserInfoReplyValidationError ¶
type UserInfoReplyValidationError struct {
// contains filtered or unexported fields
}
UserInfoReplyValidationError is the validation error returned by UserInfoReply.Validate if the designated constraints aren't met.
func (UserInfoReplyValidationError) Cause ¶
func (e UserInfoReplyValidationError) Cause() error
Cause function returns cause value.
func (UserInfoReplyValidationError) Error ¶
func (e UserInfoReplyValidationError) Error() string
Error satisfies the builtin error interface
func (UserInfoReplyValidationError) ErrorName ¶
func (e UserInfoReplyValidationError) ErrorName() string
ErrorName returns error name.
func (UserInfoReplyValidationError) Field ¶
func (e UserInfoReplyValidationError) Field() string
Field function returns field value.
func (UserInfoReplyValidationError) Key ¶
func (e UserInfoReplyValidationError) Key() bool
Key function returns key value.
func (UserInfoReplyValidationError) Reason ¶
func (e UserInfoReplyValidationError) Reason() string
Reason function returns reason value.
type UserInfoRequest ¶
type UserInfoRequest struct { // 用户id UserId uint32 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` // 用户鉴权token Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"` // contains filtered or unexported fields }
func (*UserInfoRequest) Descriptor
deprecated
func (*UserInfoRequest) Descriptor() ([]byte, []int)
Deprecated: Use UserInfoRequest.ProtoReflect.Descriptor instead.
func (*UserInfoRequest) GetToken ¶
func (x *UserInfoRequest) GetToken() string
func (*UserInfoRequest) GetUserId ¶
func (x *UserInfoRequest) GetUserId() uint32
func (*UserInfoRequest) ProtoMessage ¶
func (*UserInfoRequest) ProtoMessage()
func (*UserInfoRequest) ProtoReflect ¶
func (x *UserInfoRequest) ProtoReflect() protoreflect.Message
func (*UserInfoRequest) Reset ¶
func (x *UserInfoRequest) Reset()
func (*UserInfoRequest) String ¶
func (x *UserInfoRequest) String() string
func (*UserInfoRequest) Validate ¶
func (m *UserInfoRequest) Validate() error
Validate checks the field values on UserInfoRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*UserInfoRequest) ValidateAll ¶
func (m *UserInfoRequest) ValidateAll() error
ValidateAll checks the field values on UserInfoRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in UserInfoRequestMultiError, or nil if none found.
type UserInfoRequestMultiError ¶
type UserInfoRequestMultiError []error
UserInfoRequestMultiError is an error wrapping multiple validation errors returned by UserInfoRequest.ValidateAll() if the designated constraints aren't met.
func (UserInfoRequestMultiError) AllErrors ¶
func (m UserInfoRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (UserInfoRequestMultiError) Error ¶
func (m UserInfoRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type UserInfoRequestValidationError ¶
type UserInfoRequestValidationError struct {
// contains filtered or unexported fields
}
UserInfoRequestValidationError is the validation error returned by UserInfoRequest.Validate if the designated constraints aren't met.
func (UserInfoRequestValidationError) Cause ¶
func (e UserInfoRequestValidationError) Cause() error
Cause function returns cause value.
func (UserInfoRequestValidationError) Error ¶
func (e UserInfoRequestValidationError) Error() string
Error satisfies the builtin error interface
func (UserInfoRequestValidationError) ErrorName ¶
func (e UserInfoRequestValidationError) ErrorName() string
ErrorName returns error name.
func (UserInfoRequestValidationError) Field ¶
func (e UserInfoRequestValidationError) Field() string
Field function returns field value.
func (UserInfoRequestValidationError) Key ¶
func (e UserInfoRequestValidationError) Key() bool
Key function returns key value.
func (UserInfoRequestValidationError) Reason ¶
func (e UserInfoRequestValidationError) Reason() string
Reason function returns reason value.
type UserInfosReply ¶
type UserInfosReply struct { // 用户信息列表 Users []*User `protobuf:"bytes,1,rep,name=users,proto3" json:"users,omitempty"` // contains filtered or unexported fields }
func (*UserInfosReply) Descriptor
deprecated
func (*UserInfosReply) Descriptor() ([]byte, []int)
Deprecated: Use UserInfosReply.ProtoReflect.Descriptor instead.
func (*UserInfosReply) GetUsers ¶
func (x *UserInfosReply) GetUsers() []*User
func (*UserInfosReply) ProtoMessage ¶
func (*UserInfosReply) ProtoMessage()
func (*UserInfosReply) ProtoReflect ¶
func (x *UserInfosReply) ProtoReflect() protoreflect.Message
func (*UserInfosReply) Reset ¶
func (x *UserInfosReply) Reset()
func (*UserInfosReply) String ¶
func (x *UserInfosReply) String() string
func (*UserInfosReply) Validate ¶
func (m *UserInfosReply) Validate() error
Validate checks the field values on UserInfosReply with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*UserInfosReply) ValidateAll ¶
func (m *UserInfosReply) ValidateAll() error
ValidateAll checks the field values on UserInfosReply with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in UserInfosReplyMultiError, or nil if none found.
type UserInfosReplyMultiError ¶
type UserInfosReplyMultiError []error
UserInfosReplyMultiError is an error wrapping multiple validation errors returned by UserInfosReply.ValidateAll() if the designated constraints aren't met.
func (UserInfosReplyMultiError) AllErrors ¶
func (m UserInfosReplyMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (UserInfosReplyMultiError) Error ¶
func (m UserInfosReplyMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type UserInfosReplyValidationError ¶
type UserInfosReplyValidationError struct {
// contains filtered or unexported fields
}
UserInfosReplyValidationError is the validation error returned by UserInfosReply.Validate if the designated constraints aren't met.
func (UserInfosReplyValidationError) Cause ¶
func (e UserInfosReplyValidationError) Cause() error
Cause function returns cause value.
func (UserInfosReplyValidationError) Error ¶
func (e UserInfosReplyValidationError) Error() string
Error satisfies the builtin error interface
func (UserInfosReplyValidationError) ErrorName ¶
func (e UserInfosReplyValidationError) ErrorName() string
ErrorName returns error name.
func (UserInfosReplyValidationError) Field ¶
func (e UserInfosReplyValidationError) Field() string
Field function returns field value.
func (UserInfosReplyValidationError) Key ¶
func (e UserInfosReplyValidationError) Key() bool
Key function returns key value.
func (UserInfosReplyValidationError) Reason ¶
func (e UserInfosReplyValidationError) Reason() string
Reason function returns reason value.
type UserInfosRequest ¶
type UserInfosRequest struct { // 登陆用户id UserId uint32 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` // 用户id列表 UserIds []uint32 `protobuf:"varint,2,rep,packed,name=user_ids,json=userIds,proto3" json:"user_ids,omitempty"` // contains filtered or unexported fields }
func (*UserInfosRequest) Descriptor
deprecated
func (*UserInfosRequest) Descriptor() ([]byte, []int)
Deprecated: Use UserInfosRequest.ProtoReflect.Descriptor instead.
func (*UserInfosRequest) GetUserId ¶
func (x *UserInfosRequest) GetUserId() uint32
func (*UserInfosRequest) GetUserIds ¶
func (x *UserInfosRequest) GetUserIds() []uint32
func (*UserInfosRequest) ProtoMessage ¶
func (*UserInfosRequest) ProtoMessage()
func (*UserInfosRequest) ProtoReflect ¶
func (x *UserInfosRequest) ProtoReflect() protoreflect.Message
func (*UserInfosRequest) Reset ¶
func (x *UserInfosRequest) Reset()
func (*UserInfosRequest) String ¶
func (x *UserInfosRequest) String() string
func (*UserInfosRequest) Validate ¶
func (m *UserInfosRequest) Validate() error
Validate checks the field values on UserInfosRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*UserInfosRequest) ValidateAll ¶
func (m *UserInfosRequest) ValidateAll() error
ValidateAll checks the field values on UserInfosRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in UserInfosRequestMultiError, or nil if none found.
type UserInfosRequestMultiError ¶
type UserInfosRequestMultiError []error
UserInfosRequestMultiError is an error wrapping multiple validation errors returned by UserInfosRequest.ValidateAll() if the designated constraints aren't met.
func (UserInfosRequestMultiError) AllErrors ¶
func (m UserInfosRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (UserInfosRequestMultiError) Error ¶
func (m UserInfosRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type UserInfosRequestValidationError ¶
type UserInfosRequestValidationError struct {
// contains filtered or unexported fields
}
UserInfosRequestValidationError is the validation error returned by UserInfosRequest.Validate if the designated constraints aren't met.
func (UserInfosRequestValidationError) Cause ¶
func (e UserInfosRequestValidationError) Cause() error
Cause function returns cause value.
func (UserInfosRequestValidationError) Error ¶
func (e UserInfosRequestValidationError) Error() string
Error satisfies the builtin error interface
func (UserInfosRequestValidationError) ErrorName ¶
func (e UserInfosRequestValidationError) ErrorName() string
ErrorName returns error name.
func (UserInfosRequestValidationError) Field ¶
func (e UserInfosRequestValidationError) Field() string
Field function returns field value.
func (UserInfosRequestValidationError) Key ¶
func (e UserInfosRequestValidationError) Key() bool
Key function returns key value.
func (UserInfosRequestValidationError) Reason ¶
func (e UserInfosRequestValidationError) Reason() string
Reason function returns reason value.
type UserLoginReply ¶
type UserLoginReply struct { // 状态码,0-成功,其他值-失败 StatusCode int32 `protobuf:"varint,1,opt,name=status_code,proto3" json:"status_code,omitempty"` // 返回状态描述 StatusMsg string `protobuf:"bytes,2,opt,name=status_msg,proto3" json:"status_msg,omitempty"` // 用户id UserId uint32 `protobuf:"varint,3,opt,name=user_id,proto3" json:"user_id,omitempty"` // 用户鉴权token Token string `protobuf:"bytes,4,opt,name=token,proto3" json:"token,omitempty"` // contains filtered or unexported fields }
func (*UserLoginReply) Descriptor
deprecated
func (*UserLoginReply) Descriptor() ([]byte, []int)
Deprecated: Use UserLoginReply.ProtoReflect.Descriptor instead.
func (*UserLoginReply) GetStatusCode ¶
func (x *UserLoginReply) GetStatusCode() int32
func (*UserLoginReply) GetStatusMsg ¶
func (x *UserLoginReply) GetStatusMsg() string
func (*UserLoginReply) GetToken ¶
func (x *UserLoginReply) GetToken() string
func (*UserLoginReply) GetUserId ¶
func (x *UserLoginReply) GetUserId() uint32
func (*UserLoginReply) ProtoMessage ¶
func (*UserLoginReply) ProtoMessage()
func (*UserLoginReply) ProtoReflect ¶
func (x *UserLoginReply) ProtoReflect() protoreflect.Message
func (*UserLoginReply) Reset ¶
func (x *UserLoginReply) Reset()
func (*UserLoginReply) String ¶
func (x *UserLoginReply) String() string
func (*UserLoginReply) Validate ¶
func (m *UserLoginReply) Validate() error
Validate checks the field values on UserLoginReply with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*UserLoginReply) ValidateAll ¶
func (m *UserLoginReply) ValidateAll() error
ValidateAll checks the field values on UserLoginReply with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in UserLoginReplyMultiError, or nil if none found.
type UserLoginReplyMultiError ¶
type UserLoginReplyMultiError []error
UserLoginReplyMultiError is an error wrapping multiple validation errors returned by UserLoginReply.ValidateAll() if the designated constraints aren't met.
func (UserLoginReplyMultiError) AllErrors ¶
func (m UserLoginReplyMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (UserLoginReplyMultiError) Error ¶
func (m UserLoginReplyMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type UserLoginReplyValidationError ¶
type UserLoginReplyValidationError struct {
// contains filtered or unexported fields
}
UserLoginReplyValidationError is the validation error returned by UserLoginReply.Validate if the designated constraints aren't met.
func (UserLoginReplyValidationError) Cause ¶
func (e UserLoginReplyValidationError) Cause() error
Cause function returns cause value.
func (UserLoginReplyValidationError) Error ¶
func (e UserLoginReplyValidationError) Error() string
Error satisfies the builtin error interface
func (UserLoginReplyValidationError) ErrorName ¶
func (e UserLoginReplyValidationError) ErrorName() string
ErrorName returns error name.
func (UserLoginReplyValidationError) Field ¶
func (e UserLoginReplyValidationError) Field() string
Field function returns field value.
func (UserLoginReplyValidationError) Key ¶
func (e UserLoginReplyValidationError) Key() bool
Key function returns key value.
func (UserLoginReplyValidationError) Reason ¶
func (e UserLoginReplyValidationError) Reason() string
Reason function returns reason value.
type UserLoginRequest ¶
type UserLoginRequest struct { // 登录用户名 Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` // 登录密码 Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` // contains filtered or unexported fields }
func (*UserLoginRequest) Descriptor
deprecated
func (*UserLoginRequest) Descriptor() ([]byte, []int)
Deprecated: Use UserLoginRequest.ProtoReflect.Descriptor instead.
func (*UserLoginRequest) GetPassword ¶
func (x *UserLoginRequest) GetPassword() string
func (*UserLoginRequest) GetUsername ¶
func (x *UserLoginRequest) GetUsername() string
func (*UserLoginRequest) ProtoMessage ¶
func (*UserLoginRequest) ProtoMessage()
func (*UserLoginRequest) ProtoReflect ¶
func (x *UserLoginRequest) ProtoReflect() protoreflect.Message
func (*UserLoginRequest) Reset ¶
func (x *UserLoginRequest) Reset()
func (*UserLoginRequest) String ¶
func (x *UserLoginRequest) String() string
func (*UserLoginRequest) Validate ¶
func (m *UserLoginRequest) Validate() error
Validate checks the field values on UserLoginRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*UserLoginRequest) ValidateAll ¶
func (m *UserLoginRequest) ValidateAll() error
ValidateAll checks the field values on UserLoginRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in UserLoginRequestMultiError, or nil if none found.
type UserLoginRequestMultiError ¶
type UserLoginRequestMultiError []error
UserLoginRequestMultiError is an error wrapping multiple validation errors returned by UserLoginRequest.ValidateAll() if the designated constraints aren't met.
func (UserLoginRequestMultiError) AllErrors ¶
func (m UserLoginRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (UserLoginRequestMultiError) Error ¶
func (m UserLoginRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type UserLoginRequestValidationError ¶
type UserLoginRequestValidationError struct {
// contains filtered or unexported fields
}
UserLoginRequestValidationError is the validation error returned by UserLoginRequest.Validate if the designated constraints aren't met.
func (UserLoginRequestValidationError) Cause ¶
func (e UserLoginRequestValidationError) Cause() error
Cause function returns cause value.
func (UserLoginRequestValidationError) Error ¶
func (e UserLoginRequestValidationError) Error() string
Error satisfies the builtin error interface
func (UserLoginRequestValidationError) ErrorName ¶
func (e UserLoginRequestValidationError) ErrorName() string
ErrorName returns error name.
func (UserLoginRequestValidationError) Field ¶
func (e UserLoginRequestValidationError) Field() string
Field function returns field value.
func (UserLoginRequestValidationError) Key ¶
func (e UserLoginRequestValidationError) Key() bool
Key function returns key value.
func (UserLoginRequestValidationError) Reason ¶
func (e UserLoginRequestValidationError) Reason() string
Reason function returns reason value.
type UserMultiError ¶
type UserMultiError []error
UserMultiError is an error wrapping multiple validation errors returned by User.ValidateAll() if the designated constraints aren't met.
func (UserMultiError) AllErrors ¶
func (m UserMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (UserMultiError) Error ¶
func (m UserMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type UserRegisterReply ¶
type UserRegisterReply struct { // 状态码,0-成功,其他值-失败 StatusCode int32 `protobuf:"varint,1,opt,name=status_code,proto3" json:"status_code,omitempty"` // 返回状态描述 StatusMsg string `protobuf:"bytes,2,opt,name=status_msg,proto3" json:"status_msg,omitempty"` // 用户id UserId uint32 `protobuf:"varint,3,opt,name=user_id,proto3" json:"user_id,omitempty"` // 用户鉴权token Token string `protobuf:"bytes,4,opt,name=token,proto3" json:"token,omitempty"` // contains filtered or unexported fields }
func (*UserRegisterReply) Descriptor
deprecated
func (*UserRegisterReply) Descriptor() ([]byte, []int)
Deprecated: Use UserRegisterReply.ProtoReflect.Descriptor instead.
func (*UserRegisterReply) GetStatusCode ¶
func (x *UserRegisterReply) GetStatusCode() int32
func (*UserRegisterReply) GetStatusMsg ¶
func (x *UserRegisterReply) GetStatusMsg() string
func (*UserRegisterReply) GetToken ¶
func (x *UserRegisterReply) GetToken() string
func (*UserRegisterReply) GetUserId ¶
func (x *UserRegisterReply) GetUserId() uint32
func (*UserRegisterReply) ProtoMessage ¶
func (*UserRegisterReply) ProtoMessage()
func (*UserRegisterReply) ProtoReflect ¶
func (x *UserRegisterReply) ProtoReflect() protoreflect.Message
func (*UserRegisterReply) Reset ¶
func (x *UserRegisterReply) Reset()
func (*UserRegisterReply) String ¶
func (x *UserRegisterReply) String() string
func (*UserRegisterReply) Validate ¶
func (m *UserRegisterReply) Validate() error
Validate checks the field values on UserRegisterReply with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*UserRegisterReply) ValidateAll ¶
func (m *UserRegisterReply) ValidateAll() error
ValidateAll checks the field values on UserRegisterReply with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in UserRegisterReplyMultiError, or nil if none found.
type UserRegisterReplyMultiError ¶
type UserRegisterReplyMultiError []error
UserRegisterReplyMultiError is an error wrapping multiple validation errors returned by UserRegisterReply.ValidateAll() if the designated constraints aren't met.
func (UserRegisterReplyMultiError) AllErrors ¶
func (m UserRegisterReplyMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (UserRegisterReplyMultiError) Error ¶
func (m UserRegisterReplyMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type UserRegisterReplyValidationError ¶
type UserRegisterReplyValidationError struct {
// contains filtered or unexported fields
}
UserRegisterReplyValidationError is the validation error returned by UserRegisterReply.Validate if the designated constraints aren't met.
func (UserRegisterReplyValidationError) Cause ¶
func (e UserRegisterReplyValidationError) Cause() error
Cause function returns cause value.
func (UserRegisterReplyValidationError) Error ¶
func (e UserRegisterReplyValidationError) Error() string
Error satisfies the builtin error interface
func (UserRegisterReplyValidationError) ErrorName ¶
func (e UserRegisterReplyValidationError) ErrorName() string
ErrorName returns error name.
func (UserRegisterReplyValidationError) Field ¶
func (e UserRegisterReplyValidationError) Field() string
Field function returns field value.
func (UserRegisterReplyValidationError) Key ¶
func (e UserRegisterReplyValidationError) Key() bool
Key function returns key value.
func (UserRegisterReplyValidationError) Reason ¶
func (e UserRegisterReplyValidationError) Reason() string
Reason function returns reason value.
type UserRegisterRequest ¶
type UserRegisterRequest struct { // 注册用户名,最长32个字符 Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` // 密码,最长32个字符 Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` // contains filtered or unexported fields }
func (*UserRegisterRequest) Descriptor
deprecated
func (*UserRegisterRequest) Descriptor() ([]byte, []int)
Deprecated: Use UserRegisterRequest.ProtoReflect.Descriptor instead.
func (*UserRegisterRequest) GetPassword ¶
func (x *UserRegisterRequest) GetPassword() string
func (*UserRegisterRequest) GetUsername ¶
func (x *UserRegisterRequest) GetUsername() string
func (*UserRegisterRequest) ProtoMessage ¶
func (*UserRegisterRequest) ProtoMessage()
func (*UserRegisterRequest) ProtoReflect ¶
func (x *UserRegisterRequest) ProtoReflect() protoreflect.Message
func (*UserRegisterRequest) Reset ¶
func (x *UserRegisterRequest) Reset()
func (*UserRegisterRequest) String ¶
func (x *UserRegisterRequest) String() string
func (*UserRegisterRequest) Validate ¶
func (m *UserRegisterRequest) Validate() error
Validate checks the field values on UserRegisterRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*UserRegisterRequest) ValidateAll ¶
func (m *UserRegisterRequest) ValidateAll() error
ValidateAll checks the field values on UserRegisterRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in UserRegisterRequestMultiError, or nil if none found.
type UserRegisterRequestMultiError ¶
type UserRegisterRequestMultiError []error
UserRegisterRequestMultiError is an error wrapping multiple validation errors returned by UserRegisterRequest.ValidateAll() if the designated constraints aren't met.
func (UserRegisterRequestMultiError) AllErrors ¶
func (m UserRegisterRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (UserRegisterRequestMultiError) Error ¶
func (m UserRegisterRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type UserRegisterRequestValidationError ¶
type UserRegisterRequestValidationError struct {
// contains filtered or unexported fields
}
UserRegisterRequestValidationError is the validation error returned by UserRegisterRequest.Validate if the designated constraints aren't met.
func (UserRegisterRequestValidationError) Cause ¶
func (e UserRegisterRequestValidationError) Cause() error
Cause function returns cause value.
func (UserRegisterRequestValidationError) Error ¶
func (e UserRegisterRequestValidationError) Error() string
Error satisfies the builtin error interface
func (UserRegisterRequestValidationError) ErrorName ¶
func (e UserRegisterRequestValidationError) ErrorName() string
ErrorName returns error name.
func (UserRegisterRequestValidationError) Field ¶
func (e UserRegisterRequestValidationError) Field() string
Field function returns field value.
func (UserRegisterRequestValidationError) Key ¶
func (e UserRegisterRequestValidationError) Key() bool
Key function returns key value.
func (UserRegisterRequestValidationError) Reason ¶
func (e UserRegisterRequestValidationError) Reason() string
Reason function returns reason value.
type UserServiceClient ¶
type UserServiceClient interface { // 用户注册 UserRegister(ctx context.Context, in *UserRegisterRequest, opts ...grpc.CallOption) (*UserRegisterReply, error) // 用户登陆 UserLogin(ctx context.Context, in *UserLoginRequest, opts ...grpc.CallOption) (*UserLoginReply, error) // 用户获取自己的信息 GetUserInfo(ctx context.Context, in *UserInfoRequest, opts ...grpc.CallOption) (*UserInfoReply, error) // 其他服务请求批量获取用户信息 GetUserInfos(ctx context.Context, in *UserInfosRequest, opts ...grpc.CallOption) (*UserInfosReply, error) }
UserServiceClient is the client API for UserService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewUserServiceClient ¶
func NewUserServiceClient(cc grpc.ClientConnInterface) UserServiceClient
type UserServiceHTTPClient ¶
type UserServiceHTTPClient interface { GetUserInfo(ctx context.Context, req *UserInfoRequest, opts ...http.CallOption) (rsp *UserInfoReply, err error) UserLogin(ctx context.Context, req *UserLoginRequest, opts ...http.CallOption) (rsp *UserLoginReply, err error) UserRegister(ctx context.Context, req *UserRegisterRequest, opts ...http.CallOption) (rsp *UserRegisterReply, err error) }
func NewUserServiceHTTPClient ¶
func NewUserServiceHTTPClient(client *http.Client) UserServiceHTTPClient
type UserServiceHTTPClientImpl ¶
type UserServiceHTTPClientImpl struct {
// contains filtered or unexported fields
}
func (*UserServiceHTTPClientImpl) GetUserInfo ¶
func (c *UserServiceHTTPClientImpl) GetUserInfo(ctx context.Context, in *UserInfoRequest, opts ...http.CallOption) (*UserInfoReply, error)
func (*UserServiceHTTPClientImpl) UserLogin ¶
func (c *UserServiceHTTPClientImpl) UserLogin(ctx context.Context, in *UserLoginRequest, opts ...http.CallOption) (*UserLoginReply, error)
func (*UserServiceHTTPClientImpl) UserRegister ¶
func (c *UserServiceHTTPClientImpl) UserRegister(ctx context.Context, in *UserRegisterRequest, opts ...http.CallOption) (*UserRegisterReply, error)
type UserServiceHTTPServer ¶
type UserServiceHTTPServer interface { // GetUserInfo 用户获取自己的信息 GetUserInfo(context.Context, *UserInfoRequest) (*UserInfoReply, error) // UserLogin 用户登陆 UserLogin(context.Context, *UserLoginRequest) (*UserLoginReply, error) // UserRegister 用户注册 UserRegister(context.Context, *UserRegisterRequest) (*UserRegisterReply, error) }
type UserServiceServer ¶
type UserServiceServer interface { // 用户注册 UserRegister(context.Context, *UserRegisterRequest) (*UserRegisterReply, error) // 用户登陆 UserLogin(context.Context, *UserLoginRequest) (*UserLoginReply, error) // 用户获取自己的信息 GetUserInfo(context.Context, *UserInfoRequest) (*UserInfoReply, error) // 其他服务请求批量获取用户信息 GetUserInfos(context.Context, *UserInfosRequest) (*UserInfosReply, error) // contains filtered or unexported methods }
UserServiceServer is the server API for UserService service. All implementations must embed UnimplementedUserServiceServer for forward compatibility
type UserValidationError ¶
type UserValidationError struct {
// contains filtered or unexported fields
}
UserValidationError is the validation error returned by User.Validate if the designated constraints aren't met.
func (UserValidationError) Cause ¶
func (e UserValidationError) Cause() error
Cause function returns cause value.
func (UserValidationError) Error ¶
func (e UserValidationError) Error() string
Error satisfies the builtin error interface
func (UserValidationError) ErrorName ¶
func (e UserValidationError) ErrorName() string
ErrorName returns error name.
func (UserValidationError) Field ¶
func (e UserValidationError) Field() string
Field function returns field value.
func (UserValidationError) Key ¶
func (e UserValidationError) Key() bool
Key function returns key value.
func (UserValidationError) Reason ¶
func (e UserValidationError) Reason() string
Reason function returns reason value.