Documentation
¶
Index ¶
- func ComputeHash(content []byte) ([]byte, error)
- func ComputeHashFromOS(path string) ([]byte, error)
- func PrintFileInfo(name string) error
- func Revision() string
- type DBClient
- func (c *DBClient) CompareHash(id uuid.UUID, hash []byte) (bool, error)
- func (c *DBClient) CompareHashFromOS(id uuid.UUID, path string) (bool, error)
- func (c *DBClient) CreateFile(name string, contentType string, content []byte) (uuid.UUID, error)
- func (c *DBClient) CreateFileFromOS(name string) (uuid.UUID, error)
- func (c *DBClient) DeleteFiles(ids ...uuid.UUID) (deletedIDs []uuid.UUID, err error)
- func (c *DBClient) DownloadFile(id uuid.UUID, path string, overwrite bool) (length int, version int, name string, err error)
- func (c *DBClient) Init() error
- func (c *DBClient) ListFiles() (files []FileInfo, err error)
- func (c *DBClient) ListVersions() (map[uuid.UUID]int, error)
- func (c *DBClient) PrintFileInfo(name string) errordeprecated
- func (c *DBClient) ReadFileInfo(id uuid.UUID) (info FileInfo, err error)
- func (c *DBClient) UpdateFile(id uuid.UUID, name string, contentType string, content []byte) (uuid.UUID, error)
- func (c *DBClient) UpdateFileFromOS(id uuid.UUID, name string) (uuid.UUID, error)
- type FileBuffer
- type FileInfo
- type FilePatch
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ComputeHash ¶ added in v0.4.0
func ComputeHashFromOS ¶ added in v0.2.0
func PrintFileInfo ¶
Types ¶
type DBClient ¶
func (*DBClient) CompareHash ¶ added in v0.2.0
func (*DBClient) CompareHashFromOS ¶ added in v0.2.0
func (*DBClient) CreateFile ¶
func (*DBClient) CreateFileFromOS ¶
func (*DBClient) DeleteFiles ¶
func (*DBClient) DownloadFile ¶
func (c *DBClient) DownloadFile(id uuid.UUID, path string, overwrite bool) (length int, version int, name string, err error)
Downloads the specified file from the database.
If path is "", dowloads to temporary directory specified by TEMPDIR. Otherwise, downloads to specified directory or file.
func (*DBClient) PrintFileInfo
deprecated
func (*DBClient) ReadFileInfo ¶
func (*DBClient) UpdateFile ¶
type FileBuffer ¶
Click to show internal directories.
Click to hide internal directories.