Skip to content

Commit

Permalink
move cmd/homeserver_offline_importers/_common to cmd/homeserver_offli…
Browse files Browse the repository at this point in the history
…ne_importers/internal
  • Loading branch information
mpldr committed Mar 3, 2024
1 parent 1f3380e commit a31465b
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ import (
"path"

"github.com/t2bot/matrix-media-repo/archival/v2archive"
"github.com/t2bot/matrix-media-repo/cmd/homeserver_offline_importers/_common"
"github.com/t2bot/matrix-media-repo/cmd/homeserver_offline_importers/internal"
"github.com/t2bot/matrix-media-repo/common/rcontext"
"github.com/t2bot/matrix-media-repo/homeserver_interop/dendrite"
"github.com/t2bot/matrix-media-repo/util"
)

func main() {
cfg := _common.InitExportPsqlFlatFile("Dendrite", "media_api.base_path")
cfg := internal.InitExportPsqlFlatFile("Dendrite", "media_api.base_path")
ctx := rcontext.InitialNoConfig()

ctx.Log.Debug("Connecting to homeserver database...")
Expand All @@ -22,7 +22,7 @@ func main() {
panic(err)
}

_common.PsqlFlatFileArchive[dendrite.LocalMedia](ctx, cfg, hsDb, func(r *dendrite.LocalMedia) (v2archive.MediaInfo, io.ReadCloser, error) {
internal.PsqlFlatFileArchive[dendrite.LocalMedia](ctx, cfg, hsDb, func(r *dendrite.LocalMedia) (v2archive.MediaInfo, io.ReadCloser, error) {
// For Base64Hash ABCCDD :
// $importPath/A/B/CCDD/file

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ import (
"strings"

"github.com/t2bot/matrix-media-repo/archival/v2archive"
"github.com/t2bot/matrix-media-repo/cmd/homeserver_offline_importers/_common"
"github.com/t2bot/matrix-media-repo/cmd/homeserver_offline_importers/internal"
"github.com/t2bot/matrix-media-repo/common/rcontext"
"github.com/t2bot/matrix-media-repo/homeserver_interop/synapse"
"github.com/t2bot/matrix-media-repo/util"
)

func main() {
cfg := _common.InitExportPsqlFlatFile("Synapse", "media_store_path")
cfg := internal.InitExportPsqlFlatFile("Synapse", "media_store_path")
ctx := rcontext.InitialNoConfig()

ctx.Log.Debug("Connecting to homeserver database...")
Expand All @@ -23,7 +23,7 @@ func main() {
panic(err)
}

_common.PsqlFlatFileArchive[synapse.LocalMedia](ctx, cfg, hsDb, func(r *synapse.LocalMedia) (v2archive.MediaInfo, io.ReadCloser, error) {
internal.PsqlFlatFileArchive[synapse.LocalMedia](ctx, cfg, hsDb, func(r *synapse.LocalMedia) (v2archive.MediaInfo, io.ReadCloser, error) {
// For MediaID AABBCCDD :
// $importPath/local_content/AA/BB/CCDD
//
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package _common
package internal

import (
"fmt"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package _common
package internal

import (
"flag"
Expand Down

0 comments on commit a31465b

Please sign in to comment.