├── README.md ├── controller ├── handler │ ├── create_user.go │ ├── create_user_post.go │ ├── get_user.go │ └── get_user_post_list.go ├── router │ └── serve.go └── view │ ├── post.go │ └── user.go ├── domain ├── model │ ├── error.go │ ├── post.go │ └── user.go ├── repository │ ├── post.go │ └── user.go └── service │ ├── user_name_validator.go │ └── user_registration_checker.go ├── go.mod ├── go.sum ├── impl ├── repository │ ├── post.go │ ├── user.go │ └── user_test.go └── service │ ├── user_name_validator.go │ └── user_registration_checker.go ├── main.go ├── persistence └── inmemory │ ├── database.go │ ├── dto │ ├── post.go │ └── user.go │ └── export.go ├── usecase ├── create_user.go ├── create_user_post.go ├── error.go ├── get_user.go └── get_user_post_list.go └── utils └── hash.go /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahiro72/go-api-sample/HEAD/README.md -------------------------------------------------------------------------------- /controller/handler/create_user.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahiro72/go-api-sample/HEAD/controller/handler/create_user.go -------------------------------------------------------------------------------- /controller/handler/create_user_post.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahiro72/go-api-sample/HEAD/controller/handler/create_user_post.go -------------------------------------------------------------------------------- /controller/handler/get_user.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahiro72/go-api-sample/HEAD/controller/handler/get_user.go -------------------------------------------------------------------------------- /controller/handler/get_user_post_list.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahiro72/go-api-sample/HEAD/controller/handler/get_user_post_list.go -------------------------------------------------------------------------------- /controller/router/serve.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahiro72/go-api-sample/HEAD/controller/router/serve.go -------------------------------------------------------------------------------- /controller/view/post.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahiro72/go-api-sample/HEAD/controller/view/post.go -------------------------------------------------------------------------------- /controller/view/user.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahiro72/go-api-sample/HEAD/controller/view/user.go -------------------------------------------------------------------------------- /domain/model/error.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahiro72/go-api-sample/HEAD/domain/model/error.go -------------------------------------------------------------------------------- /domain/model/post.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahiro72/go-api-sample/HEAD/domain/model/post.go -------------------------------------------------------------------------------- /domain/model/user.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahiro72/go-api-sample/HEAD/domain/model/user.go -------------------------------------------------------------------------------- /domain/repository/post.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahiro72/go-api-sample/HEAD/domain/repository/post.go -------------------------------------------------------------------------------- /domain/repository/user.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahiro72/go-api-sample/HEAD/domain/repository/user.go -------------------------------------------------------------------------------- /domain/service/user_name_validator.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahiro72/go-api-sample/HEAD/domain/service/user_name_validator.go -------------------------------------------------------------------------------- /domain/service/user_registration_checker.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahiro72/go-api-sample/HEAD/domain/service/user_registration_checker.go -------------------------------------------------------------------------------- /go.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahiro72/go-api-sample/HEAD/go.mod -------------------------------------------------------------------------------- /go.sum: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahiro72/go-api-sample/HEAD/go.sum -------------------------------------------------------------------------------- /impl/repository/post.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahiro72/go-api-sample/HEAD/impl/repository/post.go -------------------------------------------------------------------------------- /impl/repository/user.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahiro72/go-api-sample/HEAD/impl/repository/user.go -------------------------------------------------------------------------------- /impl/repository/user_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahiro72/go-api-sample/HEAD/impl/repository/user_test.go -------------------------------------------------------------------------------- /impl/service/user_name_validator.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahiro72/go-api-sample/HEAD/impl/service/user_name_validator.go -------------------------------------------------------------------------------- /impl/service/user_registration_checker.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahiro72/go-api-sample/HEAD/impl/service/user_registration_checker.go -------------------------------------------------------------------------------- /main.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahiro72/go-api-sample/HEAD/main.go -------------------------------------------------------------------------------- /persistence/inmemory/database.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahiro72/go-api-sample/HEAD/persistence/inmemory/database.go -------------------------------------------------------------------------------- /persistence/inmemory/dto/post.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahiro72/go-api-sample/HEAD/persistence/inmemory/dto/post.go -------------------------------------------------------------------------------- /persistence/inmemory/dto/user.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahiro72/go-api-sample/HEAD/persistence/inmemory/dto/user.go -------------------------------------------------------------------------------- /persistence/inmemory/export.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahiro72/go-api-sample/HEAD/persistence/inmemory/export.go -------------------------------------------------------------------------------- /usecase/create_user.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahiro72/go-api-sample/HEAD/usecase/create_user.go -------------------------------------------------------------------------------- /usecase/create_user_post.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahiro72/go-api-sample/HEAD/usecase/create_user_post.go -------------------------------------------------------------------------------- /usecase/error.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahiro72/go-api-sample/HEAD/usecase/error.go -------------------------------------------------------------------------------- /usecase/get_user.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahiro72/go-api-sample/HEAD/usecase/get_user.go -------------------------------------------------------------------------------- /usecase/get_user_post_list.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahiro72/go-api-sample/HEAD/usecase/get_user_post_list.go -------------------------------------------------------------------------------- /utils/hash.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mahiro72/go-api-sample/HEAD/utils/hash.go --------------------------------------------------------------------------------