From 0c957d8fc595be541290fe31354d4caedbbc9f6c Mon Sep 17 00:00:00 2001 From: Moritz Poldrack Date: Sun, 3 Mar 2024 15:24:43 +0100 Subject: [PATCH] move cmd/homeserver_offline_exporters/_common to cmd/homeserver_offline_exporters/internal --- cmd/homeserver_offline_exporters/import_to_synapse/main.go | 6 +++--- .../{_common => internal}/archive_reader.go | 2 +- .../{_common => internal}/init_export.go | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) rename cmd/homeserver_offline_exporters/{_common => internal}/archive_reader.go (99%) rename cmd/homeserver_offline_exporters/{_common => internal}/init_export.go (99%) diff --git a/cmd/homeserver_offline_exporters/import_to_synapse/main.go b/cmd/homeserver_offline_exporters/import_to_synapse/main.go index 3c7db1e2..850816f0 100644 --- a/cmd/homeserver_offline_exporters/import_to_synapse/main.go +++ b/cmd/homeserver_offline_exporters/import_to_synapse/main.go @@ -10,7 +10,7 @@ import ( "github.com/disintegration/imaging" "github.com/t2bot/matrix-media-repo/archival/v2archive" - "github.com/t2bot/matrix-media-repo/cmd/homeserver_offline_exporters/_common" + "github.com/t2bot/matrix-media-repo/cmd/homeserver_offline_exporters/internal" "github.com/t2bot/matrix-media-repo/common/config" "github.com/t2bot/matrix-media-repo/common/rcontext" "github.com/t2bot/matrix-media-repo/homeserver_interop/synapse" @@ -33,7 +33,7 @@ var synapseDefaultSizes = []thumbnailSize{ } func main() { - cfg := _common.InitExportPsqlFlatFile("Synapse", "media_store_path") + cfg := internal.InitExportPsqlFlatFile("Synapse", "media_store_path") ctx := rcontext.InitialNoConfig() ctx.Config.Thumbnails = config.ThumbnailsConfig{ Types: []string{ @@ -58,7 +58,7 @@ func main() { panic(err) } - err = _common.ProcessArchiveDirectory(ctx, cfg.ServerName, cfg.SourcePath, func(record *v2archive.ManifestRecord, f io.ReadCloser) error { + err = internal.ProcessArchiveDirectory(ctx, cfg.ServerName, cfg.SourcePath, func(record *v2archive.ManifestRecord, f io.ReadCloser) error { defer f.Close() mxc := util.MxcUri(record.Origin, record.MediaId) diff --git a/cmd/homeserver_offline_exporters/_common/archive_reader.go b/cmd/homeserver_offline_exporters/internal/archive_reader.go similarity index 99% rename from cmd/homeserver_offline_exporters/_common/archive_reader.go rename to cmd/homeserver_offline_exporters/internal/archive_reader.go index 3974860d..26659248 100644 --- a/cmd/homeserver_offline_exporters/_common/archive_reader.go +++ b/cmd/homeserver_offline_exporters/internal/archive_reader.go @@ -1,4 +1,4 @@ -package _common +package internal import ( "io" diff --git a/cmd/homeserver_offline_exporters/_common/init_export.go b/cmd/homeserver_offline_exporters/internal/init_export.go similarity index 99% rename from cmd/homeserver_offline_exporters/_common/init_export.go rename to cmd/homeserver_offline_exporters/internal/init_export.go index 398abce9..ea76978c 100644 --- a/cmd/homeserver_offline_exporters/_common/init_export.go +++ b/cmd/homeserver_offline_exporters/internal/init_export.go @@ -1,4 +1,4 @@ -package _common +package internal import ( "flag"