Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/GoogleCloudPlatform/golang-samples
/ functions
Functions
5,023 in github.com/GoogleCloudPlatform/golang-samples
⨍
Functions
5,023
◇
Types & classes
329
↓ 1 callers
Function
runServer
[END opentelemetry_instrumentation_handle_multi] runServer runs an http server on port 8080 which handles requests to the multi and /single endpoints.
opentelemetry/instrumentation/app/server.go:59
↓ 1 callers
Function
runSimpleTransaction
(ctx context.Context, client *firestore.Client)
firestore/save_transaction_document_update.go:26
↓ 1 callers
Function
sampleAllDocumentsExample
(w io.Writer, client *firestore.Client)
firestore/pipeline_snippets_general.go:1098
↓ 1 callers
Function
sampleDocumentsDataExample
(_ io.Writer, client *firestore.Client)
firestore/pipeline_snippets_general.go:1065
↓ 1 callers
Function
sampleDocumentsExample
(w io.Writer, client *firestore.Client)
firestore/pipeline_snippets_general.go:1084
↓ 1 callers
Function
samplePercent
(w io.Writer, client *firestore.Client)
firestore/pipeline_snippets_general.go:1027
↓ 1 callers
Function
samplePercentageDataExample
(_ io.Writer, client *firestore.Client)
firestore/pipeline_snippets_general.go:1112
↓ 1 callers
Function
samplePercentageExample
(w io.Writer, client *firestore.Client)
firestore/pipeline_snippets_general.go:1135
↓ 1 callers
Function
sampleStage
(w io.Writer, client *firestore.Client)
firestore/pipeline_snippets_general.go:998
↓ 1 callers
Function
sampleSyntaxExample
(w io.Writer, client *firestore.Client)
firestore/pipeline_snippets_general.go:1045
↓ 1 callers
Function
saveAudioFramesAsWAV
saveAudioFramesAsWAV writes audio frames (PCM bytes) to a WAV file.
genai/live/live_conversation_audio_with_audio.go:159
↓ 1 callers
Function
saveVote
saveVote saves a vote passed as http.Request form data.
cloudsql/sqlserver/database-sql/cloudsql.go:235
↓ 1 callers
Function
saveVote
saveVote saves a vote passed as http.Request form data.
cloudsql/postgres/database-sql/cloudsql.go:247
↓ 1 callers
Function
saveVote
saveVote saves a vote passed as http.Request form data.
cloudsql/mysql/database-sql/cloudsql.go:247
↓ 1 callers
Function
screenPDFFile
screenPDFFile screens a PDF file. This method screens a PDF file based on the project, location, and template settings. w io.Writer: The writer to u
modelarmor/screen_pdf_file.go:41
↓ 1 callers
Function
searchBasic
(w io.Writer, client *firestore.Client)
firestore/pipeline_snippets_general.go:26
↓ 1 callers
Function
searchExact
(w io.Writer, client *firestore.Client)
firestore/pipeline_snippets_general.go:43
↓ 1 callers
Function
searchExcludeTerm
(w io.Writer, client *firestore.Client)
firestore/pipeline_snippets_general.go:77
↓ 1 callers
Function
searchFHIRResourcesGet
searchFhirResourcesGet uses a GET request to search for FHIR resources in a given FHIR store.
healthcare/fhir_resource_search_get.go:29
↓ 1 callers
Function
searchFHIRResourcesPost
searchFhirResources uses a POST request to search for FHIR resources in a given FHIR store.
healthcare/fhir_resource_search_post.go:29
↓ 1 callers
Function
searchFeaturedJobs
[END job_featured_job] [START job_search_featured_job] searchFeaturedJobs searches for jobs with query.
jobs/v3/howto/featured_job_search_sample.go:51
↓ 1 callers
Function
searchForAlerts
[START search_for_alerts] searchForAlerts searches for jobs with email alert set which could receive updates later if search result updates.
jobs/v3/howto/email_alert_search_sample.go:30
↓ 1 callers
Function
searchSpecialFields
(w io.Writer, client *firestore.Client)
firestore/pipeline_snippets_general.go:94
↓ 1 callers
Function
searchTwoTerms
(w io.Writer, client *firestore.Client)
firestore/pipeline_snippets_general.go:60
↓ 1 callers
Function
seekSubscription
seekSubscription initiates a seek operation for a subscription.
pubsublite/admin/seek_subscription.go:27
↓ 1 callers
Function
selectBadPositionExample
(w io.Writer, client *firestore.Client)
firestore/pipeline_snippets_general.go:531
↓ 1 callers
Function
selectNestedDataExample
(_ io.Writer, client *firestore.Client)
firestore/pipeline_snippets_general.go:551
↓ 1 callers
Function
selectNestedExample
(w io.Writer, client *firestore.Client)
firestore/pipeline_snippets_general.go:581
↓ 1 callers
Function
selectPositionDataExample
(_ io.Writer, client *firestore.Client)
firestore/pipeline_snippets_general.go:488
↓ 1 callers
Function
selectPositionExample
(w io.Writer, client *firestore.Client)
firestore/pipeline_snippets_general.go:511
↓ 1 callers
Function
selectSyntaxExample
(w io.Writer, client *firestore.Client)
firestore/pipeline_snippets_general.go:469
↓ 1 callers
Function
send
[START speech_transcribe_async]
speech/captionasync/captionasync.go:67
↓ 1 callers
Function
send
(client pb.PingServiceClient)
run/grpc-ping/client/client.go:68
↓ 1 callers
Function
sendGCS
[END speech_transcribe_async] [START speech_transcribe_async_gcs]
speech/captionasync/captionasync.go:109
↓ 1 callers
Function
sendTestNotification
(pubsubTopic string)
securitycenter/notificationsv2/notifications_test.go:236
↓ 1 callers
Function
serializePartitionQuery
(ctx context.Context, client *firestore.Client)
firestore/collection_group_query.go:86
↓ 1 callers
Function
setAutoclass
setAutoclass sets the Autoclass configuration for a bucket.
storage/buckets/set_autoclass.go:28
↓ 1 callers
Function
setBucketCORSConfiguration
setBucketCORSConfiguration sets a CORS configuration on a bucket.
storage/buckets/set_bucket_cors_configuration.go:28
↓ 1 callers
Function
setBucketDefaultKMSKey
setBucketDefaultKMSKey sets the Cloud KMS encryption key for the bucket.
storage/buckets/set_bucket_default_kms_key.go:28
↓ 1 callers
Function
setBucketEncryptionEnforcementConfig
setBucketEncryptionEnforcementConfig sets a bucket's encryption enforcement configuration.
storage/buckets/set_bucket_encryption_enforcement_config.go:28
↓ 1 callers
Function
setBucketPublicIAM
setBucketPublicIAM makes all objects in a bucket publicly readable.
storage/buckets/set_bucket_public_iam.go:29
↓ 1 callers
Function
setBucketWebsiteInfo
setBucketWebsiteInfo sets website configuration on a bucket.
storage/buckets/define_bucket_website_configuration.go:28
↓ 1 callers
Function
setClientEndpoint
setClientEndpoint creates a bigquery.Client pointing to a specific endpoint.
bigquery/snippets/client/bigquery_set_client_endpoint.go:28
↓ 1 callers
Function
setClientEndpoint
setClientEndpoint sets the request endpoint.
storage/service_account/client_endpoint/set_client_endpoint.go:28
↓ 1 callers
Function
setDeleteProtection
setDeleteProtection updates the delete protection setting of given instance.
compute/instances/preventing-accidental-vm-deletion/set_delete_protection.go:29
↓ 1 callers
Function
setDiskAutoDelete
setDiskAutodelete sets the autodelete flag of a disk to given value.
compute/disks/set_disk_autodelete.go:28
↓ 1 callers
Function
setEndpoint
setEndpoint changes your endpoint.
vision/detect/set_endpoint.go:27
↓ 1 callers
Function
setEventBasedHold
setEventBasedHold sets EventBasedHold flag of an object to true.
storage/objects/set_event_based_hold.go:28
↓ 1 callers
Function
setFindingState
updateFindingState demonstrates how to update a security finding's state in CSCC. findingName is the full resource name of the finding to update.
securitycenter/findings/set_finding_state.go:31
↓ 1 callers
Function
setFindingState
updateFindingState demonstrates how to update a security finding's state in CSCC. findingName is the full resource name of the finding to update.
securitycenter/findingsv2/set_finding_state.go:29
↓ 1 callers
Function
setIAMPolicy
setIAMPolicy demonstrates altering the policy of a given taxonomy or policy tag resource. In this example, we append a binding to the existing policy
datacatalog/snippets/policytagmanager/set_iam_policy.go:30
↓ 1 callers
Function
setMetadata
setMetadata sets an object's metadata.
storage/objects/set_metadata.go:28
↓ 1 callers
Function
setMuteUndefined
setMute mutes an individual finding, can also unmute or reset the mute state of a finding. If a finding is already muted, muting it again has no effec
securitycenter/muteconfig/set_mute_undefined_finding.go:30
↓ 1 callers
Function
setObjectContexts
setObjectContexts patches an object's contexts.
storage/objects/set_object_contexts.go:28
↓ 1 callers
Function
setObjectRetentionPolicy
setObjectRetentionPolicy sets the object retention policy of an object.
storage/objects/set_object_retention.go:28
↓ 1 callers
Function
setPublicAccessPreventionEnforced
setPublicAccessPreventionEnforced sets public access prevention to "enforced" for the bucket.
storage/buckets/set_public_access_prevention_enforced.go:29
↓ 1 callers
Function
setPublicAccessPreventionInherited
setPublicAccessPreventionInherited sets public access prevention to "inherited" for the bucket.
storage/buckets/set_public_access_prevention_inherited.go:29
↓ 1 callers
Function
setRPOAsyncTurbo
setRPOAsyncTurbo enables turbo replication for the bucket by setting RPO to "ASYNC_TURBO". The bucket must be dual-region to use this feature.
storage/buckets/set_rpo_async_turbo.go:29
↓ 1 callers
Function
setRPODefault
setRPODefault disables turbo replication for the bucket by setting RPO to "DEFAULT".
storage/buckets/set_rpo_default.go:29
↓ 1 callers
Function
setSoftDeletePolicy
setSoftDeletePolicy sets a bucket's soft delete policy with a 10-day retention period.
storage/buckets/set_soft_delete_policy.go:28
↓ 1 callers
Function
setSourceIamPolicy
setSourceIamPolicy grants user roles/securitycenter.findingsEditor permision for a source. sourceName is the full resource name of the source to be up
securitycenter/findings/set_source_iam.go:30
↓ 1 callers
Function
setSourceIamPolicy
setSourceIamPolicy grants user roles/securitycenter.findingsEditor permision for a source. sourceName is the full resource name of the source to be up
securitycenter/iamv2/set_iam_policies.go:30
↓ 1 callers
Function
setTemporaryHold
setTemporaryHold sets TemporaryHold flag of an object to true.
storage/objects/set_temporary_hold.go:28
↓ 1 callers
Function
setUsageExportBucket
setUsageExportBucket sets the Compute Engine usage export bucket for the Cloud project. This sample presents how to interpret the default value for th
compute/set_usage_export_bucket.go:30
↓ 1 callers
Function
setup
(t *testing.T, projectID string)
dataproc/quickstart/quickstart_test.go:45
↓ 1 callers
Function
setup
(ctx context.Context)
functions/functionsv2/slack/setup.go:34
↓ 1 callers
Function
setup
(ctx context.Context)
functions/slack/setup.go:34
↓ 1 callers
Function
setupAndRun
(m *testing.M)
functions/helloworld/hello_http_system_test.go:53
↓ 1 callers
Function
setupAndRun
(m *testing.M)
functions/security/security_system_test.go:53
↓ 1 callers
Function
setupDeleteDataset
(t *testing.T)
aiplatform/snippets/delete_dataset_test.go:36
↓ 1 callers
Function
setupEntities
setupEntities initializes variables in this file with entityNames to use for testing.
securitycenter/findings/findings_test.go:59
↓ 1 callers
Function
setupEntities
setupEntities initializes variables in this file with entityNames to use for testing.
securitycenter/findingsv2/findings_test.go:106
↓ 1 callers
Function
setupEntities
()
securitycenter/iamv2/iam_policies_test.go:30
↓ 1 callers
Function
setupImportDatasetImageClassification
(t *testing.T)
aiplatform/snippets/import_data_image_classification_test.go:40
↓ 1 callers
Function
setupIndex
(t *testing.T, ctx context.Context, adminClient *admin.DatastoreAdminClient, projectID string)
datastore/snippets/query_test.go:210
↓ 1 callers
Function
setupLogging
[END opentelemetry_instrumentation_setup_opentelemetry] setupLogging configures logs to write JSON logs to stdout, and add span context attributes. [S
opentelemetry/instrumentation/app/setup.go:80
↓ 1 callers
Function
setupOpenTelemetry
setupOpenTelemetry sets up the OpenTelemetry SDK and exporters for metrics and traces. If it does not return an error, call shutdown for proper cleanu
opentelemetry/instrumentation/app/setup.go:33
↓ 1 callers
Function
setupPubSub
setupPubSub creates a subscription to the given topic.
dlp/snippets/jobs/jobs_test.go:34
↓ 1 callers
Function
setupSharedModules
()
securitycenter/management_api/security_health_analytics_custom_module_test.go:103
↓ 1 callers
Function
setupSharedModules
()
securitycenter/management_api/event_threat_detection/event_threat_detection_custom_module_test.go:61
↓ 1 callers
Function
setupStorage
setupStorage is responsible for setting up a temporary bucket to hold artifacts from the quickstart.
bigquery/bigquery_migration_quickstart/main_test.go:75
↓ 1 callers
Function
setupTestUpdateCDNKeyAkamai
(keyID string, t *testing.T)
media/videostitcher/update_cdn_key_akamai_test.go:30
↓ 1 callers
Function
setupTestUpdateCloudCDNKey
(keyID string, t *testing.T)
media/videostitcher/update_cdn_key_test.go:30
↓ 1 callers
Function
shotChangeURI
[END video_analyze_labels_gcs] [START video_analyze_shots]
videointelligence/video_analyze/video_analyze_gcs.go:83
↓ 1 callers
Function
signAsymmetric
signAsymmetric will sign a plaintext message using a saved asymmetric private key stored in Cloud KMS.
kms/sign_asymmetric.go:32
↓ 1 callers
Function
signCookie
signCookie prints the signed cookie value for the specified URL prefix and configuration.
mediacdn/sign_cookie.go:27
↓ 1 callers
Function
signMac
signMac will sign a plaintext message using the HMAC algorithm.
kms/sign_mac.go:29
↓ 1 callers
Function
signURL
signURL prints the signed URL string for the specified URL and configuration.
mediacdn/sign_url.go:28
↓ 1 callers
Function
signURLPrefix
signURLPrefix prints the signed URL string for the specified URL prefix and configuration.
mediacdn/sign_url_prefix.go:28
↓ 1 callers
Function
simulateSecurityHealthAnalyticsCustomModule
simulateSecurityHealthAnalyticsCustomModule simulates a custom module for Security Health Analytics.
securitycenter/management_api/simulate_security_health_analytics_custom_module.go:32
↓ 1 callers
Function
sleepMsToInt
(s string)
run/jobs/main.go:60
↓ 1 callers
Function
sort
(w io.Writer, client *firestore.Client)
firestore/pipeline_snippets_general.go:114
↓ 1 callers
Function
sortComparison
(w io.Writer, client *firestore.Client)
firestore/pipeline_snippets_general.go:134
↓ 1 callers
Function
sortDocumentIDExample
(w io.Writer, client *firestore.Client)
firestore/pipeline_snippets_general.go:184
↓ 1 callers
Function
sortSyntaxExample
(w io.Writer, client *firestore.Client)
firestore/pipeline_snippets_general.go:152
↓ 1 callers
Function
sortSyntaxExample2
(w io.Writer, client *firestore.Client)
firestore/pipeline_snippets_general.go:168
↓ 1 callers
Function
sparseIndexes
(w io.Writer, client *firestore.Client)
firestore/pipeline_snippets_general.go:805
↓ 1 callers
Function
sparseIndexes2
(w io.Writer, client *firestore.Client)
firestore/pipeline_snippets_general.go:822
↓ 1 callers
Function
speechTranscriptionURI
[END video_analyze_explicit_content] [START video_speech_transcription_gcs]
videointelligence/video_analyze/video_analyze_gcs.go:159
↓ 1 callers
Function
sqrtFunction
(w io.Writer, client *firestore.Client)
firestore/pipeline_snippets_arithmetic.go:210
← previous
next →
2,401–2,500 of 5,023, ranked by callers