MCPcopy Create free account

hub / github.com/atahani/golang-rest-api-sample / functions

Functions59 in github.com/atahani/golang-rest-api-sample

↓ 16 callersFunctionNew
(httpCode int, code int, message string, description string)
util/specialerror/specialerror.go:35
↓ 9 callersMethodBind
(i interface{}, c echo.Context)
util/echo_binder.go:23
↓ 5 callersMethodError
()
util/specialerror/specialerror.go:39
↓ 5 callersFunctionNewArticleController
(s *mgo.Session, dbName string)
controller/article/article_controller.go:27
↓ 5 callersFunctionNewClientController
(s *mgo.Session, dbName string)
controller/client/client_controller.go:29
↓ 5 callersFunctionNewUserController
(s *mgo.Session, dbName string)
controller/user/user_controller.go:40
↓ 4 callersMethodHashedAppKey
()
models/client.go:21
↓ 3 callersMethodClientAuthorization
(s *mgo.Session, dbName, appId, appKey string)
controller/client/client_controller.go:33
↓ 3 callersFunctionNew
(message, description string)
util/operationresult/operationresult.go:14
↓ 3 callersMethodStartTesting
()
util/testhelper/testhelper.go:26
↓ 3 callersFunctiongenerateAccessToken
(s *mgo.Session, dbName string, u *models.User, clientId, trustedAppId bson.ObjectId, deviceModel string, isRe
controller/user/user_controller.go:321
↓ 2 callersMethodCreateNewClient
(c echo.Context)
controller/client/client_controller.go:64
↓ 2 callersFunctionrand_char
random char string with length and bytes sets
util/genrandom.go:45
↓ 1 callersFunctionAuthorizeUserByRolesMiddleware
echo middleware to check is this user have role
controller/user/user_controller.go:95
↓ 1 callersMethodChangeUserPassword
change password with authorized user NOT reset password TODO : should implement reset password flow like send reset password link to user by email
controller/user/user_controller.go:284
↓ 1 callersMethodCreateArticle
(c echo.Context)
controller/article/article_controller.go:31
↓ 1 callersMethodDeleteArticleById
(c echo.Context)
controller/article/article_controller.go:78
↓ 1 callersMethodDeleteClientById
(c echo.Context)
controller/client/client_controller.go:161
↓ 1 callersMethodGetArticleById
(c echo.Context)
controller/article/article_controller.go:58
↓ 1 callersMethodGetArticlesOfUser
(c echo.Context)
controller/article/article_controller.go:137
↓ 1 callersMethodGetClientById
(c echo.Context)
controller/client/client_controller.go:123
↓ 1 callersMethodGetClients
(c echo.Context)
controller/client/client_controller.go:144
↓ 1 callersFunctionJWTAuthenticationMiddleware
echo middleware for checking JWT token is valid and authorize request
controller/user/user_controller.go:45
↓ 1 callersMethodRefreshAccessToken
refresh the user access token
controller/user/user_controller.go:206
↓ 1 callersMethodSignIn
authenticate the user with credential information email/username with password and generate access token
controller/user/user_controller.go:168
↓ 1 callersMethodSignUpNewUser
(c echo.Context)
controller/user/user_controller.go:115
↓ 1 callersMethodUpdateArticleById
(c echo.Context)
controller/article/article_controller.go:102
↓ 1 callersMethodUpdateClientById
(c echo.Context)
controller/client/client_controller.go:90
↓ 1 callersMethodUpdateUserProfile
update user model such as email , first, last, display name TODO : should implement user change image profile, get uploaded image resize it and save i
controller/user/user_controller.go:246
↓ 1 callersFunctioncreateNewClientInDB
create new client in db just for test
controller/user/user_controller_test.go:510
↓ 1 callersFunctiongetSession
()
util/testhelper/testhelper.go:39
FunctionCustomErrorHandler
(err error, c echo.Context)
util/specialerror/specialerror.go:43
FunctionGenerateNewRefreshToken
generate new refresh token uuid
util/genrandom.go:25
FunctionGenerateRandomNumber
generate random number in range
util/genrandom.go:39
FunctionIsStringInSlice
the helper functions for slice and arrays
util/slice_and_array.go:4
FunctionNewAppKey
generate new app key for new clients
util/genrandom.go:20
FunctionNewCustomBinderWithValidation
()
util/echo_binder.go:19
FunctionNewRandomPassword
generate new random password
util/genrandom.go:15
FunctionTestAuthorizeUserByRolesMiddleware
(t *testing.T)
controller/user/user_controller_test.go:318
FunctionTestChangeUserPassword
(t *testing.T)
controller/user/user_controller_test.go:438
FunctionTestCreateArticle
(t *testing.T)
controller/article/article_controller_test.go:27
FunctionTestCreateNewClient
(t *testing.T)
controller/client/client_controller_test.go:23
FunctionTestDeleteArticleById
(t *testing.T)
controller/article/article_controller_test.go:181
FunctionTestDeleteClientById
(t *testing.T)
controller/client/client_controller_test.go:174
FunctionTestGetArticleById
(t *testing.T)
controller/article/article_controller_test.go:69
FunctionTestGetArticlesOfUser
(t *testing.T)
controller/article/article_controller_test.go:159
FunctionTestGetClientById
(t *testing.T)
controller/client/client_controller_test.go:63
FunctionTestGetClients
(t *testing.T)
controller/client/client_controller_test.go:153
FunctionTestJWTAuthenticationMiddleware
(t *testing.T)
controller/user/user_controller_test.go:274
FunctionTestMain
(m *testing.M)
controller/client/client_controller_test.go:223
FunctionTestMain
(m *testing.M)
controller/user/user_controller_test.go:532
FunctionTestMain
(m *testing.M)
controller/article/article_controller_test.go:224
FunctionTestRefreshAccessToken
(t *testing.T)
controller/user/user_controller_test.go:133
FunctionTestSignIn
(t *testing.T)
controller/user/user_controller_test.go:201
FunctionTestSignUpNewUser
(t *testing.T)
controller/user/user_controller_test.go:31
FunctionTestUpdateArticleById
(t *testing.T)
controller/article/article_controller_test.go:109
FunctionTestUpdateClientById
(t *testing.T)
controller/client/client_controller_test.go:102
FunctionTestUpdateUserProfile
(t *testing.T)
controller/user/user_controller_test.go:362
Functionmain
()
server.go:21