MCPcopy Create free account

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

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

↓ 1 callersFunctioncopyTableWithCMEK
copyTableWithCMEK demonstrates creating a copy of a table and ensuring the copied data is protected with a customer managed encryption key.
bigquery/snippets/job/bigquery_copy_table_cmek.go:27
↓ 1 callersFunctioncosineDistanceFunction
(w io.Writer, client *firestore.Client)
firestore/pipeline_snippets_vector.go:25
↓ 1 callersFunctioncountDistinctFunction
(w io.Writer, client *firestore.Client)
firestore/pipeline_snippets_accumulators_aggregation.go:70
↓ 1 callersFunctioncountFunction
(w io.Writer, client *firestore.Client)
firestore/pipeline_snippets_accumulators_aggregation.go:25
↓ 1 callersFunctioncountIfFunction
(w io.Writer, client *firestore.Client)
firestore/pipeline_snippets_accumulators_aggregation.go:51
↓ 1 callersFunctioncountTokenLocalComputeWithTxt
countTokenLocalComputeWithTxt shows how to compute tokens using the local tokenizer with text input.
genai/count_tokens/counttoken_localtokenizer_compute_with_txt.go:29
↓ 1 callersFunctioncountTokenLocalWithTxt
countTokenLocalWithTxt shows how to count tokens using the local tokenizer with text input.
genai/count_tokens/counttoken_localtokenizer_with_txt.go:28
↓ 1 callersFunctioncountTokens
countTokens returns the number of tokens for this prompt.
vertexai/token-count/tokencount.go:28
↓ 1 callersFunctioncountTokensMultimodal
countTokensMultimodal finds the number of tokens for a multimodal prompt (video+text), and writes to w. Then, it calls the model with the multimodal p
vertexai/token-count/tokencount_multimodal.go:34
↓ 1 callersFunctioncountWithTxt
countWithTxt shows how to count tokens with text input.
genai/count_tokens/counttoken_with_txt.go:28
↓ 1 callersFunctioncountWithTxtAndVid
countWithTxtAndVid shows how to count tokens with text and video inputs.
genai/count_tokens/counttoken_with_txt_vid.go:28
↓ 1 callersFunctioncoveredQuery
(w io.Writer, client *firestore.Client)
firestore/pipeline_snippets_general.go:839
↓ 1 callersFunctioncreateAndWriteAppendableObject
createAndWriteAppendableObject creates and uploads a new appendable object in a rapid bucket. The object will not be finalized.
storage/rapid/create_and_write_appendable_object.go:30
↓ 1 callersFunctioncreateArrayContainsAnyQuery
(ctx context.Context, client *firestore.Client)
firestore/query.go:291
↓ 1 callersFunctioncreateArrayContainsQuery
(ctx context.Context, client *firestore.Client)
firestore/query.go:281
↓ 1 callersFunctioncreateAsset
createAsset creates an asset. This asset references a video file in Cloud Storage.
media/livestream/create_asset.go:29
↓ 1 callersFunctioncreateAuthToken
(t *testing.T, email string, aud string)
appengine/go11x/pubsub/authenicated_push/main_test.go:185
↓ 1 callersFunctioncreateBackupWithCustomerManagedEncryptionKey
(ctx context.Context, w io.Writer, db, backupID, kmsKeyName string)
spanner/spanner_snippets/spanner/spanner_create_backup_with_encryption_key.go:31
↓ 1 callersFunctioncreateBackupWithCustomerManagedMultiRegionEncryptionKey
createBackupWithCustomerManagedMultiRegionEncryptionKey creates a backup for a database using a Customer Managed Multi-Region Encryption Key.
spanner/spanner_snippets/spanner/spanner_create_backup_with_multi_region_encryption_key.go:31
↓ 1 callersFunctioncreateBigQueryDataSetId
(projectID string)
dlp/snippets/inspect/inspect_test.go:170
↓ 1 callersFunctioncreateBigQueryDataSetId
(projectID string)
dlp/snippets/deid/deid_test.go:570
↓ 1 callersFunctioncreateBigQueryDataSetId
(projectID, dataSetID string)
dlp/snippets/risk/risk_test.go:81
↓ 1 callersFunctioncreateBigQueryExport
Create export configuration to export findings to a BigQuery dataset. Optionally specify filter to export certain findings only.
securitycenter/bigqueryv2/create_big_query_export.go:30
↓ 1 callersFunctioncreateBigQuerySinkConnector
createBigQuerySinkConnector creates a BigQuery Sink connector.
managedkafka/connect/connectors/create_bigquery_sink_connector.go:29
↓ 1 callersFunctioncreateBigQuerySubscription
createBigQuerySubscription creates a Pub/Sub subscription that exports messages to BigQuery.
pubsub/v1samples/subscriptions/create_bigquery_subscription.go:27
↓ 1 callersFunctioncreateBigQuerySubscription
createBigQuerySubscription creates a Pub/Sub subscription that exports messages to BigQuery.
pubsub/subscriptions/create_bigquery_subscription.go:28
↓ 1 callersFunctioncreateBigQueryTable
(projectID, datasetID, tableID string)
pubsub/v1samples/subscriptions/subscription_test.go:1115
↓ 1 callersFunctioncreateBigQueryTable
(projectID, datasetID, tableID string)
pubsub/subscriptions/subscription_test.go:677
↓ 1 callersFunctioncreateBucket
(projectID, bucketName string)
dlp/snippets/deid/deid_test.go:411
↓ 1 callersFunctioncreateBucket
createBucket creates a new bucket in the project.
batch/create_with_gcs_bucket_test.go:71
↓ 1 callersFunctioncreateBucket
(t *testing.T, projectID, bucketName string)
compute/usage_export_test.go:32
↓ 1 callersFunctioncreateBucketClassLocation
createBucketClassLocation creates a new bucket in the project with Storage class and location.
storage/buckets/create_bucket_class_location.go:29
↓ 1 callersFunctioncreateBucketDualRegion
createBucketDualRegion creates a new dual-region bucket in the project in the provided location and regions. See https://cloud.google.com/storage/docs
storage/buckets/create_bucket_dual_region.go:30
↓ 1 callersFunctioncreateBucketForCreatJob
(t *testing.T, projectID string)
dlp/snippets/jobs/jobs_test.go:146
↓ 1 callersFunctioncreateBucketHierarchicalNamespace
createBucketHierarchicalNamespace creates a new bucket with hierarchical namespace features enabled.
storage/buckets/create_bucket_hierarchical_namespace.go:29
↓ 1 callersFunctioncreateBucketNotification
createBucketNotification creates a notification configuration for a bucket.
storage/notifications/create.go:27
↓ 1 callersFunctioncreateBucketObjectRetention
createBucketObjectRetention creates a bucket with object retention enabled.
storage/buckets/create_bucket_object_retention.go:28
↓ 1 callersFunctioncreateBucketTurboReplication
createBucketTurboReplication creates a new dual-region bucket with turbo replication enabled.
storage/buckets/create_bucket_turbo_replication.go:29
↓ 1 callersFunctioncreateCDNKeyAkamai
createCDNKeyAkamai creates an Akamai CDN key. A CDN key is used to retrieve protected media.
media/videostitcher/create_cdn_key_akamai.go:29
↓ 1 callersFunctioncreateChannelEvent
createChannelEvent creates a channel event. An event is a sub-resource of a channel, which can be scheduled by the user to execute operations on a cha
media/livestream/create_channel_event.go:33
↓ 1 callersFunctioncreateChannelWithBackupInput
createChannelWithBackupInput creates a channel with a failover backup input.
media/livestream/create_channel_with_backup_input.go:30
↓ 1 callersFunctioncreateClient
(projectID string)
datastore/tasks/create_client.go:25
↓ 1 callersFunctioncreateClient
(ctx context.Context)
firestore/firestore_quickstart/main.go:30
↓ 1 callersFunctioncreateClient
(t *testing.T, pk rsa.PublicKey)
appengine/go11x/pubsub/authenicated_push/main_test.go:218
↓ 1 callersFunctioncreateClientEvent
createClientEvent creates a client event.
jobs/v4/howto/basic_client_event.go:30
↓ 1 callersFunctioncreateClientWithDatabase
createClientWithDatabase creates a new client that references a custom database, e.g. not 'default'.
datastore/tasks/client_with_database.go:28
↓ 1 callersFunctioncreateClientWithEndpoint
createClientWithEndpoint creates a Security Command Center client for a regional endpoint.
securitycenter/clientv2/create_client_with_endpoint.go:28
↓ 1 callersFunctioncreateCloudStorageSinkConnector
createCloudStorageSinkConnector creates a Cloud Storage Sink connector.
managedkafka/connect/connectors/create_cloud_storage_sink_connector.go:29
↓ 1 callersFunctioncreateCloudStorageSubscription
createCloudStorageSubscription creates a Pub/Sub subscription that exports messages to Cloud Storage.
pubsub/v1samples/subscriptions/create_cloud_storage_subscription.go:28
↓ 1 callersFunctioncreateCloudStorageSubscription
createCloudStorageSubscription creates a Pub/Sub subscription that exports messages to Cloud Storage.
pubsub/subscriptions/create_cloud_storage_subscription.go:30
↓ 1 callersFunctioncreateCluster
(ctx context.Context, projectID, location, clusterName string)
connectgateway/get_namespace_test.go:60
↓ 1 callersFunctioncreateCluster
(w io.Writer, projectID, region, clusterName string)
dataproc/create_cluster.go:30
↓ 1 callersFunctioncreateCluster
(w io.Writer, projectID, region, clusterID, subnet string, cpu, memoryBytes int64, opts ...option.ClientOption
managedkafka/clusters/create_cluster.go:29
↓ 1 callersMethodcreateCmd
()
internal/cloudrunci/cloudrunjobs.go:209
↓ 1 callersFunctioncreateCoffeeBeans
(t *testing.T, projectID string, collName string)
firestore/vector_search_main_test.go:177
↓ 1 callersFunctioncreateCompany
[START job_create_company] createCompany creates a company as given.
jobs/v3/howto/basic_company_sample.go:29
↓ 1 callersFunctioncreateConfirmationURL
[END gae_mail_intro]
docs/appengine/mail/mail.go:51
↓ 1 callersFunctioncreateConnectCluster
(w io.Writer, projectID, region, clusterID, kafkaCluster string, opts ...option.ClientOption)
managedkafka/connect/clusters/create_connect_cluster.go:29
↓ 1 callersFunctioncreateContainerJob
Creates and runs a job that runs the specified container
batch/create_with_container_no_mounting.go:29
↓ 1 callersFunctioncreateContentCache
createContentCache shows how to create a content cache with an expiration parameter.
genai/content_cache/contentcache_create_with_txt_gcs_pdf.go:30
↓ 1 callersFunctioncreateContextCache
createContextCache shows how to create a cached content, and returns its name.
vertexai/context-caching/contextcaching_create.go:28
↓ 1 callersFunctioncreateCountQuery
(w io.Writer, projectID string)
firestore/aggregate_query_count.go:28
↓ 1 callersFunctioncreateCustomSecondaryDisk
createCustomSecondaryDisk creates a new secondary disk in a project in given zone. Note: secondary disk should be located in a different region, but w
compute/disks/create_secondary_disk_custom.go:31
↓ 1 callersFunctioncreateDICOMStore
createDICOMStore creates a DICOM store.
healthcare/dicom_store_create.go:27
↓ 1 callersFunctioncreateDatabase
createDatabase uses the Spanner database administration client to create the tables used in this demonstration.
spanner/spanner_arrays/main.go:167
↓ 1 callersFunctioncreateDatabase
(ctx context.Context, w io.Writer, adminClient *database.DatabaseAdminClient, db string)
spanner/spanner_leaderboard/leaderboard.go:69
↓ 1 callersFunctioncreateDatabase
(ctx context.Context, adminClient *database.DatabaseAdminClient, db string)
functions/spanner/spanner_test.go:63
↓ 1 callersFunctioncreateDatabaseWithCustomerManagedEncryptionKey
(ctx context.Context, w io.Writer, db, kmsKeyName string)
spanner/spanner_snippets/spanner/spanner_create_database_with_encryption_key.go:28
↓ 1 callersFunctioncreateDatabaseWithCustomerManagedMultiRegionEncryptionKey
createDatabaseWithCustomerManagedMultiRegionEncryptionKey creates a new database with tables using a Customer Managed Multi-Region Encryption Key.
spanner/spanner_snippets/spanner/spanner_create_database_with_multi_region_encryption_key.go:29
↓ 1 callersFunctioncreateDatabaseWithDefaultLeader
createDatabaseWithDefaultLeader creates a database with a default leader
spanner/spanner_snippets/spanner/spanner_create_database_with_default_leader.go:29
↓ 1 callersFunctioncreateDataset
createDataset demonstrates creation of a new dataset using an explicit destination location.
bigquery/snippets_preview/dataset/bigquery_create_dataset.go:34
↓ 1 callersFunctioncreateDataset
createDataset creates a dataset in Vertex AI
aiplatform/snippets/create_dataset.go:31
↓ 1 callersFunctioncreateDataset
(ctx context.Context, t *testing.T, client *bigquery.Client, datasetID string)
asset/quickstart/analyze-iam-policy-longrunning-bigquery/main_test.go:69
↓ 1 callersFunctioncreateDataset
(ctx context.Context, t *testing.T, client *bigquery.Client, datasetID string)
asset/quickstart/export-assets-bigquery/main_test.go:55
↓ 1 callersFunctioncreateDeidentifiedTemplate
(projectID, deidentifyTemplateID string)
dlp/snippets/deid/deid_test.go:260
↓ 1 callersFunctioncreateDemoDataset
(t *testing.T)
securitycenter/bigqueryv2/bigquery_test.go:41
↓ 1 callersFunctioncreateDenyPolicy
createDenyPolicy creates a deny policy.
iam/deny/create_deny_policy.go:30
↓ 1 callersFunctioncreateDiagram
[END cloudrun_system_package_handler] [START cloudrun_system_package_exec] createDiagram generates a diagram image from the provided io.Reader written
run/system_package/graphviz.go:95
↓ 1 callersFunctioncreateDisk
(ctx context.Context, projectId, zone, diskName, sourceImage string)
compute/snapshots/snapshots_test.go:32
↓ 1 callersFunctioncreateDisk
(ctx context.Context, projectId, zone, diskName, sourceImage string)
compute/disk-images/disk_image_test.go:32
↓ 1 callersFunctioncreateDiskFromCustomerEncryptedDisk
Creates a zonal non-boot persistent disk in a project with the copy of data from an existing disk. The encryption key must be the same for the source
compute/disks/clone_encrypted_disk.go:31
↓ 1 callersFunctioncreateDiskFromImage
createDiskFromImage creates a new disk in a project in given zone.
compute/disks/create_disk_from_image.go:29
↓ 1 callersFunctioncreateDiskFromSnapshot
createDiskFromSnapshot creates a new disk in a project in given zone.
compute/disks/create_disk_from_snapshot.go:29
↓ 1 callersFunctioncreateDiskInStoragePool
[START compute_hyperdisk_create_from_pool] createDiskInStoragePool creates a new Hyperdisk in the specified storage pool.
compute/disks/create_hyperdisk_from_pool.go:30
↓ 1 callersFunctioncreateDiskSnapshot
(ctx context.Context, projectId, zone, diskName, snapshotName string)
compute/disks/disks_test.go:95
↓ 1 callersFunctioncreateDiskWithSnapshotSchedule
createDiskWithSnapshotSchedule creates a new empty regional disk with snapshot schedule
compute/disks/create_disk_with_snapshot_schedule.go:29
↓ 1 callersFunctioncreateEmptyDisk
createEmptyDisk creates a new empty disk in a project in given zone.
compute/disks/create_empty_disk.go:29
↓ 1 callersFunctioncreateEncryptedDisk
createEncryptedDisk creates a new disk in a project in given zone. If you do not provide diskLink or imageLink, an empty disk will be created.
compute/disks/create_encrypted_disk.go:30
↓ 1 callersFunctioncreateEndpoint
(w io.Writer, projectID string)
servicedirectory/create_endpoint.go:27
↓ 1 callersFunctioncreateEventDrivenAWSTransfer
[START storagetransfer_create_event_driven_aws_transfer]
storagetransfer/event_driven_aws_transfer.go:29
↓ 1 callersFunctioncreateEventDrivenGCSTransfer
[START storagetransfer_create_event_driven_gcs_transfer]
storagetransfer/event_driven_gcs_transfer.go:28
↓ 1 callersFunctioncreateEventThreatDetectionCustomModule
createEventThreatDetectionCustomModule creates a custom module for Event Threat Detection.
securitycenter/management_api/event_threat_detection/create_event_threat_detection_custom_module.go:32
↓ 1 callersFunctioncreateFHIRResource
createFHIRResource creates an FHIR resource.
healthcare/fhir_resource_create.go:29
↓ 1 callersFunctioncreateFHIRStore
createFHIRStore creates an FHIR store.
healthcare/fhir_store_create.go:27
↓ 1 callersFunctioncreateFamilyGCIntersect
(w io.Writer, projectID, instanceID string, tableName string)
bigtable/garbagecollection/create_family_gc_intersect.go:26
↓ 1 callersFunctioncreateFamilyGCMaxAge
(w io.Writer, projectID, instanceID string, tableName string)
bigtable/garbagecollection/create_family_gc_max_age.go:26
↓ 1 callersFunctioncreateFamilyGCMaxVersions
(w io.Writer, projectID, instanceID string, tableName string)
bigtable/garbagecollection/create_family_gc_max_versions.go:25
↓ 1 callersFunctioncreateFamilyGCNested
(w io.Writer, projectID, instanceID string, tableName string)
bigtable/garbagecollection/create_family_gc_nested.go:26
↓ 1 callersFunctioncreateFamilyGCUnion
(w io.Writer, projectID, instanceID string, tableName string)
bigtable/garbagecollection/create_family_gc_union.go:26
↓ 1 callersFunctioncreateFinding
createFinding demonstrates how to create a new security finding in CSCC. sourceName is the full resource name of the source the finding should be asso
securitycenter/findings/create_finding.go:32
← previousnext →1,001–1,100 of 5,023, ranked by callers