signstar_configure/host/base.rs
1//! Basic functionality for any or no backend.
2
3use signstar_config::config::Config;
4
5/// Signstar host configuration.
6///
7/// Manages the synchronization of HSM backends with the Signstar configuration, as well as the
8/// configuration of non-administrative users and their credentials for their respective backends.
9#[derive(Debug)]
10pub struct HostConfiguration<'config> {
11 /// The Signstar configuration.
12 config: &'config Config,
13}
14
15impl<'config> HostConfiguration<'config> {
16 /// Creates a new [`HostConfiguration`] from a [`Config`].
17 pub fn new(config: &'config Config) -> Self {
18 Self { config }
19 }
20
21 /// Returns a reference to the [`Config`].
22 pub fn config(&self) -> &Config {
23 self.config
24 }
25}