Documentation
¶
Index ¶
- Constants
- func Browse(code string, opts ...BrowseOption) (string, error)
- func DecodeImageConfig(r io.Reader) (image.Config, error)
- func Download(code string, opts ...DownloadOption) (string, error)
- func ImageConfig(filename string) (image.Config, error)
- func Preview(code string, width, height int64) (string, error)
- func PreviewConfig() string
- func Remove(code string, opts ...RemoveOption) error
- func SaltConfig() string
- func StatFile(file string) (Map, error)
- func Thumbnail(code string, width, height, pos int64) (string, error)
- func ThumbnailConfig() string
- type BrowseOption
- type Config
- type Configs
- type Connect
- type DownloadOption
- type Driver
- type FetchOption
- type File
- type Files
- type Health
- type Info
- type Instance
- type Module
- func (this *Module) Browse(code string, opts ...BrowseOption) (string, error)
- func (this *Module) Config(name string, config Config)
- func (this *Module) Configs(config Configs)
- func (this *Module) Configure(global Map)
- func (this *Module) Connect()
- func (this *Module) Download(code string, opts ...DownloadOption) (string, error)
- func (module *Module) Driver(name string, driver Driver)
- 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)
- func (this *Module) Register(name string, value Any)
- func (this *Module) Remove(code string, opts ...RemoveOption) 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)
- func (this *Module) Upload(orginal string, opts ...UploadOption) (*File, error)
- func (this *Module) UploadTo(base string, orginal string, opts ...UploadOption) (*File, error)
- type Previewer
- type PreviewerFunc
- type Range
- type RemoveOption
- type Stream
- type ThumbnailFunc
- type Thumbnailer
- type UploadOption
Constants ¶
View Source
const (
NAME = "STORE"
)
Variables ¶
This section is empty.
Functions ¶
func DecodeImageConfig ¶ added in v0.1.0
Decode reads an image from r.
func ImageConfig ¶ added in v0.1.0
Open loads an image from file
func PreviewConfig ¶
func PreviewConfig() string
func Remove ¶
func Remove(code string, opts ...RemoveOption) error
func SaltConfig ¶
func SaltConfig() string
func ThumbnailConfig ¶
func ThumbnailConfig() string
Types ¶
type BrowseOption ¶ added in v0.1.0
type BrowseOption struct { Headers Map Params Map }
type Connect ¶
type Connect interface { Open() error Health() Health Close() error Upload(string, UploadOption) (*File, error) Fetch(*File, FetchOption) (Stream, error) Download(*File, DownloadOption) (string, error) Remove(*File, RemoveOption) error Browse(*File, BrowseOption) (string, error) }
Connect
type DownloadOption ¶ added in v0.1.0
type DownloadOption struct {
Target string
}
type FetchOption ¶ added in v0.1.0
type File ¶
type File struct {
// contains filtered or unexported fields
}
func Upload ¶
func Upload(from Any, opts ...UploadOption) (*File, error)
type Instance ¶
type Module ¶
type Module struct {
// contains filtered or unexported fields
}
func (*Module) Browse ¶
func (this *Module) Browse(code string, opts ...BrowseOption) (string, error)
func (*Module) Download ¶
func (this *Module) Download(code string, opts ...DownloadOption) (string, error)
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)
type Previewer ¶
type Previewer struct { // Name 名称 Name string // Text 说明 Text string // Alias 别名 Alias []string // Preview 预览动图 Action PreviewerFunc }
type RemoveOption ¶ added in v0.1.0
type RemoveOption struct { }
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.