0ddae4f91e
remove query from codebase part 1 * remove query * fix localstack run
16 lines
359 B
Go
16 lines
359 B
Go
package collector
|
|
|
|
import (
|
|
"context"
|
|
)
|
|
|
|
// GetByClientID retrieves a client's collector configuration by client ID.
|
|
func (s *Service) GetByClientID(ctx context.Context, clientID string) (*Collector, error) {
|
|
dbColl, err := s.cfg.GetDBQueries().GetCollectorByClientID(ctx, clientID)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
return parseDBCollector(dbColl)
|
|
}
|