From a7143fc94adcf63bd160a142dece4c0986b0c0cc Mon Sep 17 00:00:00 2001 From: Martin Hutchinson Date: Mon, 4 Nov 2024 11:59:54 +0000 Subject: [PATCH] Move common storage implementation to internal (#287) This may need to come out of internal if we ever need to support a third party storage that lives outside of this repo, but at the moment this can safely be moved to internal to delay any API concerns. Towards #280. --- storage/gcp/gcp.go | 2 +- storage/gcp/gcp_test.go | 2 +- storage/{ => internal}/integrate.go | 0 storage/{ => internal}/integrate_test.go | 0 storage/{ => internal}/queue.go | 0 storage/{ => internal}/queue_test.go | 2 +- storage/{ => internal}/tileid.go | 0 storage/mysql/mysql.go | 2 +- storage/posix/files.go | 2 +- 9 files changed, 5 insertions(+), 5 deletions(-) rename storage/{ => internal}/integrate.go (100%) rename storage/{ => internal}/integrate_test.go (100%) rename storage/{ => internal}/queue.go (100%) rename storage/{ => internal}/queue_test.go (98%) rename storage/{ => internal}/tileid.go (100%) diff --git a/storage/gcp/gcp.go b/storage/gcp/gcp.go index c165d055..dc043a71 100644 --- a/storage/gcp/gcp.go +++ b/storage/gcp/gcp.go @@ -46,7 +46,7 @@ import ( tessera "github.com/transparency-dev/trillian-tessera" "github.com/transparency-dev/trillian-tessera/api" "github.com/transparency-dev/trillian-tessera/api/layout" - "github.com/transparency-dev/trillian-tessera/storage" + "github.com/transparency-dev/trillian-tessera/storage/internal" "golang.org/x/sync/errgroup" "google.golang.org/api/googleapi" "google.golang.org/api/iterator" diff --git a/storage/gcp/gcp_test.go b/storage/gcp/gcp_test.go index 3c40e79c..fce99317 100644 --- a/storage/gcp/gcp_test.go +++ b/storage/gcp/gcp_test.go @@ -32,7 +32,7 @@ import ( tessera "github.com/transparency-dev/trillian-tessera" "github.com/transparency-dev/trillian-tessera/api" "github.com/transparency-dev/trillian-tessera/api/layout" - "github.com/transparency-dev/trillian-tessera/storage" + "github.com/transparency-dev/trillian-tessera/storage/internal" ) func newSpannerDB(t *testing.T) func() { diff --git a/storage/integrate.go b/storage/internal/integrate.go similarity index 100% rename from storage/integrate.go rename to storage/internal/integrate.go diff --git a/storage/integrate_test.go b/storage/internal/integrate_test.go similarity index 100% rename from storage/integrate_test.go rename to storage/internal/integrate_test.go diff --git a/storage/queue.go b/storage/internal/queue.go similarity index 100% rename from storage/queue.go rename to storage/internal/queue.go diff --git a/storage/queue_test.go b/storage/internal/queue_test.go similarity index 98% rename from storage/queue_test.go rename to storage/internal/queue_test.go index 30abadc5..3fe83e7a 100644 --- a/storage/queue_test.go +++ b/storage/internal/queue_test.go @@ -23,7 +23,7 @@ import ( "time" tessera "github.com/transparency-dev/trillian-tessera" - "github.com/transparency-dev/trillian-tessera/storage" + "github.com/transparency-dev/trillian-tessera/storage/internal" ) func TestQueue(t *testing.T) { diff --git a/storage/tileid.go b/storage/internal/tileid.go similarity index 100% rename from storage/tileid.go rename to storage/internal/tileid.go diff --git a/storage/mysql/mysql.go b/storage/mysql/mysql.go index 457cc668..67747303 100644 --- a/storage/mysql/mysql.go +++ b/storage/mysql/mysql.go @@ -27,7 +27,7 @@ import ( "github.com/transparency-dev/merkle/rfc6962" tessera "github.com/transparency-dev/trillian-tessera" "github.com/transparency-dev/trillian-tessera/api" - "github.com/transparency-dev/trillian-tessera/storage" + "github.com/transparency-dev/trillian-tessera/storage/internal" "k8s.io/klog/v2" ) diff --git a/storage/posix/files.go b/storage/posix/files.go index f594e232..034f40ef 100644 --- a/storage/posix/files.go +++ b/storage/posix/files.go @@ -28,7 +28,7 @@ import ( tessera "github.com/transparency-dev/trillian-tessera" "github.com/transparency-dev/trillian-tessera/api" "github.com/transparency-dev/trillian-tessera/api/layout" - "github.com/transparency-dev/trillian-tessera/storage" + "github.com/transparency-dev/trillian-tessera/storage/internal" "k8s.io/klog/v2" )