(s *strategy.Strategy)
| 56 | } |
| 57 | |
| 58 | func ToStrategy(s *strategy.Strategy) *Strategy { |
| 59 | filters := make([]*Filter, 0) |
| 60 | json.Unmarshal([]byte(s.Filters), &filters) |
| 61 | var cfg interface{} |
| 62 | json.Unmarshal([]byte(s.Config), &cfg) |
| 63 | return &Strategy{ |
| 64 | Id: s.Id, |
| 65 | Name: s.Name, |
| 66 | Priority: s.Priority, |
| 67 | Desc: s.Desc, |
| 68 | Filters: filters, |
| 69 | Config: cfg, |
| 70 | IsDelete: s.IsDelete || s.IsStop, |
| 71 | } |
| 72 | } |
| 73 | |
| 74 | type Strategy struct { |
| 75 | Id string `json:"id"` |
nothing calls this directly
no outgoing calls
no test coverage detected