Commit graph

10 commits

Author SHA1 Message Date
Felipe Martin 6f19c12c95
Start working on new REST API. Refactor logic in domains. (#497)
* added 404 template

* added auth domain

* added embed file for frontend

* added base config and dependencies

* added basic new http server

* added separated server command

* updated go modules

* removed modd file

* Added shortcut to send internal server error response

* Added JWT support to Auth Domain

* Added JWT support to API

* docs: added comments to response struct

* naming

* inline returns

* updated dependencies

* production logger

* bookmarks endpoint

* reverted old views api path

* frontend for api v1

* proper 404 error (not working atm)

* use response

* removed 404 html

* server error handler

* login and basic auth

* adjusted session duration

* properly retrieve tags

* properly delete bookmark

* cleanup

* archiver domain

* debug routes

* bookmark routes

* expiration by parameter

* move to logrus

* logout

* frontend cache

* updated dependencies

* http: migrated to gin

* linted

* Added version command

* unit tests, docs

* response test utils and tests

* remove logout handler

* auth

* createtag

* improved http test utilities

* assert message equals

* Remove 1.19 from test matrix

* moved api to v1 folder

* docs: contribute docs

* updated makefile

* updated usage docs

* warn in server command

* updaed docs with shiori version command

* Updated documentation

* deps: update
2023-07-17 14:30:18 +01:00
Felipe Martin 8e9324ae8b
deps: update to go 1.20 + dependencies. Fixes CI (#628)
* deps: update go1.20 and dependencies

* fix: goreleaser archives

* ci: removed unused notify irc action

* ci: updated workflow dependency versions

* fix: typo
2023-07-02 12:50:29 +02:00
Felipe Martin 85534b62f8
Update dependencies (#616)
* Added contribute docs for tests
* deps: update
* mariadb using healthcheck script
* Restored health retries to 5
2023-06-11 21:10:15 +02:00
Felipe Martin f6f3faf130
deps: update direct deps (#567)
* deps: update direct deps

* test on 1.20
2023-02-05 11:19:53 +01:00
dependabot[bot] 8efbc94007
chore(deps): bump actions/setup-go from 2 to 3 (#522)
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 2 to 3.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](https://github.com/actions/setup-go/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-28 09:10:31 +02:00
Felipe Martin Garcia 4ea81a446a
chore(deps): updated go and github actions dependencies (#511)
* deps(go): updated dependencies

* deps(github_actions): updated dependencies
2022-10-12 00:10:55 +02:00
Felipe Martin Garcia 05fee53bd0
fix: saving bookmarks inconsistencies (#500)
* chore: updated go-migrate dependencies

* fix: specify if we're saving bookmarks expecting a creation

up until now the SaveBookmarks method was doing some "magic" to do
"upserts" on the databases, but consistency between engines was scarce
and not knowing if we were expecting saving a new bookmark or updating
an existing one was leading to errors and inconsistencies in logic all
around the place. Now we need to specify a creation boolean when
saving and a differnt query will be make (INSERT vs UPDATE).

* fix(api): using incorrect bookmark for content downlaod

* test(db): added test pipeline for databases

Added functions that will share logic among the engines and will be
called on fresh databases on each test run

* dev: added basic docker-compose for development

* chore: uncommented tests

* ci(test): added mysql service

* typo

* test(mysql): select database after reset

* fix(mysql): ignore empty row errors when parsing tags

* fix(mysql): handle insert errors

* chore: added mysql variables to compose

* ci: explicit mysql service port exposed
2022-10-11 23:47:38 +02:00
Felipe Martin Garcia dc73cd825b
fix(psql): save bookmarks not using passed bookmark id for the insert (#484)
* fix(psql): get last inserted id from insert query

book.ID was not being used, so inserts were failing.
the check for book.ID was removed and it is filled with the returning
id from the insert query

* test(psql): added save bookmarks simple test

* ci: added postgresql service

* fix(typo): QueryRow -> QueryRowContext

* ci: explicit postgresql port

* ci(test): 1.19 only

* ci: bind psql to localhost

* test(pg): migrate before test

* test(pg): migrate database before test

* fix(pg): check no rows error on get query
2022-10-09 17:05:30 +02:00
Felipe Martin Garcia 3deeda7151
feat: upgrade to go 1.19 (#469)
* feat: upgrade to go 1.19

* fix: ioutil deprecation notice
2022-08-11 14:22:10 +02:00
n8225 d05d1ad2c0
Setup new CI/CD workflows (#365)
* CI/CD setup
* Setup for go-shiori
* Fix docker image
* Dockerfile adjustments
2022-02-13 16:38:54 +01:00