core/internal/localstorage: init

This implements localstorage and localstorage/declarative, a small
library for better typed filesystem access. Further down the road this
will replace //core/internal/storage, but we're trying to commit this
early.

This is not used anywhere, and instead comes with a basic test to show
its workings.

Test Plan: covered by unit tests

X-Origin-Diff: phab/D578
GitOrigin-RevId: 9a225bc105cc331ce139eb6c195e9af216c8633e
diff --git a/core/internal/localstorage/BUILD.bazel b/core/internal/localstorage/BUILD.bazel
new file mode 100644
index 0000000..a3a5b0c
--- /dev/null
+++ b/core/internal/localstorage/BUILD.bazel
@@ -0,0 +1,26 @@
+load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
+
+go_library(
+    name = "go_default_library",
+    srcs = [
+        "directory_data.go",
+        "directory_pki.go",
+        "directory_root.go",
+        "storage.go",
+    ],
+    importpath = "git.monogon.dev/source/nexantic.git/core/internal/localstorage",
+    visibility = ["//core:__subpackages__"],
+    deps = [
+        "//core/internal/localstorage/crypt:go_default_library",
+        "//core/internal/localstorage/declarative:go_default_library",
+        "//core/pkg/tpm:go_default_library",
+        "@org_golang_x_sys//unix:go_default_library",
+    ],
+)
+
+go_test(
+    name = "go_default_test",
+    srcs = ["storage_test.go"],
+    embed = [":go_default_library"],
+    deps = ["//core/internal/localstorage/declarative:go_default_library"],
+)