Commit Graph

15 Commits

Author SHA1 Message Date
Simone Gotti 72f279c4c3 *: improve error handling
* objectstorage: remove `types` package and move `ErrNotExist` in base package
* objectstorage: Implement .Is and add helper `IsErrNotExist` for `ErrNotExist`
* util: Rename `ErrNotFound` to `ErrNotExist`
* util: Add `IsErr*` helpers and use them in place of `errors.Is()`
* datamanager: add `ErrNoDataStatus` to report when there's not data status in ost
* runservice/common: remove `ErrNotExist` and use errors in util package
2019-11-11 12:17:35 +01:00
Simone Gotti fe9e3e8317 configstore: implement project move 2019-09-27 11:07:49 +02:00
Simone Gotti c1ff28ef9f *: export clients and related types
Export clients and related packages.

The main rule is to not import internal packages from exported packages.

The gateway client and related types are totally decoupled from the gateway
service (not shared types between the client and the server).

Instead the configstore and the runservice client currently share many types
that are now exported (decoupling them will require that a lot of types must be
duplicated and the need of functions to convert between them, this will be done
in future when the APIs will be declared as stable).
2019-08-02 12:02:01 +02:00
Simone Gotti fd26e617b3 configstore: move configstore types inside configstore package
Since they're not types common to all the services but belongs to the
configstore.

Next step will be to make them local to the configstore and not directly used by
other services since these types are also stored.
2019-08-02 10:05:47 +02:00
Simone Gotti b8c2b4020a db: use context functions
Use the go sql context functions (ExecContext, QueryContext etc...)

The context is saved inside Tx so the library users should only pass it one time
to the db.Do function.
2019-07-25 14:49:53 +02:00
Simone Gotti 276c045c3b configstore: add parenttype to related tables
Add the parenttype column to project, projectgroup, secret, variable tables.
2019-07-09 10:16:45 +02:00
Simone Gotti 8b7a5602e0 configstore: fix project/projectgroup rename
project: check name exists only if the name has changed
projectgroup: add missing duplicate name check
2019-07-08 18:12:42 +02:00
Simone Gotti 8d67844cc4 *: use vanity url
use agola.io domain
2019-07-01 11:40:20 +02:00
Simone Gotti 9b2ce717c7 *: migrate to "golang.org/x/xerrors"
Just a raw replace of "github.com/pkg/errors".

Next steps will improve errors (like remote errors, api errors, not exist errors
etc...) to leverage its functionalities
2019-05-23 11:23:14 +02:00
Simone Gotti d551dcb820 configstore: implement projectgroup delete 2019-05-13 00:23:57 +02:00
Simone Gotti e1d0318c9b configstore: add UpdateProject api 2019-05-09 15:33:57 +02:00
Simone Gotti 79c1a60a36 configstore: update CreateProject action
* move validation to ValidateProject function
* remove wrong project group check
2019-05-09 15:32:27 +02:00
Simone Gotti 649c42f75b gitsources: create secret and webhook secret
Use the webhook secret on webhook creation and check it and webhook receive
2019-05-07 18:29:31 +02:00
Simone Gotti 2675aee333 configstore: generate User and Project secret 2019-05-07 17:16:42 +02:00
Simone Gotti ca5b5f3a7e configstore: rename command(handler) to action(handler)
Since we're going to migrate all actions (also queries that now are implemented
in the api handlers) there
2019-05-03 23:35:25 +02:00