Documentation ¶
Index ¶
- type Config
- type Handler
- func (h *Handler) Image(path string, width, height, rot int) (image.Image, error, int)
- func (h *Handler) List(dirApiPath string) (*ListResult, error, int)
- func (h *Handler) ListFromIndex(indexApiPath string) (*ListResult, error, int)
- func (h *Handler) PutText(path string, command UpdateTextCommand) (error, int)
- func (h *Handler) Text(path string) ([]byte, error, int)
- func (h *Handler) UpdateImageIndex(apiPath string, command UpdateCommand) (error, int)
- func (h *Handler) VideoFilePath(path string) (string, error)
- type ImageIndex
- type ListItem
- type ListResult
- type UpdateCommand
- type UpdateTextCommand
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
ContentRoot string // The root directory of our content hierarchy
}
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func NewHandler ¶
func (*Handler) ListFromIndex ¶
func (h *Handler) ListFromIndex(indexApiPath string) (*ListResult, error, int)
ListFromIndex creates a list of files as given in the specified index file.
func (*Handler) PutText ¶
func (h *Handler) PutText(path string, command UpdateTextCommand) (error, int)
func (*Handler) UpdateImageIndex ¶
func (h *Handler) UpdateImageIndex(apiPath string, command UpdateCommand) (error, int)
type ImageIndex ¶
type ImageIndex struct {
// contains filtered or unexported fields
}
type ListItem ¶
type ListItem struct { Name string Path string // Full API path if the item is not in the parent dir IndexPath string // Full API path to the index file, if not the default index IndexEntry string // The path to the file relative to the index, if not in the default index IsDir bool Size int64 Type string ExifDateTime time.Time ModTime int64 // seconds since the epoch ModTimeStr string // ModTime converted to a string by the server Text string TextError string // The error if we get one trying to read the text file }
type ListResult ¶
type UpdateCommand ¶
type UpdateTextCommand ¶
type UpdateTextCommand struct {
Content string
}
Click to show internal directories.
Click to hide internal directories.