EqualsWithAnnotationSubset is equivalent to Equals except it accepts cases where t's annotations are strict subset of t2
(t2 *Trigger)
| 44 | |
| 45 | // EqualsWithAnnotationSubset is equivalent to Equals except it accepts cases where t's annotations are strict subset of t2 |
| 46 | func (t *Trigger) EqualsWithAnnotationSubset(t2 *Trigger) bool { |
| 47 | eq := true |
| 48 | eq = eq && t.ID == t2.ID |
| 49 | eq = eq && t.Name == t2.Name |
| 50 | eq = eq && t.AppID == t2.AppID |
| 51 | eq = eq && t.FnID == t2.FnID |
| 52 | |
| 53 | eq = eq && t.Type == t2.Type |
| 54 | eq = eq && t.Source == t2.Source |
| 55 | eq = eq && t.Annotations.Subset(t2.Annotations) |
| 56 | |
| 57 | return eq |
| 58 | } |
| 59 | |
| 60 | // TriggerTypeHTTP represents an HTTP trigger |
| 61 | const TriggerTypeHTTP = "http" |