working toward storing state in db
This commit is contained in:
@@ -1,13 +1,15 @@
|
||||
package storage
|
||||
|
||||
import "errors"
|
||||
import "io/ioutil"
|
||||
import "path/filepath"
|
||||
import "os"
|
||||
import "strings"
|
||||
import "sync"
|
||||
import (
|
||||
"errors"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"sync"
|
||||
|
||||
import "git.eeqj.de/sneak/feta/toot"
|
||||
"git.eeqj.de/sneak/feta/toot"
|
||||
)
|
||||
|
||||
// TootStorageBackend is the interface to which storage backends must
|
||||
// conform for storing toots
|
||||
@@ -17,6 +19,10 @@ type TootStorageBackend interface {
|
||||
StoreToots(tc []*toot.Toot) error
|
||||
}
|
||||
|
||||
type TootDBStorage struct {
|
||||
db string
|
||||
}
|
||||
|
||||
// TootFSStorage is a TootStorageBackend that writes to the local
|
||||
// filesystem.
|
||||
type TootFSStorage struct {
|
||||
|
||||
Reference in New Issue
Block a user