MCPcopy Create free account
hub / github.com/devaccuracy/ledgerforge / GetMatchingRule

Method GetMatchingRule

reconciliation.go:1137–1143  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

1135// - id: The ID of the matching rule to retrieve.
1136// Returns the matching rule, or an error if retrieval fails.
1137func (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.

Callers 2

UpdateMatchingRuleMethod · 0.95
getMatchingRulesMethod · 0.95

Calls 1

GetMatchingRuleMethod · 0.65

Tested by

no test coverage detected