Commit graph

15 commits

Author SHA1 Message Date
konrad
699d3d6060 Add Golangci Lint (#676)
Increase golangci timeout

Fix installing golangci-lint in ci

Remove mage targets replaced by golangci

Run golint in ci

Add goheader linter

Enable & fix more linters

Fix lint issues

Add mage target to automagically fix issues found by golangci

golangci-lint run --fix

Add golangci config

Add golangci mage target

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: https://kolaente.dev/vikunja/api/pulls/676
Co-Authored-By: konrad <konrad@kola-entertainments.de>
Co-Committed-By: konrad <konrad@kola-entertainments.de>
2020-10-11 20:10:03 +00:00
konrad
d56a611be7 Key-Value Storages (#674)
Fix lint

Add docs for keyvalue config options

Use keyvalue store to cache unsplash photo results

Cleanup

Use keyvalue store for upload avatar

Use keyvalue store for initials avatar

Fix initializing metrics

Use keyvalue for metrics

Add IncryBy and DecrBy methods to increase or decrease a value

Fix lint

Return custom error if a key does not exist

Init keyvalue storage

Follow the keyvalue storage setting for things like cache and other

Add docs

Add configuration of the storage backend

Add redis keyvalue storage implementation

Add doc comments

Add methods to use storage through the package itself

Add memory implementation for keyvalue store

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: https://kolaente.dev/vikunja/api/pulls/674
Co-Authored-By: konrad <konrad@kola-entertainments.de>
Co-Committed-By: konrad <konrad@kola-entertainments.de>
2020-10-10 16:53:59 +00:00
kolaente
3b2289c8fa
Fix swagger docs 2020-06-28 16:25:46 +02:00
kolaente
be11362533
Fix searching for unsplash pictures with words that contain a space 2020-06-26 00:37:10 +02:00
konrad
a0ffe89056 List Background upload (#582)
Add filesize check when uploading a new file

Fix error 500 if the uploaded background was not an unsplash one

Add upload background setting to info endpoint

Add config docs

Fix lint

Return list background type if it was uploaded

Add file upload

Add docs

Save uploaded backgrounds as file

Add background upload handler

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: https://kolaente.dev/vikunja/api/pulls/582
2020-06-11 17:31:37 +00:00
kolaente
d63666cece
Fix getting unsplash thumbnails for non "photo-*" urls 2020-05-31 22:40:27 +02:00
kolaente
03ef48a0ae
Properly ping unsplash when using unsplash images 2020-05-31 22:06:59 +02:00
kolaente
8f35b9d579
Set unsplash empty collection caching to one hour 2020-05-31 20:50:51 +02:00
kolaente
ebfa982c72
Fix misspell 2020-05-31 18:12:32 +02:00
kolaente
2fa4fcc202
Fix caching of initial unsplash results per page 2020-05-31 18:09:46 +02:00
kolaente
ad67154e26
Add cache for initial unsplash collection 2020-05-31 17:59:39 +02:00
kolaente
42ddee8d6f
Add logging if downloading an image from unsplash fails 2020-05-29 22:11:49 +02:00
kolaente
a0fb8bd32d
Add unsplash image proxy for images and thumbnails 2020-05-29 15:33:46 +02:00
kolaente
2ef2c7523d
Also return unsplash info when searching 2020-05-27 22:12:12 +02:00
konrad
e5e30d0915 List Backgrounds (#568)
Return the updated list when setting a list background

Add swagger docs for unsplash methods

Add unsplash info to search results

Fix misspell

Fix lint

Add rights check for setting and getting backgrounds

Show unsplash information when loading a single list

Make application id for pingbacks configurable

Remove old backgrounds when setting a new one

Return 404 if the list does not have a background

Implement getting list backgrounds

Implement actually setting a photo from unsplash as list background

go mod tidy

Add migration for background file id

Roughly implement setting a list background from unsplash

Implement saving a background

Add migration for unsplash photo table

Add unsplash search

Fix parsing page param

Fix parsing page param

Fix background config

Add unsplash wrapper library

Add enabled background providers to info endpoint

Add config options for backgrounds

Add unsplash background provider

Add routing handler for backgrounds

Add basic background provider interface

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: https://kolaente.dev/vikunja/api/pulls/568
2020-05-26 20:07:55 +00:00