Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrorStatusCodes = map[error]int{ facedetection.ErrNoImageSpecified: http.StatusBadRequest, facedetection.ErrBadInput: http.StatusBadRequest, facedetection.ErrCantReadImage: http.StatusBadRequest, facedetection.ErrImageTypeNotSupported: http.StatusBadRequest, facedetection.ErrNoFacesFound: http.StatusOK, }
ErrorStatusCodes maps commonly returned errors to HTTP status codes
Functions ¶
This section is empty.
Types ¶
type FaceDetectionService ¶
type FaceDetectionService interface {
Detect(io.Reader) (facedetection.FaceDetection, error)
}
FaceDetectionService provides an interface to the service that deals with face detection
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler provides an generic interface for handling HTTP requests.
type ImageFetcherService ¶
ImageFetcherService provides an interface to the service that deals with fetching images
type Services ¶
type Services struct {
FaceDetection FaceDetectionService
ImageFetcher ImageFetcherService
}
Services describe the external services that the Handler relies on.
Click to show internal directories.
Click to hide internal directories.