Documentation
¶
Index ¶
- type AzureStorage
- func (f *AzureStorage) Delete(name string, tag interface{}) (err error)
- func (f *AzureStorage) Get(name string, out io.Writer, metadataCb crypto.MetadataCb) (found bool, tag interface{}, err error)
- func (f *AzureStorage) GetInfoFile() (info *infofile.InfoFile, err error)
- func (f *AzureStorage) Init(connection string) error
- func (f *AzureStorage) Set(name string, in io.Reader, tag interface{}, metadata *crypto.Metadata) (tagOut interface{}, err error)
- func (f *AzureStorage) SetDataPath(path string)
- func (f *AzureStorage) SetInfoFile(info *infofile.InfoFile) (err error)
- func (f *AzureStorage) SetMasterKey(key []byte)
- type Fs
- type Local
- func (f *Local) Delete(name string, tag interface{}) (err error)
- func (f *Local) Get(name string, out io.Writer, metadataCb crypto.MetadataCb) (found bool, tag interface{}, err error)
- func (f *Local) GetInfoFile() (info *infofile.InfoFile, err error)
- func (f *Local) Init(connection string) error
- func (f *Local) Set(name string, in io.Reader, tag interface{}, metadata *crypto.Metadata) (tagOut interface{}, err error)
- func (f *Local) SetDataPath(path string)
- func (f *Local) SetInfoFile(info *infofile.InfoFile) (err error)
- func (f *Local) SetMasterKey(key []byte)
- type S3
- func (f *S3) Delete(name string, tag interface{}) (err error)
- func (f *S3) Get(name string, out io.Writer, metadataCb crypto.MetadataCb) (found bool, tag interface{}, err error)
- func (f *S3) GetInfoFile() (info *infofile.InfoFile, err error)
- func (f *S3) Init(connection string) error
- func (f *S3) Set(name string, in io.Reader, tag interface{}, metadata *crypto.Metadata) (tagOut interface{}, err error)
- func (f *S3) SetDataPath(path string)
- func (f *S3) SetInfoFile(info *infofile.InfoFile) (err error)
- func (f *S3) SetMasterKey(key []byte)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AzureStorage ¶
type AzureStorage struct {
// contains filtered or unexported fields
}
AzureStorage stores files on Azure Blob Storage
func (*AzureStorage) Delete ¶
func (f *AzureStorage) Delete(name string, tag interface{}) (err error)
func (*AzureStorage) Get ¶
func (f *AzureStorage) Get(name string, out io.Writer, metadataCb crypto.MetadataCb) (found bool, tag interface{}, err error)
func (*AzureStorage) GetInfoFile ¶
func (f *AzureStorage) GetInfoFile() (info *infofile.InfoFile, err error)
func (*AzureStorage) Init ¶
func (f *AzureStorage) Init(connection string) error
func (*AzureStorage) SetDataPath ¶ added in v0.3.0
func (f *AzureStorage) SetDataPath(path string)
func (*AzureStorage) SetInfoFile ¶
func (f *AzureStorage) SetInfoFile(info *infofile.InfoFile) (err error)
func (*AzureStorage) SetMasterKey ¶
func (f *AzureStorage) SetMasterKey(key []byte)
type Fs ¶
type Fs interface { // Init the object, by passing a connection string Init(connection string) error // SetDataPath sets the path where the data is stored (read from the info file) SetDataPath(path string) // SetMasterKey sets the master passphrase (used to encrypt/decrypt files) in the object SetMasterKey(key []byte) // GetInfoFile returns the contents of the info file GetInfoFile() (info *infofile.InfoFile, err error) // SetInfoFile stores the info file SetInfoFile(info *infofile.InfoFile) (err error) // Get returns a stream to a file in the filesystem // It also returns a tag (which might be empty) that should be passed to the Set method if you want to subsequentially update the contents of the file Get(name string, out io.Writer, metadataCb crypto.MetadataCb) (found bool, tag interface{}, err error) // Set writes a stream to the file in the filesystem // If you pass a tag, the implementation might use that to ensure that the file on the filesystem hasn't been changed since it was read (optional) Set(name string, in io.Reader, tag interface{}, metadata *crypto.Metadata) (tagOut interface{}, err error) // Delete a file from the filesystem // If you pass a tag, the implementation might use that to ensure that the file on the filesystem hasn't been changed since it was read (optional) Delete(name string, tag interface{}) (err error) }
Fs is the interface for the filesystem
type Local ¶
type Local struct {
// contains filtered or unexported fields
}
Local is the local file system This implementation does not rely on tags, as it's assumed that concurrency isn't an issue on a single machine
func (*Local) SetDataPath ¶ added in v0.3.0
func (*Local) SetMasterKey ¶
type S3 ¶ added in v0.1.1
type S3 struct {
// contains filtered or unexported fields
}
S3 stores files on a S3-compatible service This implementation does not rely on tags because S3 does not support conditional put requests
func (*S3) GetInfoFile ¶ added in v0.1.1
func (*S3) SetDataPath ¶ added in v0.3.0
func (*S3) SetInfoFile ¶ added in v0.1.1
func (*S3) SetMasterKey ¶ added in v0.1.1
Click to show internal directories.
Click to hide internal directories.