Documentation ¶
Index ¶
- Constants
- func DeleteSuggestion(ctx context.Context, app *app.App, suggestionKey string) error
- func FindLinkableCustomers(ctx context.Context) error
- func LinkCustomers(ctx context.Context, app *app.App, suggestion Suggestion) error
- func MarkFalsePositive(ctx context.Context, app *app.App, suggestionKey string) error
- func RegisterOn(mng *tasks.Manager) (*tasks.Task, error)
- type Reason
- type Suggestion
Constants ¶
const CachePrefix = "persist/suggestions/linkable/"
Variables ¶
This section is empty.
Functions ¶
func DeleteSuggestion ¶
DeleteSuggestion actually deletes a cache entry for the suggestion identified by suggestionKey. Note that the suggestion is likely to get re-created the next time FindLinkableCustomers is executed if the root cause of the suggestion did not change.
func FindLinkableCustomers ¶
FindLinkableCustomers searches the complete customer database for customer-records that are likely to describe the same contact and can therefore be linked together. The found suggestions are persisted in the application cache using "persist/suggestions/linkable/<reason>/<value>".
func LinkCustomers ¶
LinkCustomers links all customers in suggestion. All customers will be linked to primary. If Primary is empty, the customer of the preferred source is used as the primary. If no preferred source is available, the first customer of the suggestion is used as the primary.
func MarkFalsePositive ¶
MarkFalsePositive marks a customer-link suggestion as false-positive.
Types ¶
type Suggestion ¶
type Suggestion struct { FalsePositive bool `json:"falsePositive,omitempty" bson:"falsePositive,omitempty"` Reason Reason `json:"reason,omitempty" bson:"reason,omitempty"` Value string `json:"value,omitempty" bson:"value,omitempty"` Refs []*v1alpha.CustomerRef `json:"refs,omitempty" bson:"refs,omitempty"` Primary *v1alpha.CustomerRef `json:"primary,omitempty" bson:"primary,omitempty"` }