[feature] Implement /api/v1/reports endpoints on client API (#1330)

* start adding report client api

* route + test reports get

* start report create endpoint

* you can create reports now babyy

* stub account report processor

* add single reportGet endpoint

* fix test

* add more filtering params to /api/v1/reports GET

* update swagger

* use marshalIndent in tests

* add + test missing Link info
This commit is contained in:
tobi 2023-01-23 13:14:21 +01:00 committed by GitHub
commit e9747247d5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
26 changed files with 2184 additions and 20 deletions

View file

@ -28,6 +28,9 @@ import (
type Report interface {
// GetReportByID gets one report by its db id
GetReportByID(ctx context.Context, id string) (*gtsmodel.Report, Error)
// GetReports gets limit n reports using the given parameters.
// Parameters that are empty / zero are ignored.
GetReports(ctx context.Context, resolved *bool, accountID string, targetAccountID string, maxID string, sinceID string, minID string, limit int) ([]*gtsmodel.Report, Error)
// PutReport puts the given report in the database.
PutReport(ctx context.Context, report *gtsmodel.Report) Error
// UpdateReport updates one report by its db id.