Documentation ¶
Index ¶
- type BaseStore
- func (st *BaseStore) AddFileInfo(ctx context.Context, infoId, userId uint64, itemPath string, info *db.FileInfo) error
- func (st *BaseStore) AddRole(role string) error
- func (st *BaseStore) AddSharing(ctx context.Context, infoId, userId uint64, dirPath string) error
- func (st *BaseStore) AddUploadInfos(ctx context.Context, uploadId, userId uint64, tmpPath, filePath string, ...) error
- func (st *BaseStore) AddUser(ctx context.Context, user *db.User) error
- func (st *BaseStore) Close() error
- func (st *BaseStore) Db() db.IDB
- func (st *BaseStore) DelFileInfo(ctx context.Context, userID uint64, itemPath string) error
- func (st *BaseStore) DelRole(role string) error
- func (st *BaseStore) DelSharing(ctx context.Context, userId uint64, dirPath string) error
- func (st *BaseStore) DelUploadingInfos(ctx context.Context, userId uint64, realPath string) error
- func (st *BaseStore) DelUser(ctx context.Context, id uint64) error
- func (st *BaseStore) GetCfg(ctx context.Context) (*db.SiteConfig, error)
- func (st *BaseStore) GetFileInfo(ctx context.Context, itemPath string) (*db.FileInfo, error)
- func (st *BaseStore) GetSharingDir(ctx context.Context, hashID string) (string, error)
- func (st *BaseStore) GetUploadInfo(ctx context.Context, userId uint64, filePath string) (string, int64, int64, error)
- func (st *BaseStore) GetUser(ctx context.Context, id uint64) (*db.User, error)
- func (st *BaseStore) GetUserByName(ctx context.Context, name string) (*db.User, error)
- func (st *BaseStore) Init(ctx context.Context, rootName, rootPwd string, cfg *db.SiteConfig) error
- func (st *BaseStore) InitConfigTable(ctx context.Context, tx *sql.Tx, cfg *db.SiteConfig) error
- func (st *BaseStore) InitFileTables(ctx context.Context, tx *sql.Tx) error
- func (st *BaseStore) InitUserTable(ctx context.Context, tx *sql.Tx, rootName, rootPwd string) error
- func (st *BaseStore) IsInited() bool
- func (st *BaseStore) IsSharing(ctx context.Context, dirPath string) (bool, error)
- func (st *BaseStore) ListFileInfos(ctx context.Context, itemPaths []string) (map[string]*db.FileInfo, error)
- func (st *BaseStore) ListRoles() (map[string]bool, error)
- func (st *BaseStore) ListSharingsByLocation(ctx context.Context, location string) (map[string]string, error)
- func (st *BaseStore) ListUploadInfos(ctx context.Context, userId uint64) ([]*db.UploadInfo, error)
- func (st *BaseStore) ListUserIDs(ctx context.Context) (map[string]string, error)
- func (st *BaseStore) ListUsers(ctx context.Context) ([]*db.User, error)
- func (st *BaseStore) MoveFileInfo(ctx context.Context, userId uint64, oldPath, newPath string, isDir bool) error
- func (st *BaseStore) MoveUploadingInfos(ctx context.Context, infoId, userId uint64, uploadPath, itemPath string) error
- func (st *BaseStore) ResetUsed(ctx context.Context, id uint64, used int64) error
- func (st *BaseStore) SetClientCfg(ctx context.Context, cfg *db.ClientConfig) error
- func (st *BaseStore) SetInfo(ctx context.Context, id uint64, user *db.User) error
- func (st *BaseStore) SetPreferences(ctx context.Context, id uint64, prefers *db.Preferences) error
- func (st *BaseStore) SetPwd(ctx context.Context, id uint64, pwd string) error
- func (st *BaseStore) SetSha1(ctx context.Context, itemPath, sign string) error
- func (st *BaseStore) SetUploadInfo(ctx context.Context, userId uint64, filePath string, newUploaded int64) error
- func (st *BaseStore) SetUsed(ctx context.Context, id uint64, incr bool, capacity int64) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseStore ¶
type BaseStore struct {
// contains filtered or unexported fields
}
func NewBaseStore ¶
func (*BaseStore) AddFileInfo ¶
func (*BaseStore) AddSharing ¶
func (*BaseStore) AddUploadInfos ¶
func (*BaseStore) DelFileInfo ¶
func (*BaseStore) DelSharing ¶
func (*BaseStore) DelUploadingInfos ¶
func (*BaseStore) GetFileInfo ¶
func (*BaseStore) GetSharingDir ¶
func (*BaseStore) GetUploadInfo ¶
func (*BaseStore) GetUserByName ¶
func (*BaseStore) InitConfigTable ¶
func (*BaseStore) InitFileTables ¶
func (*BaseStore) InitUserTable ¶
func (*BaseStore) ListFileInfos ¶
func (*BaseStore) ListSharingsByLocation ¶
func (*BaseStore) ListUploadInfos ¶
func (*BaseStore) ListUserIDs ¶
func (*BaseStore) MoveFileInfo ¶
func (*BaseStore) MoveUploadingInfos ¶
func (*BaseStore) SetClientCfg ¶
func (*BaseStore) SetPreferences ¶
func (*BaseStore) SetUploadInfo ¶
Click to show internal directories.
Click to hide internal directories.