working toward storing state in db

This commit is contained in:
2020-03-27 16:02:36 -07:00
parent 4f654a9423
commit 23c1b08798
14 changed files with 553 additions and 193 deletions

View File

@@ -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 {