Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var BufferPool = sync.Pool{ New: func() interface{} { return bytes.NewBuffer(make([]byte, 4*1024)) }, }
BufferPool for io.CopyBuffer
Functions ¶
func HandleClose ¶ added in v0.0.5
HandleClose call properly
Types ¶
type Item ¶
type Item struct {
Date time.Time `json:"date"`
Name string `json:"name"`
Pathname string `json:"pathname"`
Extension string `json:"extension"`
IsDir bool `json:"isDir"`
Size int64 `json:"size"`
}
Item describe item on a storage provider
type Storage ¶
type Storage interface {
Enabled() bool
Name() string
WithIgnoreFn(ignoreFn func(Item) bool) Storage
Path(pathname string) string
Info(pathname string) (Item, error)
List(pathname string) ([]Item, error)
WriteTo(pathname string, reader io.Reader) error
ReadFrom(pathname string) (io.ReadSeekCloser, error)
Walk(pathname string, walkFn func(Item) error) error
CreateDir(pathname string) error
Rename(oldName, newName string) error
Remove(pathname string) error
UpdateDate(pathname string, date time.Time) error
}
Storage describe action on a storage provider
Click to show internal directories.
Click to hide internal directories.