// Code generated by goctl. DO NOT EDIT. // goctl 1.7.3 // Source: member.proto package server import ( "context" "app-cloudep-member-server/gen_result/pb/member" accountlogic "app-cloudep-member-server/internal/logic/account" "app-cloudep-member-server/internal/svc" ) type AccountServer struct { svcCtx *svc.ServiceContext member.UnimplementedAccountServer } func NewAccountServer(svcCtx *svc.ServiceContext) *AccountServer { return &AccountServer{ svcCtx: svcCtx, } } // CreateUserAccount 建立帳號與密碼 -> 可登入,但可不可以做其他事情看業務流程,也可以只註冊就好 func (s *AccountServer) CreateUserAccount(ctx context.Context, in *member.CreateLoginUserReq) (*member.OKResp, error) { l := accountlogic.NewCreateUserAccountLogic(ctx, s.svcCtx) return l.CreateUserAccount(in) } // GetUserAccountInfo 取得帳號密碼資料 func (s *AccountServer) GetUserAccountInfo(ctx context.Context, in *member.GetUIDByAccountReq) (*member.GetAccountInfoResp, error) { l := accountlogic.NewGetUserAccountInfoLogic(ctx, s.svcCtx) return l.GetUserAccountInfo(in) } // UpdateUserToken 更新密碼 func (s *AccountServer) UpdateUserToken(ctx context.Context, in *member.UpdateTokenReq) (*member.OKResp, error) { l := accountlogic.NewUpdateUserTokenLogic(ctx, s.svcCtx) return l.UpdateUserToken(in) } // GetUIDByAccount 用帳號換取 UID func (s *AccountServer) GetUIDByAccount(ctx context.Context, in *member.GetUIDByAccountReq) (*member.GetUIDByAccountResp, error) { l := accountlogic.NewGetUIDByAccountLogic(ctx, s.svcCtx) return l.GetUIDByAccount(in) } // BindAccount 綁定帳號 -> account bind to UID func (s *AccountServer) BindAccount(ctx context.Context, in *member.BindingUserReq) (*member.BindingUserResp, error) { l := accountlogic.NewBindAccountLogic(ctx, s.svcCtx) return l.BindAccount(in) } // BindUserInfo 初次,綁定 User Info func (s *AccountServer) BindUserInfo(ctx context.Context, in *member.CreateUserInfoReq) (*member.OKResp, error) { l := accountlogic.NewBindUserInfoLogic(ctx, s.svcCtx) return l.BindUserInfo(in) } // BindVerifyEmail 綁定 Email func (s *AccountServer) BindVerifyEmail(ctx context.Context, in *member.BindVerifyEmailReq) (*member.OKResp, error) { l := accountlogic.NewBindVerifyEmailLogic(ctx, s.svcCtx) return l.BindVerifyEmail(in) } // BindVerifyPhone 綁定 Phone func (s *AccountServer) BindVerifyPhone(ctx context.Context, in *member.BindVerifyPhoneReq) (*member.OKResp, error) { l := accountlogic.NewBindVerifyPhoneLogic(ctx, s.svcCtx) return l.BindVerifyPhone(in) } // UpdateUserInfo 更新 User Info func (s *AccountServer) UpdateUserInfo(ctx context.Context, in *member.UpdateUserInfoReq) (*member.OKResp, error) { l := accountlogic.NewUpdateUserInfoLogic(ctx, s.svcCtx) return l.UpdateUserInfo(in) } // UpdateStatus 修改狀態 func (s *AccountServer) UpdateStatus(ctx context.Context, in *member.UpdateStatusReq) (*member.OKResp, error) { l := accountlogic.NewUpdateStatusLogic(ctx, s.svcCtx) return l.UpdateStatus(in) } // GetUserInfo 取得會員資訊 func (s *AccountServer) GetUserInfo(ctx context.Context, in *member.GetUserInfoReq) (*member.GetUserInfoResp, error) { l := accountlogic.NewGetUserInfoLogic(ctx, s.svcCtx) return l.GetUserInfo(in) } // ListMember 取得會員列表 func (s *AccountServer) ListMember(ctx context.Context, in *member.ListUserInfoReq) (*member.ListUserInfoResp, error) { l := accountlogic.NewListMemberLogic(ctx, s.svcCtx) return l.ListMember(in) } // GenerateRefreshCode 這個帳號驗證碼(十分鐘),通用的 func (s *AccountServer) GenerateRefreshCode(ctx context.Context, in *member.GenerateRefreshCodeReq) (*member.GenerateRefreshCodeResp, error) { l := accountlogic.NewGenerateRefreshCodeLogic(ctx, s.svcCtx) return l.GenerateRefreshCode(in) } // VerifyRefreshCode 驗證忘記密碼 token func (s *AccountServer) VerifyRefreshCode(ctx context.Context, in *member.VerifyRefreshCodeReq) (*member.OKResp, error) { l := accountlogic.NewVerifyRefreshCodeLogic(ctx, s.svcCtx) return l.VerifyRefreshCode(in) } // CheckRefreshCode 驗證忘記密碼 token 不刪除,只確認) func (s *AccountServer) CheckRefreshCode(ctx context.Context, in *member.VerifyRefreshCodeReq) (*member.OKResp, error) { l := accountlogic.NewCheckRefreshCodeLogic(ctx, s.svcCtx) return l.CheckRefreshCode(in) } // VerifyGoogleAuthResult 驗證 google 登入是否有效 func (s *AccountServer) VerifyGoogleAuthResult(ctx context.Context, in *member.VerifyAuthResultReq) (*member.VerifyAuthResultResp, error) { l := accountlogic.NewVerifyGoogleAuthResultLogic(ctx, s.svcCtx) return l.VerifyGoogleAuthResult(in) } // VerifyPlatformAuthResult 驗證 google 登入是否有效 func (s *AccountServer) VerifyPlatformAuthResult(ctx context.Context, in *member.VerifyAuthResultReq) (*member.VerifyAuthResultResp, error) { l := accountlogic.NewVerifyPlatformAuthResultLogic(ctx, s.svcCtx) return l.VerifyPlatformAuthResult(in) } // LineCodeToAccessToken Line 驗證相關 func (s *AccountServer) LineCodeToAccessToken(ctx context.Context, in *member.NoneReq) (*member.LineAccessTokenResp, error) { l := accountlogic.NewLineCodeToAccessTokenLogic(ctx, s.svcCtx) return l.LineCodeToAccessToken(in) } // LineGetProfileByAccessToken Line 驗證相關 func (s *AccountServer) LineGetProfileByAccessToken(ctx context.Context, in *member.NoneReq) (*member.LineUserProfile, error) { l := accountlogic.NewLineGetProfileByAccessTokenLogic(ctx, s.svcCtx) return l.LineGetProfileByAccessToken(in) }