2018-10-05 03:18:34 +00:00
|
|
|
package storage
|
2018-10-06 03:50:55 +00:00
|
|
|
|
|
|
|
import (
|
2019-01-14 20:09:25 +00:00
|
|
|
"cwtch.im/cwtch/model"
|
2020-01-13 22:11:00 +00:00
|
|
|
"cwtch.im/cwtch/storage/v1"
|
2018-10-06 03:50:55 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
// ProfileStore is an interface to managing the storage of Cwtch Profiles
|
|
|
|
type ProfileStore interface {
|
2019-07-19 17:27:50 +00:00
|
|
|
GetProfileCopy(timeline bool) *model.Profile
|
2019-01-14 20:09:25 +00:00
|
|
|
}
|
|
|
|
|
2020-01-13 22:11:00 +00:00
|
|
|
// LoadProfileWriterStore loads a profile store from filestore listening for events and saving them
|
2019-05-15 20:12:11 +00:00
|
|
|
// directory should be $appDir/profiles/$rand
|
2021-11-18 23:43:58 +00:00
|
|
|
func LoadProfileWriterStore(directory, password string) (ProfileStore, error) {
|
|
|
|
return v1.LoadProfileWriterStore(directory, password)
|
2020-01-13 22:11:00 +00:00
|
|
|
}
|