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
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 a31465b - the package naming is deliberate

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