Files
satusehat-service/internal/bpjs/antrol/reference/service.go
T
2026-04-14 01:23:34 +00:00

27 lines
512 B
Go

package antrol
import (
"context"
"service/pkg/errors"
)
type Service interface {
GetRefPoli(ctx context.Context) ([]Poli, error)
}
type service struct {
repo Repository
}
func NewService(repo Repository) Service {
return &service{repo: repo}
}
func (s *service) GetRefPoli(ctx context.Context) ([]Poli, error) {
res, err := s.repo.GetRefPoli(ctx)
if err != nil {
return nil, errors.ExternalError().Message("Gagal mengambil referensi poli Antrean RS BPJS").Cause(err).Build()
}
return res, nil
}