Skip to main content

sz_configtool_lib/functions/
scoring.rs

1//! Scoring function operations for Senzing configuration
2//!
3//! This module provides functions for managing scoring functions in CFG_RTYPE
4//! in the Senzing configuration JSON.
5//!
6//! Note: These are placeholder functions that will be implemented when the
7//! CLI command implementations are completed.
8
9use crate::error::SzConfigError;
10use serde_json::Value;
11
12/// Add a new scoring function (placeholder)
13pub fn add_scoring_function(
14    _config_json: &str,
15    _rtype_code: &str,
16    _scoring_func: &str,
17) -> Result<(String, Value), SzConfigError> {
18    Err(SzConfigError::not_implemented(
19        "Scoring functions are not yet fully implemented",
20    ))
21}
22
23/// Delete a scoring function (placeholder)
24pub fn delete_scoring_function(
25    _config_json: &str,
26    _rtype_code: &str,
27) -> Result<(String, Value), SzConfigError> {
28    Err(SzConfigError::not_implemented(
29        "Scoring functions are not yet fully implemented",
30    ))
31}
32
33/// Get a scoring function (placeholder)
34pub fn get_scoring_function(_config_json: &str, _rtype_code: &str) -> Result<Value, SzConfigError> {
35    Err(SzConfigError::not_implemented(
36        "Scoring functions are not yet fully implemented",
37    ))
38}
39
40/// List all scoring functions (placeholder)
41pub fn list_scoring_functions(_config_json: &str) -> Result<Vec<Value>, SzConfigError> {
42    Err(SzConfigError::not_implemented(
43        "Scoring functions are not yet fully implemented",
44    ))
45}
46
47/// Set (update) a scoring function (placeholder)
48pub fn set_scoring_function(
49    _config_json: &str,
50    _rtype_code: &str,
51    _scoring_func: Option<&str>,
52) -> Result<(String, Value), SzConfigError> {
53    Err(SzConfigError::not_implemented(
54        "Scoring functions are not yet fully implemented",
55    ))
56}
57
58/// Remove a scoring function (placeholder)
59pub fn remove_scoring_function(
60    _config_json: &str,
61    _rtype_code: &str,
62) -> Result<(String, Value), SzConfigError> {
63    Err(SzConfigError::not_implemented(
64        "Scoring functions are not yet fully implemented",
65    ))
66}