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 Args for Opts
impl Args for Opts
Source§fn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
Source§fn augment_args_for_update<'b>(__clap_app: Command) -> Command
fn augment_args_for_update<'b>(__clap_app: Command) -> Command
Command
so it can instantiate self
via
FromArgMatches::update_from_arg_matches_mut
Read moreSource§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 Freeze for Opts
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§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
.Source§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
.Source§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.Source§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.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more