Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/EricLau1/go-grpc-microservices
/ functions
Functions
79 in github.com/EricLau1/go-grpc-microservices
⨍
Functions
79
◇
Types & classes
13
↓ 22 callers
Function
WriteError
(w http.ResponseWriter, statusCode int, err error)
api/restutil/restutil.go:27
↓ 13 callers
Method
Close
()
db/db.go:10
↓ 9 callers
Method
GetById
(id string)
authentication/repository/users.go:15
↓ 8 callers
Function
NewConfig
()
db/config.go:24
↓ 8 callers
Function
NewConnection
(cfg Config)
db/db.go:19
↓ 8 callers
Function
NewUsersRepository
(conn db.Connection)
authentication/repository/users.go:26
↓ 7 callers
Method
Save
(user *models.User)
authentication/repository/users.go:14
↓ 7 callers
Function
WriteAsJson
(w http.ResponseWriter, statusCode int, data interface{})
api/restutil/restutil.go:21
↓ 6 callers
Method
ToProtoBuffer
()
authentication/models/user.go:19
↓ 5 callers
Function
VerifyPassword
(hashed, password string)
security/password.go:13
↓ 4 callers
Method
GetByEmail
(email string)
authentication/repository/users.go:16
↓ 3 callers
Function
AuthRequestWithId
(r *http.Request)
api/restutil/restutil.go:35
↓ 3 callers
Function
EncryptPassword
(password string)
security/password.go:5
↓ 3 callers
Function
NewToken
(userId string)
security/tokens.go:21
↓ 3 callers
Function
NewTokenPayload
(tokenString string)
security/tokens.go:59
↓ 2 callers
Method
DB
()
db/db.go:11
↓ 2 callers
Method
Delete
(id string)
authentication/repository/users.go:19
↓ 2 callers
Method
Dsn
()
db/config.go:11
↓ 2 callers
Function
ExtractToken
(r *http.Request)
security/tokens.go:38
↓ 2 callers
Method
GetAll
()
authentication/repository/users.go:17
↓ 2 callers
Function
LogRequests
(next http.HandlerFunc)
api/middlewares/middlewares.go:11
↓ 2 callers
Function
NormalizeEmail
(email string)
authentication/validators/validators.go:36
↓ 2 callers
Function
ParseToken
(tokenString string)
security/tokens.go:49
↓ 2 callers
Method
Update
(user *models.User)
authentication/repository/users.go:18
↓ 1 callers
Function
Authenticate
(next http.HandlerFunc)
api/middlewares/middlewares.go:20
↓ 1 callers
Method
DbName
()
db/config.go:12
↓ 1 callers
Method
DeleteAll
()
authentication/repository/users.go:57
↓ 1 callers
Method
DeleteUser
(w http.ResponseWriter, r *http.Request)
api/resthandlers/auth.go:21
↓ 1 callers
Method
FromProtoBuffer
(user *pb.User)
authentication/models/user.go:30
↓ 1 callers
Method
GetUser
(w http.ResponseWriter, r *http.Request)
api/resthandlers/auth.go:19
↓ 1 callers
Function
Install
(router *mux.Router, routeList []*Route)
api/routes/routes.go:18
↓ 1 callers
Method
ListUsers
(req *pb.ListUsersRequest, stream pb.AuthService_ListUsersServer)
authentication/service/service.go:92
↓ 1 callers
Function
NewAuthHandlers
(authSvcClient pb.AuthServiceClient)
api/resthandlers/auth.go:28
↓ 1 callers
Function
NewAuthRoutes
(authHandlers resthandlers.AuthHandlers)
api/routes/auth.go:8
↓ 1 callers
Function
NewAuthService
(usersRepository repository.UsersRepository)
authentication/service/service.go:22
↓ 1 callers
Method
SignIn
(w http.ResponseWriter, r *http.Request)
api/resthandlers/auth.go:17
↓ 1 callers
Method
SignUp
(w http.ResponseWriter, r *http.Request)
api/resthandlers/auth.go:16
↓ 1 callers
Method
UpdateUser
(ctx context.Context, req *pb.User)
authentication/service/service.go:106
↓ 1 callers
Function
ValidateSignUp
(user *pb.User)
authentication/validators/validators.go:20
↓ 1 callers
Function
WithCORS
(router *mux.Router)
api/routes/routes.go:34
↓ 1 callers
Function
getTokenExpired
(id string)
security/tokens_test.go:37
Method
Close
()
db/db.go:28
Method
DB
()
db/db.go:32
Method
DbName
()
db/config.go:43
Method
Delete
(id string)
authentication/repository/users.go:53
Method
DeleteUser
(ctx context.Context, req *pb.GetUserRequest)
authentication/service/service.go:128
Method
DeleteUser
(w http.ResponseWriter, r *http.Request)
api/resthandlers/auth.go:151
Method
Dsn
()
db/config.go:39
Method
GetAll
()
authentication/repository/users.go:44
Method
GetByEmail
(email string)
authentication/repository/users.go:39
Method
GetById
(id string)
authentication/repository/users.go:34
Method
GetUser
(ctx context.Context, req *pb.GetUserRequest)
authentication/service/service.go:81
Method
GetUser
(w http.ResponseWriter, r *http.Request)
api/resthandlers/auth.go:116
Method
GetUsers
(w http.ResponseWriter, r *http.Request)
api/resthandlers/auth.go:20
Method
GetUsers
(w http.ResponseWriter, r *http.Request)
api/resthandlers/auth.go:130
Method
PutUser
(w http.ResponseWriter, r *http.Request)
api/resthandlers/auth.go:18
Method
PutUser
(w http.ResponseWriter, r *http.Request)
api/resthandlers/auth.go:85
Method
Save
(user *models.User)
authentication/repository/users.go:30
Method
SignIn
(ctx context.Context, req *pb.SignInRequest)
authentication/service/service.go:57
Method
SignIn
(w http.ResponseWriter, r *http.Request)
api/resthandlers/auth.go:60
Method
SignUp
(ctx context.Context, req *pb.User)
authentication/service/service.go:26
Method
SignUp
(w http.ResponseWriter, r *http.Request)
api/resthandlers/auth.go:32
Function
TestEncryptPassword
(t *testing.T)
security/password_test.go:9
Function
TestNewToken
(t *testing.T)
security/tokens_test.go:12
Function
TestNewTokenPayload
(t *testing.T)
security/tokens_test.go:19
Function
TestUsersRepositoryDelete
(t *testing.T)
authentication/repository/users_test.go:162
Function
TestUsersRepositoryGetAll
(t *testing.T)
authentication/repository/users_test.go:196
Function
TestUsersRepositoryGetByEmail
(t *testing.T)
authentication/repository/users_test.go:93
Function
TestUsersRepositoryGetById
(t *testing.T)
authentication/repository/users_test.go:58
Function
TestUsersRepositorySave
(t *testing.T)
authentication/repository/users_test.go:32
Function
TestUsersRepositoryUpdate
(t *testing.T)
authentication/repository/users_test.go:128
Function
TestVerifyPassword
(t *testing.T)
security/password_test.go:16
Method
Update
(user *models.User)
authentication/repository/users.go:49
Function
init
()
authentication/main.go:22
Function
init
()
authentication/repository/users_test.go:17
Function
init
()
api/main.go:21
Function
main
()
authentication/main.go:28
Function
main
()
api/main.go:27
Function
parseJwtCallback
(token *jwt.Token)
security/tokens.go:31