init
This commit is contained in:
commit
ee2718a1d0
17 files changed
+5264
No files matched your search
@@ -0,0 +1,26 @@
|
||||
package client
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"example.com/layout/proto/discovery"
|
||||
"example.com/layout/proto/xt-user/proto/user"
|
||||
)
|
||||
|
||||
type XtUserClient struct {
|
||||
User user.UserClient
|
||||
connection *discovery.Connection
|
||||
}
|
||||
|
||||
func NewXtUserClient(etcdAddr string) (*XtUserClient, error) {
|
||||
connection, err := discovery.Dial(discovery.Config{
|
||||
Endpoints: []string{etcdAddr},
|
||||
DialTimeout: 5 * time.Second,
|
||||
}, "micro.xt_user")
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &XtUserClient{User: user.NewUserClient(connection.Conn), connection: connection}, nil
|
||||
}
|
||||
|
||||
func (client *XtUserClient) Close() error { return client.connection.Close() }
|
||||
@@ -0,0 +1 @@
|
||||
protoc --go_out=. --go_opt=paths=source_relative --go-grpc_out=. --go-grpc_opt=paths=source_relative xt-user/proto/user/user.prot
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,348 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package micro.xt_user.user;
|
||||
import "google/protobuf/empty.proto";
|
||||
option go_package = "example.com/layout/proto/xt-user/proto/user";
|
||||
|
||||
service User {
|
||||
// 查询账号是否已注册
|
||||
rpc Exists(ExistsRequest) returns (ExistsResponse) {}
|
||||
// 查询用户信息
|
||||
rpc QueryInfo(QueryInfoRequest) returns (QueryInfoResponse) {}
|
||||
// 查询用户信息
|
||||
rpc QueryIdentity(QueryIdentityRequest) returns (QueryIdentityResponse) {}
|
||||
// 查询用户归属信息
|
||||
rpc QueryBelong(QueryBelongRequest) returns (QueryBelongResponse) {}
|
||||
// 批量查询用户(头像,昵称)
|
||||
rpc FindUserInfo(FindUserInfoRequest) returns (FindUserInfoResponse) {}
|
||||
// 批量查询用户(根据不同渠道显示不同的账号)
|
||||
rpc FindUserDisplay(FindUserDisplayRequest) returns (FindUserDisplayResponse) {}
|
||||
// 下拉框专属列表
|
||||
rpc FindSelect(FindSelectRequest) returns (FindSelectResponse) {}
|
||||
// Deprecated: 20240516 迁移到 user_list 下 分页查询用户列表
|
||||
rpc FindByPage(FindByPageRequest) returns (FindByPageResponse) {}
|
||||
// 批量查询用户,按identity
|
||||
rpc FindUserInfoByIdentity(FindUserInfoByIdentityRequest) returns (FindUserInfoByIdentityResponse) {}
|
||||
|
||||
// 更新账号可用状态
|
||||
rpc UpdateEnable(UpdateEnableRequest) returns (google.protobuf.Empty) {}
|
||||
// 更新姓名
|
||||
rpc UpdateName(UpdateNameRequest) returns (google.protobuf.Empty) {}
|
||||
// 更新昵称
|
||||
rpc UpdateNickname(UpdateNicknameRequest) returns (google.protobuf.Empty) {}
|
||||
// 更新头像
|
||||
rpc UpdateAvatar(UpdateAvatarRequest) returns (google.protobuf.Empty) {}
|
||||
// 更新创建者
|
||||
rpc UpdateCreator(UpdateCreatorRequest) returns (google.protobuf.Empty) {}
|
||||
// 更新最后修改者
|
||||
rpc UpdateLastModifier(UpdateLastModifierRequest) returns (google.protobuf.Empty) {}
|
||||
// 更新最后访问时间
|
||||
rpc UpdateAccessed(UpdateAccessedRequest) returns (google.protobuf.Empty) {}
|
||||
// 搜索手机号和昵称
|
||||
rpc SearchMemberInfo(SearchMemberInfoRequest) returns (SearchMemberInfoResponse) {}
|
||||
// 更新用户信息
|
||||
rpc UpdateUserInfo(UpdateUserInfoRequest) returns (UpdateUserInfoResponse) {}
|
||||
// 推广用户数量
|
||||
rpc CountPromoterByInviteCode(CountPromoterByInviteCodeRequest) returns (CountPromoterByInviteCodeResponse) {}
|
||||
// 根据推广码获取用户
|
||||
rpc GetUserByInviteCode(GetUserByInviteCodeRequest) returns (GetUserByInviteCodeResponse) {}
|
||||
// 获取推广上级
|
||||
rpc GetPromoter(GetPromoterRequest) returns (GetPromoterResponse) {}
|
||||
}
|
||||
|
||||
message SearchMemberInfoRequest {
|
||||
repeated string uids = 1;
|
||||
string phone = 2;
|
||||
string nickname = 3;
|
||||
string email = 4;
|
||||
}
|
||||
|
||||
message SearchMemberInfoResponse {
|
||||
repeated string uids = 1;
|
||||
}
|
||||
|
||||
// Exists
|
||||
|
||||
message ExistsRequest {
|
||||
int64 identity = 1;
|
||||
string uid = 2;
|
||||
}
|
||||
|
||||
message ExistsResponse {
|
||||
bool result = 1;
|
||||
}
|
||||
|
||||
// QueryInfo
|
||||
|
||||
message QueryInfoRequest {
|
||||
int64 identity = 1;
|
||||
string uid = 2;
|
||||
repeated string fields = 3;
|
||||
}
|
||||
|
||||
message QueryInfoResponse {
|
||||
bool exists = 1;
|
||||
MemberItem item = 2;
|
||||
}
|
||||
|
||||
// QueryIdentity
|
||||
|
||||
message QueryIdentityRequest {
|
||||
int64 identity = 1;
|
||||
string uid = 2;
|
||||
}
|
||||
|
||||
message QueryIdentityResponse {
|
||||
bool exists = 1;
|
||||
MemberIdentityItem item = 2;
|
||||
}
|
||||
|
||||
// QueryBelong
|
||||
|
||||
message QueryBelongRequest {
|
||||
int64 identity = 1;
|
||||
string uid = 2;
|
||||
}
|
||||
|
||||
message QueryBelongResponse {
|
||||
bool exists = 1;
|
||||
MemberBelongItem item = 2;
|
||||
}
|
||||
|
||||
// FindUserInfo
|
||||
|
||||
message FindUserInfoRequest {
|
||||
int64 identity = 1;
|
||||
repeated string uids = 2;
|
||||
}
|
||||
|
||||
message FindUserInfoResponse {
|
||||
repeated MemberItem items = 1;
|
||||
}
|
||||
|
||||
// FindUserDisplay
|
||||
|
||||
message FindUserDisplayRequest {
|
||||
int64 identity = 1;
|
||||
repeated string uids = 2;
|
||||
}
|
||||
|
||||
message FindUserDisplayResponse {
|
||||
repeated MemberDisplayItem items = 1;
|
||||
}
|
||||
|
||||
// FindSelect
|
||||
|
||||
message FindSelectRequest {
|
||||
int64 identity = 1;
|
||||
}
|
||||
|
||||
message FindSelectResponse {
|
||||
repeated MemberItem items = 1;
|
||||
}
|
||||
|
||||
// FindByPage
|
||||
|
||||
message FindByPageRequest {
|
||||
int64 identity = 1;
|
||||
int32 limit = 2;
|
||||
int32 page = 3;
|
||||
string uid = 4;
|
||||
string name = 5;
|
||||
string username = 6;
|
||||
string nickname = 7;
|
||||
string phone = 8;
|
||||
string contact_phone = 9;
|
||||
int64 enable = 10;
|
||||
int64 created_at_start = 11;
|
||||
int64 created_at_end = 12;
|
||||
int64 logined_at_start = 13;
|
||||
int64 logined_at_end = 14;
|
||||
string market_source = 15;
|
||||
int64 role_id = 16;
|
||||
int64 test = 17;
|
||||
int64 market_source_is_empty = 18;
|
||||
repeated string uids = 19;
|
||||
int64 os = 20;
|
||||
int64 register_source = 21;
|
||||
}
|
||||
|
||||
message FindByPageResponse {
|
||||
int64 total = 1;
|
||||
repeated MemberItem items = 2;
|
||||
}
|
||||
|
||||
// UpdateEnable
|
||||
|
||||
message UpdateEnableRequest {
|
||||
int64 identity = 1;
|
||||
string uid = 2;
|
||||
int64 enable = 3;
|
||||
}
|
||||
|
||||
// UpdateName
|
||||
|
||||
message UpdateNameRequest {
|
||||
int64 identity = 1;
|
||||
string uid = 2;
|
||||
string name = 3;
|
||||
}
|
||||
|
||||
// UpdateNickname
|
||||
|
||||
message UpdateNicknameRequest {
|
||||
int64 identity = 1;
|
||||
string uid = 2;
|
||||
string nickname = 3;
|
||||
}
|
||||
|
||||
// UpdateAvatar
|
||||
|
||||
message UpdateAvatarRequest {
|
||||
int64 identity = 1;
|
||||
string uid = 2;
|
||||
string avatar = 3;
|
||||
}
|
||||
|
||||
// UpdateCreator
|
||||
|
||||
message UpdateCreatorRequest {
|
||||
int64 identity = 1;
|
||||
string uid = 2;
|
||||
string creator = 3;
|
||||
string creator_uid = 4;
|
||||
}
|
||||
|
||||
// UpdateLastModifier
|
||||
|
||||
message UpdateLastModifierRequest {
|
||||
int64 identity = 1;
|
||||
string uid = 2;
|
||||
string modifier = 3;
|
||||
}
|
||||
|
||||
// UpdateAccessed
|
||||
|
||||
message UpdateAccessedRequest {
|
||||
int64 identity = 1;
|
||||
string uid = 2;
|
||||
}
|
||||
|
||||
message MemberItem {
|
||||
int64 id = 1;
|
||||
string uid = 2;
|
||||
string phone = 3; // 明文
|
||||
string name = 4;
|
||||
string username = 5;
|
||||
string nickname = 6;
|
||||
string contact_phone = 7;
|
||||
int64 enable = 8;
|
||||
int64 register_source = 9;
|
||||
int64 created_at = 10;
|
||||
int64 logined_at = 11;
|
||||
string creator = 12;
|
||||
string last_modifier = 13;
|
||||
int64 modified_at = 14;
|
||||
string market_source = 15;
|
||||
int64 test = 16;
|
||||
int64 accessed_at = 17;
|
||||
string avatar = 18;
|
||||
string creator_uid = 19;
|
||||
bool nickname_init = 20;
|
||||
int64 os = 21;
|
||||
string app_id = 22;
|
||||
string open_id = 23;
|
||||
string extra1 = 24;
|
||||
string phone_hidden = 25; // 隐藏
|
||||
}
|
||||
|
||||
message MemberIdentityItem {
|
||||
string uid = 1;
|
||||
string name = 2;
|
||||
string nickname = 3;
|
||||
string avatar = 4;
|
||||
int64 enable = 5;
|
||||
int64 register_source = 6;
|
||||
string market_source = 7;
|
||||
bool nickname_init = 10;
|
||||
int64 created_at = 20;
|
||||
string invite_code = 21;
|
||||
int32 is_promoter = 22;
|
||||
string wechat_qrcode = 23;
|
||||
}
|
||||
|
||||
message MemberMiniItem {
|
||||
int64 id = 1;
|
||||
string uid = 2;
|
||||
}
|
||||
|
||||
message MemberDisplayItem {
|
||||
string uid = 1;
|
||||
string display_name = 2;
|
||||
}
|
||||
|
||||
message MemberBelongItem {
|
||||
string belong_uid = 1;
|
||||
int64 belong_identity = 2;
|
||||
}
|
||||
|
||||
message BelongReqItem{
|
||||
string uid = 1;
|
||||
int64 identity = 2;
|
||||
}
|
||||
|
||||
message FindUserInfoByIdentityRequest{
|
||||
repeated BelongReqItem uid_items = 2;
|
||||
}
|
||||
|
||||
message FindUserInfoByIdentityResponse{
|
||||
repeated BelongRespItem items = 1;
|
||||
}
|
||||
|
||||
message BelongRespItem {
|
||||
string uid = 1;
|
||||
string name = 2;
|
||||
string username = 3;
|
||||
string nickname = 4;
|
||||
int64 identity = 5;
|
||||
}
|
||||
|
||||
// UpdateUserInfo
|
||||
message UpdateUserInfoRequest {
|
||||
int32 is_promoter = 1;
|
||||
string wechat_qrcode = 2;
|
||||
int64 identity = 3;
|
||||
string uid = 4;
|
||||
}
|
||||
|
||||
message UpdateUserInfoResponse {
|
||||
|
||||
}
|
||||
|
||||
// CountPromoterByInviteCode
|
||||
message CountPromoterByInviteCodeRequest{
|
||||
string uid = 1;
|
||||
int64 identity = 2;
|
||||
}
|
||||
message CountPromoterByInviteCodeResponse {
|
||||
int64 count = 1;
|
||||
}
|
||||
|
||||
// GetUserByInviteCode
|
||||
message GetUserByInviteCodeRequest{
|
||||
string invite_code = 1;
|
||||
int64 identity = 2;
|
||||
}
|
||||
message GetUserByInviteCodeResponse {
|
||||
MemberIdentityItem item = 1;
|
||||
bool exists = 2;
|
||||
}
|
||||
// GetPromoter
|
||||
message GetPromoterRequest{
|
||||
string uid = 1;
|
||||
int64 identity = 2;
|
||||
}
|
||||
message GetPromoterResponse {
|
||||
MemberIdentityItem item = 1;
|
||||
bool exists = 2;
|
||||
}
|
||||
@@ -0,0 +1,924 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.5.1
|
||||
// - protoc v7.34.0
|
||||
// source: xt-user/proto/user/user.proto
|
||||
|
||||
package user
|
||||
|
||||
import (
|
||||
context "context"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
emptypb "google.golang.org/protobuf/types/known/emptypb"
|
||||
)
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
// Requires gRPC-Go v1.64.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion9
|
||||
|
||||
const (
|
||||
User_Exists_FullMethodName = "/micro.xt_user.user.User/Exists"
|
||||
User_QueryInfo_FullMethodName = "/micro.xt_user.user.User/QueryInfo"
|
||||
User_QueryIdentity_FullMethodName = "/micro.xt_user.user.User/QueryIdentity"
|
||||
User_QueryBelong_FullMethodName = "/micro.xt_user.user.User/QueryBelong"
|
||||
User_FindUserInfo_FullMethodName = "/micro.xt_user.user.User/FindUserInfo"
|
||||
User_FindUserDisplay_FullMethodName = "/micro.xt_user.user.User/FindUserDisplay"
|
||||
User_FindSelect_FullMethodName = "/micro.xt_user.user.User/FindSelect"
|
||||
User_FindByPage_FullMethodName = "/micro.xt_user.user.User/FindByPage"
|
||||
User_FindUserInfoByIdentity_FullMethodName = "/micro.xt_user.user.User/FindUserInfoByIdentity"
|
||||
User_UpdateEnable_FullMethodName = "/micro.xt_user.user.User/UpdateEnable"
|
||||
User_UpdateName_FullMethodName = "/micro.xt_user.user.User/UpdateName"
|
||||
User_UpdateNickname_FullMethodName = "/micro.xt_user.user.User/UpdateNickname"
|
||||
User_UpdateAvatar_FullMethodName = "/micro.xt_user.user.User/UpdateAvatar"
|
||||
User_UpdateCreator_FullMethodName = "/micro.xt_user.user.User/UpdateCreator"
|
||||
User_UpdateLastModifier_FullMethodName = "/micro.xt_user.user.User/UpdateLastModifier"
|
||||
User_UpdateAccessed_FullMethodName = "/micro.xt_user.user.User/UpdateAccessed"
|
||||
User_SearchMemberInfo_FullMethodName = "/micro.xt_user.user.User/SearchMemberInfo"
|
||||
User_UpdateUserInfo_FullMethodName = "/micro.xt_user.user.User/UpdateUserInfo"
|
||||
User_CountPromoterByInviteCode_FullMethodName = "/micro.xt_user.user.User/CountPromoterByInviteCode"
|
||||
User_GetUserByInviteCode_FullMethodName = "/micro.xt_user.user.User/GetUserByInviteCode"
|
||||
User_GetPromoter_FullMethodName = "/micro.xt_user.user.User/GetPromoter"
|
||||
)
|
||||
|
||||
// UserClient is the client API for User 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 UserClient interface {
|
||||
// 查询账号是否已注册
|
||||
Exists(ctx context.Context, in *ExistsRequest, opts ...grpc.CallOption) (*ExistsResponse, error)
|
||||
// 查询用户信息
|
||||
QueryInfo(ctx context.Context, in *QueryInfoRequest, opts ...grpc.CallOption) (*QueryInfoResponse, error)
|
||||
// 查询用户信息
|
||||
QueryIdentity(ctx context.Context, in *QueryIdentityRequest, opts ...grpc.CallOption) (*QueryIdentityResponse, error)
|
||||
// 查询用户归属信息
|
||||
QueryBelong(ctx context.Context, in *QueryBelongRequest, opts ...grpc.CallOption) (*QueryBelongResponse, error)
|
||||
// 批量查询用户(头像,昵称)
|
||||
FindUserInfo(ctx context.Context, in *FindUserInfoRequest, opts ...grpc.CallOption) (*FindUserInfoResponse, error)
|
||||
// 批量查询用户(根据不同渠道显示不同的账号)
|
||||
FindUserDisplay(ctx context.Context, in *FindUserDisplayRequest, opts ...grpc.CallOption) (*FindUserDisplayResponse, error)
|
||||
// 下拉框专属列表
|
||||
FindSelect(ctx context.Context, in *FindSelectRequest, opts ...grpc.CallOption) (*FindSelectResponse, error)
|
||||
// Deprecated: 20240516 迁移到 user_list 下 分页查询用户列表
|
||||
FindByPage(ctx context.Context, in *FindByPageRequest, opts ...grpc.CallOption) (*FindByPageResponse, error)
|
||||
// 批量查询用户,按identity
|
||||
FindUserInfoByIdentity(ctx context.Context, in *FindUserInfoByIdentityRequest, opts ...grpc.CallOption) (*FindUserInfoByIdentityResponse, error)
|
||||
// 更新账号可用状态
|
||||
UpdateEnable(ctx context.Context, in *UpdateEnableRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
|
||||
// 更新姓名
|
||||
UpdateName(ctx context.Context, in *UpdateNameRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
|
||||
// 更新昵称
|
||||
UpdateNickname(ctx context.Context, in *UpdateNicknameRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
|
||||
// 更新头像
|
||||
UpdateAvatar(ctx context.Context, in *UpdateAvatarRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
|
||||
// 更新创建者
|
||||
UpdateCreator(ctx context.Context, in *UpdateCreatorRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
|
||||
// 更新最后修改者
|
||||
UpdateLastModifier(ctx context.Context, in *UpdateLastModifierRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
|
||||
// 更新最后访问时间
|
||||
UpdateAccessed(ctx context.Context, in *UpdateAccessedRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
|
||||
// 搜索手机号和昵称
|
||||
SearchMemberInfo(ctx context.Context, in *SearchMemberInfoRequest, opts ...grpc.CallOption) (*SearchMemberInfoResponse, error)
|
||||
// 更新用户信息
|
||||
UpdateUserInfo(ctx context.Context, in *UpdateUserInfoRequest, opts ...grpc.CallOption) (*UpdateUserInfoResponse, error)
|
||||
// 推广用户数量
|
||||
CountPromoterByInviteCode(ctx context.Context, in *CountPromoterByInviteCodeRequest, opts ...grpc.CallOption) (*CountPromoterByInviteCodeResponse, error)
|
||||
// 根据推广码获取用户
|
||||
GetUserByInviteCode(ctx context.Context, in *GetUserByInviteCodeRequest, opts ...grpc.CallOption) (*GetUserByInviteCodeResponse, error)
|
||||
// 获取推广上级
|
||||
GetPromoter(ctx context.Context, in *GetPromoterRequest, opts ...grpc.CallOption) (*GetPromoterResponse, error)
|
||||
}
|
||||
|
||||
type userClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewUserClient(cc grpc.ClientConnInterface) UserClient {
|
||||
return &userClient{cc}
|
||||
}
|
||||
|
||||
func (c *userClient) Exists(ctx context.Context, in *ExistsRequest, opts ...grpc.CallOption) (*ExistsResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(ExistsResponse)
|
||||
err := c.cc.Invoke(ctx, User_Exists_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *userClient) QueryInfo(ctx context.Context, in *QueryInfoRequest, opts ...grpc.CallOption) (*QueryInfoResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(QueryInfoResponse)
|
||||
err := c.cc.Invoke(ctx, User_QueryInfo_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *userClient) QueryIdentity(ctx context.Context, in *QueryIdentityRequest, opts ...grpc.CallOption) (*QueryIdentityResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(QueryIdentityResponse)
|
||||
err := c.cc.Invoke(ctx, User_QueryIdentity_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *userClient) QueryBelong(ctx context.Context, in *QueryBelongRequest, opts ...grpc.CallOption) (*QueryBelongResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(QueryBelongResponse)
|
||||
err := c.cc.Invoke(ctx, User_QueryBelong_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *userClient) FindUserInfo(ctx context.Context, in *FindUserInfoRequest, opts ...grpc.CallOption) (*FindUserInfoResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(FindUserInfoResponse)
|
||||
err := c.cc.Invoke(ctx, User_FindUserInfo_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *userClient) FindUserDisplay(ctx context.Context, in *FindUserDisplayRequest, opts ...grpc.CallOption) (*FindUserDisplayResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(FindUserDisplayResponse)
|
||||
err := c.cc.Invoke(ctx, User_FindUserDisplay_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *userClient) FindSelect(ctx context.Context, in *FindSelectRequest, opts ...grpc.CallOption) (*FindSelectResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(FindSelectResponse)
|
||||
err := c.cc.Invoke(ctx, User_FindSelect_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *userClient) FindByPage(ctx context.Context, in *FindByPageRequest, opts ...grpc.CallOption) (*FindByPageResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(FindByPageResponse)
|
||||
err := c.cc.Invoke(ctx, User_FindByPage_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *userClient) FindUserInfoByIdentity(ctx context.Context, in *FindUserInfoByIdentityRequest, opts ...grpc.CallOption) (*FindUserInfoByIdentityResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(FindUserInfoByIdentityResponse)
|
||||
err := c.cc.Invoke(ctx, User_FindUserInfoByIdentity_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *userClient) UpdateEnable(ctx context.Context, in *UpdateEnableRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(emptypb.Empty)
|
||||
err := c.cc.Invoke(ctx, User_UpdateEnable_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *userClient) UpdateName(ctx context.Context, in *UpdateNameRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(emptypb.Empty)
|
||||
err := c.cc.Invoke(ctx, User_UpdateName_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *userClient) UpdateNickname(ctx context.Context, in *UpdateNicknameRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(emptypb.Empty)
|
||||
err := c.cc.Invoke(ctx, User_UpdateNickname_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *userClient) UpdateAvatar(ctx context.Context, in *UpdateAvatarRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(emptypb.Empty)
|
||||
err := c.cc.Invoke(ctx, User_UpdateAvatar_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *userClient) UpdateCreator(ctx context.Context, in *UpdateCreatorRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(emptypb.Empty)
|
||||
err := c.cc.Invoke(ctx, User_UpdateCreator_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *userClient) UpdateLastModifier(ctx context.Context, in *UpdateLastModifierRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(emptypb.Empty)
|
||||
err := c.cc.Invoke(ctx, User_UpdateLastModifier_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *userClient) UpdateAccessed(ctx context.Context, in *UpdateAccessedRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(emptypb.Empty)
|
||||
err := c.cc.Invoke(ctx, User_UpdateAccessed_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *userClient) SearchMemberInfo(ctx context.Context, in *SearchMemberInfoRequest, opts ...grpc.CallOption) (*SearchMemberInfoResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(SearchMemberInfoResponse)
|
||||
err := c.cc.Invoke(ctx, User_SearchMemberInfo_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *userClient) UpdateUserInfo(ctx context.Context, in *UpdateUserInfoRequest, opts ...grpc.CallOption) (*UpdateUserInfoResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(UpdateUserInfoResponse)
|
||||
err := c.cc.Invoke(ctx, User_UpdateUserInfo_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *userClient) CountPromoterByInviteCode(ctx context.Context, in *CountPromoterByInviteCodeRequest, opts ...grpc.CallOption) (*CountPromoterByInviteCodeResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(CountPromoterByInviteCodeResponse)
|
||||
err := c.cc.Invoke(ctx, User_CountPromoterByInviteCode_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *userClient) GetUserByInviteCode(ctx context.Context, in *GetUserByInviteCodeRequest, opts ...grpc.CallOption) (*GetUserByInviteCodeResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(GetUserByInviteCodeResponse)
|
||||
err := c.cc.Invoke(ctx, User_GetUserByInviteCode_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *userClient) GetPromoter(ctx context.Context, in *GetPromoterRequest, opts ...grpc.CallOption) (*GetPromoterResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(GetPromoterResponse)
|
||||
err := c.cc.Invoke(ctx, User_GetPromoter_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// UserServer is the server API for User service.
|
||||
// All implementations must embed UnimplementedUserServer
|
||||
// for forward compatibility.
|
||||
type UserServer interface {
|
||||
// 查询账号是否已注册
|
||||
Exists(context.Context, *ExistsRequest) (*ExistsResponse, error)
|
||||
// 查询用户信息
|
||||
QueryInfo(context.Context, *QueryInfoRequest) (*QueryInfoResponse, error)
|
||||
// 查询用户信息
|
||||
QueryIdentity(context.Context, *QueryIdentityRequest) (*QueryIdentityResponse, error)
|
||||
// 查询用户归属信息
|
||||
QueryBelong(context.Context, *QueryBelongRequest) (*QueryBelongResponse, error)
|
||||
// 批量查询用户(头像,昵称)
|
||||
FindUserInfo(context.Context, *FindUserInfoRequest) (*FindUserInfoResponse, error)
|
||||
// 批量查询用户(根据不同渠道显示不同的账号)
|
||||
FindUserDisplay(context.Context, *FindUserDisplayRequest) (*FindUserDisplayResponse, error)
|
||||
// 下拉框专属列表
|
||||
FindSelect(context.Context, *FindSelectRequest) (*FindSelectResponse, error)
|
||||
// Deprecated: 20240516 迁移到 user_list 下 分页查询用户列表
|
||||
FindByPage(context.Context, *FindByPageRequest) (*FindByPageResponse, error)
|
||||
// 批量查询用户,按identity
|
||||
FindUserInfoByIdentity(context.Context, *FindUserInfoByIdentityRequest) (*FindUserInfoByIdentityResponse, error)
|
||||
// 更新账号可用状态
|
||||
UpdateEnable(context.Context, *UpdateEnableRequest) (*emptypb.Empty, error)
|
||||
// 更新姓名
|
||||
UpdateName(context.Context, *UpdateNameRequest) (*emptypb.Empty, error)
|
||||
// 更新昵称
|
||||
UpdateNickname(context.Context, *UpdateNicknameRequest) (*emptypb.Empty, error)
|
||||
// 更新头像
|
||||
UpdateAvatar(context.Context, *UpdateAvatarRequest) (*emptypb.Empty, error)
|
||||
// 更新创建者
|
||||
UpdateCreator(context.Context, *UpdateCreatorRequest) (*emptypb.Empty, error)
|
||||
// 更新最后修改者
|
||||
UpdateLastModifier(context.Context, *UpdateLastModifierRequest) (*emptypb.Empty, error)
|
||||
// 更新最后访问时间
|
||||
UpdateAccessed(context.Context, *UpdateAccessedRequest) (*emptypb.Empty, error)
|
||||
// 搜索手机号和昵称
|
||||
SearchMemberInfo(context.Context, *SearchMemberInfoRequest) (*SearchMemberInfoResponse, error)
|
||||
// 更新用户信息
|
||||
UpdateUserInfo(context.Context, *UpdateUserInfoRequest) (*UpdateUserInfoResponse, error)
|
||||
// 推广用户数量
|
||||
CountPromoterByInviteCode(context.Context, *CountPromoterByInviteCodeRequest) (*CountPromoterByInviteCodeResponse, error)
|
||||
// 根据推广码获取用户
|
||||
GetUserByInviteCode(context.Context, *GetUserByInviteCodeRequest) (*GetUserByInviteCodeResponse, error)
|
||||
// 获取推广上级
|
||||
GetPromoter(context.Context, *GetPromoterRequest) (*GetPromoterResponse, error)
|
||||
mustEmbedUnimplementedUserServer()
|
||||
}
|
||||
|
||||
// UnimplementedUserServer 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.
|
||||
type UnimplementedUserServer struct{}
|
||||
|
||||
func (UnimplementedUserServer) Exists(context.Context, *ExistsRequest) (*ExistsResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Exists not implemented")
|
||||
}
|
||||
func (UnimplementedUserServer) QueryInfo(context.Context, *QueryInfoRequest) (*QueryInfoResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method QueryInfo not implemented")
|
||||
}
|
||||
func (UnimplementedUserServer) QueryIdentity(context.Context, *QueryIdentityRequest) (*QueryIdentityResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method QueryIdentity not implemented")
|
||||
}
|
||||
func (UnimplementedUserServer) QueryBelong(context.Context, *QueryBelongRequest) (*QueryBelongResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method QueryBelong not implemented")
|
||||
}
|
||||
func (UnimplementedUserServer) FindUserInfo(context.Context, *FindUserInfoRequest) (*FindUserInfoResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method FindUserInfo not implemented")
|
||||
}
|
||||
func (UnimplementedUserServer) FindUserDisplay(context.Context, *FindUserDisplayRequest) (*FindUserDisplayResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method FindUserDisplay not implemented")
|
||||
}
|
||||
func (UnimplementedUserServer) FindSelect(context.Context, *FindSelectRequest) (*FindSelectResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method FindSelect not implemented")
|
||||
}
|
||||
func (UnimplementedUserServer) FindByPage(context.Context, *FindByPageRequest) (*FindByPageResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method FindByPage not implemented")
|
||||
}
|
||||
func (UnimplementedUserServer) FindUserInfoByIdentity(context.Context, *FindUserInfoByIdentityRequest) (*FindUserInfoByIdentityResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method FindUserInfoByIdentity not implemented")
|
||||
}
|
||||
func (UnimplementedUserServer) UpdateEnable(context.Context, *UpdateEnableRequest) (*emptypb.Empty, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method UpdateEnable not implemented")
|
||||
}
|
||||
func (UnimplementedUserServer) UpdateName(context.Context, *UpdateNameRequest) (*emptypb.Empty, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method UpdateName not implemented")
|
||||
}
|
||||
func (UnimplementedUserServer) UpdateNickname(context.Context, *UpdateNicknameRequest) (*emptypb.Empty, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method UpdateNickname not implemented")
|
||||
}
|
||||
func (UnimplementedUserServer) UpdateAvatar(context.Context, *UpdateAvatarRequest) (*emptypb.Empty, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method UpdateAvatar not implemented")
|
||||
}
|
||||
func (UnimplementedUserServer) UpdateCreator(context.Context, *UpdateCreatorRequest) (*emptypb.Empty, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method UpdateCreator not implemented")
|
||||
}
|
||||
func (UnimplementedUserServer) UpdateLastModifier(context.Context, *UpdateLastModifierRequest) (*emptypb.Empty, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method UpdateLastModifier not implemented")
|
||||
}
|
||||
func (UnimplementedUserServer) UpdateAccessed(context.Context, *UpdateAccessedRequest) (*emptypb.Empty, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method UpdateAccessed not implemented")
|
||||
}
|
||||
func (UnimplementedUserServer) SearchMemberInfo(context.Context, *SearchMemberInfoRequest) (*SearchMemberInfoResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method SearchMemberInfo not implemented")
|
||||
}
|
||||
func (UnimplementedUserServer) UpdateUserInfo(context.Context, *UpdateUserInfoRequest) (*UpdateUserInfoResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method UpdateUserInfo not implemented")
|
||||
}
|
||||
func (UnimplementedUserServer) CountPromoterByInviteCode(context.Context, *CountPromoterByInviteCodeRequest) (*CountPromoterByInviteCodeResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method CountPromoterByInviteCode not implemented")
|
||||
}
|
||||
func (UnimplementedUserServer) GetUserByInviteCode(context.Context, *GetUserByInviteCodeRequest) (*GetUserByInviteCodeResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetUserByInviteCode not implemented")
|
||||
}
|
||||
func (UnimplementedUserServer) GetPromoter(context.Context, *GetPromoterRequest) (*GetPromoterResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetPromoter not implemented")
|
||||
}
|
||||
func (UnimplementedUserServer) mustEmbedUnimplementedUserServer() {}
|
||||
func (UnimplementedUserServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafeUserServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to UserServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeUserServer interface {
|
||||
mustEmbedUnimplementedUserServer()
|
||||
}
|
||||
|
||||
func RegisterUserServer(s grpc.ServiceRegistrar, srv UserServer) {
|
||||
// If the following call pancis, it indicates UnimplementedUserServer was
|
||||
// embedded by pointer and is nil. This will cause panics if an
|
||||
// unimplemented method is ever invoked, so we test this at initialization
|
||||
// time to prevent it from happening at runtime later due to I/O.
|
||||
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
||||
t.testEmbeddedByValue()
|
||||
}
|
||||
s.RegisterService(&User_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _User_Exists_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ExistsRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(UserServer).Exists(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: User_Exists_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(UserServer).Exists(ctx, req.(*ExistsRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _User_QueryInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(QueryInfoRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(UserServer).QueryInfo(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: User_QueryInfo_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(UserServer).QueryInfo(ctx, req.(*QueryInfoRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _User_QueryIdentity_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(QueryIdentityRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(UserServer).QueryIdentity(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: User_QueryIdentity_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(UserServer).QueryIdentity(ctx, req.(*QueryIdentityRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _User_QueryBelong_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(QueryBelongRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(UserServer).QueryBelong(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: User_QueryBelong_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(UserServer).QueryBelong(ctx, req.(*QueryBelongRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _User_FindUserInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(FindUserInfoRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(UserServer).FindUserInfo(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: User_FindUserInfo_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(UserServer).FindUserInfo(ctx, req.(*FindUserInfoRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _User_FindUserDisplay_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(FindUserDisplayRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(UserServer).FindUserDisplay(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: User_FindUserDisplay_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(UserServer).FindUserDisplay(ctx, req.(*FindUserDisplayRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _User_FindSelect_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(FindSelectRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(UserServer).FindSelect(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: User_FindSelect_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(UserServer).FindSelect(ctx, req.(*FindSelectRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _User_FindByPage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(FindByPageRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(UserServer).FindByPage(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: User_FindByPage_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(UserServer).FindByPage(ctx, req.(*FindByPageRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _User_FindUserInfoByIdentity_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(FindUserInfoByIdentityRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(UserServer).FindUserInfoByIdentity(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: User_FindUserInfoByIdentity_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(UserServer).FindUserInfoByIdentity(ctx, req.(*FindUserInfoByIdentityRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _User_UpdateEnable_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(UpdateEnableRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(UserServer).UpdateEnable(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: User_UpdateEnable_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(UserServer).UpdateEnable(ctx, req.(*UpdateEnableRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _User_UpdateName_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(UpdateNameRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(UserServer).UpdateName(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: User_UpdateName_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(UserServer).UpdateName(ctx, req.(*UpdateNameRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _User_UpdateNickname_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(UpdateNicknameRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(UserServer).UpdateNickname(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: User_UpdateNickname_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(UserServer).UpdateNickname(ctx, req.(*UpdateNicknameRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _User_UpdateAvatar_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(UpdateAvatarRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(UserServer).UpdateAvatar(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: User_UpdateAvatar_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(UserServer).UpdateAvatar(ctx, req.(*UpdateAvatarRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _User_UpdateCreator_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(UpdateCreatorRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(UserServer).UpdateCreator(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: User_UpdateCreator_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(UserServer).UpdateCreator(ctx, req.(*UpdateCreatorRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _User_UpdateLastModifier_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(UpdateLastModifierRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(UserServer).UpdateLastModifier(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: User_UpdateLastModifier_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(UserServer).UpdateLastModifier(ctx, req.(*UpdateLastModifierRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _User_UpdateAccessed_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(UpdateAccessedRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(UserServer).UpdateAccessed(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: User_UpdateAccessed_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(UserServer).UpdateAccessed(ctx, req.(*UpdateAccessedRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _User_SearchMemberInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(SearchMemberInfoRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(UserServer).SearchMemberInfo(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: User_SearchMemberInfo_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(UserServer).SearchMemberInfo(ctx, req.(*SearchMemberInfoRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _User_UpdateUserInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(UpdateUserInfoRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(UserServer).UpdateUserInfo(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: User_UpdateUserInfo_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(UserServer).UpdateUserInfo(ctx, req.(*UpdateUserInfoRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _User_CountPromoterByInviteCode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(CountPromoterByInviteCodeRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(UserServer).CountPromoterByInviteCode(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: User_CountPromoterByInviteCode_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(UserServer).CountPromoterByInviteCode(ctx, req.(*CountPromoterByInviteCodeRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _User_GetUserByInviteCode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetUserByInviteCodeRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(UserServer).GetUserByInviteCode(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: User_GetUserByInviteCode_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(UserServer).GetUserByInviteCode(ctx, req.(*GetUserByInviteCodeRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _User_GetPromoter_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetPromoterRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(UserServer).GetPromoter(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: User_GetPromoter_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(UserServer).GetPromoter(ctx, req.(*GetPromoterRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// User_ServiceDesc is the grpc.ServiceDesc for User service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var User_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "micro.xt_user.user.User",
|
||||
HandlerType: (*UserServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "Exists",
|
||||
Handler: _User_Exists_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "QueryInfo",
|
||||
Handler: _User_QueryInfo_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "QueryIdentity",
|
||||
Handler: _User_QueryIdentity_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "QueryBelong",
|
||||
Handler: _User_QueryBelong_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "FindUserInfo",
|
||||
Handler: _User_FindUserInfo_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "FindUserDisplay",
|
||||
Handler: _User_FindUserDisplay_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "FindSelect",
|
||||
Handler: _User_FindSelect_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "FindByPage",
|
||||
Handler: _User_FindByPage_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "FindUserInfoByIdentity",
|
||||
Handler: _User_FindUserInfoByIdentity_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "UpdateEnable",
|
||||
Handler: _User_UpdateEnable_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "UpdateName",
|
||||
Handler: _User_UpdateName_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "UpdateNickname",
|
||||
Handler: _User_UpdateNickname_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "UpdateAvatar",
|
||||
Handler: _User_UpdateAvatar_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "UpdateCreator",
|
||||
Handler: _User_UpdateCreator_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "UpdateLastModifier",
|
||||
Handler: _User_UpdateLastModifier_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "UpdateAccessed",
|
||||
Handler: _User_UpdateAccessed_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "SearchMemberInfo",
|
||||
Handler: _User_SearchMemberInfo_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "UpdateUserInfo",
|
||||
Handler: _User_UpdateUserInfo_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "CountPromoterByInviteCode",
|
||||
Handler: _User_CountPromoterByInviteCode_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetUserByInviteCode",
|
||||
Handler: _User_GetUserByInviteCode_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetPromoter",
|
||||
Handler: _User_GetPromoter_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "xt-user/proto/user/user.proto",
|
||||
}
|
||||
Reference in new issue
Block a user