(id string, p *policy.UpdatePolicy)
| 56 | } |
| 57 | |
| 58 | func (m *PolicyManager) UpdatePolicy(id string, p *policy.UpdatePolicy) (*policy.Policy, error) { |
| 59 | err := p.Validate() |
| 60 | if err != nil { |
| 61 | return nil, err |
| 62 | } |
| 63 | |
| 64 | p.UpdatedAt = time.Now().Unix() |
| 65 | |
| 66 | return m.Storage.UpdatePolicy(id, p) |
| 67 | } |
| 68 | |
| 69 | func (m *PolicyManager) GetPoliciesByTags(tags []string) ([]*policy.Policy, error) { |
| 70 | return m.Storage.GetPoliciesByTags(tags) |
nothing calls this directly
no test coverage detected