Documentation ¶
Index ¶
- Constants
- Variables
- func CallStorageHooks(typ string, storage driver.Driver)
- func ClearCache(storage driver.Driver, path string)
- func Copy(ctx context.Context, storage driver.Driver, srcPath, dstDirPath string, ...) error
- func Get(ctx context.Context, storage driver.Driver, path string) (model.Obj, error)
- func GetDriverInfoMap() map[string][]driver.Item
- func GetDriverNames() []string
- func GetUnwrap(ctx context.Context, storage driver.Driver, path string) (model.Obj, error)
- func HandleObjsUpdateHook(parent string, objs []model.Obj)
- func HandleSettingItemHook(item *model.SettingItem) (hasHook bool, err error)
- func Key(storage driver.Driver, path string) string
- func Link(ctx context.Context, storage driver.Driver, path string, args model.LinkArgs) (*model.Link, model.Obj, error)
- func List(ctx context.Context, storage driver.Driver, path string, args model.ListArgs, ...) ([]model.Obj, error)
- func MakeDir(ctx context.Context, storage driver.Driver, path string, lazyCache ...bool) error
- func Move(ctx context.Context, storage driver.Driver, srcPath, dstDirPath string, ...) error
- func Other(ctx context.Context, storage driver.Driver, args model.FsOtherArgs) (interface{}, error)
- func Put(ctx context.Context, storage driver.Driver, dstDirPath string, ...) error
- func RegisterDriver(driver New)
- func RegisterObjsUpdateHook(hook ObjsUpdateHook)
- func RegisterSettingItemHook(key string, hook SettingItemHook)
- func RegisterStorageHook(hook StorageHook)
- func Remove(ctx context.Context, storage driver.Driver, path string) error
- func Rename(ctx context.Context, storage driver.Driver, srcPath, dstName string, ...) error
- type New
- type ObjsUpdateHook
- type SettingItemHook
- type StorageHook
Constants ¶
View Source
const ( WORK = "work" RootName = "root" )
Variables ¶
View Source
var (
ObjsUpdateHooks = make([]ObjsUpdateHook, 0)
)
Functions ¶
func CallStorageHooks ¶
func ClearCache ¶
func Copy ¶
func Copy(ctx context.Context, storage driver.Driver, srcPath, dstDirPath string, lazyCache ...bool) error
Copy Just copy file[s] in a storage
func GetDriverInfoMap ¶
func GetDriverInfoMap() map[string]driver.Info { return driverInfoMap }
func GetDriverNames ¶
func GetDriverNames() []string
func HandleObjsUpdateHook ¶
func HandleSettingItemHook ¶
func HandleSettingItemHook(item *model.SettingItem) (hasHook bool, err error)
func Link ¶
func Link(ctx context.Context, storage driver.Driver, path string, args model.LinkArgs) (*model.Link, model.Obj, error)
Link get link, if is an url. should have an expiry time
func List ¶
func List(ctx context.Context, storage driver.Driver, path string, args model.ListArgs, refresh ...bool) ([]model.Obj, error)
List files in storage, not contains virtual file
func RegisterDriver ¶
func RegisterDriver(driver New)
func RegisterObjsUpdateHook ¶
func RegisterObjsUpdateHook(hook ObjsUpdateHook)
func RegisterSettingItemHook ¶
func RegisterSettingItemHook(key string, hook SettingItemHook)
func RegisterStorageHook ¶
func RegisterStorageHook(hook StorageHook)
Types ¶
type New ¶
func GetDriverNew ¶
Click to show internal directories.
Click to hide internal directories.