Documentation ¶
Index ¶
- Constants
- type App
- type EventFS
- func (efs *EventFS) EnsureDirExist(ps ...string)
- func (efs *EventFS) FileExists(path string) bool
- func (efs *EventFS) InodeToFileInfo(inode int64) *gateway.FileInfoRes
- func (efs *EventFS) InodeToPath(inode int64) string
- func (efs *EventFS) InodesToFileInfos(inodes ...int64) map[string]gateway.FileInfoRes
- func (efs *EventFS) MkdirAll(path string) error
- func (efs *EventFS) Open(path string) (*os.File, error)
- func (efs *EventFS) OpenEventFile() (*os.File, error)
- func (efs *EventFS) OpenFile(path string, flag int, perm os.FileMode) (*os.File, error)
- func (efs *EventFS) PathToInode(path string) int64
- func (efs *EventFS) Remove(path string) error
- func (efs *EventFS) Rename(oldPath, newPath string) error
- type EventHolder
- type FS
- func (fs *FS) EnsureDirExist(ps ...string)
- func (fs *FS) Exec(f func(*gorm.DB) error) error
- func (fs *FS) FileExists(path string) bool
- func (fs *FS) InodeToFileInfo(inode int64) *gateway.FileInfoRes
- func (fs *FS) InodeToPath(inode int64) string
- func (fs *FS) InodesToFileInfos(inodes ...int64) map[string]gateway.FileInfoRes
- func (fs *FS) MkdirAll(path string) error
- func (fs *FS) Open(path string) (*os.File, error)
- func (fs *FS) OpenFile(path string, flag int, perm os.FileMode) (*os.File, error)
- func (fs *FS) PathToInode(path string) int64
- func (fs *FS) Remove(path string) error
- func (fs *FS) Rename(oldPath, newPath string) error
- type FileEvent
- type FileType
- type PreferOptions
- type SiyouFaasApi
- func (api SiyouFaasApi) Delete(uri string, f func(iris.Context))
- func (api SiyouFaasApi) Exec(uri string, ctx iris.Context)
- func (api SiyouFaasApi) Get(uri string, f func(iris.Context))
- func (api SiyouFaasApi) Post(uri string, f func(iris.Context))
- func (api SiyouFaasApi) Put(uri string, f func(iris.Context))
- type TableDefine
Constants ¶
View Source
const ( FileEventAdd = iota + 1 FileEventDelete )
文件事件类型,文件创建与文件删除
View Source
const ( EventStatusAppend = iota + 1 EventStatusRunning EventStatusError EventStatusFinish )
处理任务的状态
View Source
const (
AppCodeEnvKey = "AppCode"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct { AppCode string Api SiyouFaasApi AppInfo *entity.AppRegisterInfo Event *EventHolder Model []interface{} DB *gorm.DB }
func (*App) NewFSFromCtx ¶ added in v0.1.15
func (*App) NewFSFromUserNamespace ¶ added in v0.1.21
func (a *App) NewFSFromUserNamespace(un *utils.UserNamespace) *FS
func (*App) WithEventHolder ¶ added in v0.1.15
func (a *App) WithEventHolder()
WithEventHolder 初始化事件监听器
func (*App) WithModel ¶ added in v0.1.16
func (a *App) WithModel(defs []TableDefine)
type EventFS ¶ added in v0.1.21
type EventFS struct {
// contains filtered or unexported fields
}
func (*EventFS) EnsureDirExist ¶ added in v0.1.21
EnsureDirExist 确保目录存在
func (*EventFS) FileExists ¶ added in v0.1.21
FileExists 文件是否存在
func (*EventFS) InodeToFileInfo ¶ added in v0.1.21
func (efs *EventFS) InodeToFileInfo(inode int64) *gateway.FileInfoRes
InodeToFileInfo inode转fileInfo
func (*EventFS) InodeToPath ¶ added in v0.1.21
InodeToPath inode转path
func (*EventFS) InodesToFileInfos ¶ added in v0.1.21
func (efs *EventFS) InodesToFileInfos(inodes ...int64) map[string]gateway.FileInfoRes
InodesToFileInfos inodes转fileInfos
func (*EventFS) OpenEventFile ¶ added in v0.1.21
OpenEventFile 打开事件相关文件
func (*EventFS) PathToInode ¶ added in v0.1.21
PathToInode path转inode
type EventHolder ¶ added in v0.1.7
type EventHolder struct {
// contains filtered or unexported fields
}
func (*EventHolder) SetPrefer ¶ added in v0.1.7
func (e *EventHolder) SetPrefer(options ...PreferOptions)
SetPrefer 设置偏好与回调函数
type FS ¶ added in v0.1.7
type FS struct { AppCodeName string *utils.UserNamespace // contains filtered or unexported fields }
FS fs
func (*FS) EnsureDirExist ¶ added in v0.1.16
EnsureDirExist 确保目录存在
func (*FS) FileExists ¶ added in v0.1.16
FileExists 文件是否存在
func (*FS) InodeToFileInfo ¶ added in v0.1.16
func (fs *FS) InodeToFileInfo(inode int64) *gateway.FileInfoRes
InodeToFileInfo inode转fileInfo
func (*FS) InodeToPath ¶ added in v0.1.16
InodeToPath inode转path
func (*FS) InodesToFileInfos ¶ added in v0.1.16
func (fs *FS) InodesToFileInfos(inodes ...int64) map[string]gateway.FileInfoRes
InodesToFileInfos inodes转fileInfos
func (*FS) PathToInode ¶ added in v0.1.16
PathToInode path转inode
type FileType ¶ added in v0.1.7
type FileType string
const ( FileTypeAll FileType = "all" FileTypeText FileType = "text" FileTypeImage FileType = "image" FileTypeAudio FileType = "audio" FileTypeVideo FileType = "video" FileTypeMessage FileType = "message" FileTypeCompress FileType = "compress" FileTypeImageVideo FileType = "image-video" FileTypeDoc FileType = "doc" FileTypeBt FileType = "bt" FileTypeEbook FileType = "ebook" FileTypeSoftware FileType = "software" FileTypeOther FileType = "other" )
偏好设置可以关注的文件类型,上半部分为独立类型文件,下半部分为混合类型文件
type PreferOptions ¶ added in v0.1.7
type SiyouFaasApi ¶
type SiyouFaasApi map[string]func(iris.Context)
func (SiyouFaasApi) Delete ¶
func (api SiyouFaasApi) Delete(uri string, f func(iris.Context))
func (SiyouFaasApi) Exec ¶
func (api SiyouFaasApi) Exec(uri string, ctx iris.Context)
func (SiyouFaasApi) Get ¶
func (api SiyouFaasApi) Get(uri string, f func(iris.Context))
func (SiyouFaasApi) Post ¶
func (api SiyouFaasApi) Post(uri string, f func(iris.Context))
func (SiyouFaasApi) Put ¶
func (api SiyouFaasApi) Put(uri string, f func(iris.Context))
type TableDefine ¶ added in v0.1.21
Click to show internal directories.
Click to hide internal directories.