Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/GoogleCloudPlatform/cloud-run-microservice-template-go
/ functions
Functions
8 in github.com/GoogleCloudPlatform/cloud-run-microservice-template-go
⨍
Functions
8
◇
Types & classes
1
↓ 1 callers
Method
Handler
(w http.ResponseWriter, r *http.Request)
handler.go:24
↓ 1 callers
Function
ProjectID
ProjectID returns the project ID of the Cloud Run service. It fetches this information from the GCP metadata server.
metadata/metadata.go:27
↓ 1 callers
Function
newApp
(ctx context.Context, port, projectID string)
main.go:74
Function
IDToken
IDToken returns a TokenSource that yields ID tokens. These tokens can be used to authenticate requests with the Token.SetAuthHeader method.
metadata/metadata.go:45
Function
Region
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:
metadata/metadata.go:34
Function
TestHandler
(t *testing.T)
handler_test.go:30
Function
TestSystem
(t *testing.T)
system_test.go:30
Function
main
()
main.go:40