LCOV - code coverage report
Current view: top level - usecase/profile - list_user_address_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 profile は、ユーザー住所に関するユースケース(アプリケーションロジック)を提供します。
       2              : // ドメイン層のエンティティやリポジトリを操作し、アプリケーション全体で再利用可能なビジネスフローを実装します。
       3              : package profile
       4              : 
       5              : import (
       6              :         "context"
       7              :         "log/slog"
       8              : )
       9              : 
      10              : // ListUserAddress は 認証済みユーザーの住所一覧を取得します。
      11            0 : func (uc *Interactor) ListUserAddress(ctx context.Context, in ListUserAddressInput) (ListUserAddressOutput, error) {
      12            0 :         if in.UserID == 0 {
      13            0 :                 return ListUserAddressOutput{}, errUnauthorized()
      14            0 :         }
      15            0 :         slog.Debug("interactor", "ctx", ctx, "in", in)
      16            0 :         addresses, total, err := uc.uaRepo.ListByUserIDWithSpec(ctx, in.UserID, in)
      17            0 :         if err != nil {
      18            0 :                 return ListUserAddressOutput{}, err
      19            0 :         }
      20              : 
      21            0 :         return ListUserAddressOutput{
      22            0 :                 Items: ToUserAddressResponses(addresses),
      23            0 :                 Total: total,
      24            0 :         }, nil
      25              : }
        

Generated by: LCOV version 2.3.1-1