impl

package
v1.0.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 3, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Overview

Package impl providers the main implementation of sync server APIs.

Index

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 BuildAudioThumbnail(userName string, deviceId string, file string) (string, error)

func BuildImageThumbnail added in v1.0.5

func BuildImageThumbnail(userName string, deviceId string, file string) (string, error)

func BuildVideoThumbnail added in v1.0.5

func BuildVideoThumbnail(userName string, deviceId string, file string) (string, error)

func DeleteAllHandler added in v1.0.3

func DeleteAllHandler(w http.ResponseWriter, r *http.Request)

func ExtractMetadata added in v1.0.5

func ExtractMetadata(userName string, deviceId string, file string) (string, error)

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 GetFrameFromVideo(inFileName string, frameNum int) io.Reader

func GetImageHandler added in v1.0.3

func GetImageHandler(w http.ResponseWriter, r *http.Request)

func InvalidFileTypeUploaded

func InvalidFileTypeUploaded(fileType string) error

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

type RequestError struct {
	StatusCode int

	Err error
}

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL