Documentation ¶
Index ¶
- func CopyFile(ctx context.Context, fromId, toId int64, fileIds []int64) (totalSize uint64, err error)
- func CopyFolder(ctx context.Context, to *model.Folder, foders []*model.Folder) (totalSize uint64, err error)
- func CreateFolder(ctx context.Context, folder *model.Folder) (err error)
- func DeleteFile(ctx context.Context, ids []int64, folderId int64) (allowDelFileHashList []string, err error)
- func DeleteFolder(ctx context.Context, ids []int64, userId int64) (allowDelFileHashList []string, err error)
- func ExistFile(ctx context.Context, filename string, folderId, userId int64) (isExist bool, err error)
- func ExistFolder(ctx context.Context, userId, parentId int64, folderName string) (isExist bool)
- func GroupCreate(ctx context.Context, group *model.Group) (err error)
- func GroupDelete(ctx context.Context, id int64) (err error)
- func GroupExist(ctx context.Context, name string) (isExist bool, err error)
- func GroupList(ctx context.Context, offset, limit int64) (groups []*model.WrapGroupList, count int64, err error)
- func GroupUpdate(ctx context.Context, id int64, data map[string]interface{}) (err error)
- func ListFolder(ctx context.Context, folderIds []int64, userId int64) (folder []*model.Folder, err error)
- func LoadFile(ctx context.Context, folderId, fileId, userId int64) (file *model.File, err error)
- func LoadFolder(ctx context.Context, id, userId int64, isLoadRelated bool) (folder *model.Folder, err error)
- func LoadFolderFilesByFolderIdAndFileIds(ctx context.Context, folderId int64, fileIds []int64, userId int64) (folderFiles []*model.WrapFolderFile, err error)
- func LoadFolderFilesByFolderIds(ctx context.Context, folderIds []int64, userId int64) (folderFiles []*model.WrapFolderFile, err error)
- func LoadSimpleFolder(ctx context.Context, id, userId int64) (folder *model.SimpleFolder, err error)
- func MoveFile(ctx context.Context, fromId, toId int64, fileIds []int64) (err error)
- func MoveFolder(ctx context.Context, to *model.Folder, ids []int64) (err error)
- func NewCertificateService(cs model.CertificateStore) model.CertificateService
- func NewContext(ctx context.Context, s Service) context.Context
- func NewFileService(fs model.FileStore) model.FileService
- func NewFolderFileService(fs model.FolderFileStore) model.FolderFileService
- func NewFolderService(ds model.FolderStore) model.FolderService
- func NewGroupService(gs model.GroupStore) model.GroupService
- func NewShareService(ss model.ShareStore) model.ShareService
- func NewTicketService(ts model.TicketStore, ticketTTL time.Duration) model.TicketService
- func NewUserService(us model.UserStore, cs model.CertificateStore, tSvc model.TicketService, ...) model.UserService
- func RenameFile(ctx context.Context, folderId, fileId int64, newName string) (err error)
- func RenameFolder(ctx context.Context, id, currentFolderId int64, newName string) (err error)
- func SaveFileToFolder(ctx context.Context, file *model.File, folderId int64) (err error)
- func TicketDestroy(ctx context.Context, ticketId string) error
- func TicketIsValid(ctx context.Context, ticketId string) (isValid bool, userId int64, err error)
- func UserList(ctx context.Context, offset, limit int64) (user []*model.User, count int64, err error)
- func UserListByUserIds(ctx context.Context, userIds []interface{}) ([]*model.User, error)
- func UserLoad(ctx context.Context, id int64) (*model.User, error)
- func UserLoadAndRelated(ctx context.Context, id int64) (*model.User, error)
- func UserLogin(ctx context.Context, account, password string) (*model.Ticket, error)
- func UserRegister(ctx context.Context, account string, certificateType model.CertificateType, ...) (userId int64, err error)
- func UserUpdate(ctx context.Context, userId int64, data map[string]interface{}) error
- func UserUpdateBanStatus(ctx context.Context, userId int64, newBanStatus bool) error
- func UserUpdatePassword(ctx context.Context, userId int64, newPassword string) error
- func UserUpdateUsedStorage(ctx context.Context, userId int64, storage uint64, operator string) error
- type Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CopyFolder ¶
func DeleteFile ¶
func DeleteFolder ¶
func ExistFolder ¶
func GroupUpdate ¶
func ListFolder ¶
func LoadFolder ¶
func LoadSimpleFolder ¶
func NewCertificateService ¶
func NewCertificateService(cs model.CertificateStore) model.CertificateService
func NewFileService ¶
func NewFileService(fs model.FileStore) model.FileService
func NewFolderFileService ¶
func NewFolderFileService(fs model.FolderFileStore) model.FolderFileService
func NewFolderService ¶
func NewFolderService(ds model.FolderStore) model.FolderService
func NewGroupService ¶
func NewGroupService(gs model.GroupStore) model.GroupService
func NewShareService ¶
func NewShareService(ss model.ShareStore) model.ShareService
func NewTicketService ¶
func NewTicketService(ts model.TicketStore, ticketTTL time.Duration) model.TicketService
func NewUserService ¶
func NewUserService(us model.UserStore, cs model.CertificateStore, tSvc model.TicketService, h hasher.Hasher) model.UserService
func RenameFile ¶
func RenameFolder ¶
func SaveFileToFolder ¶
func TicketIsValid ¶
func UserListByUserIds ¶
func UserLoadAndRelated ¶
func UserRegister ¶
func UserUpdate ¶
func UserUpdateBanStatus ¶
func UserUpdatePassword ¶
Types ¶
type Service ¶
type Service interface { model.TicketService model.UserService model.CertificateService model.FileService model.GroupService model.ShareService model.FolderService model.FolderFileService }
func FromContext ¶
Click to show internal directories.
Click to hide internal directories.