Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Misc fixes #560

Open
wants to merge 22 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions cmd/homeserver_live_importers/import_dendrite/main.go
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please revert 1f3380e - the package naming is deliberate

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