v1

package
v0.0.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 19, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FriendService_AddGroup_FullMethodName    = "/planetmsg.users.v1.FriendService/AddGroup"
	FriendService_SearchUsers_FullMethodName = "/planetmsg.users.v1.FriendService/SearchUsers"
)
View Source
const (
	SignUpService_AddUser_FullMethodName        = "/planetmsg.users.v1.SignUpService/AddUser"
	SignUpService_RequestValid_FullMethodName   = "/planetmsg.users.v1.SignUpService/RequestValid"
	SignUpService_CheckValidCode_FullMethodName = "/planetmsg.users.v1.SignUpService/CheckValidCode"
	SignUpService_Login_FullMethodName          = "/planetmsg.users.v1.SignUpService/Login"
)
View Source
const (
	UserService_GetUserInfo_FullMethodName      = "/planetmsg.users.v1.UserService/GetUserInfo"
	UserService_UpdateUserSingle_FullMethodName = "/planetmsg.users.v1.UserService/UpdateUserSingle"
	UserService_UpdateUser_FullMethodName       = "/planetmsg.users.v1.UserService/UpdateUser"
)

Variables

View Source
var File_planetmsg_users_v1_base_proto protoreflect.FileDescriptor
View Source
var File_planetmsg_users_v1_friend_service_proto protoreflect.FileDescriptor
View Source
var File_planetmsg_users_v1_sign_up_service_proto protoreflect.FileDescriptor
View Source
var File_planetmsg_users_v1_user_service_proto protoreflect.FileDescriptor
View Source
var FriendService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "planetmsg.users.v1.FriendService",
	HandlerType: (*FriendServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "AddGroup",
			Handler:    _FriendService_AddGroup_Handler,
		},
		{
			MethodName: "SearchUsers",
			Handler:    _FriendService_SearchUsers_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "planetmsg/users/v1/friend_service.proto",
}

FriendService_ServiceDesc is the grpc.ServiceDesc for FriendService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var SignUpService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "planetmsg.users.v1.SignUpService",
	HandlerType: (*SignUpServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "AddUser",
			Handler:    _SignUpService_AddUser_Handler,
		},
		{
			MethodName: "RequestValid",
			Handler:    _SignUpService_RequestValid_Handler,
		},
		{
			MethodName: "CheckValidCode",
			Handler:    _SignUpService_CheckValidCode_Handler,
		},
		{
			MethodName: "Login",
			Handler:    _SignUpService_Login_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "planetmsg/users/v1/sign_up_service.proto",
}

SignUpService_ServiceDesc is the grpc.ServiceDesc for SignUpService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var UserService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "planetmsg.users.v1.UserService",
	HandlerType: (*UserServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetUserInfo",
			Handler:    _UserService_GetUserInfo_Handler,
		},
		{
			MethodName: "UpdateUserSingle",
			Handler:    _UserService_UpdateUserSingle_Handler,
		},
		{
			MethodName: "UpdateUser",
			Handler:    _UserService_UpdateUser_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "planetmsg/users/v1/user_service.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 RegisterFriendServiceServer

func RegisterFriendServiceServer(s grpc.ServiceRegistrar, srv FriendServiceServer)

func RegisterSignUpServiceServer

func RegisterSignUpServiceServer(s grpc.ServiceRegistrar, srv SignUpServiceServer)

func RegisterUserServiceServer

func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer)

Types

type CheckEmailReq

type CheckEmailReq struct {
	Email     string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"`
	VaildCode string `protobuf:"bytes,2,opt,name=vaildCode,proto3" json:"vaildCode,omitempty"`
	// contains filtered or unexported fields
}

func (*CheckEmailReq) Descriptor deprecated

func (*CheckEmailReq) Descriptor() ([]byte, []int)

Deprecated: Use CheckEmailReq.ProtoReflect.Descriptor instead.

func (*CheckEmailReq) GetEmail

func (x *CheckEmailReq) GetEmail() string

func (*CheckEmailReq) GetVaildCode

func (x *CheckEmailReq) GetVaildCode() string

func (*CheckEmailReq) ProtoMessage

func (*CheckEmailReq) ProtoMessage()

func (*CheckEmailReq) ProtoReflect

func (x *CheckEmailReq) ProtoReflect() protoreflect.Message

func (*CheckEmailReq) Reset

func (x *CheckEmailReq) Reset()

func (*CheckEmailReq) String

func (x *CheckEmailReq) String() string

type EmailReq

type EmailReq struct {
	Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"`
	// contains filtered or unexported fields
}

func (*EmailReq) Descriptor deprecated

func (*EmailReq) Descriptor() ([]byte, []int)

Deprecated: Use EmailReq.ProtoReflect.Descriptor instead.

func (*EmailReq) GetEmail

func (x *EmailReq) GetEmail() string

func (*EmailReq) ProtoMessage

func (*EmailReq) ProtoMessage()

func (*EmailReq) ProtoReflect

func (x *EmailReq) ProtoReflect() protoreflect.Message

func (*EmailReq) Reset

func (x *EmailReq) Reset()

func (*EmailReq) String

func (x *EmailReq) String() string

type FriendServiceClient

type FriendServiceClient interface {
	// 添加分组
	AddGroup(ctx context.Context, in *GroupReq, opts ...grpc.CallOption) (*MsgRsp, error)
	// 按昵称查找用户
	SearchUsers(ctx context.Context, in *NickReq, opts ...grpc.CallOption) (*User, error)
}

FriendServiceClient is the client API for FriendService 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.

type FriendServiceServer

type FriendServiceServer interface {
	// 添加分组
	AddGroup(context.Context, *GroupReq) (*MsgRsp, error)
	// 按昵称查找用户
	SearchUsers(context.Context, *NickReq) (*User, error)
	// contains filtered or unexported methods
}

FriendServiceServer is the server API for FriendService service. All implementations must embed UnimplementedFriendServiceServer for forward compatibility

type GroupReq

type GroupReq struct {
	GroupName string `protobuf:"bytes,1,opt,name=groupName,proto3" json:"groupName,omitempty"`
	// contains filtered or unexported fields
}

func (*GroupReq) Descriptor deprecated

func (*GroupReq) Descriptor() ([]byte, []int)

Deprecated: Use GroupReq.ProtoReflect.Descriptor instead.

func (*GroupReq) GetGroupName

func (x *GroupReq) GetGroupName() string

func (*GroupReq) ProtoMessage

func (*GroupReq) ProtoMessage()

func (*GroupReq) ProtoReflect

func (x *GroupReq) ProtoReflect() protoreflect.Message

func (*GroupReq) Reset

func (x *GroupReq) Reset()

func (*GroupReq) String

func (x *GroupReq) String() string

type IdReq

type IdReq struct {
	UserId int32 `protobuf:"varint,1,opt,name=userId,proto3" json:"userId,omitempty"`
	// contains filtered or unexported fields
}

func (*IdReq) Descriptor deprecated

func (*IdReq) Descriptor() ([]byte, []int)

Deprecated: Use IdReq.ProtoReflect.Descriptor instead.

func (*IdReq) GetUserId

func (x *IdReq) GetUserId() int32

func (*IdReq) ProtoMessage

func (*IdReq) ProtoMessage()

func (*IdReq) ProtoReflect

func (x *IdReq) ProtoReflect() protoreflect.Message

func (*IdReq) Reset

func (x *IdReq) Reset()

func (*IdReq) String

func (x *IdReq) String() string

type LoginReq

type LoginReq struct {
	LoginName string `protobuf:"bytes,1,opt,name=loginName,proto3" json:"loginName,omitempty"`
	Pwd       string `protobuf:"bytes,2,opt,name=pwd,proto3" json:"pwd,omitempty"`
	// contains filtered or unexported fields
}

func (*LoginReq) Descriptor deprecated

func (*LoginReq) Descriptor() ([]byte, []int)

Deprecated: Use LoginReq.ProtoReflect.Descriptor instead.

func (*LoginReq) GetLoginName

func (x *LoginReq) GetLoginName() string

func (*LoginReq) GetPwd

func (x *LoginReq) GetPwd() string

func (*LoginReq) ProtoMessage

func (*LoginReq) ProtoMessage()

func (*LoginReq) ProtoReflect

func (x *LoginReq) ProtoReflect() protoreflect.Message

func (*LoginReq) Reset

func (x *LoginReq) Reset()

func (*LoginReq) String

func (x *LoginReq) String() string

type MsgRsp

type MsgRsp struct {
	Msg string `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"`
	// contains filtered or unexported fields
}

func (*MsgRsp) Descriptor deprecated

func (*MsgRsp) Descriptor() ([]byte, []int)

Deprecated: Use MsgRsp.ProtoReflect.Descriptor instead.

func (*MsgRsp) GetMsg

func (x *MsgRsp) GetMsg() string

func (*MsgRsp) ProtoMessage

func (*MsgRsp) ProtoMessage()

func (*MsgRsp) ProtoReflect

func (x *MsgRsp) ProtoReflect() protoreflect.Message

func (*MsgRsp) Reset

func (x *MsgRsp) Reset()

func (*MsgRsp) String

func (x *MsgRsp) String() string

type NickReq

type NickReq struct {
	NickName string `protobuf:"bytes,1,opt,name=nickName,proto3" json:"nickName,omitempty"`
	// contains filtered or unexported fields
}

func (*NickReq) Descriptor deprecated

func (*NickReq) Descriptor() ([]byte, []int)

Deprecated: Use NickReq.ProtoReflect.Descriptor instead.

func (*NickReq) GetNickName

func (x *NickReq) GetNickName() string

func (*NickReq) ProtoMessage

func (*NickReq) ProtoMessage()

func (*NickReq) ProtoReflect

func (x *NickReq) ProtoReflect() protoreflect.Message

func (*NickReq) Reset

func (x *NickReq) Reset()

func (*NickReq) String

func (x *NickReq) String() string

type SignUpServiceClient

type SignUpServiceClient interface {
	// 添加用户
	AddUser(ctx context.Context, in *User, opts ...grpc.CallOption) (*MsgRsp, error)
	// 申请验证码(提供用户邮箱),保存redis三分钟
	RequestValid(ctx context.Context, in *EmailReq, opts ...grpc.CallOption) (*MsgRsp, error)
	// 验证邮箱验证码
	CheckValidCode(ctx context.Context, in *CheckEmailReq, opts ...grpc.CallOption) (*MsgRsp, error)
	// 用户登陆验证
	Login(ctx context.Context, in *LoginReq, opts ...grpc.CallOption) (*TokenRsp, error)
}

SignUpServiceClient is the client API for SignUpService 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.

type SignUpServiceServer

type SignUpServiceServer interface {
	// 添加用户
	AddUser(context.Context, *User) (*MsgRsp, error)
	// 申请验证码(提供用户邮箱),保存redis三分钟
	RequestValid(context.Context, *EmailReq) (*MsgRsp, error)
	// 验证邮箱验证码
	CheckValidCode(context.Context, *CheckEmailReq) (*MsgRsp, error)
	// 用户登陆验证
	Login(context.Context, *LoginReq) (*TokenRsp, error)
	// contains filtered or unexported methods
}

SignUpServiceServer is the server API for SignUpService service. All implementations must embed UnimplementedSignUpServiceServer for forward compatibility

type TokenRsp

type TokenRsp struct {
	Atoken string `protobuf:"bytes,1,opt,name=Atoken,proto3" json:"Atoken,omitempty"`
	Rtoken string `protobuf:"bytes,2,opt,name=Rtoken,proto3" json:"Rtoken,omitempty"`
	Msg    string `protobuf:"bytes,3,opt,name=msg,proto3" json:"msg,omitempty"`
	// contains filtered or unexported fields
}

func (*TokenRsp) Descriptor deprecated

func (*TokenRsp) Descriptor() ([]byte, []int)

Deprecated: Use TokenRsp.ProtoReflect.Descriptor instead.

func (*TokenRsp) GetAtoken

func (x *TokenRsp) GetAtoken() string

func (*TokenRsp) GetMsg

func (x *TokenRsp) GetMsg() string

func (*TokenRsp) GetRtoken

func (x *TokenRsp) GetRtoken() string

func (*TokenRsp) ProtoMessage

func (*TokenRsp) ProtoMessage()

func (*TokenRsp) ProtoReflect

func (x *TokenRsp) ProtoReflect() protoreflect.Message

func (*TokenRsp) Reset

func (x *TokenRsp) Reset()

func (*TokenRsp) String

func (x *TokenRsp) String() string

type UnimplementedFriendServiceServer

type UnimplementedFriendServiceServer struct {
}

UnimplementedFriendServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedFriendServiceServer) AddGroup

func (UnimplementedFriendServiceServer) SearchUsers

type UnimplementedSignUpServiceServer

type UnimplementedSignUpServiceServer struct {
}

UnimplementedSignUpServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedSignUpServiceServer) AddUser

func (UnimplementedSignUpServiceServer) CheckValidCode

func (UnimplementedSignUpServiceServer) Login

func (UnimplementedSignUpServiceServer) RequestValid

type UnimplementedUserServiceServer

type UnimplementedUserServiceServer struct {
}

UnimplementedUserServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedUserServiceServer) GetUserInfo

func (UnimplementedUserServiceServer) UpdateUser

func (UnimplementedUserServiceServer) UpdateUserSingle

type UnsafeFriendServiceServer

type UnsafeFriendServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeFriendServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to FriendServiceServer will result in compilation errors.

type UnsafeSignUpServiceServer

type UnsafeSignUpServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeSignUpServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to SignUpServiceServer will result in compilation errors.

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 UpdateSingleReq

type UpdateSingleReq struct {
	UpdateKey string `protobuf:"bytes,1,opt,name=updateKey,proto3" json:"updateKey,omitempty"`
	User      *User  `protobuf:"bytes,2,opt,name=user,proto3" json:"user,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdateSingleReq) Descriptor deprecated

func (*UpdateSingleReq) Descriptor() ([]byte, []int)

Deprecated: Use UpdateSingleReq.ProtoReflect.Descriptor instead.

func (*UpdateSingleReq) GetUpdateKey

func (x *UpdateSingleReq) GetUpdateKey() string

func (*UpdateSingleReq) GetUser

func (x *UpdateSingleReq) GetUser() *User

func (*UpdateSingleReq) ProtoMessage

func (*UpdateSingleReq) ProtoMessage()

func (*UpdateSingleReq) ProtoReflect

func (x *UpdateSingleReq) ProtoReflect() protoreflect.Message

func (*UpdateSingleReq) Reset

func (x *UpdateSingleReq) Reset()

func (*UpdateSingleReq) String

func (x *UpdateSingleReq) String() string

type User

type User struct {
	Id            int32  `protobuf:"varint,1,opt,name=Id,proto3" json:"Id,omitempty"`
	Account       string `protobuf:"bytes,2,opt,name=Account,proto3" json:"Account,omitempty"`
	NickName      string `protobuf:"bytes,3,opt,name=NickName,proto3" json:"NickName,omitempty"`
	Pwd           string `protobuf:"bytes,4,opt,name=Pwd,proto3" json:"Pwd,omitempty"`
	Email         string `protobuf:"bytes,5,opt,name=Email,proto3" json:"Email,omitempty"`
	Phone         string `protobuf:"bytes,6,opt,name=Phone,proto3" json:"Phone,omitempty"`
	PicUrl        string `protobuf:"bytes,7,opt,name=PicUrl,proto3" json:"PicUrl,omitempty"`
	BirthDay      int64  `protobuf:"varint,8,opt,name=BirthDay,proto3" json:"BirthDay,omitempty"`
	CreateTime    int64  `protobuf:"varint,9,opt,name=CreateTime,proto3" json:"CreateTime,omitempty"`
	Status        int32  `protobuf:"varint,10,opt,name=Status,proto3" json:"Status,omitempty"`
	LastLoginTime int64  `protobuf:"varint,11,opt,name=LastLoginTime,proto3" json:"LastLoginTime,omitempty"`
	// contains filtered or unexported fields
}

func (*User) Descriptor deprecated

func (*User) Descriptor() ([]byte, []int)

Deprecated: Use User.ProtoReflect.Descriptor instead.

func (*User) GetAccount

func (x *User) GetAccount() string

func (*User) GetBirthDay

func (x *User) GetBirthDay() int64

func (*User) GetCreateTime

func (x *User) GetCreateTime() int64

func (*User) GetEmail

func (x *User) GetEmail() string

func (*User) GetId

func (x *User) GetId() int32

func (*User) GetLastLoginTime

func (x *User) GetLastLoginTime() int64

func (*User) GetNickName

func (x *User) GetNickName() string

func (*User) GetPhone

func (x *User) GetPhone() string

func (*User) GetPicUrl

func (x *User) GetPicUrl() string

func (*User) GetPwd

func (x *User) GetPwd() string

func (*User) GetStatus

func (x *User) GetStatus() int32

func (*User) ProtoMessage

func (*User) ProtoMessage()

func (*User) ProtoReflect

func (x *User) ProtoReflect() protoreflect.Message

func (*User) Reset

func (x *User) Reset()

func (*User) String

func (x *User) String() string

type UserServiceClient

type UserServiceClient interface {
	// 查询用户
	GetUserInfo(ctx context.Context, in *IdReq, opts ...grpc.CallOption) (*User, error)
	// 通过字段修改用户信息
	UpdateUserSingle(ctx context.Context, in *UpdateSingleReq, opts ...grpc.CallOption) (*MsgRsp, error)
	// 修改用户信息
	UpdateUser(ctx context.Context, in *User, opts ...grpc.CallOption) (*MsgRsp, 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.

type UserServiceServer

type UserServiceServer interface {
	// 查询用户
	GetUserInfo(context.Context, *IdReq) (*User, error)
	// 通过字段修改用户信息
	UpdateUserSingle(context.Context, *UpdateSingleReq) (*MsgRsp, error)
	// 修改用户信息
	UpdateUser(context.Context, *User) (*MsgRsp, error)
	// contains filtered or unexported methods
}

UserServiceServer is the server API for UserService service. All implementations must embed UnimplementedUserServiceServer for forward compatibility

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL