switchgear_components/pool/lnd/grpc/
config.rs

1use serde::{Deserialize, Serialize};
2use std::path::PathBuf;
3use url::Url;
4
5#[derive(Debug, Clone, PartialEq, Eq, Hash, PartialOrd, Ord, Serialize, Deserialize)]
6#[serde(rename_all = "camelCase")]
7pub struct LndGrpcDiscoveryBackendImplementation {
8    pub url: Url,
9    pub domain: Option<String>,
10    pub auth: LndGrpcClientAuth,
11    pub amp_invoice: bool,
12}
13
14#[derive(Debug, Clone, PartialEq, Eq, Hash, PartialOrd, Ord, Serialize, Deserialize)]
15#[serde(rename_all = "camelCase")]
16#[serde(tag = "type")]
17pub enum LndGrpcClientAuth {
18    Path(LndGrpcClientAuthPath),
19}
20
21#[derive(Debug, Clone, PartialEq, Eq, Hash, PartialOrd, Ord, Serialize, Deserialize)]
22#[serde(rename_all = "camelCase")]
23pub struct LndGrpcClientAuthPath {
24    pub tls_cert_path: Option<PathBuf>,
25    pub macaroon_path: PathBuf,
26}