Documentation
¶
Index ¶
- Constants
- func CacheFS(fs driver.FS, opt *CacheOption) (driver.FS, error)
- func CompressFS(fs driver.FS, opt *CompressOption) (driver.FS, error)
- func EncryptFS(fs driver.FS, opt *EncryptOption) (driver.FS, error)
- func HookFS(fs driver.FS, opt *HookOption) driver.FS
- func Included(file driver.File, types []string) bool
- func New(fs driver.FS, opt *Option) (driver.FS, error)
- func PrefixFS(fs driver.FS, prefix string) driver.FS
- func RateLimitFS(fs driver.FS, opt *RateLimitOption) (driver.FS, error)
- func RecycleFS(fs driver.FS, opt *RecycleOption) (driver.FS, error)
- func TrimPrefixFS(fs driver.FS, prefix string) driver.FS
- func WrapFS(fs driver.FS, opts ...WrapOption) (newFS driver.FS, err error)
- type CacheOption
- type CompressOption
- type EncryptOption
- type HookOption
- type Option
- type RateLimitOption
- type RecycleOption
- type WrapOption
- type WrapReader
- type WrapWriter
Constants ¶
View Source
const ( RateLimitActionWait = "wait" RateLimitActionReturn = "return" )
Variables ¶
This section is empty.
Functions ¶
func CompressFS ¶
Types ¶
type CacheOption ¶
type CompressOption ¶
type CompressOption struct {
Level int `json:"level"`
}
type EncryptOption ¶
type HookOption ¶
type Option ¶
type Option struct {
RootPath string `json:"root_path" validate:"omitempty,startswith=/"`
HiddenFiles []string `json:"hidden_files"`
Encrypt bool `json:"encrypt"`
EncryptOption EncryptOption `json:"encrypt_option"`
Compress bool `json:"compress"`
CompressOption CompressOption `json:"compress_option"`
Recycle bool `json:"recycle"`
RecycleOption RecycleOption `json:"recycle_option"`
Cache bool `json:"cache"`
CacheOption CacheOption `json:"cache_option"`
RateLimit bool `json:"rate_limit"`
RateLimitOption RateLimitOption `json:"rate_limit_option"`
}
type RateLimitOption ¶
type RecycleOption ¶
type RecycleOption struct {
Path string `json:"path" validate:"omitempty,startswith=/"`
}
type WrapReader ¶
type WrapReader struct {
driver.FileReader
// contains filtered or unexported fields
}
type WrapWriter ¶
type WrapWriter struct {
driver.FileWriter
// contains filtered or unexported fields
}
func (*WrapWriter) Close ¶
func (w *WrapWriter) Close() error
Source Files
¶
Click to show internal directories.
Click to hide internal directories.