You've already forked golang-saas-starter-kit
mirror of
https://github.com/raseels-repos/golang-saas-starter-kit.git
synced 2025-08-08 22:36:41 +02:00
Fix crazy cros project dep because we had to use interfaces
This commit is contained in:
@ -4,10 +4,8 @@ import (
|
||||
"context"
|
||||
"net/http"
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
"geeks-accelerator/oss/saas-starter-kit/internal/account"
|
||||
accountref "geeks-accelerator/oss/saas-starter-kit/internal/account/account_preference"
|
||||
"geeks-accelerator/oss/saas-starter-kit/internal/platform/auth"
|
||||
"geeks-accelerator/oss/saas-starter-kit/internal/platform/web"
|
||||
"geeks-accelerator/oss/saas-starter-kit/internal/platform/web/webcontext"
|
||||
@ -19,30 +17,11 @@ import (
|
||||
|
||||
// Account represents the Account API method handler set.
|
||||
type Accounts struct {
|
||||
Repository AccountRepository
|
||||
Repository *account.Repository
|
||||
|
||||
// ADD OTHER STATE LIKE THE LOGGER AND CONFIG HERE.
|
||||
}
|
||||
|
||||
type AccountRepository interface {
|
||||
//CanReadAccount(ctx context.Context, claims auth.Claims, dbConn *sqlx.DB, accountID string) error
|
||||
Find(ctx context.Context, claims auth.Claims, req account.AccountFindRequest) (account.Accounts, error)
|
||||
Create(ctx context.Context, claims auth.Claims, req account.AccountCreateRequest, now time.Time) (*account.Account, error)
|
||||
ReadByID(ctx context.Context, claims auth.Claims, id string) (*account.Account, error)
|
||||
Read(ctx context.Context, claims auth.Claims, req account.AccountReadRequest) (*account.Account, error)
|
||||
Update(ctx context.Context, claims auth.Claims, req account.AccountUpdateRequest, now time.Time) error
|
||||
Archive(ctx context.Context, claims auth.Claims, req account.AccountArchiveRequest, now time.Time) error
|
||||
Delete(ctx context.Context, claims auth.Claims, req account.AccountDeleteRequest) error
|
||||
}
|
||||
type AccountPrefRepository interface {
|
||||
Find(ctx context.Context, claims auth.Claims, req accountref.AccountPreferenceFindRequest) ([]*accountref.AccountPreference, error)
|
||||
FindByAccountID(ctx context.Context, claims auth.Claims, req accountref.AccountPreferenceFindByAccountIDRequest) ([]*accountref.AccountPreference, error)
|
||||
Read(ctx context.Context, claims auth.Claims, req accountref.AccountPreferenceReadRequest) (*accountref.AccountPreference, error)
|
||||
Set(ctx context.Context, claims auth.Claims, req accountref.AccountPreferenceSetRequest, now time.Time) error
|
||||
Archive(ctx context.Context, claims auth.Claims, req accountref.AccountPreferenceArchiveRequest, now time.Time) error
|
||||
Delete(ctx context.Context, claims auth.Claims, req accountref.AccountPreferenceDeleteRequest) error
|
||||
}
|
||||
|
||||
// Read godoc
|
||||
// @Summary Get account by ID
|
||||
// @Description Read returns the specified account from the system.
|
||||
|
@ -6,6 +6,7 @@ import (
|
||||
"os"
|
||||
|
||||
"geeks-accelerator/oss/saas-starter-kit/internal/platform/web"
|
||||
|
||||
"github.com/jmoiron/sqlx"
|
||||
"github.com/pkg/errors"
|
||||
"gopkg.in/DataDog/dd-trace-go.v1/contrib/go-redis/redis"
|
||||
|
@ -2,19 +2,20 @@ package handlers
|
||||
|
||||
import (
|
||||
"context"
|
||||
"net/http"
|
||||
|
||||
"geeks-accelerator/oss/saas-starter-kit/internal/platform/auth"
|
||||
"geeks-accelerator/oss/saas-starter-kit/internal/platform/web"
|
||||
"geeks-accelerator/oss/saas-starter-kit/internal/platform/web/webcontext"
|
||||
"geeks-accelerator/oss/saas-starter-kit/internal/platform/web/weberror"
|
||||
"geeks-accelerator/oss/saas-starter-kit/internal/project"
|
||||
"net/http"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
// Example represents the Example API method handler set.
|
||||
type Example struct {
|
||||
Project ProjectRepository
|
||||
Project *project.Repository
|
||||
|
||||
// ADD OTHER STATE LIKE THE LOGGER AND CONFIG HERE.
|
||||
}
|
||||
|
@ -5,7 +5,6 @@ import (
|
||||
"net/http"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"geeks-accelerator/oss/saas-starter-kit/internal/platform/auth"
|
||||
"geeks-accelerator/oss/saas-starter-kit/internal/platform/web"
|
||||
@ -19,21 +18,11 @@ import (
|
||||
|
||||
// Project represents the Project API method handler set.
|
||||
type Projects struct {
|
||||
Repository ProjectRepository
|
||||
Repository *project.Repository
|
||||
|
||||
// ADD OTHER STATE LIKE THE LOGGER IF NEEDED.
|
||||
}
|
||||
|
||||
type ProjectRepository interface {
|
||||
ReadByID(ctx context.Context, claims auth.Claims, id string) (*project.Project, error)
|
||||
Find(ctx context.Context, claims auth.Claims, req project.ProjectFindRequest) (project.Projects, error)
|
||||
Read(ctx context.Context, claims auth.Claims, req project.ProjectReadRequest) (*project.Project, error)
|
||||
Create(ctx context.Context, claims auth.Claims, req project.ProjectCreateRequest, now time.Time) (*project.Project, error)
|
||||
Update(ctx context.Context, claims auth.Claims, req project.ProjectUpdateRequest, now time.Time) error
|
||||
Archive(ctx context.Context, claims auth.Claims, req project.ProjectArchiveRequest, now time.Time) error
|
||||
Delete(ctx context.Context, claims auth.Claims, req project.ProjectDeleteRequest) error
|
||||
}
|
||||
|
||||
// Find godoc
|
||||
// TODO: Need to implement unittests on projects/find endpoint. There are none.
|
||||
// @Summary List projects
|
||||
|
@ -11,7 +11,14 @@ import (
|
||||
"geeks-accelerator/oss/saas-starter-kit/internal/platform/web"
|
||||
"geeks-accelerator/oss/saas-starter-kit/internal/platform/web/webcontext"
|
||||
_ "geeks-accelerator/oss/saas-starter-kit/internal/platform/web/weberror"
|
||||
_ "geeks-accelerator/oss/saas-starter-kit/internal/signup"
|
||||
"geeks-accelerator/oss/saas-starter-kit/internal/account"
|
||||
"geeks-accelerator/oss/saas-starter-kit/internal/account/account_preference"
|
||||
"geeks-accelerator/oss/saas-starter-kit/internal/project"
|
||||
"geeks-accelerator/oss/saas-starter-kit/internal/signup"
|
||||
"geeks-accelerator/oss/saas-starter-kit/internal/user"
|
||||
"geeks-accelerator/oss/saas-starter-kit/internal/user_account"
|
||||
"geeks-accelerator/oss/saas-starter-kit/internal/user_account/invite"
|
||||
"geeks-accelerator/oss/saas-starter-kit/internal/user_auth"
|
||||
|
||||
"github.com/jmoiron/sqlx"
|
||||
"gopkg.in/DataDog/dd-trace-go.v1/contrib/go-redis/redis"
|
||||
@ -22,14 +29,14 @@ type AppContext struct {
|
||||
Env webcontext.Env
|
||||
MasterDB *sqlx.DB
|
||||
Redis *redis.Client
|
||||
UserRepo UserRepository
|
||||
UserAccountRepo UserAccountRepository
|
||||
AccountRepo AccountRepository
|
||||
AccountPrefRepo AccountPrefRepository
|
||||
AuthRepo UserAuthRepository
|
||||
SignupRepo SignupRepository
|
||||
InviteRepo UserInviteRepository
|
||||
ProjectRepo ProjectRepository
|
||||
UserRepo *user.Repository
|
||||
UserAccountRepo *user_account.Repository
|
||||
AccountRepo *account.Repository
|
||||
AccountPrefRepo *account_preference.Repository
|
||||
AuthRepo *user_auth.Repository
|
||||
SignupRepo *signup.Repository
|
||||
InviteRepo *invite.Repository
|
||||
ProjectRepo *project.Repository
|
||||
Authenticator *auth.Authenticator
|
||||
PreAppMiddleware []web.Middleware
|
||||
PostAppMiddleware []web.Middleware
|
||||
|
@ -2,8 +2,6 @@ package handlers
|
||||
|
||||
import (
|
||||
"context"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"geeks-accelerator/oss/saas-starter-kit/internal/account"
|
||||
"geeks-accelerator/oss/saas-starter-kit/internal/platform/auth"
|
||||
@ -11,6 +9,7 @@ import (
|
||||
"geeks-accelerator/oss/saas-starter-kit/internal/platform/web/webcontext"
|
||||
"geeks-accelerator/oss/saas-starter-kit/internal/platform/web/weberror"
|
||||
"geeks-accelerator/oss/saas-starter-kit/internal/signup"
|
||||
"net/http"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
"gopkg.in/go-playground/validator.v9"
|
||||
@ -18,15 +17,11 @@ import (
|
||||
|
||||
// Signup represents the Signup API method handler set.
|
||||
type Signup struct {
|
||||
Repository SignupRepository
|
||||
Repository *signup.Repository
|
||||
|
||||
// ADD OTHER STATE LIKE THE LOGGER AND CONFIG HERE.
|
||||
}
|
||||
|
||||
type SignupRepository interface {
|
||||
Signup(ctx context.Context, claims auth.Claims, req signup.SignupRequest, now time.Time) (*signup.SignupResult, error)
|
||||
}
|
||||
|
||||
// Signup godoc
|
||||
// @Summary Signup handles new account creation.
|
||||
// @Description Signup creates a new account and user in the system.
|
||||
|
@ -24,35 +24,12 @@ var sessionTtl = time.Hour * 24
|
||||
|
||||
// User represents the User API method handler set.
|
||||
type Users struct {
|
||||
AuthRepo UserAuthRepository
|
||||
UserRepo UserRepository
|
||||
AuthRepo *user_auth.Repository
|
||||
UserRepo *user.Repository
|
||||
|
||||
// ADD OTHER STATE LIKE THE LOGGER AND CONFIG HERE.
|
||||
}
|
||||
|
||||
type UserAuthRepository interface {
|
||||
SwitchAccount(ctx context.Context, claims auth.Claims, req user_auth.SwitchAccountRequest, expires time.Duration,
|
||||
now time.Time, scopes ...string) (user_auth.Token, error)
|
||||
Authenticate(ctx context.Context, req user_auth.AuthenticateRequest, expires time.Duration, now time.Time, scopes ...string) (user_auth.Token, error)
|
||||
VirtualLogin(ctx context.Context, claims auth.Claims, req user_auth.VirtualLoginRequest,
|
||||
expires time.Duration, now time.Time, scopes ...string) (user_auth.Token, error)
|
||||
VirtualLogout(ctx context.Context, claims auth.Claims, expires time.Duration, now time.Time, scopes ...string) (user_auth.Token, error)
|
||||
}
|
||||
|
||||
type UserRepository interface {
|
||||
Find(ctx context.Context, claims auth.Claims, req user.UserFindRequest) (user.Users, error)
|
||||
//FindByAccount(ctx context.Context, claims auth.Claims, req user.UserFindByAccountRequest) (user.Users, error)
|
||||
Read(ctx context.Context, claims auth.Claims, req user.UserReadRequest) (*user.User, error)
|
||||
ReadByID(ctx context.Context, claims auth.Claims, id string) (*user.User, error)
|
||||
Create(ctx context.Context, claims auth.Claims, req user.UserCreateRequest, now time.Time) (*user.User, error)
|
||||
Update(ctx context.Context, claims auth.Claims, req user.UserUpdateRequest, now time.Time) error
|
||||
UpdatePassword(ctx context.Context, claims auth.Claims, req user.UserUpdatePasswordRequest, now time.Time) error
|
||||
Archive(ctx context.Context, claims auth.Claims, req user.UserArchiveRequest, now time.Time) error
|
||||
Restore(ctx context.Context, claims auth.Claims, req user.UserRestoreRequest, now time.Time) error
|
||||
Delete(ctx context.Context, claims auth.Claims, req user.UserDeleteRequest) error
|
||||
ResetPassword(ctx context.Context, req user.UserResetPasswordRequest, now time.Time) (string, error)
|
||||
ResetConfirm(ctx context.Context, req user.UserResetConfirmRequest, now time.Time) (*user.User, error)
|
||||
}
|
||||
|
||||
// Find godoc
|
||||
// TODO: Need to implement unittests on users/find endpoint. There are none.
|
||||
// @Summary List users
|
||||
|
@ -5,13 +5,11 @@ import (
|
||||
"net/http"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"geeks-accelerator/oss/saas-starter-kit/internal/platform/auth"
|
||||
"geeks-accelerator/oss/saas-starter-kit/internal/platform/web"
|
||||
"geeks-accelerator/oss/saas-starter-kit/internal/platform/web/webcontext"
|
||||
"geeks-accelerator/oss/saas-starter-kit/internal/platform/web/weberror"
|
||||
|
||||
"geeks-accelerator/oss/saas-starter-kit/internal/user_account"
|
||||
"geeks-accelerator/oss/saas-starter-kit/internal/user_account/invite"
|
||||
|
||||
@ -21,28 +19,12 @@ import (
|
||||
|
||||
// UserAccount represents the UserAccount API method handler set.
|
||||
type UserAccount struct {
|
||||
UserInvite UserInviteRepository
|
||||
Repository UserAccountRepository
|
||||
UserInvite *invite.Repository
|
||||
Repository *user_account.Repository
|
||||
|
||||
// ADD OTHER STATE LIKE THE LOGGER AND CONFIG HERE.
|
||||
}
|
||||
|
||||
type UserAccountRepository interface {
|
||||
Find(ctx context.Context, claims auth.Claims, req user_account.UserAccountFindRequest) (user_account.UserAccounts, error)
|
||||
FindByUserID(ctx context.Context, claims auth.Claims, userID string, includedArchived bool) (user_account.UserAccounts, error)
|
||||
UserFindByAccount(ctx context.Context, claims auth.Claims, req user_account.UserFindByAccountRequest) (user_account.Users, error)
|
||||
Create(ctx context.Context, claims auth.Claims, req user_account.UserAccountCreateRequest, now time.Time) (*user_account.UserAccount, error)
|
||||
Read(ctx context.Context, claims auth.Claims, req user_account.UserAccountReadRequest) (*user_account.UserAccount, error)
|
||||
Update(ctx context.Context, claims auth.Claims, req user_account.UserAccountUpdateRequest, now time.Time) error
|
||||
Archive(ctx context.Context, claims auth.Claims, req user_account.UserAccountArchiveRequest, now time.Time) error
|
||||
Delete(ctx context.Context, claims auth.Claims, req user_account.UserAccountDeleteRequest) error
|
||||
}
|
||||
|
||||
type UserInviteRepository interface {
|
||||
SendUserInvites(ctx context.Context, claims auth.Claims, req invite.SendUserInvitesRequest, now time.Time) ([]string, error)
|
||||
AcceptInvite(ctx context.Context, req invite.AcceptInviteRequest, now time.Time) (*user_account.UserAccount, error)
|
||||
AcceptInviteUser(ctx context.Context, req invite.AcceptInviteUserRequest, now time.Time) (*user_account.UserAccount, error)
|
||||
}
|
||||
|
||||
// Find godoc
|
||||
// TODO: Need to implement unittests on user_accounts/find endpoint. There are none.
|
||||
// @Summary List user accounts
|
||||
|
@ -2,7 +2,9 @@ package handlers
|
||||
|
||||
import (
|
||||
"context"
|
||||
"geeks-accelerator/oss/saas-starter-kit/cmd/web-api/handlers"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"geeks-accelerator/oss/saas-starter-kit/internal/account"
|
||||
"geeks-accelerator/oss/saas-starter-kit/internal/account/account_preference"
|
||||
"geeks-accelerator/oss/saas-starter-kit/internal/geonames"
|
||||
@ -10,9 +12,7 @@ import (
|
||||
"geeks-accelerator/oss/saas-starter-kit/internal/platform/web"
|
||||
"geeks-accelerator/oss/saas-starter-kit/internal/platform/web/webcontext"
|
||||
"geeks-accelerator/oss/saas-starter-kit/internal/platform/web/weberror"
|
||||
|
||||
"net/http"
|
||||
"time"
|
||||
"geeks-accelerator/oss/saas-starter-kit/internal/user_auth"
|
||||
|
||||
"github.com/gorilla/schema"
|
||||
"github.com/pkg/errors"
|
||||
@ -20,10 +20,10 @@ import (
|
||||
|
||||
// Account represents the Account API method handler set.
|
||||
type Account struct {
|
||||
AccountRepo handlers.AccountRepository
|
||||
AccountPrefRepo handlers.AccountPrefRepository
|
||||
AuthRepo handlers.UserAuthRepository
|
||||
GeoRepo GeoRepository
|
||||
AccountRepo *account.Repository
|
||||
AccountPrefRepo *account_preference.Repository
|
||||
AuthRepo *user_auth.Repository
|
||||
GeoRepo *geonames.Repository
|
||||
Authenticator *auth.Authenticator
|
||||
Renderer web.Renderer
|
||||
}
|
||||
|
@ -16,16 +16,7 @@ import (
|
||||
// Check provides support for orchestration geo endpoints.
|
||||
type Geo struct {
|
||||
Redis *redis.Client
|
||||
GeoRepo GeoRepository
|
||||
}
|
||||
|
||||
type GeoRepository interface {
|
||||
FindGeonames(ctx context.Context, orderBy, where string, args ...interface{}) ([]*geonames.Geoname, error)
|
||||
FindGeonamePostalCodes(ctx context.Context, where string, args ...interface{}) ([]string, error)
|
||||
FindGeonameRegions(ctx context.Context, orderBy, where string, args ...interface{}) ([]*geonames.Region, error)
|
||||
FindCountries(ctx context.Context, orderBy, where string, args ...interface{}) ([]*geonames.Country, error)
|
||||
FindCountryTimezones(ctx context.Context, orderBy, where string, args ...interface{}) ([]*geonames.CountryTimezone, error)
|
||||
ListTimezones(ctx context.Context) ([]string, error)
|
||||
GeoRepo *geonames.Repository
|
||||
}
|
||||
|
||||
// GeonameByPostalCode...
|
||||
|
@ -6,6 +6,7 @@ import (
|
||||
"os"
|
||||
|
||||
"geeks-accelerator/oss/saas-starter-kit/internal/platform/web"
|
||||
|
||||
"github.com/jmoiron/sqlx"
|
||||
"github.com/pkg/errors"
|
||||
"gopkg.in/DataDog/dd-trace-go.v1/contrib/go-redis/redis"
|
||||
|
@ -8,6 +8,7 @@ import (
|
||||
"geeks-accelerator/oss/saas-starter-kit/internal/platform/web"
|
||||
"geeks-accelerator/oss/saas-starter-kit/internal/platform/web/webcontext"
|
||||
"geeks-accelerator/oss/saas-starter-kit/internal/platform/web/weberror"
|
||||
|
||||
"github.com/gorilla/schema"
|
||||
"github.com/pkg/errors"
|
||||
"golang.org/x/net/html"
|
||||
|
@ -3,7 +3,6 @@ package handlers
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"geeks-accelerator/oss/saas-starter-kit/cmd/web-api/handlers"
|
||||
"net/http"
|
||||
"strings"
|
||||
|
||||
@ -21,7 +20,7 @@ import (
|
||||
|
||||
// Projects represents the Projects API method handler set.
|
||||
type Projects struct {
|
||||
ProjectRepo handlers.ProjectRepository
|
||||
ProjectRepo *project.Repository
|
||||
Redis *redis.Client
|
||||
Renderer web.Renderer
|
||||
}
|
||||
|
@ -9,6 +9,7 @@ import (
|
||||
"geeks-accelerator/oss/saas-starter-kit/internal/platform/web"
|
||||
"geeks-accelerator/oss/saas-starter-kit/internal/platform/web/webcontext"
|
||||
"geeks-accelerator/oss/saas-starter-kit/internal/project_route"
|
||||
|
||||
"github.com/ikeikeikeike/go-sitemap-generator/v2/stm"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/sethgrid/pester"
|
||||
|
@ -9,22 +9,21 @@ import (
|
||||
"path/filepath"
|
||||
"time"
|
||||
|
||||
"geeks-accelerator/oss/saas-starter-kit/cmd/web-api/handlers"
|
||||
//"geeks-accelerator/oss/saas-starter-kit/internal/account"
|
||||
//"geeks-accelerator/oss/saas-starter-kit/internal/account/account_preference"
|
||||
"geeks-accelerator/oss/saas-starter-kit/internal/account"
|
||||
"geeks-accelerator/oss/saas-starter-kit/internal/account/account_preference"
|
||||
"geeks-accelerator/oss/saas-starter-kit/internal/geonames"
|
||||
"geeks-accelerator/oss/saas-starter-kit/internal/project"
|
||||
"geeks-accelerator/oss/saas-starter-kit/internal/signup"
|
||||
"geeks-accelerator/oss/saas-starter-kit/internal/user"
|
||||
"geeks-accelerator/oss/saas-starter-kit/internal/user_account"
|
||||
"geeks-accelerator/oss/saas-starter-kit/internal/user_account/invite"
|
||||
"geeks-accelerator/oss/saas-starter-kit/internal/user_auth"
|
||||
"geeks-accelerator/oss/saas-starter-kit/internal/mid"
|
||||
"geeks-accelerator/oss/saas-starter-kit/internal/platform/auth"
|
||||
"geeks-accelerator/oss/saas-starter-kit/internal/platform/web"
|
||||
"geeks-accelerator/oss/saas-starter-kit/internal/platform/web/webcontext"
|
||||
"geeks-accelerator/oss/saas-starter-kit/internal/platform/web/weberror"
|
||||
|
||||
//"geeks-accelerator/oss/saas-starter-kit/internal/project"
|
||||
"geeks-accelerator/oss/saas-starter-kit/internal/project_route"
|
||||
// "geeks-accelerator/oss/saas-starter-kit/internal/signup"
|
||||
// "geeks-accelerator/oss/saas-starter-kit/internal/user"
|
||||
// "geeks-accelerator/oss/saas-starter-kit/internal/user_account"
|
||||
// "geeks-accelerator/oss/saas-starter-kit/internal/user_account/invite"
|
||||
// "geeks-accelerator/oss/saas-starter-kit/internal/user_auth"
|
||||
|
||||
"github.com/ikeikeikeike/go-sitemap-generator/v2/stm"
|
||||
"github.com/jmoiron/sqlx"
|
||||
@ -42,15 +41,15 @@ type AppContext struct {
|
||||
Env webcontext.Env
|
||||
MasterDB *sqlx.DB
|
||||
Redis *redis.Client
|
||||
UserRepo handlers.UserRepository
|
||||
UserAccountRepo handlers.UserAccountRepository
|
||||
AccountRepo handlers.AccountRepository
|
||||
AccountPrefRepo handlers.AccountPrefRepository
|
||||
AuthRepo handlers.UserAuthRepository
|
||||
SignupRepo handlers.SignupRepository
|
||||
InviteRepo handlers.UserInviteRepository
|
||||
ProjectRepo handlers.ProjectRepository
|
||||
GeoRepo GeoRepository
|
||||
UserRepo *user.Repository
|
||||
UserAccountRepo *user_account.Repository
|
||||
AccountRepo *account.Repository
|
||||
AccountPrefRepo *account_preference.Repository
|
||||
AuthRepo *user_auth.Repository
|
||||
SignupRepo *signup.Repository
|
||||
InviteRepo *invite.Repository
|
||||
ProjectRepo *project.Repository
|
||||
GeoRepo *geonames.Repository
|
||||
Authenticator *auth.Authenticator
|
||||
StaticDir string
|
||||
TemplateDir string
|
||||
|
@ -2,7 +2,6 @@ package handlers
|
||||
|
||||
import (
|
||||
"context"
|
||||
"geeks-accelerator/oss/saas-starter-kit/cmd/web-api/handlers"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
@ -22,9 +21,9 @@ import (
|
||||
|
||||
// Signup represents the Signup API method handler set.
|
||||
type Signup struct {
|
||||
SignupRepo handlers.SignupRepository
|
||||
AuthRepo handlers.UserAuthRepository
|
||||
GeoRepo GeoRepository
|
||||
SignupRepo *signup.Repository
|
||||
AuthRepo *user_auth.Repository
|
||||
GeoRepo *geonames.Repository
|
||||
MasterDB *sqlx.DB
|
||||
Renderer web.Renderer
|
||||
}
|
||||
|
@ -8,9 +8,8 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"geeks-accelerator/oss/saas-starter-kit/cmd/web-api/handlers"
|
||||
"geeks-accelerator/oss/saas-starter-kit/internal/account"
|
||||
|
||||
"geeks-accelerator/oss/saas-starter-kit/internal/geonames"
|
||||
"geeks-accelerator/oss/saas-starter-kit/internal/platform/auth"
|
||||
"geeks-accelerator/oss/saas-starter-kit/internal/platform/web"
|
||||
"geeks-accelerator/oss/saas-starter-kit/internal/platform/web/webcontext"
|
||||
@ -27,11 +26,11 @@ import (
|
||||
|
||||
// User represents the User API method handler set.
|
||||
type UserRepos struct {
|
||||
UserRepo handlers.UserRepository
|
||||
AuthRepo handlers.UserAuthRepository
|
||||
UserAccountRepo handlers.UserAccountRepository
|
||||
AccountRepo handlers.AccountRepository
|
||||
GeoRepo GeoRepository
|
||||
UserRepo *user.Repository
|
||||
AuthRepo *user_auth.Repository
|
||||
UserAccountRepo *user_account.Repository
|
||||
AccountRepo *account.Repository
|
||||
GeoRepo *geonames.Repository
|
||||
MasterDB *sqlx.DB
|
||||
Renderer web.Renderer
|
||||
SecretKey string
|
||||
|
@ -3,11 +3,12 @@ package handlers
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"geeks-accelerator/oss/saas-starter-kit/cmd/web-api/handlers"
|
||||
"net/http"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"geeks-accelerator/oss/saas-starter-kit/internal/geonames"
|
||||
"geeks-accelerator/oss/saas-starter-kit/internal/account"
|
||||
"geeks-accelerator/oss/saas-starter-kit/internal/platform/auth"
|
||||
"geeks-accelerator/oss/saas-starter-kit/internal/platform/datatable"
|
||||
"geeks-accelerator/oss/saas-starter-kit/internal/platform/web"
|
||||
@ -27,12 +28,12 @@ import (
|
||||
|
||||
// Users represents the Users API method handler set.
|
||||
type Users struct {
|
||||
UserRepo handlers.UserRepository
|
||||
AccountRepo handlers.AccountRepository
|
||||
UserAccountRepo handlers.UserAccountRepository
|
||||
AuthRepo handlers.UserAuthRepository
|
||||
InviteRepo handlers.UserInviteRepository
|
||||
GeoRepo GeoRepository
|
||||
UserRepo *user.Repository
|
||||
AccountRepo *account.Repository
|
||||
UserAccountRepo *user_account.Repository
|
||||
AuthRepo *user_auth.Repository
|
||||
InviteRepo *invite.Repository
|
||||
GeoRepo *geonames.Repository
|
||||
MasterDB *sqlx.DB
|
||||
Redis *redis.Client
|
||||
Renderer web.Renderer
|
||||
|
@ -6,13 +6,6 @@ import (
|
||||
"encoding/json"
|
||||
"expvar"
|
||||
"fmt"
|
||||
"geeks-accelerator/oss/saas-starter-kit/internal/account/account_preference"
|
||||
"geeks-accelerator/oss/saas-starter-kit/internal/geonames"
|
||||
"geeks-accelerator/oss/saas-starter-kit/internal/project"
|
||||
"geeks-accelerator/oss/saas-starter-kit/internal/signup"
|
||||
"geeks-accelerator/oss/saas-starter-kit/internal/user_account"
|
||||
"geeks-accelerator/oss/saas-starter-kit/internal/user_account/invite"
|
||||
"geeks-accelerator/oss/saas-starter-kit/internal/user_auth"
|
||||
"html/template"
|
||||
"log"
|
||||
"net"
|
||||
@ -27,6 +20,13 @@ import (
|
||||
"syscall"
|
||||
"time"
|
||||
|
||||
"geeks-accelerator/oss/saas-starter-kit/internal/account/account_preference"
|
||||
"geeks-accelerator/oss/saas-starter-kit/internal/geonames"
|
||||
"geeks-accelerator/oss/saas-starter-kit/internal/project"
|
||||
"geeks-accelerator/oss/saas-starter-kit/internal/signup"
|
||||
"geeks-accelerator/oss/saas-starter-kit/internal/user_account"
|
||||
"geeks-accelerator/oss/saas-starter-kit/internal/user_account/invite"
|
||||
"geeks-accelerator/oss/saas-starter-kit/internal/user_auth"
|
||||
"geeks-accelerator/oss/saas-starter-kit/cmd/web-app/handlers"
|
||||
"geeks-accelerator/oss/saas-starter-kit/internal/account"
|
||||
"geeks-accelerator/oss/saas-starter-kit/internal/mid"
|
||||
|
Reference in New Issue
Block a user