Documentation
¶
Index ¶
- Constants
- func Browse(code string, opts ...BrowseOption) (string, error)
- func Download(code string, opts ...DownloadOption) (string, error)
- func PreviewConfig() string
- func Remove(code string, opts ...RemoveOption) error
- func SaltConfig() string
- func ThumbnailConfig() string
- type BrowseOption
- type Config
- type Configs
- type Connection
- type DownloadOption
- type Driver
- type FetchOption
- type File
- type Health
- type Instance
- type Module
- func (m *Module) Browse(code string, opts ...BrowseOption) (string, error)
- func (m *Module) Close()
- func (m *Module) Config(global Map)
- func (m *Module) Download(code string, opts ...DownloadOption) (string, error)
- func (m *Module) Fetch(code string, opts ...FetchOption) (Stream, error)
- func (m *Module) Open()
- func (m *Module) Register(name string, value Any)
- func (m *Module) RegisterConfig(name string, cfg Config)
- func (m *Module) RegisterConfigs(configs Configs)
- func (m *Module) RegisterDriver(name string, driver Driver)
- func (m *Module) Remove(code string, opts ...RemoveOption) error
- func (m *Module) Setup()
- func (m *Module) Start()
- func (m *Module) Stop()
- func (m *Module) Upload(original string, opts ...UploadOption) (*File, error)
- func (m *Module) UploadTo(base string, original string, opts ...UploadOption) (*File, error)
- type RemoveOption
- type Stream
- type UploadOption
Constants ¶
View Source
const NAME = "STORAGE"
Variables ¶
This section is empty.
Functions ¶
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 Connection ¶ added in v0.8.1
type Connection 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)
}
type DownloadOption ¶ added in v0.1.0
type DownloadOption struct {
Target string
}
type Driver ¶
type Driver interface {
Connect(*Instance) (Connection, error)
}
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) Download ¶
func (m *Module) Download(code string, opts ...DownloadOption) (string, error)
func (*Module) Fetch ¶ added in v0.1.0
func (m *Module) Fetch(code string, opts ...FetchOption) (Stream, error)
func (*Module) RegisterConfig ¶ added in v0.8.1
func (*Module) RegisterConfigs ¶ added in v0.8.1
func (*Module) RegisterDriver ¶ added in v0.8.1
type RemoveOption ¶ added in v0.1.0
type RemoveOption struct{}
Click to show internal directories.
Click to hide internal directories.