(strategy_id int)
| 57 | } |
| 58 | |
| 59 | func (this *db) GetHostsExByStrategyID(strategy_id int) map[string]string { |
| 60 | ids := make([]string, 0) |
| 61 | if err := this.Select(&ids, "SELECT host_id FROM strategy_host_exclude WHERE strategy_id=?", strategy_id); err != nil { |
| 62 | lg.Error(err.Error()) |
| 63 | return nil |
| 64 | } |
| 65 | exHosts := make(map[string]string, 0) |
| 66 | for _, id := range ids { |
| 67 | exHosts[id] = id |
| 68 | } |
| 69 | return exHosts |
| 70 | } |
| 71 | |
| 72 | func (this *db) GetGroupsByStrategyID(strategy_id int) []*types.Group { |
| 73 | groups := []*types.Group{} |
no outgoing calls
no test coverage detected