Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/ProgrammerZamanNow/belajar-golang-dependency-injection
/ functions
Functions
107 in github.com/ProgrammerZamanNow/belajar-golang-dependency-injection
⨍
Functions
107
◇
Types & classes
34
↓ 25 callers
Function
PanicIfError
(err error)
helper/error.go:3
↓ 10 callers
Method
ServeHTTP
(writer http.ResponseWriter, request *http.Request)
middleware/auth_middleware.go:17
↓ 10 callers
Function
setupRouter
(db *sql.DB)
test/category_controller_test.go:39
↓ 10 callers
Function
setupTestDB
()
test/category_controller_test.go:27
↓ 10 callers
Function
truncateCategory
(db *sql.DB)
test/category_controller_test.go:49
↓ 9 callers
Function
WriteToResponseBody
(writer http.ResponseWriter, response interface{})
helper/json.go:14
↓ 7 callers
Function
NewCategoryRepository
()
repository/category_repository_impl.go:14
↓ 7 callers
Method
Save
(ctx context.Context, tx *sql.Tx, category domain.Category)
repository/category_repository.go:10
↓ 5 callers
Function
CommitOrRollback
(tx *sql.Tx)
helper/tx.go:5
↓ 4 callers
Function
ToCategoryResponse
(category domain.Category)
helper/model.go:8
↓ 3 callers
Method
Close
()
simple/file.go:9
↓ 3 callers
Method
FindById
(ctx context.Context, categoryId int)
service/category_service.go:12
↓ 3 callers
Function
NewNotFoundError
(error string)
exception/not_found_error.go:7
↓ 2 callers
Function
InitializedService
Injectors from injector.go:
simple/wire_gen.go:17
↓ 2 callers
Function
NewAuthMiddleware
(handler http.Handler)
middleware/auth_middleware.go:13
↓ 2 callers
Function
NewCategoryController
(categoryService service.CategoryService)
controller/category_controller_impl.go:16
↓ 2 callers
Function
NewCategoryService
(categoryRepository repository.CategoryRepository, DB *sql.DB, validate *validator.Validate)
service/category_service_impl.go:20
↓ 2 callers
Function
NewRouter
(categoryController controller.CategoryController)
app/router.go:9
↓ 2 callers
Function
ReadFromRequestBody
(request *http.Request, result interface{})
helper/json.go:8
↓ 1 callers
Method
Close
()
simple/connection.go:9
↓ 1 callers
Method
Create
(writer http.ResponseWriter, request *http.Request, params httprouter.Params)
controller/category_controller.go:9
↓ 1 callers
Method
Delete
(writer http.ResponseWriter, request *http.Request, params httprouter.Params)
controller/category_controller.go:11
↓ 1 callers
Method
Delete
(ctx context.Context, categoryId int)
service/category_service.go:11
↓ 1 callers
Method
FindAll
(writer http.ResponseWriter, request *http.Request, params httprouter.Params)
controller/category_controller.go:13
↓ 1 callers
Method
FindAll
(ctx context.Context)
service/category_service.go:13
↓ 1 callers
Method
FindById
(writer http.ResponseWriter, request *http.Request, params httprouter.Params)
controller/category_controller.go:12
↓ 1 callers
Function
InitializedConnection
(name string)
simple/wire_gen.go:88
↓ 1 callers
Function
InitializedServer
Injectors from injector.go:
wire_gen.go:26
↓ 1 callers
Function
NewApplication
()
simple/configuration.go:11
↓ 1 callers
Function
NewBar
()
simple/foo_bar.go:13
↓ 1 callers
Function
NewBarRepository
()
simple/bar.go:6
↓ 1 callers
Function
NewBarService
(barRepository *BarRepository)
simple/bar.go:14
↓ 1 callers
Function
NewConnection
(file *File)
simple/connection.go:13
↓ 1 callers
Function
NewDB
()
app/database.go:9
↓ 1 callers
Function
NewDatabaseMongoDB
()
simple/database.go:10
↓ 1 callers
Function
NewDatabasePostgreSQL
()
simple/database.go:14
↓ 1 callers
Function
NewDatabaseRepository
( postgreSQL *DatabasePostgreSQL, mongodb *DatabaseMongoDB, )
simple/database.go:23
↓ 1 callers
Function
NewFile
(name string)
simple/file.go:13
↓ 1 callers
Function
NewFoo
()
simple/foo_bar.go:6
↓ 1 callers
Function
NewFooBarService
(fooService *FooService, barService *BarService)
simple/foobar.go:8
↓ 1 callers
Function
NewFooRepository
()
simple/foo.go:6
↓ 1 callers
Function
NewFooService
(fooRepository *FooRepository)
simple/foo.go:14
↓ 1 callers
Function
NewHelloService
(sayHello SayHello)
simple/hello.go:22
↓ 1 callers
Function
NewSayHelloImpl
()
simple/hello.go:18
↓ 1 callers
Function
NewServer
(authMiddleware *middleware.AuthMiddleware)
main.go:10
↓ 1 callers
Function
NewSimpleRepository
(isError bool)
simple/simple.go:9
↓ 1 callers
Function
NewSimpleService
(repository *SimpleRepository)
simple/simple.go:19
↓ 1 callers
Function
ToCategoryResponses
(categories []domain.Category)
helper/model.go:15
↓ 1 callers
Method
Update
(writer http.ResponseWriter, request *http.Request, params httprouter.Params)
controller/category_controller.go:10
↓ 1 callers
Method
Update
(ctx context.Context, request web.CategoryUpdateRequest)
service/category_service.go:10
↓ 1 callers
Function
internalServerError
(writer http.ResponseWriter, request *http.Request, err interface{})
exception/error_handler.go:61
↓ 1 callers
Function
notFoundError
(writer http.ResponseWriter, request *http.Request, err interface{})
exception/error_handler.go:42
↓ 1 callers
Function
validationErrors
(writer http.ResponseWriter, request *http.Request, err interface{})
exception/error_handler.go:23
Method
Create
(writer http.ResponseWriter, request *http.Request, params httprouter.Params)
controller/category_controller_impl.go:22
Method
Create
(ctx context.Context, request web.CategoryCreateRequest)
service/category_service_impl.go:28
Method
Create
(ctx context.Context, request web.CategoryCreateRequest)
service/category_service.go:9
Method
Delete
(writer http.ResponseWriter, request *http.Request, params httprouter.Params)
controller/category_controller_impl.go:56
Method
Delete
(ctx context.Context, categoryId int)
service/category_service_impl.go:65
Method
Delete
(ctx context.Context, tx *sql.Tx, category domain.Category)
repository/category_repository_impl.go:38
Method
Delete
(ctx context.Context, tx *sql.Tx, category domain.Category)
repository/category_repository.go:12
Function
ErrorHandler
(writer http.ResponseWriter, request *http.Request, err interface{})
exception/error_handler.go:10
Method
FindAll
(writer http.ResponseWriter, request *http.Request, params httprouter.Params)
controller/category_controller_impl.go:85
Method
FindAll
(ctx context.Context)
service/category_service_impl.go:91
Method
FindAll
(ctx context.Context, tx *sql.Tx)
repository/category_repository_impl.go:60
Method
FindAll
(ctx context.Context, tx *sql.Tx)
repository/category_repository.go:14
Method
FindById
(writer http.ResponseWriter, request *http.Request, params httprouter.Params)
controller/category_controller_impl.go:70
Method
FindById
(ctx context.Context, categoryId int)
service/category_service_impl.go:78
Method
FindById
(ctx context.Context, tx *sql.Tx, categoryId int)
repository/category_repository_impl.go:44
Method
FindById
(ctx context.Context, tx *sql.Tx, categoryId int)
repository/category_repository.go:13
Method
Hello
(name string)
simple/hello.go:4
Method
Hello
(name string)
simple/hello.go:14
Function
InitializedConfiguration
()
simple/wire_gen.go:82
Function
InitializedConfiguration
()
simple/injector.go:71
Function
InitializedConnection
(name string)
simple/injector.go:79
Function
InitializedDatabaseRepository
()
simple/wire_gen.go:26
Function
InitializedDatabaseRepository
()
simple/injector.go:19
Function
InitializedFooBar
()
simple/wire_gen.go:48
Function
InitializedFooBar
()
simple/injector.go:53
Function
InitializedFooBarService
()
simple/wire_gen.go:33
Function
InitializedFooBarService
()
simple/injector.go:32
Function
InitializedFooBarUsingValue
()
simple/wire_gen.go:58
Function
InitializedFooBarUsingValue
()
simple/injector.go:61
Function
InitializedHelloService
()
simple/wire_gen.go:42
Function
InitializedHelloService
()
simple/injector.go:48
Function
InitializedReader
()
simple/wire_gen.go:73
Function
InitializedReader
()
simple/injector.go:66
Function
InitializedServer
()
injector.go:27
Function
InitializedService
(isError bool)
simple/injector.go:12
Method
Save
(ctx context.Context, tx *sql.Tx, category domain.Category)
repository/category_repository_impl.go:18
Function
TestConnection
(t *testing.T)
test/file_test.go:9
Function
TestCreateCategoryFailed
(t *testing.T)
test/category_controller_test.go:79
Function
TestCreateCategorySuccess
(t *testing.T)
test/category_controller_test.go:53
Function
TestDeleteCategoryFailed
(t *testing.T)
test/category_controller_test.go:260
Function
TestDeleteCategorySuccess
(t *testing.T)
test/category_controller_test.go:228
Function
TestGetCategoryFailed
(t *testing.T)
test/category_controller_test.go:205
Function
TestGetCategorySuccess
(t *testing.T)
test/category_controller_test.go:172
Function
TestListCategoriesSuccess
(t *testing.T)
test/category_controller_test.go:284
Function
TestSimpleServiceError
(t *testing.T)
test/simple_service_test.go:9
Function
TestSimpleServiceSuccess
(t *testing.T)
test/simple_service_test.go:15
Function
TestUnauthorized
(t *testing.T)
test/category_controller_test.go:331
next →
1–100 of 107, ranked by callers