Documentation ¶
Index ¶
- Variables
- func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer)
- type CreateUserRequest
- func (*CreateUserRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateUserRequest) GetEmail() string
- func (m *CreateUserRequest) GetField() isCreateUserRequest_Field
- func (x *CreateUserRequest) GetName() string
- func (x *CreateUserRequest) GetPassword() string
- func (x *CreateUserRequest) GetPhone() string
- func (*CreateUserRequest) ProtoMessage()
- func (x *CreateUserRequest) ProtoReflect() protoreflect.Message
- func (x *CreateUserRequest) Reset()
- func (x *CreateUserRequest) String() string
- func (m *CreateUserRequest) Validate() error
- func (m *CreateUserRequest) ValidateAll() error
- type CreateUserRequestMultiError
- type CreateUserRequestValidationError
- func (e CreateUserRequestValidationError) Cause() error
- func (e CreateUserRequestValidationError) Error() string
- func (e CreateUserRequestValidationError) ErrorName() string
- func (e CreateUserRequestValidationError) Field() string
- func (e CreateUserRequestValidationError) Key() bool
- func (e CreateUserRequestValidationError) Reason() string
- type CreateUserRequest_Email
- type CreateUserRequest_Phone
- type GetUserInfoRequest
- func (*GetUserInfoRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetUserInfoRequest) GetUid() int64
- func (*GetUserInfoRequest) ProtoMessage()
- func (x *GetUserInfoRequest) ProtoReflect() protoreflect.Message
- func (x *GetUserInfoRequest) Reset()
- func (x *GetUserInfoRequest) String() string
- func (m *GetUserInfoRequest) Validate() error
- func (m *GetUserInfoRequest) ValidateAll() error
- type GetUserInfoRequestMultiError
- type GetUserInfoRequestValidationError
- func (e GetUserInfoRequestValidationError) Cause() error
- func (e GetUserInfoRequestValidationError) Error() string
- func (e GetUserInfoRequestValidationError) ErrorName() string
- func (e GetUserInfoRequestValidationError) Field() string
- func (e GetUserInfoRequestValidationError) Key() bool
- func (e GetUserInfoRequestValidationError) Reason() string
- type LoginStatus
- func (LoginStatus) Descriptor() protoreflect.EnumDescriptor
- func (x LoginStatus) Enum() *LoginStatus
- func (LoginStatus) EnumDescriptor() ([]byte, []int)deprecated
- func (x LoginStatus) Number() protoreflect.EnumNumber
- func (x LoginStatus) String() string
- func (LoginStatus) Type() protoreflect.EnumType
- type LoginType
- type QueryUserRequest
- func (*QueryUserRequest) Descriptor() ([]byte, []int)deprecated
- func (x *QueryUserRequest) GetEmail() string
- func (m *QueryUserRequest) GetField() isQueryUserRequest_Field
- func (x *QueryUserRequest) GetPhone() string
- func (*QueryUserRequest) ProtoMessage()
- func (x *QueryUserRequest) ProtoReflect() protoreflect.Message
- func (x *QueryUserRequest) Reset()
- func (x *QueryUserRequest) String() string
- func (m *QueryUserRequest) Validate() error
- func (m *QueryUserRequest) ValidateAll() error
- type QueryUserRequestMultiError
- type QueryUserRequestValidationError
- func (e QueryUserRequestValidationError) Cause() error
- func (e QueryUserRequestValidationError) Error() string
- func (e QueryUserRequestValidationError) ErrorName() string
- func (e QueryUserRequestValidationError) Field() string
- func (e QueryUserRequestValidationError) Key() bool
- func (e QueryUserRequestValidationError) Reason() string
- type QueryUserRequest_Email
- type QueryUserRequest_Phone
- type UnimplementedUserServiceServer
- func (UnimplementedUserServiceServer) CreateUser(context.Context, *CreateUserRequest) (*UserResponse, error)
- func (UnimplementedUserServiceServer) GetUser(context.Context, *GetUserInfoRequest) (*UserResponse, error)
- func (UnimplementedUserServiceServer) QueryUser(context.Context, *QueryUserRequest) (*UserResponse, error)
- func (UnimplementedUserServiceServer) UpdateUser(context.Context, *UpdateUserRequest) (*UserResponse, error)
- type UnsafeUserServiceServer
- type UpdateUserRequest
- func (*UpdateUserRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateUserRequest) GetAvatar() string
- func (x *UpdateUserRequest) GetEmail() string
- func (x *UpdateUserRequest) GetName() string
- func (x *UpdateUserRequest) GetPassword() string
- func (x *UpdateUserRequest) GetPhone() string
- func (x *UpdateUserRequest) GetUid() int64
- func (*UpdateUserRequest) ProtoMessage()
- func (x *UpdateUserRequest) ProtoReflect() protoreflect.Message
- func (x *UpdateUserRequest) Reset()
- func (x *UpdateUserRequest) String() string
- func (m *UpdateUserRequest) Validate() error
- func (m *UpdateUserRequest) ValidateAll() error
- type UpdateUserRequestMultiError
- type UpdateUserRequestValidationError
- func (e UpdateUserRequestValidationError) Cause() error
- func (e UpdateUserRequestValidationError) Error() string
- func (e UpdateUserRequestValidationError) ErrorName() string
- func (e UpdateUserRequestValidationError) Field() string
- func (e UpdateUserRequestValidationError) Key() bool
- func (e UpdateUserRequestValidationError) Reason() string
- type User
- func (*User) Descriptor() ([]byte, []int)deprecated
- func (x *User) GetAvatar() string
- func (x *User) GetCreatedAt() int64
- func (x *User) GetEmail() string
- func (x *User) GetLoginStatus() LoginStatus
- func (x *User) GetName() string
- func (x *User) GetPassword() string
- func (x *User) GetPhone() string
- func (x *User) GetPushServerIp() string
- func (x *User) GetUid() int64
- func (x *User) GetUpdatedAt() int64
- 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 UserList
- func (*UserList) Descriptor() ([]byte, []int)deprecated
- func (x *UserList) GetUsers() []*User
- func (*UserList) ProtoMessage()
- func (x *UserList) ProtoReflect() protoreflect.Message
- func (x *UserList) Reset()
- func (x *UserList) String() string
- func (m *UserList) Validate() error
- func (m *UserList) ValidateAll() error
- type UserListMultiError
- type UserListValidationError
- type UserLoginRequest
- func (*UserLoginRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UserLoginRequest) GetEmail() string
- func (m *UserLoginRequest) GetField() isUserLoginRequest_Field
- func (x *UserLoginRequest) GetLoginType() LoginType
- func (x *UserLoginRequest) GetPassword() string
- func (x *UserLoginRequest) GetPhone() 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 UserLoginRequest_Email
- type UserLoginRequest_Phone
- type UserMultiError
- type UserResponse
- func (*UserResponse) Descriptor() ([]byte, []int)deprecated
- func (x *UserResponse) GetError() *errors.Error
- func (x *UserResponse) GetUser() *User
- func (*UserResponse) ProtoMessage()
- func (x *UserResponse) ProtoReflect() protoreflect.Message
- func (x *UserResponse) Reset()
- func (x *UserResponse) String() string
- func (m *UserResponse) Validate() error
- func (m *UserResponse) ValidateAll() error
- type UserResponseMultiError
- type UserResponseValidationError
- func (e UserResponseValidationError) Cause() error
- func (e UserResponseValidationError) Error() string
- func (e UserResponseValidationError) ErrorName() string
- func (e UserResponseValidationError) Field() string
- func (e UserResponseValidationError) Key() bool
- func (e UserResponseValidationError) Reason() string
- type UserServiceClient
- type UserServiceServer
- type UserValidationError
Constants ¶
This section is empty.
Variables ¶
var ( LoginStatus_name = map[int32]string{ 0: "LOGIN", 1: "ALREADY_LOGIN", 2: "LOGOUT", } LoginStatus_value = map[string]int32{ "LOGIN": 0, "ALREADY_LOGIN": 1, "LOGOUT": 2, } )
Enum value maps for LoginStatus.
var ( LoginType_name = map[int32]string{ 0: "LOGIN_TYPE_TRY", 1: "LOGIN_TYPE_FORCE", } LoginType_value = map[string]int32{ "LOGIN_TYPE_TRY": 0, "LOGIN_TYPE_FORCE": 1, } )
Enum value maps for LoginType.
var File_user_v1_user_proto protoreflect.FileDescriptor
var UserService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "api.user.v1.UserService", HandlerType: (*UserServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetUser", Handler: _UserService_GetUser_Handler, }, { MethodName: "QueryUser", Handler: _UserService_QueryUser_Handler, }, { MethodName: "CreateUser", Handler: _UserService_CreateUser_Handler, }, { MethodName: "UpdateUser", Handler: _UserService_UpdateUser_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "user/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 RegisterUserServiceServer ¶
func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer)
Types ¶
type CreateUserRequest ¶
type CreateUserRequest struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Types that are assignable to Field: // *CreateUserRequest_Email // *CreateUserRequest_Phone Field isCreateUserRequest_Field `protobuf_oneof:"field"` Password string `protobuf:"bytes,4,opt,name=password,proto3" json:"password,omitempty"` // contains filtered or unexported fields }
func (*CreateUserRequest) Descriptor
deprecated
func (*CreateUserRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateUserRequest.ProtoReflect.Descriptor instead.
func (*CreateUserRequest) GetEmail ¶
func (x *CreateUserRequest) GetEmail() string
func (*CreateUserRequest) GetField ¶ added in v0.0.7
func (m *CreateUserRequest) GetField() isCreateUserRequest_Field
func (*CreateUserRequest) GetName ¶
func (x *CreateUserRequest) GetName() string
func (*CreateUserRequest) GetPassword ¶
func (x *CreateUserRequest) GetPassword() string
func (*CreateUserRequest) GetPhone ¶
func (x *CreateUserRequest) GetPhone() string
func (*CreateUserRequest) ProtoMessage ¶
func (*CreateUserRequest) ProtoMessage()
func (*CreateUserRequest) ProtoReflect ¶
func (x *CreateUserRequest) ProtoReflect() protoreflect.Message
func (*CreateUserRequest) Reset ¶
func (x *CreateUserRequest) Reset()
func (*CreateUserRequest) String ¶
func (x *CreateUserRequest) String() string
func (*CreateUserRequest) Validate ¶
func (m *CreateUserRequest) Validate() error
Validate checks the field values on CreateUserRequest 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 (*CreateUserRequest) ValidateAll ¶
func (m *CreateUserRequest) ValidateAll() error
ValidateAll checks the field values on CreateUserRequest 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 CreateUserRequestMultiError, or nil if none found.
type CreateUserRequestMultiError ¶
type CreateUserRequestMultiError []error
CreateUserRequestMultiError is an error wrapping multiple validation errors returned by CreateUserRequest.ValidateAll() if the designated constraints aren't met.
func (CreateUserRequestMultiError) AllErrors ¶
func (m CreateUserRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (CreateUserRequestMultiError) Error ¶
func (m CreateUserRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type CreateUserRequestValidationError ¶
type CreateUserRequestValidationError struct {
// contains filtered or unexported fields
}
CreateUserRequestValidationError is the validation error returned by CreateUserRequest.Validate if the designated constraints aren't met.
func (CreateUserRequestValidationError) Cause ¶
func (e CreateUserRequestValidationError) Cause() error
Cause function returns cause value.
func (CreateUserRequestValidationError) Error ¶
func (e CreateUserRequestValidationError) Error() string
Error satisfies the builtin error interface
func (CreateUserRequestValidationError) ErrorName ¶
func (e CreateUserRequestValidationError) ErrorName() string
ErrorName returns error name.
func (CreateUserRequestValidationError) Field ¶
func (e CreateUserRequestValidationError) Field() string
Field function returns field value.
func (CreateUserRequestValidationError) Key ¶
func (e CreateUserRequestValidationError) Key() bool
Key function returns key value.
func (CreateUserRequestValidationError) Reason ¶
func (e CreateUserRequestValidationError) Reason() string
Reason function returns reason value.
type CreateUserRequest_Email ¶
type CreateUserRequest_Email struct {
Email string `protobuf:"bytes,2,opt,name=email,proto3,oneof"`
}
type CreateUserRequest_Phone ¶
type CreateUserRequest_Phone struct {
Phone string `protobuf:"bytes,3,opt,name=phone,proto3,oneof"`
}
type GetUserInfoRequest ¶
type GetUserInfoRequest struct { Uid int64 `protobuf:"varint,1,opt,name=uid,proto3" json:"uid,omitempty"` // contains filtered or unexported fields }
func (*GetUserInfoRequest) Descriptor
deprecated
func (*GetUserInfoRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetUserInfoRequest.ProtoReflect.Descriptor instead.
func (*GetUserInfoRequest) GetUid ¶
func (x *GetUserInfoRequest) GetUid() int64
func (*GetUserInfoRequest) ProtoMessage ¶
func (*GetUserInfoRequest) ProtoMessage()
func (*GetUserInfoRequest) ProtoReflect ¶
func (x *GetUserInfoRequest) ProtoReflect() protoreflect.Message
func (*GetUserInfoRequest) Reset ¶
func (x *GetUserInfoRequest) Reset()
func (*GetUserInfoRequest) String ¶
func (x *GetUserInfoRequest) String() string
func (*GetUserInfoRequest) Validate ¶
func (m *GetUserInfoRequest) Validate() error
Validate checks the field values on GetUserInfoRequest 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 (*GetUserInfoRequest) ValidateAll ¶
func (m *GetUserInfoRequest) ValidateAll() error
ValidateAll checks the field values on GetUserInfoRequest 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 GetUserInfoRequestMultiError, or nil if none found.
type GetUserInfoRequestMultiError ¶
type GetUserInfoRequestMultiError []error
GetUserInfoRequestMultiError is an error wrapping multiple validation errors returned by GetUserInfoRequest.ValidateAll() if the designated constraints aren't met.
func (GetUserInfoRequestMultiError) AllErrors ¶
func (m GetUserInfoRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (GetUserInfoRequestMultiError) Error ¶
func (m GetUserInfoRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type GetUserInfoRequestValidationError ¶
type GetUserInfoRequestValidationError struct {
// contains filtered or unexported fields
}
GetUserInfoRequestValidationError is the validation error returned by GetUserInfoRequest.Validate if the designated constraints aren't met.
func (GetUserInfoRequestValidationError) Cause ¶
func (e GetUserInfoRequestValidationError) Cause() error
Cause function returns cause value.
func (GetUserInfoRequestValidationError) Error ¶
func (e GetUserInfoRequestValidationError) Error() string
Error satisfies the builtin error interface
func (GetUserInfoRequestValidationError) ErrorName ¶
func (e GetUserInfoRequestValidationError) ErrorName() string
ErrorName returns error name.
func (GetUserInfoRequestValidationError) Field ¶
func (e GetUserInfoRequestValidationError) Field() string
Field function returns field value.
func (GetUserInfoRequestValidationError) Key ¶
func (e GetUserInfoRequestValidationError) Key() bool
Key function returns key value.
func (GetUserInfoRequestValidationError) Reason ¶
func (e GetUserInfoRequestValidationError) Reason() string
Reason function returns reason value.
type LoginStatus ¶
type LoginStatus int32
const ( LoginStatus_LOGIN LoginStatus = 0 LoginStatus_ALREADY_LOGIN LoginStatus = 1 LoginStatus_LOGOUT LoginStatus = 2 )
func (LoginStatus) Descriptor ¶
func (LoginStatus) Descriptor() protoreflect.EnumDescriptor
func (LoginStatus) Enum ¶
func (x LoginStatus) Enum() *LoginStatus
func (LoginStatus) EnumDescriptor
deprecated
func (LoginStatus) EnumDescriptor() ([]byte, []int)
Deprecated: Use LoginStatus.Descriptor instead.
func (LoginStatus) Number ¶
func (x LoginStatus) Number() protoreflect.EnumNumber
func (LoginStatus) String ¶
func (x LoginStatus) String() string
func (LoginStatus) Type ¶
func (LoginStatus) Type() protoreflect.EnumType
type LoginType ¶
type LoginType int32
func (LoginType) Descriptor ¶
func (LoginType) Descriptor() protoreflect.EnumDescriptor
func (LoginType) EnumDescriptor
deprecated
func (LoginType) Number ¶
func (x LoginType) Number() protoreflect.EnumNumber
func (LoginType) Type ¶
func (LoginType) Type() protoreflect.EnumType
type QueryUserRequest ¶
type QueryUserRequest struct { // Types that are assignable to Field: // *QueryUserRequest_Email // *QueryUserRequest_Phone Field isQueryUserRequest_Field `protobuf_oneof:"field"` // contains filtered or unexported fields }
func (*QueryUserRequest) Descriptor
deprecated
func (*QueryUserRequest) Descriptor() ([]byte, []int)
Deprecated: Use QueryUserRequest.ProtoReflect.Descriptor instead.
func (*QueryUserRequest) GetEmail ¶
func (x *QueryUserRequest) GetEmail() string
func (*QueryUserRequest) GetField ¶ added in v0.0.7
func (m *QueryUserRequest) GetField() isQueryUserRequest_Field
func (*QueryUserRequest) GetPhone ¶
func (x *QueryUserRequest) GetPhone() string
func (*QueryUserRequest) ProtoMessage ¶
func (*QueryUserRequest) ProtoMessage()
func (*QueryUserRequest) ProtoReflect ¶
func (x *QueryUserRequest) ProtoReflect() protoreflect.Message
func (*QueryUserRequest) Reset ¶
func (x *QueryUserRequest) Reset()
func (*QueryUserRequest) String ¶
func (x *QueryUserRequest) String() string
func (*QueryUserRequest) Validate ¶
func (m *QueryUserRequest) Validate() error
Validate checks the field values on QueryUserRequest 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 (*QueryUserRequest) ValidateAll ¶
func (m *QueryUserRequest) ValidateAll() error
ValidateAll checks the field values on QueryUserRequest 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 QueryUserRequestMultiError, or nil if none found.
type QueryUserRequestMultiError ¶
type QueryUserRequestMultiError []error
QueryUserRequestMultiError is an error wrapping multiple validation errors returned by QueryUserRequest.ValidateAll() if the designated constraints aren't met.
func (QueryUserRequestMultiError) AllErrors ¶
func (m QueryUserRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (QueryUserRequestMultiError) Error ¶
func (m QueryUserRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type QueryUserRequestValidationError ¶
type QueryUserRequestValidationError struct {
// contains filtered or unexported fields
}
QueryUserRequestValidationError is the validation error returned by QueryUserRequest.Validate if the designated constraints aren't met.
func (QueryUserRequestValidationError) Cause ¶
func (e QueryUserRequestValidationError) Cause() error
Cause function returns cause value.
func (QueryUserRequestValidationError) Error ¶
func (e QueryUserRequestValidationError) Error() string
Error satisfies the builtin error interface
func (QueryUserRequestValidationError) ErrorName ¶
func (e QueryUserRequestValidationError) ErrorName() string
ErrorName returns error name.
func (QueryUserRequestValidationError) Field ¶
func (e QueryUserRequestValidationError) Field() string
Field function returns field value.
func (QueryUserRequestValidationError) Key ¶
func (e QueryUserRequestValidationError) Key() bool
Key function returns key value.
func (QueryUserRequestValidationError) Reason ¶
func (e QueryUserRequestValidationError) Reason() string
Reason function returns reason value.
type QueryUserRequest_Email ¶
type QueryUserRequest_Email struct {
Email string `protobuf:"bytes,1,opt,name=email,proto3,oneof"`
}
type QueryUserRequest_Phone ¶
type QueryUserRequest_Phone struct {
Phone string `protobuf:"bytes,2,opt,name=phone,proto3,oneof"`
}
type UnimplementedUserServiceServer ¶
type UnimplementedUserServiceServer struct { }
UnimplementedUserServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedUserServiceServer) CreateUser ¶
func (UnimplementedUserServiceServer) CreateUser(context.Context, *CreateUserRequest) (*UserResponse, error)
func (UnimplementedUserServiceServer) GetUser ¶
func (UnimplementedUserServiceServer) GetUser(context.Context, *GetUserInfoRequest) (*UserResponse, error)
func (UnimplementedUserServiceServer) QueryUser ¶
func (UnimplementedUserServiceServer) QueryUser(context.Context, *QueryUserRequest) (*UserResponse, error)
func (UnimplementedUserServiceServer) UpdateUser ¶
func (UnimplementedUserServiceServer) UpdateUser(context.Context, *UpdateUserRequest) (*UserResponse, 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 UpdateUserRequest ¶
type UpdateUserRequest struct { Uid int64 `protobuf:"varint,1,opt,name=uid,proto3" json:"uid,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"` Phone string `protobuf:"bytes,4,opt,name=phone,proto3" json:"phone,omitempty"` Avatar string `protobuf:"bytes,5,opt,name=avatar,proto3" json:"avatar,omitempty"` Password string `protobuf:"bytes,6,opt,name=password,proto3" json:"password,omitempty"` // contains filtered or unexported fields }
func (*UpdateUserRequest) Descriptor
deprecated
func (*UpdateUserRequest) Descriptor() ([]byte, []int)
Deprecated: Use UpdateUserRequest.ProtoReflect.Descriptor instead.
func (*UpdateUserRequest) GetAvatar ¶
func (x *UpdateUserRequest) GetAvatar() string
func (*UpdateUserRequest) GetEmail ¶
func (x *UpdateUserRequest) GetEmail() string
func (*UpdateUserRequest) GetName ¶
func (x *UpdateUserRequest) GetName() string
func (*UpdateUserRequest) GetPassword ¶ added in v0.0.7
func (x *UpdateUserRequest) GetPassword() string
func (*UpdateUserRequest) GetPhone ¶
func (x *UpdateUserRequest) GetPhone() string
func (*UpdateUserRequest) GetUid ¶
func (x *UpdateUserRequest) GetUid() int64
func (*UpdateUserRequest) ProtoMessage ¶
func (*UpdateUserRequest) ProtoMessage()
func (*UpdateUserRequest) ProtoReflect ¶
func (x *UpdateUserRequest) ProtoReflect() protoreflect.Message
func (*UpdateUserRequest) Reset ¶
func (x *UpdateUserRequest) Reset()
func (*UpdateUserRequest) String ¶
func (x *UpdateUserRequest) String() string
func (*UpdateUserRequest) Validate ¶
func (m *UpdateUserRequest) Validate() error
Validate checks the field values on UpdateUserRequest 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 (*UpdateUserRequest) ValidateAll ¶
func (m *UpdateUserRequest) ValidateAll() error
ValidateAll checks the field values on UpdateUserRequest 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 UpdateUserRequestMultiError, or nil if none found.
type UpdateUserRequestMultiError ¶
type UpdateUserRequestMultiError []error
UpdateUserRequestMultiError is an error wrapping multiple validation errors returned by UpdateUserRequest.ValidateAll() if the designated constraints aren't met.
func (UpdateUserRequestMultiError) AllErrors ¶
func (m UpdateUserRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (UpdateUserRequestMultiError) Error ¶
func (m UpdateUserRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type UpdateUserRequestValidationError ¶
type UpdateUserRequestValidationError struct {
// contains filtered or unexported fields
}
UpdateUserRequestValidationError is the validation error returned by UpdateUserRequest.Validate if the designated constraints aren't met.
func (UpdateUserRequestValidationError) Cause ¶
func (e UpdateUserRequestValidationError) Cause() error
Cause function returns cause value.
func (UpdateUserRequestValidationError) Error ¶
func (e UpdateUserRequestValidationError) Error() string
Error satisfies the builtin error interface
func (UpdateUserRequestValidationError) ErrorName ¶
func (e UpdateUserRequestValidationError) ErrorName() string
ErrorName returns error name.
func (UpdateUserRequestValidationError) Field ¶
func (e UpdateUserRequestValidationError) Field() string
Field function returns field value.
func (UpdateUserRequestValidationError) Key ¶
func (e UpdateUserRequestValidationError) Key() bool
Key function returns key value.
func (UpdateUserRequestValidationError) Reason ¶
func (e UpdateUserRequestValidationError) Reason() string
Reason function returns reason value.
type User ¶
type User struct { Uid int64 `protobuf:"varint,1,opt,name=uid,proto3" json:"uid,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Email *string `protobuf:"bytes,3,opt,name=email,proto3,oneof" json:"email,omitempty"` Phone *string `protobuf:"bytes,4,opt,name=phone,proto3,oneof" json:"phone,omitempty"` Avatar string `protobuf:"bytes,5,opt,name=avatar,proto3" json:"avatar,omitempty"` // push_server_ip only valid when user already login. PushServerIp *string `protobuf:"bytes,6,opt,name=push_server_ip,json=pushServerIp,proto3,oneof" json:"push_server_ip,omitempty"` Password string `protobuf:"bytes,7,opt,name=password,proto3" json:"password,omitempty"` // 0: first time login, need connect to push server // 1: already login, no need connect to push server LoginStatus LoginStatus `protobuf:"varint,8,opt,name=login_status,json=loginStatus,proto3,enum=api.user.v1.LoginStatus" json:"login_status,omitempty"` CreatedAt int64 `protobuf:"varint,9,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` UpdatedAt int64 `protobuf:"varint,10,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` // contains filtered or unexported fields }
func (*User) Descriptor
deprecated
func (*User) GetCreatedAt ¶ added in v0.0.7
func (*User) GetLoginStatus ¶
func (x *User) GetLoginStatus() LoginStatus
func (*User) GetPassword ¶ added in v0.0.7
func (*User) GetPushServerIp ¶ added in v0.0.7
func (*User) GetUpdatedAt ¶ added in v0.0.7
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 UserList ¶
type UserList struct { Users []*User `protobuf:"bytes,1,rep,name=users,proto3" json:"users,omitempty"` // contains filtered or unexported fields }
func (*UserList) Descriptor
deprecated
func (*UserList) ProtoMessage ¶
func (*UserList) ProtoMessage()
func (*UserList) ProtoReflect ¶
func (x *UserList) ProtoReflect() protoreflect.Message
func (*UserList) Validate ¶
Validate checks the field values on UserList 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 (*UserList) ValidateAll ¶
ValidateAll checks the field values on UserList 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 UserListMultiError, or nil if none found.
type UserListMultiError ¶
type UserListMultiError []error
UserListMultiError is an error wrapping multiple validation errors returned by UserList.ValidateAll() if the designated constraints aren't met.
func (UserListMultiError) AllErrors ¶
func (m UserListMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (UserListMultiError) Error ¶
func (m UserListMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type UserListValidationError ¶
type UserListValidationError struct {
// contains filtered or unexported fields
}
UserListValidationError is the validation error returned by UserList.Validate if the designated constraints aren't met.
func (UserListValidationError) Cause ¶
func (e UserListValidationError) Cause() error
Cause function returns cause value.
func (UserListValidationError) Error ¶
func (e UserListValidationError) Error() string
Error satisfies the builtin error interface
func (UserListValidationError) ErrorName ¶
func (e UserListValidationError) ErrorName() string
ErrorName returns error name.
func (UserListValidationError) Field ¶
func (e UserListValidationError) Field() string
Field function returns field value.
func (UserListValidationError) Key ¶
func (e UserListValidationError) Key() bool
Key function returns key value.
func (UserListValidationError) Reason ¶
func (e UserListValidationError) Reason() string
Reason function returns reason value.
type UserLoginRequest ¶
type UserLoginRequest struct { // Types that are assignable to Field: // *UserLoginRequest_Email // *UserLoginRequest_Phone Field isUserLoginRequest_Field `protobuf_oneof:"field"` Password string `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"` // 0: try login , do nothing if already login // 1: force login , logout if already login LoginType LoginType `protobuf:"varint,4,opt,name=login_type,json=loginType,proto3,enum=api.user.v1.LoginType" json:"login_type,omitempty"` // contains filtered or unexported fields }
func (*UserLoginRequest) Descriptor
deprecated
func (*UserLoginRequest) Descriptor() ([]byte, []int)
Deprecated: Use UserLoginRequest.ProtoReflect.Descriptor instead.
func (*UserLoginRequest) GetEmail ¶
func (x *UserLoginRequest) GetEmail() string
func (*UserLoginRequest) GetField ¶ added in v0.0.7
func (m *UserLoginRequest) GetField() isUserLoginRequest_Field
func (*UserLoginRequest) GetLoginType ¶
func (x *UserLoginRequest) GetLoginType() LoginType
func (*UserLoginRequest) GetPassword ¶
func (x *UserLoginRequest) GetPassword() string
func (*UserLoginRequest) GetPhone ¶
func (x *UserLoginRequest) GetPhone() 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 UserLoginRequest_Email ¶
type UserLoginRequest_Email struct {
Email string `protobuf:"bytes,1,opt,name=email,proto3,oneof"`
}
type UserLoginRequest_Phone ¶
type UserLoginRequest_Phone struct {
Phone string `protobuf:"bytes,2,opt,name=phone,proto3,oneof"`
}
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 UserResponse ¶ added in v0.0.7
type UserResponse struct { Error *errors.Error `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` User *User `protobuf:"bytes,2,opt,name=user,proto3" json:"user,omitempty"` // contains filtered or unexported fields }
func (*UserResponse) Descriptor
deprecated
added in
v0.0.7
func (*UserResponse) Descriptor() ([]byte, []int)
Deprecated: Use UserResponse.ProtoReflect.Descriptor instead.
func (*UserResponse) GetError ¶ added in v0.0.9
func (x *UserResponse) GetError() *errors.Error
func (*UserResponse) GetUser ¶ added in v0.0.7
func (x *UserResponse) GetUser() *User
func (*UserResponse) ProtoMessage ¶ added in v0.0.7
func (*UserResponse) ProtoMessage()
func (*UserResponse) ProtoReflect ¶ added in v0.0.7
func (x *UserResponse) ProtoReflect() protoreflect.Message
func (*UserResponse) Reset ¶ added in v0.0.7
func (x *UserResponse) Reset()
func (*UserResponse) String ¶ added in v0.0.7
func (x *UserResponse) String() string
func (*UserResponse) Validate ¶ added in v0.0.7
func (m *UserResponse) Validate() error
Validate checks the field values on UserResponse 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 (*UserResponse) ValidateAll ¶ added in v0.0.7
func (m *UserResponse) ValidateAll() error
ValidateAll checks the field values on UserResponse 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 UserResponseMultiError, or nil if none found.
type UserResponseMultiError ¶ added in v0.0.7
type UserResponseMultiError []error
UserResponseMultiError is an error wrapping multiple validation errors returned by UserResponse.ValidateAll() if the designated constraints aren't met.
func (UserResponseMultiError) AllErrors ¶ added in v0.0.7
func (m UserResponseMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (UserResponseMultiError) Error ¶ added in v0.0.7
func (m UserResponseMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type UserResponseValidationError ¶ added in v0.0.7
type UserResponseValidationError struct {
// contains filtered or unexported fields
}
UserResponseValidationError is the validation error returned by UserResponse.Validate if the designated constraints aren't met.
func (UserResponseValidationError) Cause ¶ added in v0.0.7
func (e UserResponseValidationError) Cause() error
Cause function returns cause value.
func (UserResponseValidationError) Error ¶ added in v0.0.7
func (e UserResponseValidationError) Error() string
Error satisfies the builtin error interface
func (UserResponseValidationError) ErrorName ¶ added in v0.0.7
func (e UserResponseValidationError) ErrorName() string
ErrorName returns error name.
func (UserResponseValidationError) Field ¶ added in v0.0.7
func (e UserResponseValidationError) Field() string
Field function returns field value.
func (UserResponseValidationError) Key ¶ added in v0.0.7
func (e UserResponseValidationError) Key() bool
Key function returns key value.
func (UserResponseValidationError) Reason ¶ added in v0.0.7
func (e UserResponseValidationError) Reason() string
Reason function returns reason value.
type UserServiceClient ¶
type UserServiceClient interface { // GetUser get user info by uid, called when uid is known. GetUser(ctx context.Context, in *GetUserInfoRequest, opts ...grpc.CallOption) (*UserResponse, error) // QueryUser query user info by email or phone, called when uid is unknown. QueryUser(ctx context.Context, in *QueryUserRequest, opts ...grpc.CallOption) (*UserResponse, error) // CreateUser create user. CreateUser(ctx context.Context, in *CreateUserRequest, opts ...grpc.CallOption) (*UserResponse, error) // UpdateUser update user info. UpdateUser(ctx context.Context, in *UpdateUserRequest, opts ...grpc.CallOption) (*UserResponse, 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 UserServiceServer ¶
type UserServiceServer interface { // GetUser get user info by uid, called when uid is known. GetUser(context.Context, *GetUserInfoRequest) (*UserResponse, error) // QueryUser query user info by email or phone, called when uid is unknown. QueryUser(context.Context, *QueryUserRequest) (*UserResponse, error) // CreateUser create user. CreateUser(context.Context, *CreateUserRequest) (*UserResponse, error) // UpdateUser update user info. UpdateUser(context.Context, *UpdateUserRequest) (*UserResponse, 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.