Documentation ¶
Index ¶
- Variables
- type DriveFileStore
- func (d *DriveFileStore) DeleteAllFiles() error
- func (d *DriveFileStore) DeleteFile(file string) error
- func (d *DriveFileStore) FileExists(path string) (bool, error)
- func (d *DriveFileStore) GetFileContents(path string) (io.ReadCloser, error)
- func (d *DriveFileStore) GetFiles() ([]*StoredFile, error)
- func (d *DriveFileStore) GetModifiedTime(path string) (time.Time, error)
- func (d *DriveFileStore) WriteFileContents(path string, reader io.Reader) error
- type FileStore
- type LocalFileStore
- func (l *LocalFileStore) DeleteAllFiles() error
- func (l *LocalFileStore) DeleteFile(path string) error
- func (l *LocalFileStore) FileExists(path string) (bool, error)
- func (l *LocalFileStore) GetFileContents(path string) (io.ReadCloser, error)
- func (l *LocalFileStore) GetFiles() ([]*StoredFile, error)
- func (l *LocalFileStore) GetModifiedTime(path string) (time.Time, error)
- func (l *LocalFileStore) WriteFileContents(path string, contentReader io.Reader) error
- type StoredFile
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrStateTokenMismatch = errors.New("state token mismatch")
Functions ¶
This section is empty.
Types ¶
type DriveFileStore ¶
File store that uses Google Drive.
func (*DriveFileStore) DeleteAllFiles ¶
func (d *DriveFileStore) DeleteAllFiles() error
func (*DriveFileStore) DeleteFile ¶
func (d *DriveFileStore) DeleteFile(file string) error
func (*DriveFileStore) FileExists ¶
func (d *DriveFileStore) FileExists(path string) (bool, error)
func (*DriveFileStore) GetFileContents ¶
func (d *DriveFileStore) GetFileContents(path string) (io.ReadCloser, error)
func (*DriveFileStore) GetFiles ¶
func (d *DriveFileStore) GetFiles() ([]*StoredFile, error)
func (*DriveFileStore) GetModifiedTime ¶
func (d *DriveFileStore) GetModifiedTime(path string) (time.Time, error)
func (*DriveFileStore) WriteFileContents ¶
func (d *DriveFileStore) WriteFileContents(path string, reader io.Reader) error
type FileStore ¶
type FileStore interface { // GetFiles returns the list of file that are stored in this file store. GetFiles() ([]*StoredFile, error) // GetFileContents returns the contents of the file that are stored in this file store. GetFileContents(path string) (io.ReadCloser, error) // WriteFileContents writes the contents to the file store. Creates the file if it doesn't exist. Also creates any // parent directories that do not exist. WriteFileContents(path string, contentReader io.Reader) error // DeleteFile deletes the file in this file store. DeleteFile(path string) error // DeleteAllFiles deletes all files in this file store. DeleteAllFiles() error // GetModifiedTime returns the time the file was last modified. GetModifiedTime(path string) (time.Time, error) // FileExists returns true if the file exists in this file store. FileExists(path string) (bool, error) }
type LocalFileStore ¶
type LocalFileStore struct{}
For accessing local files.
func (*LocalFileStore) DeleteAllFiles ¶
func (l *LocalFileStore) DeleteAllFiles() error
func (*LocalFileStore) DeleteFile ¶
func (l *LocalFileStore) DeleteFile(path string) error
func (*LocalFileStore) FileExists ¶
func (l *LocalFileStore) FileExists(path string) (bool, error)
func (*LocalFileStore) GetFileContents ¶
func (l *LocalFileStore) GetFileContents(path string) (io.ReadCloser, error)
func (*LocalFileStore) GetFiles ¶
func (l *LocalFileStore) GetFiles() ([]*StoredFile, error)
func (*LocalFileStore) GetModifiedTime ¶
func (l *LocalFileStore) GetModifiedTime(path string) (time.Time, error)
func (*LocalFileStore) WriteFileContents ¶
func (l *LocalFileStore) WriteFileContents(path string, contentReader io.Reader) error
type StoredFile ¶
Click to show internal directories.
Click to hide internal directories.