| Jan Schär | cc9e4d1 | 2025-04-14 10:28:40 +0000 | [diff] [blame] | 1 | load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") |
| 2 | |
| 3 | go_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 | |
| 21 | go_test( |
| 22 | name = "registry_test", |
| Jan Schär | 56d1299 | 2025-04-14 11:49:37 +0000 | [diff] [blame^] | 23 | srcs = [ |
| 24 | "client_test.go", |
| 25 | "headers_test.go", |
| 26 | ], |
| 27 | data = [ |
| 28 | "//osbase/oci/osimage:test_image_uncompressed", |
| 29 | ], |
| Jan Schär | cc9e4d1 | 2025-04-14 10:28:40 +0000 | [diff] [blame] | 30 | embed = [":registry"], |
| Jan Schär | 56d1299 | 2025-04-14 11:49:37 +0000 | [diff] [blame^] | 31 | 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är | cc9e4d1 | 2025-04-14 10:28:40 +0000 | [diff] [blame] | 39 | ) |