load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

package(default_visibility = ["//visibility:public"])

go_library(
    name = "go_default_library",
    srcs = [
        "context.go",
        "convert.go",
        "doc.go",
        "errors.go",
        "handler.go",
        "marshal_json.go",
        "marshal_jsonpb.go",
        "marshal_proto.go",
        "marshaler.go",
        "marshaler_registry.go",
        "mux.go",
        "pattern.go",
        "proto2_convert.go",
        "proto_errors.go",
        "query.go",
    ],
    importpath = "github.com/grpc-ecosystem/grpc-gateway/runtime",
    deps = [
        "//runtime/internal:go_default_library",
        "//utilities:go_default_library",
        "@com_github_golang_protobuf//jsonpb:go_default_library",
        "@com_github_golang_protobuf//proto:go_default_library",
        "@com_github_golang_protobuf//ptypes:go_default_library",
        "@com_github_golang_protobuf//ptypes/any:go_default_library",
        "@com_github_golang_protobuf//ptypes/duration:go_default_library",
        "@com_github_golang_protobuf//ptypes/timestamp:go_default_library",
        "@org_golang_google_grpc//codes:go_default_library",
        "@org_golang_google_grpc//grpclog:go_default_library",
        "@org_golang_google_grpc//metadata:go_default_library",
        "@org_golang_google_grpc//status:go_default_library",
    ],
)

go_test(
    name = "go_default_test",
    size = "small",
    srcs = ["pattern_test.go"],
    embed = [":go_default_library"],
    deps = ["//utilities:go_default_library"],
)

go_test(
    name = "go_default_xtest",
    size = "small",
    srcs = [
        "context_test.go",
        "errors_test.go",
        "handler_test.go",
        "marshal_json_test.go",
        "marshal_jsonpb_test.go",
        "marshal_proto_test.go",
        "marshaler_registry_test.go",
        "mux_test.go",
        "query_test.go",
    ],
    deps = [
        ":go_default_library",
        "//examples/proto/examplepb:go_default_library",
        "//runtime/internal:go_default_library",
        "//utilities:go_default_library",
        "@com_github_golang_protobuf//jsonpb:go_default_library",
        "@com_github_golang_protobuf//proto:go_default_library",
        "@com_github_golang_protobuf//ptypes:go_default_library",
        "@com_github_golang_protobuf//ptypes/duration:go_default_library",
        "@com_github_golang_protobuf//ptypes/empty:go_default_library",
        "@com_github_golang_protobuf//ptypes/struct:go_default_library",
        "@com_github_golang_protobuf//ptypes/timestamp:go_default_library",
        "@com_github_golang_protobuf//ptypes/wrappers:go_default_library",
        "@org_golang_google_genproto//googleapis/rpc/errdetails:go_default_library",
        "@org_golang_google_genproto//protobuf/field_mask:go_default_library",
        "@org_golang_google_grpc//:go_default_library",
        "@org_golang_google_grpc//codes:go_default_library",
        "@org_golang_google_grpc//metadata:go_default_library",
        "@org_golang_google_grpc//status:go_default_library",
    ],
)
