pub struct ArgConfig {
pub uuid: Uuid,
pub uuid_gen: bool,
pub db_url: String,
pub table: String,
pub cfg: HashMap<String, String>,
pub token: Token,
pub pk: Option<KeyFile>,
}
Expand description
App startup args:
-
db connection url: usually the first arg
- or prefix with: ’–db ’ (optional, default postgres:// )
-
config table name in format: schema.table, usually the second arg.
- or prefix with: ’–config ’ (optional, default public.{the_appname})
-
token (db pwd) script name usually the third arg (required feature ‘token’)
- or prefix with ’–token ’
-
token live in minutes, usually the forth arg (required feature ‘token’)
- or prefix with ’–ttl ’
-
UUID this app instance to use as a node id or config recognition. Identified as UUID formatted string.
- or prefix with ’–uuid ’
-
(Private) Key text file name to use with RSA OR AES encryption (required feature ‘rsa’)
- or prefix with ’–key ’
Alternative configuration:
- file name, usually the first arg
- or prefix with ’–file ’
File format:
- db: OR db=
- config: OR config=
- token: OR token=
- uuid: OR uuid=
- ttl: OR ttl=
- pk: OR pk=
params passed in cmd line override params loaded from file & env.
env: PGPASSWORD, in case of postgres db url, use to connect to the DB PASSPHRASE, in case of RSA private key required a passphrase
Fields§
§uuid: Uuid
§uuid_gen: bool
§db_url: String
§table: String
Format: schema.talbe
cfg: HashMap<String, String>
§token: Token
§pk: Option<KeyFile>
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ArgConfig
impl RefUnwindSafe for ArgConfig
impl Send for ArgConfig
impl Sync for ArgConfig
impl Unpin for ArgConfig
impl UnwindSafe for ArgConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more