From 7a414da9a802d5eeee911b3536790a061e1d7503 Mon Sep 17 00:00:00 2001 From: Gabriel Arakaki Giovanini Date: Thu, 29 Jun 2023 23:33:02 +0200 Subject: ref: Move all controller under the same folder Move all controller to the same folder and rename them to service. Moving them to the same folder allow an easier setup for testing. --- pkg/view/auth.go | 6 +++--- pkg/view/filesystem.go | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'pkg/view') diff --git a/pkg/view/auth.go b/pkg/view/auth.go index 3f9e414..6b096d9 100644 --- a/pkg/view/auth.go +++ b/pkg/view/auth.go @@ -6,15 +6,15 @@ import ( "github.com/valyala/fasthttp" "git.sr.ht/~gabrielgio/img" - "git.sr.ht/~gabrielgio/img/pkg/components/auth" "git.sr.ht/~gabrielgio/img/pkg/ext" + "git.sr.ht/~gabrielgio/img/pkg/service" ) type AuthView struct { - userController *auth.Controller + userController *service.AuthController } -func NewAuthView(userController *auth.Controller) *AuthView { +func NewAuthView(userController *service.AuthController) *AuthView { return &AuthView{ userController: userController, } diff --git a/pkg/view/filesystem.go b/pkg/view/filesystem.go index d2ebff4..d598b88 100644 --- a/pkg/view/filesystem.go +++ b/pkg/view/filesystem.go @@ -4,25 +4,25 @@ import ( "github.com/valyala/fasthttp" "git.sr.ht/~gabrielgio/img" - "git.sr.ht/~gabrielgio/img/pkg/components/filesystem" "git.sr.ht/~gabrielgio/img/pkg/database/repository" "git.sr.ht/~gabrielgio/img/pkg/ext" + "git.sr.ht/~gabrielgio/img/pkg/service" ) type ( FileSystemView struct { - controller filesystem.Controller + controller service.FileSystemController settings repository.SettingsRepository } FilePage struct { - Page *filesystem.Page + Page *service.Page ShowMode bool ShowOwner bool } ) func NewFileSystemView( - controller filesystem.Controller, + controller service.FileSystemController, settingsRepository repository.SettingsRepository, ) *FileSystemView { return &FileSystemView{ -- cgit v1.2.3