Documentation ¶
Index ¶
- func GetLatestComponent(fs []*File) (string, string)
- func GetString(fs []*File) string
- type File
- type FileManage
- type FileManager
- func (fm *FileManager) Delete(storagePath string, dm *db.DatabaseManager) error
- func (fm *FileManager) Download(storagePath string, dm *db.DatabaseManager) error
- func (fm *FileManager) Get(dm *db.DatabaseManager) error
- func (fm *FileManager) List(dm *db.DatabaseManager) error
- func (fm *FileManager) Upload(storagePath string, dm *db.DatabaseManager) (*File, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetLatestComponent ¶
Types ¶
type File ¶
type File struct { Id int `json:"id"` Name string `json:"name"` ShortId string `json:"short_id"` Description string `json:"description"` Created int64 `json:"created"` IsForever int `json:"is_forever"` Md5sum string `json:"md5sum"` IsComponent int `json:"is_component"` IsInstall int `json:"is_install"` }
type FileManage ¶
type FileManage interface { //Fetc // hType(c *gin.Context) *File //上传 Upload(storagePath string, dm *db.DatabaseManager) (*File, error) //下载 Download(storagePath string, dm *db.DatabaseManager) error //列出 List(dm *db.DatabaseManager) error //删除 Delete(storagePath string, dm *db.DatabaseManager) error // Get(dm *db.DatabaseManager) error }
接收并保存 通过gin传入的报警的类型,例如dingding weixin webhook等
type FileManager ¶
func (*FileManager) Delete ¶
func (fm *FileManager) Delete(storagePath string, dm *db.DatabaseManager) error
func (*FileManager) Download ¶
func (fm *FileManager) Download(storagePath string, dm *db.DatabaseManager) error
func (*FileManager) Get ¶
func (fm *FileManager) Get(dm *db.DatabaseManager) error
func (*FileManager) List ¶
func (fm *FileManager) List(dm *db.DatabaseManager) error
func (*FileManager) Upload ¶
func (fm *FileManager) Upload(storagePath string, dm *db.DatabaseManager) (*File, error)
Click to show internal directories.
Click to hide internal directories.