(strategy_id int)
| 70 | } |
| 71 | |
| 72 | func (this *db) GetGroupsByStrategyID(strategy_id int) []*types.Group { |
| 73 | groups := []*types.Group{} |
| 74 | if err := this.Select(&groups, "SELECT `id`, `name` FROM `host_group` WHERE `id` IN (SELECT `group_id` FROM `strategy_group` WHERE `strategy_id`=?)", strategy_id); err != nil { |
| 75 | lg.Error(err.Error()) |
| 76 | return nil |
| 77 | } |
| 78 | return groups |
| 79 | } |
| 80 | |
| 81 | func (this *db) GetHostsByGroupID(group_id int) []*types.Host { |
| 82 | hosts := []*types.Host{} |
no outgoing calls
no test coverage detected