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
Method
Send
(*TimeResponse)
run/grpc-server-streaming/pkg/api/v1/timeservice.pb.go:212
↓ 1 callers
Function
SimulateClient
SimulateClient creates a client which will send load to the server.
profiler/shakesapp/shakesapp/client.go:38
↓ 1 callers
Method
StopConnector
(ctx context.Context, req *managedkafkapb.StopConnectorRequest)
internal/managedkafka/fake/fake.go:270
↓ 1 callers
Function
TranslateText
TranslateText is executed when a message is published to the Cloud Pub/Sub topic specified by the TRANSLATE_TOPIC environment variable, and translates
functions/ocr/app/translate.go:32
↓ 1 callers
Function
TranslateText
TranslateText is executed when a message is published to the Cloud Pub/Sub topic specified by the TRANSLATE_TOPIC environment variable, and translates
functions/functionsv2/ocr/app/translate.go:38
↓ 1 callers
Method
UpdateCluster
(ctx context.Context, req *managedkafkapb.UpdateClusterRequest)
internal/managedkafka/fake/fake.go:111
↓ 1 callers
Method
UpdateConnectCluster
(ctx context.Context, req *managedkafkapb.UpdateConnectClusterRequest)
internal/managedkafka/fake/fake.go:215
↓ 1 callers
Method
UpdateConnector
(ctx context.Context, req *managedkafkapb.UpdateConnectorRequest)
internal/managedkafka/fake/fake.go:254
↓ 1 callers
Method
UpdateConsumerGroup
(ctx context.Context, req *managedkafkapb.UpdateConsumerGroupRequest)
internal/managedkafka/fake/fake.go:171
↓ 1 callers
Function
UploadFile
UploadFile processes a 'multipart/form-data' upload request.
functions/http/form.go:29
↓ 1 callers
Method
Validate
Validate confirms all environment variables are valid.
internal/cloudrunci/envvars.go:61
↓ 1 callers
Function
WithAttempts
(n int)
internal/cloudrunci/cloudrunci.go:160
↓ 1 callers
Function
WithDelay
(d time.Duration)
internal/cloudrunci/cloudrunci.go:165
↓ 1 callers
Function
WordCountFromPCol
WordCountFromPCol counts the words from a PCollection and validates it.
dataflow/flex-templates/wordcount/wordcount.go:109
↓ 1 callers
Function
_deleteGlobalIPAddress
(ctx context.Context, projectID, addressName string)
compute/address/address_test.go:216
↓ 1 callers
Function
_deleteRegionalIPAddress
(ctx context.Context, projectID, region, addressName string)
compute/address/address_test.go:240
↓ 1 callers
Function
_listGlobalIPAddresses
(ctx context.Context, projectID string)
compute/address/address_test.go:153
↓ 1 callers
Function
_listRegionalIPAddresses
(ctx context.Context, projectID, region string)
compute/address/address_test.go:180
↓ 1 callers
Function
accessSecretVersion
accessSecretVersion accesses the payload for the given secret version if one exists. The version can be a version number as a string (e.g. "5") or an
secretmanager/access_secret_version.go:31
↓ 1 callers
Function
activateHMACKey
activateHMACKey activates the HMAC key with the given access ID.
storage/service_account/hmac/activate.go:28
↓ 1 callers
Function
addBinding
addBinding adds the principal to the project's IAM policy
iam/quickstart/quickstart.go:70
↓ 1 callers
Function
addBucketConditionalIAMBinding
addBucketConditionalIAMBinding adds bucket conditional IAM binding.
storage/buckets/add_bucket_conditional_iam_binding.go:30
↓ 1 callers
Function
addBucketDefaultOwner
addBucketDefaultOwner adds default ACL to the specified bucket.
storage/acl/add_bucket_default_owner.go:26
↓ 1 callers
Function
addBucketIAMMember
addBucketIAMMember adds the bucket IAM member to permission role.
storage/buckets/add_bucket_iam_member.go:29
↓ 1 callers
Function
addBucketLabel
addBucketLabel adds a label on a bucket.
storage/buckets/add_bucket_label.go:28
↓ 1 callers
Function
addCustomModule
addCustomModule creates a custom module for testing purposes
securitycenter/management_api/event_threat_detection/event_threat_detection_custom_module_test.go:158
↓ 1 callers
Function
addDeleteSecurityMarks
addDeleteSecurityMarks adds/updates "key_a" and deletes "key_b" from assetName's securityMarks. assetName is the resource path for an asset.
securitycenter/securitymarksv2/add_delete_security_marks.go:30
↓ 1 callers
Function
addDeleteSecurityMarks
addDeleteSecurityMarks adds/updates "key_a" and deletes "key_b" from assetName's securityMarks. assetName is the resource path for an asset.
securitycenter/assets/add_delete_security_marks.go:30
↓ 1 callers
Function
addDocAfterAutoGeneratedID
(ctx context.Context, client *firestore.Client)
firestore/save_data_set_id_random_document_ref.go:26
↓ 1 callers
Function
addDocAsEntity
(ctx context.Context, client *firestore.Client)
firestore/save_data_set_from_custom_type.go:26
↓ 1 callers
Function
addDocAsMap
(ctx context.Context, client *firestore.Client)
firestore/save_data_set_from_map.go:26
↓ 1 callers
Function
addDocDataTypes
(ctx context.Context, client *firestore.Client)
firestore/save_data_set_from_map_nested.go:27
↓ 1 callers
Function
addDocWithID
(ctx context.Context, client *firestore.Client)
firestore/save_data_set_id_specified.go:26
↓ 1 callers
Function
addDocWithoutID
(ctx context.Context, client *firestore.Client)
firestore/save_data_set_id_random_collection.go:26
↓ 1 callers
Function
addFieldsNestingExample
(w io.Writer, client *firestore.Client)
firestore/pipeline_snippets_general.go:636
↓ 1 callers
Function
addFieldsOverlapExample
(w io.Writer, client *firestore.Client)
firestore/pipeline_snippets_general.go:619
↓ 1 callers
Function
addFieldsSyntaxExample
(w io.Writer, client *firestore.Client)
firestore/pipeline_snippets_general.go:601
↓ 1 callers
Function
addFileOwner
addFileOwner adds ACL to the specified object.
storage/acl/add_file_owner.go:26
↓ 1 callers
Function
addFunction
(w io.Writer, client *firestore.Client)
firestore/pipeline_snippets_arithmetic.go:25
↓ 1 callers
Function
addMember
addMember adds a member to a role binding.
iam/snippets/member_add.go:26
↓ 1 callers
Function
addRotationSchedule
addRotationSchedule updates a key to add a rotation schedule. If the key already has a rotation schedule, it is overwritten.
kms/update_key_add_rotation.go:33
↓ 1 callers
Function
addSecretVersion
addSecretVersion adds a new secret version to the given secret with the provided payload.
secretmanager/add_secret_version.go:30
↓ 1 callers
Function
addTableLabel
addTableLabel demonstrates adding Label metadata to a BigQuery table.
bigquery/snippets/table/bigquery_label_table.go:26
↓ 1 callers
Function
addToPool
(ctx context.Context, proj string)
testing/gimmeproj/main.go:294
↓ 1 callers
Function
addUsers
(projectID, topicID string)
pubsub/v1samples/topics/add_users.go:26
↓ 1 callers
Function
addUsers
addUsers adds all IAM users to a subscription.
pubsub/v1samples/subscriptions/add_users.go:27
↓ 1 callers
Function
addUsersToSubscription
(w io.Writer, projectID, subID string)
pubsub/subscriptions/add_users.go:27
↓ 1 callers
Function
addUsersToTopic
(w io.Writer, projectID, topicID string)
pubsub/topics/add_users.go:27
↓ 1 callers
Function
aggregateDistinct
(w io.Writer, client *firestore.Client)
firestore/pipeline_snippets_general.go:223
↓ 1 callers
Function
aggregateExampleData
(_ io.Writer, client *firestore.Client)
firestore/pipeline_snippets_general.go:283
↓ 1 callers
Function
aggregateGroupComplexExample
(w io.Writer, client *firestore.Client)
firestore/pipeline_snippets_general.go:361
↓ 1 callers
Function
aggregateGroupExample
(w io.Writer, client *firestore.Client)
firestore/pipeline_snippets_general.go:339
↓ 1 callers
Function
aggregateGroupSyntax
(w io.Writer, client *firestore.Client)
firestore/pipeline_snippets_general.go:262
↓ 1 callers
Function
aggregateGroups
(w io.Writer, client *firestore.Client)
firestore/pipeline_snippets_general.go:203
↓ 1 callers
Function
aggregateSyntaxExample
(w io.Writer, client *firestore.Client)
firestore/pipeline_snippets_general.go:243
↓ 1 callers
Function
aggregateWithoutGroupExample
(w io.Writer, client *firestore.Client)
firestore/pipeline_snippets_general.go:320
↓ 1 callers
Function
aggregationQueryExplain
(w io.Writer, projectID string)
firestore/aggregate_query_explain.go:26
↓ 1 callers
Function
aggregationQueryExplainAnalyze
(w io.Writer, projectID string)
firestore/aggregate_query_explain_analyze.go:27
↓ 1 callers
Function
allDocs
(ctx context.Context, client *firestore.Client)
firestore/retrieve_data_get_all_documents.go:27
↓ 1 callers
Function
allocImpl
()
profiler/hotapp/main.go:79
↓ 1 callers
Function
allocMany
allocMany simulates a function which allocates a lot of memory, but does not hold on to that memory.
profiler/hotapp/main.go:88
↓ 1 callers
Function
allocOnce
Simulates a memory-hungry function. It calls an "impl" function to produce a bit deeper stacks in the profiler visualization, merely for illustration
profiler/hotapp/main.go:75
↓ 1 callers
Function
analyzeEntities
analyzeEntities sends a string of text to the Cloud Natural Language API to detect the entities of the text.
language/analyze_v2/analyze_entities.go:29
↓ 1 callers
Function
analyzeOrgPolicies
(w io.Writer, scope string, constraint string)
asset/quickstart/analyze-org-policies/analyze_org_policies.go:30
↓ 1 callers
Function
analyzeOrgPolicyGovernedAssets
(w io.Writer, scope string, constraint string)
asset/quickstart/analyze-org-policy-governed-assets/analyze_org_policy_governed_assets.go:30
↓ 1 callers
Function
analyzeOrgPolicyGovernedContainers
(w io.Writer, scope string, constraint string)
asset/quickstart/analyze-org-policy-governed-containers/analyze_org_policy_governed_containers.go:30
↓ 1 callers
Function
analyzeSentiment
analyzeSentiment sends a string of text to the Cloud Natural Language API to assess the sentiment of the text.
language/analyze_v2/analyze_sentiment.go:29
↓ 1 callers
Function
andFunction
(w io.Writer, client *firestore.Client)
firestore/pipeline_snippets_logical.go:44
↓ 1 callers
Function
appendToDefaultStream
appendToDefaultStream demonstrates using the managedwriter package to write some example data to a default stream.
bigquery/snippets/managedwriter/bigquerystorage_append_rows_default.go:107
↓ 1 callers
Function
appendToPendingStream
appendToPendingStream demonstrates using the managedwriter package to write some example data to a pending stream, and then committing it to a table.
bigquery/snippets/managedwriter/bigquerystorage_append_rows_pending.go:105
↓ 1 callers
Function
arrayConcatFunction
(w io.Writer, client *firestore.Client)
firestore/pipeline_snippets_array.go:82
↓ 1 callers
Function
arrayContainsAllFunction
(w io.Writer, client *firestore.Client)
firestore/pipeline_snippets_array.go:120
↓ 1 callers
Function
arrayContainsAnyFunction
(w io.Writer, client *firestore.Client)
firestore/pipeline_snippets_array.go:139
↓ 1 callers
Function
arrayContainsFunction
(w io.Writer, client *firestore.Client)
firestore/pipeline_snippets_array.go:101
↓ 1 callers
Function
arrayLengthFunction
(w io.Writer, client *firestore.Client)
firestore/pipeline_snippets_array.go:158
↓ 1 callers
Function
arrayReverseFunction
(w io.Writer, client *firestore.Client)
firestore/pipeline_snippets_array.go:177
↓ 1 callers
Function
assignStaticAddressToExistingVM
assignStaticAddressToExistingVM assigns a static external IP address to an existing VM instance. Note: VM and assigned IP must be in the same region.
compute/address/assign_static_address_to_existing_vm.go:31
↓ 1 callers
Function
assignStaticExternalToNewVM
[START compute_ip_address_assign_static_external_new_vm] assignStaticExternalToNewVM creates a new VM instance and assigns a static external IP addres
compute/address/assign_static_address_to_new_vm.go:31
↓ 1 callers
Function
asyncWords
[START speech_transcribe_async_word_time_offsets_gcs]
speech/wordoffset/wordoffset.go:68
↓ 1 callers
Function
attachRegionalDisk
Attaches the provided regional disk in read-write mode to the given VM
compute/disks/attach_regional_disk.go:29
↓ 1 callers
Function
attachRegionalDiskReadOnly
Attaches the provided regional disk in read-only mode to the given VM. Read-only disks can be attached to multiple VMs at once.
compute/disks/attach_regional_disk_readonly.go:29
↓ 1 callers
Function
attachSnapshotSchedule
attachSnapshotSchedule attaches a snapshot schedule to disk.
compute/snapshots/attach_disk_snapshot_schedule.go:28
↓ 1 callers
Function
attemptLease
(client *securitycenter.Client, asset *securitycenterpb.Asset, orgID string)
securitycenter/securitymarksv2/assets_test.go:62
↓ 1 callers
Function
attemptLease
(client *securitycenter.Client, asset *securitycenterpb.Asset, orgID string)
securitycenter/assets/assets_test.go:62
↓ 1 callers
Function
audience
[END getting_started_auth_validate] [START getting_started_auth_audience] audience returns the expected audience value for this service.
getting-started/authenticating-users/main.go:146
↓ 1 callers
Function
audioProfile
audioProfile generates audio from text using a custom synthesizer like a telephone call.
texttospeech/synthesize_speech/audio_profile.go:32
↓ 1 callers
Function
authenticateExplicitWithAdc
authenticateExplicitWithAdc uses Application Default Credentials to print storage buckets.
auth/authenticate_explicit_with_adc.go:31
↓ 1 callers
Function
authenticateImplicitWithAdc
authenticateImplicitWithAdc uses Application Default Credentials to automatically find credentials and authenticate.
auth/authenticate_implicit_with_adc.go:29
↓ 1 callers
Function
authenticateWithAPIKey
authenticateWithAPIKey authenticates with an API key for Google Language service.
auth/authenticate_with_api_key.go:30
↓ 1 callers
Function
autoPunctuation
(w io.Writer, path string)
speech/snippets/auto_punctuation.go:31
↓ 1 callers
Function
avgFunction
(w io.Writer, client *firestore.Client)
firestore/pipeline_snippets_accumulators_aggregation.go:89
↓ 1 callers
Function
basicClientUsage
basicClientUsage demonstrates the basic steps of creating BigQuery clients, using them to invoke BQ RPCs, and shutting down.
bigquery/snippets_preview/client/bigquery_client_usage.go:35
↓ 1 callers
Function
basicJobSearch
[START job_discovery_basic_keyword_search] basicJobSearch searches for jobs with query.
jobs/v3/howto/general_search_sample.go:29
↓ 1 callers
Function
basicLocationSearch
[START job_basic_location_search] basicLocationSearch searches for jobs within distance of location.
jobs/v3/howto/location_based_search_sample.go:29
↓ 1 callers
Function
basicRead
(w io.Writer, client *firestore.Client)
firestore/pipeline_snippets_general.go:1719
↓ 1 callers
Function
batchCodePredict
batchCodePredict perform batch code prediction using a pre-trained code generation model
vertexai/batch-predict/batch_code_predict.go:30
↓ 1 callers
Function
batchDeleteJobs
batchDeleteJobs deletes existing jobs by a filter.
jobs/v4/howto/batch_delete_jobs.go:28
↓ 1 callers
Function
batchPredictBQ
batchPredictBQ submits a batch prediction job using BigQuery data source as its input
vertexai/batch-predict/gemini_batch_predict_bq.go:32
↓ 1 callers
Function
batchPredictGCS
batchPredictGCS submits a batch prediction job using GCS data source as its input
vertexai/batch-predict/gemini_batch_predict_gcs.go:32
↓ 1 callers
Function
batchTextPredict
batchTextPredict perform batch text prediction using a pre-trained text generation model
vertexai/batch-predict/batch_text_predict.go:30
← previous
next →
801–900 of 5,023, ranked by callers