pub struct SqliteStorage { /* private fields */ }Expand description
SQLite-based storage implementation
Implementations§
Source§impl SqliteStorage
impl SqliteStorage
Trait Implementations§
Source§impl Storage for SqliteStorage
impl Storage for SqliteStorage
Source§fn list_payments<'life0, 'async_trait>(
&'life0 self,
request: ListPaymentsRequest,
) -> Pin<Box<dyn Future<Output = Result<Vec<Payment>, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_payments<'life0, 'async_trait>(
&'life0 self,
request: ListPaymentsRequest,
) -> Pin<Box<dyn Future<Output = Result<Vec<Payment>, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Lists payments with optional filters and pagination Read more
Source§fn insert_payment<'life0, 'async_trait>(
&'life0 self,
payment: Payment,
) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn insert_payment<'life0, 'async_trait>(
&'life0 self,
payment: Payment,
) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Inserts a payment into storage Read more
Source§fn set_payment_metadata<'life0, 'async_trait>(
&'life0 self,
payment_id: String,
metadata: PaymentMetadata,
) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn set_payment_metadata<'life0, 'async_trait>(
&'life0 self,
payment_id: String,
metadata: PaymentMetadata,
) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Inserts payment metadata into storage Read more
fn set_cached_item<'life0, 'async_trait>(
&'life0 self,
key: String,
value: String,
) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_cached_item<'life0, 'async_trait>(
&'life0 self,
key: String,
) -> Pin<Box<dyn Future<Output = Result<Option<String>, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn delete_cached_item<'life0, 'async_trait>(
&'life0 self,
key: String,
) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn get_payment_by_id<'life0, 'async_trait>(
&'life0 self,
id: String,
) -> Pin<Box<dyn Future<Output = Result<Payment, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_payment_by_id<'life0, 'async_trait>(
&'life0 self,
id: String,
) -> Pin<Box<dyn Future<Output = Result<Payment, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Gets a payment by its ID Read more
Source§fn get_payment_by_invoice<'life0, 'async_trait>(
&'life0 self,
invoice: String,
) -> Pin<Box<dyn Future<Output = Result<Option<Payment>, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_payment_by_invoice<'life0, 'async_trait>(
&'life0 self,
invoice: String,
) -> Pin<Box<dyn Future<Output = Result<Option<Payment>, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Gets a payment by its invoice Read more
Source§fn add_deposit<'life0, 'async_trait>(
&'life0 self,
txid: String,
vout: u32,
amount_sats: u64,
) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn add_deposit<'life0, 'async_trait>(
&'life0 self,
txid: String,
vout: u32,
amount_sats: u64,
) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Add a deposit to storage Read more
Source§fn delete_deposit<'life0, 'async_trait>(
&'life0 self,
txid: String,
vout: u32,
) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn delete_deposit<'life0, 'async_trait>(
&'life0 self,
txid: String,
vout: u32,
) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Removes an unclaimed deposit from storage Read more
Source§fn list_deposits<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<DepositInfo>, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_deposits<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<DepositInfo>, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Lists all unclaimed deposits from storage Read more
Source§fn update_deposit<'life0, 'async_trait>(
&'life0 self,
txid: String,
vout: u32,
payload: UpdateDepositPayload,
) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn update_deposit<'life0, 'async_trait>(
&'life0 self,
txid: String,
vout: u32,
payload: UpdateDepositPayload,
) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Updates or inserts unclaimed deposit details Read more
Source§impl SyncStorage for SqliteStorage
impl SyncStorage for SqliteStorage
fn add_outgoing_change<'life0, 'async_trait>(
&'life0 self,
record: UnversionedRecordChange,
) -> Pin<Box<dyn Future<Output = Result<u64, SyncStorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn complete_outgoing_sync<'life0, 'async_trait>(
&'life0 self,
record: Record,
) -> Pin<Box<dyn Future<Output = Result<(), SyncStorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_pending_outgoing_changes<'life0, 'async_trait>(
&'life0 self,
limit: u32,
) -> Pin<Box<dyn Future<Output = Result<Vec<OutgoingChange>, SyncStorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn get_last_revision<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<u64, SyncStorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_last_revision<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<u64, SyncStorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get the revision number of the last synchronized record
Source§fn insert_incoming_records<'life0, 'async_trait>(
&'life0 self,
records: Vec<Record>,
) -> Pin<Box<dyn Future<Output = Result<(), SyncStorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn insert_incoming_records<'life0, 'async_trait>(
&'life0 self,
records: Vec<Record>,
) -> Pin<Box<dyn Future<Output = Result<(), SyncStorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Insert incoming records from remote sync
Source§fn delete_incoming_record<'life0, 'async_trait>(
&'life0 self,
record: Record,
) -> Pin<Box<dyn Future<Output = Result<(), SyncStorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn delete_incoming_record<'life0, 'async_trait>(
&'life0 self,
record: Record,
) -> Pin<Box<dyn Future<Output = Result<(), SyncStorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Delete an incoming record after it has been processed
Source§fn rebase_pending_outgoing_records<'life0, 'async_trait>(
&'life0 self,
revision: u64,
) -> Pin<Box<dyn Future<Output = Result<(), SyncStorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn rebase_pending_outgoing_records<'life0, 'async_trait>(
&'life0 self,
revision: u64,
) -> Pin<Box<dyn Future<Output = Result<(), SyncStorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Update revision numbers of pending outgoing records to be higher than the given revision
Source§fn get_incoming_records<'life0, 'async_trait>(
&'life0 self,
limit: u32,
) -> Pin<Box<dyn Future<Output = Result<Vec<IncomingChange>, SyncStorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_incoming_records<'life0, 'async_trait>(
&'life0 self,
limit: u32,
) -> Pin<Box<dyn Future<Output = Result<Vec<IncomingChange>, SyncStorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get incoming records that need to be processed, up to the specified limit
Source§fn get_latest_outgoing_change<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Option<OutgoingChange>, SyncStorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_latest_outgoing_change<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Option<OutgoingChange>, SyncStorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get the latest outgoing record if any exists
Auto Trait Implementations§
impl Freeze for SqliteStorage
impl RefUnwindSafe for SqliteStorage
impl Send for SqliteStorage
impl Sync for SqliteStorage
impl Unpin for SqliteStorage
impl UnwindSafe for SqliteStorage
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request