Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
garrettladley committed Apr 22, 2024
1 parent 3c7337f commit 6479bac
Show file tree
Hide file tree
Showing 184 changed files with 393 additions and 374 deletions.
1 change: 1 addition & 0 deletions backend/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
tests/
15 changes: 15 additions & 0 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# syntax=docker/dockerfile:1

FROM golang:1.22.2

WORKDIR /app

COPY go.mod go.sum ./

COPY *.go ./

RUN CGO_ENABLED=0 GOOS=linux go build -v -o ./sac

EXPOSE 8080

CMD ["/sac"]
File renamed without changes.
6 changes: 3 additions & 3 deletions backend/src/auth/jwt.go → backend/auth/jwt.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"fmt"
"time"

"github.com/GenerateNU/sac/backend/src/config"
"github.com/GenerateNU/sac/backend/src/constants"
"github.com/GenerateNU/sac/backend/src/errors"
"github.com/GenerateNU/sac/backend/config"
"github.com/GenerateNU/sac/backend/constants"
"github.com/GenerateNU/sac/backend/errors"
m "github.com/garrettladley/mattress"
"github.com/gofiber/fiber/v2"
"github.com/golang-jwt/jwt"
Expand Down
2 changes: 1 addition & 1 deletion backend/src/auth/jwt_mock.go → backend/auth/jwt_mock.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package auth

import (
"github.com/GenerateNU/sac/backend/src/errors"
"github.com/GenerateNU/sac/backend/errors"
"github.com/golang-jwt/jwt"
)

Expand Down
4 changes: 2 additions & 2 deletions backend/src/auth/password.go → backend/auth/password.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"regexp"
"strings"

"github.com/GenerateNU/sac/backend/src/constants"
"github.com/GenerateNU/sac/backend/src/errors"
"github.com/GenerateNU/sac/backend/constants"
"github.com/GenerateNU/sac/backend/errors"
)

func ValidatePassword(password string) *errors.Error {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package auth

import "github.com/GenerateNU/sac/backend/src/models"
import "github.com/GenerateNU/sac/backend/models"

type Permission string

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
10 changes: 5 additions & 5 deletions backend/src/controllers/auth.go → backend/controllers/auth.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package controllers

import (
"github.com/GenerateNU/sac/backend/src/auth"
"github.com/GenerateNU/sac/backend/src/errors"
"github.com/GenerateNU/sac/backend/src/models"
"github.com/GenerateNU/sac/backend/src/services"
"github.com/GenerateNU/sac/backend/src/utilities"
"github.com/GenerateNU/sac/backend/auth"
"github.com/GenerateNU/sac/backend/errors"
"github.com/GenerateNU/sac/backend/models"
"github.com/GenerateNU/sac/backend/services"
"github.com/GenerateNU/sac/backend/utilities"
"github.com/gofiber/fiber/v2"
)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package controllers

import (
"github.com/GenerateNU/sac/backend/src/constants"
"github.com/GenerateNU/sac/backend/src/errors"
"github.com/GenerateNU/sac/backend/src/models"
"github.com/GenerateNU/sac/backend/src/services"
"github.com/GenerateNU/sac/backend/constants"
"github.com/GenerateNU/sac/backend/errors"
"github.com/GenerateNU/sac/backend/models"
"github.com/GenerateNU/sac/backend/services"
"github.com/gofiber/fiber/v2"
)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package controllers

import (
"github.com/GenerateNU/sac/backend/src/constants"
"github.com/GenerateNU/sac/backend/src/services"
"github.com/GenerateNU/sac/backend/constants"
"github.com/GenerateNU/sac/backend/services"

"github.com/gofiber/fiber/v2"
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package controllers

import (
"github.com/GenerateNU/sac/backend/src/constants"
"github.com/GenerateNU/sac/backend/src/errors"
"github.com/GenerateNU/sac/backend/src/models"
"github.com/GenerateNU/sac/backend/src/services"
"github.com/GenerateNU/sac/backend/constants"
"github.com/GenerateNU/sac/backend/errors"
"github.com/GenerateNU/sac/backend/models"
"github.com/GenerateNU/sac/backend/services"
"github.com/gofiber/fiber/v2"
)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package controllers

import (
"github.com/GenerateNU/sac/backend/src/errors"
"github.com/GenerateNU/sac/backend/src/models"
"github.com/GenerateNU/sac/backend/src/services"
"github.com/GenerateNU/sac/backend/errors"
"github.com/GenerateNU/sac/backend/models"
"github.com/GenerateNU/sac/backend/services"
"github.com/gofiber/fiber/v2"
)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package controllers

import (
"github.com/GenerateNU/sac/backend/src/constants"
"github.com/GenerateNU/sac/backend/src/services"
"github.com/GenerateNU/sac/backend/constants"
"github.com/GenerateNU/sac/backend/services"
"github.com/gofiber/fiber/v2"
)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package controllers

import (
"github.com/GenerateNU/sac/backend/src/constants"
"github.com/GenerateNU/sac/backend/src/services"
"github.com/GenerateNU/sac/backend/constants"
"github.com/GenerateNU/sac/backend/services"
"github.com/gofiber/fiber/v2"
)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package controllers

import (
"github.com/GenerateNU/sac/backend/src/constants"
"github.com/GenerateNU/sac/backend/src/services"
"github.com/GenerateNU/sac/backend/constants"
"github.com/GenerateNU/sac/backend/services"
"github.com/gofiber/fiber/v2"
)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package controllers

import (
"github.com/GenerateNU/sac/backend/src/errors"
"github.com/GenerateNU/sac/backend/src/models"
"github.com/GenerateNU/sac/backend/src/services"
"github.com/GenerateNU/sac/backend/errors"
"github.com/GenerateNU/sac/backend/models"
"github.com/GenerateNU/sac/backend/services"
"github.com/gofiber/fiber/v2"
)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package controllers

import (
"github.com/GenerateNU/sac/backend/src/errors"
"github.com/GenerateNU/sac/backend/src/models"
"github.com/GenerateNU/sac/backend/src/services"
"github.com/GenerateNU/sac/backend/errors"
"github.com/GenerateNU/sac/backend/models"
"github.com/GenerateNU/sac/backend/services"
"github.com/gofiber/fiber/v2"
)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package controllers

import (
"github.com/GenerateNU/sac/backend/src/constants"
"github.com/GenerateNU/sac/backend/src/services"
"github.com/GenerateNU/sac/backend/constants"
"github.com/GenerateNU/sac/backend/services"
"github.com/gofiber/fiber/v2"
)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package controllers

import (
"github.com/GenerateNU/sac/backend/src/constants"
"github.com/GenerateNU/sac/backend/src/errors"
"github.com/GenerateNU/sac/backend/src/models"
"github.com/GenerateNU/sac/backend/src/services"
"github.com/GenerateNU/sac/backend/constants"
"github.com/GenerateNU/sac/backend/errors"
"github.com/GenerateNU/sac/backend/models"
"github.com/GenerateNU/sac/backend/services"
"github.com/gofiber/fiber/v2"
)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package controllers

import (
"github.com/GenerateNU/sac/backend/src/constants"
"github.com/GenerateNU/sac/backend/src/errors"
"github.com/GenerateNU/sac/backend/src/models"
"github.com/GenerateNU/sac/backend/src/services"
"github.com/GenerateNU/sac/backend/constants"
"github.com/GenerateNU/sac/backend/errors"
"github.com/GenerateNU/sac/backend/models"
"github.com/GenerateNU/sac/backend/services"
"github.com/gofiber/fiber/v2"
)

Expand Down
4 changes: 2 additions & 2 deletions backend/src/controllers/poc.go → backend/controllers/poc.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package controllers

import (
"github.com/GenerateNU/sac/backend/src/constants"
"github.com/GenerateNU/sac/backend/src/services"
"github.com/GenerateNU/sac/backend/constants"
"github.com/GenerateNU/sac/backend/services"
"github.com/gofiber/fiber/v2"
)

Expand Down
6 changes: 3 additions & 3 deletions backend/src/controllers/tag.go → backend/controllers/tag.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package controllers

import (
"github.com/GenerateNU/sac/backend/src/errors"
"github.com/GenerateNU/sac/backend/src/models"
"github.com/GenerateNU/sac/backend/src/services"
"github.com/GenerateNU/sac/backend/errors"
"github.com/GenerateNU/sac/backend/models"
"github.com/GenerateNU/sac/backend/services"

"github.com/gofiber/fiber/v2"
)
Expand Down
12 changes: 6 additions & 6 deletions backend/src/controllers/user.go → backend/controllers/user.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package controllers

import (
"github.com/GenerateNU/sac/backend/src/auth"
"github.com/GenerateNU/sac/backend/src/constants"
"github.com/GenerateNU/sac/backend/src/errors"
"github.com/GenerateNU/sac/backend/src/models"
"github.com/GenerateNU/sac/backend/src/services"
"github.com/GenerateNU/sac/backend/src/utilities"
"github.com/GenerateNU/sac/backend/auth"
"github.com/GenerateNU/sac/backend/constants"
"github.com/GenerateNU/sac/backend/errors"
"github.com/GenerateNU/sac/backend/models"
"github.com/GenerateNU/sac/backend/services"
"github.com/GenerateNU/sac/backend/utilities"

"github.com/gofiber/fiber/v2"
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package controllers

import (
"github.com/GenerateNU/sac/backend/src/services"
"github.com/GenerateNU/sac/backend/src/utilities"
"github.com/GenerateNU/sac/backend/services"
"github.com/GenerateNU/sac/backend/utilities"
"github.com/gofiber/fiber/v2"
)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package controllers

import (
"github.com/GenerateNU/sac/backend/src/services"
"github.com/GenerateNU/sac/backend/src/utilities"
"github.com/GenerateNU/sac/backend/services"
"github.com/GenerateNU/sac/backend/utilities"
"github.com/gofiber/fiber/v2"
)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package controllers

import (
"github.com/GenerateNU/sac/backend/src/errors"
"github.com/GenerateNU/sac/backend/src/models"
"github.com/GenerateNU/sac/backend/src/services"
"github.com/GenerateNU/sac/backend/errors"
"github.com/GenerateNU/sac/backend/models"
"github.com/GenerateNU/sac/backend/services"
"github.com/gofiber/fiber/v2"
)

Expand Down
4 changes: 2 additions & 2 deletions backend/src/database/db.go → backend/database/db.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package database

import (
"github.com/GenerateNU/sac/backend/src/config"
"github.com/GenerateNU/sac/backend/src/models"
"github.com/GenerateNU/sac/backend/config"
"github.com/GenerateNU/sac/backend/models"
"gorm.io/driver/postgres"
"gorm.io/gorm"
"gorm.io/gorm/logger"
Expand Down
8 changes: 4 additions & 4 deletions backend/src/database/super.go → backend/database/super.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package database

import (
"github.com/GenerateNU/sac/backend/src/auth"
"github.com/GenerateNU/sac/backend/src/config"
"github.com/GenerateNU/sac/backend/src/errors"
"github.com/GenerateNU/sac/backend/src/models"
"github.com/GenerateNU/sac/backend/auth"
"github.com/GenerateNU/sac/backend/config"
"github.com/GenerateNU/sac/backend/errors"
"github.com/GenerateNU/sac/backend/models"
"github.com/google/uuid"
)

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions backend/src/email/email.go → backend/email/email.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"fmt"
"os"

"github.com/GenerateNU/sac/backend/src/config"
"github.com/GenerateNU/sac/backend/src/constants"
"github.com/GenerateNU/sac/backend/src/errors"
"github.com/GenerateNU/sac/backend/config"
"github.com/GenerateNU/sac/backend/constants"
"github.com/GenerateNU/sac/backend/errors"
"github.com/afex/hystrix-go/hystrix"
"github.com/resend/resend-go/v2"
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package email

import "github.com/GenerateNU/sac/backend/src/errors"
import "github.com/GenerateNU/sac/backend/errors"

type ResendMockClient struct{}

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions backend/src/file/aws_mock.go → backend/file/aws_mock.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package file
import (
"mime/multipart"

"github.com/GenerateNU/sac/backend/src/errors"
"github.com/GenerateNU/sac/backend/src/models"
"github.com/GenerateNU/sac/backend/errors"
"github.com/GenerateNU/sac/backend/models"
)

type AWSMockClient struct{}
Expand Down
8 changes: 4 additions & 4 deletions backend/src/file/file.go → backend/file/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ import (
"mime/multipart"
"strings"

"github.com/GenerateNU/sac/backend/src/config"
"github.com/GenerateNU/sac/backend/src/constants"
"github.com/GenerateNU/sac/backend/src/errors"
"github.com/GenerateNU/sac/backend/src/models"
"github.com/GenerateNU/sac/backend/config"
"github.com/GenerateNU/sac/backend/constants"
"github.com/GenerateNU/sac/backend/errors"
"github.com/GenerateNU/sac/backend/models"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/credentials"
"github.com/aws/aws-sdk-go/aws/session"
Expand Down
Loading

0 comments on commit 6479bac

Please sign in to comment.