summaryrefslogtreecommitdiff
path: root/internal/processing/report/report.go
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2023-02-22 16:05:26 +0100
committerLibravatar GitHub <noreply@github.com>2023-02-22 16:05:26 +0100
commitb6fbdc66c1ce1ec61ebfb6fcc0351ea627a1d288 (patch)
treec79d1107375597ab8a79045c80dd62dc95a204e7 /internal/processing/report/report.go
parent[bugfix] Remove initial storage cleanup (#1545) (diff)
downloadgotosocial-b6fbdc66c1ce1ec61ebfb6fcc0351ea627a1d288.tar.xz
[chore] Deinterface processor and subprocessors (#1501)
* [chore] Deinterface processor and subprocessors * expose subprocessors via function calls * missing license header
Diffstat (limited to 'internal/processing/report/report.go')
-rw-r--r--internal/processing/report/report.go15
1 files changed, 2 insertions, 13 deletions
diff --git a/internal/processing/report/report.go b/internal/processing/report/report.go
index 8658ac808..b5f4b301e 100644
--- a/internal/processing/report/report.go
+++ b/internal/processing/report/report.go
@@ -19,31 +19,20 @@
package report
import (
- "context"
-
- apimodel "github.com/superseriousbusiness/gotosocial/internal/api/model"
"github.com/superseriousbusiness/gotosocial/internal/concurrency"
"github.com/superseriousbusiness/gotosocial/internal/db"
- "github.com/superseriousbusiness/gotosocial/internal/gtserror"
- "github.com/superseriousbusiness/gotosocial/internal/gtsmodel"
"github.com/superseriousbusiness/gotosocial/internal/messages"
"github.com/superseriousbusiness/gotosocial/internal/typeutils"
)
-type Processor interface {
- ReportsGet(ctx context.Context, account *gtsmodel.Account, resolved *bool, targetAccountID string, maxID string, sinceID string, minID string, limit int) (*apimodel.PageableResponse, gtserror.WithCode)
- ReportGet(ctx context.Context, account *gtsmodel.Account, id string) (*apimodel.Report, gtserror.WithCode)
- Create(ctx context.Context, account *gtsmodel.Account, form *apimodel.ReportCreateRequest) (*apimodel.Report, gtserror.WithCode)
-}
-
-type processor struct {
+type Processor struct {
db db.DB
tc typeutils.TypeConverter
clientWorker *concurrency.WorkerPool[messages.FromClientAPI]
}
func New(db db.DB, tc typeutils.TypeConverter, clientWorker *concurrency.WorkerPool[messages.FromClientAPI]) Processor {
- return &processor{
+ return Processor{
tc: tc,
db: db,
clientWorker: clientWorker,