Documentation
¶
Index ¶
- func NewUserUsecase(cfg *config.Config, redis *redis.Client, repo domain.UserRepo, ...) domain.UserUsecase
- type OAuthUserRepoHandle
- type UserUsecase
- func (u *UserUsecase) AdminList(ctx context.Context, page *web.Pagination) (*domain.ListAdminUserResp, error)
- func (u *UserUsecase) AdminLogin(ctx context.Context, req *domain.LoginReq) (*domain.AdminUser, error)
- func (u *UserUsecase) AdminLoginHistory(ctx context.Context, page *web.Pagination) (*domain.ListAdminLoginHistoryResp, error)
- func (u *UserUsecase) CreateAdmin(ctx context.Context, req *domain.CreateAdminReq) (*domain.AdminUser, error)
- func (u *UserUsecase) Delete(ctx context.Context, id string) error
- func (u *UserUsecase) DeleteAdmin(ctx context.Context, id string) error
- func (u *UserUsecase) ExportCompletionData(ctx context.Context) (*domain.ExportCompletionDataResp, error)
- func (u *UserUsecase) FetchUserInfo(ctx context.Context, req *domain.OAuthCallbackReq, session *domain.OAuthState) (*domain.OAuthUserInfo, error)
- func (u *UserUsecase) GetPermissions(ctx context.Context, id uuid.UUID) (*domain.Permissions, error)
- func (u *UserUsecase) GetSetting(ctx context.Context) (*domain.Setting, error)
- func (u *UserUsecase) GetUserByApiKey(ctx context.Context, apiKey string) (*db.User, error)
- func (u *UserUsecase) GetUserCount(ctx context.Context) (int64, error)
- func (u *UserUsecase) GrantRole(ctx context.Context, req *domain.GrantRoleReq) error
- func (u *UserUsecase) InitAdmin(ctx context.Context) error
- func (u *UserUsecase) Invite(ctx context.Context, userID string) (*domain.InviteResp, error)
- func (u *UserUsecase) List(ctx context.Context, req domain.ListReq) (*domain.ListUserResp, error)
- func (u *UserUsecase) ListRole(ctx context.Context) ([]*domain.Role, error)
- func (u *UserUsecase) Login(ctx context.Context, req *domain.LoginReq) (*domain.LoginResp, error)
- func (u *UserUsecase) LoginHistory(ctx context.Context, page *web.Pagination) (*domain.ListLoginHistoryResp, error)
- func (u *UserUsecase) OAuthCallback(c *web.Context, req *domain.OAuthCallbackReq) error
- func (u *UserUsecase) OAuthSignUpOrIn(ctx context.Context, req *domain.OAuthSignUpOrInReq) (*domain.OAuthURLResp, error)
- func (u *UserUsecase) ProfileUpdate(ctx context.Context, req *domain.ProfileUpdateReq) (*domain.User, error)
- func (u *UserUsecase) Register(ctx context.Context, req *domain.RegisterReq) (*domain.User, error)
- func (u *UserUsecase) Update(ctx context.Context, req *domain.UpdateUserReq) (*domain.User, error)
- func (u *UserUsecase) UpdateSetting(ctx context.Context, req *domain.UpdateSettingReq) (*domain.Setting, error)
- func (u *UserUsecase) VSCodeAuthInit(ctx context.Context, req *domain.VSCodeAuthInitReq) (*domain.VSCodeAuthInitResp, error)
- func (u *UserUsecase) WithOAuthCallback(ctx context.Context, req *domain.OAuthCallbackReq, session *domain.OAuthState, ...) (*db.User, string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type OAuthUserRepoHandle ¶
type OAuthUserRepoHandle func(context.Context, *domain.OAuthState, *domain.OAuthUserInfo) (*db.User, error)
type UserUsecase ¶
type UserUsecase struct {
// contains filtered or unexported fields
}
func (*UserUsecase) AdminList ¶
func (u *UserUsecase) AdminList(ctx context.Context, page *web.Pagination) (*domain.ListAdminUserResp, error)
AdminList implements domain.UserUsecase.
func (*UserUsecase) AdminLogin ¶
func (*UserUsecase) AdminLoginHistory ¶
func (u *UserUsecase) AdminLoginHistory(ctx context.Context, page *web.Pagination) (*domain.ListAdminLoginHistoryResp, error)
AdminLoginHistory implements domain.UserUsecase.
func (*UserUsecase) CreateAdmin ¶
func (u *UserUsecase) CreateAdmin(ctx context.Context, req *domain.CreateAdminReq) (*domain.AdminUser, error)
func (*UserUsecase) DeleteAdmin ¶
func (u *UserUsecase) DeleteAdmin(ctx context.Context, id string) error
func (*UserUsecase) ExportCompletionData ¶
func (u *UserUsecase) ExportCompletionData(ctx context.Context) (*domain.ExportCompletionDataResp, error)
func (*UserUsecase) FetchUserInfo ¶
func (u *UserUsecase) FetchUserInfo(ctx context.Context, req *domain.OAuthCallbackReq, session *domain.OAuthState) (*domain.OAuthUserInfo, error)
func (*UserUsecase) GetPermissions ¶
func (u *UserUsecase) GetPermissions(ctx context.Context, id uuid.UUID) (*domain.Permissions, error)
func (*UserUsecase) GetSetting ¶
func (*UserUsecase) GetUserByApiKey ¶
GetUserByApiKey implements domain.UserUsecase.
func (*UserUsecase) GetUserCount ¶
func (u *UserUsecase) GetUserCount(ctx context.Context) (int64, error)
func (*UserUsecase) GrantRole ¶
func (u *UserUsecase) GrantRole(ctx context.Context, req *domain.GrantRoleReq) error
func (*UserUsecase) Invite ¶
func (u *UserUsecase) Invite(ctx context.Context, userID string) (*domain.InviteResp, error)
Invite implements domain.UserUsecase.
func (*UserUsecase) List ¶
func (u *UserUsecase) List(ctx context.Context, req domain.ListReq) (*domain.ListUserResp, error)
func (*UserUsecase) LoginHistory ¶
func (u *UserUsecase) LoginHistory(ctx context.Context, page *web.Pagination) (*domain.ListLoginHistoryResp, error)
LoginHistory implements domain.UserUsecase.
func (*UserUsecase) OAuthCallback ¶
func (u *UserUsecase) OAuthCallback(c *web.Context, req *domain.OAuthCallbackReq) error
func (*UserUsecase) OAuthSignUpOrIn ¶
func (u *UserUsecase) OAuthSignUpOrIn(ctx context.Context, req *domain.OAuthSignUpOrInReq) (*domain.OAuthURLResp, error)
func (*UserUsecase) ProfileUpdate ¶
func (u *UserUsecase) ProfileUpdate(ctx context.Context, req *domain.ProfileUpdateReq) (*domain.User, error)
func (*UserUsecase) Register ¶
func (u *UserUsecase) Register(ctx context.Context, req *domain.RegisterReq) (*domain.User, error)
Register implements domain.UserUsecase.
func (*UserUsecase) Update ¶
func (u *UserUsecase) Update(ctx context.Context, req *domain.UpdateUserReq) (*domain.User, error)
func (*UserUsecase) UpdateSetting ¶
func (u *UserUsecase) UpdateSetting(ctx context.Context, req *domain.UpdateSettingReq) (*domain.Setting, error)
func (*UserUsecase) VSCodeAuthInit ¶
func (u *UserUsecase) VSCodeAuthInit(ctx context.Context, req *domain.VSCodeAuthInitReq) (*domain.VSCodeAuthInitResp, error)
func (*UserUsecase) WithOAuthCallback ¶
func (u *UserUsecase) WithOAuthCallback(ctx context.Context, req *domain.OAuthCallbackReq, session *domain.OAuthState, handle OAuthUserRepoHandle) (*db.User, string, error)
Click to show internal directories.
Click to hide internal directories.