Documentation ¶
Overview ¶
Package textile uses Textileio ThreadsDB to implement the github.com/google/note-maps/note interfaces.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Database ¶
type Database struct {
// contains filtered or unexported fields
}
Database is meant to implement the note.IsolatedReadWriteCloser interface.
func Open ¶
Open creates a Database that replicates through net n.
All options are optional, but if non are provided the database may not be reusable.
func (*Database) GetThreadID ¶
func (*Database) IsolatedRead ¶
func (x *Database) IsolatedRead(f func(r note.FindLoader) error) error
func (*Database) IsolatedWrite ¶
func (x *Database) IsolatedWrite(f func(rw note.FindLoadPatcher) error) error
type Option ¶
type Option func(*Options)
func WithBaseDirectory ¶
func WithGetSecret ¶
func WithSetSecret ¶
func WithThread ¶
type Options ¶
type Options struct { // BaseDirectory is a directory within which many databases might stored. // // It might typically be something like "$XDG_DATA_HOME/$argv[0]" BaseDirectory string // Thread is a printable multibase representation of the thread identifier. Thread string // Key is a printable representation of the thread encryption keys for // service/replication and, optionally, for reading. Key string // GetSecret will be used to load the thread encryption keys if none are // provided in the Key field. GetSecret // SetSecret will be used to store the thread encyrption keys. SetSecret }
Click to show internal directories.
Click to hide internal directories.