-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into search-page
- Loading branch information
Showing
172 changed files
with
5,821 additions
and
3,459 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 6 additions & 6 deletions
12
.github/workflows/club_scraper.yml → .github/workflows/mock_data.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package auth | ||
|
||
import ( | ||
"github.com/GenerateNU/sac/backend/src/errors" | ||
"github.com/golang-jwt/jwt" | ||
) | ||
|
||
type JWTMockClient struct{} | ||
|
||
func NewJWTMockClient() JWTClientInterface { | ||
return &JWTMockClient{} | ||
} | ||
|
||
func (c *JWTMockClient) GenerateTokenPair(accessClaims, refreshClaims Claims) (*Token, *errors.Error) { | ||
return &Token{}, nil | ||
} | ||
|
||
func (c *JWTMockClient) GenerateToken(claims Claims, tokenType JWTType) ([]byte, *errors.Error) { | ||
return []byte{}, nil | ||
} | ||
|
||
func (c *JWTMockClient) RefreshToken(token, refreshToken string, tokenType JWTType, newClaims jwt.MapClaims) ([]byte, *errors.Error) { | ||
return []byte{}, nil | ||
} | ||
|
||
func (c *JWTMockClient) ExtractClaims(tokenString string, tokenType JWTType) (jwt.MapClaims, *errors.Error) { | ||
return jwt.MapClaims{}, nil | ||
} | ||
|
||
func (c *JWTMockClient) ParseToken(tokenString string, tokenType JWTType) (*jwt.Token, *errors.Error) { | ||
return &jwt.Token{}, nil | ||
} | ||
|
||
func (c *JWTMockClient) IsTokenValid(tokenString string, tokenType JWTType) (bool, *errors.Error) { | ||
return true, nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package auth | ||
|
||
import ( | ||
"regexp" | ||
"strings" | ||
|
||
"github.com/GenerateNU/sac/backend/src/constants" | ||
"github.com/GenerateNU/sac/backend/src/errors" | ||
) | ||
|
||
func ValidatePassword(password string) *errors.Error { | ||
if len(password) < 8 { | ||
return &errors.InvalidPasswordNotLongEnough | ||
} | ||
|
||
if !hasDigit(password) { | ||
return &errors.InvalidPasswordNoDigit | ||
} | ||
|
||
if !hasSpecialChar(password) { | ||
return &errors.InvalidPasswordNoSpecialCharacter | ||
} | ||
|
||
return nil | ||
} | ||
|
||
func hasDigit(str string) bool { | ||
return regexp.MustCompile(`[0-9]`).MatchString(str) | ||
} | ||
|
||
func hasSpecialChar(str string) bool { | ||
for _, c := range constants.SPECIAL_CHARACTERS { | ||
if strings.Contains(str, string(c)) { | ||
return true | ||
} | ||
} | ||
|
||
return false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package email | ||
|
||
import "github.com/GenerateNU/sac/backend/src/errors" | ||
|
||
type ResendMockClient struct{} | ||
|
||
func NewResendMockClient() EmailClientInterface { | ||
return &ResendMockClient{} | ||
} | ||
|
||
func (c *ResendMockClient) SendPasswordResetEmail(name, email, token string) *errors.Error { | ||
return nil | ||
} | ||
|
||
func (c *ResendMockClient) SendEmailVerification(email, code string) *errors.Error { | ||
return nil | ||
} | ||
|
||
func (c *ResendMockClient) SendWelcomeEmail(name, email string) *errors.Error { | ||
return nil | ||
} | ||
|
||
func (c *ResendMockClient) SendPasswordChangedEmail(name, email string) *errors.Error { | ||
return nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package file | ||
|
||
import ( | ||
"mime/multipart" | ||
|
||
"github.com/GenerateNU/sac/backend/src/errors" | ||
"github.com/GenerateNU/sac/backend/src/models" | ||
) | ||
|
||
type AWSMockClient struct{} | ||
|
||
func NewAWSMockClient() FileClientInterface { | ||
return &AWSMockClient{} | ||
} | ||
|
||
func (c *AWSMockClient) UploadFile(folder string, fileHeader *multipart.FileHeader, allowedTypes []FileType) (*models.FileInfo, *errors.Error) { | ||
return nil, nil | ||
} | ||
|
||
func (c *AWSMockClient) DeleteFile(fileURL string) *errors.Error { | ||
return nil | ||
} | ||
|
||
func (c *AWSMockClient) GetFileURL(fileURL string) *string { | ||
return nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.