GetByID returns a host group by ID.
(ctx context.Context, id string)
| 43 | |
| 44 | // GetByID returns a host group by ID. |
| 45 | func (s *HostGroupsStore) GetByID(ctx context.Context, id string) (*models.HostGroup, error) { |
| 46 | d := s.db.DB(ctx) |
| 47 | h, err := d.Queries.GetHostGroupByID(ctx, id) |
| 48 | if err != nil { |
| 49 | return nil, err |
| 50 | } |
| 51 | out := dbHostGroupToModelFull(h) |
| 52 | return &out, nil |
| 53 | } |
| 54 | |
| 55 | // Create creates a new host group. |
| 56 | func (s *HostGroupsStore) Create(ctx context.Context, g *models.HostGroup) error { |
nothing calls this directly
no test coverage detected