mirror of
https://github.com/google/nomulus.git
synced 2025-06-22 20:30:46 +02:00
This changes the BigQuery input to the fields we ultimately want (fqdn, registrarName, registrarEmailAddress) and the output to a structured POJO holding the results from the API. This POJO is then converted to its final text output, i.e.: Map from registrar e-mail to list of threat-detected subdomains: {"registrarEmail": "c@fake.com", "threats": [{"url": "a.com", "threatType": "MALWARE"}]} {"registrarEmail": "d@fake.com", "threats": [{"url": "x.com", "threatType": "MALWARE"}, {"url": "y.com", "threatType": "MALWARE"}]} This gives us all the data we want in a JSON structured format, to be acted upon downstream by the to-be-constructed PublishSpec11ReportAction. Ideally, we would send an e-mail directly from the beam pipeline, but this is only possible through third-party providers (as opposed to app engine itself). ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=209416880
39 lines
1.1 KiB
Text
39 lines
1.1 KiB
Text
package(
|
|
default_testonly = 1,
|
|
default_visibility = ["//java/google/registry:registry_project"],
|
|
)
|
|
|
|
licenses(["notice"]) # Apache 2.0
|
|
|
|
load("//java/com/google/testing/builddefs:GenTestRules.bzl", "GenTestRules")
|
|
|
|
java_library(
|
|
name = "spec11",
|
|
srcs = glob(["*.java"]),
|
|
deps = [
|
|
"//java/google/registry/beam/spec11",
|
|
"//java/google/registry/util",
|
|
"//javatests/google/registry/testing",
|
|
"@com_google_dagger",
|
|
"@com_google_guava",
|
|
"@com_google_truth",
|
|
"@com_google_truth_extensions_truth_java8_extension",
|
|
"@junit",
|
|
"@org_apache_avro",
|
|
"@org_apache_beam_runners_direct_java",
|
|
"@org_apache_beam_runners_google_cloud_dataflow_java",
|
|
"@org_apache_beam_sdks_java_core",
|
|
"@org_apache_beam_sdks_java_io_google_cloud_platform",
|
|
"@org_apache_httpcomponents_httpclient",
|
|
"@org_apache_httpcomponents_httpcore",
|
|
"@org_json",
|
|
"@org_mockito_all",
|
|
],
|
|
)
|
|
|
|
GenTestRules(
|
|
name = "GeneratedTestRules",
|
|
default_test_size = "small",
|
|
test_files = glob(["*Test.java"]),
|
|
deps = [":spec11"],
|
|
)
|