663 lines
28 KiB
Go
663 lines
28 KiB
Go
// Code generated by protoc-gen-triple. DO NOT EDIT.
|
|
//
|
|
// Source: proto/user.proto
|
|
package user
|
|
|
|
import (
|
|
"context"
|
|
)
|
|
|
|
import (
|
|
"dubbo.apache.org/dubbo-go/v3"
|
|
"dubbo.apache.org/dubbo-go/v3/client"
|
|
"dubbo.apache.org/dubbo-go/v3/common"
|
|
"dubbo.apache.org/dubbo-go/v3/common/constant"
|
|
"dubbo.apache.org/dubbo-go/v3/protocol/triple/triple_protocol"
|
|
"dubbo.apache.org/dubbo-go/v3/server"
|
|
)
|
|
|
|
// This is a compile-time assertion to ensure that this generated file and the Triple package
|
|
// are compatible. If you get a compiler error that this constant is not defined, this code was
|
|
// generated with a version of Triple newer than the one compiled into your binary. You can fix the
|
|
// problem by either regenerating this code with an older version of Triple or updating the Triple
|
|
// version compiled into your binary.
|
|
const _ = triple_protocol.IsAtLeastVersion0_1_0
|
|
|
|
const (
|
|
// UserSocialServiceName is the fully-qualified name of the UserSocialService service.
|
|
UserSocialServiceName = "topfans.user.UserSocialService"
|
|
)
|
|
|
|
// These constants are the fully-qualified names of the RPCs defined in this package. They're
|
|
// exposed at runtime as procedure and as the final two segments of the HTTP route.
|
|
//
|
|
// Note that these are different from the fully-qualified method names used by
|
|
// google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to
|
|
// reflection-formatted method names, remove the leading slash and convert the remaining slash to a
|
|
// period.
|
|
const (
|
|
// UserSocialServiceRegisterProcedure is the fully-qualified name of the UserSocialService's Register RPC.
|
|
UserSocialServiceRegisterProcedure = "/topfans.user.UserSocialService/Register"
|
|
// UserSocialServiceLoginProcedure is the fully-qualified name of the UserSocialService's Login RPC.
|
|
UserSocialServiceLoginProcedure = "/topfans.user.UserSocialService/Login"
|
|
// UserSocialServiceRefreshTokenProcedure is the fully-qualified name of the UserSocialService's RefreshToken RPC.
|
|
UserSocialServiceRefreshTokenProcedure = "/topfans.user.UserSocialService/RefreshToken"
|
|
// UserSocialServiceValidateTokenProcedure is the fully-qualified name of the UserSocialService's ValidateToken RPC.
|
|
UserSocialServiceValidateTokenProcedure = "/topfans.user.UserSocialService/ValidateToken"
|
|
// UserSocialServiceLogoutProcedure is the fully-qualified name of the UserSocialService's Logout RPC.
|
|
UserSocialServiceLogoutProcedure = "/topfans.user.UserSocialService/Logout"
|
|
// UserSocialServiceCheckNicknameProcedure is the fully-qualified name of the UserSocialService's CheckNickname RPC.
|
|
UserSocialServiceCheckNicknameProcedure = "/topfans.user.UserSocialService/CheckNickname"
|
|
// UserSocialServiceCheckMobileProcedure is the fully-qualified name of the UserSocialService's CheckMobile RPC.
|
|
UserSocialServiceCheckMobileProcedure = "/topfans.user.UserSocialService/CheckMobile"
|
|
// UserSocialServiceGetUserProcedure is the fully-qualified name of the UserSocialService's GetUser RPC.
|
|
UserSocialServiceGetUserProcedure = "/topfans.user.UserSocialService/GetUser"
|
|
// UserSocialServiceGetFanProfileProcedure is the fully-qualified name of the UserSocialService's GetFanProfile RPC.
|
|
UserSocialServiceGetFanProfileProcedure = "/topfans.user.UserSocialService/GetFanProfile"
|
|
// UserSocialServiceUpdateFanProfileSocialProcedure is the fully-qualified name of the UserSocialService's UpdateFanProfileSocial RPC.
|
|
UserSocialServiceUpdateFanProfileSocialProcedure = "/topfans.user.UserSocialService/UpdateFanProfileSocial"
|
|
// UserSocialServiceUpdateCrystalBalanceProcedure is the fully-qualified name of the UserSocialService's UpdateCrystalBalance RPC.
|
|
UserSocialServiceUpdateCrystalBalanceProcedure = "/topfans.user.UserSocialService/UpdateCrystalBalance"
|
|
// UserSocialServiceUpdateAssetsCountProcedure is the fully-qualified name of the UserSocialService's UpdateAssetsCount RPC.
|
|
UserSocialServiceUpdateAssetsCountProcedure = "/topfans.user.UserSocialService/UpdateAssetsCount"
|
|
// UserSocialServiceGetCurrentUserProcedure is the fully-qualified name of the UserSocialService's GetCurrentUser RPC.
|
|
UserSocialServiceGetCurrentUserProcedure = "/topfans.user.UserSocialService/GetCurrentUser"
|
|
// UserSocialServiceGetMyProfileProcedure is the fully-qualified name of the UserSocialService's GetMyProfile RPC.
|
|
UserSocialServiceGetMyProfileProcedure = "/topfans.user.UserSocialService/GetMyProfile"
|
|
// UserSocialServiceUpdateNicknameProcedure is the fully-qualified name of the UserSocialService's UpdateNickname RPC.
|
|
UserSocialServiceUpdateNicknameProcedure = "/topfans.user.UserSocialService/UpdateNickname"
|
|
// UserSocialServiceUpdatePasswordProcedure is the fully-qualified name of the UserSocialService's UpdatePassword RPC.
|
|
UserSocialServiceUpdatePasswordProcedure = "/topfans.user.UserSocialService/UpdatePassword"
|
|
// UserSocialServiceUpdateAvatarProcedure is the fully-qualified name of the UserSocialService's UpdateAvatar RPC.
|
|
UserSocialServiceUpdateAvatarProcedure = "/topfans.user.UserSocialService/UpdateAvatar"
|
|
// UserSocialServiceGetFanIdentitiesProcedure is the fully-qualified name of the UserSocialService's GetFanIdentities RPC.
|
|
UserSocialServiceGetFanIdentitiesProcedure = "/topfans.user.UserSocialService/GetFanIdentities"
|
|
// UserSocialServiceGetMyFanIdentitiesProcedure is the fully-qualified name of the UserSocialService's GetMyFanIdentities RPC.
|
|
UserSocialServiceGetMyFanIdentitiesProcedure = "/topfans.user.UserSocialService/GetMyFanIdentities"
|
|
// UserSocialServiceAddIdentityProcedure is the fully-qualified name of the UserSocialService's AddIdentity RPC.
|
|
UserSocialServiceAddIdentityProcedure = "/topfans.user.UserSocialService/AddIdentity"
|
|
// UserSocialServiceSwitchIdentityProcedure is the fully-qualified name of the UserSocialService's SwitchIdentity RPC.
|
|
UserSocialServiceSwitchIdentityProcedure = "/topfans.user.UserSocialService/SwitchIdentity"
|
|
)
|
|
|
|
var (
|
|
_ UserSocialService = (*UserSocialServiceImpl)(nil)
|
|
)
|
|
|
|
// UserSocialService is a client for the topfans.user.UserSocialService service.
|
|
type UserSocialService interface {
|
|
Register(ctx context.Context, req *RegisterRequest, opts ...client.CallOption) (*RegisterResponse, error)
|
|
Login(ctx context.Context, req *LoginRequest, opts ...client.CallOption) (*LoginResponse, error)
|
|
RefreshToken(ctx context.Context, req *RefreshTokenRequest, opts ...client.CallOption) (*RefreshTokenResponse, error)
|
|
ValidateToken(ctx context.Context, req *ValidateTokenRequest, opts ...client.CallOption) (*ValidateTokenResponse, error)
|
|
Logout(ctx context.Context, req *LogoutRequest, opts ...client.CallOption) (*LogoutResponse, error)
|
|
CheckNickname(ctx context.Context, req *CheckNicknameRequest, opts ...client.CallOption) (*CheckNicknameResponse, error)
|
|
CheckMobile(ctx context.Context, req *CheckMobileRequest, opts ...client.CallOption) (*CheckMobileResponse, error)
|
|
GetUser(ctx context.Context, req *GetUserRequest, opts ...client.CallOption) (*GetUserResponse, error)
|
|
GetFanProfile(ctx context.Context, req *GetFanProfileRequest, opts ...client.CallOption) (*GetFanProfileResponse, error)
|
|
UpdateFanProfileSocial(ctx context.Context, req *UpdateFanProfileSocialRequest, opts ...client.CallOption) (*UpdateFanProfileSocialResponse, error)
|
|
UpdateCrystalBalance(ctx context.Context, req *UpdateCrystalBalanceRequest, opts ...client.CallOption) (*UpdateCrystalBalanceResponse, error)
|
|
UpdateAssetsCount(ctx context.Context, req *UpdateAssetsCountRequest, opts ...client.CallOption) (*UpdateAssetsCountResponse, error)
|
|
GetCurrentUser(ctx context.Context, req *GetCurrentUserRequest, opts ...client.CallOption) (*GetCurrentUserResponse, error)
|
|
GetMyProfile(ctx context.Context, req *GetMyProfileRequest, opts ...client.CallOption) (*GetMyProfileResponse, error)
|
|
UpdateNickname(ctx context.Context, req *UpdateNicknameRequest, opts ...client.CallOption) (*UpdateNicknameResponse, error)
|
|
UpdatePassword(ctx context.Context, req *UpdatePasswordRequest, opts ...client.CallOption) (*UpdatePasswordResponse, error)
|
|
UpdateAvatar(ctx context.Context, req *UpdateAvatarRequest, opts ...client.CallOption) (*UpdateAvatarResponse, error)
|
|
GetFanIdentities(ctx context.Context, req *GetFanIdentitiesRequest, opts ...client.CallOption) (*GetFanIdentitiesResponse, error)
|
|
GetMyFanIdentities(ctx context.Context, req *GetMyFanIdentitiesRequest, opts ...client.CallOption) (*GetMyFanIdentitiesResponse, error)
|
|
AddIdentity(ctx context.Context, req *AddIdentityRequest, opts ...client.CallOption) (*AddIdentityResponse, error)
|
|
SwitchIdentity(ctx context.Context, req *SwitchIdentityRequest, opts ...client.CallOption) (*SwitchIdentityResponse, error)
|
|
}
|
|
|
|
// NewUserSocialService constructs a client for the user.UserSocialService service.
|
|
func NewUserSocialService(cli *client.Client, opts ...client.ReferenceOption) (UserSocialService, error) {
|
|
conn, err := cli.DialWithInfo("topfans.user.UserSocialService", &UserSocialService_ClientInfo, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &UserSocialServiceImpl{
|
|
conn: conn,
|
|
}, nil
|
|
}
|
|
|
|
func SetConsumerUserSocialService(srv common.RPCService) {
|
|
dubbo.SetConsumerServiceWithInfo(srv, &UserSocialService_ClientInfo)
|
|
}
|
|
|
|
// UserSocialServiceImpl implements UserSocialService.
|
|
type UserSocialServiceImpl struct {
|
|
conn *client.Connection
|
|
}
|
|
|
|
func (c *UserSocialServiceImpl) Register(ctx context.Context, req *RegisterRequest, opts ...client.CallOption) (*RegisterResponse, error) {
|
|
resp := new(RegisterResponse)
|
|
if err := c.conn.CallUnary(ctx, []interface{}{req}, resp, "Register", opts...); err != nil {
|
|
return nil, err
|
|
}
|
|
return resp, nil
|
|
}
|
|
|
|
func (c *UserSocialServiceImpl) Login(ctx context.Context, req *LoginRequest, opts ...client.CallOption) (*LoginResponse, error) {
|
|
resp := new(LoginResponse)
|
|
if err := c.conn.CallUnary(ctx, []interface{}{req}, resp, "Login", opts...); err != nil {
|
|
return nil, err
|
|
}
|
|
return resp, nil
|
|
}
|
|
|
|
func (c *UserSocialServiceImpl) RefreshToken(ctx context.Context, req *RefreshTokenRequest, opts ...client.CallOption) (*RefreshTokenResponse, error) {
|
|
resp := new(RefreshTokenResponse)
|
|
if err := c.conn.CallUnary(ctx, []interface{}{req}, resp, "RefreshToken", opts...); err != nil {
|
|
return nil, err
|
|
}
|
|
return resp, nil
|
|
}
|
|
|
|
func (c *UserSocialServiceImpl) ValidateToken(ctx context.Context, req *ValidateTokenRequest, opts ...client.CallOption) (*ValidateTokenResponse, error) {
|
|
resp := new(ValidateTokenResponse)
|
|
if err := c.conn.CallUnary(ctx, []interface{}{req}, resp, "ValidateToken", opts...); err != nil {
|
|
return nil, err
|
|
}
|
|
return resp, nil
|
|
}
|
|
|
|
func (c *UserSocialServiceImpl) Logout(ctx context.Context, req *LogoutRequest, opts ...client.CallOption) (*LogoutResponse, error) {
|
|
resp := new(LogoutResponse)
|
|
if err := c.conn.CallUnary(ctx, []interface{}{req}, resp, "Logout", opts...); err != nil {
|
|
return nil, err
|
|
}
|
|
return resp, nil
|
|
}
|
|
|
|
func (c *UserSocialServiceImpl) CheckNickname(ctx context.Context, req *CheckNicknameRequest, opts ...client.CallOption) (*CheckNicknameResponse, error) {
|
|
resp := new(CheckNicknameResponse)
|
|
if err := c.conn.CallUnary(ctx, []interface{}{req}, resp, "CheckNickname", opts...); err != nil {
|
|
return nil, err
|
|
}
|
|
return resp, nil
|
|
}
|
|
|
|
func (c *UserSocialServiceImpl) CheckMobile(ctx context.Context, req *CheckMobileRequest, opts ...client.CallOption) (*CheckMobileResponse, error) {
|
|
resp := new(CheckMobileResponse)
|
|
if err := c.conn.CallUnary(ctx, []interface{}{req}, resp, "CheckMobile", opts...); err != nil {
|
|
return nil, err
|
|
}
|
|
return resp, nil
|
|
}
|
|
|
|
func (c *UserSocialServiceImpl) GetUser(ctx context.Context, req *GetUserRequest, opts ...client.CallOption) (*GetUserResponse, error) {
|
|
resp := new(GetUserResponse)
|
|
if err := c.conn.CallUnary(ctx, []interface{}{req}, resp, "GetUser", opts...); err != nil {
|
|
return nil, err
|
|
}
|
|
return resp, nil
|
|
}
|
|
|
|
func (c *UserSocialServiceImpl) GetFanProfile(ctx context.Context, req *GetFanProfileRequest, opts ...client.CallOption) (*GetFanProfileResponse, error) {
|
|
resp := new(GetFanProfileResponse)
|
|
if err := c.conn.CallUnary(ctx, []interface{}{req}, resp, "GetFanProfile", opts...); err != nil {
|
|
return nil, err
|
|
}
|
|
return resp, nil
|
|
}
|
|
|
|
func (c *UserSocialServiceImpl) UpdateFanProfileSocial(ctx context.Context, req *UpdateFanProfileSocialRequest, opts ...client.CallOption) (*UpdateFanProfileSocialResponse, error) {
|
|
resp := new(UpdateFanProfileSocialResponse)
|
|
if err := c.conn.CallUnary(ctx, []interface{}{req}, resp, "UpdateFanProfileSocial", opts...); err != nil {
|
|
return nil, err
|
|
}
|
|
return resp, nil
|
|
}
|
|
|
|
func (c *UserSocialServiceImpl) UpdateCrystalBalance(ctx context.Context, req *UpdateCrystalBalanceRequest, opts ...client.CallOption) (*UpdateCrystalBalanceResponse, error) {
|
|
resp := new(UpdateCrystalBalanceResponse)
|
|
if err := c.conn.CallUnary(ctx, []interface{}{req}, resp, "UpdateCrystalBalance", opts...); err != nil {
|
|
return nil, err
|
|
}
|
|
return resp, nil
|
|
}
|
|
|
|
func (c *UserSocialServiceImpl) UpdateAssetsCount(ctx context.Context, req *UpdateAssetsCountRequest, opts ...client.CallOption) (*UpdateAssetsCountResponse, error) {
|
|
resp := new(UpdateAssetsCountResponse)
|
|
if err := c.conn.CallUnary(ctx, []interface{}{req}, resp, "UpdateAssetsCount", opts...); err != nil {
|
|
return nil, err
|
|
}
|
|
return resp, nil
|
|
}
|
|
|
|
func (c *UserSocialServiceImpl) GetCurrentUser(ctx context.Context, req *GetCurrentUserRequest, opts ...client.CallOption) (*GetCurrentUserResponse, error) {
|
|
resp := new(GetCurrentUserResponse)
|
|
if err := c.conn.CallUnary(ctx, []interface{}{req}, resp, "GetCurrentUser", opts...); err != nil {
|
|
return nil, err
|
|
}
|
|
return resp, nil
|
|
}
|
|
|
|
func (c *UserSocialServiceImpl) GetMyProfile(ctx context.Context, req *GetMyProfileRequest, opts ...client.CallOption) (*GetMyProfileResponse, error) {
|
|
resp := new(GetMyProfileResponse)
|
|
if err := c.conn.CallUnary(ctx, []interface{}{req}, resp, "GetMyProfile", opts...); err != nil {
|
|
return nil, err
|
|
}
|
|
return resp, nil
|
|
}
|
|
|
|
func (c *UserSocialServiceImpl) UpdateNickname(ctx context.Context, req *UpdateNicknameRequest, opts ...client.CallOption) (*UpdateNicknameResponse, error) {
|
|
resp := new(UpdateNicknameResponse)
|
|
if err := c.conn.CallUnary(ctx, []interface{}{req}, resp, "UpdateNickname", opts...); err != nil {
|
|
return nil, err
|
|
}
|
|
return resp, nil
|
|
}
|
|
|
|
func (c *UserSocialServiceImpl) UpdatePassword(ctx context.Context, req *UpdatePasswordRequest, opts ...client.CallOption) (*UpdatePasswordResponse, error) {
|
|
resp := new(UpdatePasswordResponse)
|
|
if err := c.conn.CallUnary(ctx, []interface{}{req}, resp, "UpdatePassword", opts...); err != nil {
|
|
return nil, err
|
|
}
|
|
return resp, nil
|
|
}
|
|
|
|
func (c *UserSocialServiceImpl) UpdateAvatar(ctx context.Context, req *UpdateAvatarRequest, opts ...client.CallOption) (*UpdateAvatarResponse, error) {
|
|
resp := new(UpdateAvatarResponse)
|
|
if err := c.conn.CallUnary(ctx, []interface{}{req}, resp, "UpdateAvatar", opts...); err != nil {
|
|
return nil, err
|
|
}
|
|
return resp, nil
|
|
}
|
|
|
|
func (c *UserSocialServiceImpl) GetFanIdentities(ctx context.Context, req *GetFanIdentitiesRequest, opts ...client.CallOption) (*GetFanIdentitiesResponse, error) {
|
|
resp := new(GetFanIdentitiesResponse)
|
|
if err := c.conn.CallUnary(ctx, []interface{}{req}, resp, "GetFanIdentities", opts...); err != nil {
|
|
return nil, err
|
|
}
|
|
return resp, nil
|
|
}
|
|
|
|
func (c *UserSocialServiceImpl) GetMyFanIdentities(ctx context.Context, req *GetMyFanIdentitiesRequest, opts ...client.CallOption) (*GetMyFanIdentitiesResponse, error) {
|
|
resp := new(GetMyFanIdentitiesResponse)
|
|
if err := c.conn.CallUnary(ctx, []interface{}{req}, resp, "GetMyFanIdentities", opts...); err != nil {
|
|
return nil, err
|
|
}
|
|
return resp, nil
|
|
}
|
|
|
|
func (c *UserSocialServiceImpl) AddIdentity(ctx context.Context, req *AddIdentityRequest, opts ...client.CallOption) (*AddIdentityResponse, error) {
|
|
resp := new(AddIdentityResponse)
|
|
if err := c.conn.CallUnary(ctx, []interface{}{req}, resp, "AddIdentity", opts...); err != nil {
|
|
return nil, err
|
|
}
|
|
return resp, nil
|
|
}
|
|
|
|
func (c *UserSocialServiceImpl) SwitchIdentity(ctx context.Context, req *SwitchIdentityRequest, opts ...client.CallOption) (*SwitchIdentityResponse, error) {
|
|
resp := new(SwitchIdentityResponse)
|
|
if err := c.conn.CallUnary(ctx, []interface{}{req}, resp, "SwitchIdentity", opts...); err != nil {
|
|
return nil, err
|
|
}
|
|
return resp, nil
|
|
}
|
|
|
|
var UserSocialService_ClientInfo = client.ClientInfo{
|
|
InterfaceName: "topfans.user.UserSocialService",
|
|
MethodNames: []string{"Register", "Login", "RefreshToken", "ValidateToken", "Logout", "CheckNickname", "CheckMobile", "GetUser", "GetFanProfile", "UpdateFanProfileSocial", "UpdateCrystalBalance", "UpdateAssetsCount", "GetCurrentUser", "GetMyProfile", "UpdateNickname", "UpdatePassword", "UpdateAvatar", "GetFanIdentities", "GetMyFanIdentities", "AddIdentity", "SwitchIdentity"},
|
|
ConnectionInjectFunc: func(dubboCliRaw interface{}, conn *client.Connection) {
|
|
dubboCli := dubboCliRaw.(*UserSocialServiceImpl)
|
|
dubboCli.conn = conn
|
|
},
|
|
}
|
|
|
|
// UserSocialServiceHandler is an implementation of the topfans.user.UserSocialService service.
|
|
type UserSocialServiceHandler interface {
|
|
Register(context.Context, *RegisterRequest) (*RegisterResponse, error)
|
|
Login(context.Context, *LoginRequest) (*LoginResponse, error)
|
|
RefreshToken(context.Context, *RefreshTokenRequest) (*RefreshTokenResponse, error)
|
|
ValidateToken(context.Context, *ValidateTokenRequest) (*ValidateTokenResponse, error)
|
|
Logout(context.Context, *LogoutRequest) (*LogoutResponse, error)
|
|
CheckNickname(context.Context, *CheckNicknameRequest) (*CheckNicknameResponse, error)
|
|
CheckMobile(context.Context, *CheckMobileRequest) (*CheckMobileResponse, error)
|
|
GetUser(context.Context, *GetUserRequest) (*GetUserResponse, error)
|
|
GetFanProfile(context.Context, *GetFanProfileRequest) (*GetFanProfileResponse, error)
|
|
UpdateFanProfileSocial(context.Context, *UpdateFanProfileSocialRequest) (*UpdateFanProfileSocialResponse, error)
|
|
UpdateCrystalBalance(context.Context, *UpdateCrystalBalanceRequest) (*UpdateCrystalBalanceResponse, error)
|
|
UpdateAssetsCount(context.Context, *UpdateAssetsCountRequest) (*UpdateAssetsCountResponse, error)
|
|
GetCurrentUser(context.Context, *GetCurrentUserRequest) (*GetCurrentUserResponse, error)
|
|
GetMyProfile(context.Context, *GetMyProfileRequest) (*GetMyProfileResponse, error)
|
|
UpdateNickname(context.Context, *UpdateNicknameRequest) (*UpdateNicknameResponse, error)
|
|
UpdatePassword(context.Context, *UpdatePasswordRequest) (*UpdatePasswordResponse, error)
|
|
UpdateAvatar(context.Context, *UpdateAvatarRequest) (*UpdateAvatarResponse, error)
|
|
GetFanIdentities(context.Context, *GetFanIdentitiesRequest) (*GetFanIdentitiesResponse, error)
|
|
GetMyFanIdentities(context.Context, *GetMyFanIdentitiesRequest) (*GetMyFanIdentitiesResponse, error)
|
|
AddIdentity(context.Context, *AddIdentityRequest) (*AddIdentityResponse, error)
|
|
SwitchIdentity(context.Context, *SwitchIdentityRequest) (*SwitchIdentityResponse, error)
|
|
}
|
|
|
|
func RegisterUserSocialServiceHandler(srv *server.Server, hdlr UserSocialServiceHandler, opts ...server.ServiceOption) error {
|
|
return srv.Register(hdlr, &UserSocialService_ServiceInfo, opts...)
|
|
}
|
|
|
|
func SetProviderUserSocialService(srv common.RPCService) {
|
|
dubbo.SetProviderServiceWithInfo(srv, &UserSocialService_ServiceInfo)
|
|
}
|
|
|
|
var UserSocialService_ServiceInfo = server.ServiceInfo{
|
|
InterfaceName: "topfans.user.UserSocialService",
|
|
ServiceType: (*UserSocialServiceHandler)(nil),
|
|
Methods: []server.MethodInfo{
|
|
{
|
|
Name: "Register",
|
|
Type: constant.CallUnary,
|
|
ReqInitFunc: func() interface{} {
|
|
return new(RegisterRequest)
|
|
},
|
|
MethodFunc: func(ctx context.Context, args []interface{}, handler interface{}) (interface{}, error) {
|
|
req := args[0].(*RegisterRequest)
|
|
res, err := handler.(UserSocialServiceHandler).Register(ctx, req)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return triple_protocol.NewResponse(res), nil
|
|
},
|
|
},
|
|
{
|
|
Name: "Login",
|
|
Type: constant.CallUnary,
|
|
ReqInitFunc: func() interface{} {
|
|
return new(LoginRequest)
|
|
},
|
|
MethodFunc: func(ctx context.Context, args []interface{}, handler interface{}) (interface{}, error) {
|
|
req := args[0].(*LoginRequest)
|
|
res, err := handler.(UserSocialServiceHandler).Login(ctx, req)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return triple_protocol.NewResponse(res), nil
|
|
},
|
|
},
|
|
{
|
|
Name: "RefreshToken",
|
|
Type: constant.CallUnary,
|
|
ReqInitFunc: func() interface{} {
|
|
return new(RefreshTokenRequest)
|
|
},
|
|
MethodFunc: func(ctx context.Context, args []interface{}, handler interface{}) (interface{}, error) {
|
|
req := args[0].(*RefreshTokenRequest)
|
|
res, err := handler.(UserSocialServiceHandler).RefreshToken(ctx, req)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return triple_protocol.NewResponse(res), nil
|
|
},
|
|
},
|
|
{
|
|
Name: "ValidateToken",
|
|
Type: constant.CallUnary,
|
|
ReqInitFunc: func() interface{} {
|
|
return new(ValidateTokenRequest)
|
|
},
|
|
MethodFunc: func(ctx context.Context, args []interface{}, handler interface{}) (interface{}, error) {
|
|
req := args[0].(*ValidateTokenRequest)
|
|
res, err := handler.(UserSocialServiceHandler).ValidateToken(ctx, req)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return triple_protocol.NewResponse(res), nil
|
|
},
|
|
},
|
|
{
|
|
Name: "Logout",
|
|
Type: constant.CallUnary,
|
|
ReqInitFunc: func() interface{} {
|
|
return new(LogoutRequest)
|
|
},
|
|
MethodFunc: func(ctx context.Context, args []interface{}, handler interface{}) (interface{}, error) {
|
|
req := args[0].(*LogoutRequest)
|
|
res, err := handler.(UserSocialServiceHandler).Logout(ctx, req)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return triple_protocol.NewResponse(res), nil
|
|
},
|
|
},
|
|
{
|
|
Name: "CheckNickname",
|
|
Type: constant.CallUnary,
|
|
ReqInitFunc: func() interface{} {
|
|
return new(CheckNicknameRequest)
|
|
},
|
|
MethodFunc: func(ctx context.Context, args []interface{}, handler interface{}) (interface{}, error) {
|
|
req := args[0].(*CheckNicknameRequest)
|
|
res, err := handler.(UserSocialServiceHandler).CheckNickname(ctx, req)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return triple_protocol.NewResponse(res), nil
|
|
},
|
|
},
|
|
{
|
|
Name: "CheckMobile",
|
|
Type: constant.CallUnary,
|
|
ReqInitFunc: func() interface{} {
|
|
return new(CheckMobileRequest)
|
|
},
|
|
MethodFunc: func(ctx context.Context, args []interface{}, handler interface{}) (interface{}, error) {
|
|
req := args[0].(*CheckMobileRequest)
|
|
res, err := handler.(UserSocialServiceHandler).CheckMobile(ctx, req)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return triple_protocol.NewResponse(res), nil
|
|
},
|
|
},
|
|
{
|
|
Name: "GetUser",
|
|
Type: constant.CallUnary,
|
|
ReqInitFunc: func() interface{} {
|
|
return new(GetUserRequest)
|
|
},
|
|
MethodFunc: func(ctx context.Context, args []interface{}, handler interface{}) (interface{}, error) {
|
|
req := args[0].(*GetUserRequest)
|
|
res, err := handler.(UserSocialServiceHandler).GetUser(ctx, req)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return triple_protocol.NewResponse(res), nil
|
|
},
|
|
},
|
|
{
|
|
Name: "GetFanProfile",
|
|
Type: constant.CallUnary,
|
|
ReqInitFunc: func() interface{} {
|
|
return new(GetFanProfileRequest)
|
|
},
|
|
MethodFunc: func(ctx context.Context, args []interface{}, handler interface{}) (interface{}, error) {
|
|
req := args[0].(*GetFanProfileRequest)
|
|
res, err := handler.(UserSocialServiceHandler).GetFanProfile(ctx, req)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return triple_protocol.NewResponse(res), nil
|
|
},
|
|
},
|
|
{
|
|
Name: "UpdateFanProfileSocial",
|
|
Type: constant.CallUnary,
|
|
ReqInitFunc: func() interface{} {
|
|
return new(UpdateFanProfileSocialRequest)
|
|
},
|
|
MethodFunc: func(ctx context.Context, args []interface{}, handler interface{}) (interface{}, error) {
|
|
req := args[0].(*UpdateFanProfileSocialRequest)
|
|
res, err := handler.(UserSocialServiceHandler).UpdateFanProfileSocial(ctx, req)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return triple_protocol.NewResponse(res), nil
|
|
},
|
|
},
|
|
{
|
|
Name: "UpdateCrystalBalance",
|
|
Type: constant.CallUnary,
|
|
ReqInitFunc: func() interface{} {
|
|
return new(UpdateCrystalBalanceRequest)
|
|
},
|
|
MethodFunc: func(ctx context.Context, args []interface{}, handler interface{}) (interface{}, error) {
|
|
req := args[0].(*UpdateCrystalBalanceRequest)
|
|
res, err := handler.(UserSocialServiceHandler).UpdateCrystalBalance(ctx, req)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return triple_protocol.NewResponse(res), nil
|
|
},
|
|
},
|
|
{
|
|
Name: "UpdateAssetsCount",
|
|
Type: constant.CallUnary,
|
|
ReqInitFunc: func() interface{} {
|
|
return new(UpdateAssetsCountRequest)
|
|
},
|
|
MethodFunc: func(ctx context.Context, args []interface{}, handler interface{}) (interface{}, error) {
|
|
req := args[0].(*UpdateAssetsCountRequest)
|
|
res, err := handler.(UserSocialServiceHandler).UpdateAssetsCount(ctx, req)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return triple_protocol.NewResponse(res), nil
|
|
},
|
|
},
|
|
{
|
|
Name: "GetCurrentUser",
|
|
Type: constant.CallUnary,
|
|
ReqInitFunc: func() interface{} {
|
|
return new(GetCurrentUserRequest)
|
|
},
|
|
MethodFunc: func(ctx context.Context, args []interface{}, handler interface{}) (interface{}, error) {
|
|
req := args[0].(*GetCurrentUserRequest)
|
|
res, err := handler.(UserSocialServiceHandler).GetCurrentUser(ctx, req)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return triple_protocol.NewResponse(res), nil
|
|
},
|
|
},
|
|
{
|
|
Name: "GetMyProfile",
|
|
Type: constant.CallUnary,
|
|
ReqInitFunc: func() interface{} {
|
|
return new(GetMyProfileRequest)
|
|
},
|
|
MethodFunc: func(ctx context.Context, args []interface{}, handler interface{}) (interface{}, error) {
|
|
req := args[0].(*GetMyProfileRequest)
|
|
res, err := handler.(UserSocialServiceHandler).GetMyProfile(ctx, req)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return triple_protocol.NewResponse(res), nil
|
|
},
|
|
},
|
|
{
|
|
Name: "UpdateNickname",
|
|
Type: constant.CallUnary,
|
|
ReqInitFunc: func() interface{} {
|
|
return new(UpdateNicknameRequest)
|
|
},
|
|
MethodFunc: func(ctx context.Context, args []interface{}, handler interface{}) (interface{}, error) {
|
|
req := args[0].(*UpdateNicknameRequest)
|
|
res, err := handler.(UserSocialServiceHandler).UpdateNickname(ctx, req)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return triple_protocol.NewResponse(res), nil
|
|
},
|
|
},
|
|
{
|
|
Name: "UpdatePassword",
|
|
Type: constant.CallUnary,
|
|
ReqInitFunc: func() interface{} {
|
|
return new(UpdatePasswordRequest)
|
|
},
|
|
MethodFunc: func(ctx context.Context, args []interface{}, handler interface{}) (interface{}, error) {
|
|
req := args[0].(*UpdatePasswordRequest)
|
|
res, err := handler.(UserSocialServiceHandler).UpdatePassword(ctx, req)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return triple_protocol.NewResponse(res), nil
|
|
},
|
|
},
|
|
{
|
|
Name: "UpdateAvatar",
|
|
Type: constant.CallUnary,
|
|
ReqInitFunc: func() interface{} {
|
|
return new(UpdateAvatarRequest)
|
|
},
|
|
MethodFunc: func(ctx context.Context, args []interface{}, handler interface{}) (interface{}, error) {
|
|
req := args[0].(*UpdateAvatarRequest)
|
|
res, err := handler.(UserSocialServiceHandler).UpdateAvatar(ctx, req)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return triple_protocol.NewResponse(res), nil
|
|
},
|
|
},
|
|
{
|
|
Name: "GetFanIdentities",
|
|
Type: constant.CallUnary,
|
|
ReqInitFunc: func() interface{} {
|
|
return new(GetFanIdentitiesRequest)
|
|
},
|
|
MethodFunc: func(ctx context.Context, args []interface{}, handler interface{}) (interface{}, error) {
|
|
req := args[0].(*GetFanIdentitiesRequest)
|
|
res, err := handler.(UserSocialServiceHandler).GetFanIdentities(ctx, req)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return triple_protocol.NewResponse(res), nil
|
|
},
|
|
},
|
|
{
|
|
Name: "GetMyFanIdentities",
|
|
Type: constant.CallUnary,
|
|
ReqInitFunc: func() interface{} {
|
|
return new(GetMyFanIdentitiesRequest)
|
|
},
|
|
MethodFunc: func(ctx context.Context, args []interface{}, handler interface{}) (interface{}, error) {
|
|
req := args[0].(*GetMyFanIdentitiesRequest)
|
|
res, err := handler.(UserSocialServiceHandler).GetMyFanIdentities(ctx, req)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return triple_protocol.NewResponse(res), nil
|
|
},
|
|
},
|
|
{
|
|
Name: "AddIdentity",
|
|
Type: constant.CallUnary,
|
|
ReqInitFunc: func() interface{} {
|
|
return new(AddIdentityRequest)
|
|
},
|
|
MethodFunc: func(ctx context.Context, args []interface{}, handler interface{}) (interface{}, error) {
|
|
req := args[0].(*AddIdentityRequest)
|
|
res, err := handler.(UserSocialServiceHandler).AddIdentity(ctx, req)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return triple_protocol.NewResponse(res), nil
|
|
},
|
|
},
|
|
{
|
|
Name: "SwitchIdentity",
|
|
Type: constant.CallUnary,
|
|
ReqInitFunc: func() interface{} {
|
|
return new(SwitchIdentityRequest)
|
|
},
|
|
MethodFunc: func(ctx context.Context, args []interface{}, handler interface{}) (interface{}, error) {
|
|
req := args[0].(*SwitchIdentityRequest)
|
|
res, err := handler.(UserSocialServiceHandler).SwitchIdentity(ctx, req)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return triple_protocol.NewResponse(res), nil
|
|
},
|
|
},
|
|
},
|
|
}
|