MCPcopy Create free account

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

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

↓ 7,602 callersMethodErrorf
Errorf is equivalent to Logf followed by Fail.
internal/testutil/retry.go:93
↓ 1,942 callersMethodClose
()
vertexai/gemma2/gemma2_test.go:61
↓ 829 callersFunctionSystemTest
SystemTest gets the test context. The test is skipped if the GOLANG_SAMPLES_PROJECT_ID environment variable is not set.
internal/testutil/testutil.go:56
↓ 799 callersMethodString
String renders an entry structure to the JSON format expected by Cloud Logging.
run/logging-manual/main.go:67
↓ 737 callersMethodRun
Run executes runs the built binary until terminated or timeout has been reached, and indicates successful execution on return. You can supply extra a
internal/testutil/runmain.go:76
↓ 632 callersMethodString
Srring returns the custom machine type in form of a string acceptable by Compute Engine API.
compute/instances/custom-machine-type/helper_class.go:128
↓ 544 callersMethodReset
()
run/grpc-ping/pkg/api/v1/message.pb.go:77
↓ 472 callersMethodError
()
functions/slack/search.go:40
↓ 463 callersFunctionRetry
Retry runs function f for up to maxAttempts times until f returns successfully, and reports whether f was run successfully. It will sleep for the give
internal/testutil/retry.go:30
↓ 345 callersMethodString
()
spanner/spanner_snippets/spanner/testdata/protos/singer.pb.go:70
↓ 258 callersMethodClose
()
compute/reservations/mock_shared_project.go:28
↓ 240 callersMethodGetName
()
internal/pubsub/schemas/us-states.pb.go:84
↓ 231 callersFunctionassertContains
(t *testing.T, out string, sub string)
spanner/spanner_snippets/spanner/integration_test.go:1741
↓ 224 callersMethodGet
(projID string)
testing/gimmeproj/main.go:56
↓ 217 callersMethodDo
Do executes the provided http.Request using the default http client
internal/cloudrunci/cloudrunci.go:177
↓ 203 callersMethodDelete
(context.Context, *computepb.DeleteReservationRequest, ...gax.CallOption)
compute/reservations/mock_shared_project.go:29
↓ 197 callersMethodExecute
Execute writes the template using the provided data.
getting-started/bookshelf/template.go:46
↓ 186 callersMethodString
()
profiler/shakesapp/shakesapp/shakesapp.pb.go:77
↓ 144 callersFunctionrunSample
(t *testing.T, f sampleFunc, dbName, errMsg string)
spanner/spanner_snippets/spanner/integration_test.go:1422
↓ 131 callersMethodCreate
Creates the Cloud Run job, but does not start it. If an image has not been specified or previously built, it will call Build.
internal/cloudrunci/cloudrunjobs.go:120
↓ 129 callersMethodAdd
(proj string)
testing/gimmeproj/main.go:66
↓ 108 callersMethodInsert
(context.Context, *computepb.InsertReservationRequest, ...gax.CallOption)
compute/reservations/mock_shared_project.go:30
↓ 98 callersMethodString
()
bigquery/snippets/managedwriter/exampleproto/sample_data.pb.go:133
↓ 90 callersMethodNewRequest
(method, url string)
internal/cloudrunci/platform.go:28
↓ 80 callersMethodLogf
Logf formats its arguments and records it in the error log. The text is only printed for the final unsuccessful run or the first successful run.
internal/testutil/retry.go:100
↓ 73 callersMethodCleanup
Cleanup deletes any resources
kms/kms_helpers_test.go:100
↓ 62 callersMethodGenerateContent
(ctx context.Context, model string, contents []*genai.Content, cfg *genai.GenerateContentConfig)
genai/express_mode/expressmode_with_api_key_test.go:27
↓ 61 callersMethodCreateTopic
(ctx context.Context, req *managedkafkapb.CreateTopicRequest)
internal/managedkafka/fake/fake.go:125
↓ 57 callersMethodString
()
appengine/go11x/pubsub/authenicated_push/main_test.go:136
↓ 49 callersFunctionmustGetenv
(k string)
appengine_flexible/pubsub/pubsub.go:85
↓ 47 callersFunctioncleanup
cleanup function deletes all documents inside a collection
getting-started/sessions/main_test.go:68
↓ 44 callersFunctionEndToEndTest
EndToEndTest gets the test context, and sets the test as Parallel. The test is skipped if the GOLANG_SAMPLES_E2E_TEST environment variable is not set.
internal/testutil/testutil.go:69
↓ 42 callersFunctionCreateTestBucket
CreateTestBucket creates a new bucket with the given prefix and registers a cleanup function to delete the bucket and any objects it contains. It is e
internal/testutil/storage_cleaner.go:47
↓ 41 callersFunctiontestLocation
testLocation retrieves the GOLANG_SAMPLES_LOCATION environment variable used to determine the region for running the test. Skip the test if the enviro
modelarmor/modelarmor_test.go:43
↓ 34 callersMethodName
()
internal/cloudrunci/platform.go:25
↓ 34 callersFunctionUniqueBQName
UniqueBQName returns a more unique name for a BigQuery resource.
bigquery/snippets/bqtestutil/bqtestutil.go:27
↓ 34 callersFunctionrandomID
()
spanner/spanner_snippets/spanner/integration_test.go:1811
↓ 33 callersFunctiongetUUID
()
media/videostitcher/stitcher_test.go:256
↓ 32 callersFunctionBuildMain
BuildMain builds the main package in the current working directory. If it doesn't build, t.Fatal is called. Test methods calling BuildMain should run
internal/testutil/runmain.go:31
↓ 32 callersFunctiontestCleanupSecret
(tb testing.TB, name string)
secretmanager/secretmanager_test.go:205
↓ 31 callersMethodBuilt
Built reports whether the build was successful.
internal/testutil/runmain.go:62
↓ 31 callersMethodReset
()
spanner/spanner_snippets/spanner/testdata/protos/singer.pb.go:102
↓ 30 callersMethodString
()
internal/cloudrunci/envvars.go:27
↓ 29 callersFunctiontestCleanupTemplate
testCleanupTemplate deletes the specified Model Armor template if it exists, ignoring the error if the template is already deleted.
modelarmor/modelarmor_test.go:180
↓ 28 callersFunctiontestLocation
testLocation retrieves the location for testing purposes from the environment variable GOLANG_REGIONAL_SAMPLES_LOCATION. If the environment variable i
parametermanager/regional_samples/regional_parametermanager_test.go:54
↓ 26 callersFunctiontestSecret
(tb testing.TB, projectID string)
secretmanager/secretmanager_test.go:115
↓ 25 callersFunctioninitTest
(t *testing.T, id string)
spanner/spanner_snippets/spanner/integration_test.go:58
↓ 24 callersFunctionDeleteBucketIfExists
DeleteBucketIfExists deletes a bucket and all its objects.
internal/testutil/storage_cleaner.go:65
↓ 24 callersFunctionNewService
NewService creates a new Service based on the name and projectID provided. It will default to the ManagedPlatform in region us-central1, and build a c
internal/cloudrunci/cloudrunci.go:121
↓ 22 callersMethodSend
(ctx context.Context, in *Request, opts ...grpc.CallOption)
run/grpc-ping/pkg/api/v1/message.pb.go:202
↓ 22 callersFunctionUniqueBucketName
UniqueBucketName returns a unique name with the test prefix.
internal/testutil/storage_cleaner.go:134
↓ 22 callersFunctiontestCleanupRegionalSecret
(tb testing.TB, name string)
secretmanager/secretmanager_test.go:219
↓ 22 callersFunctiontestLocation
(tb testing.TB)
secretmanager/secretmanager_test.go:42
↓ 21 callersFunctiondeleteProduct
deleteProduct deletes a product.
vision/product_search/delete_product.go:30
↓ 21 callersFunctiongetOrCreateTopic
getOrCreateTopic gets a topic or creates it if it doesn't exist.
pubsub/v1samples/subscriptions/subscription_test.go:1081
↓ 21 callersFunctiontestRegionalSecret
(tb testing.TB, projectID string)
secretmanager/secretmanager_test.go:145
↓ 20 callersMethodDeploy
Deploy deploys the service to Cloud Run. If an image has not been specified or previously built, it will call Build. If the deployment fails, it tries
internal/cloudrunci/cloudrunci.go:307
↓ 20 callersFunctionsetup
(t *testing.T)
pubsub/v1samples/subscriptions/subscription_test.go:58
↓ 19 callersFunctiontestClient
(tb testing.TB)
secretmanager/secretmanager_test.go:53
↓ 18 callersFunctioncreateTopic
createTopic creates a topic if it doesn't exist.
pubsub/subscriptions/subscription_test.go:655
↓ 18 callersFunctiongetProjectID
(t *testing.T)
firestore/main_test.go:26
↓ 18 callersFunctionsetup
(t *testing.T)
pubsub/subscriptions/subscription_test.go:58
↓ 18 callersFunctiontestCleanupParameter
testCleanupParameter deletes the specified parameter in the GCP project. It fails the test if the parameter deletion fails.
parametermanager/parametermanager_test.go:139
↓ 18 callersFunctiontestCleanupParameter
testCleanupParameter deletes the specified parameter in the GCP project. It fails the test if the parameter deletion fails.
parametermanager/regional_samples/regional_parametermanager_test.go:163
↓ 17 callersFunctionContextMain
ContextMain gets a test context from a TestMain function. Useful for initializing global variables before running parallel system tests. ok is false i
internal/testutil/testutil.go:44
↓ 17 callersMethodRandomID
RandomID returns a random UUID, useful for testing when values need to be unique.
kms/kms_helpers_test.go:166
↓ 17 callersFunctionreadWithFilter
[END bigtable_filters_composing_condition] [START bigtable_filters_print]
bigtable/filters/filters.go:161
↓ 16 callersMethodClean
Clean deletes the created Cloud Run service.
internal/cloudrunci/cloudrunci.go:358
↓ 16 callersMethodReset
()
bigquery/snippets/managedwriter/exampleproto/sample_data.pb.go:124
↓ 16 callersFunctionrunSampleWithContext
(ctx context.Context, t *testing.T, f sampleFuncWithContext, dbName, errMsg string)
spanner/spanner_snippets/spanner/integration_test.go:1430
↓ 16 callersFunctionsetup
(t *testing.T)
securitycenter/findings/findings_test.go:97
↓ 15 callersMethodCleanup
Cleanup deletes any resources.
securitycenter/muteconfig/mute_config_test.go:177
↓ 15 callersFunctionorgID
(t *testing.T)
securitycenter/notificationsv2/notifications_test.go:31
↓ 14 callersMethodPath
(p ...string)
internal/testutil/testutil.go:36
↓ 14 callersMethodString
()
endpoints/getting-started-grpc/helloworld/helloworld.pb.go:58
↓ 14 callersFunctionf
(ctx context.Context)
docs/appengine/taskqueue/taskqueue.go:27
↓ 14 callersFunctionparseTime
(rfc3339Time string)
spanner/spanner_snippets/spanner/spanner_insert_graph_data.go:27
↓ 14 callersFunctionsetup
(t *testing.T)
pubsub/v1samples/topics/topics_test.go:51
↓ 14 callersFunctionsetup
(t *testing.T)
securitycenter/findingsv2/findings_test.go:175
↓ 14 callersFunctiontestName
testName generates a unique name for testing purposes by creating a new UUID. It returns the UUID as a string or fails the test if UUID generation fai
parametermanager/parametermanager_test.go:38
↓ 14 callersFunctiontestName
testName generates a unique name for testing purposes by creating a new UUID. It returns the UUID as a string or fails the test if UUID generation fai
parametermanager/regional_samples/regional_parametermanager_test.go:41
↓ 14 callersFunctiontestRegionalClient
(tb testing.TB)
secretmanager/secretmanager_test.go:64
↓ 13 callersMethodDeleteTopic
(ctx context.Context, req *managedkafkapb.DeleteTopicRequest)
internal/managedkafka/fake/fake.go:129
↓ 13 callersMethodFail
Fail marks the run as failed, and will retry once the function returns.
internal/testutil/retry.go:88
↓ 13 callersFunctionbodyContains
(t *testing.T, wt *webtest.W, path, contains string)
getting-started/bookshelf/main_test.go:242
↓ 13 callersFunctiondeleteJob
Deletes the specified job
batch/delete_job.go:28
↓ 13 callersFunctionerrorf
[END endpoints_auth_info_backend] errorf writes a swagger-compliant error response.
endpoints/getting-started/app.go:111
↓ 13 callersFunctionsetup
(t *testing.T)
pubsub/topics/topics_test.go:53
↓ 13 callersFunctiontestParameter
testParameter creates a parameter in the specified GCP project with the given format. It returns the created parameter and its ID or fails the test if
parametermanager/parametermanager_test.go:50
↓ 13 callersFunctiontestParameter
testParameter creates a parameter in the specified GCP project with the given format. It returns the created parameter and its ID or fails the test if
parametermanager/regional_samples/regional_parametermanager_test.go:67
↓ 13 callersMethodversion
version returns the execution that the service will be deployed to. This identifier is also used to locate relevant log messages.
internal/cloudrunci/cloudrunjobs.go:114
↓ 12 callersMethodCreate
( ctx context.Context, model string, source *genai.BatchJobSource, config *genai.CreateBatchJobConfig, )
genai/batch_prediction/batchprediction_examples_test.go:31
↓ 12 callersMethodGet
( ctx context.Context, name string, _ interface{}, )
genai/batch_prediction/batchprediction_examples_test.go:44
↓ 12 callersMethodHandle
Handle overrides slog.Handler's Handle method. This adds attributes from the span context to the slog.Record.
opentelemetry/instrumentation/app/logger.go:38
↓ 12 callersFunctioncleanupSTSJob
(job *storagetransferpb.TransferJob, projectID string)
storagetransfer/storagetransfer_test.go:556
↓ 12 callersFunctioncreateTestPgDatabase
(db string, extraStatements ...string)
spanner/spanner_snippets/spanner/integration_test.go:1603
↓ 12 callersFunctioncreateTestSlate
(slateID string, t *testing.T)
media/videostitcher/stitcher_test.go:308
↓ 12 callersFunctiondeleteProductSet
deleteProductSet deletes a product set.
vision/product_search/delete_product_set.go:30
↓ 12 callersFunctiondeleteTestSlate
(slateName string, t *testing.T)
media/videostitcher/stitcher_test.go:335
↓ 12 callersFunctiongcloud
gcloud provides a common mechanism for executing gcloud commands. It will attempt to retry failed commands. Use gcloudWithoutRetry() for no retry.
internal/cloudrunci/gcloud.go:41
next →1–100 of 5,023, ranked by callers