Documentation ¶
Index ¶
- Constants
- Variables
- func DecodeBase64(s string) ([]byte, error)
- func EncodeBase64(src []byte) string
- func OpenFileBase64(filePath string) (string, error)
- func SaveFileBase64(path string, data []byte) error
- type Flysystem
- func (f *Flysystem) Adapter(disk string) (IAdapter, error)
- func (f *Flysystem) Copy(source, destination string) (bool, error)
- func (f *Flysystem) Delete(path string) (int64, error)
- func (f *Flysystem) Disk(disk string) string
- func (f *Flysystem) DiskExist(disk string) bool
- func (f *Flysystem) Disks() []string
- func (f *Flysystem) Exists(path string) (bool, error)
- func (f *Flysystem) Extend(adapter IAdapter, names ...string) *Flysystem
- func (f *Flysystem) ExtendConfigPtr(config any) error
- func (f *Flysystem) GFSAdapter(disk string) (gfs.IAdapter, error)
- func (f *Flysystem) MimeType(path string) (string, error)
- func (f *Flysystem) Move(source, destination string) (bool, error)
- func (f *Flysystem) Read(path string) ([]byte, error)
- func (f *Flysystem) Size(path string) (int64, error)
- func (f *Flysystem) URL(path string) (*url.URL, error)
- func (f *Flysystem) Update(path string, contents []byte) (string, error)
- func (f *Flysystem) UpdateStream(path, resource string) (string, error)
- func (f *Flysystem) Write(path string, contents []byte) (string, error)
- func (f *Flysystem) WriteReader(path string, reader io.Reader) (string, error)
- func (f *Flysystem) WriteStream(path, resource string) (string, error)
- type IAdapter
- type IBFS
- type IConfig
- type IFS
Constants ¶
View Source
const ( DiskNameLocal = gfs.DiskNameLocal DiskNameOSS = gfs.DiskNameOSS DiskNameCOS = gfs.DiskNameCOS DiskNameBOS = gfs.DiskNameBOS DiskNameGoogleCloudCloudStorage = gfs.DiskNameGoogleCloudCloudStorage DiskNameQiNiuKoDo = gfs.DiskNameQiNiuKoDo )
Variables ¶
View Source
var (
FileModes = gfs.FileModes
)
Functions ¶
func DecodeBase64 ¶ added in v0.4.0
func EncodeBase64 ¶ added in v0.4.0
func OpenFileBase64 ¶ added in v0.4.0
OpenFileBase64 文件路径转base64
func SaveFileBase64 ¶ added in v0.4.0
SaveFileBase64 文件路径转base64
Types ¶
type Flysystem ¶
type Flysystem struct {
// contains filtered or unexported fields
}
func NewAdapters ¶
func (*Flysystem) ExtendConfigPtr ¶ added in v0.3.2
func (*Flysystem) GFSAdapter ¶ added in v0.3.0
func (*Flysystem) UpdateStream ¶
func (*Flysystem) WriteReader ¶ added in v0.0.2
type IBFS ¶ added in v0.0.3
type IBFS interface { // Exists Determine if the file exists Exists(path string) (bool, error) // WriteReader write file content and return full path WriteReader(path string, reader io.Reader) (string, error) // Write file content and return full path Write(path string, contents []byte) (string, error) // WriteStream Resource file write returns full path WriteStream(path, resource string) (string, error) // Read Read file Read(path string) ([]byte, error) // Delete Deleting files returns the number of deleted files Delete(path string) (int64, error) }
type IFS ¶
type IFS interface { IBFS // Size Get File Size Size(path string) (int64, error) // Update the file content and return the updated full path Update(path string, contents []byte) (string, error) // UpdateStream Return the updated full path based on resource file updates UpdateStream(path, resource string) (string, error) // MimeType Get File MimeType MimeType(path string) (string, error) // Move move file Move(source, destination string) (bool, error) // Copy copy file Copy(source, destination string) (bool, error) URL(path string) (*url.URL, error) }
Click to show internal directories.
Click to hide internal directories.