✨ Improve Store
Still need to fill out SQLite bootstrap Also setup plug-in system mechanism
This commit is contained in:
parent
c4513aa94b
commit
e7b88bcc09
10 changed files with 154 additions and 6 deletions
|
|
@ -1,13 +1,17 @@
|
|||
package testmocks
|
||||
|
||||
import (
|
||||
"codeberg.org/danjones000/lenore/store"
|
||||
"codeberg.org/danjones000/lenore/config"
|
||||
vocab "github.com/go-ap/activitypub"
|
||||
"github.com/go-ap/filters"
|
||||
)
|
||||
|
||||
type st struct{}
|
||||
|
||||
func (s *st) Bootstrap(config.Config) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (s *st) Load(iri vocab.IRI, filters ...filters.Check) (vocab.Item, error) {
|
||||
i := vocab.ActorNew(iri, vocab.ActorType)
|
||||
return i, nil
|
||||
|
|
@ -36,6 +40,6 @@ func (s *st) RemoveFrom(col vocab.IRI, it vocab.Item) error {
|
|||
func (s *st) Close() {
|
||||
}
|
||||
|
||||
func GetStore() store.Store {
|
||||
func GetStore() *st {
|
||||
return &st{}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue