Refactor codebase and removed leftover development code
This commit is contained in:
22
.env
22
.env
@ -1,22 +0,0 @@
|
|||||||
SERVER_HOST=0.0.0.0
|
|
||||||
SERVER_PORT=8000
|
|
||||||
|
|
||||||
DOMAIN=filekeeper.fossy.my.id
|
|
||||||
|
|
||||||
CORS_PROTO=https
|
|
||||||
CORS_LIST=filekeeper.fossy.my.id:443,fossy.my.id:443
|
|
||||||
CORS_METHODS=POST,GET
|
|
||||||
|
|
||||||
DB_HOST=
|
|
||||||
DB_PORT=
|
|
||||||
DB_USERNAME=
|
|
||||||
DB_PASSWORD=
|
|
||||||
DB_NAME=filekeeper
|
|
||||||
|
|
||||||
SMTP_HOST=
|
|
||||||
SMTP_PORT=
|
|
||||||
SMTP_USER=
|
|
||||||
SMTP_PASSWORD=
|
|
||||||
|
|
||||||
SESSION_NAME=Session
|
|
||||||
SESSION_MAX_AGE=604800
|
|
8
.idea/.gitignore
generated
vendored
8
.idea/.gitignore
generated
vendored
@ -1,8 +0,0 @@
|
|||||||
# Default ignored files
|
|
||||||
/shelf/
|
|
||||||
/workspace.xml
|
|
||||||
# Editor-based HTTP Client requests
|
|
||||||
/httpRequests/
|
|
||||||
# Datasource local storage ignored files
|
|
||||||
/dataSources/
|
|
||||||
/dataSources.local.xml
|
|
9
.idea/filekeeper.iml
generated
9
.idea/filekeeper.iml
generated
@ -1,9 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<module type="WEB_MODULE" version="4">
|
|
||||||
<component name="Go" enabled="true" />
|
|
||||||
<component name="NewModuleRootManager">
|
|
||||||
<content url="file://$MODULE_DIR$" />
|
|
||||||
<orderEntry type="inheritedJdk" />
|
|
||||||
<orderEntry type="sourceFolder" forTests="false" />
|
|
||||||
</component>
|
|
||||||
</module>
|
|
10
.idea/inspectionProfiles/Project_Default.xml
generated
10
.idea/inspectionProfiles/Project_Default.xml
generated
@ -1,10 +0,0 @@
|
|||||||
<component name="InspectionProjectProfileManager">
|
|
||||||
<profile version="1.0">
|
|
||||||
<option name="myName" value="Project Default" />
|
|
||||||
<inspection_tool class="GoDfaErrorMayBeNotNil" enabled="true" level="WARNING" enabled_by_default="true">
|
|
||||||
<methods>
|
|
||||||
<method importPath="github.com/fossyy/filekeeper/session" receiver="*StoreSession" name="Get" />
|
|
||||||
</methods>
|
|
||||||
</inspection_tool>
|
|
||||||
</profile>
|
|
||||||
</component>
|
|
8
.idea/modules.xml
generated
8
.idea/modules.xml
generated
@ -1,8 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="ProjectModuleManager">
|
|
||||||
<modules>
|
|
||||||
<module fileurl="file://$PROJECT_DIR$/.idea/filekeeper.iml" filepath="$PROJECT_DIR$/.idea/filekeeper.iml" />
|
|
||||||
</modules>
|
|
||||||
</component>
|
|
||||||
</project>
|
|
6
.idea/vcs.xml
generated
6
.idea/vcs.xml
generated
@ -1,6 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="VcsDirectoryMappings">
|
|
||||||
<mapping directory="" vcs="Git" />
|
|
||||||
</component>
|
|
||||||
</project>
|
|
@ -2,14 +2,14 @@ package db
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"os"
|
||||||
|
"strings"
|
||||||
|
|
||||||
"github.com/fossyy/filekeeper/logger"
|
"github.com/fossyy/filekeeper/logger"
|
||||||
"github.com/fossyy/filekeeper/utils"
|
"github.com/fossyy/filekeeper/utils"
|
||||||
"gorm.io/driver/mysql"
|
"gorm.io/driver/mysql"
|
||||||
_ "gorm.io/driver/mysql"
|
|
||||||
"gorm.io/gorm"
|
"gorm.io/gorm"
|
||||||
gormLogger "gorm.io/gorm/logger"
|
gormLogger "gorm.io/gorm/logger"
|
||||||
"os"
|
|
||||||
"strings"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
var DB *gorm.DB
|
var DB *gorm.DB
|
||||||
@ -23,11 +23,11 @@ func init() {
|
|||||||
Logger: gormLogger.Default.LogMode(gormLogger.Silent),
|
Logger: gormLogger.Default.LogMode(gormLogger.Silent),
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic("failed to connect database")
|
panic("failed to connect database" + err.Error())
|
||||||
}
|
}
|
||||||
file, err := os.ReadFile("schema.sql")
|
file, err := os.ReadFile("schema.sql")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error("Error opening file: %v", err)
|
log.Error("Error opening file: %s", err.Error())
|
||||||
}
|
}
|
||||||
querys := strings.Split(string(file), "\n")
|
querys := strings.Split(string(file), "\n")
|
||||||
for _, query := range querys {
|
for _, query := range querys {
|
||||||
|
@ -2,11 +2,12 @@ package user
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"sync"
|
||||||
|
"time"
|
||||||
|
|
||||||
"github.com/fossyy/filekeeper/db"
|
"github.com/fossyy/filekeeper/db"
|
||||||
"github.com/fossyy/filekeeper/logger"
|
"github.com/fossyy/filekeeper/logger"
|
||||||
"github.com/google/uuid"
|
"github.com/google/uuid"
|
||||||
"sync"
|
|
||||||
"time"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type Cache struct {
|
type Cache struct {
|
||||||
|
@ -2,6 +2,8 @@ package downloadHandler
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
|
"net/http"
|
||||||
|
|
||||||
"github.com/fossyy/filekeeper/db"
|
"github.com/fossyy/filekeeper/db"
|
||||||
"github.com/fossyy/filekeeper/logger"
|
"github.com/fossyy/filekeeper/logger"
|
||||||
"github.com/fossyy/filekeeper/middleware"
|
"github.com/fossyy/filekeeper/middleware"
|
||||||
@ -10,7 +12,6 @@ import (
|
|||||||
"github.com/fossyy/filekeeper/types/models"
|
"github.com/fossyy/filekeeper/types/models"
|
||||||
"github.com/fossyy/filekeeper/utils"
|
"github.com/fossyy/filekeeper/utils"
|
||||||
downloadView "github.com/fossyy/filekeeper/view/download"
|
downloadView "github.com/fossyy/filekeeper/view/download"
|
||||||
"net/http"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
var log *logger.AggregatedLogger
|
var log *logger.AggregatedLogger
|
||||||
|
@ -1,12 +1,13 @@
|
|||||||
package downloadFileHandler
|
package downloadFileHandler
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/fossyy/filekeeper/db"
|
|
||||||
"github.com/fossyy/filekeeper/logger"
|
|
||||||
"github.com/fossyy/filekeeper/types/models"
|
|
||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
|
||||||
|
"github.com/fossyy/filekeeper/db"
|
||||||
|
"github.com/fossyy/filekeeper/logger"
|
||||||
|
"github.com/fossyy/filekeeper/types/models"
|
||||||
)
|
)
|
||||||
|
|
||||||
var log *logger.AggregatedLogger
|
var log *logger.AggregatedLogger
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
package errorHandler
|
package errorHandler
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"net/http"
|
||||||
|
|
||||||
"github.com/fossyy/filekeeper/logger"
|
"github.com/fossyy/filekeeper/logger"
|
||||||
errorView "github.com/fossyy/filekeeper/view/error"
|
errorView "github.com/fossyy/filekeeper/view/error"
|
||||||
"net/http"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
var log *logger.AggregatedLogger
|
var log *logger.AggregatedLogger
|
||||||
|
@ -5,6 +5,11 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"net/http"
|
||||||
|
"strconv"
|
||||||
|
"sync"
|
||||||
|
"time"
|
||||||
|
|
||||||
"github.com/fossyy/filekeeper/db"
|
"github.com/fossyy/filekeeper/db"
|
||||||
"github.com/fossyy/filekeeper/email"
|
"github.com/fossyy/filekeeper/email"
|
||||||
"github.com/fossyy/filekeeper/logger"
|
"github.com/fossyy/filekeeper/logger"
|
||||||
@ -14,10 +19,6 @@ import (
|
|||||||
emailView "github.com/fossyy/filekeeper/view/email"
|
emailView "github.com/fossyy/filekeeper/view/email"
|
||||||
forgotPasswordView "github.com/fossyy/filekeeper/view/forgotPassword"
|
forgotPasswordView "github.com/fossyy/filekeeper/view/forgotPassword"
|
||||||
"gorm.io/gorm"
|
"gorm.io/gorm"
|
||||||
"net/http"
|
|
||||||
"strconv"
|
|
||||||
"sync"
|
|
||||||
"time"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type ForgotPassword struct {
|
type ForgotPassword struct {
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
package indexHandler
|
package indexHandler
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/fossyy/filekeeper/logger"
|
|
||||||
"github.com/fossyy/filekeeper/view/index"
|
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
|
"github.com/fossyy/filekeeper/logger"
|
||||||
|
indexView "github.com/fossyy/filekeeper/view/index"
|
||||||
)
|
)
|
||||||
|
|
||||||
var log *logger.AggregatedLogger
|
var log *logger.AggregatedLogger
|
||||||
|
@ -2,11 +2,12 @@ package logoutHandler
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
|
"net/http"
|
||||||
|
|
||||||
"github.com/fossyy/filekeeper/logger"
|
"github.com/fossyy/filekeeper/logger"
|
||||||
"github.com/fossyy/filekeeper/session"
|
"github.com/fossyy/filekeeper/session"
|
||||||
"github.com/fossyy/filekeeper/types"
|
"github.com/fossyy/filekeeper/types"
|
||||||
"github.com/fossyy/filekeeper/utils"
|
"github.com/fossyy/filekeeper/utils"
|
||||||
"net/http"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
var log *logger.AggregatedLogger
|
var log *logger.AggregatedLogger
|
||||||
|
@ -9,17 +9,5 @@ func Robot(w http.ResponseWriter, r *http.Request) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func Favicon(w http.ResponseWriter, r *http.Request) {
|
func Favicon(w http.ResponseWriter, r *http.Request) {
|
||||||
//currentDir, _ := os.Getwd()
|
|
||||||
//fmt.Println(currentDir)
|
|
||||||
//logo := "../../../favicon.ico"
|
|
||||||
//basePath := filepath.Join(currentDir, "public")
|
|
||||||
//logoPath := filepath.Join(basePath, logo)
|
|
||||||
//fmt.Println(filepath.Dir(logoPath))
|
|
||||||
//if filepath.Dir(logoPath) != basePath {
|
|
||||||
// log.Print("invalid logo path", logoPath)
|
|
||||||
// w.WriteHeader(500)
|
|
||||||
// return
|
|
||||||
//}
|
|
||||||
//http.ServeContent()
|
|
||||||
http.Redirect(w, r, "/public/favicon.ico", http.StatusSeeOther)
|
http.Redirect(w, r, "/public/favicon.ico", http.StatusSeeOther)
|
||||||
}
|
}
|
||||||
|
@ -2,14 +2,15 @@ package signinHandler
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
|
"net/http"
|
||||||
|
"strings"
|
||||||
|
|
||||||
"github.com/fossyy/filekeeper/db/model/user"
|
"github.com/fossyy/filekeeper/db/model/user"
|
||||||
"github.com/fossyy/filekeeper/logger"
|
"github.com/fossyy/filekeeper/logger"
|
||||||
"github.com/fossyy/filekeeper/session"
|
"github.com/fossyy/filekeeper/session"
|
||||||
"github.com/fossyy/filekeeper/types"
|
"github.com/fossyy/filekeeper/types"
|
||||||
"github.com/fossyy/filekeeper/utils"
|
"github.com/fossyy/filekeeper/utils"
|
||||||
signinView "github.com/fossyy/filekeeper/view/signin"
|
signinView "github.com/fossyy/filekeeper/view/signin"
|
||||||
"net/http"
|
|
||||||
"strings"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
var log *logger.AggregatedLogger
|
var log *logger.AggregatedLogger
|
||||||
|
@ -5,6 +5,11 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"net/http"
|
||||||
|
"strconv"
|
||||||
|
"sync"
|
||||||
|
"time"
|
||||||
|
|
||||||
"github.com/fossyy/filekeeper/db"
|
"github.com/fossyy/filekeeper/db"
|
||||||
"github.com/fossyy/filekeeper/email"
|
"github.com/fossyy/filekeeper/email"
|
||||||
"github.com/fossyy/filekeeper/logger"
|
"github.com/fossyy/filekeeper/logger"
|
||||||
@ -15,10 +20,6 @@ import (
|
|||||||
signupView "github.com/fossyy/filekeeper/view/signup"
|
signupView "github.com/fossyy/filekeeper/view/signup"
|
||||||
"github.com/google/uuid"
|
"github.com/google/uuid"
|
||||||
"gorm.io/gorm"
|
"gorm.io/gorm"
|
||||||
"net/http"
|
|
||||||
"strconv"
|
|
||||||
"sync"
|
|
||||||
"time"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type UnverifiedUser struct {
|
type UnverifiedUser struct {
|
||||||
|
@ -1,12 +1,13 @@
|
|||||||
package signupVerifyHandler
|
package signupVerifyHandler
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"net/http"
|
||||||
|
|
||||||
"github.com/fossyy/filekeeper/db"
|
"github.com/fossyy/filekeeper/db"
|
||||||
signupHandler "github.com/fossyy/filekeeper/handler/signup"
|
signupHandler "github.com/fossyy/filekeeper/handler/signup"
|
||||||
"github.com/fossyy/filekeeper/logger"
|
"github.com/fossyy/filekeeper/logger"
|
||||||
"github.com/fossyy/filekeeper/types"
|
"github.com/fossyy/filekeeper/types"
|
||||||
signupView "github.com/fossyy/filekeeper/view/signup"
|
signupView "github.com/fossyy/filekeeper/view/signup"
|
||||||
"net/http"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
var log *logger.AggregatedLogger
|
var log *logger.AggregatedLogger
|
||||||
|
@ -3,6 +3,11 @@ package initialisation
|
|||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"errors"
|
"errors"
|
||||||
|
"io"
|
||||||
|
"net/http"
|
||||||
|
"os"
|
||||||
|
"path/filepath"
|
||||||
|
|
||||||
"github.com/fossyy/filekeeper/db"
|
"github.com/fossyy/filekeeper/db"
|
||||||
"github.com/fossyy/filekeeper/logger"
|
"github.com/fossyy/filekeeper/logger"
|
||||||
"github.com/fossyy/filekeeper/middleware"
|
"github.com/fossyy/filekeeper/middleware"
|
||||||
@ -11,10 +16,6 @@ import (
|
|||||||
"github.com/fossyy/filekeeper/types/models"
|
"github.com/fossyy/filekeeper/types/models"
|
||||||
"github.com/google/uuid"
|
"github.com/google/uuid"
|
||||||
"gorm.io/gorm"
|
"gorm.io/gorm"
|
||||||
"io"
|
|
||||||
"net/http"
|
|
||||||
"os"
|
|
||||||
"path/filepath"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
var log *logger.AggregatedLogger
|
var log *logger.AggregatedLogger
|
||||||
|
@ -2,18 +2,19 @@ package uploadHandler
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
"github.com/fossyy/filekeeper/db"
|
|
||||||
"github.com/fossyy/filekeeper/handler/upload/initialisation"
|
|
||||||
"github.com/fossyy/filekeeper/logger"
|
|
||||||
"github.com/fossyy/filekeeper/middleware"
|
|
||||||
"github.com/fossyy/filekeeper/session"
|
|
||||||
filesView "github.com/fossyy/filekeeper/view/upload"
|
|
||||||
"io"
|
"io"
|
||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"strconv"
|
"strconv"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
|
"github.com/fossyy/filekeeper/db"
|
||||||
|
"github.com/fossyy/filekeeper/handler/upload/initialisation"
|
||||||
|
"github.com/fossyy/filekeeper/logger"
|
||||||
|
"github.com/fossyy/filekeeper/middleware"
|
||||||
|
"github.com/fossyy/filekeeper/session"
|
||||||
|
filesView "github.com/fossyy/filekeeper/view/upload"
|
||||||
)
|
)
|
||||||
|
|
||||||
var log *logger.AggregatedLogger
|
var log *logger.AggregatedLogger
|
||||||
|
@ -2,11 +2,12 @@ package userHandler
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
|
"net/http"
|
||||||
|
|
||||||
"github.com/fossyy/filekeeper/logger"
|
"github.com/fossyy/filekeeper/logger"
|
||||||
"github.com/fossyy/filekeeper/middleware"
|
"github.com/fossyy/filekeeper/middleware"
|
||||||
"github.com/fossyy/filekeeper/session"
|
"github.com/fossyy/filekeeper/session"
|
||||||
userView "github.com/fossyy/filekeeper/view/user"
|
userView "github.com/fossyy/filekeeper/view/user"
|
||||||
"net/http"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
var log *logger.AggregatedLogger
|
var log *logger.AggregatedLogger
|
||||||
|
3
main.go
3
main.go
@ -2,10 +2,11 @@ package main
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"net/http"
|
||||||
|
|
||||||
"github.com/fossyy/filekeeper/middleware"
|
"github.com/fossyy/filekeeper/middleware"
|
||||||
"github.com/fossyy/filekeeper/routes"
|
"github.com/fossyy/filekeeper/routes"
|
||||||
"github.com/fossyy/filekeeper/utils"
|
"github.com/fossyy/filekeeper/utils"
|
||||||
"net/http"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
@ -3,13 +3,14 @@ package middleware
|
|||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"net/http"
|
||||||
|
"strings"
|
||||||
|
|
||||||
errorHandler "github.com/fossyy/filekeeper/handler/error"
|
errorHandler "github.com/fossyy/filekeeper/handler/error"
|
||||||
"github.com/fossyy/filekeeper/logger"
|
"github.com/fossyy/filekeeper/logger"
|
||||||
"github.com/fossyy/filekeeper/session"
|
"github.com/fossyy/filekeeper/session"
|
||||||
"github.com/fossyy/filekeeper/types"
|
"github.com/fossyy/filekeeper/types"
|
||||||
"github.com/fossyy/filekeeper/utils"
|
"github.com/fossyy/filekeeper/utils"
|
||||||
"net/http"
|
|
||||||
"strings"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
var log *logger.AggregatedLogger
|
var log *logger.AggregatedLogger
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
package routes
|
package routes
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"net/http"
|
||||||
|
|
||||||
downloadHandler "github.com/fossyy/filekeeper/handler/download"
|
downloadHandler "github.com/fossyy/filekeeper/handler/download"
|
||||||
downloadFileHandler "github.com/fossyy/filekeeper/handler/download/file"
|
downloadFileHandler "github.com/fossyy/filekeeper/handler/download/file"
|
||||||
forgotPasswordHandler "github.com/fossyy/filekeeper/handler/forgotPassword"
|
forgotPasswordHandler "github.com/fossyy/filekeeper/handler/forgotPassword"
|
||||||
@ -15,7 +17,6 @@ import (
|
|||||||
"github.com/fossyy/filekeeper/handler/upload/initialisation"
|
"github.com/fossyy/filekeeper/handler/upload/initialisation"
|
||||||
userHandler "github.com/fossyy/filekeeper/handler/user"
|
userHandler "github.com/fossyy/filekeeper/handler/user"
|
||||||
"github.com/fossyy/filekeeper/middleware"
|
"github.com/fossyy/filekeeper/middleware"
|
||||||
"net/http"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func SetupRoutes() *http.ServeMux {
|
func SetupRoutes() *http.ServeMux {
|
||||||
|
@ -1,11 +1,12 @@
|
|||||||
package session
|
package session
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/fossyy/filekeeper/utils"
|
|
||||||
"net/http"
|
"net/http"
|
||||||
"strconv"
|
"strconv"
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/fossyy/filekeeper/utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Session struct {
|
type Session struct {
|
||||||
|
@ -2,9 +2,6 @@ package utils
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/fossyy/filekeeper/logger"
|
|
||||||
"github.com/joho/godotenv"
|
|
||||||
"golang.org/x/crypto/bcrypt"
|
|
||||||
"math/rand"
|
"math/rand"
|
||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
"os"
|
||||||
@ -12,6 +9,10 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
"unicode"
|
"unicode"
|
||||||
|
|
||||||
|
"github.com/fossyy/filekeeper/logger"
|
||||||
|
"github.com/joho/godotenv"
|
||||||
|
"golang.org/x/crypto/bcrypt"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Env struct {
|
type Env struct {
|
||||||
|
Reference in New Issue
Block a user