Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrUnknownDriver is returned when a driver is not recognised. ErrUnknownDriver = errors.New("unknown driver") // ErrDocumentInvalid is returned when a document is invalid. ErrDocumentInvalid = errors.New("document is invalid") )
Functions ¶
This section is empty.
Types ¶
type AWSS3 ¶
type AWSS3 struct {
// contains filtered or unexported fields
}
AWS S3 is a storage implementation that stores all data in AWS S3.
func (*AWSS3) WithEncryptionKey ¶
WithEncryptionKey sets the encryption key.
type Memory ¶
type Memory struct {
// contains filtered or unexported fields
}
Memory is a storage implementation that stores all data in memory.
func (*Memory) WithEncryptionKey ¶
WithEncryptionKey sets the encryption key.
type Storage ¶
type Storage interface { // Write writes a document to the storage, if the document already exists // with the same ID it will be overwritten. Write(doc *document.Document) error // Delete deletes a document from the storage. Delete(doc *document.Document) error // Stream streams documents from the storage. Stream() (<-chan *document.Document, error) }
Storage is an interface for storage implementations.
Click to show internal directories.
Click to hide internal directories.