Documentation ¶
Overview ¶
Package detect is used find information from the environment.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ProjectID ¶
func ProjectID(ctx context.Context, projectID string, emulatorEnvVar string, opts ...option.ClientOption) (string, error)
ProjectID tries to detect the project ID from the environment if the sentinel value, "*detect-project-id*", is sent. It looks in the following order:
- GOOGLE_CLOUD_PROJECT envvar
- ADC creds.ProjectID
- A static value if the environment is emulated.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.