Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DropboxStorage ¶
type DropboxStorage struct {
Path string
}
DropboxStorage provides file-system based storage
func NewDropboxStorage ¶
func NewDropboxStorage(path string) *DropboxStorage
func (*DropboxStorage) Read ¶
func (f *DropboxStorage) Read(rid string) ([]byte, error)
Read implements Storage.Read method
func (*DropboxStorage) Records ¶
func (f *DropboxStorage) Records() ([]string, error)
Records implement Storage Records method
type FileStorage ¶
type FileStorage struct {
Path string
}
FileStorage provides file-system based storage
func NewFileStorage ¶
func NewFileStorage(path string) *FileStorage
func (*FileStorage) Read ¶
func (f *FileStorage) Read(rid string) ([]byte, error)
Read implements Storage.Read method
func (*FileStorage) Records ¶
func (f *FileStorage) Records() ([]string, error)
Records implement Storage Records method
type GoogleDriveStorage ¶
type GoogleDriveStorage struct {
Path string
}
GoogleDriveStorage provides file-system based storage
func NewGoogleDriveStorage ¶
func NewGoogleDriveStorage(path string) *GoogleDriveStorage
func (*GoogleDriveStorage) Read ¶
func (f *GoogleDriveStorage) Read(rid string) ([]byte, error)
Read implements Storage.Read method
func (*GoogleDriveStorage) Records ¶
func (f *GoogleDriveStorage) Records() ([]string, error)
Records implement Storage Records method
type SSHStorage ¶
type SSHStorage struct {
Path string
}
SSHStorage provides file-system based storage
func NewSSHStorage ¶
func NewSSHStorage(path string) *SSHStorage
func (*SSHStorage) Read ¶
func (f *SSHStorage) Read(rid string) ([]byte, error)
Read implements Storage.Read method
func (*SSHStorage) Records ¶
func (f *SSHStorage) Records() ([]string, error)
Records implement Storage Records method
type Storage ¶
type Storage interface { // Read reades from storage Read(rid string) ([]byte, error) // Write writes given record to storage using givne file name Write(fname string, rec []byte) error // Records return list of record ids from storage Records() ([]string, error) }
Storage defines generic storage interface
Click to show internal directories.
Click to hide internal directories.