files

package
v0.0.0-...-07ef6c8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 26, 2023 License: Artistic-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetLatestComponent

func GetLatestComponent(fs []*File) (string, string)

func GetString

func GetString(fs []*File) string

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

type FileManager struct {
	Ctx *gin.Context
}

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)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL