Documentation ¶
Index ¶
- Constants
- type File
- func (f *File) Disk(disk string) filesystem.File
- func (f *File) Extension() (string, error)
- func (f *File) File() string
- func (f *File) GetClientOriginalExtension() string
- func (f *File) GetClientOriginalName() string
- func (f *File) HashName(path ...string) string
- func (f *File) Store(path string) (string, error)
- func (f *File) StoreAs(path string, name string) (string, error)
- type Local
- func (r *Local) AllDirectories(path string) ([]string, error)
- func (r *Local) AllFiles(path string) ([]string, error)
- func (r *Local) Copy(originFile, targetFile string) error
- func (r *Local) Delete(files ...string) error
- func (r *Local) DeleteDirectory(directory string) error
- func (r *Local) Directories(path string) ([]string, error)
- func (r *Local) Disk(disk string) filesystem.IStorage
- func (r *Local) Exists(file string) bool
- func (r *Local) Files(path string) ([]string, error)
- func (r *Local) Get(file string) (string, error)
- func (r *Local) MakeDirectory(directory string) error
- func (r *Local) Missing(file string) bool
- func (r *Local) Move(oldFile, newFile string) error
- func (r *Local) Path(file string) string
- func (r *Local) Put(file, content string) error
- func (r *Local) PutFile(filePath string, source filesystem.File) (string, error)
- func (r *Local) PutFileAs(filePath string, source filesystem.File, name string) (string, error)
- func (r *Local) Size(file string) (int64, error)
- func (r *Local) TemporaryUrl(file string, time time.Time) (string, error)
- func (r *Local) Url(file string) string
- func (r *Local) WithContext(ctx context.Context) filesystem.IStorage
- type S3
- func (r *S3) AllDirectories(path string) ([]string, error)
- func (r *S3) AllFiles(path string) ([]string, error)
- func (r *S3) Copy(originFile, targetFile string) error
- func (r *S3) Delete(files ...string) error
- func (r *S3) DeleteDirectory(directory string) error
- func (r *S3) Directories(path string) ([]string, error)
- func (r *S3) Disk(disk string) filesystem.IStorage
- func (r *S3) Exists(file string) bool
- func (r *S3) Files(path string) ([]string, error)
- func (r *S3) Get(file string) (string, error)
- func (r *S3) MakeDirectory(directory string) error
- func (r *S3) Missing(file string) bool
- func (r *S3) Move(oldFile, newFile string) error
- func (r *S3) Path(file string) string
- func (r *S3) Put(file string, content string) error
- func (r *S3) PutFile(filePath string, source filesystem.File) (string, error)
- func (r *S3) PutFileAs(filePath string, source filesystem.File, name string) (string, error)
- func (r *S3) Size(file string) (int64, error)
- func (r *S3) TemporaryUrl(file string, time time.Time) (string, error)
- func (r *S3) Url(file string) string
- func (r *S3) WithContext(ctx context.Context) filesystem.IStorage
Constants ¶
View Source
const MaxFileNum = 1000
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type File ¶
type File struct {
// contains filtered or unexported fields
}
func NewFileFromRequest ¶
func NewFileFromRequest(fileHeader *multipart.FileHeader) (*File, error)
func (*File) GetClientOriginalExtension ¶
func (*File) GetClientOriginalName ¶
type Local ¶
type Local struct {
// contains filtered or unexported fields
}
func (*Local) DeleteDirectory ¶
func (*Local) MakeDirectory ¶
func (*Local) TemporaryUrl ¶
func (*Local) WithContext ¶
func (r *Local) WithContext(ctx context.Context) filesystem.IStorage
type S3 ¶
type S3 struct {
// contains filtered or unexported fields
}
func (*S3) DeleteDirectory ¶
func (*S3) MakeDirectory ¶
func (*S3) WithContext ¶
func (r *S3) WithContext(ctx context.Context) filesystem.IStorage
Click to show internal directories.
Click to hide internal directories.