#[non_exhaustive]pub enum ServerConfig {
Local {
server_dir: PathBuf,
},
Remote {
url: String,
client_id: Uuid,
encryption_secret: Vec<u8>,
},
Gcp {
bucket: String,
credential_path: Option<String>,
encryption_secret: Vec<u8>,
},
Aws {
region: String,
bucket: String,
credentials: AwsCredentials,
encryption_secret: Vec<u8>,
},
}
Expand description
The configuration for a replica’s access to a sync server.
This enum is non-exhaustive, as users should only be constructing required variants, not matching on it.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Local
A local task database, for situations with a single replica.
Remote
A remote taskchampion-sync-server instance
Fields
Gcp
A Google Cloud Platform storage bucket.
Fields
bucket: String
Bucket in which to store the task data. This bucket must not be used for any other purpose.
No special bucket configuration is reqiured.
credential_path: Option<String>
Path to a GCP credential file, in JSON format.
If None
, then Application Default
Credentials
are used. Typically these are associated with the user’s Google Cloud account.
If Some(path)
, then the path must be to a service account key. The service account
must have a role with the following permissions:
- storage.buckets.create
- storage.buckets.get
- storage.buckets.update
- storage.objects.create
- storage.objects.get
- storage.objects.list
- storage.objects.update
- storage.objects.delete
See the following GCP resources for more information:
Aws
An Amazon Web Services storage bucket.
Fields
bucket: String
Bucket in which to store the task data.
This bucket must not be used for any other purpose. No special bucket configuration is required.
credentials: AwsCredentials
Credential configuration for access to the bucket.
Implementations§
Source§impl ServerConfig
impl ServerConfig
Auto Trait Implementations§
impl Freeze for ServerConfig
impl RefUnwindSafe for ServerConfig
impl Send for ServerConfig
impl Sync for ServerConfig
impl Unpin for ServerConfig
impl UnwindSafe for ServerConfig
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> 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