Documentation ¶
Index ¶
Constants ¶
View Source
const ( EnvKeyProjectID = "GCP_PROJECT" // for Google Cloud Functions EnvKeyGoogleCloudProject = "GOOGLE_CLOUD_PROJECT" // for Google App Engine // EnvKeyServiceName will be deleted in a major version upgrade // Deprecated EnvKeyServiceName = "GAE_SERVICE" // for Google App Engine // EnvKeyServiceVersion will be deleted in a major version upgrade // Deprecated EnvKeyServiceVersion = "GAE_VERSION" // for Google App Engine EnvKeyGAEServiceName = "GAE_SERVICE" // for Google App Engine EnvKeyGAEServiceVersion = "GAE_VERSION" // for Google App Engine EnvKeyRUNServiceName = "K_SERVICE" // for Google Cloud Run EnvKeyRUNServiceRevision = "K_REVISION" // for Google Cloud Run )
Variables ¶
View Source
var ( // ProjectID - Google Cloud Platform Project ID ProjectID = getProjectID() // ServiceName - Google App Engine service name // Deprecated ServiceName = os.Getenv(EnvKeyServiceName) // ServiceVersion - Google App Engine service version // Deprecated ServiceVersion = os.Getenv(EnvKeyServiceVersion) // GAEServiceName - Google App Engine service name GAEServiceName = os.Getenv(EnvKeyGAEServiceName) // GAEServiceVersion - Google App Engine service version GAEServiceVersion = os.Getenv(EnvKeyGAEServiceVersion) // RUNServiceName - Google Cloud Run service name RUNServiceName = os.Getenv(EnvKeyRUNServiceName) // RUNServiceRevision - Google Cloud Run service revision RUNServiceRevision = os.Getenv(EnvKeyRUNServiceRevision) )
Functions ¶
func GetProjectNumber ¶
GetProjectNumber - get project number
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.