Files
query-orchestration/internal/client/get.go
T
Jay Brown 15adaebfcd Merged in feature/serviceconfig-integration (pull request #38)
DRAFT PR : WIP working through ideas for integration

* movearound

* attempttwo

* openapi

* further sanding

* fix

* start on tests

* runthroughsingleconfig

* somechanges

* reflectissue

* removeerrs

* mostlyremovepanic

* removeenv

* noncfgtests

* go

* repo

* fix service config test

* add PWD to all

* test fix

* fix lint

* todo for later

* passingunittests

* alltests

* testlogger

* testloggername

* clean
2025-01-31 13:43:55 +00:00

22 lines
421 B
Go

package client
import (
"context"
"queryorchestration/internal/database"
"github.com/google/uuid"
)
func (s *Service) Get(ctx context.Context, id uuid.UUID) (*Client, error) {
client, err := s.cfg.GetDBQueries().GetClient(ctx, database.MustToDBUUID(id))
if err != nil {
return nil, err
}
return &Client{
ID: database.MustToUUID(client.ID),
Name: client.Name,
CanSync: client.Cansync,
}, nil
}