FindServiceByName returns a service.
(ctx context.Context, orgID, name string)
| 1352 | |
| 1353 | // FindServiceByName returns a service. |
| 1354 | func (c *connection) FindServiceByName(ctx context.Context, orgID, name string) (*database.Service, error) { |
| 1355 | res := &serviceDTO{} |
| 1356 | |
| 1357 | err := c.getDB(ctx).QueryRowxContext(ctx, "SELECT * FROM service WHERE org_id=$1 AND name=$2", orgID, name).StructScan(res) |
| 1358 | if err != nil { |
| 1359 | return nil, parseErr("service", err) |
| 1360 | } |
| 1361 | return res.serviceFromDTO() |
| 1362 | } |
| 1363 | |
| 1364 | // FindOrganizationMemberServiceForService returns the org level service details for a specific service. |
| 1365 | func (c *connection) FindOrganizationMemberServiceForService(ctx context.Context, id string) (*database.OrganizationMemberService, error) { |
nothing calls this directly
no test coverage detected