This repository was archived by the owner on Sep 30, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
/
Copy pathBUILD.bazel
67 lines (64 loc) · 1.68 KB
/
BUILD.bazel
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
load("//dev:go_mockgen.bzl", "go_mockgen")
load("//dev:go_defs.bzl", "go_test")
load("@io_bazel_rules_go//go:def.bzl", "go_library")
go_library(
name = "authz",
srcs = [
"consts.go",
"header.go",
"iface.go",
"mocks_temp.go",
"perms.go",
"scopes.go",
"sub_repo_perms.go",
],
importpath = "github.com/sourcegraph/sourcegraph/internal/authz",
tags = [TAG_PLATFORM_SOURCE],
visibility = ["//:__subpackages__"],
deps = [
"//internal/actor",
"//internal/api",
"//internal/collections",
"//internal/dotcom",
"//internal/extsvc",
"//internal/requestclient",
"//internal/types",
"//lib/errors",
"@com_github_prometheus_client_golang//prometheus",
"@com_github_prometheus_client_golang//prometheus/promauto",
"@io_opentelemetry_go_otel//attribute",
],
)
go_test(
name = "authz_test",
timeout = "short",
srcs = [
"header_test.go",
"iface_test.go",
"perms_test.go",
"sub_repo_perms_test.go",
],
embed = [":authz"],
tags = [TAG_PLATFORM_SOURCE],
deps = [
"//internal/actor",
"//internal/api",
"//internal/dotcom",
"//internal/fileutil",
"//lib/errors",
"@com_github_gobwas_glob//:glob",
"@com_github_google_go_cmp//cmp",
"@com_github_stretchr_testify//assert",
"@com_github_stretchr_testify//require",
],
)
go_mockgen(
name = "generate_mocks",
out = "mocks_temp.go",
manifests = [
"//:mockgen.yaml",
"//:mockgen.test.yaml",
"//:mockgen.temp.yaml",
],
deps = [":authz"],
)