Documentation ¶
Index ¶
- Constants
- func NewDriver(disk string) (filesystem.Driver, error)
- type Cos
- func (r *Cos) AllDirectories(path string) ([]string, error)
- func (r *Cos) AllFiles(path string) ([]string, error)
- func (r *Cos) Copy(originFile, targetFile string) error
- func (r *Cos) Delete(files ...string) error
- func (r *Cos) DeleteDirectory(directory string) error
- func (r *Cos) Directories(path string) ([]string, error)
- func (r *Cos) Exists(file string) bool
- func (r *Cos) Files(path string) ([]string, error)
- func (r *Cos) Get(file string) (string, error)
- func (r *Cos) MakeDirectory(directory string) error
- func (r *Cos) Missing(file string) bool
- func (r *Cos) Move(oldFile, newFile string) error
- func (r *Cos) Path(file string) string
- func (r *Cos) Put(file string, content string) error
- func (r *Cos) PutFile(filePath string, source filesystem.File) (string, error)
- func (r *Cos) PutFileAs(filePath string, source filesystem.File, name string) (string, error)
- func (r *Cos) Size(file string) (int64, error)
- func (r *Cos) TemporaryUrl(file string, time time.Time) (string, error)
- func (r *Cos) Url(file string) string
- func (r *Cos) WithContext(ctx context.Context) filesystem.Driver
- type Driver
- 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) 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.Driver
- type Oss
- func (r *Oss) AllDirectories(path string) ([]string, error)
- func (r *Oss) AllFiles(path string) ([]string, error)
- func (r *Oss) Copy(originFile, targetFile string) error
- func (r *Oss) Delete(files ...string) error
- func (r *Oss) DeleteDirectory(directory string) error
- func (r *Oss) Directories(path string) ([]string, error)
- func (r *Oss) Exists(file string) bool
- func (r *Oss) Files(path string) ([]string, error)
- func (r *Oss) Get(file string) (string, error)
- func (r *Oss) MakeDirectory(directory string) error
- func (r *Oss) Missing(file string) bool
- func (r *Oss) Move(oldFile, newFile string) error
- func (r *Oss) Path(file string) string
- func (r *Oss) Put(file string, content string) error
- func (r *Oss) PutFile(filePath string, source filesystem.File) (string, error)
- func (r *Oss) PutFileAs(filePath string, source filesystem.File, name string) (string, error)
- func (r *Oss) Size(file string) (int64, error)
- func (r *Oss) TemporaryUrl(file string, time time.Time) (string, error)
- func (r *Oss) Url(file string) string
- func (r *Oss) WithContext(ctx context.Context) filesystem.Driver
- 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) 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.Driver
- type ServiceProvider
- type Storage
Constants ¶
View Source
const MaxFileNum = 1000
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Cos ¶
type Cos struct {
// contains filtered or unexported fields
}
func (*Cos) DeleteDirectory ¶
func (*Cos) MakeDirectory ¶
func (*Cos) WithContext ¶
func (r *Cos) WithContext(ctx context.Context) filesystem.Driver
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.Driver
type Oss ¶
type Oss struct {
// contains filtered or unexported fields
}
func (*Oss) DeleteDirectory ¶
func (*Oss) MakeDirectory ¶
func (*Oss) WithContext ¶
func (r *Oss) WithContext(ctx context.Context) filesystem.Driver
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.Driver
type ServiceProvider ¶
type ServiceProvider struct { }
func (*ServiceProvider) Boot ¶
func (database *ServiceProvider) Boot()
func (*ServiceProvider) Register ¶
func (database *ServiceProvider) Register()
type Storage ¶
type Storage struct { filesystem.Driver // contains filtered or unexported fields }
func NewStorage ¶
func NewStorage() *Storage
Click to show internal directories.
Click to hide internal directories.