Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer)
- type FindOrCreateByWechatRequest
- func (*FindOrCreateByWechatRequest) Descriptor() ([]byte, []int)deprecated
- func (x *FindOrCreateByWechatRequest) GetInfo() *WechatInfo
- func (*FindOrCreateByWechatRequest) ProtoMessage()
- func (x *FindOrCreateByWechatRequest) ProtoReflect() protoreflect.Message
- func (x *FindOrCreateByWechatRequest) Reset()
- func (x *FindOrCreateByWechatRequest) String() string
- type FindOrCreateByWechatResponse
- func (*FindOrCreateByWechatResponse) Descriptor() ([]byte, []int)deprecated
- func (x *FindOrCreateByWechatResponse) GetUser() *User
- func (*FindOrCreateByWechatResponse) ProtoMessage()
- func (x *FindOrCreateByWechatResponse) ProtoReflect() protoreflect.Message
- func (x *FindOrCreateByWechatResponse) Reset()
- func (x *FindOrCreateByWechatResponse) String() string
- type FindOrCreateRequest
- func (*FindOrCreateRequest) Descriptor() ([]byte, []int)deprecated
- func (x *FindOrCreateRequest) GetPhone() string
- func (*FindOrCreateRequest) ProtoMessage()
- func (x *FindOrCreateRequest) ProtoReflect() protoreflect.Message
- func (x *FindOrCreateRequest) Reset()
- func (x *FindOrCreateRequest) String() string
- type FindOrCreateResponse
- func (*FindOrCreateResponse) Descriptor() ([]byte, []int)deprecated
- func (x *FindOrCreateResponse) GetUser() *User
- func (*FindOrCreateResponse) ProtoMessage()
- func (x *FindOrCreateResponse) ProtoReflect() protoreflect.Message
- func (x *FindOrCreateResponse) Reset()
- func (x *FindOrCreateResponse) String() string
- type LoginRequest
- func (*LoginRequest) Descriptor() ([]byte, []int)deprecated
- func (x *LoginRequest) GetEmail() string
- func (x *LoginRequest) GetPassword() string
- func (*LoginRequest) ProtoMessage()
- func (x *LoginRequest) ProtoReflect() protoreflect.Message
- func (x *LoginRequest) Reset()
- func (x *LoginRequest) String() string
- type LoginResponse
- type ProfileRequest
- type ProfileResponse
- type SignupRequest
- type SignupResponse
- type UnimplementedUserServiceServer
- func (UnimplementedUserServiceServer) FindOrCreate(context.Context, *FindOrCreateRequest) (*FindOrCreateResponse, error)
- func (UnimplementedUserServiceServer) FindOrCreateByWechat(context.Context, *FindOrCreateByWechatRequest) (*FindOrCreateByWechatResponse, error)
- func (UnimplementedUserServiceServer) Login(context.Context, *LoginRequest) (*LoginResponse, error)
- func (UnimplementedUserServiceServer) Profile(context.Context, *ProfileRequest) (*ProfileResponse, error)
- func (UnimplementedUserServiceServer) Signup(context.Context, *SignupRequest) (*SignupResponse, error)
- func (UnimplementedUserServiceServer) UpdateNonSensitiveInfo(context.Context, *UpdateNonSensitiveInfoRequest) (*UpdateNonSensitiveInfoResponse, error)
- type UnsafeUserServiceServer
- type UpdateNonSensitiveInfoRequest
- func (*UpdateNonSensitiveInfoRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateNonSensitiveInfoRequest) GetUser() *User
- func (*UpdateNonSensitiveInfoRequest) ProtoMessage()
- func (x *UpdateNonSensitiveInfoRequest) ProtoReflect() protoreflect.Message
- func (x *UpdateNonSensitiveInfoRequest) Reset()
- func (x *UpdateNonSensitiveInfoRequest) String() string
- type UpdateNonSensitiveInfoResponse
- func (*UpdateNonSensitiveInfoResponse) Descriptor() ([]byte, []int)deprecated
- func (*UpdateNonSensitiveInfoResponse) ProtoMessage()
- func (x *UpdateNonSensitiveInfoResponse) ProtoReflect() protoreflect.Message
- func (x *UpdateNonSensitiveInfoResponse) Reset()
- func (x *UpdateNonSensitiveInfoResponse) String() string
- type User
- func (*User) Descriptor() ([]byte, []int)deprecated
- func (x *User) GetAboutMe() string
- func (x *User) GetBirthday() *timestamppb.Timestamp
- func (x *User) GetCtime() *timestamppb.Timestamp
- func (x *User) GetEmail() string
- func (x *User) GetId() int64
- func (x *User) GetNickname() string
- func (x *User) GetPassword() string
- func (x *User) GetPhone() string
- func (x *User) GetWechatInfo() *WechatInfo
- func (*User) ProtoMessage()
- func (x *User) ProtoReflect() protoreflect.Message
- func (x *User) Reset()
- func (x *User) String() string
- type UserServiceClient
- type UserServiceServer
- type WechatInfo
Constants ¶
const ( UserService_Signup_FullMethodName = "/user.v1.UserService/Signup" UserService_FindOrCreate_FullMethodName = "/user.v1.UserService/FindOrCreate" UserService_Login_FullMethodName = "/user.v1.UserService/Login" UserService_Profile_FullMethodName = "/user.v1.UserService/Profile" UserService_UpdateNonSensitiveInfo_FullMethodName = "/user.v1.UserService/UpdateNonSensitiveInfo" UserService_FindOrCreateByWechat_FullMethodName = "/user.v1.UserService/FindOrCreateByWechat" )
Variables ¶
var File_user_user_proto protoreflect.FileDescriptor
var UserService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "user.v1.UserService", HandlerType: (*UserServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Signup", Handler: _UserService_Signup_Handler, }, { MethodName: "FindOrCreate", Handler: _UserService_FindOrCreate_Handler, }, { MethodName: "Login", Handler: _UserService_Login_Handler, }, { MethodName: "Profile", Handler: _UserService_Profile_Handler, }, { MethodName: "UpdateNonSensitiveInfo", Handler: _UserService_UpdateNonSensitiveInfo_Handler, }, { MethodName: "FindOrCreateByWechat", Handler: _UserService_FindOrCreateByWechat_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "user/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 FindOrCreateByWechatRequest ¶
type FindOrCreateByWechatRequest struct { Info *WechatInfo `protobuf:"bytes,1,opt,name=info,proto3" json:"info,omitempty"` // contains filtered or unexported fields }
func (*FindOrCreateByWechatRequest) Descriptor
deprecated
func (*FindOrCreateByWechatRequest) Descriptor() ([]byte, []int)
Deprecated: Use FindOrCreateByWechatRequest.ProtoReflect.Descriptor instead.
func (*FindOrCreateByWechatRequest) GetInfo ¶
func (x *FindOrCreateByWechatRequest) GetInfo() *WechatInfo
func (*FindOrCreateByWechatRequest) ProtoMessage ¶
func (*FindOrCreateByWechatRequest) ProtoMessage()
func (*FindOrCreateByWechatRequest) ProtoReflect ¶
func (x *FindOrCreateByWechatRequest) ProtoReflect() protoreflect.Message
func (*FindOrCreateByWechatRequest) Reset ¶
func (x *FindOrCreateByWechatRequest) Reset()
func (*FindOrCreateByWechatRequest) String ¶
func (x *FindOrCreateByWechatRequest) String() string
type FindOrCreateByWechatResponse ¶
type FindOrCreateByWechatResponse struct { User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` // contains filtered or unexported fields }
func (*FindOrCreateByWechatResponse) Descriptor
deprecated
func (*FindOrCreateByWechatResponse) Descriptor() ([]byte, []int)
Deprecated: Use FindOrCreateByWechatResponse.ProtoReflect.Descriptor instead.
func (*FindOrCreateByWechatResponse) GetUser ¶
func (x *FindOrCreateByWechatResponse) GetUser() *User
func (*FindOrCreateByWechatResponse) ProtoMessage ¶
func (*FindOrCreateByWechatResponse) ProtoMessage()
func (*FindOrCreateByWechatResponse) ProtoReflect ¶
func (x *FindOrCreateByWechatResponse) ProtoReflect() protoreflect.Message
func (*FindOrCreateByWechatResponse) Reset ¶
func (x *FindOrCreateByWechatResponse) Reset()
func (*FindOrCreateByWechatResponse) String ¶
func (x *FindOrCreateByWechatResponse) String() string
type FindOrCreateRequest ¶
type FindOrCreateRequest struct { Phone string `protobuf:"bytes,1,opt,name=phone,proto3" json:"phone,omitempty"` // contains filtered or unexported fields }
func (*FindOrCreateRequest) Descriptor
deprecated
func (*FindOrCreateRequest) Descriptor() ([]byte, []int)
Deprecated: Use FindOrCreateRequest.ProtoReflect.Descriptor instead.
func (*FindOrCreateRequest) GetPhone ¶
func (x *FindOrCreateRequest) GetPhone() string
func (*FindOrCreateRequest) ProtoMessage ¶
func (*FindOrCreateRequest) ProtoMessage()
func (*FindOrCreateRequest) ProtoReflect ¶
func (x *FindOrCreateRequest) ProtoReflect() protoreflect.Message
func (*FindOrCreateRequest) Reset ¶
func (x *FindOrCreateRequest) Reset()
func (*FindOrCreateRequest) String ¶
func (x *FindOrCreateRequest) String() string
type FindOrCreateResponse ¶
type FindOrCreateResponse struct { User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` // contains filtered or unexported fields }
func (*FindOrCreateResponse) Descriptor
deprecated
func (*FindOrCreateResponse) Descriptor() ([]byte, []int)
Deprecated: Use FindOrCreateResponse.ProtoReflect.Descriptor instead.
func (*FindOrCreateResponse) GetUser ¶
func (x *FindOrCreateResponse) GetUser() *User
func (*FindOrCreateResponse) ProtoMessage ¶
func (*FindOrCreateResponse) ProtoMessage()
func (*FindOrCreateResponse) ProtoReflect ¶
func (x *FindOrCreateResponse) ProtoReflect() protoreflect.Message
func (*FindOrCreateResponse) Reset ¶
func (x *FindOrCreateResponse) Reset()
func (*FindOrCreateResponse) String ¶
func (x *FindOrCreateResponse) String() string
type LoginRequest ¶
type LoginRequest struct { Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"` Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` // contains filtered or unexported fields }
func (*LoginRequest) Descriptor
deprecated
func (*LoginRequest) Descriptor() ([]byte, []int)
Deprecated: Use LoginRequest.ProtoReflect.Descriptor instead.
func (*LoginRequest) GetEmail ¶
func (x *LoginRequest) GetEmail() string
func (*LoginRequest) GetPassword ¶
func (x *LoginRequest) GetPassword() string
func (*LoginRequest) ProtoMessage ¶
func (*LoginRequest) ProtoMessage()
func (*LoginRequest) ProtoReflect ¶
func (x *LoginRequest) ProtoReflect() protoreflect.Message
func (*LoginRequest) Reset ¶
func (x *LoginRequest) Reset()
func (*LoginRequest) String ¶
func (x *LoginRequest) String() string
type LoginResponse ¶
type LoginResponse struct { User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` // contains filtered or unexported fields }
func (*LoginResponse) Descriptor
deprecated
func (*LoginResponse) Descriptor() ([]byte, []int)
Deprecated: Use LoginResponse.ProtoReflect.Descriptor instead.
func (*LoginResponse) GetUser ¶
func (x *LoginResponse) GetUser() *User
func (*LoginResponse) ProtoMessage ¶
func (*LoginResponse) ProtoMessage()
func (*LoginResponse) ProtoReflect ¶
func (x *LoginResponse) ProtoReflect() protoreflect.Message
func (*LoginResponse) Reset ¶
func (x *LoginResponse) Reset()
func (*LoginResponse) String ¶
func (x *LoginResponse) String() string
type ProfileRequest ¶
type ProfileRequest struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*ProfileRequest) Descriptor
deprecated
func (*ProfileRequest) Descriptor() ([]byte, []int)
Deprecated: Use ProfileRequest.ProtoReflect.Descriptor instead.
func (*ProfileRequest) GetId ¶
func (x *ProfileRequest) GetId() int64
func (*ProfileRequest) ProtoMessage ¶
func (*ProfileRequest) ProtoMessage()
func (*ProfileRequest) ProtoReflect ¶
func (x *ProfileRequest) ProtoReflect() protoreflect.Message
func (*ProfileRequest) Reset ¶
func (x *ProfileRequest) Reset()
func (*ProfileRequest) String ¶
func (x *ProfileRequest) String() string
type ProfileResponse ¶
type ProfileResponse struct { User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` // contains filtered or unexported fields }
func (*ProfileResponse) Descriptor
deprecated
func (*ProfileResponse) Descriptor() ([]byte, []int)
Deprecated: Use ProfileResponse.ProtoReflect.Descriptor instead.
func (*ProfileResponse) GetUser ¶
func (x *ProfileResponse) GetUser() *User
func (*ProfileResponse) ProtoMessage ¶
func (*ProfileResponse) ProtoMessage()
func (*ProfileResponse) ProtoReflect ¶
func (x *ProfileResponse) ProtoReflect() protoreflect.Message
func (*ProfileResponse) Reset ¶
func (x *ProfileResponse) Reset()
func (*ProfileResponse) String ¶
func (x *ProfileResponse) String() string
type SignupRequest ¶
type SignupRequest struct { User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` // contains filtered or unexported fields }
func (*SignupRequest) Descriptor
deprecated
func (*SignupRequest) Descriptor() ([]byte, []int)
Deprecated: Use SignupRequest.ProtoReflect.Descriptor instead.
func (*SignupRequest) GetUser ¶
func (x *SignupRequest) GetUser() *User
func (*SignupRequest) ProtoMessage ¶
func (*SignupRequest) ProtoMessage()
func (*SignupRequest) ProtoReflect ¶
func (x *SignupRequest) ProtoReflect() protoreflect.Message
func (*SignupRequest) Reset ¶
func (x *SignupRequest) Reset()
func (*SignupRequest) String ¶
func (x *SignupRequest) String() string
type SignupResponse ¶
type SignupResponse struct {
// contains filtered or unexported fields
}
func (*SignupResponse) Descriptor
deprecated
func (*SignupResponse) Descriptor() ([]byte, []int)
Deprecated: Use SignupResponse.ProtoReflect.Descriptor instead.
func (*SignupResponse) ProtoMessage ¶
func (*SignupResponse) ProtoMessage()
func (*SignupResponse) ProtoReflect ¶
func (x *SignupResponse) ProtoReflect() protoreflect.Message
func (*SignupResponse) Reset ¶
func (x *SignupResponse) Reset()
func (*SignupResponse) String ¶
func (x *SignupResponse) String() string
type UnimplementedUserServiceServer ¶
type UnimplementedUserServiceServer struct{}
UnimplementedUserServiceServer must be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedUserServiceServer) FindOrCreate ¶
func (UnimplementedUserServiceServer) FindOrCreate(context.Context, *FindOrCreateRequest) (*FindOrCreateResponse, error)
func (UnimplementedUserServiceServer) FindOrCreateByWechat ¶
func (UnimplementedUserServiceServer) FindOrCreateByWechat(context.Context, *FindOrCreateByWechatRequest) (*FindOrCreateByWechatResponse, error)
func (UnimplementedUserServiceServer) Login ¶
func (UnimplementedUserServiceServer) Login(context.Context, *LoginRequest) (*LoginResponse, error)
func (UnimplementedUserServiceServer) Profile ¶
func (UnimplementedUserServiceServer) Profile(context.Context, *ProfileRequest) (*ProfileResponse, error)
func (UnimplementedUserServiceServer) Signup ¶
func (UnimplementedUserServiceServer) Signup(context.Context, *SignupRequest) (*SignupResponse, error)
func (UnimplementedUserServiceServer) UpdateNonSensitiveInfo ¶
func (UnimplementedUserServiceServer) UpdateNonSensitiveInfo(context.Context, *UpdateNonSensitiveInfoRequest) (*UpdateNonSensitiveInfoResponse, 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 UpdateNonSensitiveInfoRequest ¶
type UpdateNonSensitiveInfoRequest struct { User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` // contains filtered or unexported fields }
func (*UpdateNonSensitiveInfoRequest) Descriptor
deprecated
func (*UpdateNonSensitiveInfoRequest) Descriptor() ([]byte, []int)
Deprecated: Use UpdateNonSensitiveInfoRequest.ProtoReflect.Descriptor instead.
func (*UpdateNonSensitiveInfoRequest) GetUser ¶
func (x *UpdateNonSensitiveInfoRequest) GetUser() *User
func (*UpdateNonSensitiveInfoRequest) ProtoMessage ¶
func (*UpdateNonSensitiveInfoRequest) ProtoMessage()
func (*UpdateNonSensitiveInfoRequest) ProtoReflect ¶
func (x *UpdateNonSensitiveInfoRequest) ProtoReflect() protoreflect.Message
func (*UpdateNonSensitiveInfoRequest) Reset ¶
func (x *UpdateNonSensitiveInfoRequest) Reset()
func (*UpdateNonSensitiveInfoRequest) String ¶
func (x *UpdateNonSensitiveInfoRequest) String() string
type UpdateNonSensitiveInfoResponse ¶
type UpdateNonSensitiveInfoResponse struct {
// contains filtered or unexported fields
}
func (*UpdateNonSensitiveInfoResponse) Descriptor
deprecated
func (*UpdateNonSensitiveInfoResponse) Descriptor() ([]byte, []int)
Deprecated: Use UpdateNonSensitiveInfoResponse.ProtoReflect.Descriptor instead.
func (*UpdateNonSensitiveInfoResponse) ProtoMessage ¶
func (*UpdateNonSensitiveInfoResponse) ProtoMessage()
func (*UpdateNonSensitiveInfoResponse) ProtoReflect ¶
func (x *UpdateNonSensitiveInfoResponse) ProtoReflect() protoreflect.Message
func (*UpdateNonSensitiveInfoResponse) Reset ¶
func (x *UpdateNonSensitiveInfoResponse) Reset()
func (*UpdateNonSensitiveInfoResponse) String ¶
func (x *UpdateNonSensitiveInfoResponse) String() string
type User ¶
type User struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"` Nickname string `protobuf:"bytes,3,opt,name=nickname,proto3" json:"nickname,omitempty"` Password string `protobuf:"bytes,4,opt,name=password,proto3" json:"password,omitempty"` Phone string `protobuf:"bytes,5,opt,name=phone,proto3" json:"phone,omitempty"` AboutMe string `protobuf:"bytes,6,opt,name=aboutMe,proto3" json:"aboutMe,omitempty"` Ctime *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=ctime,proto3" json:"ctime,omitempty"` Birthday *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=birthday,proto3" json:"birthday,omitempty"` WechatInfo *WechatInfo `protobuf:"bytes,9,opt,name=wechatInfo,proto3" json:"wechatInfo,omitempty"` // contains filtered or unexported fields }
func (*User) Descriptor
deprecated
func (*User) GetAboutMe ¶
func (*User) GetBirthday ¶
func (x *User) GetBirthday() *timestamppb.Timestamp
func (*User) GetCtime ¶
func (x *User) GetCtime() *timestamppb.Timestamp
func (*User) GetNickname ¶
func (*User) GetPassword ¶
func (*User) GetWechatInfo ¶
func (x *User) GetWechatInfo() *WechatInfo
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
func (*User) ProtoReflect ¶
func (x *User) ProtoReflect() protoreflect.Message
type UserServiceClient ¶
type UserServiceClient interface { Signup(ctx context.Context, in *SignupRequest, opts ...grpc.CallOption) (*SignupResponse, error) FindOrCreate(ctx context.Context, in *FindOrCreateRequest, opts ...grpc.CallOption) (*FindOrCreateResponse, error) Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*LoginResponse, error) Profile(ctx context.Context, in *ProfileRequest, opts ...grpc.CallOption) (*ProfileResponse, error) UpdateNonSensitiveInfo(ctx context.Context, in *UpdateNonSensitiveInfoRequest, opts ...grpc.CallOption) (*UpdateNonSensitiveInfoResponse, error) FindOrCreateByWechat(ctx context.Context, in *FindOrCreateByWechatRequest, opts ...grpc.CallOption) (*FindOrCreateByWechatResponse, 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 { Signup(context.Context, *SignupRequest) (*SignupResponse, error) FindOrCreate(context.Context, *FindOrCreateRequest) (*FindOrCreateResponse, error) Login(context.Context, *LoginRequest) (*LoginResponse, error) Profile(context.Context, *ProfileRequest) (*ProfileResponse, error) UpdateNonSensitiveInfo(context.Context, *UpdateNonSensitiveInfoRequest) (*UpdateNonSensitiveInfoResponse, error) FindOrCreateByWechat(context.Context, *FindOrCreateByWechatRequest) (*FindOrCreateByWechatResponse, error) // contains filtered or unexported methods }
UserServiceServer is the server API for UserService service. All implementations must embed UnimplementedUserServiceServer for forward compatibility.
type WechatInfo ¶
type WechatInfo struct { OpenId string `protobuf:"bytes,1,opt,name=openId,proto3" json:"openId,omitempty"` UnionId string `protobuf:"bytes,2,opt,name=unionId,proto3" json:"unionId,omitempty"` // contains filtered or unexported fields }
func (*WechatInfo) Descriptor
deprecated
func (*WechatInfo) Descriptor() ([]byte, []int)
Deprecated: Use WechatInfo.ProtoReflect.Descriptor instead.
func (*WechatInfo) GetOpenId ¶
func (x *WechatInfo) GetOpenId() string
func (*WechatInfo) GetUnionId ¶
func (x *WechatInfo) GetUnionId() string
func (*WechatInfo) ProtoMessage ¶
func (*WechatInfo) ProtoMessage()
func (*WechatInfo) ProtoReflect ¶
func (x *WechatInfo) ProtoReflect() protoreflect.Message
func (*WechatInfo) Reset ¶
func (x *WechatInfo) Reset()
func (*WechatInfo) String ¶
func (x *WechatInfo) String() string