🎧 Your Personal Streaming Service
Go airsonicmadsonicmedia-servermusicmusic-servernavidromeopensubsonicraspberry-piself-hostedstreamerstreaming-apistreaming-audiosubsonicsubsonic-server
// Code generated by ndpgen. DO NOT EDIT.
//
// This file contains client wrappers for the Storage host service.
// It is intended for use in Navidrome plugins built with extism-pdk.
use extism_pdk::*;
use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, Deserialize)]
#[serde(rename_all = "camelCase")]
struct StorageGetStoragePathResponse {
#[serde(default)]
result: String,
}
#[host_fn]
extern "ExtismHost" {
fn storage_getstoragepath(input: Json<serde_json::Value>) -> Json<StorageGetStoragePathResponse>;
}
/// GetStoragePath retrieves the persistent storage path, if allowed
///
/// # Returns
/// The result value.
///
/// # Errors
/// Returns an error if the host function call fails.
pub fn get_storage_path() -> Result<String, Error> {
let response = unsafe {
storage_getstoragepath(Json(serde_json::json!({})))?
};
Ok(response.0.result)
}