Files
hfb_sys/backend/internal/modules/platformops/service.go
T

24 lines
421 B
Go

package platformops
import (
"context"
"errors"
)
var ErrDependencyUnavailable = errors.New("platform ops dependency unavailable")
type Service struct {
repo *Repository
}
func NewService(repo *Repository) *Service {
return &Service{repo: repo}
}
func (s *Service) Overview(ctx context.Context) (*OverviewDTO, error) {
if s.repo == nil {
return nil, ErrDependencyUnavailable
}
return s.repo.Overview(ctx)
}