Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FromAny ¶
func FromAny(file *multipart.FileHeader, url string) (io.ReadCloser, error)
func FromMultipartFile ¶
func FromMultipartFile(file *multipart.FileHeader) (io.ReadCloser, error)
Types ¶
type Store ¶
type Store interface {
// Original returns URL to the original file
Original(id uint64, ext string) string
// Preview returns URL to the preview (of the original) file
Preview(id uint64, ext string) string
// Save stores the file
Save(filename string, f io.Reader) error
// Remove deletes the file
Remove(filename string) error
// Open returns file handle
Open(filename string) (io.ReadSeekCloser, error)
// Healthcheck checks health status of the store
Healthcheck(ctx context.Context) error
}
Click to show internal directories.
Click to hide internal directories.