Documentation ¶
Index ¶
- Constants
- Variables
- func IsNotFound(err error) bool
- type FileInfo
- type FileInfoStore
- func (fi *FileInfoStore) AddSharing(dirPath string) error
- func (fi *FileInfoStore) DelInfo(itemPath string) error
- func (fi *FileInfoStore) DelSharing(dirPath string) error
- func (fi *FileInfoStore) GetInfo(itemPath string) (*FileInfo, error)
- func (fi *FileInfoStore) GetInfos(itemPaths []string) (map[string]*FileInfo, error)
- func (fi *FileInfoStore) GetSharing(dirPath string) (bool, bool)
- func (fi *FileInfoStore) GetSharingDir(hashID string) (string, error)
- func (fi *FileInfoStore) ListSharings(prefix string) (map[string]string, error)
- func (fi *FileInfoStore) SetInfo(itemPath string, info *FileInfo) error
- func (fi *FileInfoStore) SetSha1(itemPath, sign string) error
- type IFileInfoStore
Constants ¶
View Source
const ( InitNs = "Init" InfoNs = "sharing" InitTimeKey = "initTime" SchemaVerKey = "SchemaVersion" SchemaV1 = "v1" )
Variables ¶
Functions ¶
func IsNotFound ¶
Types ¶
type FileInfoStore ¶
type FileInfoStore struct {
// contains filtered or unexported fields
}
func NewFileInfoStore ¶
func NewFileInfoStore(store kvstore.IKVStore) (*FileInfoStore, error)
func (*FileInfoStore) AddSharing ¶
func (fi *FileInfoStore) AddSharing(dirPath string) error
func (*FileInfoStore) DelInfo ¶
func (fi *FileInfoStore) DelInfo(itemPath string) error
func (*FileInfoStore) DelSharing ¶
func (fi *FileInfoStore) DelSharing(dirPath string) error
func (*FileInfoStore) GetInfo ¶
func (fi *FileInfoStore) GetInfo(itemPath string) (*FileInfo, error)
func (*FileInfoStore) GetInfos ¶
func (fi *FileInfoStore) GetInfos(itemPaths []string) (map[string]*FileInfo, error)
func (*FileInfoStore) GetSharing ¶
func (fi *FileInfoStore) GetSharing(dirPath string) (bool, bool)
func (*FileInfoStore) GetSharingDir ¶ added in v0.5.0
func (fi *FileInfoStore) GetSharingDir(hashID string) (string, error)
func (*FileInfoStore) ListSharings ¶
func (fi *FileInfoStore) ListSharings(prefix string) (map[string]string, error)
func (*FileInfoStore) SetInfo ¶
func (fi *FileInfoStore) SetInfo(itemPath string, info *FileInfo) error
func (*FileInfoStore) SetSha1 ¶
func (fi *FileInfoStore) SetSha1(itemPath, sign string) error
type IFileInfoStore ¶
type IFileInfoStore interface { AddSharing(dirPath string) error DelSharing(dirPath string) error GetSharing(dirPath string) (bool, bool) ListSharings(prefix string) (map[string]string, error) GetInfo(itemPath string) (*FileInfo, error) SetInfo(itemPath string, info *FileInfo) error DelInfo(itemPath string) error SetSha1(itemPath, sign string) error GetInfos(itemPaths []string) (map[string]*FileInfo, error) GetSharingDir(hashID string) (string, error) }
Click to show internal directories.
Click to hide internal directories.