pub enum GcsCredentials {
ServiceAccountJsonFile {
path: String,
},
ServiceAccountJsonInline {
json: String,
},
ApplicationDefault,
Anonymous,
}Expand description
Credential source for a GCS client.
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§
ServiceAccountJsonFile
Path to a service-account JSON key file on disk.
ServiceAccountJsonInline
Service-account JSON key as an inline string. Useful for
environment-variable injection via ${env:GCP_SA_JSON} in CLI
configs.
ApplicationDefault
Application Default Credentials — honours
GOOGLE_APPLICATION_CREDENTIALS, gcloud user creds, and the
GCE/GKE metadata server, in that order.
Anonymous
Anonymous credentials. Use this with emulators (e.g.
fake-gcs-server) that do not validate bearer tokens — the SDK
otherwise tries to fetch ADC tokens at request time and fails in
environments without GCP credentials.
Trait Implementations§
Source§impl Clone for GcsCredentials
impl Clone for GcsCredentials
Source§fn clone(&self) -> GcsCredentials
fn clone(&self) -> GcsCredentials
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 GcsCredentials
impl Debug for GcsCredentials
Source§impl Default for GcsCredentials
impl Default for GcsCredentials
Source§fn default() -> GcsCredentials
fn default() -> GcsCredentials
Source§impl<'de> Deserialize<'de> for GcsCredentials
impl<'de> Deserialize<'de> for GcsCredentials
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<GcsCredentials, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<GcsCredentials, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for GcsCredentials
impl JsonSchema for GcsCredentials
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 Serialize for GcsCredentials
impl Serialize for GcsCredentials
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,
Auto Trait Implementations§
impl Freeze for GcsCredentials
impl RefUnwindSafe for GcsCredentials
impl Send for GcsCredentials
impl Sync for GcsCredentials
impl Unpin for GcsCredentials
impl UnsafeUnpin for GcsCredentials
impl UnwindSafe for GcsCredentials
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> 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> 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