Documentation
¶
Index ¶
- Constants
- func Configure(cfg Map)
- func Download(code string) (string, error)
- func Go()
- func Preview(code string, width, height, second int64) (string, error)
- func PreviewConfig() string
- func Ready()
- func Register(name string, value Any, overrides ...bool)
- func Remove(code string) error
- func StatFile(file string) (Map, error)
- func Thumbnail(code string, width, height, pos int64) (string, error)
- func ThumbnailConfig() string
- func Upload(from Any, metadatas ...Map) (File, Files, error)
- func UploadTo(base string, from Any, metadatas ...Map) (File, Files, error)
- type Config
- type Configs
- type Connect
- type Driver
- type File
- type Files
- type Health
- type Info
- type Instance
- type Module
- func (this *Module) Config(name string, config Config, override bool)
- func (this *Module) Configs(config Configs, override bool)
- func (this *Module) Configure(global Map)
- func (this *Module) Connect()
- func (this *Module) Download(code string) (string, error)
- func (module *Module) Driver(name string, driver Driver, override bool)
- func (this *Module) Initialize()
- func (this *Module) Launch()
- func (this *Module) Preview(code string, width, height, position int64) (string, error)
- func (this *Module) Previewer(name string, config Previewer, override bool)
- func (this *Module) Register(name string, value Any, override bool)
- func (this *Module) Remove(code string) error
- func (this *Module) Terminate()
- func (this *Module) Thumbnail(code string, width, height, position int64) (string, error)
- func (this *Module) Thumbnailer(name string, config Thumbnailer, override bool)
- func (this *Module) Upload(path string, metadata Map) (File, Files, error)
- func (this *Module) UploadTo(base string, path string, metadata Map) (File, Files, error)
- type Previewer
- type PreviewerFunc
- type ThumbnailFunc
- type Thumbnailer
Constants ¶
View Source
const (
NAME = "STORE"
)
Variables ¶
This section is empty.
Functions ¶
func PreviewConfig ¶ added in v0.1.2
func PreviewConfig() string
func Thumbnail ¶ added in v0.1.2
return mFile.Download(file) }
func Remove(code string) error {
file := mFile.Decode(code)
if file == nil {
return errors.New("无效数据")
}
if file.file != "" {
return mStore.Remove(file)
}
return mFile.Remove(file)
}
func ThumbnailConfig ¶ added in v0.1.2
func ThumbnailConfig() string
Types ¶
type Connect ¶
type Connect interface {
Open() error
Health() Health
Close() error
Upload(path string, metadata Map) (File, Files, error)
Download(file File) (string, error)
Remove(file File) error
}
Connect
type File ¶
type Instance ¶
type Module ¶
type Module struct {
// contains filtered or unexported fields
}
func (*Module) Initialize ¶
func (this *Module) Initialize()
func (*Module) Thumbnailer ¶ added in v0.1.2
func (this *Module) Thumbnailer(name string, config Thumbnailer, override bool)
type Previewer ¶ added in v0.1.2
type Previewer struct {
// Name 名称
Name string
// Text 说明
Text string
// Alias 别名
Alias []string
// Preview 预览动图
Action PreviewerFunc
}
type PreviewerFunc ¶ added in v0.1.2
type ThumbnailFunc ¶ added in v0.1.2
type Thumbnailer ¶ added in v0.1.2
type Thumbnailer struct {
// Name 名称
Name string
// Text 说明
Text string
// Alias 别名
Alias []string
// Thumbnail 缩图
Action ThumbnailFunc
}
Click to show internal directories.
Click to hide internal directories.