✨ 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,6 +1,7 @@
|
|||
package store
|
||||
|
||||
import (
|
||||
"codeberg.org/danjones000/lenore/config"
|
||||
st "github.com/go-ap/fedbox/storage"
|
||||
proc "github.com/go-ap/processing"
|
||||
"github.com/openshift/osin"
|
||||
|
|
@ -21,7 +22,19 @@ type ClientLister interface {
|
|||
GetClient(id string) (osin.Client, error)
|
||||
}
|
||||
|
||||
type Bootstrapper interface {
|
||||
// Bootstrap should initialize the data store so that it can be used.
|
||||
// This will be called every time the application starts, so it MUST be idempotent and doesn't delete existing data.
|
||||
// An option is to run migrations in this method.
|
||||
Bootstrap(config.Config) error
|
||||
}
|
||||
|
||||
type Store interface {
|
||||
Bootstrapper
|
||||
PartStore
|
||||
}
|
||||
|
||||
type PartStore interface {
|
||||
ClientSaver
|
||||
ClientLister
|
||||
proc.Store
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue