From b6fbdc66c1ce1ec61ebfb6fcc0351ea627a1d288 Mon Sep 17 00:00:00 2001 From: tobi <31960611+tsmethurst@users.noreply.github.com> Date: Wed, 22 Feb 2023 16:05:26 +0100 Subject: [chore] Deinterface processor and subprocessors (#1501) * [chore] Deinterface processor and subprocessors * expose subprocessors via function calls * missing license header --- internal/processing/report/report.go | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) (limited to 'internal/processing/report/report.go') 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, -- cgit v1.2.3