Documentation
¶
Index ¶
- Constants
- func Browse(code string, query Map, expires ...time.Duration) (string, error)
- func Configure(cfg Map)
- func Download(code string) (string, error)
- func DownloadConfig() string
- 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 SaltConfig() string
- 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 FetchOption
- type File
- type Files
- type Health
- type Info
- type Instance
- type Module
- func (this *Module) Browse(code string, query Map, expires ...time.Duration) (string, error)
- 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) Fetch(code string, opts ...FetchOption) (Stream, error)
- 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 Stream
- type ThumbnailFunc
- type Thumbnailer
Constants ¶
View Source
const (
NAME = "STORE"
)
Variables ¶
This section is empty.
Functions ¶
func DownloadConfig ¶ added in v0.1.0
func DownloadConfig() string
func PreviewConfig ¶
func PreviewConfig() string
func SaltConfig ¶ added in v0.0.2
func SaltConfig() string
func ThumbnailConfig ¶
func ThumbnailConfig() string
Types ¶
type Connect ¶
type Connect interface {
Open() error
Health() Health
Close() error
Upload(path string, metadata Map) (File, Files, error)
Fetch(File, FetchOption) (Stream, error)
Download(file File) (string, error)
Remove(file File) error
Browse(file File, query Map, expires time.Duration) (string, error)
}
Connect
type FetchOption ¶ added in v0.1.0
type File ¶
type File interface {
Base() string
Hash() string
Type() string
Size() int64
File() string
Name() string
Code() string
Proxy() bool
Remote() bool
}
func UploadFile ¶ added in v0.1.0
func UploadFileTo ¶ added in v0.1.0
type Files ¶
type Files []File
func UploadPath ¶ added in v0.1.0
func UploadPathTo ¶ added in v0.1.0
type Instance ¶
type Instance struct {
Name string
Config Config
Setting Map
// contains filtered or unexported fields
}
type Module ¶
type Module struct {
// contains filtered or unexported fields
}
func (*Module) Fetch ¶ added in v0.1.0
func (this *Module) Fetch(code string, opts ...FetchOption) (Stream, error)
func (*Module) Initialize ¶
func (this *Module) Initialize()
func (*Module) Thumbnailer ¶
func (this *Module) Thumbnailer(name string, config Thumbnailer, override bool)
type Previewer ¶
type Previewer struct {
// Name 名称
Name string
// Text 说明
Text string
// Alias 别名
Alias []string
// Preview 预览动图
Action PreviewerFunc
}
type Thumbnailer ¶
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.