Skip to content

Commit

Permalink
move cmd/homeserver_live_importers/_common to cmd/homeserver_live_imp…
Browse files Browse the repository at this point in the history
…orters/internal
  • Loading branch information
mpldr committed Mar 3, 2024
1 parent dc277e9 commit 1f3380e
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions cmd/homeserver_live_importers/import_dendrite/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ package main

import (
"github.com/sirupsen/logrus"
"github.com/t2bot/matrix-media-repo/cmd/homeserver_live_importers/_common"
"github.com/t2bot/matrix-media-repo/cmd/homeserver_live_importers/internal"
"github.com/t2bot/matrix-media-repo/common/rcontext"
"github.com/t2bot/matrix-media-repo/homeserver_interop/dendrite"
)

func main() {
cfg := _common.InitImportPsqlMatrixDownload("Dendrite")
cfg := internal.InitImportPsqlMatrixDownload("Dendrite")
ctx := rcontext.Initial()

ctx.Log.Debug("Connecting to homeserver database...")
Expand All @@ -17,8 +17,8 @@ func main() {
logrus.Fatalf("Failed to open database: %v", err)
}

_common.PsqlMatrixDownloadCopy[dendrite.LocalMedia](ctx, cfg, hsDb, func(record *dendrite.LocalMedia) (*_common.MediaMetadata, error) {
return &_common.MediaMetadata{
internal.PsqlMatrixDownloadCopy[dendrite.LocalMedia](ctx, cfg, hsDb, func(record *dendrite.LocalMedia) (*internal.MediaMetadata, error) {
return &internal.MediaMetadata{
MediaId: record.MediaId,
ContentType: record.ContentType,
FileName: record.UploadName,
Expand Down
8 changes: 4 additions & 4 deletions cmd/homeserver_live_importers/import_synapse/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ package main

import (
"github.com/sirupsen/logrus"
"github.com/t2bot/matrix-media-repo/cmd/homeserver_live_importers/_common"
"github.com/t2bot/matrix-media-repo/cmd/homeserver_live_importers/internal"
"github.com/t2bot/matrix-media-repo/common/rcontext"
"github.com/t2bot/matrix-media-repo/homeserver_interop/synapse"
)

func main() {
cfg := _common.InitImportPsqlMatrixDownload("Synapse")
cfg := internal.InitImportPsqlMatrixDownload("Synapse")
ctx := rcontext.Initial()

ctx.Log.Debug("Connecting to homeserver database...")
Expand All @@ -17,8 +17,8 @@ func main() {
logrus.Fatalf("Failed to open database: %v", err)
}

_common.PsqlMatrixDownloadCopy[synapse.LocalMedia](ctx, cfg, hsDb, func(record *synapse.LocalMedia) (*_common.MediaMetadata, error) {
return &_common.MediaMetadata{
internal.PsqlMatrixDownloadCopy[synapse.LocalMedia](ctx, cfg, hsDb, func(record *synapse.LocalMedia) (*internal.MediaMetadata, error) {
return &internal.MediaMetadata{
MediaId: record.MediaId,
ContentType: record.ContentType,
FileName: record.UploadName,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package _common
package internal

import (
"errors"
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 1f3380e

Please sign in to comment.