GetMatchingRule retrieves a matching rule by its ID. Parameters: - ctx: The context for managing the request. - id: The ID of the matching rule to retrieve. Returns the matching rule, or an error if retrieval fails.
(ctx context.Context, id string)
| 1135 | // - id: The ID of the matching rule to retrieve. |
| 1136 | // Returns the matching rule, or an error if retrieval fails. |
| 1137 | func (s *LedgerForge) GetMatchingRule(ctx context.Context, id string) (*model.MatchingRule, error) { |
| 1138 | rule, err := s.datasource.GetMatchingRule(ctx, id) |
| 1139 | if err != nil { |
| 1140 | return nil, err |
| 1141 | } |
| 1142 | return rule, nil |
| 1143 | } |
| 1144 | |
| 1145 | // UpdateMatchingRule updates an existing matching rule. |
| 1146 | // It retrieves the existing rule, validates the new data, and then updates the rule. |
no test coverage detected