diff options
author | Gabriel Arakaki Giovanini <mail@gabrielgio.me> | 2023-06-29 23:05:23 +0200 |
---|---|---|
committer | Gabriel Arakaki Giovanini <mail@gabrielgio.me> | 2023-06-29 23:06:44 +0200 |
commit | 024da3e546e98cbaeea5f7bc86af12b671996f41 (patch) | |
tree | 08b38491b7e726fb448cceaceb2ef536360b2223 /pkg/ext | |
parent | 9ba53fea71728ce64342d0d59f4199876e4b6164 (diff) | |
download | lens-024da3e546e98cbaeea5f7bc86af12b671996f41.tar.gz lens-024da3e546e98cbaeea5f7bc86af12b671996f41.tar.bz2 lens-024da3e546e98cbaeea5f7bc86af12b671996f41.zip |
ref: Refactor how repository is define
To make things easier and reduce the number of package I'll move all
repository to one folder, starting with auth and user repository.
Also implements all testing on top of the repository interface with a im
memory implementation. This will later make mescling unit and
integration easier.
Diffstat (limited to 'pkg/ext')
-rw-r--r-- | pkg/ext/middleware.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pkg/ext/middleware.go b/pkg/ext/middleware.go index bc23b90..d255c6d 100644 --- a/pkg/ext/middleware.go +++ b/pkg/ext/middleware.go @@ -7,7 +7,7 @@ import ( "github.com/sirupsen/logrus" "github.com/valyala/fasthttp" - "git.sr.ht/~gabrielgio/img/pkg/components/user" + "git.sr.ht/~gabrielgio/img/pkg/database/repository" ) func HTML(next fasthttp.RequestHandler) fasthttp.RequestHandler { @@ -91,10 +91,10 @@ func (a *AuthMiddleware) LoggedIn(next fasthttp.RequestHandler) fasthttp.Request } type InitialSetupMiddleware struct { - userRepository user.Repository + userRepository repository.UserRepository } -func NewInitialSetupMiddleware(userRepository user.Repository) *InitialSetupMiddleware { +func NewInitialSetupMiddleware(userRepository repository.UserRepository) *InitialSetupMiddleware { return &InitialSetupMiddleware{ userRepository: userRepository, } |