# This BUILD file contains Bazel build targets for clients of the Trillian API.
# Bazel can be obtained from www.bazel.build
#
# Even where Bazel is not being used by client builds, these targets provide
# a mechanism to determine which proto files are required for the API. For
# example, the following command will list the proto files required to use
# the Trillian Admin gRPC interface:
#
# bazel query --notool_deps --noimplicit_deps \
#   'kind("source file", deps(:trillian_admin_api_proto))'
package(default_visibility = ["//visibility:public"])

# A proto library for the Trillian Admin gRPC API.
proto_library(
    name = "trillian_admin_api_proto",
    srcs = [
        "trillian_admin_api.proto",
    ],
    deps = [
        ":trillian_proto",
        "@com_google_googleapis//google/api:annotations_proto",
        "@com_google_googleapis//google/rpc:status_proto",
        "@com_google_protobuf//:field_mask_proto",
    ],
)

# A proto library for the Trillian Log gRPC API.
proto_library(
    name = "trillian_log_api_proto",
    srcs = [
        "trillian_log_api.proto",
    ],
    deps = [
        ":trillian_proto",
        "@com_google_googleapis//google/api:annotations_proto",
        "@com_google_googleapis//google/rpc:status_proto",
        "@com_google_protobuf//:api_proto",
        "@com_google_protobuf//:timestamp_proto",
    ],
)

# Common proto definitions used within the Trillian gRPC APIs.
proto_library(
    name = "trillian_proto",
    srcs = [
        "crypto/keyspb/keyspb.proto",
        "trillian.proto",
    ],
    deps = [
        "@com_google_protobuf//:any_proto",
        "@com_google_protobuf//:api_proto",
        "@com_google_protobuf//:duration_proto",
        "@com_google_protobuf//:timestamp_proto",
    ],
)
