metadata

package
v0.0.0-...-f598829 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 10, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IDToken

func IDToken(ctx context.Context, aud string) (oauth2.TokenSource, error)

IDToken returns a TokenSource that yields ID tokens. These tokens can be used to authenticate requests with the Token.SetAuthHeader method.

func ProjectID

func ProjectID() (string, error)

ProjectID returns the project ID of the Cloud Run service. It fetches this information from the GCP metadata server.

func Region

func Region() (string, error)

Region returns the region of the Cloud Run service. It fetches this information from the GCP metadata server. The returned value is in the format of: projects/PROJECT_NUMBER/regions/REGION.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL