impl

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2024 License: Apache-2.0 Imports: 15 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 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 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 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