MCPcopy Create free account

hub / github.com/GoogleCloudPlatform/golang-samples / functions

Functions5,023 in github.com/GoogleCloudPlatform/golang-samples

↓ 1 callersFunctionCleanupSharedModules
CleanupSharedModules deletes all created custom modules.
securitycenter/management_api/event_threat_detection/event_threat_detection_custom_module_test.go:89
↓ 1 callersFunctionConnectToDatabase
ConnectToDatabase demonstrates how to use go-redis library to connect to a Memorystore Redis instance.
memorystore/snippets/connect_to_db.go:33
↓ 1 callersFunctionConsumeEventNotification
ConsumeEventNotification demonstrates how to consume and process the Pub/Sub notification from Secret Manager.
secretmanager/consume_event_notification.go:37
↓ 1 callersMethodCreateAsymmetricDecryptKey
CreateAsymmetricDecryptKey creates a new asymmetric key.
kms/kms_helpers_test.go:189
↓ 1 callersMethodCreateAsymmetricSignECKey
CreateAsymmetricSignECKey creates a new asymmetric EC key.
kms/kms_helpers_test.go:237
↓ 1 callersMethodCreateAsymmetricSignRSAKey
CreateAsymmetricSignRSAKey creates a new asymmetric RSA key.
kms/kms_helpers_test.go:213
↓ 1 callersMethodCreateConnectCluster
Connect server methods
internal/managedkafka/fake/fake.go:178
↓ 1 callersMethodCreateHSMKey
CreateHSMKey creates a new key backed by an HSM.
kms/kms_helpers_test.go:261
↓ 1 callersFunctionCreateIntent
[END dialogflow_list_intents] [START dialogflow_create_intent]
dialogflow/intent_management/intent_management.go:59
↓ 1 callersMethodCreateMock
(ctx context.Context)
genai/tuning/tuning_examples_test.go:31
↓ 1 callersFunctionCustomModuleExists
CustomModuleExists checks if a module exists.
securitycenter/management_api/security_health_analytics_custom_module_test.go:174
↓ 1 callersFunctionCustomModuleExists
CustomModuleExists checks if a module exists.
securitycenter/management_api/event_threat_detection/event_threat_detection_custom_module_test.go:132
↓ 1 callersFunctionDB
DB gets a connection to the database. This can panic for malformed database connection strings, invalid credentials, or non-existance database instanc
appengine/go11x/cloudsql/cloudsql.go:54
↓ 1 callersFunctionDefaultTopicConfig
DefaultTopicConfig returns the default topic config for tests.
pubsublite/internal/psltest/util.go:106
↓ 1 callersMethodDelete
(context.Context, *computepb.DeleteInstanceRequest, ...gax.CallOption)
compute/reservations/mock_shared_project.go:63
↓ 1 callersMethodDeleteConnectCluster
(ctx context.Context, req *managedkafkapb.DeleteConnectClusterRequest)
internal/managedkafka/fake/fake.go:192
↓ 1 callersMethodDeleteConnector
(ctx context.Context, req *managedkafkapb.DeleteConnectorRequest)
internal/managedkafka/fake/fake.go:258
↓ 1 callersMethodDeleteConsumerGroup
(ctx context.Context, req *managedkafkapb.DeleteConsumerGroupRequest)
internal/managedkafka/fake/fake.go:153
↓ 1 callersFunctionDeleteIntent
[END dialogflow_create_intent] [START dialogflow_delete_intent]
dialogflow/intent_management/intent_management.go:102
↓ 1 callersMethodDeployed
Deployed reports whether the service has been deployed.
internal/cloudrunci/cloudrunci.go:131
↓ 1 callersMethodDescriptor
()
spanner/spanner_snippets/spanner/testdata/protos/singer.pb.go:74
↓ 1 callersFunctionDetectIntentStream
[END dialogflow_detect_intent_audio] [START dialogflow_detect_intent_streaming]
dialogflow/detect_intent/detect_intent.go:102
↓ 1 callersFunctionDetectIntentText
[START dialogflow_detect_intent_text]
dialogflow/detect_intent/detect_intent.go:29
↓ 1 callersFunctionEnvVar
EnvVar is an example of getting an environment variable in a Go function.
functions/tips/env_var.go:27
↓ 1 callersFunctionExecutionCount
ExecutionCount is an HTTP Cloud Function that counts how many times it is executed within a specific instance.
functions/http/stateless.go:36
↓ 1 callersFunctionFailedWriteOperation
FailedWriteOperation simulates failure to write data via the provided client
functions/functionsv2/tips/retry.go:89
↓ 1 callersFunctionFailedWriteOperation
FailedWriteOperation simulates failure to write data via the provided client
functions/tips/retry.go:71
↓ 1 callersFunctionFiniteRetryPubSub
FiniteRetryPubSub demonstrates how to avoid inifinite retries.
functions/functionsv2/tips/infinite_retries/infinite_retries.go:49
↓ 1 callersFunctionFiniteRetryPubSub
FiniteRetryPubSub demonstrates how to avoid inifinite retries.
functions/tips/infinite_retries/infinite_retries.go:37
↓ 1 callersFunctionFormat
Format formats a KV of a word and its count as a string.
dataflow/flex-templates/wordcount/wordcount.go:85
↓ 1 callersFunctionFormatMessage
Formats a user message
getting-started/devflowapp/services/services.go:90
↓ 1 callersMethodGenerateContentMock
Mock Vertex AI Search (VAIS) response
genai/tools/tools_examples_test.go:31
↓ 1 callersMethodGenerateContentMock
(ctx context.Context, model string, contents []*genai.Content, cfg *genai.GenerateContentConfig)
genai/tuning/tuning_examples_test.go:50
↓ 1 callersFunctionGenericHandler
GenericHandler receives and echos a HTTP request's headers and body.
eventarc/generic/main.go:31
↓ 1 callersMethodGetBody
GetBody performs a GET request to a given path.
getting-started/bookshelf/internal/webtest/webtest.go:65
↓ 1 callersMethodGetCluster
(ctx context.Context, req *managedkafkapb.GetClusterRequest)
internal/managedkafka/fake/fake.go:97
↓ 1 callersMethodGetConnectCluster
(ctx context.Context, req *managedkafkapb.GetConnectClusterRequest)
internal/managedkafka/fake/fake.go:201
↓ 1 callersMethodGetConnector
(ctx context.Context, req *managedkafkapb.GetConnectorRequest)
internal/managedkafka/fake/fake.go:234
↓ 1 callersMethodGetConsumerGroup
(ctx context.Context, req *managedkafkapb.GetConsumerGroupRequest)
internal/managedkafka/fake/fake.go:157
↓ 1 callersMethodGetCurrentTime
()
run/grpc-server-streaming/pkg/api/v1/timeservice.pb.go:100
↓ 1 callersMethodGetDurationSecs
()
run/grpc-server-streaming/pkg/api/v1/timeservice.pb.go:61
↓ 1 callersMethodGetIndex
()
run/grpc-ping/pkg/api/v1/message.pb.go:102
↓ 1 callersFunctionGetLogEntries
(service *cloudrunci.Service, t *testing.T)
run/testing/sigterm_handler.e2e_test.go:60
↓ 1 callersMethodGetMessages
Gets the messages that have been sent to a user
getting-started/devflowapp/services/services.go:30
↓ 1 callersMethodGetReceivedOn
()
run/grpc-ping/pkg/api/v1/message.pb.go:116
↓ 1 callersFunctionGopher
Gopher prints a gopher.
functions/codelabs/gopher/gopher.go:26
↓ 1 callersFunctionHandleCloudEvent
(w http.ResponseWriter, r *http.Request)
eventarc/audit_iam/main.go:31
↓ 1 callersFunctionHelloContentType
HelloContentType is an HTTP Cloud function. It uses the Content-Type header to identify the request payload format.
functions/http/http_content_type.go:38
↓ 1 callersFunctionHelloEventsPubSub
HelloEventsPubSub receives and processes a Pub/Sub push message.
eventarc/pubsub/main.go:40
↓ 1 callersFunctionHelloEventsStorage
HelloEventsStorage receives and processes a Cloud Audit Log event with Cloud Storage data.
eventarc/audit_storage/main.go:31
↓ 1 callersFunctionHelloFirestore
HelloFirestore is triggered by a change to a Firestore document.
functions/functionsv2/firebase/hellofirestore/hellofirestore.go:35
↓ 1 callersFunctionHelloGCS
HelloGCS consumes a(ny) GCS event.
functions/helloworld/hello_cloud_storage.go:65
↓ 1 callersFunctionHelloGet
HelloGet is an HTTP Cloud Function.
functions/helloworld/hello_world.go:26
↓ 1 callersFunctionHelloHTTP
HelloHTTP is an HTTP Cloud Function with a request parameter.
functions/helloworld/hello_http.go:34
↓ 1 callersFunctionHelloHTTPMethod
HelloHTTPMethod is an HTTP Cloud function. It uses the request method to differentiate the response.
functions/http/http_request_method.go:34
↓ 1 callersFunctionHelloPubSub
HelloPubSub consumes a Pub/Sub message.
functions/helloworld/hello_pubsub.go:33
↓ 1 callersFunctionHelloPubSub
HelloPubSub receives and processes a Pub/Sub push message.
run/image-processing/main.go:56
↓ 1 callersFunctionHelloRTDB
HelloRTDB handles changes to a Firebase RTDB.
functions/functionsv2/firebase/rtdb/rtdb.go:37
↓ 1 callersFunctionHelloRemoteConfig
HelloRemoteConfig handles Firebase Remote Config events.
functions/helloworld/remote_config.go:38
↓ 1 callersFunctionHelloRemoteConfig
HelloRemoteConfig handles Firebase Remote Config events.
functions/functionsv2/firebase/remoteconfig/remoteconfig.go:36
↓ 1 callersFunctionHelloSpanner
HelloSpanner is an example of querying Spanner from a Cloud Function.
functions/spanner/spanner.go:45
↓ 1 callersFunctionHelloWorld
HelloWorld prints the JSON encoded "message" field in the body of the request or "Hello World!" if there isn't one.
functions/console_snippets/http/http.go:29
↓ 1 callersMethodImageRepoURL
ImageRepoURL returns the base URL for building docker images
internal/cloudrunci/cloudrunci.go:204
↓ 1 callersFunctionKGSearch
KGSearch uses the Knowledge Graph API to search for a query provided by a Slack command.
functions/slack/search.go:68
↓ 1 callersMethodKeyString
KeyString converts the environment variables names to a comma-delimited list.
internal/cloudrunci/envvars.go:44
↓ 1 callersMethodListBooks
ListBooks returns a list of books, ordered by title.
getting-started/bookshelf/bookshelf.go:40
↓ 1 callersMethodListClusters
(ctx context.Context, req *managedkafkapb.ListClustersRequest)
internal/managedkafka/fake/fake.go:103
↓ 1 callersMethodListConnectClusters
(ctx context.Context, req *managedkafkapb.ListConnectClustersRequest)
internal/managedkafka/fake/fake.go:207
↓ 1 callersMethodListConnectors
(ctx context.Context, req *managedkafkapb.ListConnectorsRequest)
internal/managedkafka/fake/fake.go:243
↓ 1 callersMethodListConsumerGroups
(ctx context.Context, req *managedkafkapb.ListConsumerGroupsRequest)
internal/managedkafka/fake/fake.go:163
↓ 1 callersFunctionListFiles
ListFiles lists the files in the current directory. Uses directory "serverless_function_source_code" as defined in the Go Functions Framework Buildpac
functions/tips/file_system.go:37
↓ 1 callersFunctionListInstances
(projectId string)
docs/sql/listinstances/listinstances.go:25
↓ 1 callersMethodListMock
(ctx context.Context)
genai/tuning/tuning_examples_test.go:116
↓ 1 callersFunctionLookupEntry
LookupEntry provides a simple retry wrapper around the LookupEntry RPC. There's a potential propagation delay from when an entity is created until it
datacatalog/datacatalog_quickstart/main.go:194
↓ 1 callersFunctionMakeRequest
MakeRequest is an example of making an HTTP request. MakeRequest uses a single http.Client for all requests to take advantage of connection pooling an
functions/http/request.go:44
↓ 1 callersFunctionMisconfiguredDataClient
MisconfiguredDataClient simulates failure to retrieve a data storage client.
functions/functionsv2/tips/retry.go:81
↓ 1 callersFunctionMisconfiguredDataClient
MisconfiguredDataClient simulates failure to retrieve a data storage client.
functions/tips/retry.go:63
↓ 1 callersFunctionMustCreateReservation
(ctx context.Context, t *testing.T, client *pubsublite.AdminClient, resPath string)
pubsublite/internal/psltest/util.go:140
↓ 1 callersFunctionNew
New creates a web test for a given a host string (e.g. "localhost:8080")
getting-started/bookshelf/internal/webtest/webtest.go:37
↓ 1 callersFunctionNewConn
NewConn creates a new gRPC connection. host should be of the form domain:port, e.g., example.com:443
run/grpc-ping/connection.go:29
↓ 1 callersFunctionNewFakeInstancesServer
(i *computepb.Instance)
functions/functionsv2/label_gce_instance/label_gce_instance_test.go:39
↓ 1 callersFunctionNewKMSFixture
(projectID string)
kms/kms_helpers_test.go:48
↓ 1 callersMethodNewRequest
NewRequest creates an HTTP request for a URL on the platform.
internal/cloudrunci/platform.go:62
↓ 1 callersMethodNewRequest
NewRequest creates a new HTTP request to the Render service. If authentication is enabled, an Identity Token is created and added.
run/markdown-preview/editor/render.go:40
↓ 1 callersFunctionNewServer
NewServer returns an implementation of the server for ShakespeareService (defined in shakesapp.proto).
profiler/shakesapp/shakesapp/server.go:38
↓ 1 callersFunctionNewShakespeareServiceClient
(cc grpc.ClientConnInterface)
profiler/shakesapp/shakesapp/shakesapp.pb.go:150
↓ 1 callersFunctionParseXML
ParseXML is an example of parsing a text/xml request.
functions/http/xml.go:35
↓ 1 callersMethodPauseConnector
(ctx context.Context, req *managedkafkapb.PauseConnectorRequest)
internal/managedkafka/fake/fake.go:262
↓ 1 callersFunctionPingRequest
[END cloudrun_grpc_request] PingRequest creates a new gRPC request to the upstream ping gRPC service.
run/grpc-ping/request.go:39
↓ 1 callersFunctionPrintAllCreatedModules
PrintAllCreatedModules prints all created custom modules.
securitycenter/management_api/security_health_analytics_custom_module_test.go:118
↓ 1 callersFunctionPrintAllCreatedModules
PrintAllCreatedModules prints all created custom modules.
securitycenter/management_api/event_threat_detection/event_threat_detection_custom_module_test.go:76
↓ 1 callersFunctionPrintTasks
PrintTasks prints the tasks to the given writer.
datastore/tasks/tasks.go:112
↓ 1 callersMethodRegisterHandlers
RegisterHandlers registers all HTTP handler routes to a new ServeMux.
run/markdown-preview/editor/service.go:73
↓ 1 callersFunctionRegisterShakespeareServiceServer
(s *grpc.Server, srv ShakespeareServiceServer)
profiler/shakesapp/shakesapp/shakesapp.pb.go:177
↓ 1 callersMethodRender
([]byte)
run/markdown-preview/editor/service.go:31
↓ 1 callersMethodRestartConnector
(ctx context.Context, req *managedkafkapb.RestartConnectorRequest)
internal/managedkafka/fake/fake.go:274
↓ 1 callersMethodResumeConnector
(ctx context.Context, req *managedkafkapb.ResumeConnectorRequest)
internal/managedkafka/fake/fake.go:266
↓ 1 callersFunctionSaveResult
SaveResult is executed when a message is published to the Cloud Pub/Sub topic specified by the RESULT_TOPIC environment vairable, and saves the data p
functions/ocr/app/save.go:29
↓ 1 callersFunctionSaveResult
SaveResult is executed when a message is published to the Cloud Pub/Sub topic specified by the RESULT_TOPIC environment vairable, and saves the data p
functions/functionsv2/ocr/app/save.go:36
↓ 1 callersFunctionScopeDemo
ScopeDemo is an example of using globally and locally scoped variables in a function.
functions/tips/scope.go:40
← previousnext →701–800 of 5,023, ranked by callers