Passed
Push — main ( 0795ea...57a23e )
by Yume
02:19 queued 01:06
created

internal/card/usecase.go   A

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 11
dl 0
loc 19
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A card.NewUseCase 0 2 1
A card.*UseCase.GetByID 0 2 1
1
package card
2
3
import (
4
	"context"
5
6
	"github.com/memnix/memnix-rest/domain"
7
)
8
9
type UseCase struct {
10
	IRepository
11
	IRedisRepository
12
}
13
14
func NewUseCase(repo IRepository, redis IRedisRepository) IUseCase {
15
	return &UseCase{IRepository: repo, IRedisRepository: redis}
16
}
17
18
func (u *UseCase) GetByID(ctx context.Context, id uint) (domain.Card, error) {
19
	return domain.Card{}, nil
20
}
21