api: define subscription module and methods as public

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2020-10-30 13:03:51 +01:00
parent 926d253126
commit 652506e6b8
2 changed files with 5 additions and 5 deletions

View File

@ -28,6 +28,7 @@ pub mod disks;
pub mod dns; pub mod dns;
pub mod network; pub mod network;
pub mod tasks; pub mod tasks;
pub mod subscription;
pub(crate) mod rrd; pub(crate) mod rrd;
@ -35,7 +36,6 @@ mod apt;
mod journal; mod journal;
mod services; mod services;
mod status; mod status;
mod subscription;
mod syslog; mod syslog;
mod time; mod time;

View File

@ -29,7 +29,7 @@ use crate::api2::types::{NODE_SCHEMA, SUBSCRIPTION_KEY_SCHEMA, Authid};
}, },
)] )]
/// Check and update subscription status. /// Check and update subscription status.
fn check_subscription( pub fn check_subscription(
force: bool, force: bool,
) -> Result<(), Error> { ) -> Result<(), Error> {
// FIXME: drop once proxmox-api-macro is bumped to >> 5.0.0-1 // FIXME: drop once proxmox-api-macro is bumped to >> 5.0.0-1
@ -82,7 +82,7 @@ fn check_subscription(
}, },
)] )]
/// Read subscription info. /// Read subscription info.
fn get_subscription( pub fn get_subscription(
_param: Value, _param: Value,
rpcenv: &mut dyn RpcEnvironment, rpcenv: &mut dyn RpcEnvironment,
) -> Result<SubscriptionInfo, Error> { ) -> Result<SubscriptionInfo, Error> {
@ -134,7 +134,7 @@ fn get_subscription(
}, },
)] )]
/// Set a subscription key and check it. /// Set a subscription key and check it.
fn set_subscription( pub fn set_subscription(
key: String, key: String,
) -> Result<(), Error> { ) -> Result<(), Error> {
@ -162,7 +162,7 @@ fn set_subscription(
}, },
)] )]
/// Delete subscription info. /// Delete subscription info.
fn delete_subscription() -> Result<(), Error> { pub fn delete_subscription() -> Result<(), Error> {
subscription::delete_subscription() subscription::delete_subscription()
.map_err(|err| format_err!("Deleting subscription failed: {}", err))?; .map_err(|err| format_err!("Deleting subscription failed: {}", err))?;