blob: cbe81b08229127e196336c035604beb538a60edc [file] [log] [blame]
Jan Schärcc9e4d12025-04-14 10:28:40 +00001load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
2
3go_library(
4 name = "registry",
5 srcs = [
6 "auth.go",
7 "client.go",
8 "headers.go",
9 "server.go",
10 ],
11 importpath = "source.monogon.dev/osbase/oci/registry",
12 visibility = ["//visibility:public"],
13 deps = [
14 "//osbase/oci",
15 "//osbase/structfs",
16 "@com_github_cenkalti_backoff_v4//:backoff",
17 "@com_github_opencontainers_image_spec//specs-go/v1:specs-go",
18 ],
19)
20
21go_test(
22 name = "registry_test",
Jan Schär56d12992025-04-14 11:49:37 +000023 srcs = [
24 "client_test.go",
25 "headers_test.go",
26 ],
27 data = [
28 "//osbase/oci/osimage:test_image_uncompressed",
29 ],
Jan Schärcc9e4d12025-04-14 10:28:40 +000030 embed = [":registry"],
Jan Schär56d12992025-04-14 11:49:37 +000031 x_defs = {
32 "xImagePath": "$(rlocationpath //osbase/oci/osimage:test_image_uncompressed )",
33 },
34 deps = [
35 "//osbase/oci",
36 "@com_github_cenkalti_backoff_v4//:backoff",
37 "@io_bazel_rules_go//go/runfiles",
38 ],
Jan Schärcc9e4d12025-04-14 10:28:40 +000039)