Documentation ¶
Index ¶
- type Fileinfo
- func (this *Fileinfo) CloseFile()
- func (this *Fileinfo) GetExtension() string
- func (this *Fileinfo) GetFile() multipart.File
- func (this *Fileinfo) GetFileHeader() *multipart.FileHeader
- func (this *Fileinfo) GetFileType() string
- func (this *Fileinfo) GetFiletypes() map[string]string
- func (this *Fileinfo) GetMd5() string
- func (this *Fileinfo) GetMimeType() string
- func (this *Fileinfo) GetOriginalFilename() string
- func (this *Fileinfo) GetOriginalName() string
- func (this *Fileinfo) GetSha1() string
- func (this *Fileinfo) GetSize() int64
- func (this *Fileinfo) WithFile(file *multipart.FileHeader) *Fileinfo
- func (this *Fileinfo) WithFiletypes(filetypes map[string]string) *Fileinfo
- type OpenFileinfo
- func (this *OpenFileinfo) CloseFile()
- func (this *OpenFileinfo) GetExtension() string
- func (this *OpenFileinfo) GetFile() *os.File
- func (this *OpenFileinfo) GetFileName() string
- func (this *OpenFileinfo) GetFileType() string
- func (this *OpenFileinfo) GetFiletypes() map[string]string
- func (this *OpenFileinfo) GetMd5() string
- func (this *OpenFileinfo) GetMimeType() string
- func (this *OpenFileinfo) GetOriginalFilename() string
- func (this *OpenFileinfo) GetOriginalName() string
- func (this *OpenFileinfo) GetSha1() string
- func (this *OpenFileinfo) GetSize() int64
- func (this *OpenFileinfo) String() string
- func (this *OpenFileinfo) WithFile(file *os.File) *OpenFileinfo
- func (this *OpenFileinfo) WithFileName(fileName string) *OpenFileinfo
- func (this *OpenFileinfo) WithFiletypes(filetypes map[string]string) *OpenFileinfo
- type Rename
- func (this *Rename) DatetimeName() *Rename
- func (this *Rename) GenerateClientName() string
- func (this *Rename) GenerateDatetimeName() string
- func (this *Rename) GenerateSequenceName() string
- func (this *Rename) GenerateUniqueName() string
- func (this *Rename) GetDefaultExtension() string
- func (this *Rename) GetDefaultName() string
- func (this *Rename) GetName() any
- func (this *Rename) GetStoreName() string
- func (this *Rename) SequenceName() *Rename
- func (this *Rename) UniqueName() *Rename
- func (this *Rename) WithCheckFileExistsFunc(f func(string) bool) *Rename
- func (this *Rename) WithDefaultName(name string) *Rename
- func (this *Rename) WithFileName(filename string) *Rename
- func (this *Rename) WithName(name string) *Rename
- func (this *Rename) WithdDefaultExtension(ext string) *Rename
- type Upload
- func (this *Upload) Destroy(path string) bool
- func (this *Upload) EnsureDir(path string) bool
- func (this *Upload) GetDir() any
- func (this *Upload) GetDirectory() string
- func (this *Upload) GetFileinfo() *Fileinfo
- func (this *Upload) GetObjectUrl(path string) string
- func (this *Upload) GetOpenFileinfo() *OpenFileinfo
- func (this *Upload) GetRealname(name string) string
- func (this *Upload) GetRename() *Rename
- func (this *Upload) GetStorage() *storage.Storage
- func (this *Upload) IfExists(realname string) bool
- func (this *Upload) SaveContents(contents string, name string) string
- func (this *Upload) SaveFile(file *multipart.FileHeader) string
- func (this *Upload) SaveOpenedFile(file *os.File) string
- func (this *Upload) SaveUploadedFile(file *multipart.FileHeader) string
- func (this *Upload) WithDir(directory string) *Upload
- func (this *Upload) WithFileinfo(fileinfo *Fileinfo) *Upload
- func (this *Upload) WithOpenFileinfo(fileinfo *OpenFileinfo) *Upload
- func (this *Upload) WithPermission(permission string) *Upload
- func (this *Upload) WithRename(rename *Rename) *Upload
- func (this *Upload) WithStorage(storager *storage.Storage) *Upload
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Fileinfo ¶
type Fileinfo struct {
// contains filtered or unexported fields
}
*
- 文件信息 *
- @create 2021-8-15
- @author deatil
type OpenFileinfo ¶
type OpenFileinfo struct {
// contains filtered or unexported fields
}
*
- 文件信息 *
- @create 2021-9-29
- @author deatil
func (*OpenFileinfo) GetFiletypes ¶
func (this *OpenFileinfo) GetFiletypes() map[string]string
获取文件类型
func (*OpenFileinfo) GetOriginalFilename ¶
func (this *OpenFileinfo) GetOriginalFilename() string
原始文件名
func (*OpenFileinfo) WithFile ¶
func (this *OpenFileinfo) WithFile(file *os.File) *OpenFileinfo
设置文件流
func (*OpenFileinfo) WithFileName ¶
func (this *OpenFileinfo) WithFileName(fileName string) *OpenFileinfo
设置文件流
func (*OpenFileinfo) WithFiletypes ¶
func (this *OpenFileinfo) WithFiletypes(filetypes map[string]string) *OpenFileinfo
设置文件类型
type Rename ¶
type Rename struct {
// contains filtered or unexported fields
}
*
- 重命名 *
- @create 2021-8-15
- @author deatil
func (*Rename) WithCheckFileExistsFunc ¶
设置文件存在检测函数
func (*Rename) WithdDefaultExtension ¶
设置默认的后缀
type Upload ¶
type Upload struct {
// contains filtered or unexported fields
}
*
- 上传 *
- @create 2021-8-15
- @author deatil
func (*Upload) SaveContents ¶
保存文本信息
func (*Upload) SaveUploadedFile ¶
func (this *Upload) SaveUploadedFile(file *multipart.FileHeader) string
上传文件保存
func (*Upload) WithOpenFileinfo ¶
func (this *Upload) WithOpenFileinfo(fileinfo *OpenFileinfo) *Upload
设置文件信息2
Click to show internal directories.
Click to hide internal directories.