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

go_library(
    name = "go_default_library",
    srcs = [
        "request.go",
        "venaficlient.go",
    ],
    importpath = "github.com/jetstack/cert-manager/pkg/issuer/venafi/client",
    visibility = ["//visibility:public"],
    deps = [
        "//pkg/apis/certmanager/v1:go_default_library",
        "//pkg/issuer/venafi/client/api:go_default_library",
        "//pkg/util/pki:go_default_library",
        "@com_github_venafi_vcert_v4//:go_default_library",
        "@com_github_venafi_vcert_v4//pkg/certificate:go_default_library",
        "@com_github_venafi_vcert_v4//pkg/endpoint:go_default_library",
        "@io_k8s_client_go//listers/core/v1:go_default_library",
    ],
)

filegroup(
    name = "package-srcs",
    srcs = glob(["**"]),
    tags = ["automanaged"],
    visibility = ["//visibility:private"],
)

filegroup(
    name = "all-srcs",
    srcs = [
        ":package-srcs",
        "//pkg/issuer/venafi/client/api:all-srcs",
        "//pkg/issuer/venafi/client/fake:all-srcs",
    ],
    tags = ["automanaged"],
    visibility = ["//visibility:public"],
)

go_test(
    name = "go_default_test",
    srcs = [
        "request_test.go",
        "venaficlient_test.go",
    ],
    embed = [":go_default_library"],
    deps = [
        "//pkg/apis/certmanager/v1:go_default_library",
        "//pkg/apis/meta/v1:go_default_library",
        "//pkg/issuer/venafi/client/api:go_default_library",
        "//pkg/issuer/venafi/client/fake:go_default_library",
        "//pkg/util:go_default_library",
        "//pkg/util/pki:go_default_library",
        "//test/unit/gen:go_default_library",
        "//test/unit/listers:go_default_library",
        "@com_github_venafi_vcert_v4//:go_default_library",
        "@com_github_venafi_vcert_v4//pkg/certificate:go_default_library",
        "@com_github_venafi_vcert_v4//pkg/endpoint:go_default_library",
        "@com_github_venafi_vcert_v4//pkg/venafi/fake:go_default_library",
        "@io_k8s_api//core/v1:go_default_library",
        "@io_k8s_client_go//listers/core/v1:go_default_library",
    ],
)
