Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewFilesAPI ¶
NewFilesAPI returns a new http.Handler instance that implements files related endpoints.
Types ¶
type Item ¶
type Item struct { Type ItemType `json:"type"` Name string `json:"name"` Path string `json:"path"` ModTime time.Time `json:"updated_at"` Children []*Item `json:"children"` }
Item represents a single source file.
type Source ¶
type Source interface { Tree() (*Item, error) Mkdir(path string) (*Item, error) Rmdir(path string) (*Item, error) File(filePath string) (*os.File, error) Save(r io.Reader, filePath string) (*Item, error) Remove(filePath string) (*Item, error) }
Source provides album and images metadata.
func NewDiskSource ¶
NewDiskSource returns disk based source for a provided base dir path. Only images with requested extensions are returned.
Click to show internal directories.
Click to hide internal directories.