Documentation ¶
Index ¶
- Constants
- func GetAppInfo(code string) (*entity.AppRegisterInfo, error)
- type FileInfoRes
- type StorageApi
- func (s StorageApi) EnsureDirExist(ps ...string)
- func (s StorageApi) FileExists(path string) bool
- func (s StorageApi) InodeToFileInfo(inode int64) *FileInfoRes
- func (s StorageApi) InodeToPath(inode int64) string
- func (s StorageApi) InodesToFileInfos(inodes ...int64) map[string]FileInfoRes
- func (s StorageApi) MkdirAll(path string) error
- func (s StorageApi) Open(path string) (*os.File, error)
- func (s StorageApi) OpenFile(path string, flag int, perm os.FileMode) (*os.File, error)
- func (s StorageApi) PathToInode(path string) int64
- func (s StorageApi) Remove(path string) error
- func (s StorageApi) Rename(oldPath, newPath string) error
Constants ¶
View Source
const CoreHTTPPort = 40100
View Source
const LocalhostAddress = "http://10.62.0.1"
View Source
const OSHTTPPort = 40000
View Source
const UnixSocketPrefix = "/siyouyun/unix-socket/"
Variables ¶
This section is empty.
Functions ¶
func GetAppInfo ¶
func GetAppInfo(code string) (*entity.AppRegisterInfo, error)
Types ¶
type FileInfoRes ¶ added in v0.1.21
type FileInfoRes struct { Id int64 `json:"id"` HasThumbnail bool `json:"hasThumbnail"` Name string `json:"name"` Size int64 `json:"size"` ParentPath string `json:"parentPath"` FullPath string `json:"fullPath"` IsDir bool `json:"isDir"` Tag string `json:"tag"` Md5 string `json:"md5"` Extension string `json:"extension"` Mime string `json:"mime"` Owner string `json:"owner"` Atime int64 `json:"atime"` Mtime int64 `json:"mtime"` Ctime int64 `json:"ctime"` Tags interface{} `json:"tags"` Ext0 interface{} `json:"ext0"` Ext1 interface{} `json:"ext1"` Ext2 interface{} `json:"ext2"` EventList interface{} `json:"eventList,omitempty"` }
type StorageApi ¶ added in v0.1.21
type StorageApi struct {
// contains filtered or unexported fields
}
func NewStorageApi ¶ added in v0.1.21
func NewStorageApi(un *utils.UserNamespace) *StorageApi
func (StorageApi) EnsureDirExist ¶ added in v0.1.21
func (s StorageApi) EnsureDirExist(ps ...string)
EnsureDirExist 确保目录存在
func (StorageApi) FileExists ¶ added in v0.1.21
func (s StorageApi) FileExists(path string) bool
FileExists 文件是否存在
func (StorageApi) InodeToFileInfo ¶ added in v0.1.21
func (s StorageApi) InodeToFileInfo(inode int64) *FileInfoRes
InodeToFileInfo inode转fileInfo
func (StorageApi) InodeToPath ¶ added in v0.1.21
func (s StorageApi) InodeToPath(inode int64) string
InodeToPath inode转path
func (StorageApi) InodesToFileInfos ¶ added in v0.1.21
func (s StorageApi) InodesToFileInfos(inodes ...int64) map[string]FileInfoRes
InodesToFileInfos inodes转fileInfos
func (StorageApi) MkdirAll ¶ added in v0.1.21
func (s StorageApi) MkdirAll(path string) error
MkdirAll 递归创建目录
func (StorageApi) Open ¶ added in v0.1.21
func (s StorageApi) Open(path string) (*os.File, error)
Open 打开文件
func (StorageApi) PathToInode ¶ added in v0.1.21
func (s StorageApi) PathToInode(path string) int64
PathToInode path转inode
func (StorageApi) Remove ¶ added in v0.1.21
func (s StorageApi) Remove(path string) error
Remove 删除文件
func (StorageApi) Rename ¶ added in v0.1.21
func (s StorageApi) Rename(oldPath, newPath string) error
Rename 重命名文件
Click to show internal directories.
Click to hide internal directories.