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

25 lines
629 B
Go

package kfa
import "context"
type Service interface {
GetByCode(ctx context.Context, code string) (map[string]interface{}, error)
GetProducts(ctx context.Context, params KFASearchParams) (map[string]interface{}, error)
}
type service struct {
repo Repository
}
func NewService(repo Repository) Service {
return &service{repo: repo}
}
func (s *service) GetByCode(ctx context.Context, code string) (map[string]interface{}, error) {
return s.repo.GetByCode(ctx, code)
}
func (s *service) GetProducts(ctx context.Context, params KFASearchParams) (map[string]interface{}, error) {
return s.repo.GetProducts(ctx, params)
}