Documentation ¶
Index ¶
- Constants
- type AI
- type FFmpeg
- type FS
- type File
- type GenericFS
- type HTTPFile
- func (H *HTTPFile) Close() error
- func (H *HTTPFile) Name() string
- func (H *HTTPFile) Read(p []byte) (int, error)
- func (H *HTTPFile) ReadAt(p []byte, off int64) (int, error)
- func (H *HTTPFile) Readdir(n int) ([]*sdkdto.SiyouFileBasicInfo, error)
- func (H *HTTPFile) Readdirnames(n int) ([]string, error)
- func (H *HTTPFile) Seek(offset int64, whence int) (int64, error)
- func (H *HTTPFile) Stat() (*sdkdto.SiyouFileBasicInfo, error)
- func (H *HTTPFile) Sync() error
- func (H *HTTPFile) Truncate(size int64) error
- func (H *HTTPFile) Write(p []byte) (int, error)
- func (H *HTTPFile) WriteAt(p []byte, off int64) (int, error)
- func (H *HTTPFile) WriteString(s string) (int, error)
- type KV
- func (kv *KV) Close()
- func (kv *KV) DeleteKV(ugn *utils.UserGroupNamespace, kvType, key string) error
- func (kv *KV) GetKV(ugn *utils.UserGroupNamespace, kvType, key string) (*sdkdto.KV, bool)
- func (kv *KV) Name() string
- func (kv *KV) PutKV(ugn *utils.UserGroupNamespace, kvType, key, value string) error
- type Message
- type MessageEvent
- type Milvus
- type Schedule
- func (s *Schedule) AddCronScheduleEvent(ugn *utils.UserGroupNamespace, name string, payload []byte, cron string) (err error, eventId *int64)
- func (s *Schedule) AddOnceScheduleEvent(ugn *utils.UserGroupNamespace, name string, payload []byte, remindTime int64) (err error, eventId *int64)
- func (s *Schedule) Close()
- func (s *Schedule) Name() string
- func (s *Schedule) SetHandler(shs ...ScheduleEventHandler)
- func (s *Schedule) UpdateCronScheduleEvent(ugn *utils.UserGroupNamespace, eventId int64, cron string) (err error)
- func (s *Schedule) UpdateOnceScheduleEvent(ugn *utils.UserGroupNamespace, eventId int64, remindTime int64) (err error)
- type ScheduleEvent
- type ScheduleEventHandler
- type SyyFS
- func (fs *SyyFS) AppFileExists(path string) bool
- func (fs *SyyFS) AppMkdirAll(path string) error
- func (fs *SyyFS) AppOpenFile(path string, flag int, perm os.FileMode) (File, error)
- func (fs *SyyFS) AppRemoveAll(path string) error
- func (fs *SyyFS) Chtimes(ufi string, atime time.Time, mtime time.Time) error
- func (fs *SyyFS) Exec(f func(*gorm.DB) error) error
- func (fs *SyyFS) FileExists(ufi string) bool
- func (fs *SyyFS) MkdirAll(ufi string) error
- func (fs *SyyFS) Open(ufi string) (File, error)
- func (fs *SyyFS) OpenAvatarFile(ufi string) (File, error)
- func (fs *SyyFS) OpenFile(ufi string, flag int, perm os.FileMode) (File, error)
- func (fs *SyyFS) Remove(ufi string) error
- func (fs *SyyFS) RemoveAll(ufi string) error
- func (fs *SyyFS) Rename(oldUFI string, newUFI string) error
Constants ¶
View Source
const (
AppPrefix = "/.siyouyun/appdata"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AI ¶
type AI struct { sdkprotos.AIServiceClient // contains filtered or unexported fields }
type FFmpeg ¶
type FFmpeg struct {
// contains filtered or unexported fields
}
func (*FFmpeg) GetBasicInfo ¶
func (ff *FFmpeg) GetBasicInfo(ugn *utils.UserGroupNamespace, ufi string) (*sdkdto.FFmpegBasicInfo, error)
func (*FFmpeg) GetDetailInfo ¶
func (ff *FFmpeg) GetDetailInfo(ugn *utils.UserGroupNamespace, ufi string) (*sdkdto.FFProbeInfo, error)
type FS ¶
type FS struct {
// contains filtered or unexported fields
}
func (*FS) NewFSFromCtx ¶
func (*FS) NewFSFromUserGroupNamespace ¶
func (f *FS) NewFSFromUserGroupNamespace(ugn *utils.UserGroupNamespace) GenericFS
type File ¶ added in v0.8.0
type File interface { io.Closer io.Reader io.ReaderAt io.Seeker io.Writer io.WriterAt Name() string Readdir(count int) ([]*sdkdto.SiyouFileBasicInfo, error) Readdirnames(n int) ([]string, error) Stat() (*sdkdto.SiyouFileBasicInfo, error) Sync() error Truncate(size int64) error WriteString(s string) (ret int, err error) }
type GenericFS ¶
type GenericFS interface { Open(ufi string) (File, error) OpenFile(ufi string, flag int, perm os.FileMode) (File, error) OpenAvatarFile(ufi string) (File, error) MkdirAll(ufi string) error Remove(ufi string) error RemoveAll(ufi string) error Rename(oldUFI string, newUFI string) error Chtimes(ufi string, atime time.Time, mtime time.Time) error FileExists(ufi string) bool Exec(f func(*gorm.DB) error) error AppOpenFile(path string, flag int, perm os.FileMode) (File, error) AppMkdirAll(path string) error AppRemoveAll(path string) error AppFileExists(path string) bool }
type HTTPFile ¶ added in v0.8.0
type HTTPFile struct {
// contains filtered or unexported fields
}
HTTPFile file implement by http
func (*HTTPFile) Readdir ¶ added in v0.8.0
func (H *HTTPFile) Readdir(n int) ([]*sdkdto.SiyouFileBasicInfo, error)
func (*HTTPFile) Readdirnames ¶ added in v0.8.0
func (*HTTPFile) Stat ¶ added in v0.8.0
func (H *HTTPFile) Stat() (*sdkdto.SiyouFileBasicInfo, error)
type KV ¶
type KV struct {
// contains filtered or unexported fields
}
func (*KV) DeleteKV ¶
func (kv *KV) DeleteKV(ugn *utils.UserGroupNamespace, kvType, key string) error
type Message ¶
type Message struct {
// contains filtered or unexported fields
}
func NewMessage ¶
func (*Message) AddHandler ¶
func (m *Message) AddHandler(desc string, triggerPhrasePerl string, handler func(ugn *utils.UserGroupNamespace, content, uuid string) (reply bool, replyContent string, replyToUUID bool))
AddHandler 添加消息机器人处理器 desc:
消息机器人的功能描述
triggerPhrasePerl:
触发处理器的短语模式正则
handler func(content string) (reply bool, replyContent string, replyToUUID bool):
入参: - content 用户发送到机器人的消息正文 返回值: - reply : 是否需要回复 - replyContent : 回复的正文 - replyToUUID : 回复时是否引用用户消息
type MessageEvent ¶
type MessageEvent struct { UGN utils.UserGroupNamespace `json:"ugn"` UUID string `json:"uuid"` Content string `json:"content"` SessionId string `json:"sessionId"` SendByAdmin bool `json:"sendByAdmin"` }
MessageEvent 消息在事件中传递的结构
type Milvus ¶ added in v0.7.0
Milvus vector database
func (*Milvus) GenCollectionName ¶ added in v0.7.0
GenCollectionName generate the collection name
func (*Milvus) GenPartitionName ¶ added in v0.7.0
func (m *Milvus) GenPartitionName(ugn *utils.UserGroupNamespace) string
GenPartitionName generate the partition name
func (*Milvus) LoadAppCollection ¶ added in v0.7.0
func (m *Milvus) LoadAppCollection(ugn *utils.UserGroupNamespace, collectionName string, expireTime ...time.Duration) (err error)
LoadAppCollection load app collection and set the expiration time
type Schedule ¶
type Schedule struct { Handler map[string]ScheduleEventHandler // contains filtered or unexported fields }
func NewSchedule ¶
func (*Schedule) AddCronScheduleEvent ¶
func (*Schedule) AddOnceScheduleEvent ¶
func (*Schedule) SetHandler ¶
func (s *Schedule) SetHandler(shs ...ScheduleEventHandler)
func (*Schedule) UpdateCronScheduleEvent ¶
func (*Schedule) UpdateOnceScheduleEvent ¶
type ScheduleEvent ¶
type ScheduleEvent struct { UGN utils.UserGroupNamespace `json:"ugn"` RemindTime int64 `json:"remindTime"` Name string `json:"name"` Payload []byte `json:"payload"` }
type ScheduleEventHandler ¶
type ScheduleEventHandler struct { Name string Handler func(se *ScheduleEvent) }
type SyyFS ¶
type SyyFS struct {
// contains filtered or unexported fields
}
SyyFS syy fs operations
func (*SyyFS) AppFileExists ¶ added in v0.8.0
func (*SyyFS) AppMkdirAll ¶ added in v0.8.0
func (*SyyFS) AppOpenFile ¶ added in v0.8.0
func (*SyyFS) AppRemoveAll ¶ added in v0.8.0
func (*SyyFS) FileExists ¶
func (*SyyFS) OpenAvatarFile ¶
OpenAvatarFile open avatar file
Click to show internal directories.
Click to hide internal directories.