feat(filters): add support for multiple external filters (#1030)

* feat(filters): add support for multiple ext filters

* refactor(filters): crud and check

* feat(filters): add postgres migrations

* fix(filters): field array types

* fix(filters): formatting

* fix(filters): formatting

* feat(filters): external webhook improve logs
This commit is contained in:
ze0s 2023-08-15 23:07:39 +02:00 committed by GitHub
parent db209319da
commit dde0d0ed61
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 1514 additions and 478 deletions

View file

@ -32,7 +32,7 @@ func NewReleaseRepo(log logger.Logger, db *DB) domain.ReleaseRepo {
}
}
func (repo *ReleaseRepo) Store(ctx context.Context, r *domain.Release) (*domain.Release, error) {
func (repo *ReleaseRepo) Store(ctx context.Context, r *domain.Release) error {
codecStr := strings.Join(r.Codec, ",")
hdrStr := strings.Join(r.HDR, ",")
@ -45,16 +45,15 @@ func (repo *ReleaseRepo) Store(ctx context.Context, r *domain.Release) (*domain.
// return values
var retID int64
err := queryBuilder.QueryRowContext(ctx).Scan(&retID)
if err != nil {
return nil, errors.Wrap(err, "error executing query")
if err := queryBuilder.QueryRowContext(ctx).Scan(&retID); err != nil {
return errors.Wrap(err, "error executing query")
}
r.ID = retID
repo.log.Debug().Msgf("release.store: %+v", r)
return r, nil
return nil
}
func (repo *ReleaseRepo) StoreReleaseActionStatus(ctx context.Context, status *domain.ReleaseActionStatus) error {