├── .gitignore ├── apispec.json ├── app ├── database.go └── router.go ├── controller ├── category_controller.go └── category_controller_impl.go ├── exception ├── error_handler.go └── not_found_error.go ├── go.mod ├── go.sum ├── helper ├── error.go ├── json.go ├── model.go └── tx.go ├── injector.go ├── main.go ├── middleware └── auth_middleware.go ├── model ├── domain │ └── category.go └── web │ ├── category_create_request.go │ ├── category_response.go │ ├── category_update_request.go │ └── web_response.go ├── repository ├── category_repository.go └── category_repository_impl.go ├── service ├── category_service.go └── category_service_impl.go ├── simple ├── bar.go ├── configuration.go ├── connection.go ├── database.go ├── file.go ├── foo.go ├── foo_bar.go ├── foobar.go ├── hello.go ├── injector.go ├── simple.go └── wire_gen.go ├── test.http ├── test ├── category_controller_test.go ├── file_test.go └── simple_service_test.go └── wire_gen.go /.gitignore: -------------------------------------------------------------------------------- 1 | .idea -------------------------------------------------------------------------------- /apispec.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProgrammerZamanNow/belajar-golang-dependency-injection/HEAD/apispec.json -------------------------------------------------------------------------------- /app/database.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProgrammerZamanNow/belajar-golang-dependency-injection/HEAD/app/database.go -------------------------------------------------------------------------------- /app/router.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProgrammerZamanNow/belajar-golang-dependency-injection/HEAD/app/router.go -------------------------------------------------------------------------------- /controller/category_controller.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProgrammerZamanNow/belajar-golang-dependency-injection/HEAD/controller/category_controller.go -------------------------------------------------------------------------------- /controller/category_controller_impl.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProgrammerZamanNow/belajar-golang-dependency-injection/HEAD/controller/category_controller_impl.go -------------------------------------------------------------------------------- /exception/error_handler.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProgrammerZamanNow/belajar-golang-dependency-injection/HEAD/exception/error_handler.go -------------------------------------------------------------------------------- /exception/not_found_error.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProgrammerZamanNow/belajar-golang-dependency-injection/HEAD/exception/not_found_error.go -------------------------------------------------------------------------------- /go.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProgrammerZamanNow/belajar-golang-dependency-injection/HEAD/go.mod -------------------------------------------------------------------------------- /go.sum: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProgrammerZamanNow/belajar-golang-dependency-injection/HEAD/go.sum -------------------------------------------------------------------------------- /helper/error.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProgrammerZamanNow/belajar-golang-dependency-injection/HEAD/helper/error.go -------------------------------------------------------------------------------- /helper/json.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProgrammerZamanNow/belajar-golang-dependency-injection/HEAD/helper/json.go -------------------------------------------------------------------------------- /helper/model.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProgrammerZamanNow/belajar-golang-dependency-injection/HEAD/helper/model.go -------------------------------------------------------------------------------- /helper/tx.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProgrammerZamanNow/belajar-golang-dependency-injection/HEAD/helper/tx.go -------------------------------------------------------------------------------- /injector.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProgrammerZamanNow/belajar-golang-dependency-injection/HEAD/injector.go -------------------------------------------------------------------------------- /main.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProgrammerZamanNow/belajar-golang-dependency-injection/HEAD/main.go -------------------------------------------------------------------------------- /middleware/auth_middleware.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProgrammerZamanNow/belajar-golang-dependency-injection/HEAD/middleware/auth_middleware.go -------------------------------------------------------------------------------- /model/domain/category.go: -------------------------------------------------------------------------------- 1 | package domain 2 | 3 | type Category struct { 4 | Id int 5 | Name string 6 | } 7 | -------------------------------------------------------------------------------- /model/web/category_create_request.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProgrammerZamanNow/belajar-golang-dependency-injection/HEAD/model/web/category_create_request.go -------------------------------------------------------------------------------- /model/web/category_response.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProgrammerZamanNow/belajar-golang-dependency-injection/HEAD/model/web/category_response.go -------------------------------------------------------------------------------- /model/web/category_update_request.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProgrammerZamanNow/belajar-golang-dependency-injection/HEAD/model/web/category_update_request.go -------------------------------------------------------------------------------- /model/web/web_response.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProgrammerZamanNow/belajar-golang-dependency-injection/HEAD/model/web/web_response.go -------------------------------------------------------------------------------- /repository/category_repository.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProgrammerZamanNow/belajar-golang-dependency-injection/HEAD/repository/category_repository.go -------------------------------------------------------------------------------- /repository/category_repository_impl.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProgrammerZamanNow/belajar-golang-dependency-injection/HEAD/repository/category_repository_impl.go -------------------------------------------------------------------------------- /service/category_service.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProgrammerZamanNow/belajar-golang-dependency-injection/HEAD/service/category_service.go -------------------------------------------------------------------------------- /service/category_service_impl.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProgrammerZamanNow/belajar-golang-dependency-injection/HEAD/service/category_service_impl.go -------------------------------------------------------------------------------- /simple/bar.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProgrammerZamanNow/belajar-golang-dependency-injection/HEAD/simple/bar.go -------------------------------------------------------------------------------- /simple/configuration.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProgrammerZamanNow/belajar-golang-dependency-injection/HEAD/simple/configuration.go -------------------------------------------------------------------------------- /simple/connection.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProgrammerZamanNow/belajar-golang-dependency-injection/HEAD/simple/connection.go -------------------------------------------------------------------------------- /simple/database.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProgrammerZamanNow/belajar-golang-dependency-injection/HEAD/simple/database.go -------------------------------------------------------------------------------- /simple/file.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProgrammerZamanNow/belajar-golang-dependency-injection/HEAD/simple/file.go -------------------------------------------------------------------------------- /simple/foo.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProgrammerZamanNow/belajar-golang-dependency-injection/HEAD/simple/foo.go -------------------------------------------------------------------------------- /simple/foo_bar.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProgrammerZamanNow/belajar-golang-dependency-injection/HEAD/simple/foo_bar.go -------------------------------------------------------------------------------- /simple/foobar.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProgrammerZamanNow/belajar-golang-dependency-injection/HEAD/simple/foobar.go -------------------------------------------------------------------------------- /simple/hello.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProgrammerZamanNow/belajar-golang-dependency-injection/HEAD/simple/hello.go -------------------------------------------------------------------------------- /simple/injector.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProgrammerZamanNow/belajar-golang-dependency-injection/HEAD/simple/injector.go -------------------------------------------------------------------------------- /simple/simple.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProgrammerZamanNow/belajar-golang-dependency-injection/HEAD/simple/simple.go -------------------------------------------------------------------------------- /simple/wire_gen.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProgrammerZamanNow/belajar-golang-dependency-injection/HEAD/simple/wire_gen.go -------------------------------------------------------------------------------- /test.http: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProgrammerZamanNow/belajar-golang-dependency-injection/HEAD/test.http -------------------------------------------------------------------------------- /test/category_controller_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProgrammerZamanNow/belajar-golang-dependency-injection/HEAD/test/category_controller_test.go -------------------------------------------------------------------------------- /test/file_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProgrammerZamanNow/belajar-golang-dependency-injection/HEAD/test/file_test.go -------------------------------------------------------------------------------- /test/simple_service_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProgrammerZamanNow/belajar-golang-dependency-injection/HEAD/test/simple_service_test.go -------------------------------------------------------------------------------- /wire_gen.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProgrammerZamanNow/belajar-golang-dependency-injection/HEAD/wire_gen.go --------------------------------------------------------------------------------