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

package(
    default_visibility = ["//visibility:public"],
    licenses = ["notice"],  # Apache 2.0
)

go_library(
    name = "go_default_library",
    srcs = [
        "any_value.go",
        "bool.go",
        "bytes.go",
        "double.go",
        "duration.go",
        "err.go",
        "int.go",
        "iterator.go",
        "json_value.go",
        "json_list.go",
        "json_struct.go",
        "list.go",
        "map.go",
        "null.go",
        "object.go",
        "provider.go",
        "string.go",
        "timestamp.go",
        "type.go",
        "uint.go",
        "unknown.go",
        "util.go",
    ],
    importpath = "github.com/google/cel-go/common/types",
    deps = [
        "//common/overloads:go_default_library",
        "//common/types/ref:go_default_library",
        "//common/types/pb:go_default_library",
        "//common/types/traits: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",
        "@io_bazel_rules_go//proto/wkt:any_go_proto",
        "@io_bazel_rules_go//proto/wkt:descriptor_go_proto",
        "@io_bazel_rules_go//proto/wkt:duration_go_proto",
        "@io_bazel_rules_go//proto/wkt:struct_go_proto",
        "@io_bazel_rules_go//proto/wkt:timestamp_go_proto",
        "@io_bazel_rules_go//proto/wkt:wrappers_go_proto",
        "@org_golang_google_genproto//googleapis/api/expr/v1alpha1:go_default_library",
    ],
)

go_test(
    name = "go_default_test",
    srcs = [
        "bool_test.go",
        "bytes_test.go",
        "double_test.go",
        "duration_test.go",
        "int_test.go",
        "json_list_test.go",
        "json_struct_test.go",
        "list_test.go",
        "map_test.go",
        "null_test.go",
        "object_test.go",
        "providers_test.go",
        "string_test.go",
        "timestamp_test.go",
        "type_test.go",
        "uint_test.go",
    ],
    size = "small",
    embed = [":go_default_library"],
    deps = [
        "//common/types/ref:go_default_library",
        "//test:go_default_library",
        "@com_github_golang_protobuf//jsonpb:go_default_library",
        "@io_bazel_rules_go//proto/wkt:any_go_proto",
        "@io_bazel_rules_go//proto/wkt:duration_go_proto",
        "@io_bazel_rules_go//proto/wkt:timestamp_go_proto",
        "@org_golang_google_genproto//googleapis/api/expr/v1alpha1:go_default_library",
    ],
)
