refining photo handling
continuous-integration/drone/push Build is passing

* photo metedata provided with downloaded data
* data download recognizes application/json and application/zip accepted types and serves bare json and zip with photos respectively
* thumbnail handling and storage
This commit is contained in:
zegkljan
2022-02-19 23:38:58 +01:00
parent f8b42f35f6
commit 7deb7e3f39
5 changed files with 211 additions and 24 deletions
+16
View File
@@ -34,6 +34,22 @@ func (e *ErrPhotoNotProvided) Error() string {
return fmt.Sprintf("referenced photo %s which was not provided", e.Reference)
}
type EErrPhotoThumbnailNotProvided *ErrPhotoThumbnailNotProvided
type ErrPhotoThumbnailNotProvided struct {
Reference string
}
func NewErrPhotoThumbnailNotProvided(reference string) *ErrPhotoThumbnailNotProvided {
return &ErrPhotoThumbnailNotProvided{
Reference: reference,
}
}
func (e *ErrPhotoThumbnailNotProvided) Error() string {
return fmt.Sprintf("referenced photo %s the thumbnail of which was not provided", e.Reference)
}
type ErrFeatureForPhotoNotExists struct {
PhotoFeatureReference int64
}