MCPcopy Create free account

hub / github.com/JacobSNGoodwin/memrizr / functions

Functions142 in github.com/JacobSNGoodwin/memrizr

↓ 67 callersMethodGet
(ctx context.Context, uid uuid.UUID)
account/model/interfaces.go:15
↓ 34 callersMethodStatus
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 callersMethodError
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 callersFunctionNewHandler
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 callersMethodClose
Close removes created file for test
account/model/fixture/multipart.go:78
↓ 8 callersFunctionNewUserService
NewUserService is a factory function for initializing a UserService with its repository layer dependencies
account/service/user_service.go:31
↓ 7 callersMethodNewPairFromUser
(ctx context.Context, u *User, prevTokenID string)
account/model/interfaces.go:25
↓ 6 callersMethodSetProfileImage
(ctx context.Context, uid uuid.UUID, imageFileHeader *multipart.FileHeader)
account/model/interfaces.go:19
↓ 5 callersMethodGetFormFile
GetFormFile extracts form file from multipart body
account/model/fixture/multipart.go:68
↓ 4 callersFunctionNewTokenService
NewTokenService is a factory function for initializing a UserService with its repository layer dependencies
account/service/token_service.go:38
↓ 4 callersMethodValidateIDToken
(tokenString string)
account/model/interfaces.go:27
↓ 4 callersFunctionbindData
bindData is helper function, returns false if data is not bound
account/handler/bind_data.go:21
↓ 4 callersFunctiondoRequest
(reqOptions)
account-client/src/util/index.js:7
↓ 4 callersFunctiongenerateIDToken
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 callersFunctiongetTokenPayload
(token)
account-client/src/util/index.js:99
↓ 3 callersFunctionAuthUser
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 callersMethodFindByID
(ctx context.Context, uid uuid.UUID)
account/model/interfaces.go:34
↓ 3 callersMethodHeader
Header "relays" the header, h, set in struct In http.ResponseWriter interface
account/handler/middleware/timeout.go:139
↓ 3 callersMethodSignin
(ctx context.Context, u *User)
account/model/interfaces.go:17
↓ 3 callersMethodSignout
(ctx context.Context, uid uuid.UUID)
account/model/interfaces.go:26
↓ 3 callersMethodSignup
(ctx context.Context, u *User)
account/model/interfaces.go:16
↓ 3 callersMethodUpdateDetails
(ctx context.Context, u *User)
account/model/interfaces.go:18
↓ 3 callersMethodValidateRefreshToken
(refreshTokenString string)
account/model/interfaces.go:28
↓ 3 callersMethodWrite
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 callersMethodWriteHeader
In http.ResponseWriter interface
account/handler/middleware/timeout.go:120
↓ 3 callersFunctiongenerateRefreshToken
generateRefreshToken creates a refresh token The refresh token stores only the user's ID, a string
account/service/tokens.go:63
↓ 2 callersMethodCreate
(ctx context.Context, u *User)
account/model/interfaces.go:36
↓ 2 callersMethodUpdateImage
(ctx context.Context, uid uuid.UUID, imageURL string)
account/model/interfaces.go:38
↓ 2 callersFunctionauthenticate
(email, password, url)
account-client/src/store/auth.js:141
↓ 2 callersFunctionhashPassword
(password string)
account/service/password.go:12
↓ 2 callersFunctioninject
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 callersFunctionobjNameFromURL
(imageURL string)
account/service/user_service.go:192
↓ 2 callersFunctionstoreTokens
(idToken, refreshToken)
account-client/src/util/index.js:80
↓ 1 callersMethodClearProfileImage
(ctx context.Context, uid uuid.UUID)
account/model/interfaces.go:14
↓ 1 callersMethodDeleteProfile
(ctx context.Context, objName string)
account/model/interfaces.go:52
↓ 1 callersMethodDeleteRefreshToken
(ctx context.Context, userID string, prevTokenID string)
account/model/interfaces.go:45
↓ 1 callersMethodDeleteUserRefreshTokens
(ctx context.Context, userID string)
account/model/interfaces.go:46
↓ 1 callersMethodFindByEmail
(ctx context.Context, email string)
account/model/interfaces.go:35
↓ 1 callersMethodSetRefreshToken
(ctx context.Context, userID string, tokenID string, expiresIn time.Duration)
account/model/interfaces.go:44
↓ 1 callersMethodSetTimedOut
SetTimeOut sets timedOut field to true
account/handler/middleware/timeout.go:144
↓ 1 callersMethodUpdate
(ctx context.Context, u *User)
account/model/interfaces.go:37
↓ 1 callersMethodUpdateProfile
(ctx context.Context, objName string, imageFile multipart.File)
account/model/interfaces.go:53
↓ 1 callersFunctioncheckWriteHeaderCode
(code int)
account/handler/middleware/timeout.go:148
↓ 1 callersMethodclose
close to be used in graceful server shutdown
account/data_sources.go:87
↓ 1 callersFunctioncomparePasswords
(storedPassword string, suppliedPassword string)
account/service/password.go:32
↓ 1 callersFunctioncreateAuthStore
(authStoreOptions)
account-client/src/store/auth.js:97
↓ 1 callersFunctioncreateImage
createImage used to create a quick example 1px x 1px image encoded as a PNG
account/model/fixture/multipart.go:85
↓ 1 callersFunctionexec
(reqData)
account-client/src/util/index.js:43
↓ 1 callersFunctiongetTokens
()
account-client/src/util/index.js:90
↓ 1 callersFunctioninitDS
InitDS establishes connections to fields in dataSources
account/data_sources.go:23
↓ 1 callersFunctionisAllowedImageType
IsAllowedImageType determines if image is among types defined in map of allowed images
account/handler/mime_type.go:10
↓ 1 callersFunctionremoveTokens
()
account-client/src/util/index.js:85
↓ 1 callersFunctionvalidateIDToken
validateIDToken returns the token's claims if the token is valid
account/service/tokens.go:98
↓ 1 callersFunctionvalidateRefreshToken
validateRefreshToken uses the secret key to validate a refresh token
account/service/tokens.go:124
↓ 1 callersMethodwriteHeader
set that the header has been written
account/handler/middleware/timeout.go:132
MethodClearProfileImage
( ctx context.Context, uid uuid.UUID, )
account/service/user_service.go:38
MethodClearProfileImage
ClearProfileImage is a mock of UserService.ClearProfileImage
account/model/mocks/user_service.go:18
MethodCreate
Create is a mock for UserRepository Create
account/model/mocks/user_repository.go:35
MethodCreate
Create reaches out to database SQLX api
account/repository/pg_user_repository.go:28
MethodDeleteImage
DeleteImage handler
account/handler/delete_image.go:13
MethodDeleteProfile
DeleteProfile is mock of representations of ImageRepository DeleteProfile
account/model/mocks/image_repository.go:16
MethodDeleteProfile
(ctx context.Context, objName string)
account/repository/gc_image_repository.go:28
MethodDeleteRefreshToken
DeleteRefreshToken is a mock of model.TokenRepository DeleteRefreshToken
account/model/mocks/token_repository.go:31
MethodDeleteRefreshToken
DeleteRefreshToken used to delete old refresh tokens Services my access this to revolve tokens
account/repository/redis_token_repository.go:41
MethodDeleteUserRefreshTokens
DeleteUserRefreshTokens mocks concrete DeleteUserRefreshToken
account/model/mocks/token_repository.go:44
MethodDeleteUserRefreshTokens
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
MethodDetails
Details handler
account/handler/details.go:20
MethodFindByEmail
FindByEmail is mock of UserRepository.FindByEmail
account/model/mocks/user_repository.go:47
MethodFindByEmail
FindByEmail retrieves user row by email address
account/repository/pg_user_repository.go:59
MethodFindByID
FindByID is mock of UserRepository FindByID
account/model/mocks/user_repository.go:17
MethodFindByID
FindByID fetches user by id
account/repository/pg_user_repository.go:45
MethodGet
Get retrieves a user based on their uuid
account/service/user_service.go:72
MethodGet
Get is mock of UserService Get
account/model/mocks/user_service.go:30
MethodImage
Image handler
account/handler/image.go:14
MethodMe
Me handler calls services for getting a user's details
account/handler/me.go:14
FunctionNewAuthorization
* * Error "Factories" */ NewAuthorization to create a 401
account/model/apperrors/apperrors.go:81
FunctionNewBadRequest
NewBadRequest to create 400 errors (validation, for example)
account/model/apperrors/apperrors.go:89
FunctionNewConflict
NewConflict to create an error for 409
account/model/apperrors/apperrors.go:97
FunctionNewImageRepository
NewImageRepository is a factory for initializing User Repositories
account/repository/gc_image_repository.go:21
FunctionNewInternal
NewInternal for 500 errors and unknown errors
account/model/apperrors/apperrors.go:105
FunctionNewMultipartImage
NewMultipartImage creates an image file for testing and creates a Multipart Form with this image file for testing
account/model/fixture/multipart.go:29
FunctionNewNotFound
NewNotFound to create an error for 404
account/model/apperrors/apperrors.go:113
MethodNewPairFromUser
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
MethodNewPairFromUser
NewPairFromUser mocks concrete NewPairFromUser
account/model/mocks/token_service.go:17
FunctionNewPayloadTooLarge
NewPayloadTooLarge to create an error for 413
account/model/apperrors/apperrors.go:121
FunctionNewServiceUnavailable
NewServiceUnavailable to create an error for 503
account/model/apperrors/apperrors.go:129
FunctionNewTokenRepository
NewTokenRepository is a factory for initializing User Repositories
account/repository/redis_token_repository.go:21
FunctionNewUnsupportedMediaType
NewUnsupportedMediaType to create an error for 415
account/model/apperrors/apperrors.go:137
FunctionNewUserRepository
NewUserRepository is a factory for initializing User Repositories
account/repository/pg_user_repository.go:21
MethodSetProfileImage
( ctx context.Context, uid uuid.UUID, imageFileHeader *multipart.FileHeader, )
account/service/user_service.go:150
MethodSetProfileImage
SetProfileImage is a mock of UserService.SetProfileImage
account/model/mocks/user_service.go:88
MethodSetRefreshToken
SetRefreshToken is a mock of model.TokenRepository SetRefreshToken
account/model/mocks/token_repository.go:18
MethodSetRefreshToken
SetRefreshToken stores a refresh token with an expiry time
account/repository/redis_token_repository.go:28
MethodSignin
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
MethodSignin
Signin is a mock of UserService.Signin
account/model/mocks/user_service.go:64
MethodSignin
Signin used to authenticate extant user
account/handler/sigin.go:19
MethodSignout
Signout reaches out to the repository layer to delete all valid tokens for a user
account/service/token_service.go:89
MethodSignout
Signout mocks concrete Signout
account/model/mocks/token_service.go:37
MethodSignout
Signout handler
account/handler/signout.go:12
MethodSignup
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