forked from ebhomengo/niki
20 lines
592 B
Go
20 lines
592 B
Go
package benefactorrefertimeservice
|
|
|
|
import (
|
|
"context"
|
|
|
|
param "git.gocasts.ir/ebhomengo/niki/param/benefactor/refer_time"
|
|
richerror "git.gocasts.ir/ebhomengo/niki/pkg/rich_error"
|
|
)
|
|
|
|
func (s Service) GetAll(ctx context.Context, _ param.GetAllReferTimeRequest) (param.GetAllReferTimeResponse, error) {
|
|
const op = "benefactorrefertimeservice.GetAllReferTime"
|
|
|
|
referTimes, err := s.repo.GetAll(ctx)
|
|
if err != nil {
|
|
return param.GetAllReferTimeResponse{}, richerror.New(op).WithErr(err).WithKind(richerror.KindUnexpected)
|
|
}
|
|
|
|
return param.GetAllReferTimeResponse{Data: referTimes}, nil
|
|
}
|