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

package(default_visibility = ["//protoc-gen-grpc-gateway:__subpackages__"])

go_library(
    name = "go_default_library",
    srcs = [
        "doc.go",
        "generator.go",
        "template.go",
    ],
    importpath = "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway/internal/gengateway",
    deps = [
        "//internal/casing:go_default_library",
        "//internal/descriptor:go_default_library",
        "//internal/generator:go_default_library",
        "//utilities:go_default_library",
        "@com_github_golang_glog//:go_default_library",
        "@org_golang_google_protobuf//proto:go_default_library",
        "@org_golang_google_protobuf//types/pluginpb:go_default_library",
    ],
)

go_test(
    name = "go_default_test",
    size = "small",
    srcs = [
        "generator_test.go",
        "template_test.go",
    ],
    embed = [":go_default_library"],
    deps = [
        "//internal/descriptor:go_default_library",
        "//internal/httprule:go_default_library",
        "@org_golang_google_protobuf//proto:go_default_library",
        "@org_golang_google_protobuf//types/descriptorpb:go_default_library",
    ],
)
