refactor: move client page view file to client folder and reorganize file structure

This commit is contained in:
2024-08-18 12:59:19 +07:00
parent 97a9e72d7b
commit 7df02c270b
27 changed files with 29 additions and 30 deletions

View File

@ -9,8 +9,8 @@ import (
"github.com/fossyy/filekeeper/types"
"github.com/fossyy/filekeeper/types/models"
"github.com/fossyy/filekeeper/utils"
authView "github.com/fossyy/filekeeper/view/auth"
signupView "github.com/fossyy/filekeeper/view/signup"
"github.com/fossyy/filekeeper/view/client/auth"
signupView "github.com/fossyy/filekeeper/view/client/signup"
"github.com/google/uuid"
"net/http"
"sync"

View File

@ -5,7 +5,7 @@ import (
"github.com/fossyy/filekeeper/session"
"github.com/fossyy/filekeeper/types"
"github.com/fossyy/filekeeper/utils"
totpView "github.com/fossyy/filekeeper/view/totp"
"github.com/fossyy/filekeeper/view/client/totp"
"github.com/xlzd/gotp"
"net/http"
"strings"

View File

@ -1,13 +1,13 @@
package downloadHandler
import (
"github.com/fossyy/filekeeper/view/client/download"
"net/http"
"github.com/fossyy/filekeeper/db"
"github.com/fossyy/filekeeper/logger"
"github.com/fossyy/filekeeper/types"
"github.com/fossyy/filekeeper/utils"
downloadView "github.com/fossyy/filekeeper/view/download"
)
var log *logger.AggregatedLogger

View File

@ -2,10 +2,10 @@ package errorHandler
import (
"fmt"
"github.com/fossyy/filekeeper/view/client/error"
"net/http"
"github.com/fossyy/filekeeper/logger"
errorView "github.com/fossyy/filekeeper/view/error"
)
var log *logger.AggregatedLogger

View File

@ -6,6 +6,8 @@ import (
"errors"
"fmt"
"github.com/fossyy/filekeeper/cache"
"github.com/fossyy/filekeeper/view/client/email"
"github.com/fossyy/filekeeper/view/client/forgotPassword"
"github.com/google/uuid"
"net/http"
"strconv"
@ -17,8 +19,6 @@ import (
"github.com/fossyy/filekeeper/types"
"github.com/fossyy/filekeeper/types/models"
"github.com/fossyy/filekeeper/utils"
emailView "github.com/fossyy/filekeeper/view/email"
forgotPasswordView "github.com/fossyy/filekeeper/view/forgotPassword"
"gorm.io/gorm"
)

View File

@ -8,9 +8,8 @@ import (
"github.com/fossyy/filekeeper/session"
"github.com/fossyy/filekeeper/types"
"github.com/fossyy/filekeeper/utils"
forgotPasswordView "github.com/fossyy/filekeeper/view/forgotPassword"
signupView "github.com/fossyy/filekeeper/view/signup"
"github.com/fossyy/filekeeper/view/client/forgotPassword"
signupView "github.com/fossyy/filekeeper/view/client/signup"
"net/http"
)

View File

@ -2,10 +2,10 @@ package indexHandler
import (
"github.com/fossyy/filekeeper/session"
"github.com/fossyy/filekeeper/view/client/index"
"net/http"
"github.com/fossyy/filekeeper/logger"
indexView "github.com/fossyy/filekeeper/view/index"
)
var log *logger.AggregatedLogger

View File

@ -8,7 +8,7 @@ import (
"github.com/fossyy/filekeeper/session"
"github.com/fossyy/filekeeper/types"
"github.com/fossyy/filekeeper/utils"
signinView "github.com/fossyy/filekeeper/view/signin"
"github.com/fossyy/filekeeper/view/client/signin"
"net/http"
"strings"
)

View File

@ -4,6 +4,8 @@ import (
"bytes"
"context"
"fmt"
"github.com/fossyy/filekeeper/view/client/email"
signupView "github.com/fossyy/filekeeper/view/client/signup"
"net/http"
"strconv"
"sync"
@ -15,8 +17,6 @@ import (
"github.com/fossyy/filekeeper/types"
"github.com/fossyy/filekeeper/types/models"
"github.com/fossyy/filekeeper/utils"
emailView "github.com/fossyy/filekeeper/view/email"
signupView "github.com/fossyy/filekeeper/view/signup"
"github.com/google/uuid"
)

View File

@ -1,13 +1,13 @@
package signupVerifyHandler
import (
signupView "github.com/fossyy/filekeeper/view/client/signup"
"net/http"
"github.com/fossyy/filekeeper/db"
signupHandler "github.com/fossyy/filekeeper/handler/signup"
"github.com/fossyy/filekeeper/logger"
"github.com/fossyy/filekeeper/types"
signupView "github.com/fossyy/filekeeper/view/signup"
)
var log *logger.AggregatedLogger

View File

@ -4,7 +4,7 @@ import (
"github.com/fossyy/filekeeper/cache"
"github.com/fossyy/filekeeper/logger"
"github.com/fossyy/filekeeper/types"
filesView "github.com/fossyy/filekeeper/view/upload"
filesView "github.com/fossyy/filekeeper/view/client/upload"
"io"
"net/http"
"os"

View File

@ -2,7 +2,7 @@ package userSessionTerminateHandler
import (
"github.com/fossyy/filekeeper/session"
userView "github.com/fossyy/filekeeper/view/user"
"github.com/fossyy/filekeeper/view/client/user"
"net/http"
)

View File

@ -5,7 +5,7 @@ import (
"encoding/base64"
"fmt"
"github.com/fossyy/filekeeper/cache"
userTotpSetupView "github.com/fossyy/filekeeper/view/user/totp"
"github.com/fossyy/filekeeper/view/client/user/totp"
"image/png"
"net/http"
"time"

View File

@ -3,11 +3,11 @@ package userHandler
import (
"github.com/a-h/templ"
"github.com/fossyy/filekeeper/types"
"github.com/fossyy/filekeeper/view/client/user"
"net/http"
"github.com/fossyy/filekeeper/logger"
"github.com/fossyy/filekeeper/session"
userView "github.com/fossyy/filekeeper/view/user"
)
var log *logger.AggregatedLogger