Documentation ¶
Overview ¶
Package impl providers the main implementation of sync server APIs.
Index ¶
- Variables
- func BuildAudioThumbnail(userName string, deviceId string, file string) (string, error)
- func BuildImageThumbnail(userName string, deviceId string, file string) (string, error)
- func BuildVideoThumbnail(userName string, deviceId string, file string) (string, error)
- func DeleteAllHandler(w http.ResponseWriter, r *http.Request)
- func ExtractMetadata(userName string, deviceId string, file string) (string, error)
- func GetFilesHandler(w http.ResponseWriter, r *http.Request)
- func GetFoldersHandler(w http.ResponseWriter, r *http.Request)
- func GetFrameFromVideo(inFileName string, frameNum int) io.Reader
- func GetImageHandler(w http.ResponseWriter, r *http.Request)
- func InvalidFileTypeUploaded(fileType string) error
- func SetupInfoHandler(w http.ResponseWriter, r *http.Request)
- func UploadHandler(w http.ResponseWriter, r *http.Request)
- type RequestError
Constants ¶
This section is empty.
Variables ¶
View Source
var BuildThumbnailFailed = errors.Errorf("Creating thumbnail failed.").Err
An error for empty storage path.
View Source
var FileSizeExceeded = errors.Errorf("Maximum file size for uploaded files exceeded.").Err
An error for empty storage path.
View Source
var MissingDateClassifier = errors.Errorf("Missing date classifier.").Err
An error for missing date classifier.
View Source
var MissingUser = errors.Errorf("The user is not authorized.").Err
An error for missing authorized user.
View Source
var WrongDateClassifier = errors.Errorf("Wrong date classifier.").Err
An error for wrong date classifier.
Functions ¶
func BuildAudioThumbnail ¶ added in v1.0.5
func BuildImageThumbnail ¶ added in v1.0.5
func BuildVideoThumbnail ¶ added in v1.0.5
func DeleteAllHandler ¶ added in v1.0.3
func DeleteAllHandler(w http.ResponseWriter, r *http.Request)
func ExtractMetadata ¶ added in v1.0.5
func GetFilesHandler ¶ added in v1.0.2
func GetFilesHandler(w http.ResponseWriter, r *http.Request)
func GetFoldersHandler ¶ added in v1.0.2
func GetFoldersHandler(w http.ResponseWriter, r *http.Request)
func GetFrameFromVideo ¶ added in v1.0.5
func GetImageHandler ¶ added in v1.0.3
func GetImageHandler(w http.ResponseWriter, r *http.Request)
func InvalidFileTypeUploaded ¶
An error for invalid file type, which is not allowed to be uploaded.
func SetupInfoHandler ¶
func SetupInfoHandler(w http.ResponseWriter, r *http.Request)
func UploadHandler ¶
func UploadHandler(w http.ResponseWriter, r *http.Request)
Upload file handler for uploading large streamed files. A new file is saved under a directory named like the client device. An error will be rendered in the response if: - the file already exists; - the maximum allowed size is exceeded; - the file format is not allowed;
Types ¶
type RequestError ¶
func (*RequestError) BadRequest ¶
func (r *RequestError) BadRequest() bool
func (*RequestError) Error ¶
func (r *RequestError) Error() string
func (*RequestError) InternalServerError ¶
func (r *RequestError) InternalServerError() bool
func (*RequestError) ServiceUnavailable ¶
func (r *RequestError) ServiceUnavailable() bool
Click to show internal directories.
Click to hide internal directories.