Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/JacobSNGoodwin/memrizr
/ functions
Functions
142 in github.com/JacobSNGoodwin/memrizr
⨍
Functions
142
◇
Types & classes
38
↓ 67 callers
Method
Get
(ctx context.Context, uid uuid.UUID)
account/model/interfaces.go:15
↓ 34 callers
Method
Status
Status is a mapping errors to status codes Of course, this is somewhat redundant since our errors already map http status codes
account/model/apperrors/apperrors.go:42
↓ 21 callers
Method
Error
Error satisfies standard error interface we can return errors from this package as a regular old go _error_
account/model/apperrors/apperrors.go:35
↓ 19 callers
Function
NewHandler
NewHandler initializes the handler with required injected services along with http routes Does not return as it deals directly with a reference to the
account/handler/handler.go:32
↓ 14 callers
Method
Close
Close removes created file for test
account/model/fixture/multipart.go:78
↓ 8 callers
Function
NewUserService
NewUserService is a factory function for initializing a UserService with its repository layer dependencies
account/service/user_service.go:31
↓ 7 callers
Method
NewPairFromUser
(ctx context.Context, u *User, prevTokenID string)
account/model/interfaces.go:25
↓ 6 callers
Method
SetProfileImage
(ctx context.Context, uid uuid.UUID, imageFileHeader *multipart.FileHeader)
account/model/interfaces.go:19
↓ 5 callers
Method
GetFormFile
GetFormFile extracts form file from multipart body
account/model/fixture/multipart.go:68
↓ 4 callers
Function
NewTokenService
NewTokenService is a factory function for initializing a UserService with its repository layer dependencies
account/service/token_service.go:38
↓ 4 callers
Method
ValidateIDToken
(tokenString string)
account/model/interfaces.go:27
↓ 4 callers
Function
bindData
bindData is helper function, returns false if data is not bound
account/handler/bind_data.go:21
↓ 4 callers
Function
doRequest
(reqOptions)
account-client/src/util/index.js:7
↓ 4 callers
Function
generateIDToken
generateIDToken generates an IDToken which is a jwt with myCustomClaims Could call this GenerateIDTokenString, but the signature makes this fairly cle
account/service/tokens.go:22
↓ 4 callers
Function
getTokenPayload
(token)
account-client/src/util/index.js:99
↓ 3 callers
Function
AuthUser
AuthUser extracts a user from the Authorization header which is of the form "Bearer token" It sets the user to the context if the user exists
account/handler/middleware/auth_user.go:27
↓ 3 callers
Method
FindByID
(ctx context.Context, uid uuid.UUID)
account/model/interfaces.go:34
↓ 3 callers
Method
Header
Header "relays" the header, h, set in struct In http.ResponseWriter interface
account/handler/middleware/timeout.go:139
↓ 3 callers
Method
Signin
(ctx context.Context, u *User)
account/model/interfaces.go:17
↓ 3 callers
Method
Signout
(ctx context.Context, uid uuid.UUID)
account/model/interfaces.go:26
↓ 3 callers
Method
Signup
(ctx context.Context, u *User)
account/model/interfaces.go:16
↓ 3 callers
Method
UpdateDetails
(ctx context.Context, u *User)
account/model/interfaces.go:18
↓ 3 callers
Method
ValidateRefreshToken
(refreshTokenString string)
account/model/interfaces.go:28
↓ 3 callers
Method
Write
Writes the response, but first makes sure there hasn't already been a timeout In http.ResponseWriter interface
account/handler/middleware/timeout.go:109
↓ 3 callers
Method
WriteHeader
In http.ResponseWriter interface
account/handler/middleware/timeout.go:120
↓ 3 callers
Function
generateRefreshToken
generateRefreshToken creates a refresh token The refresh token stores only the user's ID, a string
account/service/tokens.go:63
↓ 2 callers
Method
Create
(ctx context.Context, u *User)
account/model/interfaces.go:36
↓ 2 callers
Method
UpdateImage
(ctx context.Context, uid uuid.UUID, imageURL string)
account/model/interfaces.go:38
↓ 2 callers
Function
authenticate
(email, password, url)
account-client/src/store/auth.js:141
↓ 2 callers
Function
hashPassword
(password string)
account/service/password.go:12
↓ 2 callers
Function
inject
will initialize a handler starting from data sources which inject into repository layer which inject into service layer which inject into handler laye
account/injection.go:22
↓ 2 callers
Function
objNameFromURL
(imageURL string)
account/service/user_service.go:192
↓ 2 callers
Function
storeTokens
(idToken, refreshToken)
account-client/src/util/index.js:80
↓ 1 callers
Method
ClearProfileImage
(ctx context.Context, uid uuid.UUID)
account/model/interfaces.go:14
↓ 1 callers
Method
DeleteProfile
(ctx context.Context, objName string)
account/model/interfaces.go:52
↓ 1 callers
Method
DeleteRefreshToken
(ctx context.Context, userID string, prevTokenID string)
account/model/interfaces.go:45
↓ 1 callers
Method
DeleteUserRefreshTokens
(ctx context.Context, userID string)
account/model/interfaces.go:46
↓ 1 callers
Method
FindByEmail
(ctx context.Context, email string)
account/model/interfaces.go:35
↓ 1 callers
Method
SetRefreshToken
(ctx context.Context, userID string, tokenID string, expiresIn time.Duration)
account/model/interfaces.go:44
↓ 1 callers
Method
SetTimedOut
SetTimeOut sets timedOut field to true
account/handler/middleware/timeout.go:144
↓ 1 callers
Method
Update
(ctx context.Context, u *User)
account/model/interfaces.go:37
↓ 1 callers
Method
UpdateProfile
(ctx context.Context, objName string, imageFile multipart.File)
account/model/interfaces.go:53
↓ 1 callers
Function
checkWriteHeaderCode
(code int)
account/handler/middleware/timeout.go:148
↓ 1 callers
Method
close
close to be used in graceful server shutdown
account/data_sources.go:87
↓ 1 callers
Function
comparePasswords
(storedPassword string, suppliedPassword string)
account/service/password.go:32
↓ 1 callers
Function
createAuthStore
(authStoreOptions)
account-client/src/store/auth.js:97
↓ 1 callers
Function
createImage
createImage used to create a quick example 1px x 1px image encoded as a PNG
account/model/fixture/multipart.go:85
↓ 1 callers
Function
exec
(reqData)
account-client/src/util/index.js:43
↓ 1 callers
Function
getTokens
()
account-client/src/util/index.js:90
↓ 1 callers
Function
initDS
InitDS establishes connections to fields in dataSources
account/data_sources.go:23
↓ 1 callers
Function
isAllowedImageType
IsAllowedImageType determines if image is among types defined in map of allowed images
account/handler/mime_type.go:10
↓ 1 callers
Function
removeTokens
()
account-client/src/util/index.js:85
↓ 1 callers
Function
validateIDToken
validateIDToken returns the token's claims if the token is valid
account/service/tokens.go:98
↓ 1 callers
Function
validateRefreshToken
validateRefreshToken uses the secret key to validate a refresh token
account/service/tokens.go:124
↓ 1 callers
Method
writeHeader
set that the header has been written
account/handler/middleware/timeout.go:132
Method
ClearProfileImage
( ctx context.Context, uid uuid.UUID, )
account/service/user_service.go:38
Method
ClearProfileImage
ClearProfileImage is a mock of UserService.ClearProfileImage
account/model/mocks/user_service.go:18
Method
Create
Create is a mock for UserRepository Create
account/model/mocks/user_repository.go:35
Method
Create
Create reaches out to database SQLX api
account/repository/pg_user_repository.go:28
Method
DeleteImage
DeleteImage handler
account/handler/delete_image.go:13
Method
DeleteProfile
DeleteProfile is mock of representations of ImageRepository DeleteProfile
account/model/mocks/image_repository.go:16
Method
DeleteProfile
(ctx context.Context, objName string)
account/repository/gc_image_repository.go:28
Method
DeleteRefreshToken
DeleteRefreshToken is a mock of model.TokenRepository DeleteRefreshToken
account/model/mocks/token_repository.go:31
Method
DeleteRefreshToken
DeleteRefreshToken used to delete old refresh tokens Services my access this to revolve tokens
account/repository/redis_token_repository.go:41
Method
DeleteUserRefreshTokens
DeleteUserRefreshTokens mocks concrete DeleteUserRefreshToken
account/model/mocks/token_repository.go:44
Method
DeleteUserRefreshTokens
DeleteUserRefreshTokens looks for all tokens beginning with userID and scans to delete them in a non-blocking fashion
account/repository/redis_token_repository.go:63
Method
Details
Details handler
account/handler/details.go:20
Method
FindByEmail
FindByEmail is mock of UserRepository.FindByEmail
account/model/mocks/user_repository.go:47
Method
FindByEmail
FindByEmail retrieves user row by email address
account/repository/pg_user_repository.go:59
Method
FindByID
FindByID is mock of UserRepository FindByID
account/model/mocks/user_repository.go:17
Method
FindByID
FindByID fetches user by id
account/repository/pg_user_repository.go:45
Method
Get
Get retrieves a user based on their uuid
account/service/user_service.go:72
Method
Get
Get is mock of UserService Get
account/model/mocks/user_service.go:30
Method
Image
Image handler
account/handler/image.go:14
Method
Me
Me handler calls services for getting a user's details
account/handler/me.go:14
Function
NewAuthorization
* * Error "Factories" */ NewAuthorization to create a 401
account/model/apperrors/apperrors.go:81
Function
NewBadRequest
NewBadRequest to create 400 errors (validation, for example)
account/model/apperrors/apperrors.go:89
Function
NewConflict
NewConflict to create an error for 409
account/model/apperrors/apperrors.go:97
Function
NewImageRepository
NewImageRepository is a factory for initializing User Repositories
account/repository/gc_image_repository.go:21
Function
NewInternal
NewInternal for 500 errors and unknown errors
account/model/apperrors/apperrors.go:105
Function
NewMultipartImage
NewMultipartImage creates an image file for testing and creates a Multipart Form with this image file for testing
account/model/fixture/multipart.go:29
Function
NewNotFound
NewNotFound to create an error for 404
account/model/apperrors/apperrors.go:113
Method
NewPairFromUser
NewPairFromUser creates fresh id and refresh tokens for the current user If a previous token is included, the previous token is removed from the token
account/service/token_service.go:52
Method
NewPairFromUser
NewPairFromUser mocks concrete NewPairFromUser
account/model/mocks/token_service.go:17
Function
NewPayloadTooLarge
NewPayloadTooLarge to create an error for 413
account/model/apperrors/apperrors.go:121
Function
NewServiceUnavailable
NewServiceUnavailable to create an error for 503
account/model/apperrors/apperrors.go:129
Function
NewTokenRepository
NewTokenRepository is a factory for initializing User Repositories
account/repository/redis_token_repository.go:21
Function
NewUnsupportedMediaType
NewUnsupportedMediaType to create an error for 415
account/model/apperrors/apperrors.go:137
Function
NewUserRepository
NewUserRepository is a factory for initializing User Repositories
account/repository/pg_user_repository.go:21
Method
SetProfileImage
( ctx context.Context, uid uuid.UUID, imageFileHeader *multipart.FileHeader, )
account/service/user_service.go:150
Method
SetProfileImage
SetProfileImage is a mock of UserService.SetProfileImage
account/model/mocks/user_service.go:88
Method
SetRefreshToken
SetRefreshToken is a mock of model.TokenRepository SetRefreshToken
account/model/mocks/token_repository.go:18
Method
SetRefreshToken
SetRefreshToken stores a refresh token with an expiry time
account/repository/redis_token_repository.go:28
Method
Signin
Signin reaches our to a UserRepository check if the user exists and then compares the supplied password with the provided password if a valid email/pa
account/service/user_service.go:110
Method
Signin
Signin is a mock of UserService.Signin
account/model/mocks/user_service.go:64
Method
Signin
Signin used to authenticate extant user
account/handler/sigin.go:19
Method
Signout
Signout reaches out to the repository layer to delete all valid tokens for a user
account/service/token_service.go:89
Method
Signout
Signout mocks concrete Signout
account/model/mocks/token_service.go:37
Method
Signout
Signout handler
account/handler/signout.go:12
Method
Signup
Signup reaches our to a UserRepository to verify the email address is available and signs up the user if this is the case
account/service/user_service.go:80
next →
1–100 of 142, ranked by callers