summaryrefslogtreecommitdiff
path: root/internal/federation/federatingdb/db.go
diff options
context:
space:
mode:
authorLibravatar kim <89579420+NyaaaWhatsUpDoc@users.noreply.github.com>2023-09-23 17:44:11 +0100
committerLibravatar GitHub <noreply@github.com>2023-09-23 18:44:11 +0200
commit8f67dd583d86155440e7905ae23083a9fea42f72 (patch)
treee67abf09a53c2d9053df8072b074a026969d93ef /internal/federation/federatingdb/db.go
parent[chore] fix typo in slice.go (#2219) (diff)
downloadgotosocial-8f67dd583d86155440e7905ae23083a9fea42f72.tar.xz
[chore] deinterface the typeutils.Converter and update to use state structure (#2217)
* update typeconverter to use state structure * deinterface the typeutils.TypeConverter -> typeutils.Converter * finish copying over old type converter code comments * fix cherry-pick merge issues, fix tests pointing to old typeutils interface type still
Diffstat (limited to 'internal/federation/federatingdb/db.go')
-rw-r--r--internal/federation/federatingdb/db.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/internal/federation/federatingdb/db.go b/internal/federation/federatingdb/db.go
index bc1415dd5..3f35a96c3 100644
--- a/internal/federation/federatingdb/db.go
+++ b/internal/federation/federatingdb/db.go
@@ -39,17 +39,17 @@ type DB interface {
// FederatingDB uses the underlying DB interface to implement the go-fed pub.Database interface.
// It doesn't care what the underlying implementation of the DB interface is, as long as it works.
type federatingDB struct {
- locks mutexes.MutexMap
- state *state.State
- typeConverter typeutils.TypeConverter
+ locks mutexes.MutexMap
+ state *state.State
+ converter *typeutils.Converter
}
// New returns a DB interface using the given database and config
-func New(state *state.State, tc typeutils.TypeConverter) DB {
+func New(state *state.State, converter *typeutils.Converter) DB {
fdb := federatingDB{
- locks: mutexes.NewMap(-1, -1), // use defaults
- state: state,
- typeConverter: tc,
+ locks: mutexes.NewMap(-1, -1), // use defaults
+ state: state,
+ converter: converter,
}
return &fdb
}