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
↓ 12 callers
Function
getProduct
getProduct gets a product.
vision/product_search/get_product.go:30
↓ 12 callers
Function
makeRange
(start, end, step int)
compute/instances/custom-machine-type/helper_class.go:41
↓ 11 callers
Method
Token
()
auth/downscoping/token_consumer.go:42
↓ 11 callers
Method
appErrorf
(r *http.Request, err error, format string, v ...interface{})
getting-started/bookshelf/main.go:327
↓ 11 callers
Function
deleteDisk
deleteDisk deletes a disk from a project.
compute/disks/delete_disk.go:28
↓ 11 callers
Function
deleteJob
deleteJob deletes a previously-created job. See https://cloud.google.com/transcoder/docs/how-to/jobs#delete_jobs for more information.
media/transcoder/delete_job.go:30
↓ 11 callers
Function
deleteRegionalDisk
deleteRegionalDisk permanently deletes a regional disk.
compute/disks/delete_regional_disk.go:28
↓ 11 callers
Function
getJobState
getJobState gets the state for a previously-created job. See https://cloud.google.com/transcoder/docs/how-to/jobs#check_job_status for more informatio
media/transcoder/get_job_state.go:30
↓ 11 callers
Function
testRegionalSecretVersion
(tb testing.TB, parent string, payload []byte)
secretmanager/secretmanager_test.go:188
↓ 11 callers
Function
testSecretVersion
(tb testing.TB, parent string, payload []byte)
secretmanager/secretmanager_test.go:171
↓ 10 callers
Method
EditImage
( ctx context.Context, model string, prompt string, referenceImages []genai.ReferenceImage, config *genai
genai/image_generation/image_generation_examples_test.go:100
↓ 10 callers
Method
Reset
()
profiler/shakesapp/shakesapp/shakesapp.pb.go:76
↓ 10 callers
Function
createTestVodConfig
(vodConfigID string, t *testing.T)
media/videostitcher/stitcher_test.go:357
↓ 10 callers
Function
createTopic
(ctx context.Context, client *pubsub.Client, topicName string)
pubsub/topics/topics_test.go:438
↓ 10 callers
Function
deleteDataset
deleteDataset deletes the given dataset.
healthcare/dataset_delete.go:27
↓ 10 callers
Function
deleteInstance
(ctx context.Context, projectId, zone, instanceName string)
compute/instances/create-start-instance/utils_test.go:24
↓ 10 callers
Function
deleteTestVodConfig
(vodConfigName string, t *testing.T)
media/videostitcher/stitcher_test.go:386
↓ 10 callers
Function
getJob
getJob gets a previously-created job. See https://cloud.google.com/transcoder/docs/how-to/jobs#check_job_status for more information.
media/transcoder/get_job.go:29
↓ 10 callers
Function
setup
Run before each test. Creates a set of useful variables
container_registry/container_analysis/samples_test.go:46
↓ 10 callers
Function
teardown
Run after each test Removes any unneeded resources allocated for test
container_registry/container_analysis/samples_test.go:75
↓ 10 callers
Function
testCleanupParameterVersion
testCleanupParameterVersion deletes the specified parameter version in the GCP project. It fails the test if the parameter version deletion fails.
parametermanager/parametermanager_test.go:162
↓ 10 callers
Function
testCleanupParameterVersion
testCleanupParameterVersion deletes the specified parameter version in the GCP project. It fails the test if the parameter version deletion fails.
parametermanager/regional_samples/regional_parametermanager_test.go:189
↓ 10 callers
Function
testLocation
(tb testing.TB)
secretmanager/regional_samples/regional_secretmanager_test.go:41
↓ 10 callers
Function
testModelArmorTemplate
testModelArmorTemplate creates a new Model Armor template with default filter settings for use in integration tests. Returns the created template.
modelarmor/modelarmor_test.go:146
↓ 9 callers
Method
Get
()
healthcare/dicomweb_study_search.go:32
↓ 9 callers
Method
Get
Get performs a GET request to a given path.
getting-started/bookshelf/internal/webtest/webtest.go:79
↓ 9 callers
Method
NewRequest
NewRequest creates a new http.Request for the deployed service.
internal/cloudrunci/cloudrunci.go:223
↓ 9 callers
Method
Recv
()
run/grpc-server-streaming/pkg/api/v1/timeservice.pb.go:170
↓ 9 callers
Function
createProduct
createProduct creates a product.
vision/product_search/create_product.go:30
↓ 9 callers
Function
getUUID64
()
media/videostitcher/stitcher_test.go:266
↓ 9 callers
Function
testCleanup
testCleanup is used for cleaning the dataset and its content once test is done
bigquery/bigquery_access_quickstart/test_functions.go:48
↓ 9 callers
Function
testClient
testClient creates a BigQuery client in order to avoid repeatedly creating customers in the common way
bigquery/bigquery_access_quickstart/test_functions.go:33
↓ 9 callers
Function
testPrefix
testPrefix creates a prefix that serves as an identifier when creating a resource in order to isolate possible conflicts in concurrent tests.
bigquery/bigquery_access_quickstart/test_functions.go:28
↓ 8 callers
Method
Get
Get issues a GET request against the base URL of the deployed application.
internal/aeintegrate/aeintegrate.go:101
↓ 8 callers
Method
Predict
(ctx context.Context, req *aiplatformpb.PredictRequest, opts ...gax.CallOption)
vertexai/gemma2/gemma2_test.go:62
↓ 8 callers
Method
Request
Request issues an HTTP request to the deployed service.
internal/cloudrunci/cloudrunci.go:214
↓ 8 callers
Method
ServeHTTP
(w http.ResponseWriter, r *http.Request)
bigtable/usercounter/main.go:174
↓ 8 callers
Method
Validate
()
internal/cloudrunci/platform.go:27
↓ 8 callers
Method
Version
revision returns the revision that the service will be deployed to. NOTE: Until traffic splitting is available, this will be used as the service name.
internal/cloudrunci/cloudrunci.go:300
↓ 8 callers
Function
calculateImageHash
(filename string)
dlp/snippets/redact/redact_test.go:24
↓ 8 callers
Function
createRegionalDisk
createRegionalDisk creates a new empty regional disk
compute/disks/create_regional.go:29
↓ 8 callers
Function
deleteIPAddress
(ctx context.Context, projectID, region, addressName string)
compute/address/address_test.go:208
↓ 8 callers
Function
deleteInput
deleteInput deletes a previously-created input endpoint.
media/livestream/delete_input.go:28
↓ 8 callers
Function
deleteReservation
Deletes the reservation for given project and zone
compute/reservations/delete_reservation.go:28
↓ 8 callers
Function
deleteTestCDNKey
(CDNKeyName string, t *testing.T)
media/videostitcher/stitcher_test.go:504
↓ 8 callers
Function
getRandomSharedModule
()
securitycenter/management_api/event_threat_detection/event_threat_detection_custom_module_test.go:123
↓ 8 callers
Function
jobSucceeded
(projectID, region, jobName string)
batch/testutils.go:26
↓ 8 callers
Function
listProductsInProductSet
listProductsInProductSet lists products in a product set.
vision/product_search/list_products_in_product_set.go:31
↓ 8 callers
Function
mustRunSample
(t *testing.T, f sampleFuncWithContext, dbName, errMsg string)
spanner/spanner_snippets/spanner/integration_test.go:1512
↓ 8 callers
Function
printRow
[END bigtable_reads_filter] [START bigtable_reads_print]
bigtable/reads/reads.go:263
↓ 8 callers
Function
pubsubTopic
(t *testing.T)
securitycenter/notificationsv2/notifications_test.go:49
↓ 8 callers
Function
sanitizeUserPrompt
sanitizeUserPrompt sanitizes a user prompt based on the project, location, and template settings. w io.Writer: The writer to use for logging. project
modelarmor/sanitize_user_prompt.go:38
↓ 8 callers
Function
setup
(t *testing.T)
securitycenter/assets/assets_test.go:154
↓ 8 callers
Function
testCleanupRegionalSecret
(tb testing.TB, name string)
secretmanager/regional_samples/regional_secretmanager_test.go:105
↓ 8 callers
Function
uploadFile
uploadFile uploads an object.
storage/objects/upload_file.go:29
↓ 7 callers
Function
TestBucket
TestBucket creates a new bucket with the given prefix and registers a cleanup function to delete the bucket and any objects it contains when the test
internal/testutil/storage_cleaner.go:33
↓ 7 callers
Function
createKey
(t *testing.T, projectID, keyFileName string)
dlp/snippets/deid/deid_test.go:115
↓ 7 callers
Function
createKeyRing
(t *testing.T, projectID string)
dlp/snippets/deid/deid_test.go:86
↓ 7 callers
Function
createTestLiveConfig
(slateID, liveConfigID string, t *testing.T)
media/videostitcher/stitcher_test.go:409
↓ 7 callers
Function
deleteOccurrence
deleteOccurrence removes an existing Occurrence from the server.
container_registry/container_analysis/delete_occurrence.go:28
↓ 7 callers
Function
deleteTestKey
Deactivate and delete the given key. Should operate as a teardown method.
storage/service_account/hmac/hmac_test.go:231
↓ 7 callers
Function
deleteTestLiveConfig
(liveConfigName string, t *testing.T)
media/videostitcher/stitcher_test.go:441
↓ 7 callers
Function
destroyKey
(t *testing.T, projectID, key string)
dlp/snippets/deid/deid_test.go:160
↓ 7 callers
Function
getOrCreateSub
getOrCreateSub gets a subscription or creates it if it doesn't exist.
pubsub/v1samples/subscriptions/subscription_test.go:1100
↓ 7 callers
Function
getSampleProjectId
(t *testing.T)
spanner/spanner_snippets/spanner/integration_test.go:1714
↓ 7 callers
Function
orgID
(t *testing.T)
securitycenter/notifications/notifications_test.go:32
↓ 7 callers
Function
sanitizeModelResponse
sanitizeModelResponse method sanitizes a model response based on the project, location, and template settings. w io.Writer: The writer to use for log
modelarmor/sanitize_model_response.go:39
↓ 7 callers
Function
setup
setup initializes variables in this file with entityNames to use for testing.
securitycenter/bigqueryv2/bigquery_test.go:36
↓ 7 callers
Function
testAllFilterTemplate
testAllFilterTemplate creates a new ModelArmor template with all filters enabled. It returns the template ID and filter config for cleanup.
modelarmor/modelarmor_test.go:195
↓ 7 callers
Function
testParameterVersion
testParameterVersion creates a version of a parameter with the given payload in the specified GCP project. It returns the created parameter version an
parametermanager/parametermanager_test.go:107
↓ 7 callers
Function
testParameterVersion
testParameterVersion creates a version of a parameter with the given payload in the specified GCP project. It returns the created parameter version an
parametermanager/regional_samples/regional_parametermanager_test.go:129
↓ 7 callers
Function
testRegionalClient
(tb testing.TB)
secretmanager/regional_samples/regional_secretmanager_test.go:52
↓ 6 callers
Method
Build
Build builds a container image if one has not already been built. If service.Image is specified and this is directly called, it could overwrite an exi
internal/cloudrunci/cloudrunci.go:333
↓ 6 callers
Method
CreateKeyRing
CreateKeyRing creates a new key ring and returns the full resource name.
kms/kms_helpers_test.go:175
↓ 6 callers
Function
DeleteExpiredBuckets
DeleteExpiredBuckets deletes old testing buckets that weren't cleaned previously.
internal/testutil/storage_cleaner.go:139
↓ 6 callers
Function
MustCreateTopic
MustCreateTopic creates a Pub/Sub Lite topic and fails the test if unsuccessful.
pubsublite/internal/psltest/util.go:95
↓ 6 callers
Method
ParsedURL
ParsedURL retrieves the parsed URL of the service. This URL is stored on the service struct for repeated retrieval.
internal/cloudrunci/cloudrunci.go:259
↓ 6 callers
Method
SendMessage
Send a message to a user
getting-started/devflowapp/services/services.go:33
↓ 6 callers
Method
Variable
Variable retrieves an environment variable assignment as a string.
internal/cloudrunci/envvars.go:39
↓ 6 callers
Function
createConsistencyGroup
createConsistencyGroup creates a new consistency group for a project in a given region.
compute/disks/consistency_group_create.go:29
↓ 6 callers
Function
createNotificationConfig
(w io.Writer, orgID string, pubsubTopic string, notificationConfigID string)
securitycenter/notificationsv2/create_notification_config.go:27
↓ 6 callers
Function
createOccurrence
createsOccurrence creates and returns a new Occurrence of a previously created vulnerability Note.
container_registry/container_analysis/create_occurrence.go:28
↓ 6 callers
Function
createSubscription
createSubscription creates a subscription it if it doesn't exist.
pubsub/subscriptions/subscription_test.go:666
↓ 6 callers
Function
deleteChannel
deleteChannel deletes a previously-created channel.
media/livestream/delete_channel.go:28
↓ 6 callers
Function
deleteConsistencyGroup
deleteConsistencyGroup deletes consistency group for a project in a given region.
compute/disks/consistency_group_delete.go:28
↓ 6 callers
Function
deleteInstance
(ctx context.Context, projectId, zone, instanceName string)
compute/instances/custom-machine-type/custom_machine_type_test.go:31
↓ 6 callers
Function
deleteNotificationConfig
(w io.Writer, orgID string, notificationConfigID string)
securitycenter/notificationsv2/delete_notification_config.go:27
↓ 6 callers
Function
disableFloorSettings
disableFloorSettings disables floor setting enforcement. It sends an update request to Model Armor to turn off enforcement using the given floorSettin
modelarmor/modelarmor_test.go:70
↓ 6 callers
Function
getDataset
getDataset gets a dataset.
healthcare/dataset_get.go:27
↓ 6 callers
Function
getInstance
( ctx context.Context, projectID, zone, instanceName string, )
compute/instances/custom-machine-type/custom_machine_type_test.go:50
↓ 6 callers
Function
getProductSet
getProductSet gets a product set.
vision/product_search/get_product_set.go:30
↓ 6 callers
Function
getRandomSharedModule
()
securitycenter/management_api/security_health_analytics_custom_module_test.go:165
↓ 6 callers
Function
listIPAddresses
(ctx context.Context, projectID, region string)
compute/address/address_test.go:137
↓ 6 callers
Function
listJobs
listJobs lists jobs matching the given optional filter and optional jobType.
dlp/snippets/jobs/list.go:29
↓ 6 callers
Function
listProducts
listProducts lists products.
vision/product_search/list_products.go:31
↓ 6 callers
Function
processItem
(depth int)
profiler/hotmid/main.go:66
↓ 6 callers
Function
publishMsgs
(ctx context.Context, t *pubsub.Topic, numMsgs int)
pubsub/v1samples/subscriptions/subscription_test.go:1063
↓ 6 callers
Function
setupAdmin
(t *testing.T)
pubsublite/admin/pubsublite_admin_test.go:51
↓ 6 callers
Function
testClient
testClient initializes and returns a new Model Armor API client and context targeting the endpoint based on the specified location.
modelarmor/modelarmor_test.go:128
↓ 6 callers
Function
writeTestGCSFile
writeTestGCSFile deletes the GCS test bucket and uploads a test video file to it.
media/transcoder/transcoder_test.go:205
← previous
next →
101–200 of 5,023, ranked by callers