MCPcopy Create free account

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

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

↓ 2 callersFunctioncreateTableExplicitSchema
createTableExplicitSchema demonstrates creating a new BigQuery table and specifying a schema.
bigquery/snippets/table/bigquery_create_table.go:27
↓ 2 callersFunctioncreateTask
createTask creates a new task in your App Engine queue.
appengine/go11x/tasks/create_task/create_task.go:29
↓ 2 callersFunctioncreateTemplate
(project, templateName string)
compute/reservations/reservations_test.go:32
↓ 2 callersFunctioncreateTestFinding
(ctx context.Context, client *securitycenter.Client, findingID string, category string)
securitycenter/findings/findings_test.go:37
↓ 2 callersFunctioncreateTestInstance
helper functions
compute/address/address_test.go:37
↓ 2 callersFunctioncreateTestKey
Create a key for testing purposes and set environment variables
storage/s3_sdk/s3_gcs_test.go:64
↓ 2 callersFunctioncreateTestTopic
Creates a pubsub topic for testing and registers a cleanup func to remove it once the test finishes
storage/notifications/notifications_test.go:164
↓ 2 callersFunctioncreateTopicWithSchema
(w io.Writer, projectID, topicID, schemaID string, encoding pubsubpb.Encoding)
pubsub/schemas/create_topic_with_schema.go:27
↓ 2 callersFunctioncreateWindowsOSImage
createWindowsOSImage creates a new Windows image from the specified source disk.
compute/instances/windows/create-os-image/create_windows_os_image.go:30
↓ 2 callersFunctioncreateWorkflow
createWorkflow creates a workflow for testing purposes.
workflows/executions/test_functions.go:29
↓ 2 callersFunctioncurlRendition
Curl a rendition.
media/videostitcher/stitcher_test.go:298
↓ 2 callersFunctiondbConfigFromEnv
dbConfigFromEnv reads database configuration from the environment, selecting the provided connType in the configuration.
cloudsql/sqlserver/database-sql/cloudsql_test.go:50
↓ 2 callersFunctiondbConfigFromEnv
dbConfigFromEnv reads database configuration from the environment, selecting the provided connType in the configuration.
cloudsql/postgres/database-sql/cloudsql_test.go:53
↓ 2 callersFunctiondbConfigFromEnv
dbConfigFromEnv reads database configuration from the environment, selecting the provided connType in the configuration.
cloudsql/mysql/database-sql/cloudsql_test.go:53
↓ 2 callersFunctiondeIdentifyDeterministicEncryption
deIdentifyDeterministicEncryption de-identifies through deterministic encryption
dlp/snippets/deid/deid_deterministic.go:29
↓ 2 callersFunctiondefaultAutoComplete
[END job_auto_complete_job_title] [START job_auto_complete_default] defaultAutoComplete suggests job titles or company display names of given companyN
jobs/v3/howto/auto_complete_sample.go:66
↓ 2 callersFunctiondefaultSchemaConfig
(projectID, schemaID, schemaFile string, schemaType pubsub.SchemaType)
pubsub/v1samples/schemas/schemas_test.go:524
↓ 2 callersFunctiondefaultSchemaConfig
(projectID, schemaID, schemaFile string, schemaType pubsubpb.Schema_Type)
pubsub/schemas/schemas_test.go:497
↓ 2 callersFunctiondelete
(w io.Writer, db string)
spanner/spanner_snippets/spanner/spanner_delete_data.go:26
↓ 2 callersFunctiondelete
(w io.Writer, projectID, topicID string)
pubsub/v1samples/topics/delete.go:26
↓ 2 callersFunctiondeleteBucket
Helper function to delete a bucket with all their containing objects.
translate/v3/delete_bucket.go:26
↓ 2 callersFunctiondeleteChannel
deleteChannel deletes the given channel. channelName should be of the form "projects/[PROJECT_ID]/notificationChannels/[CHANNEL_ID]".
monitoring/snippets/channel_delete.go:31
↓ 2 callersFunctiondeleteCluster
(projectID string, clusterName, region string)
dataproc/dataproc_test.go:32
↓ 2 callersFunctiondeleteCompany
deleteCompany deletes an existing company. Companies with existing jobs cannot be deleted until those jobs have been deleted.
jobs/v4/howto/delete_company_sample.go:29
↓ 2 callersFunctiondeleteDiskImage
Deletes the specified disk image
compute/disk-images/delete_disk_image.go:28
↓ 2 callersFunctiondeleteInspectTemplate
deleteInspectTemplate deletes the given template.
dlp/snippets/template/delete.go:28
↓ 2 callersFunctiondeleteInstance
(ctx context.Context, projectId, zone, instanceName string)
compute/instances/create-manage-windows-instances/create_windows_instances_test.go:31
↓ 2 callersFunctiondeleteInstanceAndBackups
( t *testing.T, instanceName string, instanceAdmin *instance.InstanceAdminClient, databaseAdmin *database.
spanner/spanner_snippets/spanner/integration_test.go:1691
↓ 2 callersFunctiondeleteJob
deleteJob deletes an existing job by its resource name.
jobs/v4/howto/delete_job_sample.go:28
↓ 2 callersFunctiondeleteLog
(projectID string)
logging/simplelog/delete_log.go:26
↓ 2 callersFunctiondeleteMuteRule
deleteMuteRule deletes a mute configuration given its resource name. Note: Previously muted findings are not affected when a mute config is deleted.
securitycenter/muteconfig/delete_mute_rule.go:30
↓ 2 callersFunctiondeleteMuteRule
deleteMuteRule deletes a mute configuration given its resource name. Note: Previously muted findings are not affected when a mute config is deleted.
securitycenter/muteconfigv2/delete_mute_rule.go:30
↓ 2 callersFunctiondeleteRegionDisk
(ctx context.Context, projectId, region, diskName string)
compute/snapshots/snapshots_test.go:102
↓ 2 callersFunctiondeleteSecurityMarks
deleteSecurityMarks deletes security marks "key_a" and "key_b" from assetName's marks. assetName is the resource path for an asset.
securitycenter/securitymarksv2/delete_security_marks.go:30
↓ 2 callersFunctiondeleteSecurityMarks
deleteSecurityMarks deletes security marks "key_a" and "key_b" from assetName's marks. assetName is the resource path for an asset.
securitycenter/assets/delete_security_marks.go:30
↓ 2 callersFunctiondeleteSnapshot
deleteSnapshot deletes a snapshot of a disk.
compute/snapshots/delete_snapshot.go:28
↓ 2 callersFunctiondeleteStoredInfoTypeAfterTest
(t *testing.T, name string)
dlp/snippets/metadata/metadata_test.go:37
↓ 2 callersFunctiondeleteTaxonomy
deleteTaxonomy removes an existing taxonomy resource.
datacatalog/snippets/policytagmanager/delete_taxonomy.go:27
↓ 2 callersFunctiondeleteTestKey
Deactivate and delete the given key. Should operate as a teardown method.
storage/s3_sdk/s3_gcs_test.go:83
↓ 2 callersFunctiondetectText
detectText detects the text in an image using the Google Vision API.
functions/ocr/app/detect.go:31
↓ 2 callersFunctiondetectText
detectText detects the text in an image using the Google Vision API.
functions/functionsv2/ocr/app/detect.go:31
↓ 2 callersFunctiondisableCa
Disable a Certificate Authority from the specified CA pool.
privateca/disable_ca.go:28
↓ 2 callersFunctiondisableTestFinding
(ctx context.Context, client *securitycenter.Client, findingName string)
securitycenter/findingsv2/findings_test.go:82
↓ 2 callersFunctiondownloadProfiles
This function reads profiles for a given project and stores them into locally created files. The profile metadata gets stored into a 'metdata.csv' fil
profiler/export/main.go:48
↓ 2 callersFunctionenableCa
Enable the Certificate Authority present in the given ca pool. CA cannot be enabled if it has been already deleted.
privateca/enable_ca.go:29
↓ 2 callersFunctionenableUniformBucketLevelAccess
enableUniformBucketLevelAccess sets uniform bucket-level access to true.
storage/buckets/enable_uniform_bucket_level_access.go:28
↓ 2 callersFunctionensureDefaultImageRepo
ensureDefaultImageRepo creates a default docker repo in the given project and location if it does not already exist.
internal/cloudrunci/cloudrunci.go:578
↓ 2 callersFunctionexecuteWorkflow
Execute a workflow and print the execution results. For more information about Workflows see: https://cloud.google.com/workflows/docs/overview
workflows/executions/execute_workflow.go:31
↓ 2 callersFunctionextractCustomModuleID
extractCustomModuleID extracts the custom module ID from the full name
securitycenter/management_api/security_health_analytics_custom_module_test.go:190
↓ 2 callersFunctionextractCustomModuleID
extractCustomModuleID extracts the custom module ID from the full name
securitycenter/management_api/event_threat_detection/event_threat_detection_custom_module_test.go:148
↓ 2 callersFunctionfile_sample_data_proto_rawDescGZIP
()
bigquery/snippets/managedwriter/exampleproto/sample_data.pb.go:325
↓ 2 callersFunctionfile_singer_proto_rawDescGZIP
()
spanner/spanner_snippets/spanner/testdata/protos/singer.pb.go:194
↓ 2 callersFunctionfindHighSeverityVulnerabilitiesForImage
findHighSeverityVulnerabilitiesForImage retrieves a list of only high vulnerability occurrences associated with a resource.
container_registry/container_analysis/filter_vulnerability_occurrences.go:29
↓ 2 callersFunctionfindVulnerabilityOccurrencesForImage
findVulnerabilityOccurrencesForImage retrieves all vulnerability Occurrences associated with a resource.
container_registry/container_analysis/vulnerability_occurrences_for_image.go:29
↓ 2 callersFunctionformatSlackMessage
(query string, response *kgsearch.SearchResponse)
functions/functionsv2/slack/format.go:47
↓ 2 callersFunctionformatSlackMessage
(query string, response *kgsearch.SearchResponse)
functions/slack/format.go:25
↓ 2 callersFunctionformatWithCommas
(n int64)
spanner/spanner_leaderboard/leaderboard.go:271
↓ 2 callersFunctiongcloudExec
gcloudExec adds output prefixing to the execution of the provided command.
internal/cloudrunci/gcloud.go:82
↓ 2 callersFunctiongcloudWithoutRetry
gcloudWithoutRetry provides a common mechanism for executing gcloud commands.
internal/cloudrunci/gcloud.go:77
↓ 2 callersFunctiongenPublicKey
Helper function to generate RSA public key
privateca/privateca_test.go:169
↓ 2 callersFunctiongenerateCannyCtrlTypeWithTextMock
(w io.Writer, outputGCSURI string)
genai/image_generation/image_generation_examples_test.go:122
↓ 2 callersFunctiongenerateRawReferWithTextMock
(w io.Writer, outputGCSURI string)
genai/image_generation/image_generation_examples_test.go:347
↓ 2 callersFunctiongenerateScribbleCtrlTypeWithTextMock
(w io.Writer, outputGCSURI string)
genai/image_generation/image_generation_examples_test.go:194
↓ 2 callersFunctiongenerateStyleRefWithTextMock
(w io.Writer, outputGCSURI string)
genai/image_generation/image_generation_examples_test.go:53
↓ 2 callersFunctiongenerateSubjRefCtrlReferWithTextMock
(w io.Writer, outputGCSURI string)
genai/image_generation/image_generation_examples_test.go:267
↓ 2 callersFunctiongenerateTableCTAS
generateTableCTAS creates a quick table by issuing a CREATE TABLE AS SELECT query.
bigquery/snippets/job/integration_test.go:200
↓ 2 callersFunctiongenerateWorkflowID
generateWorkflowID creates a random string to assign as a Workflow ID.
workflows/executions/test_functions.go:122
↓ 2 callersFunctiongetAll
(ctx context.Context, client *firestore.Client, projectID string)
getting-started/background/translate_test.go:130
↓ 2 callersFunctiongetCompany
getCompany gets an existing company by its resource name.
jobs/v4/howto/get_company_sample.go:28
↓ 2 callersFunctiongetDB
getDB lazily instantiates a database connection pool. Users of Cloud Run or Cloud Functions may wish to skip this lazy instantiation and connect as so
cloudsql/sqlserver/database-sql/cloudsql.go:42
↓ 2 callersFunctiongetDB
getDB lazily instantiates a database connection pool. Users of Cloud Run or Cloud Functions may wish to skip this lazy instantiation and connect as so
cloudsql/postgres/database-sql/cloudsql.go:42
↓ 2 callersFunctiongetDB
getDB lazily instantiates a database connection pool. Users of Cloud Run or Cloud Functions may wish to skip this lazy instantiation and connect as so
cloudsql/mysql/database-sql/cloudsql.go:42
↓ 2 callersFunctiongetDefaultEventBasedHold
getDefaultEventBasedHold gets default event-based hold state.
storage/buckets/get_default_event_based_hold.go:28
↓ 2 callersFunctiongetDeleteProtection
getDeleteProtection prints the state of delete protection flag of given instance.
compute/instances/preventing-accidental-vm-deletion/get_delete_protection.go:28
↓ 2 callersFunctiongetEntries
(projectID string)
logging/simplelog/list_log_entries.go:30
↓ 2 callersFunctiongetFHIRResource
getFHIRResource gets an FHIR resource.
healthcare/fhir_resource_get.go:27
↓ 2 callersFunctiongetHealthStr
(enabled, healthy bool)
run/service-health/main.go:281
↓ 2 callersFunctiongetJobTemplate
getJobTemplate gets a previously-created job template. See https://cloud.google.com/transcoder/docs/how-to/job-templates#get_job_template for more inf
media/transcoder/get_job_template.go:30
↓ 2 callersFunctiongetMuteRule
getMuteRule retrieves a mute configuration given its resource name.
securitycenter/muteconfig/get_mute_rule.go:28
↓ 2 callersFunctiongetMuteRule
getMuteRule retrieves a mute configuration given its resource name.
securitycenter/muteconfigv2/get_mute_rule.go:28
↓ 2 callersFunctiongetNote
getNote retrieves and prints a specified Note from the server.
container_registry/container_analysis/get_note.go:28
↓ 2 callersFunctiongetObjectContexts
getObjectContexts gets an object's contexts.
storage/objects/get_object_contexts.go:28
↓ 2 callersFunctiongetOccurrence
getOccurrence retrieves and prints a specified Occurrence from the server.
container_registry/container_analysis/get_occurrence.go:28
↓ 2 callersFunctiongetOccurrencesForImage
getOccurrencesForImage retrieves all the Occurrences associated with a specified image. Here, all Occurrences are simply printed and counted.
container_registry/container_analysis/occurrences_for_image.go:31
↓ 2 callersFunctiongetOccurrencesForNote
getOccurrencesForNote retrieves all the Occurrences associated with a specified Note. Here, all Occurrences are printed and counted.
container_registry/container_analysis/occurrences_for_note.go:31
↓ 2 callersFunctiongetPlayURI
Get the playURI first. The last line of the response will contain a renditions location. Return the renditions.
media/videostitcher/stitcher_test.go:278
↓ 2 callersFunctiongetReferenceImage
getReferenceImage gets a reference image.
vision/product_search/get_reference_image.go:30
↓ 2 callersFunctiongetReservation
Get certain reservation for given project and zone
compute/reservations/get_reservation.go:28
↓ 2 callersFunctiongetSimilarProducts
getSimilarProducts searches for products from a product set similar to products in an image file.
vision/product_search/get_similar_products.go:31
↓ 2 callersFunctiongetSimilarProductsURI
getSimilarProductsURI searches for products from a product set similar to products in an image file on GCS.
vision/product_search/get_similar_products_uri.go:30
↓ 2 callersFunctiongetTemplate
(project, templateName string)
compute/reservations/reservations_test.go:69
↓ 2 callersFunctiongetUniformBucketLevelAccess
getUniformBucketLevelAccess gets uniform bucket-level access.
storage/buckets/get_uniform_bucket_level_access.go:28
↓ 2 callersFunctiongrantAccessToResource
grantAccessToResource creates a new ACL conceding the VIEWER role to the group "example-analyst-group@google.com" For more information on the types of
bigquery/bigquery_access_quickstart/grant_access_table_or_view.go:30
↓ 2 callersFunctiongrantSTSPermissions
(bucketName string, str *storage.Client)
storagetransfer/storagetransfer_test.go:532
↓ 2 callersFunctiongrpcRequest
grpcRequest takes a callback to issue a gRPC request. The returned interface{} can be coerced into the expected *pb.Response.
run/testing/grpc_ping.e2e_test.go:116
↓ 2 callersFunctionguestbookKey
(ctx context.Context)
docs/appengine/datastore/consistency/consistency.go:27
↓ 2 callersFunctionhandleHTTP
handleHTTP handles the http HandlerFunc on the specified route, and uses otelhttp for context propagation, trace instrumentation, and metric instrumen
opentelemetry/instrumentation/app/server.go:69
↓ 2 callersFunctionimprovedHandler
[END cloudrun_broken_service]
run/hello-broken/main.go:63
↓ 2 callersMethodincrementCounter
[END firestore_solution_sharded_counter_create] [START firestore_solution_sharded_counter_increment] incrementCounter increments a randomly picked sha
firestore/solution_counters.go:65
↓ 2 callersMethodindex
[END getting_started_sessions_main] [START getting_started_sessions_handler] index uses sessions to assign users a random greeting and keep track of v
getting-started/sessions/main.go:105
← previousnext →501–600 of 5,023, ranked by callers