Struct atomic_server_lib::config::Opts
source · pub struct Opts {Show 19 fields
pub command: Option<Command>,
pub initialize: bool,
pub rebuild_indexes: bool,
pub development: bool,
pub domain: String,
pub port: u32,
pub port_https: u32,
pub ip: IpAddr,
pub https: bool,
pub https_dns: bool,
pub email: Option<String>,
pub script: String,
pub config_dir: Option<PathBuf>,
pub data_dir: Option<PathBuf>,
pub public_mode: bool,
pub server_url: Option<String>,
pub log_level: LogLevel,
pub trace: Tracing,
pub slow_mode: bool,
}
Expand description
Store and share Atomic Data! Visit https://atomicdata.dev for more info. Pass no subcommands to launch the server. The .env
of your current directory will be read.
Fields§
§command: Option<Command>
The subcommand being run
initialize: bool
Recreates the /setup
Invite for creating a new Root User. Also re-runs various populate commands, and re-builds the index
rebuild_indexes: bool
Re-builds the indexes. Parses all the resources. Do this when updating requires it, or if you have issues with Collections / Queries / Search.
development: bool
Use staging environments for services like LetsEncrypt
domain: String
The origin domain where the app is hosted, without the port and schema values.
port: u32
The port where the HTTP app is available. Set to 80 if you want this to be available on the network.
port_https: u32
The port where the HTTPS app is available. Set to 443 if you want this to be available on the network.
ip: IpAddr
The IP address of the server. Set to :: if you want this to be available to other devices on your network.
https: bool
Use HTTPS instead of HTTP. Will get certificates from LetsEncrypt fully automated.
https_dns: bool
Initializes DNS-01 challenge for LetsEncrypt. Use this if you want to use subdomains.
email: Option<String>
The contact mail address for Let’s Encrypt HTTPS setup
script: String
Custom JS script to include in the body of the HTML template
config_dir: Option<PathBuf>
Path for atomic data config directory. Defaults to “~/.config/atomic/”“
data_dir: Option<PathBuf>
Path for atomic data store folder. Contains your Store, uploaded files and more. Default value depends on your OS.
public_mode: bool
CAUTION: Skip authentication checks, making all data publicly readable. Improves performance.
server_url: Option<String>
The full URL of the server. It should resolve to the home page. Set this if you use an external server or tunnel, instead of directly exposing atomic-server. If you leave this out, it will be generated from domain
, port
and http
/ https
.
log_level: LogLevel
How much logs you want. Also influences what is sent to your trace service, if you’ve set one (e.g. OpenTelemetry)
trace: Tracing
How you want to trace what’s going on with the server. Useful for monitoring performance and errors in production.
Combine with log_level
to get more or less data (trace
is the most verbose)
slow_mode: bool
Introduces random delays in the server, to simulate a slow connection. Useful for testing.
Trait Implementations§
source§impl CommandFactory for Opts
impl CommandFactory for Opts
source§impl FromArgMatches for Opts
impl FromArgMatches for Opts
source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches ) -> Result<Self, Error>
source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches ) -> Result<(), Error>
ArgMatches
to self
.source§fn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches ) -> Result<(), Error>
ArgMatches
to self
.source§impl Parser for Opts
impl Parser for Opts
source§fn parse_from<I, T>(itr: I) -> Self
fn parse_from<I, T>(itr: I) -> Self
source§fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
source§fn update_from<I, T>(&mut self, itr: I)
fn update_from<I, T>(&mut self, itr: I)
Auto Trait Implementations§
impl RefUnwindSafe for Opts
impl Send for Opts
impl Sync for Opts
impl Unpin for Opts
impl UnwindSafe for Opts
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.