Skip to main content

delete_data_source

Function delete_data_source 

Source
pub fn delete_data_source(config_json: &str, code: &str) -> Result<String>
Expand description

Delete a data source from the configuration

§Arguments

  • config_json - JSON configuration string
  • code - Data source code to delete

§Returns

Modified configuration JSON string

§Errors

  • NotFound if data source doesn’t exist
  • InvalidInput if attempting to delete system datasource (ID <= 2)
  • JsonParse if config_json is invalid
  • MissingSection if CFG_DSRC section doesn’t exist