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
↓ 2 callers
Function
initTestWithConfig
(t *testing.T, id string, instanceConfigName string)
spanner/spanner_snippets/spanner/integration_test.go:73
↓ 2 callers
Method
list
list retrieves the total collection of trainers from a mongoDB instance
compute/quickstart/compute_quickstart_sample.go:127
↓ 2 callers
Function
listAllProjectAssetsAtTime
listAllProjectAssets lists all GCP Projects in orgID at asOf time and prints out results to w. orgID is the numeric organization ID of interest.
securitycenter/assets/list_project_assets_at_time.go:32
↓ 2 callers
Function
listAndGetTask
(projectID string, desc string)
datastore/tasks/tasks_test.go:117
↓ 2 callers
Function
listCompanies
listCompanies lists all companies in the project.
jobs/v4/howto/list_company_sample.go:29
↓ 2 callers
Function
listHandler
(tm *trainerManager)
compute/quickstart/compute_quickstart_sample.go:62
↓ 2 callers
Function
listInspectTemplates
listInspectTemplates lists the inspect templates in the project.
dlp/snippets/template/list.go:31
↓ 2 callers
Function
listJobs
listJobs lists all jobs for a given location. See https://cloud.google.com/transcoder/docs/how-to/jobs#list_jobs for more information.
media/transcoder/list_jobs.go:32
↓ 2 callers
Function
listLiveAdTagDetails
listLiveAdTagDetails lists the ad tag details for the specified live session.
media/videostitcher/list_live_ad_tag_details.go:29
↓ 2 callers
Function
listSchemas
(w io.Writer, projectID string)
pubsub/v1samples/schemas/list_schemas.go:27
↓ 2 callers
Function
listSchemas
(w io.Writer, projectID string)
pubsub/schemas/list_schemas.go:28
↓ 2 callers
Function
load
(scale int)
profiler/hotapp/main.go:146
↓ 2 callers
Method
logf
(s string, v ...interface{})
internal/testutil/retry.go:104
↓ 2 callers
Method
machineType
Returns machine type in a format without the zone. For example, n2-custom-0-10240. This format is used to create instance templates.
compute/instances/custom-machine-type/helper_class.go:152
↓ 2 callers
Function
makeDesc
()
datastore/tasks/tasks_test.go:45
↓ 2 callers
Function
makeGetRequest
`makeGetRequest` makes a request to the provided `targetURL` with an authenticated client using audience `audience`.
functions/security/idtoken.go:31
↓ 2 callers
Function
makeSearchRequest
[END functions_slack_search] [START functions_slack_request]
functions/functionsv2/slack/search.go:115
↓ 2 callers
Function
makeSearchRequest
[END functions_slack_search] [START functions_slack_request]
functions/slack/search.go:111
↓ 2 callers
Function
maybeCreateKey
(projectId, locationId, keyRingId, keyId string)
spanner/spanner_snippets/spanner/integration_test.go:1385
↓ 2 callers
Function
mustGetenv
(k string)
appengine/go11x/cloudsql/cloudsql.go:115
↓ 2 callers
Function
mustGetenv
(k string)
docs/appengine/cloudsql/cloudsql.go:77
↓ 2 callers
Function
newApp
newApp creates a new app.
getting-started/sessions/main.go:86
↓ 2 callers
Function
newApp
newApp creates a new app.
getting-started/background/index/main.go:76
↓ 2 callers
Function
newMemoryDB
()
getting-started/bookshelf/db_memory.go:35
↓ 2 callers
Function
newMessageService
Instantiates a MessageService for use in the app
getting-started/devflowapp/services/config.go:57
↓ 2 callers
Function
pollDiscoveryOccurrenceFinished
pollDiscoveryOccurrenceFinished returns the discovery occurrence for a resource once it reaches a finished state.
container_registry/container_analysis/poll_discovery_finished.go:30
↓ 2 callers
Function
printResults
printResults prints results from a query to the Stack Overflow public dataset.
bigquery/simpleapp/simpleapp.go:85
↓ 2 callers
Function
projectID
(t *testing.T)
securitycenter/notificationsv2/notifications_test.go:40
↓ 2 callers
Function
projectIDtoNumber
(ctx context.Context, projectID string)
batch/create_with_template_test.go:141
↓ 2 callers
Function
publishAvroRecords
(w io.Writer, projectID, topicID, avscFile string)
pubsub/v1samples/schemas/publish_avro_records.go:28
↓ 2 callers
Function
publishAvroRecords
(w io.Writer, projectID, topicID, avscFile string)
pubsub/schemas/publish_avro_records.go:29
↓ 2 callers
Function
query
query returns a row iterator suitable for reading query results.
bigquery/simpleapp/simpleapp.go:61
↓ 2 callers
Function
query
query returns a row iterator suitable for reading query results.
functions/functionsv2/response_streaming/response_streaming.go:63
↓ 2 callers
Function
readAndCloseBody
(req *http.Request)
opentelemetry/instrumentation/app/main_test.go:241
↓ 2 callers
Function
readKeyFile
[END cloudcdn_sign_url_prefix] readKeyFile reads the base64url-encoded key file and decodes it.
cdn/signedurls/signurl.go:85
↓ 2 callers
Function
readKeyFile
[END cloudcdn_sign_cookie] readKeyFile reads the base64url-encoded key file and decodes it.
cdn/signedcookies/sign_cookie.go:59
↓ 2 callers
Function
readMeta
(instanceId string)
run/service-health/main.go:544
↓ 2 callers
Function
readRows
[END bigtable_reads_row_partial] [START bigtable_reads_rows]
bigtable/reads/reads.go:84
↓ 2 callers
Method
registerHandlers
()
getting-started/bookshelf/main.go:80
↓ 2 callers
Function
releaseGlobalStaticExternal
releaseGlobalStaticExternal releases a static global external IP address.
compute/address/release_static_external.go:61
↓ 2 callers
Function
removeIdx
removeIdx removes arr[idx] from arr.
iam/snippets/member_remove.go:61
↓ 2 callers
Function
revokeTableOrViewAccessPolicies
revokeTableOrViewAccessPolicies creates a new ACL removing the VIEWER role to group "example-analyst-group@google.com" For more information on the typ
bigquery/bigquery_access_quickstart/revoke_access_table_or_view.go:30
↓ 2 callers
Function
runBackupSampleWithoutContext
(t *testing.T, f backupSampleFuncWithoutContext, dbName, backupID, errMsg string)
spanner/spanner_snippets/spanner/integration_test.go:1454
↓ 2 callers
Function
runCreateAndUpdateInstanceSample
(t *testing.T, createFunc, updateFunc instanceSampleFunc)
spanner/spanner_snippets/spanner/integration_test.go:135
↓ 2 callers
Function
sanitizeModelResponseWithUserPrompt
sanitizeModelResponseWithUserPrompt sanitizes a model response with a user prompt. w io.Writer: The writer to use for logging. projectID string: The
modelarmor/sanitize_model_response_with_user_prompt.go:41
↓ 2 callers
Function
setPolicy
setPolicy sets the project's IAM policy
iam/quickstart/quickstart.go:156
↓ 2 callers
Function
setRetentionPolicy
setRetentionPolicy sets the bucket retention period.
storage/buckets/set_retention_policy.go:28
↓ 2 callers
Function
setUnmute
setMute mutes an individual finding, can also unmute or reset the mute state of a finding. If a finding is already muted, muting it again has no effec
securitycenter/muteconfig/set_unmute_finding.go:31
↓ 2 callers
Function
setUnmute
setUnmute unmutes an individual finding. Unmuting a finding that isn't muted has no effect. Various mute states are: MUTE_UNSPECIFIED/MUTE/UNMUTE.
securitycenter/muteconfigv2/set_unmute_finding.go:31
↓ 2 callers
Function
setup
setup executes per-instance one-time warmup and initialization actions.
appengine/go11x/warmup/warmup.go:61
↓ 2 callers
Function
setup
(t *testing.T)
securitycenter/settings/settings_test.go:27
↓ 2 callers
Function
setupCertificate
Setup and teardown functions for Certifcate tests
privateca/privateca_test.go:148
↓ 2 callers
Function
setupCounter
(ctx context.Context)
run/custom-metrics/main.go:54
↓ 2 callers
Function
setupTestEnv
(c dbConfig)
cloudsql/sqlserver/database-sql/cloudsql_test.go:78
↓ 2 callers
Function
setupTestEnv
(c dbConfig)
cloudsql/postgres/database-sql/cloudsql_test.go:88
↓ 2 callers
Function
setupTestEnv
(c dbConfig)
cloudsql/mysql/database-sql/cloudsql_test.go:88
↓ 2 callers
Function
signCookie
signCookie creates a signed cookie for an endpoint served by Cloud CDN. - urlPrefix must start with "https://" and should include the path prefix for
cdn/signedcookies/sign_cookie.go:39
↓ 2 callers
Function
signURL
[END cloudcdn_sign_url_prefix] SignURL creates a signed URL for an endpoint on Cloud CDN. - url must start with "https://" and should not have the "E
cdn/signedurls/signurl.go:40
↓ 2 callers
Function
signURLWithPrefix
[END cloudcdn_sign_url] [START cloudcdn_sign_url_prefix] SignURLWithPrefix creates a signed URL prefix for an endpoint on Cloud CDN. Prefixes allow ac
cdn/signedurls/signurl.go:65
↓ 2 callers
Function
sliceContains
sliceContains reports whether the provided string is present in the given slice of strings.
bigtable/helloworld/main.go:41
↓ 2 callers
Function
sliceContains
sliceContains reports whether the provided string is present in the given slice of strings.
bigtable/usercounter/main.go:156
↓ 2 callers
Function
startChannel
startChannel starts a channel.
media/livestream/start_channel.go:28
↓ 2 callers
Function
startReplicationRegional
(projectID, region, diskName, primaryDiskName, primaryRegion string)
compute/disks/disks_test.go:227
↓ 2 callers
Function
stopInstance
stopInstance stops a started Google Compute Engine instance
compute/stop_instance.go:28
↓ 2 callers
Function
streamFileUpload
streamFileUpload uploads an object via a stream.
storage/objects/stream_file_upload.go:30
↓ 2 callers
Function
streamResults
streamResults streams results from a query of BigQuery's public dataset.
functions/functionsv2/response_streaming/response_streaming.go:71
↓ 2 callers
Function
structuredWrite
(projectID string)
logging/simplelog/write_log.go:26
↓ 2 callers
Function
tableExists
tableExists checks whether a table exists in a given dataset.
bigquery/snippets/table/bigquery_table_exists.go:29
↓ 2 callers
Function
teardown
(functionName string)
functions/security/security_system_test.go:99
↓ 2 callers
Function
testBasicSDPTemplate
testBasicSDPTemplate creates Model Armor template with basic SDP configuration.
modelarmor/modelarmor_test.go:375
↓ 2 callers
Function
testDB
(t *testing.T, db BookDatabase)
getting-started/bookshelf/db_test.go:27
↓ 2 callers
Function
testIAMPermissions
testIAMPermissions demonstrates a caller probing what permissions they hold on a given taxonomy or policy tag resource.
datacatalog/snippets/policytagmanager/test_iam_permissions.go:30
↓ 2 callers
Function
testName
(tb testing.TB)
secretmanager/secretmanager_test.go:105
↓ 2 callers
Function
testParameterWithKmsKey
testParameterWithKmsKey creates a parameter with a KMS key in the specified GCP project. It returns the created parameter and its ID or fails the test
parametermanager/parametermanager_test.go:78
↓ 2 callers
Function
testParameterWithKmsKey
testParameterWithKmsKey creates a parameter with a KMS key in the specified GCP project. It returns the created parameter and its ID or fails the test
parametermanager/regional_samples/regional_parametermanager_test.go:98
↓ 2 callers
Function
testResourceManagerTagsKeyClient
(tb testing.TB)
secretmanager/secretmanager_test.go:81
↓ 2 callers
Function
testResourceManagerTagsKeyClient
(tb testing.TB)
secretmanager/regional_samples/regional_secretmanager_test.go:300
↓ 2 callers
Function
testResourceManagerTagsValueClient
(tb testing.TB)
secretmanager/secretmanager_test.go:93
↓ 2 callers
Function
testResourceManagerTagsValueClient
(tb testing.TB)
secretmanager/regional_samples/regional_secretmanager_test.go:312
↓ 2 callers
Function
testSDPTemplate
testSDPTemplate creates DLP inspect and deidentify templates for use in tests.
modelarmor/modelarmor_test.go:294
↓ 2 callers
Function
tokenize
tokenize splits a string into tokens. This is very simple, it's not a good tokenization function.
bigtable/search/search.go:148
↓ 2 callers
Function
transferToNearline
(w io.Writer, projectID string, gcsSourceBucket string, gcsNearlineSinkBucket string)
storagetransfer/transfer_to_nearline.go:32
↓ 2 callers
Method
update
(span ptrace.Span)
opentelemetry/instrumentation/app/main_test.go:252
↓ 2 callers
Function
updateCDNKey
updateCDNKey updates a CDN key. A CDN key is used to retrieve protected media. If isMediaCDN is true, update a Media CDN key. If false, update a Cloud
media/videostitcher/update_cdn_key.go:32
↓ 2 callers
Function
updateCompany
[END job_get_company] [START job_update_company] updateCompany update a company with all fields.
jobs/v3/howto/basic_company_sample.go:87
↓ 2 callers
Function
updateCompanyWithMask
[END job_update_company] [START job_update_company_with_field_mask] updateCompanyWithMask updates a company with specific fields. mask is a comma sepa
jobs/v3/howto/basic_company_sample.go:117
↓ 2 callers
Function
updateJob
[END job_get_job] [START job_update_job] updateJob update a job with all fields except name.
jobs/v3/howto/basic_job_sample.go:87
↓ 2 callers
Function
updateJobWithMask
[END job_update_job] [START job_update_job_with_field_mask] updateJobWithMask updates a job by name with specific fields. mask is a comma separated li
jobs/v3/howto/basic_job_sample.go:117
↓ 2 callers
Function
validateServiceAccountKey
validateServiceAccountKey validates that a JSON file is a service account key. This sample uses a type-specific loader to ensure the credentials are
auth/auth_validate_service_account_key.go:33
↓ 2 callers
Function
verifyWebHook
[END functions_slack_request] [START functions_verify_webhook] verifyWebHook verifies the request signature. See https://api.slack.com/docs/verifying-
functions/functionsv2/slack/search.go:129
↓ 2 callers
Function
verifyWebHook
[END functions_slack_request] [START functions_verify_webhook] verifyWebHook verifies the request signature. See https://api.slack.com/docs/verifying-
functions/slack/search.go:125
↓ 2 callers
Function
viewTableOrViewAccessPolicies
viewTableOrViewAccessPolicies retrieves the ACL for the given resource For more information on the types of ACLs available see: https://cloud.google.c
bigquery/bigquery_access_quickstart/view_table_or_view_access_policy.go:29
↓ 2 callers
Function
writeHeartbeat
()
run/service-health/main.go:480
↓ 1 callers
Function
AddModuleToCleanup
AddModuleToCleanup registers a module for cleanup.
securitycenter/management_api/security_health_analytics_custom_module_test.go:113
↓ 1 callers
Function
AddModuleToCleanup
AddModuleToCleanup registers a module for cleanup.
securitycenter/management_api/event_threat_detection/event_threat_detection_custom_module_test.go:71
↓ 1 callers
Function
BigtableRead
BigtableRead is an example of reading Bigtable from a Cloud Function.
functions/bigtable/bigtable.go:36
↓ 1 callers
Function
BlurOffensiveImages
BlurOffensiveImages blurs offensive images uploaded to GCS.
functions/imagemagick/imagemagick.go:66
↓ 1 callers
Method
Cleanup
Cleanup deletes the created version from App Engine.
internal/aeintegrate/aeintegrate.go:311
↓ 1 callers
Method
Cleanup
Cleanup deletes any resources.
securitycenter/muteconfigv2/mute_config_test.go:179
↓ 1 callers
Function
CleanupSharedModules
CleanupSharedModules deletes all created custom modules.
securitycenter/management_api/security_health_analytics_custom_module_test.go:131
← previous
next →
601–700 of 5,023, ranked by callers