MCPcopy Create free account
hub / github.com/PatchMon/PatchMon / GetByID

Method GetByID

server-source-code/internal/store/host_groups.go:45–53  ·  view source on GitHub ↗

GetByID returns a host group by ID.

(ctx context.Context, id string)

Source from the content-addressed store, hash-verified

43
44// GetByID returns a host group by ID.
45func (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.
56func (s *HostGroupsStore) Create(ctx context.Context, g *models.HostGroup) error {

Callers

nothing calls this directly

Calls 3

dbHostGroupToModelFullFunction · 0.85
DBMethod · 0.65
GetHostGroupByIDMethod · 0.65

Tested by

no test coverage detected