load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") go_library( name = "middleware", srcs = [ "auth.go", "metrics.go", "request.go", "version_check.go", ], importpath = "edge-infra.dev/pkg/edge/api/middleware", visibility = ["//visibility:public"], deps = [ "//pkg/edge/api/bsl/types", "//pkg/edge/api/graph/model", "//pkg/edge/api/sql", "//pkg/edge/api/totp", "//pkg/edge/api/utils", "//pkg/edge/client", "//pkg/lib/crypto", "//pkg/lib/fog", "//pkg/lib/runtime/version", "@com_github_99designs_gqlgen//graphql", "@com_github_gin_gonic_gin//:gin", "@com_github_go_logr_logr//:logr", "@com_github_golang_jwt_jwt//:jwt", "@com_github_hashicorp_go_version//:go-version", "@com_github_penglongli_gin_metrics//ginmetrics", "@com_github_vektah_gqlparser_v2//ast", ], ) go_test( name = "middleware_test", srcs = [ "auth_test.go", "metrics_test.go", "version_check_test.go", ], embed = [":middleware"], deps = [ "//pkg/edge/api/bsl/types", "//pkg/edge/api/totp", "//pkg/edge/client", "//pkg/lib/runtime/version", "@com_github_99designs_gqlgen//graphql", "@com_github_data_dog_go_sqlmock//:go-sqlmock", "@com_github_gin_gonic_gin//:gin", "@com_github_penglongli_gin_metrics//ginmetrics", "@com_github_stretchr_testify//assert", "@com_github_vektah_gqlparser_v2//ast", ], )