Documentation ¶
Index ¶
- Variables
- func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer)
- type CreateUserRequest
- func (*CreateUserRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateUserRequest) GetEmail() string
- func (x *CreateUserRequest) GetName() string
- func (x *CreateUserRequest) GetPassword() string
- func (x *CreateUserRequest) GetPhone() string
- func (m *CreateUserRequest) GetUser() isCreateUserRequest_User
- 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() string
- 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 (x *QueryUserRequest) GetPhone() string
- func (m *QueryUserRequest) GetUser() isQueryUserRequest_User
- 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) (*UserInternalResponse, error)
- func (UnimplementedUserServiceServer) GetUser(context.Context, *GetUserInfoRequest) (*UserInternalResponse, error)
- func (UnimplementedUserServiceServer) QueryUser(context.Context, *QueryUserRequest) (*UserInternalResponse, error)
- func (UnimplementedUserServiceServer) UpdateUser(context.Context, *UpdateUserRequest) (*UserInternalResponse, 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) GetPhone() string
- func (x *UpdateUserRequest) GetUid() string
- 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) GetConnectUrl() string
- func (x *User) GetEmail() string
- func (x *User) GetLoginStatus() LoginStatus
- func (x *User) GetName() string
- func (x *User) GetPhone() string
- func (x *User) GetUid() string
- 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 UserInternal
- func (*UserInternal) Descriptor() ([]byte, []int)deprecated
- func (x *UserInternal) GetAvatar() string
- func (x *UserInternal) GetCreatedAt() int64
- func (x *UserInternal) GetEmail() string
- func (x *UserInternal) GetLoginStatus() LoginStatus
- func (x *UserInternal) GetName() string
- func (x *UserInternal) GetPassword() string
- func (x *UserInternal) GetPhone() string
- func (x *UserInternal) GetPushServerIp() string
- func (x *UserInternal) GetUid() string
- func (x *UserInternal) GetUpdatedAt() int64
- func (*UserInternal) ProtoMessage()
- func (x *UserInternal) ProtoReflect() protoreflect.Message
- func (x *UserInternal) Reset()
- func (x *UserInternal) String() string
- func (x *UserInternal) ToUser() *User
- func (m *UserInternal) Validate() error
- func (m *UserInternal) ValidateAll() error
- type UserInternalMultiError
- type UserInternalResponse
- func (*UserInternalResponse) Descriptor() ([]byte, []int)deprecated
- func (x *UserInternalResponse) GetResponse() *response.BaseResponse
- func (x *UserInternalResponse) GetUser() *UserInternal
- func (*UserInternalResponse) ProtoMessage()
- func (x *UserInternalResponse) ProtoReflect() protoreflect.Message
- func (x *UserInternalResponse) Reset()
- func (x *UserInternalResponse) String() string
- func (m *UserInternalResponse) Validate() error
- func (m *UserInternalResponse) ValidateAll() error
- type UserInternalResponseMultiError
- type UserInternalResponseValidationError
- func (e UserInternalResponseValidationError) Cause() error
- func (e UserInternalResponseValidationError) Error() string
- func (e UserInternalResponseValidationError) ErrorName() string
- func (e UserInternalResponseValidationError) Field() string
- func (e UserInternalResponseValidationError) Key() bool
- func (e UserInternalResponseValidationError) Reason() string
- type UserInternalValidationError
- func (e UserInternalValidationError) Cause() error
- func (e UserInternalValidationError) Error() string
- func (e UserInternalValidationError) ErrorName() string
- func (e UserInternalValidationError) Field() string
- func (e UserInternalValidationError) Key() bool
- func (e UserInternalValidationError) Reason() string
- 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 (x *UserLoginRequest) GetLoginType() LoginType
- func (x *UserLoginRequest) GetPassword() string
- func (x *UserLoginRequest) GetPhone() string
- func (m *UserLoginRequest) GetUser() isUserLoginRequest_User
- 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 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 User: // *CreateUserRequest_Email // *CreateUserRequest_Phone User isCreateUserRequest_User `protobuf_oneof:"user"` 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) GetName ¶
func (x *CreateUserRequest) GetName() string
func (*CreateUserRequest) GetPassword ¶
func (x *CreateUserRequest) GetPassword() string
func (*CreateUserRequest) GetPhone ¶
func (x *CreateUserRequest) GetPhone() string
func (*CreateUserRequest) GetUser ¶
func (m *CreateUserRequest) GetUser() isCreateUserRequest_User
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 string `protobuf:"bytes,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() string
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 User: // *QueryUserRequest_Email // *QueryUserRequest_Phone User isQueryUserRequest_User `protobuf_oneof:"user"` // 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) GetPhone ¶
func (x *QueryUserRequest) GetPhone() string
func (*QueryUserRequest) GetUser ¶
func (m *QueryUserRequest) GetUser() isQueryUserRequest_User
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) (*UserInternalResponse, error)
func (UnimplementedUserServiceServer) GetUser ¶
func (UnimplementedUserServiceServer) GetUser(context.Context, *GetUserInfoRequest) (*UserInternalResponse, error)
func (UnimplementedUserServiceServer) QueryUser ¶
func (UnimplementedUserServiceServer) QueryUser(context.Context, *QueryUserRequest) (*UserInternalResponse, error)
func (UnimplementedUserServiceServer) UpdateUser ¶
func (UnimplementedUserServiceServer) UpdateUser(context.Context, *UpdateUserRequest) (*UserInternalResponse, 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 string `protobuf:"bytes,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"` // 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) GetPhone ¶
func (x *UpdateUserRequest) GetPhone() string
func (*UpdateUserRequest) GetUid ¶
func (x *UpdateUserRequest) GetUid() string
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 string `protobuf:"bytes,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"` // ws_url is url of user need connect via ws or tcp ConnectUrl *string `protobuf:"bytes,6,opt,name=connect_url,json=connectUrl,proto3,oneof" json:"connect_url,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"` // contains filtered or unexported fields }
User use for return user info to client.
func (*User) Descriptor
deprecated
func (*User) GetConnectUrl ¶ added in v0.0.2
func (*User) GetLoginStatus ¶
func (x *User) GetLoginStatus() LoginStatus
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 UserInternal ¶
type UserInternal struct { Uid string `protobuf:"bytes,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 }
UserInternal is the internal representation of a user.
func (*UserInternal) Descriptor
deprecated
func (*UserInternal) Descriptor() ([]byte, []int)
Deprecated: Use UserInternal.ProtoReflect.Descriptor instead.
func (*UserInternal) GetAvatar ¶
func (x *UserInternal) GetAvatar() string
func (*UserInternal) GetCreatedAt ¶
func (x *UserInternal) GetCreatedAt() int64
func (*UserInternal) GetEmail ¶
func (x *UserInternal) GetEmail() string
func (*UserInternal) GetLoginStatus ¶
func (x *UserInternal) GetLoginStatus() LoginStatus
func (*UserInternal) GetName ¶
func (x *UserInternal) GetName() string
func (*UserInternal) GetPassword ¶
func (x *UserInternal) GetPassword() string
func (*UserInternal) GetPhone ¶
func (x *UserInternal) GetPhone() string
func (*UserInternal) GetPushServerIp ¶ added in v0.0.2
func (x *UserInternal) GetPushServerIp() string
func (*UserInternal) GetUid ¶
func (x *UserInternal) GetUid() string
func (*UserInternal) GetUpdatedAt ¶
func (x *UserInternal) GetUpdatedAt() int64
func (*UserInternal) ProtoMessage ¶
func (*UserInternal) ProtoMessage()
func (*UserInternal) ProtoReflect ¶
func (x *UserInternal) ProtoReflect() protoreflect.Message
func (*UserInternal) Reset ¶
func (x *UserInternal) Reset()
func (*UserInternal) String ¶
func (x *UserInternal) String() string
func (*UserInternal) ToUser ¶
func (x *UserInternal) ToUser() *User
func (*UserInternal) Validate ¶
func (m *UserInternal) Validate() error
Validate checks the field values on UserInternal 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 (*UserInternal) ValidateAll ¶
func (m *UserInternal) ValidateAll() error
ValidateAll checks the field values on UserInternal 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 UserInternalMultiError, or nil if none found.
type UserInternalMultiError ¶
type UserInternalMultiError []error
UserInternalMultiError is an error wrapping multiple validation errors returned by UserInternal.ValidateAll() if the designated constraints aren't met.
func (UserInternalMultiError) AllErrors ¶
func (m UserInternalMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (UserInternalMultiError) Error ¶
func (m UserInternalMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type UserInternalResponse ¶
type UserInternalResponse struct { Response *response.BaseResponse `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"` User *UserInternal `protobuf:"bytes,2,opt,name=user,proto3" json:"user,omitempty"` // contains filtered or unexported fields }
func (*UserInternalResponse) Descriptor
deprecated
func (*UserInternalResponse) Descriptor() ([]byte, []int)
Deprecated: Use UserInternalResponse.ProtoReflect.Descriptor instead.
func (*UserInternalResponse) GetResponse ¶
func (x *UserInternalResponse) GetResponse() *response.BaseResponse
func (*UserInternalResponse) GetUser ¶
func (x *UserInternalResponse) GetUser() *UserInternal
func (*UserInternalResponse) ProtoMessage ¶
func (*UserInternalResponse) ProtoMessage()
func (*UserInternalResponse) ProtoReflect ¶
func (x *UserInternalResponse) ProtoReflect() protoreflect.Message
func (*UserInternalResponse) Reset ¶
func (x *UserInternalResponse) Reset()
func (*UserInternalResponse) String ¶
func (x *UserInternalResponse) String() string
func (*UserInternalResponse) Validate ¶
func (m *UserInternalResponse) Validate() error
Validate checks the field values on UserInternalResponse 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 (*UserInternalResponse) ValidateAll ¶
func (m *UserInternalResponse) ValidateAll() error
ValidateAll checks the field values on UserInternalResponse 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 UserInternalResponseMultiError, or nil if none found.
type UserInternalResponseMultiError ¶
type UserInternalResponseMultiError []error
UserInternalResponseMultiError is an error wrapping multiple validation errors returned by UserInternalResponse.ValidateAll() if the designated constraints aren't met.
func (UserInternalResponseMultiError) AllErrors ¶
func (m UserInternalResponseMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (UserInternalResponseMultiError) Error ¶
func (m UserInternalResponseMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type UserInternalResponseValidationError ¶
type UserInternalResponseValidationError struct {
// contains filtered or unexported fields
}
UserInternalResponseValidationError is the validation error returned by UserInternalResponse.Validate if the designated constraints aren't met.
func (UserInternalResponseValidationError) Cause ¶
func (e UserInternalResponseValidationError) Cause() error
Cause function returns cause value.
func (UserInternalResponseValidationError) Error ¶
func (e UserInternalResponseValidationError) Error() string
Error satisfies the builtin error interface
func (UserInternalResponseValidationError) ErrorName ¶
func (e UserInternalResponseValidationError) ErrorName() string
ErrorName returns error name.
func (UserInternalResponseValidationError) Field ¶
func (e UserInternalResponseValidationError) Field() string
Field function returns field value.
func (UserInternalResponseValidationError) Key ¶
func (e UserInternalResponseValidationError) Key() bool
Key function returns key value.
func (UserInternalResponseValidationError) Reason ¶
func (e UserInternalResponseValidationError) Reason() string
Reason function returns reason value.
type UserInternalValidationError ¶
type UserInternalValidationError struct {
// contains filtered or unexported fields
}
UserInternalValidationError is the validation error returned by UserInternal.Validate if the designated constraints aren't met.
func (UserInternalValidationError) Cause ¶
func (e UserInternalValidationError) Cause() error
Cause function returns cause value.
func (UserInternalValidationError) Error ¶
func (e UserInternalValidationError) Error() string
Error satisfies the builtin error interface
func (UserInternalValidationError) ErrorName ¶
func (e UserInternalValidationError) ErrorName() string
ErrorName returns error name.
func (UserInternalValidationError) Field ¶
func (e UserInternalValidationError) Field() string
Field function returns field value.
func (UserInternalValidationError) Key ¶
func (e UserInternalValidationError) Key() bool
Key function returns key value.
func (UserInternalValidationError) Reason ¶
func (e UserInternalValidationError) Reason() string
Reason function returns reason value.
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 User: // *UserLoginRequest_Email // *UserLoginRequest_Phone User isUserLoginRequest_User `protobuf_oneof:"user"` 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) GetLoginType ¶
func (x *UserLoginRequest) GetLoginType() LoginType
func (*UserLoginRequest) GetPassword ¶
func (x *UserLoginRequest) GetPassword() string
func (*UserLoginRequest) GetPhone ¶
func (x *UserLoginRequest) GetPhone() string
func (*UserLoginRequest) GetUser ¶
func (m *UserLoginRequest) GetUser() isUserLoginRequest_User
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 UserServiceClient ¶
type UserServiceClient interface { // GetUser get user info by uid, called when uid is known. GetUser(ctx context.Context, in *GetUserInfoRequest, opts ...grpc.CallOption) (*UserInternalResponse, error) // QueryUser query user info by email or phone, called when uid is unknown. QueryUser(ctx context.Context, in *QueryUserRequest, opts ...grpc.CallOption) (*UserInternalResponse, error) // CreateUser create user. CreateUser(ctx context.Context, in *CreateUserRequest, opts ...grpc.CallOption) (*UserInternalResponse, error) // UpdateUser update user info. UpdateUser(ctx context.Context, in *UpdateUserRequest, opts ...grpc.CallOption) (*UserInternalResponse, 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) (*UserInternalResponse, error) // QueryUser query user info by email or phone, called when uid is unknown. QueryUser(context.Context, *QueryUserRequest) (*UserInternalResponse, error) // CreateUser create user. CreateUser(context.Context, *CreateUserRequest) (*UserInternalResponse, error) // UpdateUser update user info. UpdateUser(context.Context, *UpdateUserRequest) (*UserInternalResponse, 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.