pub enum PubsubCredentials {
ApplicationDefault,
ServiceAccountJsonFile {
path: String,
},
ServiceAccountJsonInline {
json: String,
},
Anonymous,
}Expand description
How to authenticate with Google Cloud Pub/Sub.
Serializes as { type: <method>, config: { … } } (adjacent tagging,
snake_case discriminators) — the consistent auth wire shape shared by
every faucet connector:
{ type: service_account_json_file, config: { path: "/run/secrets/sa.json" } }.
Variants§
ApplicationDefault
Application Default Credentials — honours
GOOGLE_APPLICATION_CREDENTIALS, GOOGLE_APPLICATION_CREDENTIALS_JSON,
gcloud user creds, and the GCE/GKE metadata server, in that order.
ServiceAccountJsonFile
Path to a service-account JSON key file on disk.
ServiceAccountJsonInline
Service-account JSON key as an inline string. Pair with
${env:GCP_SA_JSON} / ${secret:…} interpolation in CLI configs so
the key never sits in the config file verbatim.
Anonymous
No credentials. Use with the Pub/Sub emulator, which does not validate bearer tokens — the SDK otherwise tries to fetch ADC tokens at startup and fails in environments without GCP credentials.
Trait Implementations§
Source§impl Clone for PubsubCredentials
impl Clone for PubsubCredentials
Source§fn clone(&self) -> PubsubCredentials
fn clone(&self) -> PubsubCredentials
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PubsubCredentials
impl Debug for PubsubCredentials
Source§impl Default for PubsubCredentials
impl Default for PubsubCredentials
Source§fn default() -> PubsubCredentials
fn default() -> PubsubCredentials
Source§impl<'de> Deserialize<'de> for PubsubCredentials
impl<'de> Deserialize<'de> for PubsubCredentials
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<PubsubCredentials, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<PubsubCredentials, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for PubsubCredentials
impl JsonSchema for PubsubCredentials
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl PartialEq for PubsubCredentials
impl PartialEq for PubsubCredentials
Source§impl Serialize for PubsubCredentials
impl Serialize for PubsubCredentials
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for PubsubCredentials
Auto Trait Implementations§
impl Freeze for PubsubCredentials
impl RefUnwindSafe for PubsubCredentials
impl Send for PubsubCredentials
impl Sync for PubsubCredentials
impl Unpin for PubsubCredentials
impl UnsafeUnpin for PubsubCredentials
impl UnwindSafe for PubsubCredentials
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request