Documentation ¶
Index ¶
- Constants
- func AppendFile(db *sql.DB, fi DbFileInfo, folderId int64)
- func AppendFolder(db *sql.DB, fi DbFileInfo, parentId int64) int64
- func CheckDatabase()
- func ClearUserStorage(userId int)
- func GetDbConnection() *sql.DB
- func RemoveFile(fileId int64)
- func RemoveFolder(folderId int64)
- func ShareFolderToUser(folderId int64, userId int, readOnly bool)
- type DbFileInfo
- func FindSharedRootFolder(url string, userId int) (item DbFileInfo, found bool)
- func GetFileInfo(url string, userId int, urlPrefix string) (file DbFileInfo, hasAccess bool)
- func GetFolderContent(url string, userId int, urlPrefix string, includeContent bool) (items []DbFileInfo, found bool)
- func GetFolderInfo(url string, userId int) (item *DbFileInfo, found bool)
- func GetFolderInfoById(folderId int64) (item *DbFileInfo, found bool)
- type DbHierarchyItem
Constants ¶
View Source
const UrlSeparator string = "/"
Variables ¶
This section is empty.
Functions ¶
func AppendFile ¶
func AppendFile(db *sql.DB, fi DbFileInfo, folderId int64)
func AppendFolder ¶
func AppendFolder(db *sql.DB, fi DbFileInfo, parentId int64) int64
func CheckDatabase ¶
func CheckDatabase()
func ClearUserStorage ¶
func ClearUserStorage(userId int)
func GetDbConnection ¶
func RemoveFile ¶
func RemoveFile(fileId int64)
func RemoveFolder ¶
func RemoveFolder(folderId int64)
func ShareFolderToUser ¶
Types ¶
type DbFileInfo ¶
type DbFileInfo struct { Id int64 IsDir bool IsReadOnly bool Name string Path string ETag string Mime string Size int64 CreatedDateUtc time.Time ModifiedDateUtc time.Time OwnerId int }
func FindSharedRootFolder ¶
func FindSharedRootFolder(url string, userId int) (item DbFileInfo, found bool)
func GetFileInfo ¶
func GetFileInfo(url string, userId int, urlPrefix string) (file DbFileInfo, hasAccess bool)
func GetFolderContent ¶
func GetFolderInfo ¶
func GetFolderInfo(url string, userId int) (item *DbFileInfo, found bool)
func GetFolderInfoById ¶
func GetFolderInfoById(folderId int64) (item *DbFileInfo, found bool)
type DbHierarchyItem ¶
type DbHierarchyItem struct { Id int64 IsDir bool Name string OwnerId int ParentId *int64 Child *DbHierarchyItem }
func GetFileHierarchy ¶
func GetFileHierarchy(fileId int64) (root DbHierarchyItem, found bool)
Click to show internal directories.
Click to hide internal directories.