FindService returns a service.
(ctx context.Context, id string)
| 1342 | |
| 1343 | // FindService returns a service. |
| 1344 | func (c *connection) FindService(ctx context.Context, id string) (*database.Service, error) { |
| 1345 | res := &serviceDTO{} |
| 1346 | err := c.getDB(ctx).QueryRowxContext(ctx, "SELECT * FROM service WHERE id=$1", id).StructScan(res) |
| 1347 | if err != nil { |
| 1348 | return nil, parseErr("service", err) |
| 1349 | } |
| 1350 | return res.serviceFromDTO() |
| 1351 | } |
| 1352 | |
| 1353 | // FindServiceByName returns a service. |
| 1354 | func (c *connection) FindServiceByName(ctx context.Context, orgID, name string) (*database.Service, error) { |
nothing calls this directly
no test coverage detected