Documentation ¶
Index ¶
- Constants
- func Alive(ctx iris.Context)
- func GetIcon(ctx iris.Context)
- type Ability
- func (a *Ability) AI() (*ability.AI, error)
- func (a *Ability) Destroy()
- func (a *Ability) FFmpeg() (*ability.FFmpeg, error)
- func (a *Ability) FS() *ability.FS
- func (a *Ability) KV() (*ability.KV, error)
- func (a *Ability) Message() (*ability.Message, error)
- func (a *Ability) Milvus() (*ability.Milvus, error)
- func (a *Ability) Schedule() (*ability.Schedule, error)
- type AbilityInterface
- type AppBuilder
- type AppStruct
- func (a *AppStruct) Destroy()
- func (a *AppStruct) UpdateModel(f func(gorm.Migrator))
- func (a *AppStruct) WithAI()
- func (a *AppStruct) WithEventHolder(nc ...*nats.Conn)
- func (a *AppStruct) WithFFmpeg()
- func (a *AppStruct) WithFS()
- func (a *AppStruct) WithKV()
- func (a *AppStruct) WithMessage()
- func (a *AppStruct) WithMilvus()
- func (a *AppStruct) WithModel(models ...interface{})
- func (a *AppStruct) WithSchedule()
- type ConsumeStatus
- type EventHolder
- type FileEvent
- type MediaType
- type PreferOptions
- type SiyouFaaSApi
- type TaskLevel
Constants ¶
View Source
const ( AppCodeEnvKey = "APPCODE" IconPath = "/home/app/icon.png" )
View Source
const ( FileEventAdd = iota + 1 FileEventDelete )
文件事件类型,文件创建与文件删除
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Ability ¶ added in v0.2.3
type Ability struct {
// contains filtered or unexported fields
}
Ability app ability set
type AbilityInterface ¶ added in v0.5.4
type AbilityInterface interface { // Name of ability Name() string // Close resources Close() }
AbilityInterface ability interface
type AppBuilder ¶ added in v0.4.16
type AppBuilder struct {
// contains filtered or unexported fields
}
AppBuilder app builder
func NewAppBuilder ¶ added in v0.4.16
func NewAppBuilder(appCode string) *AppBuilder
NewAppBuilder new a custom app builder
func (*AppBuilder) Build ¶ added in v0.4.16
func (b *AppBuilder) Build()
func (*AppBuilder) WithApi ¶ added in v0.4.16
func (b *AppBuilder) WithApi(api SiyouFaaSApi) *AppBuilder
func (*AppBuilder) WithDB ¶ added in v0.4.16
func (b *AppBuilder) WithDB(db *gorm.DB) *AppBuilder
type AppStruct ¶ added in v0.1.23
type AppStruct struct { AppCode string Event *EventHolder Ability *Ability // app ability Api SiyouFaaSApi // app interfaces // contains filtered or unexported fields }
var App *AppStruct
func (*AppStruct) UpdateModel ¶ added in v0.4.2
UpdateModel 更新表(需要删除更改字段或索引时使用)
func (*AppStruct) WithEventHolder ¶ added in v0.1.23
func (a *AppStruct) WithEventHolder(nc ...*nats.Conn)
WithEventHolder 初始化事件监听器
func (*AppStruct) WithFFmpeg ¶ added in v0.5.4
func (a *AppStruct) WithFFmpeg()
WithFFmpeg add ffmpeg support
func (*AppStruct) WithMessage ¶ added in v0.5.4
func (a *AppStruct) WithMessage()
WithMessage add message support
func (*AppStruct) WithMilvus ¶ added in v0.7.0
func (a *AppStruct) WithMilvus()
WithMilvus add milvus support
func (*AppStruct) WithModel ¶ added in v0.1.24
func (a *AppStruct) WithModel(models ...interface{})
WithModel 自动迁移表
func (*AppStruct) WithSchedule ¶ added in v0.7.0
func (a *AppStruct) WithSchedule()
WithSchedule add schedule support
type ConsumeStatus ¶ added in v0.2.7
type ConsumeStatus int
const ( ConsumeSuccess ConsumeStatus = iota + 1 ConsumeRetry ConsumeFail )
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 MediaType ¶ added in v0.4.5
type MediaType string
MediaType 文件媒体类型
const ( MediaTypeText MediaType = "text" MediaTypeImage MediaType = "image" MediaTypeAudio MediaType = "audio" MediaTypeVideo MediaType = "video" MediaTypeMessage MediaType = "message" )
偏好设置可以关注的文件媒体类型,上半部分为标准媒体类型,下半部分为自定义媒体类型 标准媒体类型
const ( MediaTypeAll MediaType = "all" // 全部类型 MediaTypeCompress MediaType = "compress" // 压缩包类型 MediaTypeImageVideo MediaType = "image-video" // 图片+视频类型 MediaTypeDoc MediaType = "doc" // 文档类型 MediaTypeBt MediaType = "bt" // 种子类型 MediaTypeEbook MediaType = "ebook" // 电子书类型 MediaTypeSoftware MediaType = "software" // 软件包类型 MediaTypeOther MediaType = "other" // 其他类型 )
自定义媒体类型
type PreferOptions ¶ added in v0.1.7
type PreferOptions struct { MediaType MediaType `json:"mediaType"` // 媒体类型 FileEventType int `json:"fileEventType"` // 事件类型 FollowDirs []string `json:"followDirs"` // 关注目录(不设置默认所有) ExcludeExts []string `json:"excludeExts"` // 排除的文件后缀 Description string `json:"description"` // 描述 Priority TaskLevel `json:"priority"` // 优先级(资源占用等级) Handler func(fe *FileEvent) (ConsumeStatus, string) `json:"-"` // 处理器 }
PreferOptions 事件偏好选项
type SiyouFaaSApi ¶ added in v0.4.15
type SiyouFaaSApi map[string]func(iris.Context)
func (SiyouFaaSApi) Delete ¶ added in v0.4.15
func (api SiyouFaaSApi) Delete(uri string, f func(iris.Context))
func (SiyouFaaSApi) Get ¶ added in v0.4.15
func (api SiyouFaaSApi) Get(uri string, f func(iris.Context))
func (SiyouFaaSApi) Post ¶ added in v0.4.15
func (api SiyouFaaSApi) Post(uri string, f func(iris.Context))
func (SiyouFaaSApi) Put ¶ added in v0.4.15
func (api SiyouFaaSApi) Put(uri string, f func(iris.Context))
Click to show internal directories.
Click to hide internal directories.