LCOV - code coverage report
Current view: top level - usecase/license - exists_user_license_interactor.go Coverage Total Hit
Test: coverage.lcov Lines: 0.0 % 13 0
Test Date: 2026-04-14 06:42:22 Functions: - 0 0

            Line data    Source code
       1              : // Package license は 資格・免許 に関するユースケース(アプリケーションロジック)を提供します
       2              : // ドメイン層のエンティティやリポジトリを操作し、アプリケーション全体で利用可能なビジネスフローを実装します
       3              : package license
       4              : 
       5              : import "context"
       6              : 
       7              : // ExistsUserLicense は ユーザーの資格・免許 の存在を判定します
       8              : func (uc *Interactor) ExistsUserLicense(
       9              :         ctx context.Context,
      10              :         in ExistsUserLicenseInput,
      11            0 : ) (ExistsUserLicenseOutput, error) {
      12            0 :         if in.UserID == 0 {
      13            0 :                 return ExistsUserLicenseOutput{}, errUnauthorized()
      14            0 :         }
      15            0 :         var exists bool
      16            0 :         if err := uc.tx.Do(ctx, func(txCtx context.Context) error {
      17            0 :                 var err error
      18            0 :                 exists, err = uc.ulRepo.ExistsByUserID(txCtx, in.UserID)
      19            0 :                 return err
      20            0 :         }); err != nil {
      21            0 :                 return ExistsUserLicenseOutput{}, err
      22            0 :         }
      23            0 :         return ToExistsUserLicenseOutput(exists), nil
      24              : }
        

Generated by: LCOV version 2.3.1-1